-- Mathlib/Analysis/Analytic/ChangeOrigin.lean
lemma changeOriginSeriesTerm_changeOriginIndexEquiv_symm (n t) :
    let s := changeOriginIndexEquiv.symm ⟨n, t⟩
    p.changeOriginSeriesTerm s.1 s.2.1 s.2.2 s.2.2.2 (fun _ ↦ x) (fun _ ↦ y) =
    p n (t.piecewise (fun _ ↦ x) fun _ ↦ 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
x y : E
n : ℕ
t : Finset (Fin n)
⊢ ∀ (m : ℕ) (hm : n = m),
    (p n) (t.piecewise (fun x_1 => x) fun x => y) =
      (p m) ((Finset.map (finCongr hm).toEmbedding t).piecewise (fun x_1 => x) fun x => y)

Tactic:
rintro m rfl

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
x y : E
n : ℕ
t : Finset (Fin n)
⊢ (p n) (t.piecewise (fun x_1 => x) fun x => y) =
    (p n) ((Finset.map (finCongr ⋯).toEmbedding t).piecewise (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
x y : E
n : ℕ
t : Finset (Fin n)
⊢ let s := changeOriginIndexEquiv.symm ⟨n, t⟩;
  (((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y) =
    (p n) (t.piecewise (fun x_1 => x) fun x => y)

Tactic:
have : ∀ (m) (hm : n = m), p n (t.piecewise (fun _ ↦ x) fun _ ↦ y) =
    p m ((t.map (finCongr hm).toEmbedding).piecewise (fun _ ↦ x) fun _ ↦ y) := by
  rintro m rfl
  simp (config := { unfoldPartialApp := true }) [Finset.piecewise]

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
x y : E
n : ℕ
t : Finset (Fin n)
this :
  ∀ (m : ℕ) (hm : n = m),
    (p n) (t.piecewise (fun x_1 => x) fun x => y) =
      (p m) ((Finset.map (finCongr hm).toEmbedding t).piecewise (fun x_1 => x) fun x => y)
⊢ let s := changeOriginIndexEquiv.symm ⟨n, t⟩;
  (((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y) =
    (p n) (t.piecewise (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
x y : E
n : ℕ
t : Finset (Fin n)
this :
  ∀ (m : ℕ) (hm : n = m),
    (p n) (t.piecewise (fun x_1 => x) fun x => y) =
      (p m) ((Finset.map (finCongr hm).toEmbedding t).piecewise (fun x_1 => x) fun x => y)
⊢ let s := changeOriginIndexEquiv.symm ⟨n, t⟩;
  (((p.changeOriginSeriesTerm s.fst s.snd.fst ↑s.snd.snd ⋯) fun x_1 => x) fun x => y) =
    (p n) (t.piecewise (fun x_1 => x) fun x => y)

Tactic:
simp_rw [changeOriginSeriesTerm_apply, eq_comm]

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
x y : E
n : ℕ
t : Finset (Fin n)
this :
  ∀ (m : ℕ) (hm : n = m),
    (p n) (t.piecewise (fun x_1 => x) fun x => y) =
      (p m) ((Finset.map (finCongr hm).toEmbedding t).piecewise (fun x_1 => x) fun x => y)
⊢ (p n) (t.piecewise (fun x_1 => x) fun x => y) =
    (p ((changeOriginIndexEquiv.symm ⟨n, t⟩).fst + (changeOriginIndexEquiv.symm ⟨n, t⟩).snd.fst))
      ((↑(changeOriginIndexEquiv.symm ⟨n, t⟩).snd.snd).piecewise (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
x y : E
n : ℕ
t : Finset (Fin n)
⊢ (p n) (t.piecewise (fun x_1 => x) fun x => y) =
    (p n) ((Finset.map (finCongr ⋯).toEmbedding t).piecewise (fun x_1 => x) fun x => y)

Tactic:
simp (config := { unfoldPartialApp := true }) [Finset.piecewise]

Result:
no goals

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
x y : E
n : ℕ
t : Finset (Fin n)
this :
  ∀ (m : ℕ) (hm : n = m),
    (p n) (t.piecewise (fun x_1 => x) fun x => y) =
      (p m) ((Finset.map (finCongr hm).toEmbedding t).piecewise (fun x_1 => x) fun x => y)
⊢ (p n) (t.piecewise (fun x_1 => x) fun x => y) =
    (p ((changeOriginIndexEquiv.symm ⟨n, t⟩).fst + (changeOriginIndexEquiv.symm ⟨n, t⟩).snd.fst))
      ((↑(changeOriginIndexEquiv.symm ⟨n, t⟩).snd.snd).piecewise (fun x_1 => x) fun x => y)

Tactic:
apply this

Result:
no goals