awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,
    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - HSMul.hSMul (β := F) x_1 ((f' x : (a : E) → F) w : F) -
            HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2)
              ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2 / 2)
            ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) x_1 2‖
have rcases : ∀ (δ : ℝ) (δpos : δ > 0)
  (sδ :
    Metric.ball x δ ∩ interior s ⊆
      {x_1 : E |
        (fun (x_2 : E) ↦
            ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
              ε * ‖x_2 - x‖)
          x_1}),
  ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,
    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - HSMul.hSMul (β := F) x_1 ((f' x : (a : E) → F) w : F) -
            HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2)
              ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2 / 2)
            ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) x_1 2‖
Tactic: rcases Metric.mem_nhdsWithin_iff.1 (hx εpos) with ⟨δ, δpos, sδ⟩
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
⊢ ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
have this : Tendsto (fun (h : ℝ) ↦ h * (‖v‖ + ‖w‖)) (𝓝[>] 0) (𝓝 (0 * (‖v‖ + ‖w‖)))
Tactic: have : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[>] (0 : ℝ)) (𝓝 (0 * (‖v‖ + ‖w‖))) :=
      (continuous_id.mul continuous_const).continuousWithinAt
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
this : Tendsto (fun (h : ℝ) ↦ h * (‖v‖ + ‖w‖)) (𝓝[>] 0) (𝓝 (0 * (‖v‖ + ‖w‖)))
⊢ ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
have apply : δ > 0 * (‖v‖ + ‖w‖)
Tactic: apply (tendsto_order.1 this).2 δ
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,
    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - HSMul.hSMul (β := F) x_1 ((f' x : (a : E) → F) w : F) -
            HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2)
              ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2 / 2)
            ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) x_1 2‖
have E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
Tactic: have E1 : ∀ᶠ h in 𝓝[>] (0 : ℝ), h * (‖v‖ + ‖w‖) < δ := by
    have : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[>] (0 : ℝ)) (𝓝 (0 * (‖v‖ + ‖w‖))) :=
      (continuous_id.mul continuous_const).continuousWithinAt
    apply (tendsto_order.1 this).2 δ
    simpa only [zero_mul] using δpos
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,
    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - HSMul.hSMul (β := F) x_1 ((f' x : (a : E) → F) w : F) -
            HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2)
              ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2 / 2)
            ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) x_1 2‖
have E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
Tactic: have E2 : ∀ᶠ h in 𝓝[>] (0 : ℝ), (h : ℝ) < 1 :=
    mem_nhdsWithin_of_mem_nhds <| Iio_mem_nhds zero_lt_one
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,
    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - HSMul.hSMul (β := F) x_1 ((f' x : (a : E) → F) w : F) -
            HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2)
              ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) x_1 2 / 2)
            ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) x_1 2‖
have h : ∀ (h : ℝ) (hδ : h * (‖v‖ + ‖w‖) < δ) (h_lt_1 : h < 1) (hpos : Membership.mem (γ := Set ℝ) (Ioi 0) h),
  ‖f (x + h • v + h • w) - f (x + h • v) - HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
            ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
        HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2 / 2)
          ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) h 2‖
Tactic: filter_upwards [E1, E2, self_mem_nhdsWithin] with h hδ h_lt_1 hpos
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : Membership.mem (γ := Set ℝ) (Ioi 0) h
⊢ ‖f (x + h • v + h • w) - f (x + h • v) - HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
            ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
        HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2 / 2)
          ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) h 2‖
have hpos₁ : 0 < h
Tactic: replace hpos : 0 < h := hpos
Cleared hypotheses: hpos
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
t : ℝ
ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t
⊢ x + h • v + (t * h) • w ∈ interior s
have this : x + h • v ∈ interior s
Tactic: have : x + h • v ∈ interior s := s_conv.add_smul_mem_interior xs hv ⟨hpos, h_lt_1.le⟩
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
t : ℝ
ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t
this : x + h • v ∈ interior s
⊢ x + h • v + (t * h) • w ∈ interior s
have rw : x + h • v + t • h • w ∈ interior s
Tactic: rw [← smul_smul]
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
t : ℝ
ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t
this : x + h • v ∈ interior s
⊢ x + h • v + t • h • w ∈ interior s
have apply : x + h • v + h • w ∈ interior s
Tactic: apply s_conv.interior.add_smul_mem this _ ht
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
t : ℝ
ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t
this : x + h • v ∈ interior s
⊢ x + h • v + h • w ∈ interior s
have rw : ∀ (hw : x + (v + w) ∈ interior s) (ε : ℝ) (εpos : 0 < ε) (δ : ℝ) (δpos : δ > 0)
  (sδ :
    Metric.ball x δ ∩ interior s ⊆
      {x_1 : E |
        (fun (x_2 : E) ↦
            ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
              ε * ‖x_2 - x‖)
          x_1})
  (E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ) (E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1) (h : ℝ) (hδ : h * (‖v‖ + ‖w‖) < δ)
  (h_lt_1 : h < 1) (hpos : 0 < h) (t : ℝ) (ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t)
  (this : x + h • v ∈ interior s), x + h • v + h • w ∈ interior s
Tactic: rw [add_assoc] at hw
Cleared hypotheses: hw, ε, εpos, δ, δpos, sδ, E1, E2, h, hδ, h_lt_1, hpos, t, ht, this
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (goal)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + (v + w) ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
t : ℝ
ht : Membership.mem (γ := Set ℝ) (Icc 0 1) t
this : x + h • v ∈ interior s
⊢ x + h • v + h • w ∈ interior s
have h₁ : x + h • v + h • w = x + h • (v + w)
Tactic: convert! s_conv.add_smul_mem_interior xs hw ⟨hpos, h_lt_1.le⟩ using 1
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
⊢ ‖f (x + h • v + h • w) - f (x + h • v) - HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
            ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
        HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2 / 2)
          ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) h 2‖
have xt_mem : ∀ (t : ℝ), Membership.mem (γ := Set ℝ) (Icc 0 1) t → x + h • v + (t * h) • w ∈ interior s
Tactic: have xt_mem : ∀ t ∈ Icc (0 : ℝ) 1, x + h • v + (t * h) • w ∈ interior s := by
    intro t ht
    have : x + h • v ∈ interior s := s_conv.add_smul_mem_interior xs hv ⟨hpos, h_lt_1.le⟩
    rw [← smul_smul]
    apply s_conv.interior.add_smul_mem this _ ht
    rw [add_assoc] at hw
    convert! s_conv.add_smul_mem_interior xs hw ⟨hpos, h_lt_1.le⟩ using 1
    module
-- Lean 4 proof step from Mathlib.Analysis.Calculus.FDeriv.Symmetric (hypothesis)
Goal:
E : Type u_1
F : Type u_2
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : NormedAddCommGroup F
inst_3 : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x
x : E
xs : x ∈ s
hx :
  ∀ ⦃c : ℝ⦄,
    0 < c →
      ∀ᶠ (x_1 : E) in 𝓝[interior s] x,
        ‖HSub.hSub (β := E →L[ℝ] F) (f' x_1 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_1 - x) : E →L[ℝ] F)‖ ≤ c * ‖x_1 - x‖
v w : E
hv : x + v ∈ interior s
hw : x + v + w ∈ interior s
ε : ℝ
εpos : 0 < ε
δ : ℝ
δpos : δ > 0
sδ :
  Metric.ball x δ ∩ interior s ⊆
    {x_1 : E |
      (fun (x_2 : E) ↦
          ‖HSub.hSub (β := E →L[ℝ] F) (f' x_2 - f' x) ((f'' : (a : E) → E →L[ℝ] F) (x_2 - x) : E →L[ℝ] F)‖ ≤
            ε * ‖x_2 - x‖)
        x_1}
E1 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h * (‖v‖ + ‖w‖) < δ
E2 : ∀ᶠ (h : ℝ) in 𝓝[>] 0, h < 1
h : ℝ
hδ : h * (‖v‖ + ‖w‖) < δ
h_lt_1 : h < 1
hpos : 0 < h
xt_mem : ∀ (t : ℝ), Membership.mem (γ := Set ℝ) (Icc 0 1) t → x + h • v + (t * h) • w ∈ interior s
g : (t : ℝ) → F :=
  fun (t : ℝ) ↦
    f (x + h • v + (t * h) • w) - HSMul.hSMul (β := F) (t * h) ((f' x : (a : E) → F) w : F) -
        HSMul.hSMul (β := F) (t * HPow.hPow (β := ℕ) h 2)
          ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
      HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) (t * h) 2 / 2)
        ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)
⊢ ‖f (x + h • v + h • w) - f (x + h • v) - HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F) -
          HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
            ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
        HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2 / 2)
          ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)‖ ≤
    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * HPow.hPow (β := ℕ) h 2‖
have hg' : let g' : (t : ℝ) → F := fun (t : ℝ) ↦
  HSub.hSub (α := F) ((f' (x + h • v + (t * h) • w) : (a : E) → F) (h • w) : F)
        (HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F)) -
      HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
        ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
    HSMul.hSMul (β := F) (t * HPow.hPow (β := ℕ) h 2)
      ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F);
g' = fun (t : ℝ) ↦
  HSub.hSub (α := F) ((f' (x + h • v + (t * h) • w) : (a : E) → F) (h • w) : F)
        (HSMul.hSMul (β := F) h ((f' x : (a : E) → F) w : F)) -
      HSMul.hSMul (β := F) (HPow.hPow (β := ℕ) h 2)
        ((((f'' : (a : E) → E →L[ℝ] F) v : E →L[ℝ] F) : (a : E) → F) w : F) -
    HSMul.hSMul (β := F) (t * HPow.hPow (β := ℕ) h 2)
      ((((f'' : (a : E) → E →L[ℝ] F) w : E →L[ℝ] F) : (a : E) → F) w : F)
Tactic: set g' := fun t =>
    f' (x + h • v + (t * h) • w) (h • w) - h • f' x w - h ^ 2 • f'' v w - (t * h ^ 2) • f'' w w
    with hg'