Theorem: iInf_Ioi_eq_iInf_rat_gt
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

tactic: refine' le_antisymm _ _
state_before: f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
⊢ (⨅ (r : ↑(Ioi x)), f ↑r) = ⨅ (q : { q' // x < ↑q' }), f ↑↑q

tactic: have : Nonempty { r' : ℚ // x < ↑r' } := by
  obtain ⟨r, hrx⟩ := exists_rat_gt x
  exact ⟨⟨r, hrx⟩⟩
state_before: case refine'_1
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
⊢ (⨅ (r : ↑(Ioi x)), f ↑r) ≤ ⨅ (q : { q' // x < ↑q' }), f ↑↑q

tactic: refine' le_ciInf fun r => _
state_before: case refine'_1
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
this : Nonempty { r' // x < ↑r' }
⊢ (⨅ (r : ↑(Ioi x)), f ↑r) ≤ ⨅ (q : { q' // x < ↑q' }), f ↑↑q

tactic: obtain ⟨y, hxy, hyr⟩ := exists_rat_btwn r.prop
state_before: case refine'_1
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
this : Nonempty { r' // x < ↑r' }
r : { q' // x < ↑q' }
⊢ (⨅ (r : ↑(Ioi x)), f ↑r) ≤ f ↑↑r

tactic: refine' ciInf_set_le hf (hxy.trans _)
state_before: case refine'_1.intro.intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
this : Nonempty { r' // x < ↑r' }
r : { q' // x < ↑q' }
y : ℚ
hxy : x < ↑y
hyr : ↑y < ↑↑r
⊢ (⨅ (r : ↑(Ioi x)), f ↑r) ≤ f ↑↑r

tactic: exact_mod_cast hyr
state_before: case refine'_1.intro.intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
this : Nonempty { r' // x < ↑r' }
r : { q' // x < ↑q' }
y : ℚ
hxy : x < ↑y
hyr : ↑y < ↑↑r
⊢ ↑y < ↑↑r

tactic: obtain ⟨r, hrx⟩ := exists_rat_gt x
state_before: f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
⊢ Nonempty { r' // x < ↑r' }

tactic: exact ⟨⟨r, hrx⟩⟩
state_before: case intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
r : ℚ
hrx : x < ↑r
⊢ Nonempty { r' // x < ↑r' }

tactic: refine' le_ciInf fun q => _
state_before: case refine'_2
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
⊢ (⨅ (q : { q' // x < ↑q' }), f ↑↑q) ≤ ⨅ (r : ↑(Ioi x)), f ↑r

tactic: have hq := q.prop
state_before: case refine'_2
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
⊢ (⨅ (q : { q' // x < ↑q' }), f ↑↑q) ≤ f ↑q

tactic: rw [mem_Ioi] at hq
state_before: case refine'_2
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : ↑q ∈ Ioi x
⊢ (⨅ (q : { q' // x < ↑q' }), f ↑↑q) ≤ f ↑q

tactic: obtain ⟨y, hxy, hyq⟩ := exists_rat_btwn hq
state_before: case refine'_2
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
⊢ (⨅ (q : { q' // x < ↑q' }), f ↑↑q) ≤ f ↑q

tactic: refine' (ciInf_le _ _).trans _
state_before: case refine'_2.intro.intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
⊢ (⨅ (q : { q' // x < ↑q' }), f ↑↑q) ≤ f ↑q

tactic: refine' ⟨hf.some, fun z => _⟩
state_before: case refine'_2.intro.intro.refine'_1
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
⊢ BddBelow (range fun q => f ↑↑q)

tactic: rintro ⟨u, rfl⟩
state_before: case refine'_2.intro.intro.refine'_1
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
z : ℝ
⊢ (z ∈ range fun q => f ↑↑q) → Set.Nonempty.some hf ≤ z

tactic: suffices hfu : f u ∈ f '' Ioi x
state_before: case refine'_2.intro.intro.refine'_1.intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
u : { q' // x < ↑q' }
⊢ Set.Nonempty.some hf ≤ (fun q => f ↑↑q) u

tactic: exact hf.choose_spec hfu
state_before: case refine'_2.intro.intro.refine'_1.intro
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
u : { q' // x < ↑q' }
hfu : f ↑↑u ∈ f '' Ioi x
⊢ Set.Nonempty.some hf ≤ (fun q => f ↑↑q) u

case hfu
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
u : { q' // x < ↑q' }
⊢ f ↑↑u ∈ f '' Ioi x

tactic: exact ⟨u, u.prop, rfl⟩
state_before: case hfu
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
u : { q' // x < ↑q' }
⊢ f ↑↑u ∈ f '' Ioi x

tactic: exact ⟨y, hxy⟩
state_before: case refine'_2.intro.intro.refine'_2
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
⊢ { q' // x < ↑q' }

tactic: refine' hf_mono (le_trans _ hyq.le)
state_before: case refine'_2.intro.intro.refine'_3
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
⊢ f ↑↑{ val := y, property := hxy } ≤ f ↑q

tactic: norm_cast
state_before: case refine'_2.intro.intro.refine'_3
f : ℝ → ℝ
x : ℝ
hf : BddBelow (f '' Ioi x)
hf_mono : Monotone f
q : ↑(Ioi x)
hq : x < ↑q
y : ℚ
hxy : x < ↑y
hyq : ↑y < ↑q
⊢ ↑↑{ val := y, property := hxy } ≤ ↑y