awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
⊢ (fun (n : σ →₀ ℕ) ↦
      HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
        ((coeff n : (a : MvPowerSeries σ R) → R) (f * g) : R)) =
    HMul.hMul (α := MvPowerSeries σ R)
      (fun (n : σ →₀ ℕ) ↦
        HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
          ((coeff n : (a : MvPowerSeries σ R) → R) f : R))
      fun (n : σ →₀ ℕ) ↦
      HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
        ((coeff n : (a : MvPowerSeries σ R) → R) g : R)
have h : ∀ (n : σ →₀ ℕ),
  Eq.{u_9 + 1} (α := R)
    ((coeff n : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
        HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
          ((coeff n : (a : MvPowerSeries σ R) → R) (f * g) : R) :
      R)
    ((coeff n : (a : MvPowerSeries σ R) → R)
        (HMul.hMul (α := MvPowerSeries σ R)
          (fun (n : σ →₀ ℕ) ↦
            HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
              ((coeff n : (a : MvPowerSeries σ R) → R) f : R))
          fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R)) :
      R)
Tactic: ext n
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
⊢ Eq.{u_9 + 1} (α := R)
    ((coeff n : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
        HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
          ((coeff n : (a : MvPowerSeries σ R) → R) (f * g) : R) :
      R)
    ((coeff n : (a : MvPowerSeries σ R) → R)
        (HMul.hMul (α := MvPowerSeries σ R)
          (fun (n : σ →₀ ℕ) ↦
            HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
              ((coeff n : (a : MvPowerSeries σ R) → R) f : R))
          fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R)) :
      R)
have h : Eq.{u_9 + 1} (α := R)
  (∑ i ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n,
    (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
      HMul.hMul (α := R) (β := R) ((coeff i.1 : (a : MvPowerSeries σ R) → R) f : R)
        ((coeff i.2 : (a : MvPowerSeries σ R) → R) g : R))
  (∑ p ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n,
    HMul.hMul (α := R) (β := R)
      ((coeff p.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
        R)
      ((coeff p.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
        R))
Tactic: rw [coeff_apply, coeff_mul, coeff_mul, Finset.mul_sum]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
⊢ Eq.{u_9 + 1} (α := R)
    (∑ i ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n,
      (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
        HMul.hMul (α := R) (β := R) ((coeff i.1 : (a : MvPowerSeries σ R) → R) f : R)
          ((coeff i.2 : (a : MvPowerSeries σ R) → R) g : R))
    (∑ p ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n,
      HMul.hMul (α := R) (β := R)
        ((coeff p.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
            HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
              ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
          R)
        ((coeff p.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
            HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
              ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
          R))
have h : ∀ x ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n,
  (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
      HMul.hMul (α := R) (β := R) ((coeff x.1 : (a : MvPowerSeries σ R) → R) f : R)
        ((coeff x.2 : (a : MvPowerSeries σ R) → R) g : R) =
    HMul.hMul (α := R) (β := R)
      ((coeff x.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
        R)
      ((coeff x.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
        R)
Tactic: apply Finset.sum_congr rfl
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (hypothesis)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x ∈ @Finset.antidiagonal _ Finsupp.instAddMonoid _ n
⊢ (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
      HMul.hMul (α := R) (β := R) ((coeff x.1 : (a : MvPowerSeries σ R) → R) f : R)
        ((coeff x.2 : (a : MvPowerSeries σ R) → R) g : R) =
    HMul.hMul (α := R) (β := R)
      ((coeff x.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
        R)
      ((coeff x.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
        R)
have hx₁ : x.1 + x.2 = n
Tactic: simp only [Finset.mem_antidiagonal] at hx
Cleared hypotheses: hx
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
      HMul.hMul (α := R) (β := R) ((coeff x.1 : (a : MvPowerSeries σ R) → R) f : R)
        ((coeff x.2 : (a : MvPowerSeries σ R) → R) g : R) =
    HMul.hMul (α := R) (β := R)
      ((coeff x.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
        R)
      ((coeff x.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
        R)
have h : ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
    HMul.hMul (α := R) (β := R) ((coeff x.1 : (a : MvPowerSeries σ R) → R) f : R)
      ((coeff x.2 : (a : MvPowerSeries σ R) → R) g : R) =
  HMul.hMul (α := R) (β := R)
    ((coeff x.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
        HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
          ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
      R)
    ((coeff x.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
        HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
          ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
      R)
Tactic: rw [← hx]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) *
      HMul.hMul (α := R) (β := R) ((coeff x.1 : (a : MvPowerSeries σ R) → R) f : R)
        ((coeff x.2 : (a : MvPowerSeries σ R) → R) g : R) =
    HMul.hMul (α := R) (β := R)
      ((coeff x.1 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) f : R) :
        R)
      ((coeff x.2 : (a : MvPowerSeries σ R) → R) fun (n : σ →₀ ℕ) ↦
          HMul.hMul (α := R) (β := R) (n.prod fun (s : σ) (m : ℕ) ↦ a s ^ m : R)
            ((coeff n : (a : MvPowerSeries σ R) → R) g : R) :
        R)
have h : ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * (f x.1 * g x.2) =
  (x.1.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * f x.1 * ((x.2.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * g x.2)
Tactic: simp only [coeff_apply]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * (f x.1 * g x.2) =
    (x.1.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * f x.1 * ((x.2.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * g x.2)
have h : (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * (f x.1 * g x.2) =
  (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
    ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) * g x.2)
Tactic: rw [Finsupp.prod_of_support_subset _ Finsupp.support_add,
      Finsupp.prod_of_support_subset x.1 Finset.subset_union_left,
      Finsupp.prod_of_support_subset x.2 Finset.subset_union_right]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
h :
  (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
      (f x.1 * g x.2) =
    (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
      ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) * g x.2)
⊢ ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * (f x.1 * g x.2) =
    (x.1.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * f x.1 * ((x.2.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * g x.2)
have h₁ : ∀ i ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a i) 0 = 1
Tactic: rw [Finsupp.prod_of_support_subset _ Finsupp.support_add,
      Finsupp.prod_of_support_subset x.1 Finset.subset_union_left,
      Finsupp.prod_of_support_subset x.2 Finset.subset_union_right]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
h :
  (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
      (f x.1 * g x.2) =
    (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
      ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) * g x.2)
h₁ : ∀ i ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a i) 0 = 1
⊢ ((x.1 + x.2).prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * (f x.1 * g x.2) =
    (x.1.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * f x.1 * ((x.2.prod fun (s : σ) (m : ℕ) ↦ a s ^ m) * g x.2)
have rw : Finset σ
Tactic: rw [Finsupp.prod_of_support_subset _ Finsupp.support_add,
      Finsupp.prod_of_support_subset x.1 Finset.subset_union_left,
      Finsupp.prod_of_support_subset x.2 Finset.subset_union_right]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
      (f x.1 * g x.2) =
    (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
      ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) * g x.2)
have h : (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 * g x.2 =
  ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
      ∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
    g x.2
Tactic: simp only [← mul_assoc]
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 * g x.2 =
    ((∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
        ∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
      g x.2
have h : (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 =
  (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
    ∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)
Tactic: congr 1
-- Lean 4 proof step from Mathlib.RingTheory.MvPowerSeries.Substitution (goal)
Goal:
σ : Type u_1
A : Type u_2
inst : CommSemiring A
R_1 : Type u_3
inst_1 : CommRing R_1
inst_2 : Algebra A R_1
τ : Type u_4
S : Type u_5
inst_3 : CommRing S
inst_4 : Algebra A S
inst_5 : Algebra R_1 S
inst_6 : IsScalarTower A R_1 S
a_1 a_2 : σ → MvPowerSeries τ S
T_1 : Type u_6
inst_7 : CommRing T_1
inst_8 : UniformSpace T_1
inst_9 : T2Space T_1
inst_10 : CompleteSpace T_1
inst_11 : IsUniformAddGroup T_1
inst_12 : IsTopologicalRing T_1
inst_13 : IsLinearTopology T_1 T_1
inst_14 : Algebra R_1 T_1
ε : MvPowerSeries τ S →ₐ[R_1] T_1
inst_15 : Algebra S T_1
inst_16 : IsScalarTower R_1 S T_1
υ : Type u_7
T : Type u_8
inst_17 : CommRing T
inst_18 : Algebra R_1 T
inst_19 : Algebra S T
inst_20 : IsScalarTower R_1 S T
b : τ → MvPowerSeries υ T
R : Type u_9
inst_21 : CommSemiring R
a : σ → R
f g : MvPowerSeries σ R
n : σ →₀ ℕ
x : (σ →₀ ℕ) × (σ →₀ ℕ)
hx : x.1 + x.2 = n
⊢ (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 =
    (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 *
      ∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)
have h : (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 + x.2 : (a : σ) → ℕ) x_1 : ℕ)) * f x.1 =
  HMul.hMul (α := R) (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.1 : (a : σ) → ℕ) x_1 : ℕ))
      (∏ x_1 ∈ x.1.support ∪ x.2.support, HPow.hPow (β := ℕ) (a x_1) ((x.2 : (a : σ) → ℕ) x_1 : ℕ)) *
    f x.1
Tactic: rw [mul_assoc, mul_comm (f x.1), ← mul_assoc]