Equivalence Transformation
Overview
Equivalence-transformation is a proof system used alongside classical truth-functional predicate logic. It is the foundation upon which predicate transformers are based.
A proposition is said to be a tautology if it evaluates to
Axioms
Commutativity
For propositions
Associativity
For propositions
Distributivity
For propositions
De Morgan's
For propositions
Law of Double Negation
For any proposition
Law of Excluded Middle
For any proposition
Law of Contradiction
For any proposition
Law of Implication
For any propositions
Law of Equality
For any propositions
Law of Or-Simplification
For any propositions
Law of And-Simplification
For any propositions
Law of Identity
For any proposition
Inference Rules
- Rule of Substitution
- Let
be a predicate and be an equivalence. Then is an equivalence.
- Let
- Rule of Transitivity
- Let
and be equivalences. Then is an equivalence.
- Let
Selectors
A selector denotes a finite sequence of subscript expressions, each enclosed in brackets.
Selector update syntax allows specifying a new value with previous subscripted values overridden. For instance,
Generalizing further to all variable types
Substitution
Textual substitution refers to the replacement of a free identifier with an expression, introducing parentheses as necessary. This concept amounts to the Substitution Rule with different notation.
Simple
If
General
We can generalize textual substitution to operate on a vector of reference-expression pairs, where each reference corresponds to some identifier concatenated with a selector. Let
Substitution is defined recursively as follows:
- If each
is a distinct identifier with a null selector, then is the simultaneous substitution of with . - Adjacent reference-expression pairs may be permuted as long as they begin with different identifiers. That is, for all distinct
and , - Multiple assignments to subparts of an object
can be viewed as a single assignment to . That is, provided does not begin any of the ,
Note that simultaneous substitution is different from sequential substitution.
Identities
- The only possible free occurrences of
that may appear after the first of the substitutions occur in .
- The only possible free occurrences of
- If
, then . may not be free in but substituting with can introduce a free occurrence. It doesn't matter if we perform the substitution first or second though.
- Substituting
with and then evaluating is the same as substituting with the evaluation of .
- Substituting
- Let
be a state and . Then . - Given identifiers
and fresh identifiers , .
States
A state is a function that maps identifiers to