Theorem: FormalMultilinearSeries.radius_right_inv_pos_of_radius_pos_aux1
File: Mathlib/Analysis/Analytic/Inverse.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ k ∈ Ico 2 (n + 1), a ^ k * ∑ c ∈ {c | 1 < c.length}.toFinset, r ^ c.length * ∏ j : Fin c.length, p (c.blocksFun j) =
    ∑ k ∈ Ico 2 (n + 1),
      ∑ c ∈ {c | 1 < c.length}.toFinset, ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j))
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ x ∈ Ico 2 (n + 1),
      ∑ i ∈ {c | 1 < c.length}.toFinset, a ^ x * (r ^ i.length * ∏ j : Fin i.length, p (i.blocksFun j)) =
    ∑ k ∈ Ico 2 (n + 1),
      ∑ c ∈ {c | 1 < c.length}.toFinset, ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j))
tactic: simp_rw [mul_sum]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ x ∈ Ico 2 (n + 1),
      ∑ i ∈ {c | 1 < c.length}.toFinset, a ^ x * (r ^ i.length * ∏ j : Fin i.length, p (i.blocksFun j)) =
    ∑ k ∈ Ico 2 (n + 1),
      ∑ c ∈ {c | 1 < c.length}.toFinset, ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j))
state_after: case a.a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
a✝¹ : k ∈ Ico 2 (n + 1)
c : Composition k
a✝ : c ∈ {c | 1 < c.length}.toFinset
⊢ a ^ k * (r ^ c.length * ∏ j : Fin c.length, p (c.blocksFun j)) =
    ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j))
tactic: congr! with k _ c
state_before: case a.a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
a✝¹ : k ∈ Ico 2 (n + 1)
c : Composition k
a✝ : c ∈ {c | 1 < c.length}.toFinset
⊢ a ^ k * (r ^ c.length * ∏ j : Fin c.length, p (c.blocksFun j)) =
    ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j))
state_after: case a.a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
a✝¹ : k ∈ Ico 2 (n + 1)
c : Composition k
a✝ : c ∈ {c | 1 < c.length}.toFinset
⊢ a ^ k * (r ^ c.length * ∏ j : Fin c.length, p (c.blocksFun j)) =
    r ^ c.length * (a ^ k * ∏ x : Fin c.length, p (c.blocksFun x))
tactic: rw [prod_mul_distrib, prod_mul_distrib, prod_pow_eq_pow_sum, Composition.sum_blocksFun,
        prod_const, card_fin]
state_before: case a.a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
a✝¹ : k ∈ Ico 2 (n + 1)
c : Composition k
a✝ : c ∈ {c | 1 < c.length}.toFinset
⊢ a ^ k * (r ^ c.length * ∏ j : Fin c.length, p (c.blocksFun j)) =
    r ^ c.length * (a ^ k * ∏ x : Fin c.length, p (c.blocksFun x))
state_after: no goals
tactic: ring
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ k ∈ Ico 2 (n + 1),
      ∑ c ∈ {c | 1 < c.length}.toFinset, ∏ j : Fin c.length, r * (a ^ c.blocksFun j * p (c.blocksFun j)) ≤
    ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j))
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ x ∈ (Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset,
      ∏ j : Fin x.snd.length, r * (a ^ x.snd.blocksFun j * p (x.snd.blocksFun j)) ≤
    ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j))
tactic: rw [sum_sigma']
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ x ∈ (Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset,
      ∏ j : Fin x.snd.length, r * (a ^ x.snd.blocksFun j * p (x.snd.blocksFun j)) ≤
    ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j))
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ((Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset) ⊆ compPartialSumTarget 2 (n + 1) n
tactic: refine
        sum_le_sum_of_subset_of_nonneg ?_ fun x _ _ =>
          prod_nonneg fun j _ => mul_nonneg hr (mul_nonneg (pow_nonneg ha _) (hp _))
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ((Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset) ⊆ compPartialSumTarget 2 (n + 1) n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : ⟨k, c⟩ ∈ (Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset
⊢ ⟨k, c⟩ ∈ compPartialSumTarget 2 (n + 1) n
tactic: rintro ⟨k, c⟩ hd
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : ⟨k, c⟩ ∈ (Ico 2 (n + 1)).sigma fun k => {c | 1 < c.length}.toFinset
⊢ ⟨k, c⟩ ∈ compPartialSumTarget 2 (n + 1) n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
⊢ ⟨k, c⟩ ∈ compPartialSumTarget 2 (n + 1) n
tactic: simp only [Set.mem_toFinset (s := {c | 1 < Composition.length c}), mem_Ico, mem_sigma,
        Set.mem_setOf_eq] at hd
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
⊢ ⟨k, c⟩ ∈ compPartialSumTarget 2 (n + 1) n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
⊢ 2 ≤ c.length ∧ c.length < n + 1 ∧ ∀ (j : Fin c.length), c.blocksFun j < n
tactic: simp only [mem_compPartialSumTarget_iff]
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
⊢ 2 ≤ c.length ∧ c.length < n + 1 ∧ ∀ (j : Fin c.length), c.blocksFun j < n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
⊢ c.blocksFun j < n
tactic: refine ⟨hd.2, c.length_le.trans_lt hd.1.2, fun j => ?_⟩
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
⊢ c.blocksFun j < n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
this : c ≠ Composition.single k ⋯
⊢ c.blocksFun j < n
tactic: have : c ≠ Composition.single k (zero_lt_two.trans_le hd.1.1) := by
        simp [Composition.eq_single_iff_length, ne_of_gt hd.2]
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
this : c ≠ Composition.single k ⋯
⊢ c.blocksFun j < n
state_after: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
this : ∀ (i : Fin c.length), c.blocksFun i < k
⊢ c.blocksFun j < n
tactic: rw [Composition.ne_single_iff] at this
state_before: case mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
c : Composition k
hd : (2 ≤ k ∧ k < n + 1) ∧ 1 < c.length
j : Fin c.length
this : ∀ (i : Fin c.length), c.blocksFun i < k
⊢ c.blocksFun j < n
state_after: no goals
tactic: exact (this j).trans_le (Nat.lt_succ_iff.mp hd.1.2)
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j)) =
    ∑ e ∈ compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j))
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ e ∈ compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j)) =
    ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j))
tactic: symm
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ e ∈ compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j)) =
    ∑ d ∈ compPartialSumTarget 2 (n + 1) n, ∏ j : Fin d.snd.length, r * (a ^ d.snd.blocksFun j * p (d.snd.blocksFun j))
state_after: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 2 (n + 1) n),
    ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j)) =
      ∏ j : Fin (compChangeOfVariables 2 (n + 1) n e he).snd.length,
        r *
          (a ^ (compChangeOfVariables 2 (n + 1) n e he).snd.blocksFun j *
            p ((compChangeOfVariables 2 (n + 1) n e he).snd.blocksFun j))
tactic: apply compChangeOfVariables_sum
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 2 (n + 1) n),
    ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j)) =
      ∏ j : Fin (compChangeOfVariables 2 (n + 1) n e he).snd.length,
        r *
          (a ^ (compChangeOfVariables 2 (n + 1) n e he).snd.blocksFun j *
            p ((compChangeOfVariables 2 (n + 1) n e he).snd.blocksFun j))
state_after: case h.mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
⊢ ∏ j : Fin ⟨k, blocks_fun⟩.fst, r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    ∏ j : Fin (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length,
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
tactic: rintro ⟨k, blocks_fun⟩ H
state_before: case h.mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
⊢ ∏ j : Fin ⟨k, blocks_fun⟩.fst, r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    ∏ j : Fin (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length,
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
state_after: case h.mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ ∏ j : Fin ⟨k, blocks_fun⟩.fst, r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    ∏ j : Fin (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length,
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
tactic: have K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k := by simp
state_before: case h.mk
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ ∏ j : Fin ⟨k, blocks_fun⟩.fst, r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    ∏ j : Fin (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length,
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
state_after: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ HEq (fun j => r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j))) fun j =>
    r *
      (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
        p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
tactic: congr 2 <;> try rw [K]
state_before: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ HEq (fun j => r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j))) fun j =>
    r *
      (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j *
        p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun j))
state_after: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ ∀ (i : Fin k),
    r * (a ^ ⟨k, blocks_fun⟩.snd i * p (⟨k, blocks_fun⟩.snd i)) =
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑i, ⋯⟩ *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑i, ⋯⟩))
tactic: rw [Fin.heq_fun_iff K.symm]
state_before: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
⊢ ∀ (i : Fin k),
    r * (a ^ ⟨k, blocks_fun⟩.snd i * p (⟨k, blocks_fun⟩.snd i)) =
      r *
        (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑i, ⋯⟩ *
          p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑i, ⋯⟩))
state_after: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
j : Fin k
⊢ r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    r *
      (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑j, ⋯⟩ *
        p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑j, ⋯⟩))
tactic: intro j
state_before: case h.mk.h.e_5
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 2 (n + 1) n
K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k
j : Fin k
⊢ r * (a ^ ⟨k, blocks_fun⟩.snd j * p (⟨k, blocks_fun⟩.snd j)) =
    r *
      (a ^ (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑j, ⋯⟩ *
        p ((compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑j, ⋯⟩))
state_after: no goals
tactic: rw [compChangeOfVariables_blocksFun]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ e ∈ compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ e.snd j * p (e.snd j)) =
    ∑ j ∈ Ico 2 (n + 1), r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ a_1 ∈ Ico 2 (n + 1), ∑ s ∈ Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin a_1, r * (a ^ s j * p (s j)) =
    ∑ j ∈ Ico 2 (n + 1), r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
tactic: rw [compPartialSumSource,
        ← sum_sigma' (Ico 2 (n + 1))
          (fun k : ℕ => (Fintype.piFinset fun _ : Fin k => Ico 1 n : Finset (Fin k → ℕ)))
          (fun n e => ∏ j : Fin n, r * (a ^ e j * p (e j)))]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
⊢ ∑ a_1 ∈ Ico 2 (n + 1), ∑ s ∈ Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin a_1, r * (a ^ s j * p (s j)) =
    ∑ j ∈ Ico 2 (n + 1), r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ∑ s ∈ Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin j, r * (a ^ s j * p (s j)) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
tactic: congr! with j
state_before: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ∑ s ∈ Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin j, r * (a ^ s j * p (s j)) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ (∑ x ∈ Fintype.piFinset fun x => Ico 1 n, (MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun j => r * (a ^ x j * p (x j))) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
tactic: simp only [← @MultilinearMap.mkPiAlgebra_apply ℝ (Fin j) _ ℝ]
state_before: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ (∑ x ∈ Fintype.piFinset fun x => Ico 1 n, (MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun j => r * (a ^ x j * p (x j))) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ((MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun i => ∑ j ∈ Ico 1 n, r * (a ^ j * p j)) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
tactic: simp only [←
        MultilinearMap.map_sum_finset (MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun _ (m : ℕ) =>
          r * (a ^ m * p m)]
state_before: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ((MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun i => ∑ j ∈ Ico 1 n, r * (a ^ j * p j)) =
    r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ∏ i : Fin j, ∑ j ∈ Ico 1 n, r * (a ^ j * p j) = r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
tactic: simp only [MultilinearMap.mkPiAlgebra_apply]
state_before: case a
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
n : ℕ
p : ℕ → ℝ
hp : ∀ (k : ℕ), 0 ≤ p k
r a : ℝ
hr : 0 ≤ r
ha : 0 ≤ a
j : ℕ
a✝ : j ∈ Ico 2 (n + 1)
⊢ ∏ i : Fin j, ∑ j ∈ Ico 1 n, r * (a ^ j * p j) = r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j
state_after: no goals
tactic: simp [prod_const, ← mul_sum, mul_pow]