Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(algebra/category/BoolRing): The category of Boolean rings (#12905)
Define `BoolRing`, the category of Boolean rings.
- Loading branch information
1 parent
f53b239
commit 2891e1b
Showing
3 changed files
with
141 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/- | ||
Copyright (c) 2022 Yaël Dillies. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Yaël Dillies | ||
-/ | ||
import algebra.category.CommRing.basic | ||
import algebra.ring.boolean_ring | ||
import order.category.BoolAlg | ||
|
||
/-! | ||
# The category of Boolean rings | ||
This file defines `BoolRing`, the category of Boolean rings. | ||
## TODO | ||
Finish the equivalence with `BoolAlg`. | ||
-/ | ||
|
||
universes u | ||
|
||
open category_theory order | ||
|
||
/-- The category of Boolean rings. -/ | ||
def BoolRing := bundled boolean_ring | ||
|
||
namespace BoolRing | ||
|
||
instance : has_coe_to_sort BoolRing Type* := bundled.has_coe_to_sort | ||
instance (X : BoolRing) : boolean_ring X := X.str | ||
|
||
/-- Construct a bundled `BoolRing` from a `boolean_ring`. -/ | ||
def of (α : Type*) [boolean_ring α] : BoolRing := bundled.of α | ||
|
||
@[simp] lemma coe_of (α : Type*) [boolean_ring α] : ↥(of α) = α := rfl | ||
|
||
instance : inhabited BoolRing := ⟨of punit⟩ | ||
|
||
instance : bundled_hom.parent_projection @boolean_ring.to_comm_ring := ⟨⟩ | ||
|
||
attribute [derive [large_category, concrete_category]] BoolRing | ||
|
||
@[simps] instance has_forget_to_CommRing : has_forget₂ BoolRing CommRing := bundled_hom.forget₂ _ _ | ||
|
||
/-- Constructs an isomorphism of Boolean rings from a ring isomorphism between them. -/ | ||
@[simps] def iso.mk {α β : BoolRing.{u}} (e : α ≃+* β) : α ≅ β := | ||
{ hom := e, | ||
inv := e.symm, | ||
hom_inv_id' := by { ext, exact e.symm_apply_apply _ }, | ||
inv_hom_id' := by { ext, exact e.apply_symm_apply _ } } | ||
|
||
end BoolRing | ||
|
||
/-! ### Equivalence between `BoolAlg` and `BoolRing` -/ | ||
|
||
@[simps] instance BoolRing.has_forget_to_BoolAlg : has_forget₂ BoolRing BoolAlg := | ||
{ forget₂ := { obj := λ X, BoolAlg.of (as_boolalg X), map := λ X Y, ring_hom.as_boolalg } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters