Documentation

Cslib.Foundations.Syntax.Congruence

Typeclass for congruence over a context.

class Cslib.Congruence {α : Sort u_1} (r : α → α → Prop) :

The relation r is a congruence on α. This class gives access to the ≡[r] notation. To instantiate a canonical congruence for α, see HasCongruence.

Congruence relations should also instantiate LawfulCongruence to prove that the relation respects the expected congruence laws.

    Instances
      @[reducible, inline]
      abbrev Cslib.Congruence.r {α : Sort u_1} (r : α → α → Prop) [Congruence r] :
      α → α → Prop

      a ≡[r] b means that the a and b are related by the congruence r.

      Equations
      Instances For

        a ≡[r] b means that the a and b are related by the congruence r.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          class Cslib.DefaultCongruence (α : Type u_1) (r : outParam (α → α → Prop)) :

          The type α has a canonical congruence relation. This gives access to the ≡ notation.

            Instances
              @[reducible, inline]
              abbrev Cslib.DefaultCongruence.r {α : Type u_1} {r : α → α → Prop} [DefaultCongruence α r] (a b : α) :

              a ≡ b means that a and b are related by the canonical congruence relation for their type.

              Equations
              Instances For

                a ≡ b means that a and b are related by the canonical congruence relation for their type.

                Equations
                Instances For
                  @[instance_reducible]
                  instance Cslib.instCongruenceOfDefaultCongruence (α : Type u_1) (r : α → α → Prop) [DefaultCongruence α r] :
                  Equations
                  class Cslib.LawfulCongruence {α : Type u_1} (r : α → α → Prop) [Congruence r] [HasContext α] extends IsEquiv α r, CovariantClass (Cslib.HasContext.Context α) α (fun (x1 : Cslib.HasContext.Context α) (x2 : α) => x1<[x2]) r :

                  An equivalence relation on α preserved by all contexts.

                  Instances