Category instances for Mul
, Add
, Semigroup
and AddSemigroup
#
We introduce the bundled categories:
MagmaCat
AddMagmaCat
Semigrp
AddSemigrp
along with the relevant forgetful functors between them.
This closely follows Mathlib.Algebra.Category.MonCat.Basic
.
TODO #
- Limits in these categories
- free/forgetful adjunctions
The category of additive magmas and additive magma morphisms.
Instances For
Equations
- MagmaCat.instCoeSortType = { coe := MagmaCat.carrier }
Equations
- AddMagmaCat.instCoeSortType = { coe := AddMagmaCat.carrier }
Construct a bundled MagmaCat
from the underlying type and typeclass.
Equations
- MagmaCat.of M = MagmaCat.mk M
Instances For
Construct a bundled AddMagmaCat
from the underlying type and typeclass.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Use the ConcreteCategory.hom
projection for @[simps]
lemmas.
Equations
- MagmaCat.Hom.Simps.hom X Y f = f.hom
Instances For
The results below duplicate the ConcreteCategory
simp lemmas, but we can keep them for dsimp
.
Equations
- MagmaCat.instInhabited = { default := MagmaCat.of PEmpty.{?u.1 + 1} }
Equations
- AddMagmaCat.instInhabited = { default := AddMagmaCat.of PEmpty.{?u.1 + 1} }
The category of additive semigroups and semigroup morphisms.
- carrier : Type u
The underlying type.
- str : AddSemigroup ↑self
Instances For
Equations
- Semigrp.instCoeSortType = { coe := Semigrp.carrier }
Equations
- AddSemigrp.instCoeSortType = { coe := AddSemigrp.carrier }
Construct a bundled Semigrp
from the underlying type and typeclass.
Equations
- Semigrp.of M = Semigrp.mk M
Instances For
Construct a bundled AddSemigrp
from the underlying type and typeclass.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Use the ConcreteCategory.hom
projection for @[simps]
lemmas.
Equations
- Semigrp.Hom.Simps.hom X Y f = f.hom
Instances For
The results below duplicate the ConcreteCategory
simp lemmas, but we can keep them for dsimp
.
Equations
- Semigrp.instInhabited = { default := Semigrp.of PEmpty.{?u.1 + 1} }
Equations
- AddSemigrp.instInhabited = { default := AddSemigrp.of PEmpty.{?u.1 + 1} }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Build an isomorphism in the category MagmaCat
from a MulEquiv
between Mul
s.
Equations
- e.toMagmaCatIso = { hom := MagmaCat.ofHom e.toMulHom, inv := MagmaCat.ofHom e.symm.toMulHom, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Build an isomorphism in the category AddMagmaCat
from an AddEquiv
between Add
s.
Equations
- e.toAddMagmaCatIso = { hom := AddMagmaCat.ofHom e.toAddHom, inv := AddMagmaCat.ofHom e.symm.toAddHom, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Build an isomorphism in the category Semigroup
from a MulEquiv
between Semigroup
s.
Equations
- e.toSemigrpIso = { hom := Semigrp.ofHom e.toMulHom, inv := Semigrp.ofHom e.symm.toMulHom, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Build an isomorphism in the category
AddSemigroup
from an AddEquiv
between AddSemigroup
s.
Equations
- e.toAddSemigrpIso = { hom := AddSemigrp.ofHom e.toAddHom, inv := AddSemigrp.ofHom e.symm.toAddHom, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Build a MulEquiv
from an isomorphism in the category MagmaCat
.
Equations
- i.magmaCatIsoToMulEquiv = (MagmaCat.Hom.hom i.hom).toMulEquiv (MagmaCat.Hom.hom i.inv) ⋯ ⋯
Instances For
Build an AddEquiv
from an isomorphism in the category AddMagmaCat
.
Equations
- i.addMagmaCatIsoToAddEquiv = (AddMagmaCat.Hom.hom i.hom).toAddEquiv (AddMagmaCat.Hom.hom i.inv) ⋯ ⋯
Instances For
Build a MulEquiv
from an isomorphism in the category Semigroup
.
Equations
- i.semigrpIsoToMulEquiv = (Semigrp.Hom.hom i.hom).toMulEquiv (Semigrp.Hom.hom i.inv) ⋯ ⋯
Instances For
Build an AddEquiv
from an isomorphism in the category AddSemigroup
.
Equations
- i.addSemigrpIsoToAddEquiv = (AddSemigrp.Hom.hom i.hom).toAddEquiv (AddSemigrp.Hom.hom i.inv) ⋯ ⋯
Instances For
multiplicative equivalences between Mul
s are the same as (isomorphic to) isomorphisms
in MagmaCat
Equations
- mulEquivIsoMagmaIso = { hom := fun (e : X ≃* Y) => e.toMagmaCatIso, inv := fun (i : MagmaCat.of X ≅ MagmaCat.of Y) => i.magmaCatIsoToMulEquiv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
additive equivalences between Add
s are the same
as (isomorphic to) isomorphisms in AddMagmaCat
Equations
- One or more equations did not get rendered due to their size.
Instances For
multiplicative equivalences between Semigroup
s are the same as (isomorphic to) isomorphisms
in Semigroup
Equations
- mulEquivIsoSemigrpIso = { hom := fun (e : X ≃* Y) => e.toSemigrpIso, inv := fun (i : Semigrp.of X ≅ Semigrp.of Y) => i.semigrpIsoToMulEquiv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
additive equivalences between AddSemigroup
s are
the same as (isomorphic to) isomorphisms in AddSemigroup
Equations
- addEquivIsoAddSemigrpIso = { hom := fun (e : X ≃+ Y) => e.toAddSemigrpIso, inv := fun (i : AddSemigrp.of X ≅ AddSemigrp.of Y) => i.addSemigrpIsoToAddEquiv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Ensure that forget₂ CommMonCat MonCat
automatically reflects isomorphisms.
We could have used CategoryTheory.HasForget.ReflectsIso
alternatively.
Once we've shown that the forgetful functors to type reflect isomorphisms,
we automatically obtain that the forget₂
functors between our concrete categories
reflect isomorphisms.