File: Mathlib/Algebra/DirectSum/Ring.lean

full_name: DirectSum.GNonUnitalNonAssocSemiring.zero_mul
code: /-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c
goal: GradedMonoid.GMul.mul 0 b = 0

full_name: DirectSum.GNonUnitalNonAssocSemiring.mul_add
code: /-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c
goal: GradedMonoid.GMul.mul a (b + c) = GradedMonoid.GMul.mul a b + GradedMonoid.GMul.mul a c

full_name: DirectSum.GNonUnitalNonAssocSemiring
code: /-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c
goal: Type (max u_1 u_2)

full_name: DirectSum.GNonUnitalNonAssocSemiring.add_mul
code: /-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c
goal: GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c

full_name: DirectSum.GNonUnitalNonAssocSemiring.mul_zero
code: /-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c
goal: GradedMonoid.GMul.mul a 0 = 0

full_name: DirectSum.GSemiring
code: /-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one
goal: Type (max u_1 u_2)

full_name: DirectSum.GSemiring.natCast
code: /-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one
goal: ℕ → A 0

full_name: DirectSum.GSemiring.natCast_succ
code: /-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one
goal: DirectSum.GSemiring.natCast (n + 1) = DirectSum.GSemiring.natCast n + GradedMonoid.GOne.one

full_name: DirectSum.GSemiring.natCast_zero
code: /-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one
goal: DirectSum.GSemiring.natCast 0 = 0

full_name: DirectSum.GCommSemiring
code: /-- A graded version of `CommSemiring`. -/
class GCommSemiring [AddCommMonoid ι] [∀ i, AddCommMonoid (A i)] extends GSemiring A,
  GradedMonoid.GCommMonoid A
goal: Type (max u_1 u_2)

full_name: DirectSum.GRing.intCast_negSucc_ofNat
code: /-- A graded version of `Ring`. -/
class GRing [AddMonoid ι] [∀ i, AddCommGroup (A i)] extends GSemiring A where
  /-- The canonical map from ℤ to the zeroth component of a graded ring. -/
  intCast : ℤ → A 0
  /-- The canonical map from ℤ to a graded ring extends the canonical map from ℕ to the underlying
  graded semiring. -/
  intCast_ofNat : ∀ n : ℕ, intCast n = natCast n
  /-- 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. -/
  -- Porting note: -(n+1) -> Int.negSucc
  intCast_negSucc_ofNat : ∀ n : ℕ, intCast (Int.negSucc n) = -natCast (n + 1 : ℕ)
goal: DirectSum.GRing.intCast (Int.negSucc n) = -DirectSum.GSemiring.natCast (n + 1)

full_name: DirectSum.GRing.intCast
code: /-- A graded version of `Ring`. -/
class GRing [AddMonoid ι] [∀ i, AddCommGroup (A i)] extends GSemiring A where
  /-- The canonical map from ℤ to the zeroth component of a graded ring. -/
  intCast : ℤ → A 0
  /-- The canonical map from ℤ to a graded ring extends the canonical map from ℕ to the underlying
  graded semiring. -/
  intCast_ofNat : ∀ n : ℕ, intCast n = natCast n
  /-- 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. -/
  -- Porting note: -(n+1) -> Int.negSucc
  intCast_negSucc_ofNat : ∀ n : ℕ, intCast (Int.negSucc n) = -natCast (n + 1 : ℕ)
goal: ℤ → A 0

full_name: DirectSum.GRing.intCast_ofNat
code: /-- A graded version of `Ring`. -/
class GRing [AddMonoid ι] [∀ i, AddCommGroup (A i)] extends GSemiring A where
  /-- The canonical map from ℤ to the zeroth component of a graded ring. -/
  intCast : ℤ → A 0
  /-- The canonical map from ℤ to a graded ring extends the canonical map from ℕ to the underlying
  graded semiring. -/
  intCast_ofNat : ∀ n : ℕ, intCast n = natCast n
  /-- 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. -/
  -- Porting note: -(n+1) -> Int.negSucc
  intCast_negSucc_ofNat : ∀ n : ℕ, intCast (Int.negSucc n) = -natCast (n + 1 : ℕ)
goal: DirectSum.GRing.intCast ↑n = DirectSum.GSemiring.natCast n

full_name: DirectSum.GRing
code: /-- A graded version of `Ring`. -/
class GRing [AddMonoid ι] [∀ i, AddCommGroup (A i)] extends GSemiring A where
  /-- The canonical map from ℤ to the zeroth component of a graded ring. -/
  intCast : ℤ → A 0
  /-- The canonical map from ℤ to a graded ring extends the canonical map from ℕ to the underlying
  graded semiring. -/
  intCast_ofNat : ∀ n : ℕ, intCast n = natCast n
  /-- 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. -/
  -- Porting note: -(n+1) -> Int.negSucc
  intCast_negSucc_ofNat : ∀ n : ℕ, intCast (Int.negSucc n) = -natCast (n + 1 : ℕ)
goal: Type (max u_1 u_2)

full_name: DirectSum.GCommRing
code: /-- A graded version of `CommRing`. -/
class GCommRing [AddCommMonoid ι] [∀ i, AddCommGroup (A i)] extends GRing A, GCommSemiring A
goal: Type (max u_1 u_2)

full_name: DirectSum.of_eq_of_gradedMonoid_eq
code: theorem of_eq_of_gradedMonoid_eq {A : ι → Type*} [∀ i : ι, AddCommMonoid (A i)] {i j : ι} {a : A i}
    {b : A j} (h : GradedMonoid.mk i a = GradedMonoid.mk j b) :
    DirectSum.of A i a = DirectSum.of A j b 
goal: (DirectSum.of A i) a = (DirectSum.of A j) b

full_name: DirectSum.instOne
code: instance : One (⨁ i, A i) 
goal: One (DirectSum ι fun i => A i)

full_name: DirectSum.one_def
code: theorem one_def : 1 = DirectSum.of A 0 GradedMonoid.GOne.one 
goal: 1 = (DirectSum.of A 0) GradedMonoid.GOne.one

full_name: DirectSum.gMulHom_apply_apply
code: /-- The piecewise multiplication from the `Mul` instance, as a bundled homomorphism. -/
@[simps]
def gMulHom {i j} : A i →+ A j →+ A (i + j) 
goal: ((DirectSum.gMulHom A) a) b = GradedMonoid.GMul.mul a b

full_name: DirectSum.gMulHom
code: /-- The piecewise multiplication from the `Mul` instance, as a bundled homomorphism. -/
@[simps]
def gMulHom {i j} : A i →+ A j →+ A (i + j) 
goal: A i →+ A j →+ A (i + j)

full_name: DirectSum.mulHom
code: /-- The multiplication from the `Mul` instance, as a bundled homomorphism. -/
-- See note [non-reducible instance]
@[reducible]
def mulHom : (⨁ i, A i) →+ (⨁ i, A i) →+ ⨁ i, A i 
goal: (DirectSum ι fun i => A i) →+ (DirectSum ι fun i => A i) →+ DirectSum ι fun i => A i

full_name: DirectSum.instMul
code: instance instMul : Mul (⨁ i, A i) 
goal: Mul (DirectSum ι fun i => A i)

full_name: DirectSum.instNonUnitalNonAssocSemiring
code: instance : NonUnitalNonAssocSemiring (⨁ i, A i) 
goal: NonUnitalNonAssocSemiring (DirectSum ι fun i => A i)

full_name: DirectSum.mulHom_apply
code: theorem mulHom_apply (a b : ⨁ i, A i) : mulHom A a b = a * b 
goal: ((DirectSum.mulHom A) a) b = a * b

full_name: DirectSum.mulHom_of_of
code: theorem mulHom_of_of {i j} (a : A i) (b : A j) :
    mulHom A (of A i a) (of A j b) = of A (i + j) (GradedMonoid.GMul.mul a b) 
goal: ((DirectSum.mulHom A) ((DirectSum.of A i) a)) ((DirectSum.of A j) b) =
  (DirectSum.of A (i + j)) (GradedMonoid.GMul.mul a b)

full_name: DirectSum.of_mul_of
code: theorem of_mul_of {i j} (a : A i) (b : A j) :
    of A i a * of A j b = of _ (i + j) (GradedMonoid.GMul.mul a b) 
goal: (DirectSum.of A i) a * (DirectSum.of A j) b = (DirectSum.of A (i + j)) (GradedMonoid.GMul.mul a b)

full_name: _private.Mathlib.Algebra.DirectSum.Ring.0.DirectSum.one_mul
code: private nonrec theorem one_mul (x : ⨁ i, A i) : 1 * x = x 
goal: 1 * x = x

full_name: _private.Mathlib.Algebra.DirectSum.Ring.0.DirectSum.mul_one
code: private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x 
goal: x * 1 = x

full_name: _private.Mathlib.Algebra.DirectSum.Ring.0.DirectSum.mul_assoc
code: private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) 
goal: a * b * c = a * (b * c)

full_name: DirectSum.instNatCast
code: instance instNatCast : NatCast (⨁ i, A i) 
goal: NatCast (DirectSum ι fun i => A i)

full_name: DirectSum.semiring
code: /-- The `Semiring` structure derived from `GSemiring A`. -/
instance semiring : Semiring (⨁ i, A i) 
goal: Semiring (DirectSum ι fun i => A i)

full_name: DirectSum.ofPow
code: theorem ofPow {i} (a : A i) (n : ℕ) :
    of _ i a ^ n = of _ (n • i) (GradedMonoid.GMonoid.gnpow _ a) 
goal: (DirectSum.of A i) a ^ n = (DirectSum.of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)

full_name: DirectSum.ofList_dProd
code: theorem ofList_dProd {α} (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) :
    of A _ (l.dProd fι fA) = (l.map fun a => of A (fι a) (fA a)).prod 
goal: (DirectSum.of A (l.dProdIndex fι)) (l.dProd fι fA) = (List.map (fun a => (DirectSum.of A (fι a)) (fA a)) l).prod

full_name: DirectSum.list_prod_ofFn_of_eq_dProd
code: theorem list_prod_ofFn_of_eq_dProd (n : ℕ) (fι : Fin n → ι) (fA : ∀ a, A (fι a)) :
    (List.ofFn fun a => of A (fι a) (fA a)).prod = of A _ ((List.finRange n).dProd fι fA) 
goal: (List.ofFn fun a => (DirectSum.of A (fι a)) (fA a)).prod =
  (DirectSum.of A ((List.finRange n).dProdIndex fι)) ((List.finRange n).dProd fι fA)

full_name: DirectSum.mul_eq_dfinsupp_sum
code: theorem mul_eq_dfinsupp_sum [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (a a' : ⨁ i, A i) :
    a * a'
      = a.sum fun i ai => a'.sum fun j aj => DirectSum.of _ _ <| GradedMonoid.GMul.mul ai aj 
goal: a * a' = DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => (DirectSum.of A (i + j)) (GradedMonoid.GMul.mul ai aj)

full_name: DirectSum.mul_eq_sum_support_ghas_mul
code: /-- A heavily unfolded version of the definition of multiplication -/
theorem mul_eq_sum_support_ghas_mul [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (a a' : ⨁ i, A i) :
    a * a' =
      ∑ ij ∈ DFinsupp.support a ×ˢ DFinsupp.support a',
        DirectSum.of _ _ (GradedMonoid.GMul.mul (a ij.fst) (a' ij.snd)) 
goal: a * a' =
  ∑ ij ∈ DFinsupp.support a ×ˢ DFinsupp.support a',
    (DirectSum.of A (ij.1 + ij.2)) (GradedMonoid.GMul.mul (a ij.1) (a' ij.2))

full_name: _private.Mathlib.Algebra.DirectSum.Ring.0.DirectSum.mul_comm
code: private theorem mul_comm (a b : ⨁ i, A i) : a * b = b * a 
goal: a * b = b * a

full_name: DirectSum.commSemiring
code: /-- The `CommSemiring` structure derived from `GCommSemiring A`. -/
instance commSemiring : CommSemiring (⨁ i, A i) 
goal: CommSemiring (DirectSum ι fun i => A i)

full_name: DirectSum.nonAssocRing
code: /-- The `Ring` derived from `GSemiring A`. -/
instance nonAssocRing : NonUnitalNonAssocRing (⨁ i, A i) 
goal: NonUnitalNonAssocRing (DirectSum ι fun i => A i)

full_name: DirectSum.ring
code: /-- The `Ring` derived from `GSemiring A`. -/
instance ring : Ring (⨁ i, A i) 
goal: Ring (DirectSum ι fun i => A i)

full_name: DirectSum.commRing
code: /-- The `CommRing` derived from `GCommSemiring A`. -/
instance commRing : CommRing (⨁ i, A i) 
goal: CommRing (DirectSum ι fun i => A i)

full_name: DirectSum.of_zero_one
code: @[simp]
theorem of_zero_one : of _ 0 (1 : A 0) = 1 
goal: (DirectSum.of A 0) 1 = 1

full_name: DirectSum.of_zero_smul
code: @[simp]
theorem of_zero_smul {i} (a : A 0) (b : A i) : of _ _ (a • b) = of _ _ a * of _ _ b 
goal: (DirectSum.of A i) (a • b) = (DirectSum.of A 0) a * (DirectSum.of A i) b

full_name: DirectSum.of_zero_mul
code: @[simp]
theorem of_zero_mul (a b : A 0) : of _ 0 (a * b) = of _ 0 a * of _ 0 b 
goal: (DirectSum.of A 0) (a * b) = (DirectSum.of A 0) a * (DirectSum.of A 0) b

full_name: DirectSum.GradeZero.nonUnitalNonAssocSemiring
code: instance GradeZero.nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring (A 0) 
goal: NonUnitalNonAssocSemiring (A 0)

full_name: DirectSum.GradeZero.smulWithZero
code: instance GradeZero.smulWithZero (i : ι) : SMulWithZero (A 0) (A i) 
goal: SMulWithZero (A 0) (A i)

full_name: DirectSum.of_zero_pow
code: @[simp]
theorem of_zero_pow (a : A 0) : ∀ n : ℕ, of A 0 (a ^ n) = of A 0 a ^ n
  
goal: (DirectSum.of A 0) (a ^ n) = (DirectSum.of A 0) a ^ n

full_name: DirectSum.instNatCastOfNat
code: instance : NatCast (A 0) 
goal: NatCast (A 0)

full_name: DirectSum.of_natCast
code: @[simp]
theorem of_natCast (n : ℕ) : of A 0 n = n 
goal: (DirectSum.of A 0) ↑n = ↑n

full_name: DirectSum.of_zero_ofNat
code: @[simp]
theorem of_zero_ofNat (n : ℕ) [n.AtLeastTwo] : of A 0 (no_index (OfNat.ofNat n)) = OfNat.ofNat n 
goal: (DirectSum.of A 0) (OfNat.ofNat n) = OfNat.ofNat n

full_name: DirectSum.GradeZero.semiring
code: /-- The `Semiring` structure derived from `GSemiring A`. -/
instance GradeZero.semiring : Semiring (A 0) 
goal: Semiring (A 0)

full_name: DirectSum.ofZeroRingHom
code: /-- `of A 0` is a `RingHom`, using the `DirectSum.GradeZero.semiring` structure. -/
def ofZeroRingHom : A 0 →+* ⨁ i, A i 
goal: A 0 →+* DirectSum ι fun i => A i

full_name: DirectSum.GradeZero.module
code: /-- 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`.
-/
instance GradeZero.module {i} : Module (A 0) (A i) 
goal: Module (A 0) (A i)

full_name: DirectSum.GradeZero.commSemiring
code: /-- The `CommSemiring` structure derived from `GCommSemiring A`. -/
instance GradeZero.commSemiring : CommSemiring (A 0) 
goal: CommSemiring (A 0)

full_name: DirectSum.GradeZero.nonUnitalNonAssocRing
code: /-- The `NonUnitalNonAssocRing` derived from `GNonUnitalNonAssocSemiring A`. -/
instance GradeZero.nonUnitalNonAssocRing : NonUnitalNonAssocRing (A 0) 
goal: NonUnitalNonAssocRing (A 0)

full_name: DirectSum.instIntCastOfNat
code: instance : IntCast (A 0) 
goal: IntCast (A 0)

full_name: DirectSum.of_intCast
code: @[simp]
theorem of_intCast (n : ℤ) : of A 0 n = n 
goal: (DirectSum.of A 0) ↑n = ↑n

full_name: DirectSum.GradeZero.ring
code: /-- The `Ring` derived from `GSemiring A`. -/
instance GradeZero.ring : Ring (A 0) 
goal: Ring (A 0)

full_name: DirectSum.GradeZero.commRing
code: /-- The `CommRing` derived from `GCommSemiring A`. -/
instance GradeZero.commRing : CommRing (A 0) 
goal: CommRing (A 0)

full_name: DirectSum.ringHom_ext'
code: /-- 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]. -/
@[ext]
theorem ringHom_ext' ⦃F G : (⨁ i, A i) →+* R⦄
    (h : ∀ i, (↑F : _ →+ R).comp (of A i) = (↑G : _ →+ R).comp (of A i)) : F = G 
goal: F = G

full_name: DirectSum.ringHom_ext
code: /-- Two `RingHom`s out of a direct sum are equal if they agree on the generators. -/
theorem ringHom_ext ⦃f g : (⨁ i, A i) →+* R⦄ (h : ∀ i x, f (of A i x) = g (of A i x)) : f = g 
goal: f = g

full_name: DirectSum.toSemiring
code: /-- A family of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
describes a `RingHom`s on `⨁ i, A i`. This is a stronger version of `DirectSum.toMonoid`.

Of particular interest is the case when `A i` are bundled subojects, `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`. -/
@[simps]
def toSemiring (f : ∀ i, A i →+ R) (hone : f _ GradedMonoid.GOne.one = 1)
    (hmul : ∀ {i j} (ai : A i) (aj : A j), f _ (GradedMonoid.GMul.mul ai aj) = f _ ai * f _ aj) :
    (⨁ i, A i) →+* R 
goal: (DirectSum ι fun i => A i) →+* R

full_name: DirectSum.toSemiring_apply
code: /-- A family of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
describes a `RingHom`s on `⨁ i, A i`. This is a stronger version of `DirectSum.toMonoid`.

Of particular interest is the case when `A i` are bundled subojects, `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`. -/
@[simps]
def toSemiring (f : ∀ i, A i →+ R) (hone : f _ GradedMonoid.GOne.one = 1)
    (hmul : ∀ {i j} (ai : A i) (aj : A j), f _ (GradedMonoid.GMul.mul ai aj) = f _ ai * f _ aj) :
    (⨁ i, A i) →+* R 
goal: (DirectSum.toSemiring f hone hmul) a = (DirectSum.toAddMonoid f) a

full_name: DirectSum.toSemiring_of
code: theorem toSemiring_of (f : ∀ i, A i →+ R) (hone hmul) (i : ι) (x : A i) :
    toSemiring f hone hmul (of _ i x) = f _ x 
goal: (DirectSum.toSemiring f hone hmul) ((DirectSum.of A i) x) = (f i) x

full_name: DirectSum.toSemiring_coe_addMonoidHom
code: @[simp]
theorem toSemiring_coe_addMonoidHom (f : ∀ i, A i →+ R) (hone hmul) :
    (toSemiring f hone hmul : (⨁ i, A i) →+ R) = toAddMonoid f 
goal: ↑(DirectSum.toSemiring f hone hmul) = DirectSum.toAddMonoid f

full_name: DirectSum.liftRingHom_apply
code: /-- Families of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
are isomorphic to `RingHom`s on `⨁ i, A i`. This is a stronger version of `DFinsupp.liftAddHom`.
-/
@[simps]
def liftRingHom :
    { f : ∀ {i}, A i →+ R //
        f GradedMonoid.GOne.one = 1 ∧
          ∀ {i j} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj } ≃
      ((⨁ i, A i) →+* R) 
goal: DirectSum.liftRingHom f = DirectSum.toSemiring (fun x => ↑f) ⋯ ⋯

full_name: DirectSum.liftRingHom
code: /-- Families of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
are isomorphic to `RingHom`s on `⨁ i, A i`. This is a stronger version of `DFinsupp.liftAddHom`.
-/
@[simps]
def liftRingHom :
    { f : ∀ {i}, A i →+ R //
        f GradedMonoid.GOne.one = 1 ∧
          ∀ {i j} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj } ≃
      ((⨁ i, A i) →+* R) 
goal: { f //
    f GradedMonoid.GOne.one = 1 ∧ ∀ {i j : ι} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj } ≃
  ((DirectSum ι fun i => A i) →+* R)

full_name: DirectSum.liftRingHom_symm_apply_coe
code: /-- Families of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
are isomorphic to `RingHom`s on `⨁ i, A i`. This is a stronger version of `DFinsupp.liftAddHom`.
-/
@[simps]
def liftRingHom :
    { f : ∀ {i}, A i →+ R //
        f GradedMonoid.GOne.one = 1 ∧
          ∀ {i j} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj } ≃
      ((⨁ i, A i) →+* R) 
goal: ↑(DirectSum.liftRingHom.symm F) = (↑F).comp (DirectSum.of A i)

full_name: NonUnitalNonAssocSemiring.directSumGNonUnitalNonAssocSemiring
code: /-- A direct sum of copies of a `Semiring` inherits the multiplication structure. -/
instance NonUnitalNonAssocSemiring.directSumGNonUnitalNonAssocSemiring {R : Type*} [AddMonoid ι]
    [NonUnitalNonAssocSemiring R] : DirectSum.GNonUnitalNonAssocSemiring fun _ : ι => R 
goal: DirectSum.GNonUnitalNonAssocSemiring fun x => R

full_name: Semiring.directSumGSemiring
code: /-- A direct sum of copies of a `Semiring` inherits the multiplication structure. -/
instance Semiring.directSumGSemiring {R : Type*} [AddMonoid ι] [Semiring R] :
    DirectSum.GSemiring fun _ : ι => R 
goal: DirectSum.GSemiring fun x => R

full_name: CommSemiring.directSumGCommSemiring
code: /-- A direct sum of copies of a `CommSemiring` inherits the commutative multiplication structure.
-/
instance CommSemiring.directSumGCommSemiring {R : Type*} [AddCommMonoid ι] [CommSemiring R] :
    DirectSum.GCommSemiring fun _ : ι => R 
goal: DirectSum.GCommSemiring fun x => R