File: Mathlib/Algebra/DirectSum/Internal.lean

full_name: AddCommMonoid.ofSubmonoidOnSemiring
code: instance AddCommMonoid.ofSubmonoidOnSemiring [Semiring R] [SetLike σ R] [AddSubmonoidClass σ R]
    (A : ι → σ) : ∀ i, AddCommMonoid (A i) 
goal: AddCommMonoid ↥(A i)

full_name: AddCommGroup.ofSubgroupOnRing
code: instance AddCommGroup.ofSubgroupOnRing [Ring R] [SetLike σ R] [AddSubgroupClass σ R] (A : ι → σ) :
    ∀ i, AddCommGroup (A i) 
goal: AddCommGroup ↥(A i)

full_name: SetLike.algebraMap_mem_graded
code: theorem SetLike.algebraMap_mem_graded [Zero ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedOne A] (s : S) : algebraMap S R s ∈ A 0 
goal: (algebraMap S R) s ∈ A 0

full_name: SetLike.natCast_mem_graded
code: theorem SetLike.natCast_mem_graded [Zero ι] [AddMonoidWithOne R] [SetLike σ R]
    [AddSubmonoidClass σ R] (A : ι → σ) [SetLike.GradedOne A] (n : ℕ) : (n : R) ∈ A 0 
goal: ↑n ∈ A 0

full_name: SetLike.intCast_mem_graded
code: theorem SetLike.intCast_mem_graded [Zero ι] [AddGroupWithOne R] [SetLike σ R]
    [AddSubgroupClass σ R] (A : ι → σ) [SetLike.GradedOne A] (z : ℤ) : (z : R) ∈ A 0 
goal: ↑z ∈ A 0

full_name: SetLike.gnonUnitalNonAssocSemiring
code: /-- Build a `DirectSum.GNonUnitalNonAssocSemiring` instance for a collection of additive
submonoids. -/
instance gnonUnitalNonAssocSemiring [Add ι] [NonUnitalNonAssocSemiring R] [SetLike σ R]
    [AddSubmonoidClass σ R] (A : ι → σ) [SetLike.GradedMul A] :
    DirectSum.GNonUnitalNonAssocSemiring fun i => A i 
goal: DirectSum.GNonUnitalNonAssocSemiring fun i => ↥(A i)

full_name: SetLike.gsemiring
code: /-- Build a `DirectSum.GSemiring` instance for a collection of additive submonoids. -/
instance gsemiring [AddMonoid ι] [Semiring R] [SetLike σ R] [AddSubmonoidClass σ R] (A : ι → σ)
    [SetLike.GradedMonoid A] : DirectSum.GSemiring fun i => A i 
goal: DirectSum.GSemiring fun i => ↥(A i)

full_name: SetLike.gcommSemiring
code: /-- Build a `DirectSum.GCommSemiring` instance for a collection of additive submonoids. -/
instance gcommSemiring [AddCommMonoid ι] [CommSemiring R] [SetLike σ R] [AddSubmonoidClass σ R]
    (A : ι → σ) [SetLike.GradedMonoid A] : DirectSum.GCommSemiring fun i => A i 
goal: DirectSum.GCommSemiring fun i => ↥(A i)

full_name: SetLike.gring
code: /-- Build a `DirectSum.GRing` instance for a collection of additive subgroups. -/
instance gring [AddMonoid ι] [Ring R] [SetLike σ R] [AddSubgroupClass σ R] (A : ι → σ)
    [SetLike.GradedMonoid A] : DirectSum.GRing fun i => A i 
goal: DirectSum.GRing fun i => ↥(A i)

full_name: SetLike.gcommRing
code: /-- Build a `DirectSum.GCommRing` instance for a collection of additive submonoids. -/
instance gcommRing [AddCommMonoid ι] [CommRing R] [SetLike σ R] [AddSubgroupClass σ R] (A : ι → σ)
    [SetLike.GradedMonoid A] : DirectSum.GCommRing fun i => A i 
goal: DirectSum.GCommRing fun i => ↥(A i)

full_name: DirectSum.coeRingHom
code: /-- The canonical ring isomorphism between `⨁ i, A i` and `R`-/
def coeRingHom [AddMonoid ι] [SetLike.GradedMonoid A] : (⨁ i, A i) →+* R 
goal: (⨁ (i : ι), ↥(A i)) →+* R

full_name: DirectSum.coeRingHom_of
code: /-- The canonical ring isomorphism between `⨁ i, A i` and `R`-/
@[simp]
theorem coeRingHom_of [AddMonoid ι] [SetLike.GradedMonoid A] (i : ι) (x : A i) :
    (coeRingHom A : _ →+* R) (of (fun i => A i) i x) = x 
goal: (DirectSum.coeRingHom A) ((DirectSum.of (fun i => ↥(A i)) i) x) = ↑x

full_name: DirectSum.coe_mul_apply
code: theorem coe_mul_apply [AddMonoid ι] [SetLike.GradedMonoid A]
    [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (r r' : ⨁ i, A i) (n : ι) :
    ((r * r') n : R) =
      ∑ ij ∈ (r.support ×ˢ r'.support).filter (fun ij : ι × ι => ij.1 + ij.2 = n),
        (r ij.1 * r' ij.2 : R) 
goal: ↑((r * r') n) =
  ∑ ij ∈ Finset.filter (fun ij => ij.1 + ij.2 = n) (DFinsupp.support r ×ˢ DFinsupp.support r'), ↑(r ij.1) * ↑(r' ij.2)

full_name: DirectSum.coe_mul_apply_eq_dfinsupp_sum
code: theorem coe_mul_apply_eq_dfinsupp_sum [AddMonoid ι] [SetLike.GradedMonoid A]
    [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (r r' : ⨁ i, A i) (n : ι) :
    ((r * r') n : R) = r.sum fun i ri => r'.sum fun j rj => if i + j = n then (ri * rj : R)
      else 0 
goal: ↑((r * r') n) = DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0

full_name: DirectSum.coe_of_mul_apply_aux
code: theorem coe_of_mul_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r : A i)
    (r' : ⨁ i, A i) {j n : ι} (H : ∀ x : ι, i + x = n ↔ x = j) :
    ((of (fun i => A i) i r * r') n : R) = r * r' j 
goal: ↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') n) = ↑r * ↑(r' j)

full_name: DirectSum.coe_mul_of_apply_aux
code: theorem coe_mul_of_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] (r : ⨁ i, A i) {i : ι}
    (r' : A i) {j n : ι} (H : ∀ x : ι, x + i = n ↔ x = j) :
    ((r * of (fun i => A i) i r') n : R) = r j * r' 
goal: ↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') n) = ↑(r j) * ↑r'

full_name: DirectSum.coe_of_mul_apply_add
code: theorem coe_of_mul_apply_add [AddLeftCancelMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r : A i)
    (r' : ⨁ i, A i) (j : ι) : ((of (fun i => A i) i r * r') (i + j) : R) = r * r' j 
goal: ↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') (i + j)) = ↑r * ↑(r' j)

full_name: DirectSum.coe_mul_of_apply_add
code: theorem coe_mul_of_apply_add [AddRightCancelMonoid ι] [SetLike.GradedMonoid A] (r : ⨁ i, A i)
    {i : ι} (r' : A i) (j : ι) : ((r * of (fun i => A i) i r') (j + i) : R) = r j * r' 
goal: ↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') (j + i)) = ↑(r j) * ↑r'

full_name: DirectSum.coe_of_mul_apply_of_not_le
code: theorem coe_of_mul_apply_of_not_le {i : ι} (r : A i) (r' : ⨁ i, A i) (n : ι) (h : ¬i ≤ n) :
    ((of (fun i => A i) i r * r') n : R) = 0 
goal: ↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') n) = 0

full_name: DirectSum.coe_mul_of_apply_of_not_le
code: theorem coe_mul_of_apply_of_not_le (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) (h : ¬i ≤ n) :
    ((r * of (fun i => A i) i r') n : R) = 0 
goal: ↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') n) = 0

full_name: DirectSum.coe_mul_of_apply_of_le
code: theorem coe_mul_of_apply_of_le (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) (h : i ≤ n) :
    ((r * of (fun i => A i) i r') n : R) = r (n - i) * r' 
goal: ↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') n) = ↑(r (n - i)) * ↑r'

full_name: DirectSum.coe_of_mul_apply_of_le
code: theorem coe_of_mul_apply_of_le {i : ι} (r : A i) (r' : ⨁ i, A i) (n : ι) (h : i ≤ n) :
    ((of (fun i => A i) i r * r') n : R) = r * r' (n - i) 
goal: ↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') n) = ↑r * ↑(r' (n - i))

full_name: DirectSum.coe_mul_of_apply
code: theorem coe_mul_of_apply (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) [Decidable (i ≤ n)] :
    ((r * of (fun i => A i) i r') n : R) = if i ≤ n then (r (n - i) : R) * r' else 0 
goal: ↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') n) = if i ≤ n then ↑(r (n - i)) * ↑r' else 0

full_name: DirectSum.coe_of_mul_apply
code: theorem coe_of_mul_apply {i : ι} (r : A i) (r' : ⨁ i, A i) (n : ι) [Decidable (i ≤ n)] :
    ((of (fun i => A i) i r * r') n : R) = if i ≤ n then (r * r' (n - i) : R) else 0 
goal: ↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') n) = if i ≤ n then ↑r * ↑(r' (n - i)) else 0

full_name: Submodule.galgebra
code: /-- Build a `DirectSum.GAlgebra` instance for a collection of `Submodule`s. -/
instance galgebra [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R] (A : ι → Submodule S R)
    [SetLike.GradedMonoid A] : DirectSum.GAlgebra S fun i => A i 
goal: DirectSum.GAlgebra S fun i => ↥(A i)

full_name: Submodule.setLike.coe_galgebra_toFun
code: @[simp]
theorem setLike.coe_galgebra_toFun [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] (s : S) :
    ↑(@DirectSum.GAlgebra.toFun _ S (fun i => A i) _ _ _ _ _ _ _ s) = (algebraMap S R s : R) 
goal: ↑(DirectSum.GAlgebra.toFun s) = (algebraMap S R) s

full_name: Submodule.nat_power_gradedMonoid
code: /-- A direct sum of powers of a submodule of an algebra has a multiplicative structure. -/
instance nat_power_gradedMonoid [CommSemiring S] [Semiring R] [Algebra S R] (p : Submodule S R) :
    SetLike.GradedMonoid fun i : ℕ => p ^ i 
goal: SetLike.GradedMonoid fun i => p ^ i

full_name: DirectSum.coeAlgHom
code: /-- The canonical algebra isomorphism between `⨁ i, A i` and `R`. -/
def DirectSum.coeAlgHom [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] : (⨁ i, A i) →ₐ[S] R 
goal: (⨁ (i : ι), ↥(A i)) →ₐ[S] R

full_name: Submodule.iSup_eq_toSubmodule_range
code: /-- The supremum of submodules that form a graded monoid is a subalgebra, and equal to the range of
`DirectSum.coeAlgHom`. -/
theorem Submodule.iSup_eq_toSubmodule_range [AddMonoid ι] [CommSemiring S] [Semiring R]
    [Algebra S R] (A : ι → Submodule S R) [SetLike.GradedMonoid A] :
    ⨆ i, A i = Subalgebra.toSubmodule (DirectSum.coeAlgHom A).range 
goal: ⨆ i, A i = Subalgebra.toSubmodule (DirectSum.coeAlgHom A).range

full_name: DirectSum.coeAlgHom_of
code: @[simp]
theorem DirectSum.coeAlgHom_of [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] (i : ι) (x : A i) :
    DirectSum.coeAlgHom A (DirectSum.of (fun i => A i) i x) = x 
goal: (DirectSum.coeAlgHom A) ((DirectSum.of (fun i => ↥(A i)) i) x) = ↑x

full_name: SetLike.GradeZero.subsemiring
code: /-- The subsemiring `A 0` of `R`. -/
def subsemiring : Subsemiring R 
goal: Subsemiring R

full_name: SetLike.GradeZero.instSemiring
code: /-- The semiring `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`. -/
instance instSemiring : Semiring (A 0) 
goal: Semiring ↥(A 0)

full_name: SetLike.GradeZero.coe_natCast
code: @[nolint simpNF, simp, norm_cast] theorem coe_natCast (n : ℕ) : (n : A 0) = (n : R) 
goal: ↑↑n = ↑n

full_name: SetLike.GradeZero.coe_ofNat
code: @[nolint simpNF, simp, norm_cast] theorem coe_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : A 0) = (OfNat.ofNat n : R) 
goal: ↑(OfNat.ofNat n) = OfNat.ofNat n

full_name: SetLike.GradeZero.instCommSemiring
code: /--The commutative semiring `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`.-/
instance instCommSemiring : CommSemiring (A 0) 
goal: CommSemiring ↥(A 0)

full_name: SetLike.GradeZero.subring
code: /-- The subring `A 0` of `R`. -/
def subring : Subring R 
goal: Subring R

full_name: SetLike.GradeZero.instRing
code: /-- The ring `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`. -/
instance instRing : Ring (A 0) 
goal: Ring ↥(A 0)

full_name: SetLike.GradeZero.coe_intCast
code: theorem coe_intCast (z : ℤ) : (z : A 0) = (z : R) 
goal: ↑↑z = ↑z

full_name: SetLike.GradeZero.instCommRing
code: /-- The commutative ring `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`. -/
instance instCommRing : CommRing (A 0) 
goal: CommRing ↥(A 0)

full_name: SetLike.GradeZero.subalgebra
code: /-- The subalgebra `A 0` of `R`. -/
def subalgebra : Subalgebra S R 
goal: Subalgebra S R

full_name: SetLike.GradeZero.instAlgebra
code: /-- The `S`-algebra `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`. -/
instance instAlgebra : Algebra S (A 0) 
goal: Algebra S ↥(A 0)

full_name: SetLike.GradeZero.coe_algebraMap
code: @[nolint simpNF, simp, norm_cast] theorem coe_algebraMap (s : S) :
    ↑(algebraMap _ (A 0) s) = algebraMap _ R s 
goal: ↑((algebraMap S ↥(A 0)) s) = (algebraMap S R) s

full_name: SetLike.homogeneous_zero_submodule
code: theorem SetLike.homogeneous_zero_submodule [Zero ι] [Semiring S] [AddCommMonoid R] [Module S R]
    (A : ι → Submodule S R) : SetLike.Homogeneous A (0 : R) 
goal: SetLike.Homogeneous A 0

full_name: SetLike.Homogeneous.smul
code: theorem SetLike.Homogeneous.smul [CommSemiring S] [Semiring R] [Algebra S R] {A : ι → Submodule S R}
    {s : S} {r : R} (hr : SetLike.Homogeneous A r) : SetLike.Homogeneous A (s • r) 
goal: SetLike.Homogeneous A (s • r)