Documentation

Cslib.Foundations.Relation.Defs

Relations: Definitions #

References #

Operations on relations #

def Relation.emptyHRelation {α : Sort u} {β : Sort v} :
αβProp

The empty (heterogeneous) relation, which always returns False.

Equations
Instances For
    def Relation.dom {α : Type u_1} {β : Sort u_2} (r : αβProp) :
    Set α

    Domain of a relation.

    Equations
    Instances For
      def Relation.cod {α : Sort u_1} {β : Type u_2} (r : αβProp) :
      Set β

      Codomain of a relation, aka range.

      Equations
      Instances For
        def Relation.Join₂ {α : Sort u_1} (r₁ r₂ : ααProp) (a b : α) :

        Generalisation of Join to two relations.

        Equations
        Instances For
          @[reducible, inline, deprecated "use `Join (ReflTrasnGen ·)` instead" (since := "2026-09-12")]
          abbrev Relation.MJoin {α : Type u_1} (r : ααProp) :
          ααProp

          The join of the reflexive transitive closure. This is not named in Mathlib, but see #loogle Relation.Join (Relation.ReflTransGen ?r)

          Equations
          Instances For
            def Relation.UpTo {α : Type u_1} (r s : ααProp) :
            ααProp

            The relation r 'up to' the relation s.

            Equations
            Instances For
              def Relation.Preserves {α : Sort u_1} (r : ααProp) (P : αProp) :

              Relation r preserves predicate P.

              Equations
              Instances For

                Confluence and commutation properties #

                @[reducible, inline]
                abbrev Relation.Diamond {α : Type u_1} (r : ααProp) :

                A relation has the diamond property when all reductions with a common origin are joinable

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev Relation.DiamondCommute {α : Sort u_1} (r₁ r₂ : ααProp) :

                  Generalization of Diamond to two relations.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Relation.Confluent {α : Type u_1} (r : ααProp) :

                    A relation is confluent when its reflexive transitive closure has the diamond property.

                    Equations
                    Instances For
                      @[reducible, inline]
                      abbrev Relation.Commute {α : Type u_1} (r₁ r₂ : ααProp) :

                      Generalization of Confluent to two relations.

                      Equations
                      Instances For
                        @[reducible, inline]
                        abbrev Relation.SemiConfluent {α : Type u_1} (r : ααProp) :

                        A relation is semi-confluent when single and multiple steps with common origin are multi-joinable.

                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev Relation.SemiCommute {α : Type u_1} (r₁ r₂ : ααProp) :

                          Generalisation of SemiConfluent to two relations.

                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev Relation.ChurchRosser {α : Type u_1} (r : ααProp) :

                            A relation has the Church Rosser property when equivalence implies multi-joinability.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev Relation.LocallyConfluent {α : Type u_1} (r : ααProp) :

                              A relation is locally confluent when all reductions with a common origin are multi-joinable

                              Equations
                              Instances For
                                def Relation.LocallyCommute {α : Type u_1} (r₁ r₂ : ααProp) :

                                Generalization of LocallyConfluent to two relations.

                                Equations
                                Instances For
                                  @[reducible, inline]
                                  abbrev Relation.StronglyConfluent {α : Type u_1} (r : ααProp) :

                                  A relation is strongly confluent when single steps are reflexive- and multi-joinable.

                                  Equations
                                  Instances For
                                    def Relation.StronglyCommute {α : Type u_1} (r₁ r₂ : ααProp) :

                                    Generalization of StronglyConfluent to two relations.

                                    Equations
                                    Instances For

                                      Normalization properties #

                                      @[reducible, inline]
                                      abbrev Relation.Reducible {α : Sort u_1} (r : ααProp) (x : α) :

                                      An element is reducible with respect to a relation if there is a value it is related to.

                                      Equations
                                      Instances For
                                        @[reducible, inline]
                                        abbrev Relation.Normal {α : Sort u_1} (r : ααProp) (x : α) :

                                        An element is normal if it is not reducible.

                                        Equations
                                        Instances For
                                          @[reducible, inline]
                                          abbrev Relation.Normalizable {α : Type u_1} (r : ααProp) (x : α) :

                                          An element is normalizable if it is related to a normal element.

                                          Equations
                                          Instances For
                                            @[reducible, inline]
                                            abbrev Relation.Normalizing {α : Type u_1} (r : ααProp) :

                                            A relation is normalizing when every element is normalizable.

                                            Equations
                                            Instances For
                                              @[reducible, inline]
                                              abbrev Relation.SN {α : Sort u_1} (r : ααProp) :
                                              αProp

                                              An element x is SN (for strongly-normalising) for a relation r if it is accessible under the inverse of r.

                                              Equations
                                              Instances For
                                                @[reducible, inline]
                                                abbrev Relation.Terminating {α : Sort u_1} (r : ααProp) :

                                                A relation is terminating when the inverse of its transitive closure is well-founded. Note that this is also called Noetherian or strongly normalizing in the literature.

                                                Equations
                                                Instances For
                                                  @[reducible, inline]
                                                  abbrev Relation.Acyclic {α : Sort u_1} (r : ααProp) :

                                                  A relation is acyclic if its transitive closure is irreflexive, equivalently if it admits no nonempty cycle.

                                                  Equations
                                                  Instances For
                                                    @[reducible, inline]
                                                    abbrev Relation.Convergent {α : Type u_1} (r : ααProp) :

                                                    A relation is convergent when it is both confluent and terminating.

                                                    Equations
                                                    Instances For
                                                      class Relation.RightEuclidean {α : Sort u_1} (r : ααProp) :

                                                      A relation r is (right) Euclidean if r a b and r a c guarantee r b c.

                                                      • rightEuclidean {a b c : α} : r a br a cr b c
                                                      Instances
                                                        class Relation.LeftEuclidean {α : Sort u_1} (r : ααProp) :

                                                        A relation r is (left) Euclidean if r a c and r b c guarantee r a b.

                                                        • leftEuclidean {a b c : α} : r a cr b cr a b
                                                        Instances
                                                          class Relation.Serial {α : Sort u_1} (r : ααProp) :

                                                          A relation r is serial if every element is Reducible, i.e. Relator.LeftTotal.

                                                          Instances

                                                            Properties of relations on restrictions of their (co)domain #

                                                            @[instance_reducible]
                                                            instance Set.instCoeDepForallForallPropForallElemForall_cslib {α : Type u_1} (r : ααProp) (s : Set α) :
                                                            CoeDep (ααProp) r (ssProp)
                                                            Equations
                                                            def Set.ReflOn {α : Type u_1} (s : Set α) (r : ααProp) :

                                                            ReflOn s r is true when a relation r is reflexive on its restriction to a set s.

                                                            Equations
                                                            Instances For
                                                              @[reducible, inline]
                                                              abbrev Set.LeftQuasiRefl {α : Type u_1} (r : ααProp) :

                                                              LeftQuasiRefl r is true when a relation r is reflexive on its domain.

                                                              Equations
                                                              Instances For
                                                                @[reducible, inline]
                                                                abbrev Set.RightQuasiRefl {α : Type u_1} (r : ααProp) :

                                                                RightQuasiRefl r is true when a relation r is reflexive on its codomain.

                                                                Equations
                                                                Instances For
                                                                  def Set.SymmOn {α : Type u_1} (s : Set α) (r : ααProp) :

                                                                  SymmOn s r is true when a relation r is symmetric on its restriction to a set s.

                                                                  Equations
                                                                  • s.SymmOn r = ∀ (a : α), a s∀ (b : α), b sr a br b a
                                                                  Instances For