Documentation

Thesis.BasicProperties

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.

@[reducible, inline]
abbrev Thesis.weakly_commutes {α : Type u_1} (r s : Rel α α) :

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.

Equations
Instances For
    @[reducible, inline]
    abbrev Thesis.commutes {α : Type u_1} (r s : Rel α α) :

    Two relations r and s commute if any reducts b (via r) and c (via s) of a have a common reduct d.

    Equations
    Instances For
      @[reducible, inline]
      abbrev Thesis.subcommutative {α : Type u_1} (r : Rel α α) :

      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.

      Equations
      Instances For
        @[reducible, inline]
        abbrev Thesis.confluent {α : Type u_1} (r : Rel α α) :

        A relation r is confluent if any reducts b and c of a have a common reduct d.

        Equations
        Instances For
          @[reducible, inline]
          abbrev Thesis.confluent' {α : Type u_1} (r : Rel α α) (a : α) :

          Confluence for a specific element a: α (see confluent).

          Equations
          Instances For
            @[reducible, inline]
            abbrev Thesis.weakly_confluent {α : Type u_1} (r : Rel α α) :

            A relation r is weakly confluent (or locally confluent) if any one-step reducts b and c of a have a common reduct d.

            Equations
            Instances For
              @[reducible, inline]
              abbrev Thesis.diamond_property {α : Type u_1} (r : Rel α α) :

              The diamond property holds if any one-step reducts b and c of a have a common one-step reduct d.

              Equations
              Instances For
                @[reducible, inline]
                abbrev Thesis.triangle_property {α : Type u_1} (r : Rel α α) :

                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
                Instances For
                  def Thesis.semi_confluent {α : Type u_1} (r : Rel α α) :

                  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.

                  Equations
                  Instances For

                    Semi-confluence is equivalent to confluence.

                    def Thesis.conv_confluent {α : Type u_1} (r : Rel α α) :

                    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.

                    Equations
                    Instances For

                      Conversion confluence is equivalent to confluence.

                      The diamond property implies confluence.

                      def Thesis.strongly_confluent {α : Type u_1} (r : Rel α α) :

                      Strong confluence, as defined by Huet (1980).

                      Strong confluence implies confluence, see confluent_of_strongly_confluent.

                      Equations
                      Instances For

                        Any relation that is strongly confluent is confluent.

                        @[reducible, inline]
                        abbrev Thesis.normal_form {α : Type u_1} (r : Rel α α) (a : α) :

                        An element a is a normal form in r if there are no b s.t. r a b.

                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev Thesis.weakly_normalizing' {α : Type u_1} (r : Rel α α) (a : α) :
                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev Thesis.weakly_normalizing {α : Type u_1} (r : Rel α α) :

                            A relation is weakly normalizing if all elements can reduce to a normal form.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev Thesis.strongly_normalizing' {α : Type u_1} (r : Rel α α) (a : α) :
                              Equations
                              Instances For
                                @[reducible, inline]
                                abbrev Thesis.strongly_normalizing {α : Type u_1} (r : Rel α α) :

                                A relation is strongly normalizing if it admits no infinite reduction sequences.

                                Equations
                                Instances For
                                  def Thesis.normal_form_property {α : Type u_1} (r : Rel α α) :

                                  A relation has the normal form property if a reduces to b if b is a normal form and a ≡ b.

                                  Equations
                                  Instances For
                                    def Thesis.unique_normal_form_property {α : Type u_1} (r : Rel α α) :

                                    A relation has the unique normal form property if all equivalent normal forms a and b are equal.

                                    Equations
                                    Instances For
                                      def Thesis.unique_nf_prop_r {α : Type u_1} (r : Rel α α) :

                                      A relation has the unique normal form property with respect to reduction if all normal forms with a common expansion are equal.

                                      Equations
                                      Instances For
                                        def Thesis.complete {α : Type u_1} (r : Rel α α) :

                                        A relation is complete if it is confluent and strongly normalizing.

                                        Equations
                                        Instances For
                                          def Thesis.semi_complete {α : Type u_1} (r : Rel α α) :

                                          A relation is semi-complete if it has the unique normal form property and it is weakly normalizing.

                                          Equations
                                          Instances For
                                            def Thesis.rel_inductive {α : Type u_1} (r : Rel α α) :

                                            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
                                            Instances For
                                              def Thesis.increasing {α : Type u_1} (r : Rel α α) :

                                              A relation is increasing if there exists a mapping f: α → ℕ which increases with a reduction step.

                                              Equations
                                              Instances For

                                                If r is increasing, so is its transitive closure r⁺.

                                                def Thesis.finitely_branching {α : Type u_1} (r : Rel α α) :

                                                A relation is finitely branching if every element has only finitely many one-step reducts.

                                                Equations
                                                Instances For
                                                  def Thesis.acyclic {α : Type u_1} (r : Rel α α) :

                                                  A relation is acyclic if no element a is a reduct of itself.

                                                  Equations
                                                  Instances For
                                                    theorem Thesis.sn_of_wf_inv {α : Type u_1} (r : Rel α α) :

                                                    If r⁻¹ is well-founded, then r is strongly normalizing.

                                                    theorem Thesis.wf_inv_of_sn {α : Type u_1} (r : Rel α α) :

                                                    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.