mathlib3 documentation

algebra.direct_sum.ring

Additively-graded multiplicative structures on ⨁ i, A i #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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 external direct sum ⨁ i, A i with:

the base ring A 0 with:

and the ith grade A i with A 0-actions () defined as left-multiplication:

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 gsemiring and gcomm_semiring instances for:

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 #

@[class]
structure direct_sum.gnon_unital_non_assoc_semiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_add ι] [Π (i : ι), add_comm_monoid (A i)] :
Type (max u_1 u_2)

A graded version of non_unital_non_assoc_semiring.

Instances of this typeclass
Instances of other typeclasses for direct_sum.gnon_unital_non_assoc_semiring
  • direct_sum.gnon_unital_non_assoc_semiring.has_sizeof_inst
@[class]
structure direct_sum.gsemiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_monoid ι] [Π (i : ι), add_comm_monoid (A i)] :
Type (max u_1 u_2)

A graded version of semiring.

Instances of this typeclass
Instances of other typeclasses for direct_sum.gsemiring
  • direct_sum.gsemiring.has_sizeof_inst
@[instance]
def direct_sum.gsemiring.to_gmonoid {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_monoid ι] [Π (i : ι), add_comm_monoid (A i)] [self : direct_sum.gsemiring A] :
@[instance]
@[class]
structure direct_sum.gcomm_semiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_comm_monoid ι] [Π (i : ι), add_comm_monoid (A i)] :
Type (max u_1 u_2)

A graded version of comm_semiring.

Instances of this typeclass
Instances of other typeclasses for direct_sum.gcomm_semiring
  • direct_sum.gcomm_semiring.has_sizeof_inst
@[instance]
def direct_sum.gring.to_gsemiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_monoid ι] [Π (i : ι), add_comm_group (A i)] [self : direct_sum.gring A] :
@[class]
structure direct_sum.gring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_monoid ι] [Π (i : ι), add_comm_group (A i)] :
Type (max u_1 u_2)

A graded version of ring.

Instances of this typeclass
Instances of other typeclasses for direct_sum.gring
  • direct_sum.gring.has_sizeof_inst
@[instance]
def direct_sum.gcomm_ring.to_gring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_comm_monoid ι] [Π (i : ι), add_comm_group (A i)] [self : direct_sum.gcomm_ring A] :
@[class]
structure direct_sum.gcomm_ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_comm_monoid ι] [Π (i : ι), add_comm_group (A i)] :
Type (max u_1 u_2)

A graded version of comm_ring.

Instances of this typeclass
Instances of other typeclasses for direct_sum.gcomm_ring
  • direct_sum.gcomm_ring.has_sizeof_inst
theorem direct_sum.of_eq_of_graded_monoid_eq {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} [Π (i : ι), add_comm_monoid (A i)] {i j : ι} {a : A i} {b : A j} (h : graded_monoid.mk i a = graded_monoid.mk j b) :

Instances for ⨁ i, A i #

@[protected, instance]
def direct_sum.has_one {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_zero ι] [graded_monoid.ghas_one A] [Π (i : ι), add_comm_monoid (A i)] :
has_one (direct_sum ι (λ (i : ι), A i))
Equations
@[simp]
theorem direct_sum.gmul_hom_apply_apply {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_add ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] {i j : ι} (a : A i) (b : A j) :
def direct_sum.gmul_hom {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_add ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] {i j : ι} :
A i →+ A j →+ A (i + j)

The piecewise multiplication from the has_mul instance, as a bundled homomorphism.

Equations
def direct_sum.mul_hom {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_add ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] :
direct_sum ι (λ (i : ι), A i) →+ direct_sum ι (λ (i : ι), A i) →+ direct_sum ι (λ (i : ι), A i)

The multiplication from the has_mul instance, as a bundled homomorphism.

Equations
@[protected, instance]
Equations
theorem direct_sum.mul_hom_of_of {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} [has_add ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] {i j : ι} (a : A i) (b : A j) :
((direct_sum.mul_hom A) ((direct_sum.of (λ {i : ι}, A i) i) a)) ((direct_sum.of (λ {j : ι}, A j) j) b) = (direct_sum.of (λ {i : ι}, A i) (i + j)) (graded_monoid.ghas_mul.mul a b)
theorem direct_sum.of_mul_of {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} [has_add ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] {i j : ι} (a : A i) (b : A j) :
(direct_sum.of (λ {i : ι}, A i) i) a * (direct_sum.of (λ {j : ι}, A j) j) b = (direct_sum.of (λ {i : ι}, A i) (i + j)) (graded_monoid.ghas_mul.mul a b)
@[protected, instance]
def direct_sum.semiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] :
semiring (direct_sum ι (λ (i : ι), A i))

The semiring structure derived from gsemiring A.

Equations
theorem direct_sum.of_pow {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] {i : ι} (a : A i) (n : ) :
(direct_sum.of (λ {i : ι}, A i) i) a ^ n = (direct_sum.of (λ {i : ι}, A i) (n i)) (graded_monoid.gmonoid.gnpow n a)
theorem direct_sum.of_list_dprod {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] {α : Type u_3} (l : list α) (fι : α ι) (fA : Π (a : α), A (fι a)) :
(direct_sum.of A (l.dprod_index fι)) (l.dprod fA) = (list.map (λ (a : α), (direct_sum.of A (fι a)) (fA a)) l).prod
theorem direct_sum.list_prod_of_fn_of_eq_dprod {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] (n : ) (fι : fin n ι) (fA : Π (a : fin n), A (fι a)) :
(list.of_fn (λ (a : fin n), (direct_sum.of A (fι a)) (fA a))).prod = (direct_sum.of A ((list.fin_range n).dprod_index fι)) ((list.fin_range n).dprod fA)
theorem direct_sum.mul_eq_dfinsupp_sum {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [Π (i : ι) (x : A i), decidable (x 0)] (a a' : direct_sum ι (λ (i : ι), A i)) :
a * a' = dfinsupp.sum a (λ (i : ι) (ai : (λ (i : ι), A i) i), dfinsupp.sum a' (λ (j : ι) (aj : (λ (i : ι), A i) j), (direct_sum.of (λ (i : ι), A i) (i + j)) (graded_monoid.ghas_mul.mul ai aj)))
theorem direct_sum.mul_eq_sum_support_ghas_mul {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [Π (i : ι) (x : A i), decidable (x 0)] (a a' : direct_sum ι (λ (i : ι), A i)) :
a * a' = (dfinsupp.support a ×ˢ dfinsupp.support a').sum (λ (ij : ι × ι), (direct_sum.of A (ij.fst + ij.snd)) (graded_monoid.ghas_mul.mul (a ij.fst) (a' ij.snd)))

A heavily unfolded version of the definition of multiplication

@[protected, instance]
def direct_sum.comm_semiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_comm_monoid ι] [direct_sum.gcomm_semiring A] :
comm_semiring (direct_sum ι (λ (i : ι), A i))

The comm_semiring structure derived from gcomm_semiring A.

Equations
@[protected, instance]
def direct_sum.non_assoc_ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [has_add ι] [direct_sum.gnon_unital_non_assoc_semiring A] :
non_unital_non_assoc_ring (direct_sum ι (λ (i : ι), A i))

The ring derived from gsemiring A.

Equations
@[protected, instance]
def direct_sum.ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_monoid ι] [direct_sum.gring A] :
ring (direct_sum ι (λ (i : ι), A i))

The ring derived from gsemiring A.

Equations
@[protected, instance]
def direct_sum.comm_ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_comm_monoid ι] [direct_sum.gcomm_ring A] :
comm_ring (direct_sum ι (λ (i : ι), A i))

The comm_ring derived from gcomm_semiring A.

Equations

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.

@[simp]
theorem direct_sum.of_zero_one {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [has_zero ι] [graded_monoid.ghas_one A] [Π (i : ι), add_comm_monoid (A i)] :
@[simp]
theorem direct_sum.of_zero_smul {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_zero_class ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] {i : ι} (a : A 0) (b : A i) :
@[simp]
theorem direct_sum.of_zero_mul {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [add_zero_class ι] [Π (i : ι), add_comm_monoid (A i)] [direct_sum.gnon_unital_non_assoc_semiring A] (a b : A 0) :
@[protected, instance]
Equations
@[simp]
theorem direct_sum.of_zero_pow {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] (a : A 0) (n : ) :
(direct_sum.of A 0) (a ^ n) = (direct_sum.of A 0) a ^ n
@[protected, instance]
def direct_sum.has_nat_cast {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] :
Equations
@[simp]
theorem direct_sum.of_nat_cast {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] (n : ) :
@[protected, instance]
def direct_sum.grade_zero.semiring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] :
semiring (A 0)

The semiring structure derived from gsemiring A.

Equations
def direct_sum.of_zero_ring_hom {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] :
A 0 →+* direct_sum ι (λ (i : ι), A i)

of A 0 is a ring_hom, using the direct_sum.grade_zero.semiring structure.

Equations
@[protected, instance]
def direct_sum.grade_zero.module {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] {i : ι} :
module (A 0) (A i)

Each grade A i derives a A 0-module structure from gsemiring A. Note that this results in an overall module (A 0) (⨁ i, A i) structure via direct_sum.module.

Equations
@[protected, instance]

The comm_semiring structure derived from gcomm_semiring A.

Equations
@[protected, instance]
def direct_sum.has_int_cast {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_monoid ι] [direct_sum.gring A] :
Equations
@[simp]
theorem direct_sum.of_int_cast {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_monoid ι] [direct_sum.gring A] (n : ) :
@[protected, instance]
def direct_sum.grade_zero.ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_monoid ι] [direct_sum.gring A] :
ring (A 0)

The ring derived from gsemiring A.

Equations
@[protected, instance]
def direct_sum.grade_zero.comm_ring {ι : Type u_1} [decidable_eq ι] (A : ι Type u_2) [Π (i : ι), add_comm_group (A i)] [add_comm_monoid ι] [direct_sum.gcomm_ring A] :
comm_ring (A 0)

The comm_ring derived from gcomm_semiring A.

Equations
@[ext]
theorem direct_sum.ring_hom_ext' {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] ⦃F G : direct_sum ι (λ (i : ι), A i) →+* R⦄ (h : (i : ι), F.comp (direct_sum.of A i) = G.comp (direct_sum.of A i)) :
F = G

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].

theorem direct_sum.ring_hom_ext {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] ⦃f g : direct_sum ι (λ (i : ι), A i) →+* R⦄ (h : (i : ι) (x : A i), f ((direct_sum.of A i) x) = g ((direct_sum.of A i) x)) :
f = g

Two ring_homs out of a direct sum are equal if they agree on the generators.

@[simp]
theorem direct_sum.to_semiring_apply {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (f : Π (i : ι), A i →+ R) (hone : (f 0) graded_monoid.ghas_one.one = 1) (hmul : {i j : ι} (ai : A i) (aj : A j), (f (i + j)) (graded_monoid.ghas_mul.mul ai aj) = (f i) ai * (f j) aj) (ᾰ : direct_sum ι (λ (i : ι), (λ (i : ι), A i) i)) :
def direct_sum.to_semiring {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (f : Π (i : ι), A i →+ R) (hone : (f 0) graded_monoid.ghas_one.one = 1) (hmul : {i j : ι} (ai : A i) (aj : A j), (f (i + j)) (graded_monoid.ghas_mul.mul ai aj) = (f i) ai * (f j) aj) :
direct_sum ι (λ (i : ι), A i) →+* R

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 [gsemiring A] structure originates from direct_sum.gsemiring.of_add_submonoids, in which case the proofs about ghas_one and ghas_mul can be discharged by rfl.

Equations
@[simp]
theorem direct_sum.to_semiring_of {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (f : Π (i : ι), A i →+ R) (hone : (f 0) graded_monoid.ghas_one.one = 1) (hmul : {i j : ι} (ai : A i) (aj : A j), (f (i + j)) (graded_monoid.ghas_mul.mul ai aj) = (f i) ai * (f j) aj) (i : ι) (x : A i) :
(direct_sum.to_semiring f hone hmul) ((direct_sum.of (λ (i : ι), A i) i) x) = (f i) x
@[simp]
theorem direct_sum.to_semiring_coe_add_monoid_hom {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (f : Π (i : ι), A i →+ R) (hone : (f 0) graded_monoid.ghas_one.one = 1) (hmul : {i j : ι} (ai : A i) (aj : A j), (f (i + j)) (graded_monoid.ghas_mul.mul ai aj) = (f i) ai * (f j) aj) :
@[simp]
theorem direct_sum.lift_ring_hom_apply {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (f : {f // f graded_monoid.ghas_one.one = 1 {i j : ι} (ai : A i) (aj : A j), f (graded_monoid.ghas_mul.mul ai aj) = f ai * f aj}) :
@[simp]
theorem direct_sum.lift_ring_hom_symm_apply_coe {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] (F : direct_sum ι (λ (i : ι), A i) →+* R) (i : ι) :
def direct_sum.lift_ring_hom {ι : Type u_1} [decidable_eq ι] {A : ι Type u_2} {R : Type u_3} [Π (i : ι), add_comm_monoid (A i)] [add_monoid ι] [direct_sum.gsemiring A] [semiring R] :
{f // f graded_monoid.ghas_one.one = 1 {i j : ι} (ai : A i) (aj : A j), f (graded_monoid.ghas_mul.mul ai aj) = f ai * f aj} (direct_sum ι (λ (i : ι), A i) →+* R)

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

Concrete instances #

@[protected, instance]
def semiring.direct_sum_gsemiring (ι : Type u_1) [decidable_eq ι] {R : Type u_2} [add_monoid ι] [semiring R] :
direct_sum.gsemiring (λ (i : ι), R)

A direct sum of copies of a semiring inherits the multiplication structure.

Equations