Theorem: FormalMultilinearSeries.comp_partialSum
File: Mathlib/Analysis/Analytic/Composition.lean

tactic: suffices H :
  (∑ n ∈ Finset.range N,
      ∑ r ∈ Fintype.piFinset fun i : Fin n => Finset.Ico 1 N,
        q n fun i : Fin n => p (r i) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, q.compAlongComposition p i.2 fun _j => z by
  simpa only [FormalMultilinearSeries.partialSum, ContinuousMultilinearMap.map_sum_finset] using H
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ q.partialSum N (∑ i ∈ Finset.Ico 1 N, (p i) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ (∑ n ∈ Finset.range N, ∑ r ∈ Fintype.piFinset fun i => Finset.Ico 1 N, (q n) fun i => (p (r i)) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z

tactic: rw [Finset.range_eq_Ico, Finset.sum_sigma']
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ (∑ n ∈ Finset.range N, ∑ r ∈ Fintype.piFinset fun i => Finset.Ico 1 N, (q n) fun i => (p (r i)) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ (∑ x ∈ (Finset.Ico 0 N).sigma fun n => Fintype.piFinset fun i => Finset.Ico 1 N,
      (q x.fst) fun i => (p (x.snd i)) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z

tactic: apply compChangeOfVariables_sum 0 N N
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ (∑ x ∈ (Finset.Ico 0 N).sigma fun n => Fintype.piFinset fun i => Finset.Ico 1 N,
      (q x.fst) fun i => (p (x.snd i)) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z
state_after: case h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 0 N N),
    ((q e.fst) fun i => (p (e.snd i)) fun _j => z) =
      (q.compAlongComposition p (compChangeOfVariables 0 N N e he).snd) fun _j => z

tactic: rintro ⟨k, blocks_fun⟩ H
state_before: case h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 0 N N),
    ((q e.fst) fun i => (p (e.snd i)) fun _j => z) =
      (q.compAlongComposition p (compChangeOfVariables 0 N N e he).snd) fun _j => z
state_after: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
⊢ ((q ⟨k, blocks_fun⟩.fst) fun i => (p (⟨k, blocks_fun⟩.snd i)) fun _j => z) =
    (q.compAlongComposition p (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd) fun _j => z

tactic: apply congr _ (compChangeOfVariables_length 0 N N H).symm
state_before: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
⊢ ((q ⟨k, blocks_fun⟩.fst) fun i => (p (⟨k, blocks_fun⟩.snd i)) fun _j => z) =
    (q.compAlongComposition p (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd) fun _j => z
state_after: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
⊢ ∀ (i : ℕ) (him : i < ⟨k, blocks_fun⟩.fst) (hin : i < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length),
    ((p (⟨k, blocks_fun⟩.snd ⟨i, him⟩)) fun _j => z) =
      p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i, hin⟩

tactic: intros
state_before: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
⊢ ∀ (i : ℕ) (him : i < ⟨k, blocks_fun⟩.fst) (hin : i < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length),
    ((p (⟨k, blocks_fun⟩.snd ⟨i, him⟩)) fun _j => z) =
      p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i, hin⟩
state_after: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
i✝ : ℕ
him✝ : i✝ < ⟨k, blocks_fun⟩.fst
hin✝ : i✝ < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length
⊢ ((p (⟨k, blocks_fun⟩.snd ⟨i✝, him✝⟩)) fun _j => z) =
    p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i✝, hin✝⟩

tactic: rw [← compChangeOfVariables_blocksFun 0 N N H]
state_before: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
i✝ : ℕ
him✝ : i✝ < ⟨k, blocks_fun⟩.fst
hin✝ : i✝ < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length
⊢ ((p (⟨k, blocks_fun⟩.snd ⟨i✝, him✝⟩)) fun _j => z) =
    p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i✝, hin✝⟩
state_after: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
i✝ : ℕ
him✝ : i✝ < ⟨k, blocks_fun⟩.fst
hin✝ : i✝ < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length
⊢ ((p ((compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑⟨i✝, him✝⟩, ⋯⟩)) fun _j => z) =
    p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i✝, hin✝⟩

tactic: rfl
state_before: case h.mk
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
k : ℕ
blocks_fun : Fin k → ℕ
H : ⟨k, blocks_fun⟩ ∈ compPartialSumSource 0 N N
i✝ : ℕ
him✝ : i✝ < ⟨k, blocks_fun⟩.fst
hin✝ : i✝ < (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.length
⊢ ((p ((compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd.blocksFun ⟨↑⟨i✝, him✝⟩, ⋯⟩)) fun _j => z) =
    p.applyComposition (compChangeOfVariables 0 N N ⟨k, blocks_fun⟩ H).snd (fun _j => z) ⟨i✝, hin✝⟩
state_after: no goals

tactic: simpa only [FormalMultilinearSeries.partialSum, ContinuousMultilinearMap.map_sum_finset] using H
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H✝ : Type u_5
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup H✝
inst✝ : NormedSpace 𝕜 H✝
q : FormalMultilinearSeries 𝕜 F G
p : FormalMultilinearSeries 𝕜 E F
N : ℕ
z : E
H :
  (∑ n ∈ Finset.range N, ∑ r ∈ Fintype.piFinset fun i => Finset.Ico 1 N, (q n) fun i => (p (r i)) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z
⊢ q.partialSum N (∑ i ∈ Finset.Ico 1 N, (p i) fun _j => z) =
    ∑ i ∈ compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z
state_after: no goals