Documentation

Cslib.Foundations.RelationAlgebra.Basic

Relation algebras #

A relation algebra in the sense of Tarski (not to be confused with a relational algebra) is an extension of Boolean algebras that are designed to form an algebraic analysis of relations, α → α → Prop in Lean. They have applications in computer science such as the theory of constraint satisfaction as well as mathematical connections such as combinatorics.

References #

class Cslib.RelationAlgebra (α : Type u_1) extends BooleanAlgebra α, Monoid α, StarMul α :
Type u_1

The class of relation algebras. Note the notational differences from the literature. In addition to inheriting Mathlib's notations for Boolean algebras, star is used for converse, and the monoid reduct for composition uses multiplicative notation.

Instances
    @[instance_reducible]
    def Cslib.RelationAlgebra.ofTarski {α : Type u_1} [Max α] [Compl α] [Mul α] [One α] [Star α] (sup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a) (sup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)) (huntington : ∀ (a b : α), (aᶜ ⊔ b)ᶜ ⊔ (aᶜ ⊔ bᶜ)ᶜ = a) (mul_assoc : ∀ (a b c : α), a * b * c = a * (b * c)) (mul_one : ∀ (a : α), a * 1 = a) (star_involutive : ∀ (a : α), star (star a) = a) (star_mul : ∀ (a b : α), star (a * b) = star b * star a) (sup_mul : ∀ (a b c : α), (a ⊔ b) * c = a * c ⊔ b * c) (star_sup : ∀ (a b : α), star (a ⊔ b) = star a ⊔ star b) (tarski : ∀ (a b : α), star a * (a * b)ᶜ ⊔ bᶜ = bᶜ) :

    A RelationAlgebra can be constructed using Tarski's original ten axioms.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Cslib.RelationAlgebra.mul_sup {α : Type u_1} [RelationAlgebra α] (a b c : α) :
      a * (b ⊔ c) = a * b ⊔ a * c
      theorem Cslib.RelationAlgebra.left_modular {α : Type u_1} [RelationAlgebra α] (a b c : α) :
      a * b ⊓ c ≤ a * (b ⊓ star a * c)

      A relation algebra is integral when its identity is an atom.

      Equations
      Instances For

        The set of identity atoms.

        Equations
        Instances For

          The set of symmetric diversity atoms, those below the complement of identity.

          Equations
          Instances For

            The set of nonsymmetric diversity atoms. The diversity condition follows from le_compl_one_of_mem_nonsymmetricDiversityAtoms.

            Equations
            Instances For

              Every nonsymmetric atom lies below the complement of identity.