awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
⊢ Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[<] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
have hgf : ∀ᶠ (b : ℝ) in 𝓝[<] x, ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x) ≤ (f b - f x) / (b - x)
Tactic: apply tendsto_of_tendsto_of_tendsto_of_le_of_le' hx.1 this
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
hgf : ∀ᶠ (b : ℝ) in 𝓝[<] x, ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x) ≤ (f b - f x) / (b - x)
⊢ Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[<] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
have hfh : ∀ᶠ (b : ℝ) in 𝓝[<] x,
  (f b - f x) / (b - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (b + -1 * HPow.hPow (β := ℕ) (b - x) 2) - f x) / (b - x)
Tactic: apply tendsto_of_tendsto_of_tendsto_of_le_of_le' hx.1 this
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
⊢ ∀ᶠ (b : ℝ) in 𝓝[<] x, ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x) ≤ (f b - f x) / (b - x)
have h : ∀ a ∈ Iio x, ((↑hf.stieltjesFunction : ℝ → ℝ) a - f x) / (a - x) ≤ (f a - f x) / (a - x)
Tactic: filter_upwards [self_mem_nhdsWithin]
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (hypothesis)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y ∈ Iio x
⊢ ((↑hf.stieltjesFunction : ℝ → ℝ) y - f x) / (y - x) ≤ (f y - f x) / (y - x)
have hy₁ : y - x < 0
Tactic: rw [mem_Iio, ← sub_neg] at hy
Cleared hypotheses: hy
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y - x < 0
⊢ ((↑hf.stieltjesFunction : ℝ → ℝ) y - f x) / (y - x) ≤ (f y - f x) / (y - x)
have h : f y - f x ≤ (↑hf.stieltjesFunction : ℝ → ℝ) y - f x
Tactic: apply div_le_div_of_nonpos_of_le hy.le
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
⊢ ∀ᶠ (b : ℝ) in 𝓝[<] x,
    (f b - f x) / (b - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (b + -1 * HPow.hPow (β := ℕ) (b - x) 2) - f x) / (b - x)
have h : ∀ a ∈ Iio x,
  (f a - f x) / (a - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (a + -1 * HPow.hPow (β := ℕ) (a - x) 2) - f x) / (a - x)
Tactic: filter_upwards [self_mem_nhdsWithin]
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (hypothesis)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y ∈ Iio x
⊢ (f y - f x) / (y - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x)
have hy₁ : y - x < 0
Tactic: rw [mem_Iio, ← sub_neg] at hy
Cleared hypotheses: hy
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (hypothesis)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y - x < 0
⊢ (f y - f x) / (y - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x)
have this₁ : 0 < HPow.hPow (β := ℕ) (y - x) 2
Tactic: have : 0 < (y - x) ^ 2 := sq_pos_of_neg hy
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this_1 :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y - x < 0
this : 0 < HPow.hPow (β := ℕ) (y - x) 2
⊢ (f y - f x) / (y - x) ≤ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x)
have h : (↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x ≤ f y - f x
Tactic: apply div_le_div_of_nonpos_of_le hy.le
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
this_1 :
  Tendsto (fun (y : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) (y + -1 * HPow.hPow (β := ℕ) (y - x) 2) - f x) / (y - x))
    (𝓝[<] x) (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
y : ℝ
hy : y - x < 0
this : 0 < HPow.hPow (β := ℕ) (y - x) 2
⊢ y + -1 * HPow.hPow (β := ℕ) (y - x) 2 < y
have linarith : y ≤ y + -1 * HPow.hPow (β := ℕ) (y - x) 2 →
  0 - HPow.hPow (β := ℕ) (y - x) 2 + (y - (y + -1 * HPow.hPow (β := ℕ) (y - x) 2)) = 0
Tactic: linarith
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (hypothesis)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
⊢ HasDerivAt f (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal x
have L2 : Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[<] x)
  (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
Tactic: have L2 : Tendsto (fun y => (f y - f x) / (y - x)) (𝓝[<] x)
      (𝓝 (rnDeriv hf.stieltjesFunction.measure volume x).toReal) := by
    -- limit of a helper function, with a small shift compared to `g`
    have : Tendsto (fun y => (hf.stieltjesFunction (y + -1 * (y - x) ^ 2) - f x) / (y - x)) (𝓝[<] x)
        (𝓝 (rnDeriv hf.stieltjesFunction.measure volume x).toReal) := by
      apply tendsto_apply_add_mul_sq_div_sub (nhdsLT_le_nhdsNE x) hx.1
      apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within
      · apply Tendsto.mono_left _ nhdsWithin_le_nhds
        have : Tendsto (fun y : ℝ => y + -↑1 * (y - x) ^ 2) (𝓝 x) (𝓝 (x + -↑1 * (x - x) ^ 2)) :=
          tendsto_id.add (((tendsto_id.sub_const x).pow 2).const_mul (-1))
        simpa using this
      · filter_upwards [Ioo_mem_nhdsLT <| show x - 1 < x by simp]
        rintro y hy
        rw [mem_Ioo] at hy
        rw [mem_Iio]
        nlinarith
    -- apply the sandwiching argument, with `g` and the helper function
    apply tendsto_of_tendsto_of_tendsto_of_le_of_le' hx.1 this
    · filter_upwards [self_mem_nhdsWithin]
      rintro y hy
      rw [mem_Iio, ← sub_neg] at hy
      apply div_le_div_of_nonpos_of_le hy.le
      exact (sub_le_sub_iff_right _).2 (hf.le_rightLim (le_refl _))
    · filter_upwards [self_mem_nhdsWithin]
      rintro y hy
      rw [mem_Iio, ← sub_neg] at hy
      have : 0 < (y - x) ^ 2 := sq_pos_of_neg hy
      apply div_le_div_of_nonpos_of_le hy.le
      exact (sub_le_sub_iff_right _).2 (hf.rightLim_le (by linarith))
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
x : ℝ
hx :
  Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[<] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
    Tendsto (fun (b : ℝ) ↦ ((↑hf.stieltjesFunction : ℝ → ℝ) b - f x) / (b - x)) (𝓝[>] x)
      (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
h'x : ¬¬ContinuousAt f x
A : (↑hf.stieltjesFunction : ℝ → ℝ) x = f x
L1 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
L2 :
  Tendsto (fun (y : ℝ) ↦ (f y - f x) / (y - x)) (𝓝[<] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
⊢ HasDerivAt f (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal x
have h : Tendsto (fun (b : ℝ) ↦ (f b - f x) / (b - x)) (𝓝[<] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal) ∧
  Tendsto (fun (b : ℝ) ↦ (f b - f x) / (b - x)) (𝓝[>] x)
    (𝓝 (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal)
Tactic: rw [hasDerivAt_iff_tendsto_slope, slope_fun_def_field, ← nhdsLT_sup_nhdsGT, tendsto_sup]
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
⊢ ∀ᵐ (x : ℝ), DifferentiableAt ℝ f x
have h : ∀ (a : ℝ),
  Membership.mem (γ := Set ℝ)
    {x : ℝ |
      Membership.mem (γ := Set ℝ)
          {x : ℝ |
            (fun (x : ℝ) ↦
                HasDerivAt f
                  (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume x).toReal
                  x)
              x}
          x →
        Membership.mem (γ := Set ℝ) {x : ℝ | (fun (x : ℝ) ↦ DifferentiableAt ℝ f x) x} x}
    a
Tactic: filter_upwards [hf.ae_hasDerivAt] with x hx using hx.differentiableAt
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
hf : Monotone f
h :
  ∀ (a : ℝ),
    Membership.mem (γ := Set ℝ)
      {x : ℝ |
        Membership.mem (γ := Set ℝ)
            {x : ℝ |
              (fun (x : ℝ) ↦
                  HasDerivAt f
                    (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume
                        x).toReal
                    x)
                x}
            x →
          Membership.mem (γ := Set ℝ) {x : ℝ | (fun (x : ℝ) ↦ DifferentiableAt ℝ f x) x} x}
      a
⊢ ∀ᵐ (x : ℝ), DifferentiableAt ℝ f x
have h₁ : ∀ (a : ℝ),
  HasDerivAt f (rnDeriv (m := Real.measurableSpace) (StieltjesFunction.measure hf.stieltjesFunction) volume a).toReal
      a →
    DifferentiableAt ℝ f a
Tactic: filter_upwards [hf.ae_hasDerivAt] with x hx using hx.differentiableAt
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
⊢ ∀ᵐ (x : ℝ), x ∈ s → DifferentiableWithinAt ℝ f s x
have h : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ), x ∈ s ∩ Ioo a b → DifferentiableWithinAt ℝ f s x
Tactic: apply ae_of_mem_of_ae_of_mem_inter_Ioo
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
a b : ℝ
as : a ∈ s
bs : b ∈ s
h : a < b
⊢ ∀ᵐ (x : ℝ), x ∈ s ∩ Ioo a b → DifferentiableWithinAt ℝ f s x
have h : ∀ (g : ℝ → ℝ) (hg : Monotone g) (gf : EqOn f g (s ∩ Icc a b)),
  ∀ᵐ (x : ℝ), x ∈ s ∩ Ioo a b → DifferentiableWithinAt ℝ f s x
Tactic: obtain ⟨g, hg, gf⟩ : ∃ g : ℝ → ℝ, Monotone g ∧ EqOn f g (s ∩ Icc a b) :=
    (hf.mono inter_subset_left).exists_monotone_extension
      (hf.map_bddBelow inter_subset_left ⟨a, fun x hx => hx.2.1, as⟩)
      (hf.map_bddAbove inter_subset_left ⟨b, fun x hx => hx.2.2, bs⟩)
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
a b : ℝ
as : a ∈ s
bs : b ∈ s
h : a < b
g : ℝ → ℝ
hg : Monotone g
gf : EqOn f g (s ∩ Icc a b)
⊢ ∀ᵐ (x : ℝ), x ∈ s ∩ Ioo a b → DifferentiableWithinAt ℝ f s x
have h : ∀ (x : ℝ) (hx : DifferentiableAt ℝ g x), x ∈ s ∩ Ioo a b → DifferentiableWithinAt ℝ f s x
Tactic: filter_upwards [hg.ae_differentiableAt] with x hx
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
a b : ℝ
as : a ∈ s
bs : b ∈ s
h : a < b
g : ℝ → ℝ
hg : Monotone g
gf : EqOn f g (s ∩ Icc a b)
x : ℝ
hx : DifferentiableAt ℝ g x
h'x : x ∈ s ∩ Ioo a b
⊢ DifferentiableWithinAt ℝ f s x
have apply : f =ᶠ[𝓝[s] x] g
Tactic: apply hx.differentiableWithinAt.congr_of_eventuallyEq _ (gf ⟨h'x.1, h'x.2.1.le, h'x.2.2.le⟩)
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (hypothesis)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
a b : ℝ
as : a ∈ s
bs : b ∈ s
h : a < b
g : ℝ → ℝ
hg : Monotone g
gf : EqOn f g (s ∩ Icc a b)
x : ℝ
hx : DifferentiableAt ℝ g x
h'x : x ∈ s ∩ Ioo a b
⊢ f =ᶠ[𝓝[s] x] g
have this : Ioo a b ∈ 𝓝[s] x
Tactic: have : Ioo a b ∈ 𝓝[s] x := nhdsWithin_le_nhds (Ioo_mem_nhds h'x.2.1 h'x.2.2)
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
a b : ℝ
as : a ∈ s
bs : b ∈ s
h : a < b
g : ℝ → ℝ
hg : Monotone g
gf : EqOn f g (s ∩ Icc a b)
x : ℝ
hx : DifferentiableAt ℝ g x
h'x : x ∈ s ∩ Ioo a b
this : Ioo a b ∈ 𝓝[s] x
⊢ f =ᶠ[𝓝[s] x] g
have h : ∀ (y : ℝ) (hy : y ∈ s) (h'y : y ∈ Ioo a b), f y = g y
Tactic: filter_upwards [self_mem_nhdsWithin, this] with y hy h'y
-- Lean 4 proof step from Mathlib.Analysis.Calculus.Monotone (goal)
Goal:
f : ℝ → ℝ
s : Set ℝ
hf : MonotoneOn f s
hs : MeasurableSet s
⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict volume s, DifferentiableWithinAt ℝ f s x
have rw : ∀ᵐ (x : ℝ), x ∈ s → DifferentiableWithinAt ℝ f s x
Tactic: rw [ae_restrict_iff' hs]
-- Lean 4 proof step from Mathlib.Analysis.Calculus.ParametricIntegral (goal)
Goal:
α : Type u_1
inst : MeasurableSpace α
μ : Measure α
𝕜 : Type u_2
inst_1 : RCLike 𝕜
E : Type u_3
inst_2 : NormedAddCommGroup E
inst_3 : NormedSpace ℝ E
inst_4 : NormedSpace 𝕜 E
H : Type u_4
inst_5 : NormedAddCommGroup H
inst_6 : NormedSpace 𝕜 H
F : H → α → E
x₀ : H
bound : α → ℝ
s : Set H
F' : α → H →L[𝕜] E
hs : s ∈ 𝓝 x₀
hF_meas : ∀ x ∈ s, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀) μ
hF'_meas : AEStronglyMeasurable F' μ
h_lipsch : ∀ᵐ (a : α) ∂μ, ∀ x ∈ s, ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖
bound_integrable : Integrable bound μ
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt.{u_2, u_4, u_3} (𝕜 := 𝕜) (F := E) (fun (x : H) ↦ F x a) (F' a) x₀
⊢ Integrable F' μ ∧
    HasFDerivAt.{u_2, u_4, u_3} (𝕜 := 𝕜) (F := E) (fun (x : H) ↦ ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀
have obtain : ∀ (ε : ℝ) (ε_pos : ε > 0) (hε : ball x₀ ε ⊆ s),
  Integrable F' μ ∧
    HasFDerivAt.{u_2, u_4, u_3} (𝕜 := 𝕜) (F := E) (fun (x : H) ↦ ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀
Tactic: obtain ⟨ε, ε_pos, hε⟩ := Metric.mem_nhds_iff.1 hs
-- Lean 4 proof step from Mathlib.Analysis.Calculus.ParametricIntegral (hypothesis)
Goal:
α : Type u_1
inst : MeasurableSpace α
μ : Measure α
𝕜 : Type u_2
inst_1 : RCLike 𝕜
E : Type u_3
inst_2 : NormedAddCommGroup E
inst_3 : NormedSpace ℝ E
inst_4 : NormedSpace 𝕜 E
H : Type u_4
inst_5 : NormedAddCommGroup H
inst_6 : NormedSpace 𝕜 H
F : H → α → E
x₀ : H
bound : α → ℝ
s : Set H
F' : α → H →L[𝕜] E
hs : s ∈ 𝓝 x₀
hF_meas : ∀ x ∈ s, AEStronglyMeasurable (F x) μ
hF_int : Integrable (F x₀) μ
hF'_meas : AEStronglyMeasurable F' μ
h_lipsch : ∀ᵐ (a : α) ∂μ, ∀ x ∈ s, ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖
bound_integrable : Integrable bound μ
h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt.{u_2, u_4, u_3} (𝕜 := 𝕜) (F := E) (fun (x : H) ↦ F x a) (F' a) x₀
ε : ℝ
ε_pos : ε > 0
hε : ball x₀ ε ⊆ s
⊢ Integrable F' μ ∧
    HasFDerivAt.{u_2, u_4, u_3} (𝕜 := 𝕜) (F := E) (fun (x : H) ↦ ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀
have x₀_in : x₀ ∈ ball x₀ ε
Tactic: have x₀_in : x₀ ∈ ball x₀ ε := mem_ball_self ε_pos