Category instance for algebras over a commutative ring #
We introduce the bundled category AlgCat of algebras over a fixed commutative ring R along
with the forgetful functors to RingCat and ModuleCat. We furthermore show that the functor
associating to a type the free R-algebra on that type is left adjoint to the forgetful functor.
@[implicit_reducible]
@[reducible, inline]
The object in the category of R-algebras associated to a type equipped with the appropriate
typeclasses. This is the preferred way to construct a term of AlgCat R.
Instances For
@[implicit_reducible]
@[implicit_reducible]
instance
AlgCat.instConcreteCategoryAlgHomCarrier
(R : Type u)
[CommRing R]
:
CategoryTheory.ConcreteCategory (AlgCat R) fun (x1 x2 : AlgCat R) => โx1 โโ[R] โx2
The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.
@[simp]
theorem
AlgCat.hom_id
(R : Type u)
[CommRing R]
{A : AlgCat R}
:
Hom.hom (CategoryTheory.CategoryStruct.id A) = AlgHom.id R โA
@[simp]
@[simp]
@[simp]
theorem
AlgCat.ofHom_id
(R : Type u)
[CommRing R]
{X : Type v}
[Ring X]
[Algebra R X]
:
ofHom (AlgHom.id R X) = CategoryTheory.CategoryStruct.id (of R X)
theorem
AlgCat.inv_hom_apply
(R : Type u)
[CommRing R]
{A B : AlgCat R}
(e : A โ
B)
(x : โA)
:
(CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) x) = x
theorem
AlgCat.hom_inv_apply
(R : Type u)
[CommRing R]
{A B : AlgCat R}
(e : A โ
B)
(x : โB)
:
(CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) x) = x
@[implicit_reducible]
theorem
AlgCat.forget_obj
(R : Type u)
[CommRing R]
{A : AlgCat R}
:
(CategoryTheory.forget (AlgCat R)).obj A = โA
theorem
AlgCat.forget_map
(R : Type u)
[CommRing R]
{A B : AlgCat R}
(f : A โถ B)
:
(CategoryTheory.forget (AlgCat R)).map f = โ(CategoryTheory.ConcreteCategory.hom f)
@[implicit_reducible]
instance
AlgCat.instRingObjForgetAlgHomCarrier
(R : Type u)
[CommRing R]
{S : AlgCat R}
:
Ring ((CategoryTheory.forget (AlgCat R)).obj S)
@[implicit_reducible]
instance
AlgCat.instAlgebraObjForgetAlgHomCarrier
(R : Type u)
[CommRing R]
{S : AlgCat R}
:
Algebra R ((CategoryTheory.forget (AlgCat R)).obj S)
@[implicit_reducible]
@[implicit_reducible]
@[simp]
theorem
AlgCat.forgetโ_module_obj
(R : Type u)
[CommRing R]
(X : AlgCat R)
:
(CategoryTheory.forgetโ (AlgCat R) (ModuleCat R)).obj X = ModuleCat.of R โX
@[simp]
theorem
AlgCat.forgetโ_module_map
(R : Type u)
[CommRing R]
{X Y : AlgCat R}
(f : X โถ Y)
:
(CategoryTheory.forgetโ (AlgCat R) (ModuleCat R)).map f = ModuleCat.ofHom (Hom.hom f).toLinearMap
The "free algebra" functor, sending a type S to the free algebra on S.
Instances For
@[simp]
theorem
AlgCat.free_map
(R : Type u)
[CommRing R]
{Xโ Yโ : Type u}
(f : Xโ โถ Yโ)
:
(free R).map f = ofHom ((FreeAlgebra.lift R) (FreeAlgebra.ฮน R โ f))
@[simp]
theorem
AlgCat.free_obj
(R : Type u)
[CommRing R]
(S : Type u)
:
(free R).obj S = of R (FreeAlgebra R S)
The free/forget adjunction for R-algebras.
Instances For
@[simp]
theorem
AlgEquiv.toAlgebraIso_inv
{R : Type u}
[CommRing R]
{Xโ Xโ : Type u}
{gโ : Ring Xโ}
{gโ : Ring Xโ}
{mโ : Algebra R Xโ}
{mโ : Algebra R Xโ}
(e : Xโ โโ[R] Xโ)
:
e.toAlgebraIso.inv = AlgCat.ofHom โe.symm
@[simp]
theorem
AlgEquiv.toAlgebraIso_hom
{R : Type u}
[CommRing R]
{Xโ Xโ : Type u}
{gโ : Ring Xโ}
{gโ : Ring Xโ}
{mโ : Algebra R Xโ}
{mโ : Algebra R Xโ}
(e : Xโ โโ[R] Xโ)
:
e.toAlgebraIso.hom = AlgCat.ofHom โe
@[simp]
theorem
CategoryTheory.Iso.toAlgEquiv_symm_apply
{R : Type u}
[CommRing R]
{X Y : AlgCat R}
(i : X โ
Y)
(a : โY)
:
i.toAlgEquiv.symm a = (ConcreteCategory.hom i.inv) a
@[simp]
theorem
CategoryTheory.Iso.toAlgEquiv_apply
{R : Type u}
[CommRing R]
{X Y : AlgCat R}
(i : X โ
Y)
(a : โX)
:
i.toAlgEquiv a = (ConcreteCategory.hom i.hom) a