File: Mathlib/Algebra/Ring/BooleanRing.lean

full_name: BooleanRing.mul_self
code: /-- A Boolean ring is a ring where multiplication is idempotent. -/
class BooleanRing (α) extends Ring α where
  /-- Multiplication in a boolean ring is idempotent. -/
  mul_self : ∀ a : α, a * a = a
goal: a * a = a

full_name: BooleanRing
code: /-- A Boolean ring is a ring where multiplication is idempotent. -/
class BooleanRing (α) extends Ring α where
  /-- Multiplication in a boolean ring is idempotent. -/
  mul_self : ∀ a : α, a * a = a
goal: Type u_4

full_name: instIdempotentOpHMul_mathlib
code: instance : Std.IdempotentOp (α := α) (· * ·) 
goal: Std.IdempotentOp fun x x_1 => x * x_1

full_name: mul_self
code: @[simp]
theorem mul_self : a * a = a 
goal: a * a = a

full_name: add_self
code: @[simp]
theorem add_self : a + a = 0 
goal: a + a = 0

full_name: neg_eq
code: @[simp]
theorem neg_eq : -a = a 
goal: -a = a

full_name: add_eq_zero'
code: theorem add_eq_zero' : a + b = 0 ↔ a = b 
goal: a + b = 0 ↔ a = b

full_name: mul_add_mul
code: @[simp]
theorem mul_add_mul : a * b + b * a = 0 
goal: a * b + b * a = 0

full_name: sub_eq_add
code: @[simp]
theorem sub_eq_add : a - b = a + b 
goal: a - b = a + b

full_name: mul_one_add_self
code: @[simp]
theorem mul_one_add_self : a * (1 + a) = 0 
goal: a * (1 + a) = 0

full_name: BooleanRing.toCommRing
code: instance (priority := 100) BooleanRing.toCommRing : CommRing α 
goal: CommRing α

full_name: instBooleanRingPUnit
code: instance : BooleanRing PUnit 
goal: BooleanRing PUnit.{u_4 + 1}

full_name: AsBoolAlg
code: /-- Type synonym to view a Boolean ring as a Boolean algebra. -/
def AsBoolAlg (α : Type*) 
goal: Type u_4

full_name: toBoolAlg
code: /-- The "identity" equivalence between `AsBoolAlg α` and `α`. -/
def toBoolAlg : α ≃ AsBoolAlg α 
goal: α ≃ AsBoolAlg α

full_name: ofBoolAlg
code: /-- The "identity" equivalence between `α` and `AsBoolAlg α`. -/
def ofBoolAlg : AsBoolAlg α ≃ α 
goal: AsBoolAlg α ≃ α

full_name: toBoolAlg_symm_eq
code: @[simp]
theorem toBoolAlg_symm_eq : (@toBoolAlg α).symm = ofBoolAlg 
goal: toBoolAlg.symm = ofBoolAlg

full_name: ofBoolAlg_symm_eq
code: @[simp]
theorem ofBoolAlg_symm_eq : (@ofBoolAlg α).symm = toBoolAlg 
goal: ofBoolAlg.symm = toBoolAlg

full_name: toBoolAlg_ofBoolAlg
code: @[simp]
theorem toBoolAlg_ofBoolAlg (a : AsBoolAlg α) : toBoolAlg (ofBoolAlg a) = a 
goal: toBoolAlg (ofBoolAlg a) = a

full_name: ofBoolAlg_toBoolAlg
code: @[simp]
theorem ofBoolAlg_toBoolAlg (a : α) : ofBoolAlg (toBoolAlg a) = a 
goal: ofBoolAlg (toBoolAlg a) = a

full_name: toBoolAlg_inj
code: theorem toBoolAlg_inj {a b : α} : toBoolAlg a = toBoolAlg b ↔ a = b 
goal: toBoolAlg a = toBoolAlg b ↔ a = b

full_name: ofBoolAlg_inj
code: theorem ofBoolAlg_inj {a b : AsBoolAlg α} : ofBoolAlg a = ofBoolAlg b ↔ a = b 
goal: ofBoolAlg a = ofBoolAlg b ↔ a = b

full_name: instInhabitedAsBoolAlg
code: instance [Inhabited α] : Inhabited (AsBoolAlg α) 
goal: Inhabited (AsBoolAlg α)

full_name: BooleanRing.sup
code: /-- The join operation in a Boolean ring is `x + y + x * y`. -/
def sup : Sup α 
goal: Sup α

full_name: BooleanRing.inf
code: /-- The meet operation in a Boolean ring is `x * y`. -/
def inf : Inf α 
goal: Inf α

full_name: BooleanRing.sup_comm
code: theorem sup_comm (a b : α) : a ⊔ b = b ⊔ a 
goal: a ⊔ b = b ⊔ a

full_name: BooleanRing.inf_comm
code: theorem inf_comm (a b : α) : a ⊓ b = b ⊓ a 
goal: a ⊓ b = b ⊓ a

full_name: BooleanRing.sup_assoc
code: theorem sup_assoc (a b c : α) : a ⊔ b ⊔ c = a ⊔ (b ⊔ c) 
goal: a ⊔ b ⊔ c = a ⊔ (b ⊔ c)

full_name: BooleanRing.inf_assoc
code: theorem inf_assoc (a b c : α) : a ⊓ b ⊓ c = a ⊓ (b ⊓ c) 
goal: a ⊓ b ⊓ c = a ⊓ (b ⊓ c)

full_name: BooleanRing.sup_inf_self
code: theorem sup_inf_self (a b : α) : a ⊔ a ⊓ b = a 
goal: a ⊔ a ⊓ b = a

full_name: BooleanRing.inf_sup_self
code: theorem inf_sup_self (a b : α) : a ⊓ (a ⊔ b) = a 
goal: a ⊓ (a ⊔ b) = a

full_name: BooleanRing.le_sup_inf_aux
code: theorem le_sup_inf_aux (a b c : α) : (a + b + a * b) * (a + c + a * c) = a + b * c + a * (b * c) 
goal: (a + b + a * b) * (a + c + a * c) = a + b * c + a * (b * c)

full_name: BooleanRing.le_sup_inf
code: theorem le_sup_inf (a b c : α) : (a ⊔ b) ⊓ (a ⊔ c) ⊔ (a ⊔ b ⊓ c) = a ⊔ b ⊓ c 
goal: (a ⊔ b) ⊓ (a ⊔ c) ⊔ (a ⊔ b ⊓ c) = a ⊔ b ⊓ c

full_name: BooleanRing.toBooleanAlgebra
code: /-- 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)`
-/
def toBooleanAlgebra : BooleanAlgebra α 
goal: BooleanAlgebra α

full_name: instBooleanAlgebraAsBoolAlg
code: instance : BooleanAlgebra (AsBoolAlg α) 
goal: BooleanAlgebra (AsBoolAlg α)

full_name: ofBoolAlg_top
code: @[simp]
theorem ofBoolAlg_top : ofBoolAlg (⊤ : AsBoolAlg α) = 1 
goal: ofBoolAlg ⊤ = 1

full_name: ofBoolAlg_bot
code: @[simp]
theorem ofBoolAlg_bot : ofBoolAlg (⊥ : AsBoolAlg α) = 0 
goal: ofBoolAlg ⊥ = 0

full_name: ofBoolAlg_sup
code: @[simp]
theorem ofBoolAlg_sup (a b : AsBoolAlg α) :
    ofBoolAlg (a ⊔ b) = ofBoolAlg a + ofBoolAlg b + ofBoolAlg a * ofBoolAlg b 
goal: ofBoolAlg (a ⊔ b) = ofBoolAlg a + ofBoolAlg b + ofBoolAlg a * ofBoolAlg b

full_name: ofBoolAlg_inf
code: @[simp]
theorem ofBoolAlg_inf (a b : AsBoolAlg α) : ofBoolAlg (a ⊓ b) = ofBoolAlg a * ofBoolAlg b 
goal: ofBoolAlg (a ⊓ b) = ofBoolAlg a * ofBoolAlg b

full_name: ofBoolAlg_compl
code: @[simp]
theorem ofBoolAlg_compl (a : AsBoolAlg α) : ofBoolAlg aᶜ = 1 + ofBoolAlg a 
goal: ofBoolAlg aᶜ = 1 + ofBoolAlg a

full_name: ofBoolAlg_sdiff
code: @[simp]
theorem ofBoolAlg_sdiff (a b : AsBoolAlg α) : ofBoolAlg (a \ b) = ofBoolAlg a * (1 + ofBoolAlg b) 
goal: ofBoolAlg (a \ b) = ofBoolAlg a * (1 + ofBoolAlg b)

full_name: _private.Mathlib.Algebra.Ring.BooleanRing.0.of_boolalg_symmDiff_aux
code: private theorem of_boolalg_symmDiff_aux (a b : α) : (a + b + a * b) * (1 + a * b) = a + b 
goal: (a + b + a * b) * (1 + a * b) = a + b

full_name: ofBoolAlg_symmDiff
code: @[simp]
theorem ofBoolAlg_symmDiff (a b : AsBoolAlg α) : ofBoolAlg (a ∆ b) = ofBoolAlg a + ofBoolAlg b 
goal: ofBoolAlg (a ∆ b) = ofBoolAlg a + ofBoolAlg b

full_name: ofBoolAlg_mul_ofBoolAlg_eq_left_iff
code: @[simp]
theorem ofBoolAlg_mul_ofBoolAlg_eq_left_iff {a b : AsBoolAlg α} :
    ofBoolAlg a * ofBoolAlg b = ofBoolAlg a ↔ a ≤ b 
goal: ofBoolAlg a * ofBoolAlg b = ofBoolAlg a ↔ a ≤ b

full_name: toBoolAlg_zero
code: @[simp]
theorem toBoolAlg_zero : toBoolAlg (0 : α) = ⊥ 
goal: toBoolAlg 0 = ⊥

full_name: toBoolAlg_one
code: @[simp]
theorem toBoolAlg_one : toBoolAlg (1 : α) = ⊤ 
goal: toBoolAlg 1 = ⊤

full_name: toBoolAlg_mul
code: @[simp]
theorem toBoolAlg_mul (a b : α) : toBoolAlg (a * b) = toBoolAlg a ⊓ toBoolAlg b 
goal: toBoolAlg (a * b) = toBoolAlg a ⊓ toBoolAlg b

full_name: toBoolAlg_add_add_mul
code: @[simp]
theorem toBoolAlg_add_add_mul (a b : α) : toBoolAlg (a + b + a * b) = toBoolAlg a ⊔ toBoolAlg b 
goal: toBoolAlg (a + b + a * b) = toBoolAlg a ⊔ toBoolAlg b

full_name: toBoolAlg_add
code: @[simp]
theorem toBoolAlg_add (a b : α) : toBoolAlg (a + b) = toBoolAlg a ∆ toBoolAlg b 
goal: toBoolAlg (a + b) = toBoolAlg a ∆ toBoolAlg b

full_name: RingHom.asBoolAlg
code: /-- Turn a ring homomorphism from Boolean rings `α` to `β` into a bounded lattice homomorphism
from `α` to `β` considered as Boolean algebras. -/
@[simps]
protected def RingHom.asBoolAlg (f : α →+* β) : BoundedLatticeHom (AsBoolAlg α) (AsBoolAlg β) 
goal: BoundedLatticeHom (AsBoolAlg α) (AsBoolAlg β)

full_name: RingHom.asBoolAlg_toLatticeHom_toSupHom_toFun
code: /-- Turn a ring homomorphism from Boolean rings `α` to `β` into a bounded lattice homomorphism
from `α` to `β` considered as Boolean algebras. -/
@[simps]
protected def RingHom.asBoolAlg (f : α →+* β) : BoundedLatticeHom (AsBoolAlg α) (AsBoolAlg β) 
goal: ∀ (a : AsBoolAlg α), f.asBoolAlg.toSupHom a = (⇑toBoolAlg ∘ ⇑f ∘ ⇑ofBoolAlg) a

full_name: RingHom.asBoolAlg_id
code: @[simp]
theorem RingHom.asBoolAlg_id : (RingHom.id α).asBoolAlg = BoundedLatticeHom.id _ 
goal: (RingHom.id α).asBoolAlg = BoundedLatticeHom.id (AsBoolAlg α)

full_name: RingHom.asBoolAlg_comp
code: @[simp]
theorem RingHom.asBoolAlg_comp (g : β →+* γ) (f : α →+* β) :
    (g.comp f).asBoolAlg = g.asBoolAlg.comp f.asBoolAlg 
goal: (g.comp f).asBoolAlg = g.asBoolAlg.comp f.asBoolAlg

full_name: AsBoolRing
code: /-- Type synonym to view a Boolean ring as a Boolean algebra. -/
def AsBoolRing (α : Type*) 
goal: Type u_4

full_name: toBoolRing
code: /-- The "identity" equivalence between `AsBoolRing α` and `α`. -/
def toBoolRing : α ≃ AsBoolRing α 
goal: α ≃ AsBoolRing α

full_name: ofBoolRing
code: /-- The "identity" equivalence between `α` and `AsBoolRing α`. -/
def ofBoolRing : AsBoolRing α ≃ α 
goal: AsBoolRing α ≃ α

full_name: toBoolRing_symm_eq
code: @[simp]
theorem toBoolRing_symm_eq : (@toBoolRing α).symm = ofBoolRing 
goal: toBoolRing.symm = ofBoolRing

full_name: ofBoolRing_symm_eq
code: @[simp]
theorem ofBoolRing_symm_eq : (@ofBoolRing α).symm = toBoolRing 
goal: ofBoolRing.symm = toBoolRing

full_name: toBoolRing_ofBoolRing
code: @[simp]
theorem toBoolRing_ofBoolRing (a : AsBoolRing α) : toBoolRing (ofBoolRing a) = a 
goal: toBoolRing (ofBoolRing a) = a

full_name: ofBoolRing_toBoolRing
code: @[simp]
theorem ofBoolRing_toBoolRing (a : α) : ofBoolRing (toBoolRing a) = a 
goal: ofBoolRing (toBoolRing a) = a

full_name: toBoolRing_inj
code: theorem toBoolRing_inj {a b : α} : toBoolRing a = toBoolRing b ↔ a = b 
goal: toBoolRing a = toBoolRing b ↔ a = b

full_name: ofBoolRing_inj
code: theorem ofBoolRing_inj {a b : AsBoolRing α} : ofBoolRing a = ofBoolRing b ↔ a = b 
goal: ofBoolRing a = ofBoolRing b ↔ a = b

full_name: instInhabitedAsBoolRing
code: instance [Inhabited α] : Inhabited (AsBoolRing α) 
goal: Inhabited (AsBoolRing α)

full_name: GeneralizedBooleanAlgebra.toNonUnitalCommRing
code: /-- Every generalized Boolean algebra has the structure of a non unital 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 `⊥`
-/
abbrev GeneralizedBooleanAlgebra.toNonUnitalCommRing [GeneralizedBooleanAlgebra α] :
    NonUnitalCommRing α 
goal: NonUnitalCommRing α

full_name: instNonUnitalCommRingAsBoolRingOfGeneralizedBooleanAlgebra
code: instance [GeneralizedBooleanAlgebra α] : NonUnitalCommRing (AsBoolRing α) 
goal: NonUnitalCommRing (AsBoolRing α)

full_name: BooleanAlgebra.toBooleanRing
code: /-- 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 `⊤`
-/
abbrev BooleanAlgebra.toBooleanRing : BooleanRing α 
goal: BooleanRing α

full_name: instBooleanRingAsBoolRing
code: instance : BooleanRing (AsBoolRing α) 
goal: BooleanRing (AsBoolRing α)

full_name: ofBoolRing_zero
code: @[simp]
theorem ofBoolRing_zero : ofBoolRing (0 : AsBoolRing α) = ⊥ 
goal: ofBoolRing 0 = ⊥

full_name: ofBoolRing_one
code: @[simp]
theorem ofBoolRing_one : ofBoolRing (1 : AsBoolRing α) = ⊤ 
goal: ofBoolRing 1 = ⊤

full_name: ofBoolRing_neg
code: @[simp]
theorem ofBoolRing_neg (a : AsBoolRing α) : ofBoolRing (-a) = ofBoolRing a 
goal: ofBoolRing (-a) = ofBoolRing a

full_name: ofBoolRing_add
code: @[simp]
theorem ofBoolRing_add (a b : AsBoolRing α) : ofBoolRing (a + b) = ofBoolRing a ∆ ofBoolRing b 
goal: ofBoolRing (a + b) = ofBoolRing a ∆ ofBoolRing b

full_name: ofBoolRing_sub
code: @[simp]
theorem ofBoolRing_sub (a b : AsBoolRing α) : ofBoolRing (a - b) = ofBoolRing a ∆ ofBoolRing b 
goal: ofBoolRing (a - b) = ofBoolRing a ∆ ofBoolRing b

full_name: ofBoolRing_mul
code: @[simp]
theorem ofBoolRing_mul (a b : AsBoolRing α) : ofBoolRing (a * b) = ofBoolRing a ⊓ ofBoolRing b 
goal: ofBoolRing (a * b) = ofBoolRing a ⊓ ofBoolRing b

full_name: ofBoolRing_le_ofBoolRing_iff
code: @[simp]
theorem ofBoolRing_le_ofBoolRing_iff {a b : AsBoolRing α} :
    ofBoolRing a ≤ ofBoolRing b ↔ a * b = a 
goal: ofBoolRing a ≤ ofBoolRing b ↔ a * b = a

full_name: toBoolRing_bot
code: @[simp]
theorem toBoolRing_bot : toBoolRing (⊥ : α) = 0 
goal: toBoolRing ⊥ = 0

full_name: toBoolRing_top
code: @[simp]
theorem toBoolRing_top : toBoolRing (⊤ : α) = 1 
goal: toBoolRing ⊤ = 1

full_name: toBoolRing_inf
code: @[simp]
theorem toBoolRing_inf (a b : α) : toBoolRing (a ⊓ b) = toBoolRing a * toBoolRing b 
goal: toBoolRing (a ⊓ b) = toBoolRing a * toBoolRing b

full_name: toBoolRing_symmDiff
code: @[simp]
theorem toBoolRing_symmDiff (a b : α) : toBoolRing (a ∆ b) = toBoolRing a + toBoolRing b 
goal: toBoolRing (a ∆ b) = toBoolRing a + toBoolRing b

full_name: BoundedLatticeHom.asBoolRing
code: /-- Turn a bounded lattice homomorphism from Boolean algebras `α` to `β` into a ring homomorphism
from `α` to `β` considered as Boolean rings. -/
@[simps]
protected def BoundedLatticeHom.asBoolRing (f : BoundedLatticeHom α β) :
    AsBoolRing α →+* AsBoolRing β 
goal: AsBoolRing α →+* AsBoolRing β

full_name: BoundedLatticeHom.asBoolRing_apply
code: /-- Turn a bounded lattice homomorphism from Boolean algebras `α` to `β` into a ring homomorphism
from `α` to `β` considered as Boolean rings. -/
@[simps]
protected def BoundedLatticeHom.asBoolRing (f : BoundedLatticeHom α β) :
    AsBoolRing α →+* AsBoolRing β 
goal: ∀ (a : AsBoolRing α), f.asBoolRing a = (⇑toBoolRing ∘ ⇑f ∘ ⇑ofBoolRing) a

full_name: BoundedLatticeHom.asBoolRing_id
code: @[simp]
theorem BoundedLatticeHom.asBoolRing_id : (BoundedLatticeHom.id α).asBoolRing = RingHom.id _ 
goal: (BoundedLatticeHom.id α).asBoolRing = RingHom.id (AsBoolRing α)

full_name: BoundedLatticeHom.asBoolRing_comp
code: @[simp]
theorem BoundedLatticeHom.asBoolRing_comp (g : BoundedLatticeHom β γ) (f : BoundedLatticeHom α β) :
    (g.comp f).asBoolRing = g.asBoolRing.comp f.asBoolRing 
goal: (g.comp f).asBoolRing = g.asBoolRing.comp f.asBoolRing

full_name: OrderIso.asBoolAlgAsBoolRing_apply
code: /-- Order isomorphism between `α` considered as a Boolean ring considered as a Boolean algebra and
`α`. -/
@[simps!]
def OrderIso.asBoolAlgAsBoolRing (α : Type*) [BooleanAlgebra α] : AsBoolAlg (AsBoolRing α) ≃o α 
goal: ∀ (a : AsBoolAlg (AsBoolRing α)), (OrderIso.asBoolAlgAsBoolRing α) a = ofBoolRing (ofBoolAlg a)

full_name: OrderIso.asBoolAlgAsBoolRing_symm_apply
code: /-- Order isomorphism between `α` considered as a Boolean ring considered as a Boolean algebra and
`α`. -/
@[simps!]
def OrderIso.asBoolAlgAsBoolRing (α : Type*) [BooleanAlgebra α] : AsBoolAlg (AsBoolRing α) ≃o α 
goal: ∀ (a : α), (RelIso.symm (OrderIso.asBoolAlgAsBoolRing α)) a = toBoolAlg (toBoolRing a)

full_name: OrderIso.asBoolAlgAsBoolRing
code: /-- Order isomorphism between `α` considered as a Boolean ring considered as a Boolean algebra and
`α`. -/
@[simps!]
def OrderIso.asBoolAlgAsBoolRing (α : Type*) [BooleanAlgebra α] : AsBoolAlg (AsBoolRing α) ≃o α 
goal: AsBoolAlg (AsBoolRing α) ≃o α

full_name: RingEquiv.asBoolRingAsBoolAlg
code: /-- Ring isomorphism between `α` considered as a Boolean algebra considered as a Boolean ring and
`α`. -/
@[simps!]
def RingEquiv.asBoolRingAsBoolAlg (α : Type*) [BooleanRing α] : AsBoolRing (AsBoolAlg α) ≃+* α 
goal: AsBoolRing (AsBoolAlg α) ≃+* α

full_name: RingEquiv.asBoolRingAsBoolAlg_apply
code: /-- Ring isomorphism between `α` considered as a Boolean algebra considered as a Boolean ring and
`α`. -/
@[simps!]
def RingEquiv.asBoolRingAsBoolAlg (α : Type*) [BooleanRing α] : AsBoolRing (AsBoolAlg α) ≃+* α 
goal: ∀ (a : AsBoolRing (AsBoolAlg α)), (RingEquiv.asBoolRingAsBoolAlg α) a = ofBoolAlg (ofBoolRing a)

full_name: RingEquiv.asBoolRingAsBoolAlg_symm_apply
code: /-- Ring isomorphism between `α` considered as a Boolean algebra considered as a Boolean ring and
`α`. -/
@[simps!]
def RingEquiv.asBoolRingAsBoolAlg (α : Type*) [BooleanRing α] : AsBoolRing (AsBoolAlg α) ≃+* α 
goal: ∀ (a : α), (RingEquiv.asBoolRingAsBoolAlg α).symm a = toBoolRing (toBoolAlg a)

full_name: instZeroBool
code: instance : Zero Bool 
goal: Zero Bool

full_name: instOneBool
code: instance : One Bool 
goal: One Bool

full_name: instAddBool_mathlib
code: instance : Add Bool 
goal: Add Bool

full_name: instNegBool_mathlib
code: instance : Neg Bool 
goal: Neg Bool

full_name: instSubBool_mathlib
code: instance : Sub Bool 
goal: Sub Bool

full_name: instMulBool_mathlib
code: instance : Mul Bool 
goal: Mul Bool

full_name: instBooleanRingBool
code: instance : BooleanRing Bool 
goal: BooleanRing Bool