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 typeclasses are:
Respectively, these imbue the direct sum ⨁ i, A i with:
direct_sum.has_onedirect_sum.mul_zero_class,direct_sum.distribdirect_sum.semiring,direct_sum.ringdirect_sum.comm_semiring,direct_sum.comm_ring
the base ring A 0 with:
direct_sum.grade_zero.has_onedirect_sum.grade_zero.mul_zero_class,direct_sum.grade_zero.distribdirect_sum.grade_zero.semiring,direct_sum.grade_zero.ringdirect_sum.grade_zero.comm_semiring,direct_sum.grade_zero.comm_ring
and the ith grade A i with A 0-actions (•) defined as left-multiplication:
- (nothing)
direct_sum.grade_zero.has_scalar (A 0),direct_sum.grade_zero.smul_with_zero (A 0)direct_sum.grade_zero.module (A 0)- (nothing)
Note that in the presence of these instances, ⨁ i, A i itself inherits an A 0-action.
direct_sum.of_zero_ring_hom : A 0 →+* ⨁ i, A i provides direct_sum.of A 0 as a ring
homomorphism.
direct_sum.to_semiring extends direct_sum.to_add_monoid to produce a ring_hom.
Direct sums of subobjects #
Additionally, this module provides helper functions to construct gmonoid and gcomm_monoid
instances for:
A : ι → submonoid S:direct_sum.ghas_one.of_add_submonoids,direct_sum.ghas_mul.of_add_submonoids,direct_sum.gmonoid.of_add_submonoids,direct_sum.gcomm_monoid.of_add_submonoids.A : ι → subgroup S:direct_sum.ghas_one.of_add_subgroups,direct_sum.ghas_mul.of_add_subgroups,direct_sum.gmonoid.of_add_subgroups,direct_sum.gcomm_monoid.of_add_subgroups.A : ι → submodule S:direct_sum.ghas_one.of_submodules,direct_sum.ghas_mul.of_submodules,direct_sum.gmonoid.of_submodules,direct_sum.gcomm_monoid.of_submodules.
If complete_lattice.independent (set.range A), these provide a gradation of ⨆ i, A i, and the
mapping ⨁ i, A i →+ ⨆ i, A i can be obtained as
direct_sum.to_monoid (λ i, add_submonoid.inclusion $ le_supr A i).
tags #
graded ring, filtered ring, direct sum, add_submonoid
Typeclasses #
- one : A 0
A graded version of has_one, which must be of grade 0.
Instances
A graded version of has_mul that also subsumes distrib and mul_zero_class by requiring
the multiplication be an add_monoid_hom. Multiplication combines grades additively, like
add_monoid_algebra.
Instances
direct_sum.ghas_one implies a has_one (Σ i, A i), although this is only used as an instance
locally to define notation in direct_sum.gmonoid.
Equations
- direct_sum.ghas_one.to_sigma_has_one = {one := ⟨0, direct_sum.ghas_one.one _inst_3⟩}
direct_sum.ghas_mul implies a has_mul (Σ i, A i), although this is only used as an instance
locally to define notation in direct_sum.gmonoid.
- to_ghas_mul : direct_sum.ghas_mul A
- to_ghas_one : direct_sum.ghas_one A
- one_mul : ∀ (a : Σ (i : ι), A i), 1 * a = a
- mul_one : ∀ (a : Σ (i : ι), A i), a * 1 = a
- mul_assoc : ∀ (a b c_1 : Σ (i : ι), A i), (a * b) * c_1 = a * b * c_1
A graded version of monoid.
- to_gmonoid : direct_sum.gmonoid A
- mul_comm : ∀ (a b : Σ (i : ι), A i), a * b = b * a
A graded version of comm_monoid.
Shorthands for creating the above typeclasses #
From add_submonoids #
Build a ghas_one instance for a collection of add_submonoids.
Equations
- direct_sum.ghas_one.of_add_submonoids carriers one_mem = {one := ⟨1, one_mem⟩}
Build a ghas_mul instance for a collection of add_submonoids.
Build a gmonoid instance for a collection of add_submonoids.
Equations
- direct_sum.gmonoid.of_add_submonoids carriers one_mem mul_mem = {to_ghas_mul := {mul := direct_sum.ghas_mul.mul (direct_sum.ghas_mul.of_add_submonoids carriers mul_mem)}, to_ghas_one := {one := direct_sum.ghas_one.one (direct_sum.ghas_one.of_add_submonoids carriers one_mem)}, one_mul := _, mul_one := _, mul_assoc := _}
Build a gcomm_monoid instance for a collection of add_submonoids.
Equations
- direct_sum.gcomm_monoid.of_add_submonoids carriers one_mem mul_mem = {to_gmonoid := {to_ghas_mul := direct_sum.gmonoid.to_ghas_mul (direct_sum.gmonoid.of_add_submonoids carriers one_mem mul_mem), to_ghas_one := direct_sum.gmonoid.to_ghas_one (direct_sum.gmonoid.of_add_submonoids carriers one_mem mul_mem), one_mul := _, mul_one := _, mul_assoc := _}, mul_comm := _}
From add_subgroups #
Build a ghas_one instance for a collection of add_subgroups.
Equations
- direct_sum.ghas_one.of_add_subgroups carriers one_mem = direct_sum.ghas_one.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem
Build a ghas_mul instance for a collection of add_subgroups.
Equations
- direct_sum.ghas_mul.of_add_subgroups carriers mul_mem = direct_sum.ghas_mul.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) mul_mem
Build a gmonoid instance for a collection of add_subgroups.
Equations
- direct_sum.gmonoid.of_add_subgroups carriers one_mem mul_mem = direct_sum.gmonoid.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem mul_mem
Build a gcomm_monoid instance for a collection of add_subgroups.
Equations
- direct_sum.gcomm_monoid.of_add_subgroups carriers one_mem mul_mem = direct_sum.gcomm_monoid.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem mul_mem
From submoduless #
Build a ghas_one instance for a collection of submodules.
Equations
- direct_sum.ghas_one.of_submodules carriers one_mem = direct_sum.ghas_one.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem
Build a ghas_mul instance for a collection of submodules.
Equations
- direct_sum.ghas_mul.of_submodules carriers mul_mem = direct_sum.ghas_mul.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) mul_mem
Build a gmonoid instance for a collection of submoduless.
Equations
- direct_sum.gmonoid.of_submodules carriers one_mem mul_mem = direct_sum.gmonoid.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem mul_mem
Build a gcomm_monoid instance for a collection of submoduless.
Equations
- direct_sum.gcomm_monoid.of_submodules carriers one_mem mul_mem = direct_sum.gcomm_monoid.of_add_submonoids (λ (i : ι), (carriers i).to_add_submonoid) one_mem mul_mem
Instances for ⨁ i, A i #
Equations
- direct_sum.has_one A = {one := ⇑(direct_sum.of (λ (i : ι), A i) 0) direct_sum.ghas_one.one}
The multiplication from the has_mul instance, as a bundled homomorphism.
Equations
- direct_sum.mul_hom A = direct_sum.to_add_monoid (λ (i : ι), (direct_sum.to_add_monoid (λ (j : ι), ((⇑add_monoid_hom.comp_hom (direct_sum.of A (i + j))).comp direct_sum.ghas_mul.mul).flip)).flip)
Equations
- direct_sum.has_mul A = {mul := λ (a b : ⨁ (i : ι), A i), ⇑(⇑(direct_sum.mul_hom A) a) b}
Equations
- direct_sum.mul_zero_class A = {mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), zero := 0, zero_mul := _, mul_zero := _}
Equations
- direct_sum.distrib A = {mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), add := has_add.add (add_zero_class.to_has_add (⨁ (i : ι), A i)), left_distrib := _, right_distrib := _}
The semiring structure derived from gmonoid A.
Equations
- direct_sum.semiring A = {add := has_add.add (distrib.to_has_add (⨁ (i : ι), A i)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul (direct_sum.add_comm_monoid ι (λ (i : ι), A i)), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := monoid_with_zero.npow._default 1 has_mul.mul _ _, npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _}
The comm_semiring structure derived from gcomm_monoid A.
Equations
- direct_sum.comm_semiring A = {add := has_add.add (distrib.to_has_add (⨁ (i : ι), A i)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := semiring.nsmul (direct_sum.semiring (λ (i : ι), A i)), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := semiring.npow (direct_sum.semiring (λ (i : ι), A i)), npow_zero' := _, npow_succ' := _, zero_mul := _, mul_zero := _, left_distrib := _, right_distrib := _, mul_comm := _}
The ring derived from gmonoid A.
Equations
- direct_sum.ring A = {add := has_add.add (distrib.to_has_add (⨁ (i : ι), A i)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := semiring.nsmul (direct_sum.semiring (λ (i : ι), A i)), nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg (sub_neg_monoid.to_has_neg (⨁ (i : ι), A i)), sub := add_comm_group.sub (direct_sum.add_comm_group (λ (i : ι), A i)), sub_eq_add_neg := _, gsmul := add_comm_group.gsmul (direct_sum.add_comm_group (λ (i : ι), A i)), gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := semiring.npow (direct_sum.semiring (λ (i : ι), A i)), npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
The comm_ring derived from gcomm_monoid A.
Equations
- direct_sum.comm_ring A = {add := has_add.add (distrib.to_has_add (⨁ (i : ι), A i)), add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := ring.nsmul (direct_sum.ring (λ (i : ι), A i)), nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg (sub_neg_monoid.to_has_neg (⨁ (i : ι), A i)), sub := ring.sub (direct_sum.ring (λ (i : ι), A i)), sub_eq_add_neg := _, gsmul := ring.gsmul (direct_sum.ring (λ (i : ι), A i)), gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul (direct_sum.has_mul (λ (i : ι), A i)), mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := ring.npow (direct_sum.ring (λ (i : ι), A i)), npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Instances for A 0 #
The various g* instances are enough to promote the add_comm_monoid (A 0) structure to various
types of multiplicative structure.
1 : A 0 is the value provided in direct_sum.ghas_one.one.
Equations
- direct_sum.grade_zero.has_one A = {one := direct_sum.ghas_one.one _inst_3}
(•) : A 0 → A i → A i is the value provided in direct_sum.ghas_mul.mul, composed with
an eq.rec to turn A (0 + i) into A i.
Equations
- direct_sum.grade_zero.has_scalar A i = {smul := λ (x : A 0) (y : A i), eq.rec (⇑(⇑direct_sum.ghas_mul.mul x) y) _}
(*) : A 0 → A 0 → A 0 is the value provided in direct_sum.ghas_mul.mul, composed with
an eq.rec to turn A (0 + 0) into A 0.
Equations
Equations
Equations
Equations
- direct_sum.grade_zero.smul_with_zero A i = let _inst : smul_with_zero (A 0) (⨁ (i : ι), A i) := smul_with_zero.comp_hom (⨁ (i : ι), A i) (direct_sum.of A 0).to_zero_hom in function.injective.smul_with_zero (direct_sum.of A i).to_zero_hom _ _
The semiring structure derived from gmonoid A.
Equations
- direct_sum.grade_zero.semiring A = function.injective.semiring ⇑(direct_sum.of A 0) _ _ _ _ _
of A 0 is a ring_hom, using the direct_sum.grade_zero.semiring structure.
Equations
- direct_sum.of_zero_ring_hom A = {to_fun := (direct_sum.of A 0).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
Each grade A i derives a A 0-module structure from gmonoid A. Note that this results
in an overall module (A 0) (⨁ i, A i) structure via direct_sum.module.
Equations
- direct_sum.grade_zero.module A = let _inst : module (A 0) (⨁ (i : ι), A i) := module.comp_hom (⨁ (i : ι), A i) (direct_sum.of_zero_ring_hom A) in function.injective.module (A 0) (direct_sum.of A i) _ _
The comm_semiring structure derived from gcomm_monoid A.
Equations
- direct_sum.grade_zero.comm_semiring A = function.injective.comm_semiring ⇑(direct_sum.of A 0) _ _ _ _ _
The ring derived from gmonoid A.
Equations
- direct_sum.grade_zero.ring A = function.injective.ring ⇑(direct_sum.of A 0) _ _ _ _ _ _ _
The comm_ring derived from gcomm_monoid A.
Equations
- direct_sum.grade_zero.comm_ring A = function.injective.comm_ring ⇑(direct_sum.of A 0) _ _ _ _ _ _ _
If two ring homomorphisms from ⨁ i, A i are equal on each of A i y,
then they are equal.
A family of add_monoid_homs preserving direct_sum.ghas_one.one and direct_sum.ghas_mul.mul
describes a ring_homs on ⨁ i, A i. This is a stronger version of direct_sum.to_monoid.
Of particular interest is the case when A i are bundled subojects, f is the family of
coercions such as add_submonoid.subtype (A i), and the [gmonoid A] structure originates from
direct_sum.gmonoid.of_add_submonoids, in which case the proofs about ghas_one and ghas_mul
can be discharged by rfl.
Equations
- direct_sum.to_semiring f hone hmul = {to_fun := ⇑(direct_sum.to_add_monoid f), map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
Families of add_monoid_homs preserving direct_sum.ghas_one.one and direct_sum.ghas_mul.mul
are isomorphic to ring_homs on ⨁ i, A i. This is a stronger version of dfinsupp.lift_add_hom.
Equations
- direct_sum.lift_ring_hom = {to_fun := λ (f : {f // ⇑f direct_sum.ghas_one.one = 1 ∧ ∀ {i j : ι} (ai : A i) (aj : A j), ⇑f (⇑(⇑direct_sum.ghas_mul.mul ai) aj) = (⇑f ai) * ⇑f aj}), direct_sum.to_semiring f.val _ _, inv_fun := λ (F : (⨁ (i : ι), A i) →+* R), ⟨λ (i : ι), ↑F.comp (direct_sum.of A i), _⟩, left_inv := _, right_inv := _}
Concrete instances #
A direct sum of copies of a semiring inherits the multiplication structure.
Equations
- semiring.direct_sum_gmonoid = {to_ghas_mul := {mul := λ (i j : ι), add_monoid_hom.mul}, to_ghas_one := {one := 1}, one_mul := _, mul_one := _, mul_assoc := _}
A direct sum of copies of a comm_semiring inherits the commutative multiplication structure.
Equations
A direct sum of powers of a submodule of an algebra has a multiplicative structure.
Equations
- S.nat_power_direct_sum_gmonoid = direct_sum.gmonoid.of_submodules (λ (i : ℕ), S ^ i) _ _
A direct sum of powers of a submodule of a commutative algebra has a commutative multiplicative structure.
Equations
- S.nat_power_direct_sum_gcomm_monoid = direct_sum.gcomm_monoid.of_submodules (λ (i : ℕ), S ^ i) _ _