100 likes | 242 Views
Predicates and Denotational Functions. The Basics Arity Argument Types Second-Order Predicates More on Functions. Argument Types. The types of arguments a predicate or function requires. While this is a term : (#$MotherFn #$HillaryClinton)
E N D
Predicates and Denotational Functions • The Basics • Arity • Argument Types • Second-Order Predicates • More on Functions
Argument Types The types of arguments a predicate or function requires. • While this is a term :(#$MotherFn #$HillaryClinton) • There’s something oddabout : (#$MotherFn #TheWhiteHouse) • The White House is not the kind of thing that canhave a mother. • #$TheWhiteHouse (unlike #$HillaryClinton) is not an appropriate type of argument for#$MotherFn • We can state in CycL the type(s) of arguments appropriate for a given predicate or function . . . .
Argument Types Argument types can be specified two ways • #$arg[N]Isa: states what the Nth argument must be an instance of • #$arg[N]Genl: states what the Nth argument must be a specialization of
Argument Types Example 1 • (#$arg1Isa #$mother #$Animal) • (#$arg2Isa #$mother #$FemaleAnimal) • Thus , (#$mother #$ChelseaClinton #$HillaryClinton) is a well-formed sentence because : (#$isa #$ChelseaClinton #$Animal)and (#$isa #$HillaryClinton #$FemaleAnimal)
Argument Types Example 2 • (#$arg1Isa #$TransportViaFn #$ExistingObjectType) • (#$arg1Genl #$TransportViaFn #$SolidTangibleThing) Thus, • (#$TransportViaFn #$Automobile) is a well-formed NAT because #$Automobile is both: • an instance of #$ExistingObjectType • and • a specialization of #$SolidTangibleThing.
Argument Types A relation must be applied to arguments thatmeet its argument type specifications for the result to besemanticallywell-formed. • (#$MotherFn #$TheWhiteHouse) is semantically malformed. • (#$MotherFn #$HillaryClinton) is semantically well-formed. • Cf. • A relation must be applied to the proper number of arguments for its arity for the result to besyntacticallywell-formed.
Examples of Predicate Use Given this information : • (#$isa #$objectHasColor #$BinaryPredicate) • (#$arg1Isa #$objectHasColor #$SpatialThing-Localized) • (#$arg2Isa #$objectHasColor #$Color) Are these well-formed formulas ? • (#$objectHasColor #$GoldenRetriever #$TanColor $GoldColor) • (#$objectHasColor #$Emerald-Gem #$GreenColor) • (#$objectHasColor #$TheWhiteHouse #$WhiteColor) • (#$objectHasColor #$TheWhiteHouse #$PinkColor)
Examples of Predicate Use Given this information : • (#$isa #$objectHasColor #$BinaryPredicate) • (#$arg1Isa #$objectHasColor #$SpatialThing-Localized) • (#$arg2Isa #$objectHasColor #$Color) Are these well-formed formulas ? • (#$objectHasColor #$GoldenRetriever #$TanColor $GoldColor) • (#$objectHasColor #$Emerald-Gem #$GreenColor) • (#$objectHasColor #$TheWhiteHouse #$WhiteColor) • (#$objectHasColor #$TheWhiteHouse #$PinkColor)
Examples of Predicate Use Given this information : • (#$isa #$objectHasColor #$BinaryPredicate) • (#$arg1Isa #$objectHasColor #$SpatialThing-Localized) • (#$arg2Isa #$objectHasColor #$Color) Are these well-formed formulas ? • (#$objectHasColor #$GoldenRetriever #$TanColor $GoldColor) • (#$objectHasColor #$Emerald-Gem #$GreenColor) • (#$objectHasColor #$TheWhiteHouse #$WhiteColor) • (#$objectHasColor #$TheWhiteHouse #$PinkColor)
Summary • Each predicate and function is defined to use arguments of particular types • Argument types can be specified in two ways • #$arg[N]Isa • #$arg[N]Genl • A relation must be applied to arguments that meet its argument type specifications if the result is to be semantically well-formed