Basic properties of rewrite relations #
We define the basic properties of rewrite relations (commutation, confluence, normalization, as well as various variants of these). Additionally, we prove various theorems that relate these properties to one another.
Two relations r and s commute weakly if any one-step reducts b
(via r) and c (via s) of a have a common reduct d.
Instances For
A relation r is subcommutative if any one-step reducts b and c
of a have a common reduct d, which may be equal to b or c.
Instances For
A relation r is weakly confluent (or locally confluent) if
any one-step reducts b and c of a have a common reduct d.
Instances For
The diamond property holds if any one-step reducts b and c
of a have a common one-step reduct d.
Equations
- Thesis.diamond_property r = ∀ ⦃a b c : α⦄, r a b ∧ r a c → ∃ (d : α), r b d ∧ r c d
Instances For
The triangle property holds if every element a has a two-step reduct
a' which can be reached via all one-step reducts b.
Equations
- Thesis.triangle_property r = ∀ (a : α), ∃ (a' : α), ∀ (b : α), r a b → r b a'
Instances For
A relation r is semi-confluent if r∗ a b and r a c imply the existence of a d such that
r∗ b d and r∗ c d. This differs from confluence in that c must be a one-step reduct of a.
semi_confluent is equivalent to confluent (see semi_confluent_iff_confluent)
but is sometimes easier to prove as you can simply use induction on the length of r∗ a b.
Instances For
Semi-confluence is equivalent to confluence.
A relation is conversion confluent if r≡ a b implies the existence of a c such that
r∗ a c and r∗ b c. It is equivalent to confluence (see conv_confluent_iff_confluent).
This is also called the Church-Rosser property -- since Terese identifies confluence and the Church-Rosser property, we use the novel name conversion confluence here.
Instances For
Conversion confluence is equivalent to confluence.
The diamond property implies confluence.
Strong confluence, as defined by Huet (1980).
Strong confluence implies confluence, see confluent_of_strongly_confluent.
Instances For
Any relation that is strongly confluent is confluent.
An element a is a normal form in r if there are no b s.t. r a b.
Equations
- Thesis.normal_form r a = ¬∃ (b : α), r a b
Instances For
Equations
- Thesis.weakly_normalizing' r a = ∃ (b : α), Thesis.normal_form r b ∧ r∗ a b
Instances For
A relation is weakly normalizing if all elements can reduce to a normal form.
Equations
- Thesis.weakly_normalizing r = ∀ (a : α), ∃ (b : α), Thesis.normal_form r b ∧ r∗ a b
Instances For
Equations
- Thesis.strongly_normalizing' r a = ¬∃ (f : ℕ → α), f 0 = a ∧ Thesis.reduction_seq r ⊤ f
Instances For
A relation is strongly normalizing if it admits no infinite reduction sequences.
Equations
- Thesis.strongly_normalizing r = ¬∃ (f : ℕ → α), Thesis.reduction_seq r ⊤ f
Instances For
A relation has the normal form property if a reduces to b if b is a normal form and a ≡ b.
Equations
- Thesis.normal_form_property r = ∀ (a b : α), Thesis.normal_form r b → r≡ a b → r∗ a b
Instances For
A relation has the unique normal form property if all equivalent normal forms
a and b are equal.
Equations
- Thesis.unique_normal_form_property r = ∀ (a b : α), Thesis.normal_form r a ∧ Thesis.normal_form r b → r≡ a b → a = b
Instances For
A relation has the unique normal form property with respect to reduction if all normal forms with a common expansion are equal.
Equations
- Thesis.unique_nf_prop_r r = ∀ (a b c : α), Thesis.normal_form r a ∧ Thesis.normal_form r b → r∗ c a ∧ r∗ c b → a = b
Instances For
A relation is complete if it is confluent and strongly normalizing.
Equations
Instances For
A relation is semi-complete if it has the unique normal form property and it is weakly normalizing.
Equations
Instances For
A relation is inductive if, for every reduction sequence, there exists
an element a that is a reduct of every element in the sequence.
Since inductive is a Lean keyword, we use the name rel_inductive.
Equations
- Thesis.rel_inductive r = ∀ {N : ℕ∞} {f : ℕ → α} (hseq : Thesis.reduction_seq r N f), ∃ (a : α), ∀ b ∈ hseq.elems, r∗ b a
Instances For
A relation is increasing if there exists a mapping f: α → ℕ which increases
with a reduction step.
Equations
- Thesis.increasing r = ∃ (f : α → ℕ), ∀ {a b : α}, r a b → f a < f b
Instances For
If r is increasing, so is its transitive closure r⁺.
A relation is finitely branching if every element has only finitely many one-step reducts.
Equations
- Thesis.finitely_branching r = ∀ (a : α), ∃ (s : Finset α), ∀ (b : α), r a b → b ∈ s
Instances For
A relation is acyclic if no element a is a reduct of itself.
Equations
- Thesis.acyclic r = ∀ (a b : α), r⁺ a b → a ≠ b
Instances For
If r⁻¹ is well-founded, then r is strongly normalizing.
If r is strongly normalizing, then r⁻¹ is well-founded.
Take the contrapositive, i.e. ¬WF → ¬SN. Assume r is not well-founded. Then it has an
inaccessible element. Any inaccessible element must have a descendent which is inaccessible.
This leads to an infinite sequence of inaccessible elements. Hence, r cannot be strongly normalizing.
If a relation is strongly normalizing, its inverse is well-founded, and vice versa.
Strong normalization implies weak normalization.
Any semi-complete relation r is inductive.
Any confluent relation r has the normal form property.
Any relation with the normal form property has the unique normal form property.
Any semi-complete relation is confluent.
Any inductive and increasing relation is strongly normalizing.
Any subcommutative relation is confluent.
A normal form is always strongly normalizing.