list length fn (ListLengthFn)
A Function that takes a List as its sole
argument and returns the number of items in the List. For example,
(ListLengthFn (ListFn Monday Tuesday Wednesday)) would return the
value 3.
Ontologie
SUMO / BASE-ONTOLOGYClass(es)
Související termín(y)
absolute value fn
abstraction fn
arc cosine fn
arc sine fn
arc tangent fn
back fn
begin fn
begin node fn
cardinality fn
ceiling fn
complement fn
cosine fn
cut set fn
denominator fn
end fn
end node fn
extension fn
floor fn
front fn
future fn
generalized intersection fn
generalized union fn
giga fn
imaginary part fn
immediate future fn
immediate past fn
initial node fn
integer square root fn
kilo fn
magnitude fn
mega fn
micro fn
milli fn
minimal cut set fn
nano fn
numerator fn
organization fn
past fn
path weight fn
pico fn
power set fn
predecessor fn
principal host fn
probability fn
property fn
rational number fn
real number fn
reciprocal fn
round fn
signum fn
sine fn
skin fn
square root fn
successor fn
tangent fn
tera fn
terminal node fn
wealth fn
when fn
year fn
Typy argumentů
nezáporné celé číslo ListLengthFn(seznam)
Axiomy (7)
Jestliže "length of list" se rovná number1, potom pro všechny number2 platí: existuje item tak, že "number2th element of list" se rovná item tehdy a jen tehdy pokud number2 je menší než nebo roven number1.
(=>
(equal
(ListLengthFn ?LIST)
?NUMBER1)
(forall
(?NUMBER2)
(<=>
(exists
(?ITEM)
(equal
(ListOrderFn ?LIST ?NUMBER2)
?ITEM))
(lessThanOrEqualTo ?NUMBER2 ?NUMBER1))))
"length of "(,item)"" se rovná "("length of "()""+1)".
(equal
(ListLengthFn
(ListFn @ROW ?ITEM))
(SuccessorFn
(ListLengthFn
(ListFn @ROW))))
""length of "(,item)""th element of "(,item)"" se rovná item.
(equal
(ListOrderFn
(ListFn @ROW ?ITEM)
(ListLengthFn
(ListFn @ROW ?ITEM)))
?ITEM)
(=>
(valence ?REL ?NUMBER)
(forall
(@ROW)
(=>
(holds ?REL @ROW)
(equal
(ListLengthFn
(ListFn @ROW))
?NUMBER))))
Jestliže "length of list1" se rovná number, potom existuje list2 tak, že list1 starts list2 a "(number+1)" se rovná "length of list2" a ""(number+1)"th element of list2" se rovná item.
(=>
(equal
(ListLengthFn ?LIST1)
?NUMBER)
(exists
(?LIST2)
(and
(initialList ?LIST1 ?LIST2)
(equal
(SuccessorFn ?NUMBER)
(ListLengthFn ?LIST2))
(equal
(ListOrderFn
?LIST2
(SuccessorFn ?NUMBER))
?ITEM))))
list3 se rovná "list concatenate fn(list1,list2)" tehdy a jen tehdy pokud pro všechny number1,number2 platí: jestliže number1 je menší než nebo roven "length of list1" a number2 je menší než nebo roven "length of list2" a number1 je instancí třídy kladné celé číslo a number2 je instancí třídy kladné celé číslo, potom "number1th element of list3" se rovná "number1th element of list1" a ""("length of list1"+number2)"th element of list3" se rovná "number2th element of list2".
(<=>
(equal
?LIST3
(ListConcatenateFn ?LIST1 ?LIST2))
(forall
(?NUMBER1 ?NUMBER2)
(=>
(and
(lessThanOrEqualTo
?NUMBER1
(ListLengthFn ?LIST1))
(lessThanOrEqualTo
?NUMBER2
(ListLengthFn ?LIST2))
(instance ?NUMBER1 PositiveInteger)
(instance ?NUMBER2 PositiveInteger))
(and
(equal
(ListOrderFn ?LIST3 ?NUMBER1)
(ListOrderFn ?LIST1 ?NUMBER1))
(equal
(ListOrderFn
?LIST3
(AdditionFn
(ListLengthFn ?LIST1)
?NUMBER2))
(ListOrderFn ?LIST2 ?NUMBER2))))))
- jestliže list1 starts list2,
- potom pro všechny number1,number2 platí: jestliže "length of list1" se rovná number1 a number2 je menší než nebo roven number1, potom "number2th element of list1" se rovná "number2th element of list2"
.
(=>
(initialList ?LIST1 ?LIST2)
(forall
(?NUMBER1 ?NUMBER2)
(=>
(and
(equal
(ListLengthFn ?LIST1)
?NUMBER1)
(lessThanOrEqualTo ?NUMBER2 ?NUMBER1))
(equal
(ListOrderFn ?LIST1 ?NUMBER2)
(ListOrderFn ?LIST2 ?NUMBER2)))))