l3lab/ntp-mathlib huggingface dataset:
theorem inf_gt_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (t : ℚ) :
    ⨅ r : Ioi t, condCdfRat ρ a r = condCdfRat ρ a t := by
  by_cases ha : a ∈ condCdfSet ρ
  · simp_rw [condCdfRat_of_mem ρ a ha]
    have ha' := hasCondCdf_of_mem_condCdfSet ha
    rw [← ENNReal.toReal_iInf]
    · suffices ⨅ i : ↥(Ioi t), preCdf ρ (↑i) a = preCdf ρ t a by rw [this]
      rw [← ha'.iInf_rat_gt_eq]
    · exact fun r => ((ha'.le_one r).trans_lt ENNReal.one_lt_top).ne
  · simp_rw [condCdfRat_of_not_mem ρ a ha]
    have h_bdd : BddBelow (range fun r : ↥(Ioi t) => ite ((r : ℚ) < 0) (0 : ℝ) 1) := by
      refine' ⟨0, fun x hx => _⟩
      obtain ⟨y, rfl⟩ := mem_range.mpr hx
      dsimp only
      split_ifs
      exacts [le_rfl, zero_le_one]
    split_ifs with h
    · refine' le_antisymm _ (le_ciInf fun x => _)
      · obtain ⟨q, htq, hq_neg⟩ : ∃ q, t < q ∧ q < 0 := by
          refine' ⟨t / 2, _, _⟩
          · linarith
          · linarith
        refine' (ciInf_le h_bdd ⟨q, htq⟩).trans _
        rw [if_pos]
        rwa [Subtype.coe_mk]
      · split_ifs
        exacts [le_rfl, zero_le_one]
    · refine' le_antisymm _ _
      · refine' (ciInf_le h_bdd ⟨t + 1, lt_add_one t⟩).trans _
        split_ifs
        exacts [zero_le_one, le_rfl]
      · refine' le_ciInf fun x => _
        rw [if_neg]
        

Proof state:
case neg.refine'_2.hnc
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∉ condCdfSet ρ
h_bdd : BddBelow (range fun r => if ↑r < 0 then 0 else 1)
h : ¬t < 0
x : ↑(Ioi t)
⊢ ¬↑x < 0

Next tactic:
rw [not_lt] at h ⊢
theorem inf_gt_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (t : ℚ) :
    ⨅ r : Ioi t, condCdfRat ρ a r = condCdfRat ρ a t := by
  by_cases ha : a ∈ condCdfSet ρ
  · simp_rw [condCdfRat_of_mem ρ a ha]
    have ha' := hasCondCdf_of_mem_condCdfSet ha
    rw [← ENNReal.toReal_iInf]
    · suffices ⨅ i : ↥(Ioi t), preCdf ρ (↑i) a = preCdf ρ t a by rw [this]
      rw [← ha'.iInf_rat_gt_eq]
    · exact fun r => ((ha'.le_one r).trans_lt ENNReal.one_lt_top).ne
  · simp_rw [condCdfRat_of_not_mem ρ a ha]
    have h_bdd : BddBelow (range fun r : ↥(Ioi t) => ite ((r : ℚ) < 0) (0 : ℝ) 1) := by
      refine' ⟨0, fun x hx => _⟩
      obtain ⟨y, rfl⟩ := mem_range.mpr hx
      dsimp only
      split_ifs
      exacts [le_rfl, zero_le_one]
    split_ifs with h
    · refine' le_antisymm _ (le_ciInf fun x => _)
      · obtain ⟨q, htq, hq_neg⟩ : ∃ q, t < q ∧ q < 0 := by
          refine' ⟨t / 2, _, _⟩
          · linarith
          · linarith
        refine' (ciInf_le h_bdd ⟨q, htq⟩).trans _
        rw [if_pos]
        rwa [Subtype.coe_mk]
      · split_ifs
        exacts [le_rfl, zero_le_one]
    · refine' le_antisymm _ _
      · refine' (ciInf_le h_bdd ⟨t + 1, lt_add_one t⟩).trans _
        split_ifs
        exacts [zero_le_one, le_rfl]
      · refine' le_ciInf fun x => _
        rw [if_neg]
        rw [not_lt] at h ⊢
        

Proof state:
case neg.refine'_2.hnc
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∉ condCdfSet ρ
h_bdd : BddBelow (range fun r => if ↑r < 0 then 0 else 1)
h : 0 ≤ t
x : ↑(Ioi t)
⊢ 0 ≤ ↑x

Next tactic:
exact h.trans (mem_Ioi.mp x.prop).le
theorem condCdf'_def' {ρ : Measure (α × ℝ)} {a : α} {x : ℝ} :
    condCdf' ρ a x = ⨅ r : { r : ℚ // x < r }, condCdfRat ρ a r := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ condCdf' ρ a x = ⨅ r, condCdfRat ρ a ↑r

Next tactic:
rw [condCdf']
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ condCdf' ρ a ↑r = condCdfRat ρ a r

Next tactic:
rw [← inf_gt_condCdfRat ρ a r, condCdf']
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ ⨅ r_1, condCdfRat ρ a ↑r_1 = ⨅ r_1, condCdfRat ρ a ↑r_1

Next tactic:
refine' Equiv.iInf_congr _ _
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  refine' Equiv.iInf_congr _ _
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ { r' // ↑r < ↑r' } ≃ ↑(Ioi r)

Next tactic:
exact
      { toFun := fun t => ⟨t.1, mod_cast t.2⟩
        invFun := fun t => ⟨t.1, mod_cast t.2⟩
        left_inv := fun t => by simp only [Subtype.coe_eta]
        right_inv := fun t => by simp only [Subtype.coe_eta] }
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  refine' Equiv.iInf_congr _ _
  · exact
      { toFun := fun t => ⟨t.1, mod_cast t.2⟩
        invFun := fun t => ⟨t.1, mod_cast t.2⟩
        left_inv := fun t => by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
t : { r' // ↑r < ↑r' }
⊢ (fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) }) ((fun t => { val := ↑t, property := (_ : r < ↑t) }) t) = t

Next tactic:
simp only [Subtype.coe_eta]
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  refine' Equiv.iInf_congr _ _
  · exact
      { toFun := fun t => ⟨t.1, mod_cast t.2⟩
        invFun := fun t => ⟨t.1, mod_cast t.2⟩
        left_inv := fun t => by simp only [Subtype.coe_eta]
        right_inv := fun t => by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
t : ↑(Ioi r)
⊢ (fun t => { val := ↑t, property := (_ : r < ↑t) }) ((fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) }) t) = t

Next tactic:
simp only [Subtype.coe_eta]
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  refine' Equiv.iInf_congr _ _
  · exact
      { toFun := fun t => ⟨t.1, mod_cast t.2⟩
        invFun := fun t => ⟨t.1, mod_cast t.2⟩
        left_inv := fun t => by simp only [Subtype.coe_eta]
        right_inv := fun t => by simp only [Subtype.coe_eta] }
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ ∀ (x : { r' // ↑r < ↑r' }),
    condCdfRat ρ a
        ↑({ toFun := fun t => { val := ↑t, property := (_ : r < ↑t) },
              invFun := fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) },
              left_inv :=
                (_ :
                  ∀ (t : { r' // ↑r < ↑r' }),
                    { val := ↑t, property := (_ : ↑r < ↑↑((fun t => { val := ↑t, property := (_ : r < ↑t) }) t)) } = t),
              right_inv :=
                (_ :
                  ∀ (t : ↑(Ioi r)),
                    { val := ↑t, property := (_ : r < ↑((fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) }) t)) } =
                      t) }
            x) =
      condCdfRat ρ a ↑x

Next tactic:
intro t
theorem condCdf'_eq_condCdfRat (ρ : Measure (α × ℝ)) (a : α) (r : ℚ) :
    condCdf' ρ a r = condCdfRat ρ a r := by
  rw [← inf_gt_condCdfRat ρ a r, condCdf']
  refine' Equiv.iInf_congr _ _
  · exact
      { toFun := fun t => ⟨t.1, mod_cast t.2⟩
        invFun := fun t => ⟨t.1, mod_cast t.2⟩
        left_inv := fun t => by simp only [Subtype.coe_eta]
        right_inv := fun t => by simp only [Subtype.coe_eta] }
  · intro t
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
t : { r' // ↑r < ↑r' }
⊢ condCdfRat ρ a
      ↑({ toFun := fun t => { val := ↑t, property := (_ : r < ↑t) },
            invFun := fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) },
            left_inv :=
              (_ :
                ∀ (t : { r' // ↑r < ↑r' }),
                  { val := ↑t, property := (_ : ↑r < ↑↑((fun t => { val := ↑t, property := (_ : r < ↑t) }) t)) } = t),
            right_inv :=
              (_ :
                ∀ (t : ↑(Ioi r)),
                  { val := ↑t, property := (_ : r < ↑((fun t => { val := ↑t, property := (_ : ↑r < ↑↑t) }) t)) } = t) }
          t) =
    condCdfRat ρ a ↑t

Next tactic:
simp only [Equiv.coe_fn_mk, Subtype.coe_mk]
theorem condCdf'_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCdf' ρ a r := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
⊢ 0 ≤ condCdf' ρ a r

Next tactic:
have : Nonempty { r' : ℚ // r < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt r
    exact ⟨⟨r, hrx⟩⟩
theorem condCdf'_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCdf' ρ a r := by
  have : Nonempty { r' : ℚ // r < ↑r' } := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
⊢ Nonempty { r' // r < ↑r' }

Next tactic:
obtain ⟨r, hrx⟩ := exists_rat_gt r
theorem condCdf'_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCdf' ρ a r := by
  have : Nonempty { r' : ℚ // r < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt r
    

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r✝ : ℝ
r : ℚ
hrx : r✝ < ↑r
⊢ Nonempty { r' // r✝ < ↑r' }

Next tactic:
exact ⟨⟨r, hrx⟩⟩
theorem condCdf'_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCdf' ρ a r := by
  have : Nonempty { r' : ℚ // r < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt r
    exact ⟨⟨r, hrx⟩⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
this : Nonempty { r' // r < ↑r' }
⊢ 0 ≤ condCdf' ρ a r

Next tactic:
rw [condCdf'_def]
theorem condCdf'_nonneg (ρ : Measure (α × ℝ)) (a : α) (r : ℝ) : 0 ≤ condCdf' ρ a r := by
  have : Nonempty { r' : ℚ // r < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt r
    exact ⟨⟨r, hrx⟩⟩
  rw [condCdf'_def]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
this : Nonempty { r' // r < ↑r' }
⊢ 0 ≤ ⨅ r_1, condCdfRat ρ a ↑r_1

Next tactic:
exact le_ciInf fun r' => condCdfRat_nonneg ρ a _
theorem bddBelow_range_condCdfRat_gt (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    BddBelow (range fun r : { r' : ℚ // x < ↑r' } => condCdfRat ρ a r) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ BddBelow (range fun r => condCdfRat ρ a ↑r)

Next tactic:
refine' ⟨0, fun z => _⟩
theorem bddBelow_range_condCdfRat_gt (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    BddBelow (range fun r : { r' : ℚ // x < ↑r' } => condCdfRat ρ a r) := by
  refine' ⟨0, fun z => _⟩; 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x z : ℝ
⊢ (z ∈ range fun r => condCdfRat ρ a ↑r) → 0 ≤ z

Next tactic:
rintro ⟨u, rfl⟩
theorem bddBelow_range_condCdfRat_gt (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    BddBelow (range fun r : { r' : ℚ // x < ↑r' } => condCdfRat ρ a r) := by
  refine' ⟨0, fun z => _⟩; rintro ⟨u, rfl⟩; 

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
u : { r' // x < ↑r' }
⊢ 0 ≤ (fun r => condCdfRat ρ a ↑r) u

Next tactic:
exact condCdfRat_nonneg ρ a _
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Monotone (condCdf' ρ a)

Next tactic:
intro x y hxy
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
⊢ condCdf' ρ a x ≤ condCdf' ρ a y

Next tactic:
have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
⊢ Nonempty { r' // y < ↑r' }

Next tactic:
obtain ⟨r, hrx⟩ := exists_rat_gt y
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
r : ℚ
hrx : y < ↑r
⊢ Nonempty { r' // y < ↑r' }

Next tactic:
exact ⟨⟨r, hrx⟩⟩
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ condCdf' ρ a x ≤ condCdf' ρ a y

Next tactic:
simp_rw [condCdf'_def]
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
  simp_rw [condCdf'_def]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
⊢ ⨅ r, condCdfRat ρ a ↑r ≤ ⨅ r, condCdfRat ρ a ↑r

Next tactic:
refine' le_ciInf fun r => (ciInf_le _ _).trans_eq _
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
  simp_rw [condCdf'_def]
  refine' le_ciInf fun r => (ciInf_le _ _).trans_eq _
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { r' // y < ↑r' }
⊢ BddBelow (range fun r => condCdfRat ρ a ↑r)

Next tactic:
exact bddBelow_range_condCdfRat_gt ρ a x
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
  simp_rw [condCdf'_def]
  refine' le_ciInf fun r => (ciInf_le _ _).trans_eq _
  · exact bddBelow_range_condCdfRat_gt ρ a x
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { r' // y < ↑r' }
⊢ { r' // x < ↑r' }

Next tactic:
exact ⟨r.1, hxy.trans_lt r.prop⟩
theorem monotone_condCdf' (ρ : Measure (α × ℝ)) (a : α) : Monotone (condCdf' ρ a) := by
  intro x y hxy
  have : Nonempty { r' : ℚ // y < ↑r' } := by
    obtain ⟨r, hrx⟩ := exists_rat_gt y
    exact ⟨⟨r, hrx⟩⟩
  simp_rw [condCdf'_def]
  refine' le_ciInf fun r => (ciInf_le _ _).trans_eq _
  · exact bddBelow_range_condCdfRat_gt ρ a x
  · exact ⟨r.1, hxy.trans_lt r.prop⟩
  · 

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
this : Nonempty { r' // y < ↑r' }
r : { r' // y < ↑r' }
⊢ condCdfRat ρ a ↑{ val := ↑r, property := (_ : x < ↑↑r) } = condCdfRat ρ a ↑r

Next tactic:
rfl
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ici x) x

Next tactic:
rw [← continuousWithinAt_Ioi_iff_Ici]
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x

Next tactic:
convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔ Tendsto (condCdf' ρ a) (𝓝[>] x) (𝓝 (sInf (condCdf' ρ a '' Ioi x)))

Next tactic:
rw [sInf_image']
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔ Tendsto (condCdf' ρ a) (𝓝[>] x) (𝓝 (⨅ a_1, condCdf' ρ a ↑a_1))

Next tactic:
have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    exact condCdf'_nonneg ρ a u
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ⨅ r, condCdf' ρ a ↑r = ⨅ r, condCdf' ρ a ↑↑r

Next tactic:
refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ BddBelow (condCdf' ρ a '' Ioi x)

Next tactic:
refine' ⟨0, fun z => _⟩
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x z : ℝ
⊢ z ∈ condCdf' ρ a '' Ioi x → 0 ≤ z

Next tactic:
rintro ⟨u, -, rfl⟩
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x u : ℝ
⊢ 0 ≤ condCdf' ρ a u

Next tactic:
exact condCdf'_nonneg ρ a u
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    exact condCdf'_nonneg ρ a u
  

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ r, condCdf' ρ a ↑r = ⨅ r, condCdf' ρ a ↑↑r
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔ Tendsto (condCdf' ρ a) (𝓝[>] x) (𝓝 (⨅ a_1, condCdf' ρ a ↑a_1))

Next tactic:
have h'' :
    ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r =
      ⨅ r : { r' : ℚ // x < r' }, condCdfRat ρ a r := by
    congr with r
    exact condCdf'_eq_condCdfRat ρ a r
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    exact condCdf'_nonneg ρ a u
  have h'' :
    ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r =
      ⨅ r : { r' : ℚ // x < r' }, condCdfRat ρ a r := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ r, condCdf' ρ a ↑r = ⨅ r, condCdf' ρ a ↑↑r
⊢ ⨅ r, condCdf' ρ a ↑↑r = ⨅ r, condCdfRat ρ a ↑r

Next tactic:
congr with r
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    exact condCdf'_nonneg ρ a u
  have h'' :
    ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r =
      ⨅ r : { r' : ℚ // x < r' }, condCdfRat ρ a r := by
    congr with r
    

Proof state:
case e_s.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ r, condCdf' ρ a ↑r = ⨅ r, condCdf' ρ a ↑↑r
r : { r' // x < ↑r' }
⊢ condCdf' ρ a ↑↑r = condCdfRat ρ a ↑r

Next tactic:
exact condCdf'_eq_condCdfRat ρ a r
theorem continuousWithinAt_condCdf'_Ici (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) :
    ContinuousWithinAt (condCdf' ρ a) (Ici x) x := by
  rw [← continuousWithinAt_Ioi_iff_Ici]
  convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
  rw [sInf_image']
  have h' : ⨅ r : Ioi x, condCdf' ρ a r = ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r := by
    refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
    refine' ⟨0, fun z => _⟩
    rintro ⟨u, -, rfl⟩
    exact condCdf'_nonneg ρ a u
  have h'' :
    ⨅ r : { r' : ℚ // x < r' }, condCdf' ρ a r =
      ⨅ r : { r' : ℚ // x < r' }, condCdfRat ρ a r := by
    congr with r
    exact condCdf'_eq_condCdfRat ρ a r
  

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ r, condCdf' ρ a ↑r = ⨅ r, condCdf' ρ a ↑↑r
h'' : ⨅ r, condCdf' ρ a ↑↑r = ⨅ r, condCdfRat ρ a ↑r
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔ Tendsto (condCdf' ρ a) (𝓝[>] x) (𝓝 (⨅ a_1, condCdf' ρ a ↑a_1))

Next tactic:
rw [h', h'', ContinuousWithinAt]