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 in every state it is well-defined in. We say propositions and are equivalent if is a tautology. In this case, we say is an equivalence.

Axioms

Commutativity

For propositions and :

Associativity

For propositions , , and :

Distributivity

For propositions , , and :

De Morgan’s

For propositions and :

Law of Negation

For any proposition , it follows that .

Law of Excluded Middle

For any proposition , it follows that .

Law of Contradiction

For any proposition , it follows that .

Law of Implication

For any propositions and , it follows that .

Law of Equality

For any propositions and , it follows that .

Law of Or-Simplification

For any propositions and , it follows that:

Law of And-Simplification

For any propositions and , it follows that:

Law of Identity

For any proposition , .

Inference Rules

  • Rule of Substitution
    • Let be a predicate and be an equivalence. Then is an equivalence.
  • Rule of Transitivity
    • Let and be equivalences. Then is an equivalence.

Selectors

A selector denotes a finite sequence of subscript expressions, each enclosed in brackets. denotes the empty selector. For example, variable is equivalently denoted as whereas for array , is equivalently denoted as .

Selector update syntax allows specifying a new value with previous subscripted values overridden. For instance, denotes with now referring to . More formally, for any ,

Generalizing further to all variable types , \begin{align*} (x; \epsilon{:}e) & = e \\ (x; [i] {\circ} s{:}e)[j] & = \begin{cases} i \neq j \rightarrow x[j] \\ i = j \rightarrow (x[j]; s{:}e) \end{cases} \end{align*}

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 denotes a variable and an expression, substitution of by is denoted as

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 denote a vector of identifiers concatenated with selectors and denote a vector of expressions. Then textual substitition of with in expression is denoted as

Substitution is defined recursively as follows:

  1. If each is a distinct identifier with a null selector, then is the simultaneous substitution of with .
  2. Adjacent reference-expression pairs may be permuted as long as they begin with different identifiers. That is, for all distinct and ,
  3. 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.

Theorems

    • The only possible free occurrences of that may appear after the first of the substitutions occur in .
  • 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 .
  • Let be a state and . Then .

  • Given identifiers and fresh identifiers , .

States

A state is a function that maps identifiers to or . A proposition can be equivalently seen as a representation of the set of states in which it is true.

Bibliography

  • Avigad, Jeremy. ‘Theorem Proving in Lean’, n.d.
  • Gries, David. The Science of Programming. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.