Predicates and Denotational Functions The Basics Arity Argument
Predicates and Denotational Functions • • • The Basics Arity Argument Types Second-Order Predicates More on Functions Copyright © 2002 Cycorp
Second-Order Predicates • Sometimes we want to make statements about predicates themselves. • This requires “second-order” predicates, which can take predicates as arguments. Examples : #$arg 1 Isa, #$arity, #$isa • Thus in (#$arity #$mother 2), #$arity takes the predicate #$mother as its first argument. • Some second-order predicates are used to relate Cyc. L predicates to one another within a predicate hierarchy. . . Copyright © 2002 Cycorp
#$genl. Preds (#$isa #$genl. Preds #$Binary. Predicate) (#$arg 1 Isa #$genl. Preds #$Predicate) (#$arg 2 Isa #$genl. Preds #$Predicate) • (#$genl. Preds ? NARROW-PRED ? WIDE-PRED) means that ? NARROW-PRED is a restricted version of ? WIDE-PRED • Any arguments of which ? NARROW-PRED is true are also ones of which ? WIDE-PRED is true. • Predicates related by #$genl. Preds can be any arity, as long as they both have the same arity. Copyright © 2002 Cycorp
#$genl. Preds (continued) • (#$genl. Preds #$biological. Mother #$biological. Parents) is (#$implies (#$biological. Mother ? X ? Y) (#$biological. Parents ? X ? Y)) • (#$genl. Preds #$created. By #$starts. After. Starting. Of) is (#$implies (#$created. By ? X ? Y) (#$starts. After. Starting. Of ? X ? Y)) Copyright © 2002 Cycorp
#$genl. Inverse • (#$genl. Inverse ? NARROW-PRED ? WIDE-PRED-INV) means that ? NARROW-PRED is a restricted version of ? WIDE-PRED-INV, with argument order reversed. Copyright © 2002 Cycorp
#$genl. Inverse • (#$genl. Inverse ? NARROW-PRED ? WIDE-PRED-INV) means that ? NARROW-PRED is a restricted version of ? WIDE-PRED-INV, with argument order reversed. How would this be expressed in a rule ? Copyright © 2002 Cycorp
#$genl. Inverse • (#$genl. Inverse ? NARROW-PRED ? WIDE-PRED-INV) means that ? NARROW -PRED is a restricted version of ? WIDE-PRED-INV, with argument order reversed. How would this be expressed in a rule ? (#$implies (? NARROW-PRED ? ARG 1 ? ARG 2) (? WIDE-PRED-INV ? ARG 2 ? ARG 1)) • ? NARROW-PRED and ? WIDE-INV-PRED must be binary predicates. • Example : (#$genl. Inverse #$customers #$suppliers) Copyright © 2002 Cycorp
#$negation. Preds • (#$negation. Preds ? PRED ? NEG-PRED) means that if (? PRED ? ARG 1 … ? ARGN) then not (? NEG-PRED ? ARG 1 … ? ARGN) • ? PRED and ? NEG-PRED can be of any arity, as long as they both have the same arity. • Example : (#$negation. Preds #$owns #$rents) Copyright © 2002 Cycorp
#$negation. Inverse • (#$negation. Inverse ? PRED ? NEG-PRED-INV) means that if (? PRED ? ARG 1 ? ARG 2) then not (? NEG-PRED-INV ? ARG 2 ? ARG 1) • ? PRED and ? NEG-PRED-INV must be binary predicates. • Example: (#$negation. Inverse #$subordinates) Copyright © 2002 Cycorp
Summary • Second-Order predicates can be used to express relations between predicates • The four predicates discussed were: – #$genl. Preds – #$genl. Inverse – #$negation. Preds – #$negation. Inverse Copyright © 2002 Cycorp
- Slides: 10