-- Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean
lemma IsMeasurableRatCDF.monotone_stieltjesFunctionAux (a : α) :
    Monotone (IsMeasurableRatCDF.stieltjesFunctionAux f a)

Proof state:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
⊢ Nonempty { r' // y < ↑r' }

Tactic:
obtain ⟨r, hrx⟩ := exists_rat_gt y

Result:
case intro
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
r : ℚ
hrx : y < ↑r
⊢ Nonempty { r' // y < ↑r' }

Proof state:
case refine_2
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ { q' // x < ↑q' }

Tactic:
exact ⟨r.1, hxy.trans_lt r.prop⟩

Result:
no goals

Proof state:
case refine_1
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ BddBelow (range fun q => f a ↑q)

Tactic:
refine ⟨0, fun z ↦ ?_⟩

Result:
case refine_1
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
z : ℝ
⊢ (z ∈ range fun q => f a ↑q) → 0 ≤ z

Proof state:
case refine_3
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ f a ↑⟨↑r, ⋯⟩ = f a ↑r

Tactic:
rfl

Result:
no goals

Proof state:
case refine_1
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
z : ℝ
⊢ (z ∈ range fun q => f a ↑q) → 0 ≤ z

Tactic:
rintro ⟨u, rfl⟩

Result:
case refine_1.intro
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
u : { q' // x < ↑q' }
⊢ 0 ≤ (fun q => f a ↑q) u

Proof state:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ stieltjesFunctionAux f a x ≤ stieltjesFunctionAux f a y

Tactic:
simp_rw [IsMeasurableRatCDF.stieltjesFunctionAux_def]

Result:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ ⨅ q, f a ↑q ≤ ⨅ q, f a ↑q

Proof state:
case refine_1.intro
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
u : { q' // x < ↑q' }
⊢ 0 ≤ (fun q => f a ↑q) u

Tactic:
exact hf.nonneg a _

Result:
no goals

Proof state:
case intro
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
r : ℚ
hrx : y < ↑r
⊢ Nonempty { r' // y < ↑r' }

Tactic:
exact ⟨⟨r, hrx⟩⟩

Result:
no goals

Proof state:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
⊢ stieltjesFunctionAux f a x ≤ stieltjesFunctionAux f a y

Tactic:
have : Nonempty { r' : ℚ // y < ↑r' } := by
  obtain ⟨r, hrx⟩ := exists_rat_gt y
  exact ⟨⟨r, hrx⟩⟩

Result:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ stieltjesFunctionAux f a x ≤ stieltjesFunctionAux f a y

Proof state:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ ⨅ q, f a ↑q ≤ ⨅ q, f a ↑q

Tactic:
refine le_ciInf fun r ↦ (ciInf_le ?_ ?_).trans_eq ?_

Result:
case refine_1
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ BddBelow (range fun q => f a ↑q)

case refine_2
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ { q' // x < ↑q' }

case refine_3
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { q' // y < ↑q' }
⊢ f a ↑?refine_2 = f a ↑r

Proof state:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
⊢ Monotone (stieltjesFunctionAux f a)

Tactic:
intro x y hxy

Result:
α : Type u_1
f : α → ℚ → ℝ
inst✝ : MeasurableSpace α
hf : IsMeasurableRatCDF f
a : α
x y : ℝ
hxy : x ≤ y
⊢ stieltjesFunctionAux f a x ≤ stieltjesFunctionAux f a y