Select language: english | cesky | deutsch | italiano | simplified chinese | traditional chinese | hindi Concept: English word: Home

# 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.

## Ontology

SUMO / BASE-ONTOLOGY

## Class(es)

 varga

inheritable relation

list length fn

## Coordinate term(s)

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

## Type restrictions

aQNaatmaka pUrNaanka ListLengthFn(sUchI)

## Axioms (7)

Agar "list kii lambaaaii" is equal to number1, to sab-kuch number2 ke lie hai, ki: yah kuch item nahin, ki "number2th element of list" is equal to item agar hai number2 is less than or equal to number1.
```(=>
(equal
(ListLengthFn ?LIST)
?NUMBER1)
(forall
(?NUMBER2)
(<=>
(exists
(?ITEM)
(equal
(ListOrderFn ?LIST ?NUMBER2)
?ITEM))
(lessThanOrEqualTo ?NUMBER2 ?NUMBER1))))```

""(,item)" kii lambaaaii" is equal to "(""()" kii lambaaaii"+1)".
```(equal
(ListLengthFn
(ListFn @ROW ?ITEM))
(SuccessorFn
(ListLengthFn
(ListFn @ROW))))```

"""(,item)" kii lambaaaii"th element of "(,item)"" is equal to item.
```(equal
(ListOrderFn
(ListFn @ROW ?ITEM)
(ListLengthFn
(ListFn @ROW ?ITEM)))
?ITEM)```

• agar rel ke number konaanke bahanen hai,
• to sab-kuch ke lie hai, ki: agar rel() holds, to ""()" kii lambaaaii" is equal to number
• .
```(=>
(valence ?REL ?NUMBER)
(forall
(@ROW)
(=>
(holds ?REL @ROW)
(equal
(ListLengthFn
(ListFn @ROW))
?NUMBER))))```

Agar "list1 kii lambaaaii" is equal to number, to yah kuch list2 nahin, ki list1 starts list2 aur "(number+1)" is equal to "list2 kii lambaaaii" aur ""(number+1)"th element of list2" is equal to item.
```(=>
(equal
(ListLengthFn ?LIST1)
?NUMBER)
(exists
(?LIST2)
(and
(initialList ?LIST1 ?LIST2)
(equal
(SuccessorFn ?NUMBER)
(ListLengthFn ?LIST2))
(equal
(ListOrderFn
?LIST2
(SuccessorFn ?NUMBER))
?ITEM))))```

list3 is equal to "the list composed of list1 and list2" agar hai sab-kuch number1,number2 ke lie hai, ki: agar number1 is less than or equal to "list1 kii lambaaaii" aur number2 is less than or equal to "list2 kii lambaaaii" aur number1 is an instance of dhanaatmaka pUrNaanka aur number2 is an instance of dhanaatmaka pUrNaanka, to "number1th element of list3" is equal to "number1th element of list1" aur ""("list1 kii lambaaaii"+number2)"th element of list3" is equal to "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
(ListLengthFn ?LIST1)
?NUMBER2))
(ListOrderFn ?LIST2 ?NUMBER2))))))```

• agar list1 starts list2,
• to sab-kuch number1,number2 ke lie hai, ki: agar "list1 kii lambaaaii" is equal to number1 aur number2 is less than or equal to number1, to "number2th element of list1" is equal to "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)))))```