l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem comp_id (p : FormalMultilinearSeries 𝕜 E F) : p.comp (id 𝕜 E) = p := by
  ext1 n
  dsimp [FormalMultilinearSeries.comp]
  rw [Finset.sum_eq_single (Composition.ones n)]
  show compAlongComposition p (id 𝕜 E) (Composition.ones n) = p n
  · ext v
    rw [compAlongComposition_apply]
    apply p.congr (Composition.ones_length n)
    intros
    rw [applyComposition_ones]
    refine' congr_arg v _
    rw [Fin.ext_iff, Fin.coe_castLE, Fin.val_mk]
  show
    ∀ b : Composition n,
      b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0
  · intro b _ hb
    obtain ⟨k, hk, lt_k⟩ : ∃ (k : ℕ), k ∈ Composition.blocks b ∧ 1 < k :=
      Composition.ne_ones_iff.1 hb
    obtain ⟨i, hi⟩ : ∃ (i : Fin b.blocks.length), b.blocks.get i = k :=
      List.get_of_mem hk

    let j : Fin b.length := ⟨i.val, b.blocks_length ▸ i.prop⟩
    have A : 1 < b.blocksFun j := by convert lt_k
    ext v
    rw [compAlongComposition_apply, ContinuousMultilinearMap.zero_apply]
    apply ContinuousMultilinearMap.map_coord_zero _ j
    dsimp [applyComposition]
    rw [id_apply_ne_one _ _ (ne_of_gt A)]
    

Proof state:
case h.h₀.intro.intro.intro.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
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
b : Composition n
a✝ : b ∈ Finset.univ
hb : b ≠ Composition.ones n
k : ℕ
hk : k ∈ b.blocks
lt_k : 1 < k
i : Fin (length b.blocks)
hi : List.get b.blocks i = k
j : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }
A : 1 < Composition.blocksFun b j
v : Fin n → E
⊢ 0 (v ∘ ⇑(Composition.embedding b i)) = 0

Next tactic:
rfl
@[simp]
theorem comp_id (p : FormalMultilinearSeries 𝕜 E F) : p.comp (id 𝕜 E) = p := by
  ext1 n
  dsimp [FormalMultilinearSeries.comp]
  rw [Finset.sum_eq_single (Composition.ones n)]
  show compAlongComposition p (id 𝕜 E) (Composition.ones n) = p n
  · ext v
    rw [compAlongComposition_apply]
    apply p.congr (Composition.ones_length n)
    intros
    rw [applyComposition_ones]
    refine' congr_arg v _
    rw [Fin.ext_iff, Fin.coe_castLE, Fin.val_mk]
  show
    ∀ b : Composition n,
      b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0
  · intro b _ hb
    obtain ⟨k, hk, lt_k⟩ : ∃ (k : ℕ), k ∈ Composition.blocks b ∧ 1 < k :=
      Composition.ne_ones_iff.1 hb
    obtain ⟨i, hi⟩ : ∃ (i : Fin b.blocks.length), b.blocks.get i = k :=
      List.get_of_mem hk

    let j : Fin b.length := ⟨i.val, b.blocks_length ▸ i.prop⟩
    have A : 1 < b.blocksFun j := by convert lt_k
    ext v
    rw [compAlongComposition_apply, ContinuousMultilinearMap.zero_apply]
    apply ContinuousMultilinearMap.map_coord_zero _ j
    dsimp [applyComposition]
    rw [id_apply_ne_one _ _ (ne_of_gt A)]
    rfl
  · 

Proof state:
case h.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
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
⊢ Composition.ones n ∉ Finset.univ → compAlongComposition p (id 𝕜 E) (Composition.ones n) = 0

Next tactic:
simp
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  

Proof state:
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
⊢ FormalMultilinearSeries.comp (id 𝕜 F) p = p

Next tactic:
ext1 n
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  

Proof state:
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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n

Next tactic:
by_cases hn : n = 0
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · 

Proof state:
case pos
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : n = 0
⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n

Next tactic:
rw [hn, h]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    

Proof state:
case pos
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : n = 0
⊢ FormalMultilinearSeries.comp (id 𝕜 F) p 0 = 0

Next tactic:
ext v
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    

Proof state:
case pos.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : n = 0
v : Fin 0 → E
⊢ (FormalMultilinearSeries.comp (id 𝕜 F) p 0) v = 0 v

Next tactic:
rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    

Proof state:
case pos.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : n = 0
v : Fin 0 → E
⊢ (0 fun _i => 0) = 0 v

Next tactic:
rfl
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · 

Proof state:
case neg
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n

Next tactic:
dsimp [FormalMultilinearSeries.comp]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    

Proof state:
case neg
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
⊢ ∑ c : Composition n, compAlongComposition (id 𝕜 F) p c = p n

Next tactic:
have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    

Proof state:
case neg
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ ∑ c : Composition n, compAlongComposition (id 𝕜 F) p c = p n

Next tactic:
rw [Finset.sum_eq_single (Composition.single n n_pos)]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    

Proof state:
case neg
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ ∀ b ∈ Finset.univ, b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ Composition.single n n_pos ∉ Finset.univ → compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = 0

Next tactic:
show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · 

Proof state:
case neg
𝕜 : 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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n

Next tactic:
ext v
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
v : Fin n → E
⊢ (compAlongComposition (id 𝕜 F) p (Composition.single n n_pos)) v = (p n) v

Next tactic:
rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
v : Fin n → E
⊢ applyComposition p (Composition.single n n_pos) v
      { val := 0, isLt := (_ : 0 < Composition.length (Composition.single n n_pos)) } =
    (p n) v

Next tactic:
dsimp [applyComposition]
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
v : Fin n → E
⊢ (p (Composition.blocksFun (Composition.single n n_pos) 0))
      (v ∘ ⇑(Composition.embedding (Composition.single n n_pos) 0)) =
    (p n) v

Next tactic:
refine' p.congr rfl fun i him hin => congr_arg v <| _
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      refine' p.congr rfl fun i him hin => congr_arg v <| _
      

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
v : Fin n → E
i : ℕ
him : i < Composition.blocksFun (Composition.single n n_pos) 0
hin : i < n
⊢ (Composition.embedding (Composition.single n n_pos) 0) { val := i, isLt := him } = { val := i, isLt := hin }

Next tactic:
ext
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      refine' p.congr rfl fun i him hin => congr_arg v <| _
      ext; 

Proof state:
case neg.H.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
v : Fin n → E
i : ℕ
him : i < Composition.blocksFun (Composition.single n n_pos) 0
hin : i < n
⊢ ↑((Composition.embedding (Composition.single n n_pos) 0) { val := i, isLt := him }) = ↑{ val := i, isLt := hin }

Next tactic:
simp
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      refine' p.congr rfl fun i him hin => congr_arg v <| _
      ext; simp
    

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ ∀ b ∈ Finset.univ, b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ Composition.single n n_pos ∉ Finset.univ → compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = 0

Next tactic:
show
      ∀ b : Composition n,
        b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      refine' p.congr rfl fun i him hin => congr_arg v <| _
      ext; simp
    show
      ∀ b : Composition n,
        b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0
    · 

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
⊢ ∀ b ∈ Finset.univ, b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0

Next tactic:
intro b _ hb
@[simp]
theorem id_comp (p : FormalMultilinearSeries 𝕜 E F) (h : p 0 = 0) : (id 𝕜 F).comp p = p := by
  ext1 n
  by_cases hn : n = 0
  · rw [hn, h]
    ext v
    rw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]
    rfl
  · dsimp [FormalMultilinearSeries.comp]
    have n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn
    rw [Finset.sum_eq_single (Composition.single n n_pos)]
    show compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n
    · ext v
      rw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]
      dsimp [applyComposition]
      refine' p.congr rfl fun i him hin => congr_arg v <| _
      ext; simp
    show
      ∀ b : Composition n,
        b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0
    · intro b _ hb
      

Proof state:
case neg.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
p : FormalMultilinearSeries 𝕜 E F
h : p 0 = 0
n : ℕ
hn : ¬n = 0
n_pos : 0 < n
b : Composition n
a✝ : b ∈ Finset.univ
hb : b ≠ Composition.single n n_pos
⊢ compAlongComposition (id 𝕜 F) p b = 0

Next tactic:
have A : b.length ≠ 1 := by simpa [Composition.eq_single_iff_length] using hb