![]() | Sets and Individuals in CYC® |
![]() | Partitioning Collections |
![]() | Argument Types of Predicates |
When a character sequence like "3" in a CycL expression is read by the system, it is represented as the integer 3 in SubL, the CYC® implementation language. We now need a way to determine that a SubL integer is a member of the collection #$Integer, so that it will be recognized as a valid argument in an expression like:
(#$arity #$purposeInEvent 3)
This could simply be implemented in code, as part of the CYC® application. But for the sake of clarity and extensibility, we introduce two predicates, #$defnSufficient and #$defnIff, which specify a SubL function to test for membership in the collection. Here are two examples in the KB:
(#$defnSufficient #$PositiveInteger CYC-POSITIVE-INTEGER?) (#$defnIff #$ScalarInterval SCALAR-INTERVAL?)
If the function specified by a #$defnSufficient assertion returns true (actually, non-NIL) when applied to some thing, then that thing is an instance of the collection. #$defnIff is a stronger relation: if and only if a thing satisfies the test function it is an instance of the collection.
So for #$PositiveInteger, both SubL integers and constants which denote instances of #$PositiveInteger are instances. #$OneMillion is an example of a constant which is an instance of #$PositiveInteger. But for #$ScalarInterval, only expressions which satisfy SCALAR-INTERVAL? are instances.