Decompositions of additive monoids, groups, and modules into direct sums #
Main definitions #
DirectSum.Decomposition ℳ
: A typeclass to provide a constructive decomposition from an additive monoidM
into a family of additive submonoidsℳ
DirectSum.decompose ℳ
: The canonical equivalence provided by the above typeclass
Main statements #
DirectSum.Decomposition.isInternal
: The link toDirectSum.IsInternal
.
Implementation details #
As we want to talk about different types of decomposition (additive monoids, modules, rings, ...),
we choose to avoid heavily bundling DirectSum.decompose
, instead making copies for the
AddEquiv
, LinearEquiv
, etc. This means we have to repeat statements that follow from these
bundled homs, but means we don't have to repeat statements for different types of decomposition.
A decomposition is an equivalence between an additive monoid M
and a direct sum of additive
submonoids ℳ i
of that M
, such that the "recomposition" is canonical. This definition also
works for additive groups and modules.
This is a version of DirectSum.IsInternal
which comes with a constructive inverse to the
canonical "recomposition" rather than just a proof that the "recomposition" is bijective.
Often it is easier to construct a term of this type via Decomposition.ofAddHom
or
Decomposition.ofLinearMap
.
- decompose' : M → DirectSum ι fun (i : ι) => ↥(ℳ i)
- left_inv : Function.LeftInverse (⇑(DirectSum.coeAddMonoidHom ℳ)) DirectSum.Decomposition.decompose'
- right_inv : Function.RightInverse (⇑(DirectSum.coeAddMonoidHom ℳ)) DirectSum.Decomposition.decompose'
Instances
DirectSum.Decomposition
instances, while carrying data, are always equal.
Equations
- ⋯ = ⋯
A convenience method to construct a decomposition from an AddMonoidHom
, such that the proofs
of left and right inverse can be constructed via ext
.
Equations
- DirectSum.Decomposition.ofAddHom ℳ decompose h_left_inv h_right_inv = { decompose' := ⇑decompose, left_inv := ⋯, right_inv := ⋯ }
Instances For
Noncomputably conjure a decomposition instance from a DirectSum.IsInternal
proof.
Equations
- DirectSum.IsInternal.chooseDecomposition ℳ h = { decompose' := ⇑(Equiv.ofBijective (⇑(DirectSum.coeAddMonoidHom ℳ)) h).symm, left_inv := ⋯, right_inv := ⋯ }
Instances For
If M
is graded by ι
with degree i
component ℳ i
, then it is isomorphic as
to a direct sum of components. This is the canonical spelling of the decompose'
field.
Equations
- DirectSum.decompose ℳ = { toFun := DirectSum.Decomposition.decompose', invFun := ⇑(DirectSum.coeAddMonoidHom ℳ), left_inv := ⋯, right_inv := ⋯ }
Instances For
If M
is graded by ι
with degree i
component ℳ i
, then it is isomorphic as
an additive monoid to a direct sum of components.
Equations
- DirectSum.decomposeAddEquiv ℳ = (let __src := (DirectSum.decompose ℳ).symm; { toEquiv := __src, map_add' := ⋯ }).symm
Instances For
The -
in the statements below doesn't resolve without this line.
This seems to be a problem of synthesized vs inferred typeclasses disagreeing. If we replace
the statement of decompose_neg
with @Eq (⨁ i, ℳ i) (decompose ℳ (-x)) (-decompose ℳ x)
instead of decompose ℳ (-x) = -decompose ℳ x
, which forces the typeclasses needed by ⨁ i, ℳ i
to be found by unification rather than synthesis, then everything works fine without this
instance.
Equations
- DirectSum.addCommGroupSetLike ℳ = inferInstance
A convenience method to construct a decomposition from an LinearMap
, such that the proofs
of left and right inverse can be constructed via ext
.
Equations
- DirectSum.Decomposition.ofLinearMap ℳ decompose h_left_inv h_right_inv = { decompose' := ⇑decompose, left_inv := ⋯, right_inv := ⋯ }
Instances For
If M
is graded by ι
with degree i
component ℳ i
, then it is isomorphic as
a module to a direct sum of components.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Two linear maps from a module with a decomposition agree if they agree on every piece.
Note this cannot be @[ext]
as ℳ
cannot be inferred.