Additively-graded multiplicative structures on ⨁ i, A i #
This module provides a set of heterogeneous typeclasses for defining a multiplicative structure
over ⨁ i, A i such that (*) : A i → A j → A (i + j); that is to say, A forms an
additively-graded ring. The five typeclasses are:
DirectSum.GNonUnitalNonAssocSemiring ADirectSum.GSemiring ADirectSum.GRing ADirectSum.GCommSemiring ADirectSum.GCommRing A
Respectively, these five typeclasses imbue the external direct sum ⨁ i, A i with:
DirectSum.nonUnitalNonAssocSemiring,DirectSum.nonUnitalNonAssocRingDirectSum.semiringDirectSum.ringDirectSum.commSemiringDirectSum.commRing
the base ring A 0 with instances of these types:
NonUnitalNonAssocSemiring (A 0),NonUnitalNonAssocRing (A 0)Semiring (A 0)Ring (A 0)CommSemiring (A 0)CommRing (A 0)
and the ith grade A i with A 0-actions (•) of these types:
SMulWithZero (A 0) (A i)Module (A 0) (A i)- (nothing)
- (nothing)
- (nothing)
Note that in the presence of these instances, ⨁ i, A i itself inherits an A 0-action.
DirectSum.ofZeroRingHom : A 0 →+* ⨁ i, A i provides DirectSum.of A 0 as a ring
homomorphism.
DirectSum.toSemiring extends DirectSum.toAddMonoid to produce a RingHom.
Direct sums of subobjects #
Additionally, this module provides helper functions to construct GSemiring and GCommSemiring
instances for:
A : ι → Submonoid S:DirectSum.GSemiring.ofAddSubmonoids,DirectSum.GCommSemiring.ofAddSubmonoids.A : ι → Subgroup S:DirectSum.GSemiring.ofAddSubgroups,DirectSum.GCommSemiring.ofAddSubgroups.A : ι → Submodule S:DirectSum.GSemiring.ofSubmodules,DirectSum.GCommSemiring.ofSubmodules.
If sSupIndep A, these provide a gradation of ⨆ i, A i, and the mapping ⨁ i, A i →+ ⨆ i, A i
can be obtained as DirectSum.toMonoid (fun i ↦ AddSubmonoid.inclusion <| le_iSup A i).
Implementation details #
The instances on A 0 are scoped to the DirectSum namespace, because they have
very general discriminantion tree keys.
Tags #
graded ring, filtered ring, direct sum, additive submonoid
Typeclasses #
A graded version of NonUnitalNonAssocSemiring.
Multiplication from the right with any graded component's zero vanishes.
Multiplication from the left with any graded component's zero vanishes.
- mul_add {i j : ι} (a : A i) (b c : A j) : GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c
Multiplication from the right between graded components distributes with respect to addition.
- add_mul {i j : ι} (a b : A i) (c : A j) : GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c
Multiplication from the left between graded components distributes with respect to addition.
Instances
A graded version of Semiring.
- mul_add {i j : ι} (a : A i) (b c : A j) : GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c
- add_mul {i j : ι} (a b : A i) (c : A j) : GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c
- one : A 0
- gnpow_zero' (a : GradedMonoid A) : GradedMonoid.mk (0 • a.fst) (DirectSum.GSemiring.gnpow 0 a.snd) = 1
- gnpow_succ' (n : ℕ) (a : GradedMonoid A) : GradedMonoid.mk (n.succ • a.fst) (DirectSum.GSemiring.gnpow n.succ a.snd) = ⟨n • a.fst, DirectSum.GSemiring.gnpow n a.snd⟩ * a
- natCast : ℕ → A 0
The canonical map from ℕ to the zeroth component of a graded semiring.
The canonical map from ℕ to a graded semiring respects zero.
The canonical map from ℕ to a graded semiring respects successors.
Instances
A graded version of CommSemiring.
- mul_add {i j : ι} (a : A i) (b c : A j) : GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c
- add_mul {i j : ι} (a b : A i) (c : A j) : GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c
- one : A 0
- gnpow_zero' (a : GradedMonoid A) : GradedMonoid.mk (0 • a.fst) (DirectSum.GSemiring.gnpow 0 a.snd) = 1
- gnpow_succ' (n : ℕ) (a : GradedMonoid A) : GradedMonoid.mk (n.succ • a.fst) (DirectSum.GSemiring.gnpow n.succ a.snd) = ⟨n • a.fst, DirectSum.GSemiring.gnpow n a.snd⟩ * a
Instances
A graded version of Ring.
- mul_add {i j : ι} (a : A i) (b c : A j) : GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c
- add_mul {i j : ι} (a b : A i) (c : A j) : GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c
- one : A 0
- gnpow_zero' (a : GradedMonoid A) : GradedMonoid.mk (0 • a.fst) (DirectSum.GSemiring.gnpow 0 a.snd) = 1
- gnpow_succ' (n : ℕ) (a : GradedMonoid A) : GradedMonoid.mk (n.succ • a.fst) (DirectSum.GSemiring.gnpow n.succ a.snd) = ⟨n • a.fst, DirectSum.GSemiring.gnpow n a.snd⟩ * a
- intCast : ℤ → A 0
The canonical map from ℤ to the zeroth component of a graded ring.
The canonical map from ℤ to a graded ring extends the canonical map from ℕ to the underlying graded semiring.
On negative integers, the canonical map from ℤ to a graded ring is the negative extension of the canonical map from ℕ to the underlying graded semiring.
Instances
A graded version of CommRing.
- mul_add {i j : ι} (a : A i) (b c : A j) : GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c
- add_mul {i j : ι} (a b : A i) (c : A j) : GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c
- one : A 0
- gnpow_zero' (a : GradedMonoid A) : GradedMonoid.mk (0 • a.fst) (DirectSum.GSemiring.gnpow 0 a.snd) = 1
- gnpow_succ' (n : ℕ) (a : GradedMonoid A) : GradedMonoid.mk (n.succ • a.fst) (DirectSum.GSemiring.gnpow n.succ a.snd) = ⟨n • a.fst, DirectSum.GSemiring.gnpow n a.snd⟩ * a
Instances
Instances for ⨁ i, A i #
The piecewise multiplication from the Mul instance, as a bundled homomorphism.
Instances For
The multiplication from the Mul instance, as a bundled homomorphism.
Instances For
A heavily unfolded version of the definition of multiplication
The CommSemiring structure derived from GCommSemiring A.
The CommRing derived from GCommSemiring A.
Instances for A 0 #
The various G* instances are enough to promote the AddCommMonoid (A 0) structure to various
types of multiplicative structure.
Implementation detail: Note that these instances on A 0 have very general discrimination
tree keys (e.g. DirectSum.instRingOfNat has discrimination tree key Ring _ and often
sends typeclass inference on a wild goose chase with any goal of the form Ring (F X)),
so we scope these instances to the DirectSum namespace.
The NonUnitalNonAssocSemiring structure on the grade zero part
of a GNonUnitalNonAssocSemiring.
Instances For
The SMulWithZero structure on the grade zero part
of a GNonUnitalNonAssocSemiring.
Instances For
The NatCast instance on A 0, given GSemiring A.
Instances For
The Semiring structure derived from GSemiring A.
Instances For
of A 0 is a RingHom, using the DirectSum.GradeZero.semiring structure.
Instances For
Each grade A i derives an A 0-module structure from GSemiring A. Note that this results
in an overall Module (A 0) (⨁ i, A i) structure via DirectSum.module.
Instances For
The CommSemiring structure derived from GCommSemiring A.
Instances For
The NonUnitalNonAssocRing derived from GNonUnitalNonAssocSemiring A.
Instances For
The IntCast instance on A 0, given GRing A.
Instances For
The Ring derived from GSemiring A.
Instances For
The CommRing derived from GCommSemiring A.
Instances For
If two ring homomorphisms from ⨁ i, A i are equal on each of A i y,
then they are equal.
See note [partially-applied ext lemmas].
Two RingHoms out of a direct sum are equal if they agree on the generators.
A family of AddMonoidHoms preserving DirectSum.One.one and DirectSum.Mul.mul
describes a RingHoms on ⨁ i, A i. This is a stronger version of DirectSum.toMonoid.
Of particular interest is the case when A i are bundled subobjects, f is the family of
coercions such as AddSubmonoid.subtype (A i), and the [GSemiring A] structure originates from
DirectSum.gsemiring.ofAddSubmonoids, in which case the proofs about GOne and GMul
can be discharged by rfl.
Instances For
Alias of DirectSum.toSemiring_toAddMonoidHom.
Families of AddMonoidHoms preserving DirectSum.One.one and DirectSum.Mul.mul
are isomorphic to RingHoms on ⨁ i, A i. This is a stronger version of DFinsupp.liftAddHom.
Instances For
Concrete instances #
A direct sum of copies of a NonUnitalNonAssocSemiring inherits the multiplication structure.
A direct sum of copies of a Semiring inherits the multiplication structure.
A direct sum of copies of a Ring inherits the multiplication structure.
A direct sum of copies of a CommSemiring inherits the commutative multiplication structure.
A direct sum of copies of a CommRing inherits the commutative multiplication structure.