Theorem: StieltjesFunction.measure_singleton
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

tactic: obtain ⟨u, u_mono, u_lt_a, u_lim⟩ :
  ∃ u : ℕ → ℝ, StrictMono u ∧ (∀ n : ℕ, u n < a) ∧ Tendsto u atTop (𝓝 a) :=
  exists_seq_strictMono_tendsto a
state_before: f : StieltjesFunction
a : ℝ
⊢ ↑↑(StieltjesFunction.measure f) {a} = ofReal (↑f a - leftLim (↑f) a)

tactic: have A : {a} = ⋂ n, Ioc (u n) a := by
  refine' Subset.antisymm (fun x hx => by simp [mem_singleton_iff.1 hx, u_lt_a]) fun x hx => _
  simp at hx
  have : a ≤ x := le_of_tendsto' u_lim fun n => (hx n).1.le
  simp [le_antisymm this (hx 0).2]
state_before: case intro.intro.intro
f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
⊢ ↑↑(StieltjesFunction.measure f) {a} = ofReal (↑f a - leftLim (↑f) a)

tactic: have L2 :
    Tendsto (fun n => f.measure (Ioc (u n) a)) atTop (𝓝 (ofReal (f a - leftLim f a))) := by
  simp only [measure_Ioc]
  have : Tendsto (fun n => f (u n)) atTop (𝓝 (leftLim f a)) := by
    apply (f.mono.tendsto_leftLim a).comp
    exact
      tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ u_lim
        (eventually_of_forall fun n => u_lt_a n)
  exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp (tendsto_const_nhds.sub this)
state_before: case intro.intro.intro
f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
⊢ ↑↑(StieltjesFunction.measure f) {a} = ofReal (↑f a - leftLim (↑f) a)

tactic: exact tendsto_nhds_unique L1 L2
state_before: case intro.intro.intro
f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
L2 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (ofReal (↑f a - leftLim (↑f) a)))
⊢ ↑↑(StieltjesFunction.measure f) {a} = ofReal (↑f a - leftLim (↑f) a)

tactic: refine' Subset.antisymm (fun x hx => by simp [mem_singleton_iff.1 hx, u_lt_a]) fun x hx => _
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
⊢ {a} = ⋂ (n : ℕ), Ioc (u n) a

tactic: simp at hx
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
x : ℝ
hx : x ∈ ⋂ (n : ℕ), Ioc (u n) a
⊢ x ∈ {a}

tactic: have : a ≤ x := le_of_tendsto' u_lim fun n => (hx n).1.le
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
x : ℝ
hx : ∀ (i : ℕ), u i < x ∧ x ≤ a
⊢ x ∈ {a}

tactic: simp [le_antisymm this (hx 0).2]
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
x : ℝ
hx : ∀ (i : ℕ), u i < x ∧ x ≤ a
this : a ≤ x
⊢ x ∈ {a}

tactic: simp [mem_singleton_iff.1 hx, u_lt_a]
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
x : ℝ
hx : x ∈ {a}
⊢ x ∈ ⋂ (n : ℕ), Ioc (u n) a

tactic: rw [A]
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
⊢ Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))

tactic: refine' tendsto_measure_iInter (fun n => measurableSet_Ioc) (fun m n hmn => _) _
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
⊢ Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop
    (𝓝 (↑↑(StieltjesFunction.measure f) (⋂ (n : ℕ), Ioc (u n) a)))

tactic: exact Ioc_subset_Ioc (u_mono.monotone hmn) le_rfl
state_before: case refine'_1
f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
m n : ℕ
hmn : m ≤ n
⊢ Ioc (u n) a ≤ Ioc (u m) a

tactic: exact ⟨0, by simpa only [measure_Ioc] using ENNReal.ofReal_ne_top⟩
state_before: case refine'_2
f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
⊢ ∃ i, ↑↑(StieltjesFunction.measure f) (Ioc (u i) a) ≠ ⊤

tactic: simpa only [measure_Ioc] using ENNReal.ofReal_ne_top
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
⊢ ↑↑(StieltjesFunction.measure f) (Ioc (u 0) a) ≠ ⊤

tactic: simp only [measure_Ioc]
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
⊢ Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (ofReal (↑f a - leftLim (↑f) a)))

tactic: have : Tendsto (fun n => f (u n)) atTop (𝓝 (leftLim f a)) := by
  apply (f.mono.tendsto_leftLim a).comp
  exact
    tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ u_lim
      (eventually_of_forall fun n => u_lt_a n)
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
⊢ Tendsto (fun n => ofReal (↑f a - ↑f (u n))) atTop (𝓝 (ofReal (↑f a - leftLim (↑f) a)))

tactic: exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp (tendsto_const_nhds.sub this)
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
this : Tendsto (fun n => ↑f (u n)) atTop (𝓝 (leftLim (↑f) a))
⊢ Tendsto (fun n => ofReal (↑f a - ↑f (u n))) atTop (𝓝 (ofReal (↑f a - leftLim (↑f) a)))

tactic: apply (f.mono.tendsto_leftLim a).comp
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
⊢ Tendsto (fun n => ↑f (u n)) atTop (𝓝 (leftLim (↑f) a))

tactic: exact
  tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ u_lim
    (eventually_of_forall fun n => u_lt_a n)
state_before: f : StieltjesFunction
a : ℝ
u : ℕ → ℝ
u_mono : StrictMono u
u_lt_a : ∀ (n : ℕ), u n < a
u_lim : Tendsto u atTop (𝓝 a)
A : {a} = ⋂ (n : ℕ), Ioc (u n) a
L1 : Tendsto (fun n => ↑↑(StieltjesFunction.measure f) (Ioc (u n) a)) atTop (𝓝 (↑↑(StieltjesFunction.measure f) {a}))
⊢ Tendsto (fun n => u n) atTop (𝓝[Iio a] a)