Predicates
- An expression like n ≤ 5 is a predicate (in the variable n) or predicate over the set Naturals. A predicate becomes an assertion whenever a value is assigned to its variable. A value satisfies a predicate if the predicate is true at that value:
- Use predicate Pred(x) to define new set NewSet from existing set Set
- Examples
TallStudents = { name ∈ Students | name is more than 6 feet tall}
- A predicate over a set can involve an expression in any attribute of its elements.
- The variable name x in (*) is not significant--replacing x by y makes no difference: