l3lab/ntp-mathlib huggingface dataset:
private nonrec theorem one_mul (x : ⨁ i, A i) : 1 * x = x := by
  suffices mulHom A One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  apply addHom_ext; intro i xi
  simp only [One.one]
  rw [mulHom_of_of]
  

Proof state:
case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ (of A (0 + i)) (GradedMonoid.GMul.mul GradedMonoid.GOne.one xi) =
    (AddMonoidHom.id (⨁ (i : ι), A i)) ((of (fun i => A i) i) xi)

Next tactic:
exact of_eq_of_gradedMonoid_eq (one_mul <| GradedMonoid.mk i xi)
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ x * 1 = x

Next tactic:
suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ (AddMonoidHom.flip (mulHom A)) One.one = AddMonoidHom.id (⨁ (i : ι), A i)

Next tactic:
apply addHom_ext
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  apply addHom_ext; 

Proof state:
case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ ∀ (i : ι) (y : A i),
    ((AddMonoidHom.flip (mulHom A)) One.one) ((of (fun i => A i) i) y) =
      (AddMonoidHom.id (⨁ (i : ι), A i)) ((of (fun i => A i) i) y)

Next tactic:
intro i xi
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  apply addHom_ext; intro i xi
  

Proof state:
case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ ((AddMonoidHom.flip (mulHom A)) One.one) ((of (fun i => A i) i) xi) =
    (AddMonoidHom.id (⨁ (i : ι), A i)) ((of (fun i => A i) i) xi)

Next tactic:
simp only [One.one]
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  apply addHom_ext; intro i xi
  simp only [One.one]
  

Proof state:
case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ ((AddMonoidHom.flip (mulHom A)) ((of (fun i => A i) 0) GradedMonoid.GOne.one)) ((of (fun i => A i) i) xi) =
    (AddMonoidHom.id (⨁ (i : ι), A i)) ((of (fun i => A i) i) xi)

Next tactic:
rw [flip_apply, mulHom_of_of]
private nonrec theorem mul_one (x : ⨁ i, A i) : x * 1 = x := by
  suffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
  apply addHom_ext; intro i xi
  simp only [One.one]
  rw [flip_apply, mulHom_of_of]
  

Proof state:
case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ (of A (i + 0)) (GradedMonoid.GMul.mul xi GradedMonoid.GOne.one) =
    (AddMonoidHom.id (⨁ (i : ι), A i)) ((of (fun i => A i) i) xi)

Next tactic:
exact of_eq_of_gradedMonoid_eq (mul_one <| GradedMonoid.mk i xi)
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
⊢ a * b * c = a * (b * c)

Next tactic:
suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      exact sol
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this :
  AddMonoidHom.comp (compHom (mulHom A)) (mulHom A) =
    AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))
⊢ a * b * c = a * (b * c)

Next tactic:
have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this :
  AddMonoidHom.comp (compHom (mulHom A)) (mulHom A) =
    AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))
sol :
  (((AddMonoidHom.comp (compHom (mulHom A)) (mulHom A)) a) b) c =
    (((AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))) a)
        b)
      c
⊢ a * b * c = a * (b * c)

Next tactic:
have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this :
  AddMonoidHom.comp (compHom (mulHom A)) (mulHom A) =
    AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))
sol :
  (((AddMonoidHom.comp (compHom (mulHom A)) (mulHom A)) a) b) c =
    (((AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))) a)
        b)
      c
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
⊢ a * b * c = a * (b * c)

Next tactic:
simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
this :
  AddMonoidHom.comp (compHom (mulHom A)) (mulHom A) =
    AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))
aux : ∀ (a b : ⨁ (i : ι), A i), ((mulHom A) a) b = a * b
sol : a * b * c = a * (b * c)
⊢ a * b * c = a * (b * c)

Next tactic:
exact sol
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      exact sol
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
⊢ AddMonoidHom.comp (compHom (mulHom A)) (mulHom A) =
    AddMonoidHom.flip ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))

Next tactic:
ext ai ax bi bx ci cx
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      exact sol
  ext ai ax bi bx ci cx
  

Proof state:
case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ (AddMonoidHom.comp
        ((AddMonoidHom.comp
            ((AddMonoidHom.comp (AddMonoidHom.comp (compHom (mulHom A)) (mulHom A)) (of (fun i => A i) ai)) ax)
            (of (fun i => A i) bi))
          bx)
        (of (fun i => A i) ci))
      cx =
    (AddMonoidHom.comp
        ((AddMonoidHom.comp
            ((AddMonoidHom.comp
                (AddMonoidHom.flip
                  ((compHom flipHom) (AddMonoidHom.comp (compHom (AddMonoidHom.flip (mulHom A))) (mulHom A))))
                (of (fun i => A i) ai))
              ax)
            (of (fun i => A i) bi))
          bx)
        (of (fun i => A i) ci))
      cx

Next tactic:
dsimp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, flip_apply,
    AddMonoidHom.flipHom_apply]
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      exact sol
  ext ai ax bi bx ci cx
  dsimp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, flip_apply,
    AddMonoidHom.flipHom_apply]
  

Proof state:
case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ ((mulHom A) (((mulHom A) ((of (fun i => A i) ai) ax)) ((of (fun i => A i) bi) bx))) ((of (fun i => A i) ci) cx) =
    ((mulHom A) ((of (fun i => A i) ai) ax)) (((mulHom A) ((of (fun i => A i) bi) bx)) ((of (fun i => A i) ci) cx))

Next tactic:
simp_rw [mulHom_of_of]
private theorem mul_assoc (a b c : ⨁ i, A i) : a * b * c = a * (b * c) := by
  -- (`fun a b c => a * b * c` as a bundled hom) = (`fun a b c => a * (b * c)` as a bundled hom)
  suffices (mulHom A).compHom.comp (mulHom A) =
      (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip by
      have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c
      have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl
      simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,
        AddMonoidHom.flipHom_apply] at sol
      exact sol
  ext ai ax bi bx ci cx
  dsimp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, flip_apply,
    AddMonoidHom.flipHom_apply]
  simp_rw [mulHom_of_of]
  

Proof state:
case H.h.H.h.H.h
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a b c : ⨁ (i : ι), A i
ai : ι
ax : A ai
bi : ι
bx : A bi
ci : ι
cx : A ci
⊢ (of A (ai + bi + ci)) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul ax bx) cx) =
    (of A (ai + (bi + ci))) (GradedMonoid.GMul.mul ax (GradedMonoid.GMul.mul bx cx))

Next tactic:
exact of_eq_of_gradedMonoid_eq (_root_.mul_assoc (GradedMonoid.mk ai ax) ⟨bi, bx⟩ ⟨ci, cx⟩)
/-- The `Semiring` structure derived from `GSemiring A`. -/
instance semiring : Semiring (⨁ i, A i) :=
  { (inferInstance : NonUnitalNonAssocSemiring _) with
    one := 1
    -- Porting note: not required in now
    -- mul := (· * ·)
    -- zero := 0
    -- add := (· + ·)
    one_mul := one_mul A
    mul_one := mul_one A
    mul_assoc := mul_assoc A
    natCast := fun n => of _ _ (GSemiring.natCast n)
    natCast_zero := by 

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
src✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance
⊢ NatCast.natCast 0 = 0

Next tactic:
simp only [GSemiring.natCast_zero, map_zero]
/-- The `Semiring` structure derived from `GSemiring A`. -/
instance semiring : Semiring (⨁ i, A i) :=
  { (inferInstance : NonUnitalNonAssocSemiring _) with
    one := 1
    -- Porting note: not required in now
    -- mul := (· * ·)
    -- zero := 0
    -- add := (· + ·)
    one_mul := one_mul A
    mul_one := mul_one A
    mul_assoc := mul_assoc A
    natCast := fun n => of _ _ (GSemiring.natCast n)
    natCast_zero := by simp only [GSemiring.natCast_zero, map_zero]
    natCast_succ := fun n => by
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
src✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance
n : ℕ
⊢ NatCast.natCast (n + 1) = NatCast.natCast n + 1

Next tactic:
simp_rw [GSemiring.natCast_succ]
/-- The `Semiring` structure derived from `GSemiring A`. -/
instance semiring : Semiring (⨁ i, A i) :=
  { (inferInstance : NonUnitalNonAssocSemiring _) with
    one := 1
    -- Porting note: not required in now
    -- mul := (· * ·)
    -- zero := 0
    -- add := (· + ·)
    one_mul := one_mul A
    mul_one := mul_one A
    mul_assoc := mul_assoc A
    natCast := fun n => of _ _ (GSemiring.natCast n)
    natCast_zero := by simp only [GSemiring.natCast_zero, map_zero]
    natCast_succ := fun n => by
      simp_rw [GSemiring.natCast_succ]
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
src✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance
n : ℕ
⊢ (of (fun i => A i) 0) (GSemiring.natCast n + GradedMonoid.GOne.one) = (of (fun i => A i) 0) (GSemiring.natCast n) + 1

Next tactic:
rw [map_add]
/-- The `Semiring` structure derived from `GSemiring A`. -/
instance semiring : Semiring (⨁ i, A i) :=
  { (inferInstance : NonUnitalNonAssocSemiring _) with
    one := 1
    -- Porting note: not required in now
    -- mul := (· * ·)
    -- zero := 0
    -- add := (· + ·)
    one_mul := one_mul A
    mul_one := mul_one A
    mul_assoc := mul_assoc A
    natCast := fun n => of _ _ (GSemiring.natCast n)
    natCast_zero := by simp only [GSemiring.natCast_zero, map_zero]
    natCast_succ := fun n => by
      simp_rw [GSemiring.natCast_succ]
      rw [map_add]
      

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
src✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance
n : ℕ
⊢ (of (fun i => A i) 0) (GSemiring.natCast n) + (of (fun i => A i) 0) GradedMonoid.GOne.one =
    (of (fun i => A i) 0) (GSemiring.natCast n) + 1

Next tactic:
rfl
theorem ofPow {i} (a : A i) (n : ℕ) :
    of _ i a ^ n = of _ (n • i) (GradedMonoid.GMonoid.gnpow _ a) := by
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
⊢ (of A i) a ^ n = (of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)

Next tactic:
induction' n with n n_ih
theorem ofPow {i} (a : A i) (n : ℕ) :
    of _ i a ^ n = of _ (n • i) (GradedMonoid.GMonoid.gnpow _ a) := by
  induction' n with n n_ih
  · 

Proof state:
case zero
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
⊢ (of A i) a ^ Nat.zero = (of A (Nat.zero • i)) (GradedMonoid.GMonoid.gnpow Nat.zero a)

Next tactic:
exact of_eq_of_gradedMonoid_eq (pow_zero <| GradedMonoid.mk _ a).symm
theorem ofPow {i} (a : A i) (n : ℕ) :
    of _ i a ^ n = of _ (n • i) (GradedMonoid.GMonoid.gnpow _ a) := by
  induction' n with n n_ih
  · exact of_eq_of_gradedMonoid_eq (pow_zero <| GradedMonoid.mk _ a).symm
  · 

Proof state:
case succ
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
n_ih : (of A i) a ^ n = (of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
⊢ (of A i) a ^ Nat.succ n = (of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)

Next tactic:
rw [pow_succ, n_ih, of_mul_of a]
theorem ofPow {i} (a : A i) (n : ℕ) :
    of _ i a ^ n = of _ (n • i) (GradedMonoid.GMonoid.gnpow _ a) := by
  induction' n with n n_ih
  · exact of_eq_of_gradedMonoid_eq (pow_zero <| GradedMonoid.mk _ a).symm
  · rw [pow_succ, n_ih, of_mul_of a]
    

Proof state:
case succ
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
n_ih : (of A i) a ^ n = (of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
⊢ (of A (i + n • i)) (GradedMonoid.GMul.mul a (GradedMonoid.GMonoid.gnpow n a)) =
    (of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)

Next tactic:
exact of_eq_of_gradedMonoid_eq (pow_succ (GradedMonoid.mk _ a) n).symm
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 := by
  

Proof state:
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
l : List α
fι : α → ι
fA : (a : α) → A (fι a)
⊢ (of A (List.dProdIndex l fι)) (List.dProd l fι fA) = List.prod (List.map (fun a => (of A (fι a)) (fA a)) l)

Next tactic:
induction' l with head tail
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 := by
  induction' l with head tail
  · 

Proof state:
case nil
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
fι : α → ι
fA : (a : α) → A (fι a)
⊢ (of A (List.dProdIndex [] fι)) (List.dProd [] fι fA) = List.prod (List.map (fun a => (of A (fι a)) (fA a)) [])

Next tactic:
simp only [List.map_nil, List.prod_nil, List.dProd_nil]
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 := by
  induction' l with head tail
  · simp only [List.map_nil, List.prod_nil, List.dProd_nil]
    

Proof state:
case nil
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
fι : α → ι
fA : (a : α) → A (fι a)
⊢ (of A (List.dProdIndex [] fι)) GradedMonoid.GOne.one = 1

Next tactic:
rfl
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 := by
  induction' l with head tail
  · simp only [List.map_nil, List.prod_nil, List.dProd_nil]
    rfl
  · 

Proof state:
case cons
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
fι : α → ι
fA : (a : α) → A (fι a)
head : α
tail : List α
tail_ih✝ :
  (of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => (of A (fι a)) (fA a)) tail)
⊢ (of A (List.dProdIndex (head :: tail) fι)) (List.dProd (head :: tail) fι fA) =
    List.prod (List.map (fun a => (of A (fι a)) (fA a)) (head :: tail))

Next tactic:
rename_i ih
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 := by
  induction' l with head tail
  · simp only [List.map_nil, List.prod_nil, List.dProd_nil]
    rfl
  · rename_i ih
    

Proof state:
case cons
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
fι : α → ι
fA : (a : α) → A (fι a)
head : α
tail : List α
ih :
  (of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => (of A (fι a)) (fA a)) tail)
⊢ (of A (List.dProdIndex (head :: tail) fι)) (List.dProd (head :: tail) fι fA) =
    List.prod (List.map (fun a => (of A (fι a)) (fA a)) (head :: tail))

Next tactic:
simp only [List.map_cons, List.prod_cons, List.dProd_cons, ← ih]
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 := by
  induction' l with head tail
  · simp only [List.map_nil, List.prod_nil, List.dProd_nil]
    rfl
  · rename_i ih
    simp only [List.map_cons, List.prod_cons, List.dProd_cons, ← ih]
    

Proof state:
case cons
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
α : Type u_3
fι : α → ι
fA : (a : α) → A (fι a)
head : α
tail : List α
ih :
  (of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => (of A (fι a)) (fA a)) tail)
⊢ (of A (List.dProdIndex (head :: tail) fι)) (GradedMonoid.GMul.mul (fA head) (List.dProd tail fι fA)) =
    (of A (fι head)) (fA head) * (of A (List.dProdIndex tail fι)) (List.dProd tail fι fA)

Next tactic:
rw [DirectSum.of_mul_of (fA head)]