l3lab/ntp-mathlib huggingface dataset:
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        

Proof state:
case h
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
j : ι
⊢ piecewise s m₂ m₁ j = Function.update (piecewise s m₂ m₁) i (m₁ i) j

Next tactic:
by_cases h : j = i
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · 

Proof state:
case pos
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
j : ι
h : j = i
⊢ piecewise s m₂ m₁ j = Function.update (piecewise s m₂ m₁) i (m₁ i) j

Next tactic:
rw [h]
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          

Proof state:
case pos
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
j : ι
h : j = i
⊢ piecewise s m₂ m₁ i = Function.update (piecewise s m₂ m₁) i (m₁ i) i

Next tactic:
simp [his]
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · 

Proof state:
case neg
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
j : ι
h : ¬j = i
⊢ piecewise s m₂ m₁ j = Function.update (piecewise s m₂ m₁) i (m₁ i) j

Next tactic:
simp [h]
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · simp [h]
      

Proof state:
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
B : piecewise s m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₁ i)
⊢ ‖f (piecewise s m₂ m₁) - f (piecewise (insert i s) m₂ m₁)‖ ≤
    C * ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖

Next tactic:
rw [B, A, ← f.map_sub]
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · simp [h]
      rw [B, A, ← f.map_sub]
      

Proof state:
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
B : piecewise s m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₁ i)
⊢ ‖f (Function.update (piecewise s m₂ m₁) i (m₁ i - m₂ i))‖ ≤
    C * ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖

Next tactic:
apply le_trans (H _)
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · simp [h]
      rw [B, A, ← f.map_sub]
      apply le_trans (H _)
      

Proof state:
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
B : piecewise s m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₁ i)
⊢ C * ∏ i_1 : ι, ‖Function.update (piecewise s m₂ m₁) i (m₁ i - m₂ i) i_1‖ ≤
    C * ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖

Next tactic:
gcongr with j
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · simp [h]
      rw [B, A, ← f.map_sub]
      apply le_trans (H _)
      gcongr with j
      · 

Proof state:
case h.h0
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
B : piecewise s m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₁ i)
⊢ ∀ i_1 ∈ univ, 0 ≤ ‖Function.update (piecewise s m₂ m₁) i (m₁ i - m₂ i) i_1‖

Next tactic:
exact fun j _ => norm_nonneg _
/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
  have A :
    ∀ s : Finset ι,
      ‖f m₁ - f (s.piecewise m₂ m₁)‖ ≤
        C * ∑ i in s, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
    intro s
    induction' s using Finset.induction with i s his Hrec
    · simp
    have I :
      ‖f (s.piecewise m₂ m₁) - f ((insert i s).piecewise m₂ m₁)‖ ≤
        C * ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖ := by
      have A : (insert i s).piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₂ i) :=
        s.piecewise_insert _ _ _
      have B : s.piecewise m₂ m₁ = Function.update (s.piecewise m₂ m₁) i (m₁ i) := by
        ext j
        by_cases h : j = i
        · rw [h]
          simp [his]
        · simp [h]
      rw [B, A, ← f.map_sub]
      apply le_trans (H _)
      gcongr with j
      · exact fun j _ => norm_nonneg _
      

Proof state:
case h.h1
𝕜 : Type u
ι : Type v
ι' : Type v'
n : ℕ
E : ι → Type wE
E₁ : ι → Type wE₁
E' : ι' → Type wE'
Ei : Fin (Nat.succ n) → Type wEi
G : Type wG
G' : Type wG'
inst✝¹⁵ : Fintype ι
inst✝¹⁴ : Fintype ι'
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : (i : ι) → NormedAddCommGroup (E i)
inst✝¹¹ : (i : ι) → NormedSpace 𝕜 (E i)
inst✝¹⁰ : (i : ι) → NormedAddCommGroup (E₁ i)
inst✝⁹ : (i : ι) → NormedSpace 𝕜 (E₁ i)
inst✝⁸ : (i : ι') → NormedAddCommGroup (E' i)
inst✝⁷ : (i : ι') → NormedSpace 𝕜 (E' i)
inst✝⁶ : (i : Fin (Nat.succ n)) → NormedAddCommGroup (Ei i)
inst✝⁵ : (i : Fin (Nat.succ n)) → NormedSpace 𝕜 (Ei i)
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
inst✝² : NormedAddCommGroup G'
inst✝¹ : NormedSpace 𝕜 G'
f : MultilinearMap 𝕜 E G
inst✝ : DecidableEq ι
C : ℝ
hC : 0 ≤ C
H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖
m₁ m₂ : (i : ι) → E i
i : ι
s : Finset ι
his : i ∉ s
Hrec : ‖f m₁ - f (piecewise s m₂ m₁)‖ ≤ C * ∑ i in s, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖
A : piecewise (insert i s) m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₂ i)
B : piecewise s m₂ m₁ = Function.update (piecewise s m₂ m₁) i (m₁ i)
j : ι
a✝ : j ∈ univ
⊢ ‖Function.update (piecewise s m₂ m₁) i (m₁ i - m₂ i) j‖ ≤ if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖

Next tactic:
by_cases h : j = i