|
|
|
The Basics |
|
Arity |
|
Argument Types |
|
Second-Order Predicates |
|
More on Functions |
|
|
|
|
|
|
|
Know what type of thing a given function returns
for any appropriate argument |
|
#$MotherFn always returns some female animal |
|
#$TransportViaFn always returns some collection of transportation events |
|
|
|
In CycL it’s easy to specify function result
types ... |
|
|
|
|
|
|
|
|
|
Specified in two primary ways |
|
|
|
#$resultIsa :
states what type of thing the result is an instance of |
|
|
|
#$resultGenl :
states what type of thing the result is a specialization of |
|
|
|
|
Example 1 |
|
(#$resultIsa #$GovernmentFn #$RegionalGovernment) |
|
Thus
, |
|
(#$isa
(#$GovernmentFn
#$Sweden)
#$RegionalGovernment) and |
|
(#$isa
(#$GovernmentFn #$CityofAustinTX)
#$RegionalGovernment) |
|
|
|
|
Example 2 |
|
|
|
(#$resultIsa
#$TransportViaFn
#$Collection) and |
|
(#$resultGenl
#$TransportViaFn #$TransportationEvent) |
|
|
|
Thus , |
|
|
|
(#$TransportViaFn
#$Automobile) is an instance of #$Collection |
|
and a specialization of #$TransportationEvent |
|
|
|
|
|
|
Given the
transitivity of #$genls and
the “transfer of #$isa through #$genls” result types are powerful. |
|
|
|
Example (using transitivity of #$genls) : |
|
(#$resultGenl
#$TransportViaFn #$TransportionEvent)
and |
|
(#$genls
#$TransportationEvent
#$Event) |
|
|
|
Thus , |
|
|
|
(#$genls
(#$TransportViaFn
#$Automobile) #$Event) |
|
|
|
|
Example (using
“transfer of #$isa through #$genls”) : |
|
|
|
(#$resultIsa
#$GovernmentFn #$RegionalGovernment) and |
|
(#$genls
#$RegionalGovernment
#$Organization) |
|
|
|
Thus
, |
|
|
|
(#$isa (#$GovernmentFn #$Sweden) #$Organization) |
|
|
|
|
|
Given this information : |
|
(#$isa #$BodyPartFn
#$BinaryFunction) |
|
(#$arg1Isa
#$BodyPartFn #$Animal) |
|
(#$arg2Isa
#$BodyPartFn
#$AnimalBodyPartType) |
|
(#$arg2Isa
#$BodyPartFn
#$UniqueAnatomicalBodyPartType) |
|
(#$arg2Genl
#$BodyPartFn
#$AnimalBodyPart) |
|
(#$resultIsa
#$BodyPartFn
#$AnimalBodyPart) |
|
Are these well-formed NATs ? |
|
(#$BodyPartFn
#$SubaruCar #$Fender) |
|
(#$BodyPartFn
#$GoldenRetriever #$Tail) |
|
(#$BodyPartFn
#$Rover) |
|
(#$BodyPartFn
#$Rover #$Tail) |
|
|
|
|
|
|
|
Given this information : |
|
(#$isa #$BodyPartFn
#$BinaryFunction) |
|
(#$arg1Isa
#$BodyPartFn #$Animal) |
|
(#$arg2Isa
#$BodyPartFn
#$AnimalBodyPartType) |
|
(#$arg2Isa
#$BodyPartFn
#$UniqueAnatomicalBodyPartType) |
|
(#$arg2Genl
#$BodyPartFn
#$AnimalBodyPart) |
|
(#$resultIsa
#$BodyPartFn
#$AnimalBodyPart) |
|
Are these well-formed NATs ? |
|
(#$BodyPartFn
#$SubaruCar #$Fender) |
|
(#$BodyPartFn
#$GoldenRetriever #$Tail) |
|
(#$BodyPartFn
#$Rover) |
|
(#$BodyPartFn
#$Rover #$Tail) |
|
|
|
|
|
|
|
Given this information : |
|
(#$isa #$BodyPartFn
#$BinaryFunction) |
|
(#$arg1Isa
#$BodyPartFn #$Animal) |
|
(#$arg2Isa
#$BodyPartFn
#$AnimalBodyPartType) |
|
(#$arg2Isa
#$BodyPartFn
#$UniqueAnatomicalBodyPartType) |
|
(#$arg2Genl
#$BodyPartFn
#$AnimalBodyPart) |
|
(#$resultIsa
#$BodyPartFn
#$AnimalBodyPart) |
|
Are these well-formed NATs ? |
|
(#$BodyPartFn
#$SubaruCar #$Fender) |
|
(#$BodyPartFn
#$GoldenRetriever #$Tail) |
|
(#$BodyPartFn
#$Rover) |
|
(#$BodyPartFn
#$Rover #$Tail) |
|
|
|
|
|
|
|
Given this information : |
|
(#$isa #$InstructionsFn-Making #$UnaryFunction) |
|
(#$arg1Isa
#$InstructionsFn-Making
#$ExistingObjectType) |
|
(#$arg1Genl
#$InstructionsFn-Making
#$Artifact-Generic) |
|
(#$resultIsa
#$InstructionsFn-Making
#$ObjectType) |
|
(#$resultGenl
#$InstructionsFn-Making
#$Instructions) |
|
|
|
Are these well-formed NATs ? |
|
(#$InstructionsFn-Making #$Recipe #$ChickenSoup) |
|
(#$InstructionsFn-Making #$RadioReceiver) |
|
(#$InstructionsFn-Making #$Mud) |
|
(#$InstructionsFn-Making #$SetOrCollection) |
|
|
|
|
|
|
|
Given this information : |
|
(#$isa #$InstructionsFn-Making #$UnaryFunction) |
|
(#$arg1Isa
#$InstructionsFn-Making
#$ExistingObjectType) |
|
(#$arg1Genl
#$InstructionsFn-Making
#$Artifact-Generic) |
|
(#$resultIsa
#$InstructionsFn-Making
#$ObjectType) |
|
(#$resultGenl
#$InstructionsFn-Making
#$Instructions) |
|
|
|
Are these well-formed NATs ? |
|
(#$InstructionsFn-Making #$Recipe #$ChickenSoup) |
|
(#$InstructionsFn-Making #$RadioReceiver) |
|
(#$InstructionsFn-Making #$Mud) |
|
(#$InstructionsFn-Making #$SetOrCollection) |
|
|
|
|
|
|
|
Given this information : |
|
(#$isa #$InstructionsFn-Making #$UnaryFunction) |
|
(#$arg1Isa
#$InstructionsFn-Making
#$ExistingObjectType) |
|
(#$arg1Genl
#$InstructionsFn-Making
#$Artifact-Generic) |
|
(#$resultIsa
#$InstructionsFn-Making
#$ObjectType) |
|
(#$resultGenl
#$InstructionsFn-Making
#$Instructions) |
|
|
|
Are these well-formed NATs ? |
|
(#$InstructionsFn-Making #$Recipe #$ChickenSoup) |
|
(#$InstructionsFn-Making #$RadioReceiver) |
|
(#$InstructionsFn-Making #$Mud) |
|
(#$InstructionsFn-Making #$SetOrCollection) |
|
|
|
|
|
|
|
|
A key distinction among functions : |
|
|
|
Does it always return an individual ? |
|
#$MotherFn |
|
#$BorderBetweenFn |
|
Does it always return a collection ? |
|
#$TransportViaFn |
|
#$GroupFn |
|
|
|
|
|
#$IndividualDenotingFunction |
|
|
|
All functions such that :
(#$resultIsa ?FUNCTION #$Individual) |
|
|
|
Any NAT made by applying ?FUNCTION denotes an individual |
|
(as
opposed to a collection). |
|
Must have a
#$resultIsa specification. |
|
Must not have a
#$resultGenl specification. Why
not? |
|
More Examples :
#$GovernmentFn , #$BirthFn |
|
|
|
|
|
#$CollectionDenotingFunction |
|
|
|
All functions such that :
(#$resultIsa ?FUNCTION #$Collection) |
|
Any NAT made by applying ?FUNCTION denotes a
collection |
|
(as
opposed to an individual). |
|
Must have a #$resultIsa specification. |
|
May also have a
#$resultGenl specification. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Individual vs. Collection Denoting Functions |
|
|
|
#$Function-Denotational |
|
|
|
|
|
|
|
#$Individual #$Collection |
|
Denoting disjoint Denoting |
|
Function Function |
|
|
|
|
|
|
|
|
|
|
|
|
|
#$GovernmentFn
#$BirthFn #$GroupFn #$ResidentsFn |
|
|
|
|
|
|
|
isa |
|
|
|
genls |
|
|
|
|
|
|
Function result types |
|
Transitivity of #$genls |
|
Individual-denoting vs. collection-denoting
functions |
|
|
|