Rodin HandbookThis work is sponsored by the Deploy Project This work is licensed under a Creative Commons Attribution 3.0 Unported License |
2.5.1 PredicatesIn the traffic light example, we have already encountered several predicates: The invariants of a model and the guards of an event. The proof obligations generated by Rodin are also predicates. A predicate is simply an expression that evaluates to true or false. The simplest predicates are
We can use universal quantification to express a statement that should hold for all possible values a variable might have. For example, in order to show that any given number
When a variable is introduced by a quantifier, the type of the variable must be clear. In this case Rodin can infer that
The conjunction operator (
Existential quantification on the other hand is used to state that there is an object of a certain type fulfilling a given property. Let’s express the statement that there is a Boolean value different from
As you can see, we again added type information for |