Documentation

Mathlib.Algebra.Ring.BooleanRing

Boolean rings #

A Boolean ring is a ring where multiplication is idempotent. They are equivalent to Boolean algebras.

Main declarations #

Implementation notes #

We provide two ways of turning a Boolean algebra/ring into a Boolean ring/algebra:

At this point in time, it is not clear the first way is useful, but we keep it for educational purposes and because it is easier than dealing with ofBoolAlg/toBoolAlg/ofBoolRing/toBoolRing explicitly.

Tags #

boolean ring, boolean algebra

class BooleanRing (α : Type u_4) extends Ring α :
Type u_4

A Boolean ring is a ring where multiplication is idempotent.

Instances
    theorem BooleanRing.mul_self {α : Type u_1} [BooleanRing α] (a : α) :
    a * a = a
    instance BooleanRing.instIdempotentOpHMul {α : Type u_1} [BooleanRing α] :
    Std.IdempotentOp fun (x1 x2 : α) => x1 * x2
    theorem BooleanRing.add_self {α : Type u_1} [BooleanRing α] (a : α) :
    a + a = 0
    theorem BooleanRing.neg_eq {α : Type u_1} [BooleanRing α] (a : α) :
    -a = a
    theorem BooleanRing.add_eq_zero' {α : Type u_1} [BooleanRing α] (a b : α) :
    a + b = 0 a = b
    @[simp]
    theorem BooleanRing.mul_add_mul {α : Type u_1} [BooleanRing α] (a b : α) :
    a * b + b * a = 0
    theorem BooleanRing.sub_eq_add {α : Type u_1} [BooleanRing α] (a b : α) :
    a - b = a + b
    @[simp]
    theorem BooleanRing.mul_one_add_self {α : Type u_1} [BooleanRing α] (a : α) :
    a * (1 + a) = 0
    @[instance 100]
    instance BooleanRing.toCommRing {α : Type u_1} [BooleanRing α] :
    Equations

      Turning a Boolean ring into a Boolean algebra #

      def AsBoolAlg (α : Type u_4) :
      Type u_4

      Type synonym to view a Boolean ring as a Boolean algebra.

      Equations
        Instances For
          def toBoolAlg {α : Type u_1} :

          The "identity" equivalence between AsBoolAlg α and α.

          Equations
            Instances For
              def ofBoolAlg {α : Type u_1} :

              The "identity" equivalence between α and AsBoolAlg α.

              Equations
                Instances For
                  @[simp]
                  theorem toBoolAlg_ofBoolAlg {α : Type u_1} (a : AsBoolAlg α) :
                  @[simp]
                  theorem ofBoolAlg_toBoolAlg {α : Type u_1} (a : α) :
                  theorem toBoolAlg_inj {α : Type u_1} {a b : α} :
                  theorem ofBoolAlg_inj {α : Type u_1} {a b : AsBoolAlg α} :
                  def BooleanRing.sup {α : Type u_1} [BooleanRing α] :
                  Max α

                  The join operation in a Boolean ring is x + y + x * y.

                  Equations
                    Instances For
                      def BooleanRing.inf {α : Type u_1} [BooleanRing α] :
                      Min α

                      The meet operation in a Boolean ring is x * y.

                      Equations
                        Instances For
                          theorem BooleanRing.sup_comm {α : Type u_1} [BooleanRing α] (a b : α) :
                          ab = ba
                          theorem BooleanRing.inf_comm {α : Type u_1} [BooleanRing α] (a b : α) :
                          ab = ba
                          theorem BooleanRing.sup_assoc {α : Type u_1} [BooleanRing α] (a b c : α) :
                          abc = a(bc)
                          theorem BooleanRing.inf_assoc {α : Type u_1} [BooleanRing α] (a b c : α) :
                          abc = a(bc)
                          theorem BooleanRing.sup_inf_self {α : Type u_1} [BooleanRing α] (a b : α) :
                          aab = a
                          theorem BooleanRing.inf_sup_self {α : Type u_1} [BooleanRing α] (a b : α) :
                          a(ab) = a
                          theorem BooleanRing.le_sup_inf_aux {α : Type u_1} [BooleanRing α] (a b c : α) :
                          (a + b + a * b) * (a + c + a * c) = a + b * c + a * (b * c)
                          theorem BooleanRing.le_sup_inf {α : Type u_1} [BooleanRing α] (a b c : α) :
                          (ab)(ac)(abc) = abc

                          The Boolean algebra structure on a Boolean ring.

                          The data is defined so that:

                          • a ⊔ b unfolds to a + b + a * b
                          • a ⊓ b unfolds to a * b
                          • a ≤ b unfolds to a + b + a * b = b
                          • unfolds to 0
                          • unfolds to 1
                          • aᶜ unfolds to 1 + a
                          • a \ b unfolds to a * (1 + b)
                          Equations
                            Instances For
                              @[simp]
                              theorem ofBoolAlg_top {α : Type u_1} [BooleanRing α] :
                              @[simp]
                              theorem ofBoolAlg_bot {α : Type u_1} [BooleanRing α] :
                              @[simp]
                              theorem ofBoolAlg_sup {α : Type u_1} [BooleanRing α] (a b : AsBoolAlg α) :
                              @[simp]
                              theorem ofBoolAlg_inf {α : Type u_1} [BooleanRing α] (a b : AsBoolAlg α) :
                              @[simp]
                              theorem ofBoolAlg_compl {α : Type u_1} [BooleanRing α] (a : AsBoolAlg α) :
                              @[simp]
                              theorem ofBoolAlg_sdiff {α : Type u_1} [BooleanRing α] (a b : AsBoolAlg α) :
                              @[simp]
                              theorem toBoolAlg_zero {α : Type u_1} [BooleanRing α] :
                              @[simp]
                              theorem toBoolAlg_one {α : Type u_1} [BooleanRing α] :
                              @[simp]
                              theorem toBoolAlg_mul {α : Type u_1} [BooleanRing α] (a b : α) :
                              @[simp]
                              theorem toBoolAlg_add_add_mul {α : Type u_1} [BooleanRing α] (a b : α) :
                              toBoolAlg (a + b + a * b) = toBoolAlg atoBoolAlg b
                              @[simp]
                              theorem toBoolAlg_add {α : Type u_1} [BooleanRing α] (a b : α) :
                              def RingHom.asBoolAlg {α : Type u_1} {β : Type u_2} [BooleanRing α] [BooleanRing β] (f : α →+* β) :

                              Turn a ring homomorphism from Boolean rings α to β into a bounded lattice homomorphism from α to β considered as Boolean algebras.

                              Equations
                                Instances For
                                  @[simp]
                                  theorem RingHom.asBoolAlg_toFun {α : Type u_1} {β : Type u_2} [BooleanRing α] [BooleanRing β] (f : α →+* β) (a✝ : AsBoolAlg α) :
                                  f.asBoolAlg a✝ = (toBoolAlg f ofBoolAlg) a✝
                                  @[simp]
                                  theorem RingHom.asBoolAlg_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} [BooleanRing α] [BooleanRing β] [BooleanRing γ] (g : β →+* γ) (f : α →+* β) :

                                  Turning a Boolean algebra into a Boolean ring #

                                  def AsBoolRing (α : Type u_4) :
                                  Type u_4

                                  Type synonym to view a Boolean ring as a Boolean algebra.

                                  Equations
                                    Instances For
                                      def toBoolRing {α : Type u_1} :

                                      The "identity" equivalence between AsBoolRing α and α.

                                      Equations
                                        Instances For
                                          def ofBoolRing {α : Type u_1} :

                                          The "identity" equivalence between α and AsBoolRing α.

                                          Equations
                                            Instances For
                                              @[simp]
                                              theorem toBoolRing_ofBoolRing {α : Type u_1} (a : AsBoolRing α) :
                                              @[simp]
                                              theorem ofBoolRing_toBoolRing {α : Type u_1} (a : α) :
                                              theorem toBoolRing_inj {α : Type u_1} {a b : α} :
                                              theorem ofBoolRing_inj {α : Type u_1} {a b : AsBoolRing α} :
                                              @[reducible, inline]

                                              Every generalized Boolean algebra has the structure of a nonunital commutative ring with the following data:

                                              • a + b unfolds to a ∆ b (symmetric difference)
                                              • a * b unfolds to a ⊓ b
                                              • -a unfolds to a
                                              • 0 unfolds to
                                              Equations
                                                Instances For
                                                  @[reducible, inline]

                                                  Every Boolean algebra has the structure of a Boolean ring with the following data:

                                                  • a + b unfolds to a ∆ b (symmetric difference)
                                                  • a * b unfolds to a ⊓ b
                                                  • -a unfolds to a
                                                  • 0 unfolds to
                                                  • 1 unfolds to
                                                  Equations
                                                    Instances For
                                                      @[simp]
                                                      theorem ofBoolRing_neg {α : Type u_1} [BooleanAlgebra α] (a : AsBoolRing α) :
                                                      @[simp]
                                                      theorem ofBoolRing_add {α : Type u_1} [BooleanAlgebra α] (a b : AsBoolRing α) :
                                                      @[simp]
                                                      theorem ofBoolRing_sub {α : Type u_1} [BooleanAlgebra α] (a b : AsBoolRing α) :
                                                      @[simp]
                                                      theorem ofBoolRing_mul {α : Type u_1} [BooleanAlgebra α] (a b : AsBoolRing α) :
                                                      @[simp]
                                                      theorem toBoolRing_inf {α : Type u_1} [BooleanAlgebra α] (a b : α) :
                                                      @[simp]
                                                      theorem toBoolRing_symmDiff {α : Type u_1} [BooleanAlgebra α] (a b : α) :

                                                      Turn a bounded lattice homomorphism from Boolean algebras α to β into a ring homomorphism from α to β considered as Boolean rings.

                                                      Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem BoundedLatticeHom.asBoolRing_apply {α : Type u_1} {β : Type u_2} [BooleanAlgebra α] [BooleanAlgebra β] (f : BoundedLatticeHom α β) (a✝ : AsBoolRing α) :
                                                          f.asBoolRing a✝ = (toBoolRing f ofBoolRing) a✝

                                                          Equivalence between Boolean rings and Boolean algebras #

                                                          Order isomorphism between α considered as a Boolean ring considered as a Boolean algebra and α.

                                                          Equations
                                                            Instances For

                                                              Ring isomorphism between α considered as a Boolean algebra considered as a Boolean ring and α.

                                                              Equations
                                                                Instances For