-- Mathlib/Analysis/Analytic/CPolynomialDef.lean
theorem changeOrigin_eval_of_finite (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) (x y : E) :
    (p.changeOrigin x).sum y = p.sum (x + y)

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
hfkl : ∀ (k l : ℕ), HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)
hfk : ∀ (k : ℕ), HasSum (fun x => f ⟨k, x⟩) ((p.changeOrigin x k) fun x => y)
hf : HasSum f ((p.changeOrigin x).sum y)
⊢ (p.changeOrigin x).sum y = p.sum (x + y)

Tactic:
refine hf.unique (changeOriginIndexEquiv.symm.hasSum_iff.1 ?_)

Result:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
hfkl : ∀ (k l : ℕ), HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)
hfk : ∀ (k : ℕ), HasSum (fun x => f ⟨k, x⟩) ((p.changeOrigin x k) fun x => y)
hf : HasSum f ((p.changeOrigin x).sum y)
⊢ HasSum (f ∘ ⇑changeOriginIndexEquiv.symm) (p.sum (x + y))

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
hfkl : ∀ (k l : ℕ), HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)
k : ℕ
⊢ HasSum (fun x => f ⟨k, x⟩) ((p.changeOrigin x k) fun x => y)

Tactic:
have (m) (hm : m ∉ Finset.range n) : changeOriginSeries p k m (fun _ ↦ x) = 0 := by
  rw [Finset.mem_range, not_lt] at hm
  rw [changeOriginSeries_finite_of_finite _ hn _ (le_add_of_le_right hm),
    ContinuousMultilinearMap.zero_apply]

Result:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
hfkl : ∀ (k l : ℕ), HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)
k : ℕ
this : ∀ m ∉ Finset.range n, ((p.changeOriginSeries k m) fun x_1 => x) = 0
⊢ HasSum (fun x => f ⟨k, x⟩) ((p.changeOrigin x k) fun x => y)

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
k l : ℕ
⊢ HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)

Tactic:
simp_rw [changeOriginSeries, ContinuousMultilinearMap.sum_apply]

Result:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
k l : ℕ
⊢ HasSum (fun x => f ⟨k, ⟨l, x⟩⟩)
    (∑ a : { s // s.card = l }, ((p.changeOriginSeriesTerm k l ↑a ⋯) fun x_1 => x) fun x => y)

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
finsupp : (Function.support f).Finite
hfkl : ∀ (k l : ℕ), HasSum (fun x => f ⟨k, ⟨l, x⟩⟩) (((p.changeOriginSeries k l) fun x_1 => x) fun x => y)
k m : ℕ
hm : n ≤ m
⊢ ((p.changeOriginSeries k m) fun x_1 => x) = 0

Tactic:
rw [changeOriginSeries_finite_of_finite _ hn _ (le_add_of_le_right hm),
  ContinuousMultilinearMap.zero_apply]

Result:
no goals

Proof state:
case hs
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
x y : E
f : (k : ℕ) × (l : ℕ) × { s // s.card = l } → F :=
  fun s => ((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y
⊢ (⋃ i, range (Sigma.mk ↑i)).Finite

Tactic:
exact finite_iUnion fun _ ↦ finite_range _

Result:
no goals