Direct limit of algebraic structures #
We introduce all kinds of algebraic instances on DirectLimit, and specialize to the cases
of modules and rings, showing that they are indeed colimits in the respective categories.
Implementation notes #
The first 400 lines are boilerplate code that defines algebraic instances on DirectLimit
from magma (Mul) to Field. To make everything "hom-polymorphic", we work with DirectedSystems
of FunLikes rather than plain unbundled functions, and we use algebraic hom typeclasses
(e.g. LinearMapClass, RingHomClass) everywhere.
In Mathlib/Algebra/Colimit/Module.lean and Mathlib/Algebra/Colimit/Ring.lean,
Module.DirectLimit, AddCommGroup.DirectLimit and Ring.DirectLimit
are defined as quotients of the universal objects (DirectSum and FreeCommRing).
These definitions are more general and suitable for arbitrary colimits, but do not
immediately provide criteria to determine when two elements in a component are equal
in the direct limit.
On the other hand, the DirectLimit in this file is only defined for directed systems
and does not work for general colimits, but the equivalence relation defining DirectLimit
is very explicit. For colimits of directed systems there is no need to construct the
universal object for each type of algebraic structure; the same type DirectLimit simply
works for all of them. This file is therefore more general than the Module and Ring
files in terms of the variety of algebraic structures supported.
So far we only show that DirectLimit is the colimit in the following categories:
- modules
- non-unital semirings
- rings
- (non-unital) star rings
- R-algebras
but for the other algebraic structures the constructions and proofs will be easy following
the same pattern. Since any two colimits are isomorphic, this allows us to golf proofs of
equality criteria for Module/AddCommGroup/Ring.DirectLimit.
Equations
- DirectLimit.instOne = { one := DirectLimit.map₀ f fun (x : ι) => 1 }
Equations
- DirectLimit.instZero = { zero := DirectLimit.map₀ f fun (x : ι) => 0 }
Equations
- DirectLimit.instStar = { star := DirectLimit.map f f (fun (x : ι) (x_1 : G x) => star x_1) ⋯ }
Equations
- DirectLimit.instInvolutiveStar = { toStar := DirectLimit.instStar, star_involutive := ⋯ }
Equations
- DirectLimit.instMul = { mul := DirectLimit.map₂ f f f (fun (x : ι) (x1 x2 : G x) => x1 * x2) ⋯ }
Equations
- DirectLimit.instAdd = { add := DirectLimit.map₂ f f f (fun (x : ι) (x1 x2 : G x) => x1 + x2) ⋯ }
Equations
- DirectLimit.instCommMagmaOfMulHomClass = { toMul := DirectLimit.instMul, mul_comm := ⋯ }
Equations
- DirectLimit.instAddCommMagmaOfAddHomClass = { toAdd := DirectLimit.instAdd, add_comm := ⋯ }
Equations
- DirectLimit.instSemigroupOfMulHomClass = { toMul := DirectLimit.instMul, mul_assoc := ⋯ }
Equations
- DirectLimit.instAddSemigroupOfAddHomClass = { toAdd := DirectLimit.instAdd, add_assoc := ⋯ }
Equations
- DirectLimit.instCommSemigroupOfMulHomClass = { toSemigroup := DirectLimit.instSemigroupOfMulHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instAddCommSemigroupOfAddHomClass = { toAddSemigroup := DirectLimit.instAddSemigroupOfAddHomClass, add_comm := ⋯ }
Equations
- DirectLimit.instStarMul = { toInvolutiveStar := DirectLimit.instInvolutiveStar, star_mul := ⋯ }
Equations
- DirectLimit.instSMul = { smul := fun (r : R) => DirectLimit.map f f (fun (x : ι) (x_1 : G x) => r • x_1) ⋯ }
Equations
- DirectLimit.instVAdd = { vadd := fun (r : R) => DirectLimit.map f f (fun (x : ι) (x_1 : G x) => r +ᵥ x_1) ⋯ }
Equations
- DirectLimit.instMulActionOfMulActionHomClass = { toSMul := DirectLimit.instSMul, mul_smul := ⋯, one_smul := ⋯ }
Equations
- DirectLimit.instAddActionOfAddActionHomClass = { toVAdd := DirectLimit.instVAdd, add_vadd := ⋯, zero_vadd := ⋯ }
Equations
- DirectLimit.instMulOneClassOfMonoidHomClass = { toOne := DirectLimit.instOne, toMul := DirectLimit.instMul, one_mul := ⋯, mul_one := ⋯ }
Equations
- DirectLimit.instAddZeroClassOfAddMonoidHomClass = { toZero := DirectLimit.instZero, toAdd := DirectLimit.instAdd, zero_add := ⋯, add_zero := ⋯ }
map₀ as a MonoidHom.
Equations
- DirectLimit.map₀MonoidHom f = { toFun := fun (x : (i : ι) → G i) => DirectLimit.map₀ f x, map_one' := ⋯, map_mul' := ⋯ }
Instances For
map₀ as an AddMonoidHom.
Equations
- DirectLimit.map₀AddMonoidHom f = { toFun := fun (x : (i : ι) → G i) => DirectLimit.map₀ f x, map_zero' := ⋯, map_add' := ⋯ }
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.
Equations
- DirectLimit.instCommMonoidOfMonoidHomClass = { toMonoid := DirectLimit.instMonoid, mul_comm := ⋯ }
Equations
- DirectLimit.instAddCommMonoidOfAddMonoidHomClass = { toAddMonoid := DirectLimit.instAddMonoid, add_comm := ⋯ }
Equations
- DirectLimit.instStarAddMonoid = { toInvolutiveStar := DirectLimit.instInvolutiveStar, star_add := ⋯ }
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.
Equations
- DirectLimit.instCommGroupOfMonoidHomClass = { toGroup := DirectLimit.instGroup, mul_comm := ⋯ }
Equations
- DirectLimit.instAddCommGroupOfAddMonoidHomClass = { toAddGroup := DirectLimit.instAddGroup, add_comm := ⋯ }
Equations
- DirectLimit.instMulZeroClassOfMulHomClassOfZeroHomClass = { toMul := DirectLimit.instMul, toZero := DirectLimit.instZero, zero_mul := ⋯, mul_zero := ⋯ }
Equations
- DirectLimit.instMulZeroOneClass = { toMulOneClass := DirectLimit.instMulOneClassOfMonoidHomClass, toZero := DirectLimit.instZero, zero_mul := ⋯, mul_zero := ⋯ }
Equations
- DirectLimit.instSemigroupWithZeroOfMulHomClassOfZeroHomClass = { toSemigroup := DirectLimit.instSemigroupOfMulHomClass, toZero := DirectLimit.instZero, zero_mul := ⋯, mul_zero := ⋯ }
Equations
- DirectLimit.instMonoidWithZeroOfMonoidWithZeroHomClass = { toMonoid := DirectLimit.instMonoid, toZero := DirectLimit.instZero, zero_mul := ⋯, mul_zero := ⋯ }
Equations
- DirectLimit.instCommMonoidWithZeroOfMonoidWithZeroHomClass = { toCommMonoid := DirectLimit.instCommMonoidOfMonoidHomClass, toZero := DirectLimit.instZero, zero_mul := ⋯, mul_zero := ⋯ }
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.
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.
Equations
- DirectLimit.instAddCommMonoidWithOneOfAddMonoidHomClass = { toAddMonoidWithOne := DirectLimit.instAddMonoidWithOne, add_comm := ⋯ }
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.
Equations
- DirectLimit.instStarRingOfStarHomClass = { toStarMul := DirectLimit.instStarMul, star_add := ⋯ }
Equations
- DirectLimit.instNonUnitalSemiringOfNonUnitalRingHomClass = { toNonUnitalNonAssocSemiring := DirectLimit.instNonUnitalNonAssocSemiringOfNonUnitalRingHomClass, mul_assoc := ⋯ }
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.
map₀ as a RingHom.
Equations
- DirectLimit.map₀RingHom f = { toFun := fun (r : (i : ι) → G i) => DirectLimit.map₀ f r, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Equations
- DirectLimit.instNonUnitalNonAssocCommSemiringOfNonUnitalRingHomClass = { toNonUnitalNonAssocSemiring := DirectLimit.instNonUnitalNonAssocSemiringOfNonUnitalRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instNonUnitalCommSemiringOfNonUnitalRingHomClass = { toNonUnitalSemiring := DirectLimit.instNonUnitalSemiringOfNonUnitalRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instNonAssocCommSemiringOfRingHomClass = { toNonAssocSemiring := DirectLimit.instNonAssocSemiringOfRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instCommSemiringOfRingHomClass = { toSemiring := DirectLimit.instSemiringOfRingHomClass, mul_comm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- DirectLimit.instNonUnitalRingOfNonUnitalRingHomClass = { toNonUnitalNonAssocRing := DirectLimit.instNonUnitalNonAssocRingOfNonUnitalRingHomClass, mul_assoc := ⋯ }
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.
Equations
- DirectLimit.instNonUnitalNonAssocCommRingOfNonUnitalRingHomClass = { toNonUnitalNonAssocRing := DirectLimit.instNonUnitalNonAssocRingOfNonUnitalRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instNonUnitalCommRingOfNonUnitalRingHomClass = { toNonUnitalRing := DirectLimit.instNonUnitalRingOfNonUnitalRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instNonAssocCommRingOfRingHomClass = { toNonAssocRing := DirectLimit.instNonAssocRingOfRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instCommRingOfRingHomClass = { toRing := DirectLimit.instRingOfRingHomClass, mul_comm := ⋯ }
Equations
- DirectLimit.instSMulZeroClassOfMulActionHomClass = { toSMul := DirectLimit.instSMul, smul_zero := ⋯ }
Equations
- DirectLimit.instSMulWithZeroOfMulActionHomClassOfZeroHomClass = { toSMulZeroClass := DirectLimit.instSMulZeroClassOfMulActionHomClass, zero_smul := ⋯ }
Equations
- DirectLimit.instDistribSMulOfMulActionHomClass = { toSMulZeroClass := DirectLimit.instSMulZeroClassOfMulActionHomClass, smul_add := ⋯ }
Equations
- DirectLimit.instDistribMulAction = { toMulAction := DirectLimit.instMulActionOfMulActionHomClass, smul_zero := ⋯, smul_add := ⋯ }
Equations
- DirectLimit.instMulDistribMulActionOfMulActionHomClass = { toMulAction := DirectLimit.instMulActionOfMulActionHomClass, smul_one := ⋯, smul_mul := ⋯ }
Equations
- DirectLimit.instModule = { toDistribMulAction := DirectLimit.instDistribMulAction, add_smul := ⋯, zero_smul := ⋯ }
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.
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.
Equations
- DirectLimit.instAlgebra = { toSMul := DistribMulAction.toDistribSMul.toSMul, algebraMap := (DirectLimit.map₀RingHom f).comp (algebraMap R ((i : ι) → G i)), commutes' := ⋯, smul_def' := ⋯ }
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another module that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.Module.lift R ι G f g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_add' := ⋯, map_smul' := ⋯ }
Instances For
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another NonUnitalNonAsssocSemiRing that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.NonUnitalRing.lift G f P g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another ring that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.Ring.lift G f P g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯ }
Instances For
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another StarRing that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.NonUnitalStarRing.lift G f P g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯, map_star' := ⋯ }
Instances For
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another R-algebra that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.Algebra.lift G f P g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_one' := ⋯, map_mul' := ⋯, map_zero' := ⋯, map_add' := ⋯, commutes' := ⋯ }
Instances For
The canonical map from a component to the direct limit.
Equations
Instances For
The universal property of the direct limit: maps from the components to another R-algebra that respect the directed system structure (i.e. make some diagram commute) give rise to a unique map out of the direct limit.
Equations
- DirectLimit.NonUnitalAlgebra.lift G f P g Hg = { toFun := DirectLimit.lift f (fun (x1 : ι) (x2 : G x1) => (g x1) x2) ⋯, map_smul' := ⋯, map_zero' := ⋯, map_add' := ⋯, map_mul' := ⋯ }