File: Mathlib/Algebra/GradedMonoid.lean

full_name: GradedMonoid
code: /-- A type alias of sigma types for graded monoids. -/
def GradedMonoid (A : ι → Type*) 
goal: Type (max u_1 u_2)

full_name: GradedMonoid.instInhabitedOfDefault
code: instance {A : ι → Type*} [Inhabited ι] [Inhabited (A default)] : Inhabited (GradedMonoid A) 
goal: Inhabited (GradedMonoid A)

full_name: GradedMonoid.mk
code: /-- Construct an element of a graded monoid. -/
def mk {A : ι → Type*} : ∀ i, A i → GradedMonoid A 
goal: A i → GradedMonoid A

full_name: GradedMonoid.instSMul
code: /-- If `R` acts on each `A i`, then it acts on `GradedMonoid A` via the `.2` projection. -/
instance [∀ i, SMul α (A i)] : SMul α (GradedMonoid A) 
goal: SMul α (GradedMonoid A)

full_name: GradedMonoid.fst_smul
code: @[simp] theorem fst_smul [∀ i, SMul α (A i)] (a : α) (x : GradedMonoid A) :
    (a • x).fst = x.fst 
goal: (a • x).fst = x.fst

full_name: GradedMonoid.snd_smul
code: @[simp] theorem snd_smul [∀ i, SMul α (A i)] (a : α) (x : GradedMonoid A) :
    (a • x).snd = a • x.snd 
goal: (a • x).snd = a • x.snd

full_name: GradedMonoid.smul_mk
code: theorem smul_mk [∀ i, SMul α (A i)] {i} (c : α) (a : A i) :
    c • mk i a = mk i (c • a) 
goal: c • GradedMonoid.mk i a = GradedMonoid.mk i (c • a)

full_name: GradedMonoid.instSMulCommClass
code: instance [∀ i, SMul α (A i)] [∀ i, SMul β (A i)]
    [∀ i, SMulCommClass α β (A i)] :
    SMulCommClass α β (GradedMonoid A) 
goal: SMulCommClass α β (GradedMonoid A)

full_name: GradedMonoid.instIsScalarTower
code: instance [SMul α β] [∀ i, SMul α (A i)] [∀ i, SMul β (A i)]
    [∀ i, IsScalarTower α β (A i)] :
    IsScalarTower α β (GradedMonoid A) 
goal: IsScalarTower α β (GradedMonoid A)

full_name: GradedMonoid.instMulAction
code: instance [Monoid α] [∀ i, MulAction α (A i)] :
    MulAction α (GradedMonoid A) 
goal: MulAction α (GradedMonoid A)

full_name: GradedMonoid.GOne.one
code: /-- A graded version of `One`, which must be of grade 0. -/
class GOne [Zero ι] where
  /-- The term `one` of grade 0 -/
  one : A 0
goal: A 0

full_name: GradedMonoid.GOne
code: /-- A graded version of `One`, which must be of grade 0. -/
class GOne [Zero ι] where
  /-- The term `one` of grade 0 -/
  one : A 0
goal: Type u_2

full_name: GradedMonoid.GOne.toOne
code: /-- `GOne` implies `One (GradedMonoid A)` -/
instance GOne.toOne [Zero ι] [GOne A] : One (GradedMonoid A) 
goal: One (GradedMonoid A)

full_name: GradedMonoid.fst_one
code: @[simp] theorem fst_one [Zero ι] [GOne A] : (1 : GradedMonoid A).fst = 0 
goal: Sigma.fst 1 = 0

full_name: GradedMonoid.snd_one
code: @[simp] theorem snd_one [Zero ι] [GOne A] : (1 : GradedMonoid A).snd = GOne.one 
goal: Sigma.snd 1 = GradedMonoid.GOne.one

full_name: GradedMonoid.GMul
code: /-- A graded version of `Mul`. Multiplication combines grades additively, like
`AddMonoidAlgebra`. -/
class GMul [Add ι] where
  /-- The homogeneous multiplication map `mul` -/
  mul {i j} : A i → A j → A (i + j)
goal: Type (max u_1 u_2)

full_name: GradedMonoid.GMul.mul
code: /-- A graded version of `Mul`. Multiplication combines grades additively, like
`AddMonoidAlgebra`. -/
class GMul [Add ι] where
  /-- The homogeneous multiplication map `mul` -/
  mul {i j} : A i → A j → A (i + j)
goal: A i → A j → A (i + j)

full_name: GradedMonoid.GMul.toMul
code: /-- `GMul` implies `Mul (GradedMonoid A)`. -/
instance GMul.toMul [Add ι] [GMul A] : Mul (GradedMonoid A) 
goal: Mul (GradedMonoid A)

full_name: GradedMonoid.fst_mul
code: @[simp] theorem fst_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
    (x * y).fst = x.fst + y.fst 
goal: (x * y).fst = x.fst + y.fst

full_name: GradedMonoid.snd_mul
code: @[simp] theorem snd_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
    (x * y).snd = GMul.mul x.snd y.snd 
goal: (x * y).snd = GradedMonoid.GMul.mul x.snd y.snd

full_name: GradedMonoid.mk_mul_mk
code: theorem mk_mul_mk [Add ι] [GMul A] {i j} (a : A i) (b : A j) :
    mk i a * mk j b = mk (i + j) (GMul.mul a b) 
goal: GradedMonoid.mk i a * GradedMonoid.mk j b = GradedMonoid.mk (i + j) (GradedMonoid.GMul.mul a b)

full_name: GradedMonoid.GMonoid.gnpowRec
code: /-- A default implementation of power on a graded monoid, like `npowRec`.
`GMonoid.gnpow` should be used instead. -/
def gnpowRec : ∀ (n : ℕ) {i}, A i → A (n • i)
  
goal: A i → A (n • i)

full_name: GradedMonoid.GMonoid.gnpowRec_zero
code: @[simp]
theorem gnpowRec_zero (a : GradedMonoid A) : GradedMonoid.mk _ (gnpowRec 0 a.snd) = 1 
goal: GradedMonoid.mk (0 • a.fst) (GradedMonoid.GMonoid.gnpowRec 0 a.snd) = 1

full_name: GradedMonoid.GMonoid.gnpowRec_succ
code: @[simp]
theorem gnpowRec_succ (n : ℕ) (a : GradedMonoid A) :
    (GradedMonoid.mk _ <| gnpowRec n.succ a.snd) = ⟨_, gnpowRec n a.snd⟩ * a 
goal: GradedMonoid.mk (n.succ • a.fst) (GradedMonoid.GMonoid.gnpowRec n.succ a.snd) =
  ⟨n • a.fst, GradedMonoid.GMonoid.gnpowRec n a.snd⟩ * a

full_name: GradedMonoid.tacticApply_gmonoid_gnpowRec_zero_tac
code: macro "apply_gmonoid_gnpowRec_zero_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_zero)
goal: Lean.ParserDescr

full_name: GradedMonoid._aux_Mathlib_Algebra_GradedMonoid___macroRules_GradedMonoid_tacticApply_gmonoid_gnpowRec_zero_tac_1
code: macro "apply_gmonoid_gnpowRec_zero_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_zero)
goal: Lean.Macro

full_name: GradedMonoid.tacticApply_gmonoid_gnpowRec_succ_tac
code: macro "apply_gmonoid_gnpowRec_succ_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_succ)
goal: Lean.ParserDescr

full_name: GradedMonoid._aux_Mathlib_Algebra_GradedMonoid___macroRules_GradedMonoid_tacticApply_gmonoid_gnpowRec_succ_tac_1
code: macro "apply_gmonoid_gnpowRec_succ_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_succ)
goal: Lean.Macro

full_name: GradedMonoid.GMonoid.gnpow_succ'
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: GradedMonoid.mk (n.succ • a.fst) (GradedMonoid.GMonoid.gnpow n.succ a.snd) =
  ⟨n • a.fst, GradedMonoid.GMonoid.gnpow n a.snd⟩ * a

full_name: GradedMonoid.GMonoid.mul_assoc
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: a * b * c = a * (b * c)

full_name: GradedMonoid.GMonoid.mul_one
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: a * 1 = a

full_name: GradedMonoid.GMonoid.gnpow
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: A i → A (n • i)

full_name: GradedMonoid.GMonoid
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: Type (max u_1 u_2)

full_name: GradedMonoid.GMonoid.one_mul
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: 1 * a = a

full_name: GradedMonoid.GMonoid.gnpow_zero'
code: /-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac
goal: GradedMonoid.mk (0 • a.fst) (GradedMonoid.GMonoid.gnpow 0 a.snd) = 1

full_name: GradedMonoid.GMonoid.toMonoid
code: /-- `GMonoid` implies a `Monoid (GradedMonoid A)`. -/
instance GMonoid.toMonoid [AddMonoid ι] [GMonoid A] : Monoid (GradedMonoid A) 
goal: Monoid (GradedMonoid A)

full_name: GradedMonoid.fst_pow
code: @[simp] theorem fst_pow [AddMonoid ι] [GMonoid A] (x : GradedMonoid A) (n : ℕ) :
    (x ^ n).fst = n • x.fst 
goal: (x ^ n).fst = n • x.fst

full_name: GradedMonoid.snd_pow
code: @[simp] theorem snd_pow [AddMonoid ι] [GMonoid A] (x : GradedMonoid A) (n : ℕ) :
    (x ^ n).snd = GMonoid.gnpow n x.snd 
goal: (x ^ n).snd = GradedMonoid.GMonoid.gnpow n x.snd

full_name: GradedMonoid.mk_pow
code: theorem mk_pow [AddMonoid ι] [GMonoid A] {i} (a : A i) (n : ℕ) :
    mk i a ^ n = mk (n • i) (GMonoid.gnpow _ a) 
goal: GradedMonoid.mk i a ^ n = GradedMonoid.mk (n • i) (GradedMonoid.GMonoid.gnpow n a)

full_name: GradedMonoid.GCommMonoid
code: /-- A graded version of `CommMonoid`. -/
class GCommMonoid [AddCommMonoid ι] extends GMonoid A where
  /-- Multiplication is commutative -/
  mul_comm (a : GradedMonoid A) (b : GradedMonoid A) : a * b = b * a
goal: Type (max u_1 u_2)

full_name: GradedMonoid.GCommMonoid.mul_comm
code: /-- A graded version of `CommMonoid`. -/
class GCommMonoid [AddCommMonoid ι] extends GMonoid A where
  /-- Multiplication is commutative -/
  mul_comm (a : GradedMonoid A) (b : GradedMonoid A) : a * b = b * a
goal: a * b = b * a

full_name: GradedMonoid.GCommMonoid.toCommMonoid
code: /-- `GCommMonoid` implies a `CommMonoid (GradedMonoid A)`, although this is only used as an
instance locally to define notation in `gmonoid` and similar typeclasses. -/
instance GCommMonoid.toCommMonoid [AddCommMonoid ι] [GCommMonoid A] : CommMonoid (GradedMonoid A) 
goal: CommMonoid (GradedMonoid A)

full_name: GradedMonoid.GradeZero.one
code: /-- `1 : A 0` is the value provided in `GOne.one`. -/
@[nolint unusedArguments]
instance GradeZero.one : One (A 0) 
goal: One (A 0)

full_name: GradedMonoid.GradeZero.smul
code: /-- `(•) : A 0 → A i → A i` is the value provided in `GradedMonoid.GMul.mul`, composed with
an `Eq.rec` to turn `A (0 + i)` into `A i`.
-/
instance GradeZero.smul (i : ι) : SMul (A 0) (A i) 
goal: SMul (A 0) (A i)

full_name: GradedMonoid.GradeZero.mul
code: /-- `(*) : A 0 → A 0 → A 0` is the value provided in `GradedMonoid.GMul.mul`, composed with
an `Eq.rec` to turn `A (0 + 0)` into `A 0`.
-/
instance GradeZero.mul : Mul (A 0) 
goal: Mul (A 0)

full_name: GradedMonoid.mk_zero_smul
code: @[simp]
theorem mk_zero_smul {i} (a : A 0) (b : A i) : mk _ (a • b) = mk _ a * mk _ b 
goal: GradedMonoid.mk i (a • b) = GradedMonoid.mk 0 a * GradedMonoid.mk i b

full_name: GradedMonoid.GradeZero.smul_eq_mul
code: @[simp]
theorem GradeZero.smul_eq_mul (a b : A 0) : a • b = a * b 
goal: a • b = a * b

full_name: GradedMonoid.instNatPowOfNat
code: instance : NatPow (A 0) 
goal: NatPow (A 0)

full_name: GradedMonoid.mk_zero_pow
code: @[simp]
theorem mk_zero_pow (a : A 0) (n : ℕ) : mk _ (a ^ n) = mk _ a ^ n 
goal: GradedMonoid.mk 0 (a ^ n) = GradedMonoid.mk 0 a ^ n

full_name: GradedMonoid.GradeZero.monoid
code: /-- The `Monoid` structure derived from `GMonoid A`. -/
instance GradeZero.monoid : Monoid (A 0) 
goal: Monoid (A 0)

full_name: GradedMonoid.GradeZero.commMonoid
code: /-- The `CommMonoid` structure derived from `GCommMonoid A`. -/
instance GradeZero.commMonoid : CommMonoid (A 0) 
goal: CommMonoid (A 0)

full_name: GradedMonoid.mkZeroMonoidHom
code: /-- `GradedMonoid.mk 0` is a `MonoidHom`, using the `GradedMonoid.GradeZero.monoid` structure.
-/
def mkZeroMonoidHom : A 0 →* GradedMonoid A 
goal: A 0 →* GradedMonoid A

full_name: GradedMonoid.GradeZero.mulAction
code: /-- Each grade `A i` derives an `A 0`-action structure from `GMonoid A`. -/
instance GradeZero.mulAction {i} : MulAction (A 0) (A i) 
goal: MulAction (A 0) (A i)

full_name: List.dProdIndex
code: /-- The index used by `List.dProd`. Propositionally this is equal to `(l.map fι).Sum`, but
definitionally it needs to have a different form to avoid introducing `Eq.rec`s in `List.dProd`. -/
def List.dProdIndex (l : List α) (fι : α → ι) : ι 
goal: ι

full_name: List.dProdIndex_nil
code: @[simp]
theorem List.dProdIndex_nil (fι : α → ι) : ([] : List α).dProdIndex fι = 0 
goal: [].dProdIndex fι = 0

full_name: List.dProdIndex_cons
code: @[simp]
theorem List.dProdIndex_cons (a : α) (l : List α) (fι : α → ι) :
    (a :: l).dProdIndex fι = fι a + l.dProdIndex fι 
goal: (a :: l).dProdIndex fι = fι a + l.dProdIndex fι

full_name: List.dProdIndex_eq_map_sum
code: theorem List.dProdIndex_eq_map_sum (l : List α) (fι : α → ι) :
    l.dProdIndex fι = (l.map fι).sum 
goal: l.dProdIndex fι = (List.map fι l).sum

full_name: List.dProd
code: /-- A dependent product for graded monoids represented by the indexed family of types `A i`.
This is a dependent version of `(l.map fA).prod`.

For a list `l : List α`, this computes the product of `fA a` over `a`, where each `fA` is of type
`A (fι a)`. -/
def List.dProd (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) : A (l.dProdIndex fι) 
goal: A (l.dProdIndex fι)

full_name: List.dProd_nil
code: @[simp]
theorem List.dProd_nil (fι : α → ι) (fA : ∀ a, A (fι a)) :
    (List.nil : List α).dProd fι fA = GradedMonoid.GOne.one 
goal: [].dProd fι fA = GradedMonoid.GOne.one

full_name: List.dProd_cons
code: @[simp]
theorem List.dProd_cons (fι : α → ι) (fA : ∀ a, A (fι a)) (a : α) (l : List α) :
    (a :: l).dProd fι fA = (GradedMonoid.GMul.mul (fA a) (l.dProd fι fA) : _) 
goal: (a :: l).dProd fι fA = GradedMonoid.GMul.mul (fA a) (l.dProd fι fA)

full_name: GradedMonoid.mk_list_dProd
code: theorem GradedMonoid.mk_list_dProd (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) :
    GradedMonoid.mk _ (l.dProd fι fA) = (l.map fun a => GradedMonoid.mk (fι a) (fA a)).prod 
goal: GradedMonoid.mk (l.dProdIndex fι) (l.dProd fι fA) = (List.map (fun a => GradedMonoid.mk (fι a) (fA a)) l).prod

full_name: GradedMonoid.list_prod_map_eq_dProd
code: /-- A variant of `GradedMonoid.mk_list_dProd` for rewriting in the other direction. -/
theorem GradedMonoid.list_prod_map_eq_dProd (l : List α) (f : α → GradedMonoid A) :
    (l.map f).prod = GradedMonoid.mk _ (l.dProd (fun i => (f i).1) fun i => (f i).2) 
goal: (List.map f l).prod =
  GradedMonoid.mk (l.dProdIndex fun i => (f i).fst) (l.dProd (fun i => (f i).fst) fun i => (f i).snd)

full_name: GradedMonoid.list_prod_ofFn_eq_dProd
code: theorem GradedMonoid.list_prod_ofFn_eq_dProd {n : ℕ} (f : Fin n → GradedMonoid A) :
    (List.ofFn f).prod =
      GradedMonoid.mk _ ((List.finRange n).dProd (fun i => (f i).1) fun i => (f i).2) 
goal: (List.ofFn f).prod =
  GradedMonoid.mk ((List.finRange n).dProdIndex fun i => (f i).fst)
    ((List.finRange n).dProd (fun i => (f i).fst) fun i => (f i).snd)

full_name: One.gOne_one
code: @[simps one]
instance One.gOne [Zero ι] [One R] : GradedMonoid.GOne fun _ : ι => R 
goal: GradedMonoid.GOne.one = 1

full_name: One.gOne
code: @[simps one]
instance One.gOne [Zero ι] [One R] : GradedMonoid.GOne fun _ : ι => R 
goal: GradedMonoid.GOne fun x => R

full_name: Mul.gMul
code: @[simps mul]
instance Mul.gMul [Add ι] [Mul R] : GradedMonoid.GMul fun _ : ι => R 
goal: GradedMonoid.GMul fun x => R

full_name: Mul.gMul_mul
code: @[simps mul]
instance Mul.gMul [Add ι] [Mul R] : GradedMonoid.GMul fun _ : ι => R 
goal: ∀ {i j : ι} (x y : R), GradedMonoid.GMul.mul x y = x * y

full_name: Monoid.gMonoid
code: /-- If all grades are the same type and themselves form a monoid, then there is a trivial grading
structure. -/
@[simps gnpow]
instance Monoid.gMonoid [AddMonoid ι] [Monoid R] : GradedMonoid.GMonoid fun _ : ι => R 
goal: GradedMonoid.GMonoid fun x => R

full_name: Monoid.gMonoid_gnpow
code: /-- If all grades are the same type and themselves form a monoid, then there is a trivial grading
structure. -/
@[simps gnpow]
instance Monoid.gMonoid [AddMonoid ι] [Monoid R] : GradedMonoid.GMonoid fun _ : ι => R 
goal: ∀ (x : ι) (a : R), GradedMonoid.GMonoid.gnpow n a = a ^ n

full_name: CommMonoid.gCommMonoid
code: /-- If all grades are the same type and themselves form a commutative monoid, then there is a
trivial grading structure. -/
instance CommMonoid.gCommMonoid [AddCommMonoid ι] [CommMonoid R] :
    GradedMonoid.GCommMonoid fun _ : ι => R 
goal: GradedMonoid.GCommMonoid fun x => R

full_name: List.dProd_monoid
code: /-- When all the indexed types are the same, the dependent product is just the regular product. -/
@[simp]
theorem List.dProd_monoid {α} [AddMonoid ι] [Monoid R] (l : List α) (fι : α → ι) (fA : α → R) :
    @List.dProd _ _ (fun _ : ι => R) _ _ l fι fA = (l.map fA).prod 
goal: l.dProd fι fA = (List.map fA l).prod

full_name: SetLike.GradedOne.one_mem
code: /-- A version of `GradedMonoid.GOne` for internally graded objects. -/
class SetLike.GradedOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S) : Prop where
  /-- One has grade zero -/
  one_mem : (1 : R) ∈ A 0
goal: 1 ∈ A 0

full_name: SetLike.GradedOne
code: /-- A version of `GradedMonoid.GOne` for internally graded objects. -/
class SetLike.GradedOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S) : Prop where
  /-- One has grade zero -/
  one_mem : (1 : R) ∈ A 0
goal: Prop

full_name: SetLike.one_mem_graded
code: theorem SetLike.one_mem_graded {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
    [SetLike.GradedOne A] : (1 : R) ∈ A 0 
goal: 1 ∈ A 0

full_name: SetLike.gOne
code: instance SetLike.gOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
    [SetLike.GradedOne A] : GradedMonoid.GOne fun i => A i 
goal: GradedMonoid.GOne fun i => ↥(A i)

full_name: SetLike.coe_gOne
code: @[simp]
theorem SetLike.coe_gOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
    [SetLike.GradedOne A] : ↑(@GradedMonoid.GOne.one _ (fun i => A i) _ _) = (1 : R) 
goal: ↑GradedMonoid.GOne.one = 1

full_name: SetLike.GradedMul.mul_mem
code: /-- A version of `GradedMonoid.ghas_one` for internally graded objects. -/
class SetLike.GradedMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S) : Prop where
  /-- Multiplication is homogeneous -/
  mul_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ A i → gj ∈ A j → gi * gj ∈ A (i + j)
goal: gi ∈ A i → gj ∈ A j → gi * gj ∈ A (i + j)

full_name: SetLike.GradedMul
code: /-- A version of `GradedMonoid.ghas_one` for internally graded objects. -/
class SetLike.GradedMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S) : Prop where
  /-- Multiplication is homogeneous -/
  mul_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ A i → gj ∈ A j → gi * gj ∈ A (i + j)
goal: Prop

full_name: SetLike.mul_mem_graded
code: theorem SetLike.mul_mem_graded {S : Type*} [SetLike S R] [Mul R] [Add ι] {A : ι → S}
    [SetLike.GradedMul A] ⦃i j⦄ {gi gj} (hi : gi ∈ A i) (hj : gj ∈ A j) : gi * gj ∈ A (i + j) 
goal: gi * gj ∈ A (i + j)

full_name: SetLike.gMul
code: instance SetLike.gMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S)
    [SetLike.GradedMul A] : GradedMonoid.GMul fun i => A i 
goal: GradedMonoid.GMul fun i => ↥(A i)

full_name: SetLike.coe_gMul
code: @[simp,nolint simpNF]
theorem SetLike.coe_gMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S)
    [SetLike.GradedMul A] {i j : ι} (x : A i) (y : A j) :
    ↑(@GradedMonoid.GMul.mul _ (fun i => A i) _ _ _ _ x y) = (x * y : R) 
goal: ↑(GradedMonoid.GMul.mul x y) = ↑x * ↑y

full_name: SetLike.GradedMonoid
code: /-- A version of `GradedMonoid.GMonoid` for internally graded objects. -/
class SetLike.GradedMonoid {S : Type*} [SetLike S R] [Monoid R] [AddMonoid ι] (A : ι → S) extends
  SetLike.GradedOne A, SetLike.GradedMul A : Prop
goal: Prop

full_name: SetLike.GradeZero.submonoid
code: /-- The submonoid `A 0` of `R`. -/
@[simps]
def submonoid : Submonoid R 
goal: Submonoid R

full_name: SetLike.GradeZero.submonoid_coe
code: /-- The submonoid `A 0` of `R`. -/
@[simps]
def submonoid : Submonoid R 
goal: ↑(SetLike.GradeZero.submonoid A) = ↑(A 0)

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

full_name: SetLike.GradeZero.instCommMonoid
code: /-- The commutative monoid `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`. -/
instance instCommMonoid
    {R S : Type*} [SetLike S R] [CommMonoid R]
    {A : ι → S} [SetLike.GradedMonoid A] :
    CommMonoid (A 0) 
goal: CommMonoid ↥(A 0)

full_name: SetLike.GradeZero.coe_one
code: /-- The linter message "error: SetLike.GradeZero.coe_one.{u_3, u_2, u_1} Left-hand side does
  not simplify, when using the simp lemma on itself." is wrong. The LHS does simplify. -/
@[nolint simpNF, simp, norm_cast] theorem coe_one : ↑(1 : A 0) = (1 : R) 
goal: ↑1 = 1

full_name: SetLike.GradeZero.coe_mul
code: /-- The linter message "error: SetLike.GradeZero.coe_mul.{u_3, u_2, u_1} Left-hand side does
  not simplify, when using the simp lemma on itself." is wrong. The LHS does simplify. -/
@[nolint simpNF, simp, norm_cast] theorem coe_mul (a b : A 0) : ↑(a * b) = (↑a * ↑b : R) 
goal: ↑(a * b) = ↑a * ↑b

full_name: SetLike.GradeZero.coe_pow
code: /-- The linter message "error: SetLike.GradeZero.coe_pow.{u_3, u_2, u_1} Left-hand side does
  not simplify, when using the simp lemma on itself." is wrong. The LHS does simplify. -/
@[nolint simpNF, simp, norm_cast] theorem coe_pow (a : A 0) (n : ℕ) : ↑(a ^ n) = (↑a : R) ^ n 
goal: ↑(a ^ n) = ↑a ^ n

full_name: SetLike.pow_mem_graded
code: theorem pow_mem_graded (n : ℕ) {r : R} {i : ι} (h : r ∈ A i) : r ^ n ∈ A (n • i) 
goal: r ^ n ∈ A (n • i)

full_name: SetLike.list_prod_map_mem_graded
code: theorem list_prod_map_mem_graded {ι'} (l : List ι') (i : ι' → ι) (r : ι' → R)
    (h : ∀ j ∈ l, r j ∈ A (i j)) : (l.map r).prod ∈ A (l.map i).sum 
goal: (List.map r l).prod ∈ A (List.map i l).sum

full_name: SetLike.list_prod_ofFn_mem_graded
code: theorem list_prod_ofFn_mem_graded {n} (i : Fin n → ι) (r : Fin n → R) (h : ∀ j, r j ∈ A (i j)) :
    (List.ofFn r).prod ∈ A (List.ofFn i).sum 
goal: (List.ofFn r).prod ∈ A (List.ofFn i).sum

full_name: SetLike.gMonoid
code: /-- Build a `GMonoid` instance for a collection of subobjects. -/
instance SetLike.gMonoid {S : Type*} [SetLike S R] [Monoid R] [AddMonoid ι] (A : ι → S)
    [SetLike.GradedMonoid A] : GradedMonoid.GMonoid fun i => A i 
goal: GradedMonoid.GMonoid fun i => ↥(A i)

full_name: SetLike.coe_gnpow
code: @[simp,nolint simpNF]
theorem SetLike.coe_gnpow {S : Type*} [SetLike S R] [Monoid R] [AddMonoid ι] (A : ι → S)
    [SetLike.GradedMonoid A] {i : ι} (x : A i) (n : ℕ) :
    ↑(@GradedMonoid.GMonoid.gnpow _ (fun i => A i) _ _ n _ x) = (x:R)^n 
goal: ↑(GradedMonoid.GMonoid.gnpow n x) = ↑x ^ n

full_name: SetLike.gCommMonoid
code: /-- Build a `GCommMonoid` instance for a collection of subobjects. -/
instance SetLike.gCommMonoid {S : Type*} [SetLike S R] [CommMonoid R] [AddCommMonoid ι] (A : ι → S)
    [SetLike.GradedMonoid A] : GradedMonoid.GCommMonoid fun i => A i 
goal: GradedMonoid.GCommMonoid fun i => ↥(A i)

full_name: SetLike.coe_list_dProd
code: /-- Coercing a dependent product of subtypes is the same as taking the regular product of the
coercions. -/
@[simp,nolint simpNF]
theorem SetLike.coe_list_dProd (A : ι → S) [SetLike.GradedMonoid A] (fι : α → ι)
    (fA : ∀ a, A (fι a)) (l : List α) : ↑(@List.dProd _ _ (fun i => ↥(A i)) _ _ l fι fA)
    = (List.prod (l.map fun a => fA a) : R) 
goal: ↑(l.dProd fι fA) = (List.map (fun a => ↑(fA a)) l).prod

full_name: SetLike.list_dProd_eq
code: /-- A version of `List.coe_dProd_set_like` with `Subtype.mk`. -/
theorem SetLike.list_dProd_eq (A : ι → S) [SetLike.GradedMonoid A] (fι : α → ι) (fA : ∀ a, A (fι a))
    (l : List α) :
    (@List.dProd _ _ (fun i => ↥(A i)) _ _ l fι fA) =
      ⟨List.prod (l.map fun a => fA a),
        (l.dProdIndex_eq_map_sum fι).symm ▸
          list_prod_map_mem_graded l _ _ fun i _ => (fA i).prop⟩ 
goal: l.dProd fι fA = ⟨(List.map (fun a => ↑(fA a)) l).prod, ⋯⟩

full_name: SetLike.Homogeneous
code: /-- An element `a : R` is said to be homogeneous if there is some `i : ι` such that `a ∈ A i`. -/
def SetLike.Homogeneous (A : ι → S) (a : R) : Prop 
goal: Prop

full_name: SetLike.homogeneous_coe
code: @[simp]
theorem SetLike.homogeneous_coe {A : ι → S} {i} (x : A i) : SetLike.Homogeneous A (x : R) 
goal: SetLike.Homogeneous A ↑x

full_name: SetLike.homogeneous_one
code: theorem SetLike.homogeneous_one [Zero ι] [One R] (A : ι → S) [SetLike.GradedOne A] :
    SetLike.Homogeneous A (1 : R) 
goal: SetLike.Homogeneous A 1

full_name: SetLike.homogeneous_mul
code: theorem SetLike.homogeneous_mul [Add ι] [Mul R] {A : ι → S} [SetLike.GradedMul A] {a b : R} :
    SetLike.Homogeneous A a → SetLike.Homogeneous A b → SetLike.Homogeneous A (a * b)
  
goal: SetLike.Homogeneous A a → SetLike.Homogeneous A b → SetLike.Homogeneous A (a * b)

full_name: SetLike.homogeneousSubmonoid
code: /-- When `A` is a `SetLike.GradedMonoid A`, then the homogeneous elements forms a submonoid. -/
def SetLike.homogeneousSubmonoid [AddMonoid ι] [Monoid R] (A : ι → S) [SetLike.GradedMonoid A] :
    Submonoid R 
goal: Submonoid R