Predicates

A predicate is merely a function which returns one of two values:

{ true, false }  Java

{ 1, 0 }         rex, C/C++

{ yes, no }

{ black, white }

{ red, blue }

etc.

 

A predicate is often viewed as telling something about an individual or a relationship between individuals.

married("Alice") ÅÆ 1

married("Tom") Æ 0

marriedTo("Alice", "John") Æ 1

marriedTo("Mary", "John") Æ 0

 

An argument, or n-tuple of arguments (for n-argument predicates) which makes the predicate true  (or 1, etc.) is said to satisfy  the predicate.

Above

"Alice" satisfies married

"Tom" does not

("Alice", "John") satisfies marriedTo

("Mary", "John") does not

 

To Next Slide To Previous Slide To Contents