[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
t : ι → Set β
hι : Nonempty ι
⊢ s ×ˢ ⋂ (i : ι), t i = ⋂ (i : ι), s ×ˢ t i
[PROOFSTEP]
ext x
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ x ∈ s ×ˢ ⋂ (i : ι), t i ↔ x ∈ ⋂ (i : ι), s ×ˢ t i
[PROOFSTEP]
simp only [mem_prod, mem_iInter]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ (x.fst ∈ s ∧ ∀ (i : ι), x.snd ∈ t i) ↔ ∀ (i : ι), x.fst ∈ s ∧ x.snd ∈ t i
[PROOFSTEP]
exact ⟨fun h i => ⟨h.1, h.2 i⟩, fun h => ⟨(h hι.some).1, fun i => (h i).2⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
⊢ ⋃ (r : ℚ), Iic ↑r = univ
[PROOFSTEP]
ext1 x
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ x ∈ ⋃ (r : ℚ), Iic ↑r ↔ x ∈ univ
[PROOFSTEP]
simp only [mem_iUnion, mem_Iic, mem_univ, iff_true_iff]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ ∃ i, x ≤ ↑i
[PROOFSTEP]
obtain ⟨r, hr⟩ := exists_rat_gt x
[GOAL]
case h.intro
α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
r : ℚ
hr : x < ↑r
⊢ ∃ i, x ≤ ↑i
[PROOFSTEP]
exact ⟨r, hr.le⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
⊢ ⋂ (r : ℚ), Iic ↑r = ∅
[PROOFSTEP]
ext1 x
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ x ∈ ⋂ (r : ℚ), Iic ↑r ↔ x ∈ ∅
[PROOFSTEP]
simp only [mem_iInter, mem_Iic, mem_empty_iff_false, iff_false_iff, not_forall, not_le]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
x : ℝ
⊢ ∃ x_1, ↑x_1 < x
[PROOFSTEP]
exact exists_rat_lt x
[GOAL]
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
⊢ atBot ≤ 𝓝 ⊥
[PROOFSTEP]
cases subsingleton_or_nontrivial α
[GOAL]
case inl
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Subsingleton α
⊢ atBot ≤ 𝓝 ⊥
[PROOFSTEP]
simp only [nhds_discrete, le_pure_iff, mem_atBot_sets, mem_singleton_iff, eq_iff_true_of_subsingleton, imp_true_iff,
  exists_const]
[GOAL]
case inr
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
⊢ atBot ≤ 𝓝 ⊥
[PROOFSTEP]
have h : atBot.HasBasis (fun _ : α => True) Iic := @atBot_basis α _ _
[GOAL]
case inr
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
⊢ atBot ≤ 𝓝 ⊥
[PROOFSTEP]
have h_nhds : (𝓝 ⊥).HasBasis (fun a : α => ⊥ < a) fun a => Iio a := @nhds_bot_basis α _ _ _ _ _
[GOAL]
case inr
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
h_nhds : HasBasis (𝓝 ⊥) (fun a => ⊥ < a) fun a => Iio a
⊢ atBot ≤ 𝓝 ⊥
[PROOFSTEP]
intro s
[GOAL]
case inr
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
h_nhds : HasBasis (𝓝 ⊥) (fun a => ⊥ < a) fun a => Iio a
s : Set α
⊢ s ∈ 𝓝 ⊥ → s ∈ atBot
[PROOFSTEP]
rw [h.mem_iff, h_nhds.mem_iff]
[GOAL]
case inr
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
h_nhds : HasBasis (𝓝 ⊥) (fun a => ⊥ < a) fun a => Iio a
s : Set α
⊢ (∃ i, ⊥ < i ∧ Iio i ⊆ s) → ∃ i, True ∧ Iic i ⊆ s
[PROOFSTEP]
rintro ⟨a, ha_bot_lt, h_Iio_a_subset_s⟩
[GOAL]
case inr.intro.intro
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
h_nhds : HasBasis (𝓝 ⊥) (fun a => ⊥ < a) fun a => Iio a
s : Set α
a : α
ha_bot_lt : ⊥ < a
h_Iio_a_subset_s : Iio a ⊆ s
⊢ ∃ i, True ∧ Iic i ⊆ s
[PROOFSTEP]
refine' ⟨⊥, trivial, _root_.trans _ h_Iio_a_subset_s⟩
[GOAL]
case inr.intro.intro
α✝ : Type u_1
β : Type u_2
ι : Type u_3
α : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderBot α
inst✝ : OrderTopology α
h✝ : Nontrivial α
h : HasBasis atBot (fun x => True) Iic
h_nhds : HasBasis (𝓝 ⊥) (fun a => ⊥ < a) fun a => Iio a
s : Set α
a : α
ha_bot_lt : ⊥ < a
h_Iio_a_subset_s : Iio a ⊆ s
⊢ Iic ⊥ ⊆ Iio a
[PROOFSTEP]
simpa only [Iic_bot, singleton_subset_iff, mem_Iio]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
⊢ ENNReal.ofReal (⨅ (i : α), f i) = ⨅ (i : α), ENNReal.ofReal (f i)
[PROOFSTEP]
by_cases hf : BddBelow (range f)
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : BddBelow (range f)
⊢ ENNReal.ofReal (⨅ (i : α), f i) = ⨅ (i : α), ENNReal.ofReal (f i)
[PROOFSTEP]
exact
  Monotone.map_ciInf_of_continuousAt ENNReal.continuous_ofReal.continuousAt
    (fun i j hij => ENNReal.ofReal_le_ofReal hij) hf
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
⊢ ENNReal.ofReal (⨅ (i : α), f i) = ⨅ (i : α), ENNReal.ofReal (f i)
[PROOFSTEP]
symm
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
⊢ ⨅ (i : α), ENNReal.ofReal (f i) = ENNReal.ofReal (⨅ (i : α), f i)
[PROOFSTEP]
rw [Real.iInf_of_not_bddBelow hf, ENNReal.ofReal_zero, ← ENNReal.bot_eq_zero, iInf_eq_bot]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
⊢ ∀ (b : ℝ≥0∞), b > ⊥ → ∃ i, ENNReal.ofReal (f i) < b
[PROOFSTEP]
obtain ⟨y, hy_mem, hy_neg⟩ := not_bddBelow_iff.mp hf 0
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
y : ℝ
hy_mem : y ∈ range f
hy_neg : y < 0
⊢ ∀ (b : ℝ≥0∞), b > ⊥ → ∃ i, ENNReal.ofReal (f i) < b
[PROOFSTEP]
obtain ⟨i, rfl⟩ := mem_range.mpr hy_mem
[GOAL]
case neg.intro.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
i : α
hy_mem : (fun y => f y) i ∈ range f
hy_neg : (fun y => f y) i < 0
⊢ ∀ (b : ℝ≥0∞), b > ⊥ → ∃ i, ENNReal.ofReal (f i) < b
[PROOFSTEP]
refine' fun x hx => ⟨i, _⟩
[GOAL]
case neg.intro.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
f : α → ℝ
inst✝ : Nonempty α
hf : ¬BddBelow (range f)
i : α
hy_mem : (fun y => f y) i ∈ range f
hy_neg : (fun y => f y) i < 0
x : ℝ≥0∞
hx : x > ⊥
⊢ ENNReal.ofReal (f i) < x
[PROOFSTEP]
rwa [ENNReal.ofReal_of_nonpos hy_neg.le]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
cases nonempty_encodable β
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
cases isEmpty_or_nonempty β
[GOAL]
case intro.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
conv =>
  lhs
  congr
  ·skip
  · ext x
    rw [WithTop.iInf_empty]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
  lhs
  congr
  ·skip
  · ext x
    rw [WithTop.iInf_empty]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
  lhs
  congr
  ·skip
  · ext x
    rw [WithTop.iInf_empty]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
lhs
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ
[PROOFSTEP]
congr
[GOAL]
case μ
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| μ
case f
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| fun a => ⨅ (b : β), f b a
[PROOFSTEP]
·skip
[GOAL]
case μ
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| μ
[PROOFSTEP]
skip
[GOAL]
case μ
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| μ
[PROOFSTEP]
skip
[GOAL]
case μ
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| μ
[PROOFSTEP]
skip
[GOAL]
case f
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| fun a => ⨅ (b : β), f b a
[PROOFSTEP]
· ext x
  rw [WithTop.iInf_empty]
[GOAL]
case f
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| fun a => ⨅ (b : β), f b a
[PROOFSTEP]
  ext x
  rw [WithTop.iInf_empty]
[GOAL]
case f
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| fun a => ⨅ (b : β), f b a
[PROOFSTEP]
  ext x
  rw [WithTop.iInf_empty]
[GOAL]
case f
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
| fun a => ⨅ (b : β), f b a
[PROOFSTEP]
ext x
[GOAL]
case f.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
x : α
| ⨅ (b : β), f b x
[PROOFSTEP]
rw [WithTop.iInf_empty]
[GOAL]
case intro.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
⊢ ∫⁻ (x : α), ⊤ ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
rw [WithTop.iInf_empty, lintegral_const]
[GOAL]
case intro.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
⊢ ⊤ * ↑↑μ univ = ⊤
[PROOFSTEP]
rw [ENNReal.top_mul', if_neg]
[GOAL]
case intro.inl.hnc
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : IsEmpty β
⊢ ¬↑↑μ univ = 0
[PROOFSTEP]
simp only [Measure.measure_univ_eq_zero, hμ, not_false_iff]
[GOAL]
case intro.inr
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
inhabit β
[GOAL]
case intro.inr
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
have : ∀ a, ⨅ b, f b a = ⨅ n, f (h_directed.sequence f n) a :=
  by
  refine' fun a =>
    le_antisymm (le_iInf fun n => iInf_le _ _) (le_iInf fun b => iInf_le_of_le (Encodable.encode b + 1) _)
  exact h_directed.sequence_le b a
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
⊢ ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
[PROOFSTEP]
refine' fun a => le_antisymm (le_iInf fun n => iInf_le _ _) (le_iInf fun b => iInf_le_of_le (Encodable.encode b + 1) _)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
a : α
b : β
⊢ f (Directed.sequence f h_directed (Encodable.encode b + 1)) a ≤ f b a
[PROOFSTEP]
exact h_directed.sequence_le b a
[GOAL]
case intro.inr
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
calc
  ∫⁻ a, ⨅ b, f b a ∂μ
  _ = ∫⁻ a, ⨅ n, (f ∘ h_directed.sequence f) n a ∂μ := by simp only [this, Function.comp_apply]
  _ = ⨅ n, ∫⁻ a, (f ∘ h_directed.sequence f) n a ∂μ :=
    by
    rw [lintegral_iInf ?_ h_directed.sequence_anti]
    · exact hf_int _
    · exact (fun n => hf _)
  _ = ⨅ b, ∫⁻ a, f b a ∂μ := by
    refine' le_antisymm (le_iInf fun b => _) (le_iInf fun n => _)
    · exact iInf_le_of_le (Encodable.encode b + 1) (lintegral_mono <| h_directed.sequence_le b)
    · exact iInf_le (fun b => ∫⁻ a, f b a ∂μ) _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ∫⁻ (a : α), ⨅ (b : β), f b a ∂μ = ∫⁻ (a : α), ⨅ (n : ℕ), (f ∘ Directed.sequence f h_directed) n a ∂μ
[PROOFSTEP]
simp only [this, Function.comp_apply]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ∫⁻ (a : α), ⨅ (n : ℕ), (f ∘ Directed.sequence f h_directed) n a ∂μ =
    ⨅ (n : ℕ), ∫⁻ (a : α), (f ∘ Directed.sequence f h_directed) n a ∂μ
[PROOFSTEP]
rw [lintegral_iInf ?_ h_directed.sequence_anti]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ∫⁻ (a : α), (f ∘ Directed.sequence f h_directed) 0 a ∂μ ≠ ⊤
[PROOFSTEP]
exact hf_int _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ∀ (n : ℕ), Measurable ((f ∘ Directed.sequence f h_directed) n)
[PROOFSTEP]
exact (fun n => hf _)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
⊢ ⨅ (n : ℕ), ∫⁻ (a : α), (f ∘ Directed.sequence f h_directed) n a ∂μ = ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
refine' le_antisymm (le_iInf fun b => _) (le_iInf fun n => _)
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
b : β
⊢ ⨅ (n : ℕ), ∫⁻ (a : α), (f ∘ Directed.sequence f h_directed) n a ∂μ ≤ ∫⁻ (a : α), f b a ∂μ
[PROOFSTEP]
exact iInf_le_of_le (Encodable.encode b + 1) (lintegral_mono <| h_directed.sequence_le b)
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
inst✝ : Countable β
f : β → α → ℝ≥0∞
μ : Measure α
hμ : μ ≠ 0
hf : ∀ (b : β), Measurable (f b)
hf_int : ∀ (b : β), ∫⁻ (a : α), f b a ∂μ ≠ ⊤
h_directed : Directed (fun x x_1 => x ≥ x_1) f
val✝ : Encodable β
h✝ : Nonempty β
inhabited_h : Inhabited β
this : ∀ (a : α), ⨅ (b : β), f b a = ⨅ (n : ℕ), f (Directed.sequence f h_directed n) a
n : ℕ
⊢ ⨅ (b : β), ∫⁻ (a : α), f b a ∂μ ≤ ∫⁻ (a : α), (f ∘ Directed.sequence f h_directed) n a ∂μ
[PROOFSTEP]
exact iInf_le (fun b => ∫⁻ a, f b a ∂μ) _
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℝ
s : Set α
hs : MeasurableSet s
⊢ ↑↑(IicSnd ρ r) s = ↑↑ρ (s ×ˢ Iic r)
[PROOFSTEP]
rw [IicSnd, fst_apply hs, restrict_apply' (MeasurableSet.univ.prod (measurableSet_Iic : MeasurableSet (Iic r))), ←
  prod_univ, prod_inter_prod, inter_univ, univ_inter]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r r' : ℝ
h_le : r ≤ r'
⊢ IicSnd ρ r ≤ IicSnd ρ r'
[PROOFSTEP]
intro s hs
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r r' : ℝ
h_le : r ≤ r'
s : Set α
hs : MeasurableSet s
⊢ ↑↑(IicSnd ρ r) s ≤ ↑↑(IicSnd ρ r') s
[PROOFSTEP]
simp_rw [IicSnd_apply ρ _ hs]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r r' : ℝ
h_le : r ≤ r'
s : Set α
hs : MeasurableSet s
⊢ ↑↑ρ (s ×ˢ Iic r) ≤ ↑↑ρ (s ×ˢ Iic r')
[PROOFSTEP]
refine' measure_mono (prod_subset_prod_iff.mpr (Or.inl ⟨subset_rfl, Iic_subset_Iic.mpr _⟩))
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r r' : ℝ
h_le : r ≤ r'
s : Set α
hs : MeasurableSet s
⊢ r ≤ r'
[PROOFSTEP]
exact_mod_cast h_le
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℝ
⊢ IicSnd ρ r ≤ fst ρ
[PROOFSTEP]
intro s hs
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℝ
s : Set α
hs : MeasurableSet s
⊢ ↑↑(IicSnd ρ r) s ≤ ↑↑(fst ρ) s
[PROOFSTEP]
simp_rw [fst_apply hs, IicSnd_apply ρ r hs]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℝ
s : Set α
hs : MeasurableSet s
⊢ ↑↑ρ (s ×ˢ Iic r) ≤ ↑↑ρ (Prod.fst ⁻¹' s)
[PROOFSTEP]
exact measure_mono (prod_subset_preimage_fst _ _)
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ⨅ (r : { r' // t < r' }), ↑↑(IicSnd ρ ↑↑r) s = ↑↑(IicSnd ρ ↑t) s
[PROOFSTEP]
simp_rw [ρ.IicSnd_apply _ hs]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ⨅ (r : { r' // t < r' }), ↑↑ρ (s ×ˢ Iic ↑↑r) = ↑↑ρ (s ×ˢ Iic ↑t)
[PROOFSTEP]
rw [← measure_iInter_eq_iInf]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ↑↑ρ (⋂ (i : { r' // t < r' }), s ×ˢ Iic ↑↑i) = ↑↑ρ (s ×ˢ Iic ↑t)
[PROOFSTEP]
rw [← prod_iInter]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ↑↑ρ (s ×ˢ ⋂ (i : { r' // t < r' }), Iic ↑↑i) = ↑↑ρ (s ×ˢ Iic ↑t)
[PROOFSTEP]
congr with x : 1
[GOAL]
case e_a.e_a.h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ x ∈ ⋂ (i : { r' // t < r' }), Iic ↑↑i ↔ x ∈ Iic ↑t
[PROOFSTEP]
simp only [mem_iInter, mem_Iic, Subtype.forall, Subtype.coe_mk]
[GOAL]
case e_a.e_a.h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ (∀ (a : ℚ), t < a → x ≤ ↑a) ↔ x ≤ ↑t
[PROOFSTEP]
refine' ⟨fun h => _, fun h a hta => h.trans _⟩
[GOAL]
case e_a.e_a.h.refine'_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
x : ℝ
h : ∀ (a : ℚ), t < a → x ≤ ↑a
⊢ x ≤ ↑t
[PROOFSTEP]
refine' le_of_forall_lt_rat_imp_le fun q htq => h q _
[GOAL]
case e_a.e_a.h.refine'_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
x : ℝ
h : ∀ (a : ℚ), t < a → x ≤ ↑a
q : ℚ
htq : ↑t < ↑q
⊢ t < q
[PROOFSTEP]
exact_mod_cast htq
[GOAL]
case e_a.e_a.h.refine'_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
x : ℝ
h : x ≤ ↑t
a : ℚ
hta : t < a
⊢ ↑t ≤ ↑a
[PROOFSTEP]
exact_mod_cast hta.le
[GOAL]
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i : { r' // t < r' }), MeasurableSet (s ×ˢ Iic ↑↑i)
[PROOFSTEP]
exact fun _ => hs.prod measurableSet_Iic
[GOAL]
case hd
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ Directed (fun x x_1 => x ⊇ x_1) fun r => s ×ˢ Iic ↑↑r
[PROOFSTEP]
refine' Monotone.directed_ge fun r r' hrr' => prod_subset_prod_iff.mpr (Or.inl ⟨subset_rfl, _⟩)
[GOAL]
case hd
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
r r' : { r' // t < r' }
hrr' : r ≤ r'
⊢ Iic ↑↑r ⊆ Iic ↑↑r'
[PROOFSTEP]
refine' Iic_subset_Iic.mpr _
[GOAL]
case hd
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
r r' : { r' // t < r' }
hrr' : r ≤ r'
⊢ ↑↑r ≤ ↑↑r'
[PROOFSTEP]
exact_mod_cast hrr'
[GOAL]
case hfin
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
t : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ∃ i, ↑↑ρ (s ×ˢ Iic ↑↑i) ≠ ⊤
[PROOFSTEP]
exact ⟨⟨t + 1, lt_add_one _⟩, measure_ne_top ρ _⟩
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
⊢ Tendsto (fun r => ↑↑(IicSnd ρ ↑r) s) atTop (𝓝 (↑↑(fst ρ) s))
[PROOFSTEP]
simp_rw [ρ.IicSnd_apply _ hs, fst_apply hs, ← prod_univ]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atTop (𝓝 (↑↑ρ (s ×ˢ univ)))
[PROOFSTEP]
rw [← Real.iUnion_Iic_rat, prod_iUnion]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atTop (𝓝 (↑↑ρ (⋃ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
refine' tendsto_measure_iUnion fun r q hr_le_q x => _
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
r q : ℚ
hr_le_q : r ≤ q
x : α × ℝ
⊢ x ∈ s ×ˢ Iic ↑r → x ∈ s ×ˢ Iic ↑q
[PROOFSTEP]
simp only [mem_prod, mem_Iic, and_imp]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
r q : ℚ
hr_le_q : r ≤ q
x : α × ℝ
⊢ x.fst ∈ s → x.snd ≤ ↑r → x.fst ∈ s ∧ x.snd ≤ ↑q
[PROOFSTEP]
refine' fun hxs hxr => ⟨hxs, hxr.trans _⟩
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set α
hs : MeasurableSet s
r q : ℚ
hr_le_q : r ≤ q
x : α × ℝ
hxs : x.fst ∈ s
hxr : x.snd ≤ ↑r
⊢ ↑r ≤ ↑q
[PROOFSTEP]
exact_mod_cast hr_le_q
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
⊢ Tendsto (fun r => ↑↑(IicSnd ρ ↑r) s) atBot (𝓝 0)
[PROOFSTEP]
simp_rw [ρ.IicSnd_apply _ hs]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 0)
[PROOFSTEP]
have h_empty : ρ (s ×ˢ ∅) = 0 := by simp only [prod_empty, measure_empty]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
⊢ ↑↑ρ (s ×ˢ ∅) = 0
[PROOFSTEP]
simp only [prod_empty, measure_empty]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 0)
[PROOFSTEP]
rw [← h_empty, ← Real.iInter_Iic_rat, prod_iInter]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
suffices h_neg : Tendsto (fun r : ℚ => ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (ρ (⋂ r : ℚ, s ×ˢ Iic ↑(-r))))
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
have h_inter_eq : ⋂ r : ℚ, s ×ˢ Iic ↑(-r) = ⋂ r : ℚ, s ×ˢ Iic (r : ℝ) :=
  by
  ext1 x
  simp only [Rat.cast_eq_id, id.def, mem_iInter, mem_prod, mem_Iic]
  refine' ⟨fun h i => ⟨(h i).1, _⟩, fun h i => ⟨(h i).1, _⟩⟩ <;> have h' := h (-i)
  · rw [neg_neg] at h' ; exact h'.2
  · exact h'.2
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
⊢ ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
[PROOFSTEP]
ext1 x
[GOAL]
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
⊢ x ∈ ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) ↔ x ∈ ⋂ (r : ℚ), s ×ˢ Iic ↑r
[PROOFSTEP]
simp only [Rat.cast_eq_id, id.def, mem_iInter, mem_prod, mem_Iic]
[GOAL]
case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
⊢ (∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑(-i)) ↔ ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑i
[PROOFSTEP]
refine' ⟨fun h i => ⟨(h i).1, _⟩, fun h i => ⟨(h i).1, _⟩⟩
[GOAL]
case h.refine'_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
h : ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑(-i)
i : ℚ
⊢ x.snd ≤ ↑i
[PROOFSTEP]
have h' := h (-i)
[GOAL]
case h.refine'_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
h : ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑i
i : ℚ
⊢ x.snd ≤ ↑(-i)
[PROOFSTEP]
have h' := h (-i)
[GOAL]
case h.refine'_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
h : ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑(-i)
i : ℚ
h' : x.fst ∈ s ∧ x.snd ≤ ↑(- -i)
⊢ x.snd ≤ ↑i
[PROOFSTEP]
rw [neg_neg] at h' 
[GOAL]
case h.refine'_1
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
h : ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑(-i)
i : ℚ
h' : x.fst ∈ s ∧ x.snd ≤ ↑i
⊢ x.snd ≤ ↑i
[PROOFSTEP]
exact h'.2
[GOAL]
case h.refine'_2
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
x : α × ℝ
h : ∀ (i : ℚ), x.fst ∈ s ∧ x.snd ≤ ↑i
i : ℚ
h' : x.fst ∈ s ∧ x.snd ≤ ↑(-i)
⊢ x.snd ≤ ↑(-i)
[PROOFSTEP]
exact h'.2
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
h_inter_eq : ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
rw [h_inter_eq] at h_neg 
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑r)))
h_inter_eq : ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
have h_fun_eq : (fun r : ℚ => ρ (s ×ˢ Iic (r : ℝ))) = fun r : ℚ => ρ (s ×ˢ Iic ↑(- -r)) := by simp_rw [neg_neg]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑r)))
h_inter_eq : ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
⊢ (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) = fun r => ↑↑ρ (s ×ˢ Iic ↑(- -r))
[PROOFSTEP]
simp_rw [neg_neg]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑r)))
h_inter_eq : ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
h_fun_eq : (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) = fun r => ↑↑ρ (s ×ˢ Iic ↑(- -r))
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
rw [h_fun_eq]
[GOAL]
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
h_neg : Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑r)))
h_inter_eq : ⋂ (r : ℚ), s ×ˢ Iic ↑(-r) = ⋂ (r : ℚ), s ×ˢ Iic ↑r
h_fun_eq : (fun r => ↑↑ρ (s ×ˢ Iic ↑r)) = fun r => ↑↑ρ (s ×ˢ Iic ↑(- -r))
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(- -r))) atBot (𝓝 (↑↑ρ (⋂ (i : ℚ), s ×ˢ Iic ↑i)))
[PROOFSTEP]
exact h_neg.comp tendsto_neg_atBot_atTop
[GOAL]
case h_neg
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
⊢ Tendsto (fun r => ↑↑ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), s ×ˢ Iic ↑(-r))))
[PROOFSTEP]
refine' tendsto_measure_iInter (fun q => hs.prod measurableSet_Iic) _ ⟨0, measure_ne_top ρ _⟩
[GOAL]
case h_neg
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
⊢ Antitone fun r => s ×ˢ Iic ↑(-r)
[PROOFSTEP]
refine' fun q r hqr => prod_subset_prod_iff.mpr (Or.inl ⟨subset_rfl, fun x hx => _⟩)
[GOAL]
case h_neg
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
q r : ℚ
hqr : q ≤ r
x : ℝ
hx : x ∈ Iic ↑(-r)
⊢ x ∈ Iic ↑(-q)
[PROOFSTEP]
simp only [Rat.cast_neg, mem_Iic] at hx ⊢
[GOAL]
case h_neg
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
q r : ℚ
hqr : q ≤ r
x : ℝ
hx : x ≤ -↑r
⊢ x ≤ -↑q
[PROOFSTEP]
refine' hx.trans (neg_le_neg _)
[GOAL]
case h_neg
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
s : Set α
hs : MeasurableSet s
h_empty : ↑↑ρ (s ×ˢ ∅) = 0
q r : ℚ
hqr : q ≤ r
x : ℝ
hx : x ≤ -↑r
⊢ ↑q ≤ ↑r
[PROOFSTEP]
exact_mod_cast hqr
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ↑↑(Measure.IicSnd ρ ↑r) s
[PROOFSTEP]
have : ∀ r, ∫⁻ x in s, preCdf ρ r x ∂ρ.fst = ∫⁻ x in s, (preCdf ρ r * 1) x ∂ρ.fst := by
  simp only [mul_one, eq_self_iff_true, forall_const]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
[PROOFSTEP]
simp only [mul_one, eq_self_iff_true, forall_const]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
this : ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
⊢ ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ↑↑(Measure.IicSnd ρ ↑r) s
[PROOFSTEP]
rw [this, ← set_lintegral_withDensity_eq_set_lintegral_mul _ measurable_preCdf _ hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
this : ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
⊢ ∫⁻ (x : α) in s, OfNat.ofNat 1 x ∂Measure.withDensity (Measure.fst ρ) (preCdf ρ r) = ↑↑(Measure.IicSnd ρ ↑r) s
[PROOFSTEP]
simp only [withDensity_preCdf ρ r, Pi.one_apply, lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
this : ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
⊢ Measurable 1
[PROOFSTEP]
rw [(_ : (1 : α → ℝ≥0∞) = fun _ => 1)]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
this : ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
⊢ Measurable fun x => 1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
r : ℚ
s : Set α
hs : MeasurableSet s
inst✝ : IsFiniteMeasure ρ
this : ∀ (r : ℚ), ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ = ∫⁻ (x : α) in s, (preCdf ρ r * 1) x ∂Measure.fst ρ
⊢ 1 = fun x => 1
[PROOFSTEP]
exacts [measurable_const, rfl]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
[PROOFSTEP]
simp_rw [Monotone, ae_all_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i i_1 : ℚ), i ≤ i_1 → ∀ᵐ (a : α) ∂Measure.fst ρ, preCdf ρ i a ≤ preCdf ρ i_1 a
[PROOFSTEP]
refine' fun r r' hrr' =>
  ae_le_of_forall_set_lintegral_le_of_sigmaFinite measurable_preCdf measurable_preCdf fun s hs _ => _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r r' : ℚ
hrr' : r ≤ r'
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ ≤ ∫⁻ (x : α) in s, preCdf ρ r' x ∂Measure.fst ρ
[PROOFSTEP]
rw [set_lintegral_preCdf_fst ρ r hs, set_lintegral_preCdf_fst ρ r' hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r r' : ℚ
hrr' : r ≤ r'
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ↑↑(Measure.IicSnd ρ ↑r) s ≤ ↑↑(Measure.IicSnd ρ ↑r') s
[PROOFSTEP]
refine' Measure.IicSnd_mono ρ _ s hs
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r r' : ℚ
hrr' : r ≤ r'
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ↑r ≤ ↑r'
[PROOFSTEP]
exact_mod_cast hrr'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ = ↑↑(Measure.IicSnd ρ ↑t) s
[PROOFSTEP]
refine' le_antisymm _ _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ↑↑(Measure.IicSnd ρ ↑t) s
[PROOFSTEP]
have h : ∀ q : Ioi t, ∫⁻ x in s, ⨅ r : Ioi t, preCdf ρ r x ∂ρ.fst ≤ ρ.IicSnd q s :=
  by
  intro q
  rw [← set_lintegral_preCdf_fst ρ _ hs]
  refine' set_lintegral_mono_ae _ measurable_preCdf _
  · exact measurable_iInf fun _ => measurable_preCdf
  · filter_upwards [monotone_preCdf _] with a _
    exact fun _ => iInf_le _ q
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∀ (q : ↑(Ioi t)), ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ↑↑(Measure.IicSnd ρ ↑↑q) s
[PROOFSTEP]
intro q
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
q : ↑(Ioi t)
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ↑↑(Measure.IicSnd ρ ↑↑q) s
[PROOFSTEP]
rw [← set_lintegral_preCdf_fst ρ _ hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
q : ↑(Ioi t)
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ∫⁻ (x : α) in s, preCdf ρ (↑q) x ∂Measure.fst ρ
[PROOFSTEP]
refine' set_lintegral_mono_ae _ measurable_preCdf _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
q : ↑(Ioi t)
⊢ Measurable fun x => ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x
[PROOFSTEP]
exact measurable_iInf fun _ => measurable_preCdf
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
q : ↑(Ioi t)
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, x ∈ s → ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ≤ preCdf ρ (↑q) x
[PROOFSTEP]
filter_upwards [monotone_preCdf _] with a _
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
q : ↑(Ioi t)
a : α
a✝ : Monotone fun r => preCdf ρ r a
⊢ a ∈ s → ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a ≤ preCdf ρ (↑q) a
[PROOFSTEP]
exact fun _ => iInf_le _ q
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
h : ∀ (q : ↑(Ioi t)), ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ↑↑(Measure.IicSnd ρ ↑↑q) s
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ ≤ ↑↑(Measure.IicSnd ρ ↑t) s
[PROOFSTEP]
calc
  ∫⁻ x in s, ⨅ r : Ioi t, preCdf ρ r x ∂ρ.fst ≤ ⨅ q : Ioi t, ρ.IicSnd q s := le_iInf h
  _ = ρ.IicSnd t s := Measure.iInf_IicSnd_gt ρ t hs
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ↑↑(Measure.IicSnd ρ ↑t) s ≤ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ
[PROOFSTEP]
rw [(set_lintegral_preCdf_fst ρ t hs).symm]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, preCdf ρ t x ∂Measure.fst ρ ≤ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ
[PROOFSTEP]
refine' set_lintegral_mono_ae measurable_preCdf _ _
[GOAL]
case refine'_2.refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ Measurable fun x => ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x
[PROOFSTEP]
exact measurable_iInf fun _ => measurable_preCdf
[GOAL]
case refine'_2.refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, x ∈ s → preCdf ρ t x ≤ ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x
[PROOFSTEP]
filter_upwards [monotone_preCdf _] with a ha_mono
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
a : α
ha_mono : Monotone fun r => preCdf ρ r a
⊢ a ∈ s → preCdf ρ t a ≤ ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a
[PROOFSTEP]
exact fun _ => le_iInf fun r => ha_mono (le_of_lt r.prop)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
[PROOFSTEP]
rw [ae_all_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i : ℚ), ∀ᵐ (a : α) ∂Measure.fst ρ, preCdf ρ i a ≤ 1
[PROOFSTEP]
refine' fun r => ae_le_of_forall_set_lintegral_le_of_sigmaFinite measurable_preCdf measurable_const fun s hs _ => _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ∫⁻ (x : α) in s, preCdf ρ r x ∂Measure.fst ρ ≤ ∫⁻ (x : α) in s, 1 ∂Measure.fst ρ
[PROOFSTEP]
rw [set_lintegral_preCdf_fst ρ r hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ↑↑(Measure.IicSnd ρ ↑r) s ≤ ∫⁻ (x : α) in s, 1 ∂Measure.fst ρ
[PROOFSTEP]
simp only [Pi.one_apply, lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ↑↑(Measure.IicSnd ρ ↑r) s ≤ ↑↑(Measure.fst ρ) s
[PROOFSTEP]
exact Measure.IicSnd_le_fst ρ r s hs
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ r a ∂Measure.fst ρ) atTop (𝓝 (↑↑ρ univ))
[PROOFSTEP]
convert ρ.tendsto_IicSnd_atTop MeasurableSet.univ
[GOAL]
case h.e'_3.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x✝ : ℚ
⊢ ∫⁻ (a : α), preCdf ρ x✝ a ∂Measure.fst ρ = ↑↑(Measure.IicSnd ρ ↑x✝) univ
[PROOFSTEP]
rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ]
[GOAL]
case h.e'_5.h.e'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ↑↑ρ univ = ↑↑(Measure.fst ρ) univ
[PROOFSTEP]
exact Measure.fst_univ.symm
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ r a ∂Measure.fst ρ) atBot (𝓝 0)
[PROOFSTEP]
convert ρ.tendsto_IicSnd_atBot MeasurableSet.univ
[GOAL]
case h.e'_3.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x✝ : ℚ
⊢ ∫⁻ (a : α), preCdf ρ x✝ a ∂Measure.fst ρ = ↑↑(Measure.IicSnd ρ ↑x✝) univ
[PROOFSTEP]
rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have h_mono := monotone_preCdf ρ
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have h_le_one := preCdf_le_one ρ
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have h_exists : ∀ᵐ a ∂ρ.fst, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) :=
  by
  filter_upwards [h_mono, h_le_one] with a ha_mono ha_le_one
  have h_tendsto : Tendsto (fun r => preCdf ρ r a) atTop atTop ∨ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) :=
    tendsto_of_monotone ha_mono
  cases' h_tendsto with h_absurd h_tendsto
  · rw [Monotone.tendsto_atTop_atTop_iff ha_mono] at h_absurd 
    obtain ⟨r, hr⟩ := h_absurd 2
    exact absurd (hr.trans (ha_le_one r)) ENNReal.one_lt_two.not_le
  · exact h_tendsto
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
filter_upwards [h_mono, h_le_one] with a ha_mono ha_le_one
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
have h_tendsto : Tendsto (fun r => preCdf ρ r a) atTop atTop ∨ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) :=
  tendsto_of_monotone ha_mono
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_tendsto : Tendsto (fun r => preCdf ρ r a) atTop atTop ∨ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
cases' h_tendsto with h_absurd h_tendsto
[GOAL]
case h.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_absurd : Tendsto (fun r => preCdf ρ r a) atTop atTop
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
rw [Monotone.tendsto_atTop_atTop_iff ha_mono] at h_absurd 
[GOAL]
case h.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_absurd : ∀ (b : ℝ≥0∞), ∃ a_1, b ≤ preCdf ρ a_1 a
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
obtain ⟨r, hr⟩ := h_absurd 2
[GOAL]
case h.inl.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_absurd : ∀ (b : ℝ≥0∞), ∃ a_1, b ≤ preCdf ρ a_1 a
r : ℚ
hr : 2 ≤ preCdf ρ r a
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
exact absurd (hr.trans (ha_le_one r)) ENNReal.one_lt_two.not_le
[GOAL]
case h.inr
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
a : α
ha_mono : Monotone fun r => preCdf ρ r a
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_tendsto : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
[PROOFSTEP]
exact h_tendsto
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
classical
  -- let `F` be the pointwise limit of `preCdf` where it exists, and 0 elsewhere.
let F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then h.choose else 0
have h_tendsto_ℚ : ∀ᵐ a ∂ρ.fst, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a)) :=
  by
  filter_upwards [h_exists] with a ha
  simp_rw [dif_pos ha]
  exact ha.choose_spec
have h_tendsto_ℕ : ∀ᵐ a ∂ρ.fst, Tendsto (fun n : ℕ => preCdf ρ n a) atTop (𝓝 (F a)) := by
  filter_upwards [h_tendsto_ℚ] with a ha using ha.comp tendsto_nat_cast_atTop_atTop
have hF_ae_meas : AEMeasurable F ρ.fst :=
  by
  refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto_ℚ
  exact measurable_preCdf.aemeasurable
have hF_le_one : ∀ᵐ a ∂ρ.fst, F a ≤ 1 := by
  filter_upwards [h_tendsto_ℚ, h_le_one] with a ha ha_le using le_of_tendsto' ha ha_le
suffices ∀ᵐ a ∂ρ.fst, F a = 1 by
  filter_upwards [h_tendsto_ℚ, this] with a ha_tendsto ha_eq
  rwa [ha_eq] at ha_tendsto 
have h_lintegral_eq : ∫⁻ a, F a ∂ρ.fst = ∫⁻ _, 1 ∂ρ.fst :=
  by
  have h_lintegral : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ a, F a ∂ρ.fst)) :=
    by
    refine'
      lintegral_tendsto_of_tendsto_of_monotone
        (
          -- does this exist only for ℕ?fun _ => measurable_preCdf.aemeasurable)
        _ h_tendsto_ℕ
    filter_upwards [h_mono] with a ha
    refine' fun n m hnm => ha _
    exact_mod_cast hnm
  have h_lintegral' : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ _, 1 ∂ρ.fst)) :=
    by
    rw [lintegral_one, Measure.fst_univ]
    exact (tendsto_lintegral_preCdf_atTop ρ).comp tendsto_nat_cast_atTop_atTop
  exact tendsto_nhds_unique h_lintegral h_lintegral'
have : ∫⁻ a, 1 - F a ∂ρ.fst = 0 :=
  by
  rw [lintegral_sub' hF_ae_meas _ hF_le_one, h_lintegral_eq, tsub_self]
  calc
    ∫⁻ a, F a ∂ρ.fst = ∫⁻ _, 1 ∂ρ.fst := h_lintegral_eq
    _ = ρ.fst univ := lintegral_one
    _ = ρ univ := Measure.fst_univ
    _ ≠ ∞ := measure_ne_top ρ _
rw [lintegral_eq_zero_iff' (aemeasurable_const.sub hF_ae_meas)] at this 
filter_upwards [this, hF_le_one] with ha h_one_sub_eq_zero h_le_one
rw [Pi.zero_apply, tsub_eq_zero_iff_le] at h_one_sub_eq_zero 
exact le_antisymm h_le_one h_one_sub_eq_zero
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
let F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then h.choose else 0
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have h_tendsto_ℚ : ∀ᵐ a ∂ρ.fst, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a)) :=
  by
  filter_upwards [h_exists] with a ha
  simp_rw [dif_pos ha]
  exact ha.choose_spec
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
[PROOFSTEP]
filter_upwards [h_exists] with a ha
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
a : α
ha : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ Tendsto (fun r => preCdf ρ r a) atTop
    (𝓝 (if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0))
[PROOFSTEP]
simp_rw [dif_pos ha]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
a : α
ha : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
⊢ Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (Exists.choose ha))
[PROOFSTEP]
exact ha.choose_spec
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have h_tendsto_ℕ : ∀ᵐ a ∂ρ.fst, Tendsto (fun n : ℕ => preCdf ρ n a) atTop (𝓝 (F a)) := by
  filter_upwards [h_tendsto_ℚ] with a ha using ha.comp tendsto_nat_cast_atTop_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
[PROOFSTEP]
filter_upwards [h_tendsto_ℚ] with a ha using ha.comp tendsto_nat_cast_atTop_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have hF_ae_meas : AEMeasurable F ρ.fst :=
  by
  refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto_ℚ
  exact measurable_preCdf.aemeasurable
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
⊢ AEMeasurable F
[PROOFSTEP]
refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto_ℚ
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
n : ℚ
⊢ AEMeasurable fun x => preCdf ρ n x
[PROOFSTEP]
exact measurable_preCdf.aemeasurable
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
have hF_le_one : ∀ᵐ a ∂ρ.fst, F a ≤ 1 := by
  filter_upwards [h_tendsto_ℚ, h_le_one] with a ha ha_le using le_of_tendsto' ha ha_le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
[PROOFSTEP]
filter_upwards [h_tendsto_ℚ, h_le_one] with a ha ha_le using le_of_tendsto' ha ha_le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
suffices ∀ᵐ a ∂ρ.fst, F a = 1 by
  filter_upwards [h_tendsto_ℚ, this] with a ha_tendsto ha_eq
  rwa [ha_eq] at ha_tendsto 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
this : ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
filter_upwards [h_tendsto_ℚ, this] with a ha_tendsto ha_eq
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
this : ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
a : α
ha_tendsto :
  Tendsto (fun r => preCdf ρ r a) atTop
    (𝓝 (if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0))
ha_eq : (if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0) = 1
⊢ Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
rwa [ha_eq] at ha_tendsto 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
[PROOFSTEP]
have h_lintegral_eq : ∫⁻ a, F a ∂ρ.fst = ∫⁻ _, 1 ∂ρ.fst :=
  by
  have h_lintegral : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ a, F a ∂ρ.fst)) :=
    by
    refine'
      lintegral_tendsto_of_tendsto_of_monotone
        (
          -- does this exist only for ℕ?fun _ => measurable_preCdf.aemeasurable)
        _ h_tendsto_ℕ
    filter_upwards [h_mono] with a ha
    refine' fun n m hnm => ha _
    exact_mod_cast hnm
  have h_lintegral' : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ _, 1 ∂ρ.fst)) :=
    by
    rw [lintegral_one, Measure.fst_univ]
    exact (tendsto_lintegral_preCdf_atTop ρ).comp tendsto_nat_cast_atTop_atTop
  exact tendsto_nhds_unique h_lintegral h_lintegral'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
[PROOFSTEP]
have h_lintegral : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ a, F a ∂ρ.fst)) :=
  by
  refine'
    lintegral_tendsto_of_tendsto_of_monotone
      (
        -- does this exist only for ℕ?fun _ => measurable_preCdf.aemeasurable)
      _ h_tendsto_ℕ
  filter_upwards [h_mono] with a ha
  refine' fun n m hnm => ha _
  exact_mod_cast hnm
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
[PROOFSTEP]
refine'
  lintegral_tendsto_of_tendsto_of_monotone
    (
      -- does this exist only for ℕ?fun _ => measurable_preCdf.aemeasurable)
    _ h_tendsto_ℕ
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
⊢ ∀ᵐ (x : α) ∂Measure.fst ρ, Monotone fun n => preCdf ρ (↑n) x
[PROOFSTEP]
filter_upwards [h_mono] with a ha
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
a : α
ha : Monotone fun r => preCdf ρ r a
⊢ Monotone fun n => preCdf ρ (↑n) a
[PROOFSTEP]
refine' fun n m hnm => ha _
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
a : α
ha : Monotone fun r => preCdf ρ r a
n m : ℕ
hnm : n ≤ m
⊢ ↑n ≤ ↑m
[PROOFSTEP]
exact_mod_cast hnm
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
[PROOFSTEP]
have h_lintegral' : Tendsto (fun r : ℕ => ∫⁻ a, preCdf ρ r a ∂ρ.fst) atTop (𝓝 (∫⁻ _, 1 ∂ρ.fst)) :=
  by
  rw [lintegral_one, Measure.fst_univ]
  exact (tendsto_lintegral_preCdf_atTop ρ).comp tendsto_nat_cast_atTop_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (x : α), 1 ∂Measure.fst ρ))
[PROOFSTEP]
rw [lintegral_one, Measure.fst_univ]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (↑↑ρ univ))
[PROOFSTEP]
exact (tendsto_lintegral_preCdf_atTop ρ).comp tendsto_nat_cast_atTop_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral' : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (↑r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (x : α), 1 ∂Measure.fst ρ))
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
[PROOFSTEP]
exact tendsto_nhds_unique h_lintegral h_lintegral'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
[PROOFSTEP]
have : ∫⁻ a, 1 - F a ∂ρ.fst = 0 :=
  by
  rw [lintegral_sub' hF_ae_meas _ hF_le_one, h_lintegral_eq, tsub_self]
  calc
    ∫⁻ a, F a ∂ρ.fst = ∫⁻ _, 1 ∂ρ.fst := h_lintegral_eq
    _ = ρ.fst univ := lintegral_one
    _ = ρ univ := Measure.fst_univ
    _ ≠ ∞ := measure_ne_top ρ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
⊢ ∫⁻ (a : α), 1 - F a ∂Measure.fst ρ = 0
[PROOFSTEP]
rw [lintegral_sub' hF_ae_meas _ hF_le_one, h_lintegral_eq, tsub_self]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ ≠ ⊤
[PROOFSTEP]
calc
  ∫⁻ a, F a ∂ρ.fst = ∫⁻ _, 1 ∂ρ.fst := h_lintegral_eq
  _ = ρ.fst univ := lintegral_one
  _ = ρ univ := Measure.fst_univ
  _ ≠ ∞ := measure_ne_top ρ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
this : ∫⁻ (a : α), 1 - F a ∂Measure.fst ρ = 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
[PROOFSTEP]
rw [lintegral_eq_zero_iff' (aemeasurable_const.sub hF_ae_meas)] at this 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
this : (fun a => 1 - F a) =ᵐ[Measure.fst ρ] 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, F a = 1
[PROOFSTEP]
filter_upwards [this, hF_le_one] with ha h_one_sub_eq_zero h_le_one
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one✝ : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
this : (fun a => 1 - F a) =ᵐ[Measure.fst ρ] 0
ha : α
h_one_sub_eq_zero :
  (1 - if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0) = OfNat.ofNat 0 ha
h_le_one : (if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0) ≤ 1
⊢ (if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0) = 1
[PROOFSTEP]
rw [Pi.zero_apply, tsub_eq_zero_iff_le] at h_one_sub_eq_zero 
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_mono : ∀ᵐ (a : α) ∂Measure.fst ρ, Monotone fun r => preCdf ρ r a
h_le_one✝ : ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (r : ℚ), preCdf ρ r a ≤ 1
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto_ℚ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atTop (𝓝 (F a))
h_tendsto_ℕ : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun n => preCdf ρ (↑n) a) atTop (𝓝 (F a))
hF_ae_meas : AEMeasurable F
hF_le_one : ∀ᵐ (a : α) ∂Measure.fst ρ, F a ≤ 1
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = ∫⁻ (x : α), 1 ∂Measure.fst ρ
this : (fun a => 1 - F a) =ᵐ[Measure.fst ρ] 0
ha : α
h_one_sub_eq_zero : 1 ≤ if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0
h_le_one : (if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0) ≤ 1
⊢ (if h : ∃ l, Tendsto (fun r => preCdf ρ r ha) atTop (𝓝 l) then Exists.choose h else 0) = 1
[PROOFSTEP]
exact le_antisymm h_le_one h_one_sub_eq_zero
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
[PROOFSTEP]
suffices ∀ᵐ a ∂ρ.fst, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
  by
  filter_upwards [this] with a ha
  have h_eq_neg : (fun r : ℚ => preCdf ρ r a) = fun r : ℚ => preCdf ρ (- -r) a := by simp_rw [neg_neg]
  rw [h_eq_neg]
  exact ha.comp tendsto_neg_atBot_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
this : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
[PROOFSTEP]
filter_upwards [this] with a ha
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
this : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
a : α
ha : Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
⊢ Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
[PROOFSTEP]
have h_eq_neg : (fun r : ℚ => preCdf ρ r a) = fun r : ℚ => preCdf ρ (- -r) a := by simp_rw [neg_neg]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
this : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
a : α
ha : Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
⊢ (fun r => preCdf ρ r a) = fun r => preCdf ρ (- -r) a
[PROOFSTEP]
simp_rw [neg_neg]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
this : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
a : α
ha : Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
h_eq_neg : (fun r => preCdf ρ r a) = fun r => preCdf ρ (- -r) a
⊢ Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
[PROOFSTEP]
rw [h_eq_neg]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
this : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
a : α
ha : Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
h_eq_neg : (fun r => preCdf ρ r a) = fun r => preCdf ρ (- -r) a
⊢ Tendsto (fun r => preCdf ρ (- -r) a) atBot (𝓝 0)
[PROOFSTEP]
exact ha.comp tendsto_neg_atBot_atTop
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
have h_exists : ∀ᵐ a ∂ρ.fst, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) :=
  by
  filter_upwards [monotone_preCdf ρ] with a ha
  have h_anti : Antitone fun r => preCdf ρ (-r) a := fun p q hpq => ha (neg_le_neg hpq)
  have h_tendsto :
    Tendsto (fun r => preCdf ρ (-r) a) atTop atBot ∨ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) :=
    tendsto_of_antitone h_anti
  cases' h_tendsto with h_bot h_tendsto
  · exact ⟨0, Tendsto.mono_right h_bot atBot_le_nhds_bot⟩
  · exact h_tendsto
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
filter_upwards [monotone_preCdf ρ] with a ha
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
ha : Monotone fun r => preCdf ρ r a
⊢ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
have h_anti : Antitone fun r => preCdf ρ (-r) a := fun p q hpq => ha (neg_le_neg hpq)
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
ha : Monotone fun r => preCdf ρ r a
h_anti : Antitone fun r => preCdf ρ (-r) a
⊢ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
have h_tendsto : Tendsto (fun r => preCdf ρ (-r) a) atTop atBot ∨ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) :=
  tendsto_of_antitone h_anti
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
ha : Monotone fun r => preCdf ρ r a
h_anti : Antitone fun r => preCdf ρ (-r) a
h_tendsto : Tendsto (fun r => preCdf ρ (-r) a) atTop atBot ∨ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
cases' h_tendsto with h_bot h_tendsto
[GOAL]
case h.inl
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
ha : Monotone fun r => preCdf ρ r a
h_anti : Antitone fun r => preCdf ρ (-r) a
h_bot : Tendsto (fun r => preCdf ρ (-r) a) atTop atBot
⊢ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
exact ⟨0, Tendsto.mono_right h_bot atBot_le_nhds_bot⟩
[GOAL]
case h.inr
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
ha : Monotone fun r => preCdf ρ r a
h_anti : Antitone fun r => preCdf ρ (-r) a
h_tendsto : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
[PROOFSTEP]
exact h_tendsto
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
classical
let F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then h.choose else 0
have h_tendsto : ∀ᵐ a ∂ρ.fst, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a)) :=
  by
  filter_upwards [h_exists] with a ha
  simp_rw [dif_pos ha]
  exact ha.choose_spec
suffices h_lintegral_eq : ∫⁻ a, F a ∂ρ.fst = 0
· have hF_ae_meas : AEMeasurable F ρ.fst :=
    by
    refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto
    exact measurable_preCdf.aemeasurable
  rw [lintegral_eq_zero_iff' hF_ae_meas] at h_lintegral_eq 
  filter_upwards [h_tendsto, h_lintegral_eq] with a ha_tendsto ha_eq
  rwa [ha_eq] at ha_tendsto 
have h_lintegral : Tendsto (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) atTop (𝓝 (∫⁻ a, F a ∂ρ.fst)) :=
  by
  refine'
    tendsto_lintegral_filter_of_dominated_convergence (fun _ => 1) (eventually_of_forall fun _ => measurable_preCdf)
      (eventually_of_forall fun _ => _) _ h_tendsto
  · filter_upwards [preCdf_le_one ρ] with a ha using ha _
  · rw [lintegral_one]
    exact measure_ne_top _ _
have h_lintegral' : Tendsto (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) atTop (𝓝 0) :=
  by
  have h_lintegral_eq : (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) = fun r : ℚ => ρ (univ ×ˢ Iic (-r : ℝ)) :=
    by
    ext1 n
    rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ, Measure.IicSnd_univ]
    norm_cast
  rw [h_lintegral_eq]
  have h_zero_eq_measure_iInter : (0 : ℝ≥0∞) = ρ (⋂ r : ℚ, univ ×ˢ Iic (-r : ℝ)) :=
    by
    suffices ⋂ r : ℚ, Iic (-(r : ℝ)) = ∅ by rw [← prod_iInter, this, prod_empty, measure_empty]
    ext1 x
    simp only [mem_iInter, mem_Iic, mem_empty_iff_false, iff_false_iff, not_forall, not_le]
    simp_rw [neg_lt]
    exact exists_rat_gt _
  rw [h_zero_eq_measure_iInter]
  refine'
    tendsto_measure_iInter (fun n => MeasurableSet.univ.prod measurableSet_Iic) (fun i j hij x => _)
      ⟨0, measure_ne_top ρ _⟩
  simp only [mem_prod, mem_univ, mem_Iic, true_and_iff]
  refine' fun hxj => hxj.trans (neg_le_neg _)
  exact_mod_cast hij
exact tendsto_nhds_unique h_lintegral h_lintegral'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
let F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then h.choose else 0
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
have h_tendsto : ∀ᵐ a ∂ρ.fst, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a)) :=
  by
  filter_upwards [h_exists] with a ha
  simp_rw [dif_pos ha]
  exact ha.choose_spec
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
[PROOFSTEP]
filter_upwards [h_exists] with a ha
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
a : α
ha : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ Tendsto (fun r => preCdf ρ (-r) a) atTop
    (𝓝 (if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0))
[PROOFSTEP]
simp_rw [dif_pos ha]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
a : α
ha : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
⊢ Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (Exists.choose ha))
[PROOFSTEP]
exact ha.choose_spec
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
suffices h_lintegral_eq : ∫⁻ a, F a ∂ρ.fst = 0
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
have hF_ae_meas : AEMeasurable F ρ.fst :=
  by
  refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto
  exact measurable_preCdf.aemeasurable
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
⊢ AEMeasurable F
[PROOFSTEP]
refine' aemeasurable_of_tendsto_metrizable_ae _ (fun n => _) h_tendsto
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
n : ℚ
⊢ AEMeasurable fun x => preCdf ρ (-n) x
[PROOFSTEP]
exact measurable_preCdf.aemeasurable
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
hF_ae_meas : AEMeasurable F
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
rw [lintegral_eq_zero_iff' hF_ae_meas] at h_lintegral_eq 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : F =ᵐ[Measure.fst ρ] 0
hF_ae_meas : AEMeasurable F
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
filter_upwards [h_tendsto, h_lintegral_eq] with a ha_tendsto ha_eq
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral_eq : F =ᵐ[Measure.fst ρ] 0
hF_ae_meas : AEMeasurable F
a : α
ha_tendsto :
  Tendsto (fun r => preCdf ρ (-r) a) atTop
    (𝓝 (if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0))
ha_eq : (if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0) = OfNat.ofNat 0 a
⊢ Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 0)
[PROOFSTEP]
rwa [ha_eq] at ha_tendsto 
[GOAL]
case h_lintegral_eq
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
[PROOFSTEP]
have h_lintegral : Tendsto (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) atTop (𝓝 (∫⁻ a, F a ∂ρ.fst)) :=
  by
  refine'
    tendsto_lintegral_filter_of_dominated_convergence (fun _ => 1) (eventually_of_forall fun _ => measurable_preCdf)
      (eventually_of_forall fun _ => _) _ h_tendsto
  · filter_upwards [preCdf_le_one ρ] with a ha using ha _
  · rw [lintegral_one]
    exact measure_ne_top _ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
[PROOFSTEP]
refine'
  tendsto_lintegral_filter_of_dominated_convergence (fun _ => 1) (eventually_of_forall fun _ => measurable_preCdf)
    (eventually_of_forall fun _ => _) _ h_tendsto
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
x✝ : ℚ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, preCdf ρ (-x✝) a ≤ (fun x => 1) a
[PROOFSTEP]
filter_upwards [preCdf_le_one ρ] with a ha using ha _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
⊢ ∫⁻ (a : α), (fun x => 1) a ∂Measure.fst ρ ≠ ⊤
[PROOFSTEP]
rw [lintegral_one]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
⊢ ↑↑(Measure.fst ρ) univ ≠ ⊤
[PROOFSTEP]
exact measure_ne_top _ _
[GOAL]
case h_lintegral_eq
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
[PROOFSTEP]
have h_lintegral' : Tendsto (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) atTop (𝓝 0) :=
  by
  have h_lintegral_eq : (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) = fun r : ℚ => ρ (univ ×ˢ Iic (-r : ℝ)) :=
    by
    ext1 n
    rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ, Measure.IicSnd_univ]
    norm_cast
  rw [h_lintegral_eq]
  have h_zero_eq_measure_iInter : (0 : ℝ≥0∞) = ρ (⋂ r : ℚ, univ ×ˢ Iic (-r : ℝ)) :=
    by
    suffices ⋂ r : ℚ, Iic (-(r : ℝ)) = ∅ by rw [← prod_iInter, this, prod_empty, measure_empty]
    ext1 x
    simp only [mem_iInter, mem_Iic, mem_empty_iff_false, iff_false_iff, not_forall, not_le]
    simp_rw [neg_lt]
    exact exists_rat_gt _
  rw [h_zero_eq_measure_iInter]
  refine'
    tendsto_measure_iInter (fun n => MeasurableSet.univ.prod measurableSet_Iic) (fun i j hij x => _)
      ⟨0, measure_ne_top ρ _⟩
  simp only [mem_prod, mem_univ, mem_Iic, true_and_iff]
  refine' fun hxj => hxj.trans (neg_le_neg _)
  exact_mod_cast hij
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 0)
[PROOFSTEP]
have h_lintegral_eq : (fun r => ∫⁻ a, preCdf ρ (-r) a ∂ρ.fst) = fun r : ℚ => ρ (univ ×ˢ Iic (-r : ℝ)) :=
  by
  ext1 n
  rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ, Measure.IicSnd_univ]
  norm_cast
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
⊢ (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
[PROOFSTEP]
ext1 n
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
n : ℚ
⊢ ∫⁻ (a : α), preCdf ρ (-n) a ∂Measure.fst ρ = ↑↑ρ (univ ×ˢ Iic (-↑n))
[PROOFSTEP]
rw [← set_lintegral_univ, set_lintegral_preCdf_fst ρ _ MeasurableSet.univ, Measure.IicSnd_univ]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
n : ℚ
⊢ ↑↑ρ (univ ×ˢ Iic ↑(-n)) = ↑↑ρ (univ ×ˢ Iic (-↑n))
[PROOFSTEP]
norm_cast
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
⊢ Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 0)
[PROOFSTEP]
rw [h_lintegral_eq]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
⊢ Tendsto (fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))) atTop (𝓝 0)
[PROOFSTEP]
have h_zero_eq_measure_iInter : (0 : ℝ≥0∞) = ρ (⋂ r : ℚ, univ ×ˢ Iic (-r : ℝ)) :=
  by
  suffices ⋂ r : ℚ, Iic (-(r : ℝ)) = ∅ by rw [← prod_iInter, this, prod_empty, measure_empty]
  ext1 x
  simp only [mem_iInter, mem_Iic, mem_empty_iff_false, iff_false_iff, not_forall, not_le]
  simp_rw [neg_lt]
  exact exists_rat_gt _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
⊢ 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
[PROOFSTEP]
suffices ⋂ r : ℚ, Iic (-(r : ℝ)) = ∅ by rw [← prod_iInter, this, prod_empty, measure_empty]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
this : ⋂ (r : ℚ), Iic (-↑r) = ∅
⊢ 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
[PROOFSTEP]
rw [← prod_iInter, this, prod_empty, measure_empty]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
⊢ ⋂ (r : ℚ), Iic (-↑r) = ∅
[PROOFSTEP]
ext1 x
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
x : ℝ
⊢ x ∈ ⋂ (r : ℚ), Iic (-↑r) ↔ x ∈ ∅
[PROOFSTEP]
simp only [mem_iInter, mem_Iic, mem_empty_iff_false, iff_false_iff, not_forall, not_le]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
x : ℝ
⊢ ∃ x_1, -↑x_1 < x
[PROOFSTEP]
simp_rw [neg_lt]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
x : ℝ
⊢ ∃ x_1, -x < ↑x_1
[PROOFSTEP]
exact exists_rat_gt _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
h_zero_eq_measure_iInter : 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
⊢ Tendsto (fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))) atTop (𝓝 0)
[PROOFSTEP]
rw [h_zero_eq_measure_iInter]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
h_zero_eq_measure_iInter : 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
⊢ Tendsto (fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))) atTop (𝓝 (↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))))
[PROOFSTEP]
refine'
  tendsto_measure_iInter (fun n => MeasurableSet.univ.prod measurableSet_Iic) (fun i j hij x => _)
    ⟨0, measure_ne_top ρ _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
h_zero_eq_measure_iInter : 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
i j : ℚ
hij : i ≤ j
x : α × ℝ
⊢ x ∈ univ ×ˢ Iic (-↑j) → x ∈ univ ×ˢ Iic (-↑i)
[PROOFSTEP]
simp only [mem_prod, mem_univ, mem_Iic, true_and_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
h_zero_eq_measure_iInter : 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
i j : ℚ
hij : i ≤ j
x : α × ℝ
⊢ x.snd ≤ -↑j → x.snd ≤ -↑i
[PROOFSTEP]
refine' fun hxj => hxj.trans (neg_le_neg _)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral_eq : (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) = fun r => ↑↑ρ (univ ×ˢ Iic (-↑r))
h_zero_eq_measure_iInter : 0 = ↑↑ρ (⋂ (r : ℚ), univ ×ˢ Iic (-↑r))
i j : ℚ
hij : i ≤ j
x : α × ℝ
hxj : x.snd ≤ -↑j
⊢ ↑i ≤ ↑j
[PROOFSTEP]
exact_mod_cast hij
[GOAL]
case h_lintegral_eq
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
h_exists : ∀ᵐ (a : α) ∂Measure.fst ρ, ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l)
F : α → ℝ≥0∞ := fun a => if h : ∃ l, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 l) then Exists.choose h else 0
h_tendsto : ∀ᵐ (a : α) ∂Measure.fst ρ, Tendsto (fun r => preCdf ρ (-r) a) atTop (𝓝 (F a))
h_lintegral : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 (∫⁻ (a : α), F a ∂Measure.fst ρ))
h_lintegral' : Tendsto (fun r => ∫⁻ (a : α), preCdf ρ (-r) a ∂Measure.fst ρ) atTop (𝓝 0)
⊢ ∫⁻ (a : α), F a ∂Measure.fst ρ = 0
[PROOFSTEP]
exact tendsto_nhds_unique h_lintegral h_lintegral'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, ∀ (t : ℚ), ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a = preCdf ρ t a
[PROOFSTEP]
rw [ae_all_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i : ℚ), ∀ᵐ (a : α) ∂Measure.fst ρ, ⨅ (r : ↑(Ioi i)), preCdf ρ (↑r) a = preCdf ρ i a
[PROOFSTEP]
refine' fun t => ae_eq_of_forall_set_lintegral_eq_of_sigmaFinite _ measurable_preCdf _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
⊢ Measurable fun a => ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a
[PROOFSTEP]
exact measurable_iInf fun i => measurable_preCdf
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
⊢ ∀ (s : Set α),
    MeasurableSet s →
      ↑↑(Measure.fst ρ) s < ⊤ →
        ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ = ∫⁻ (x : α) in s, preCdf ρ t x ∂Measure.fst ρ
[PROOFSTEP]
intro s hs _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
t : ℚ
s : Set α
hs : MeasurableSet s
a✝ : ↑↑(Measure.fst ρ) s < ⊤
⊢ ∫⁻ (x : α) in s, ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) x ∂Measure.fst ρ = ∫⁻ (x : α) in s, preCdf ρ t x ∂Measure.fst ρ
[PROOFSTEP]
rw [set_lintegral_iInf_gt_preCdf ρ t hs, set_lintegral_preCdf_fst ρ t hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, HasCondCdf ρ a
[PROOFSTEP]
filter_upwards [monotone_preCdf ρ, preCdf_le_one ρ, tendsto_preCdf_atTop_one ρ, tendsto_preCdf_atBot_zero ρ,
  inf_gt_preCdf ρ] with a h1 h2 h3 h4 h5
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
a : α
h1 : Monotone fun r => preCdf ρ r a
h2 : ∀ (r : ℚ), preCdf ρ r a ≤ 1
h3 : Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
h4 : Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
h5 : ∀ (t : ℚ), ⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a = preCdf ρ t a
⊢ HasCondCdf ρ a
[PROOFSTEP]
exact ⟨h1, h2, h3, h4, h5⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ HasCondCdf ρ a
[PROOFSTEP]
rw [condCdfSet, mem_compl_iff] at h 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ toMeasurable (Measure.fst ρ) {b | ¬HasCondCdf ρ b}
⊢ HasCondCdf ρ a
[PROOFSTEP]
have h_ss := subset_toMeasurable ρ.fst {b | ¬HasCondCdf ρ b}
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ toMeasurable (Measure.fst ρ) {b | ¬HasCondCdf ρ b}
h_ss : {b | ¬HasCondCdf ρ b} ⊆ toMeasurable (Measure.fst ρ) {b | ¬HasCondCdf ρ b}
⊢ HasCondCdf ρ a
[PROOFSTEP]
by_contra ha
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ toMeasurable (Measure.fst ρ) {b | ¬HasCondCdf ρ b}
h_ss : {b | ¬HasCondCdf ρ b} ⊆ toMeasurable (Measure.fst ρ) {b | ¬HasCondCdf ρ b}
ha : ¬HasCondCdf ρ a
⊢ False
[PROOFSTEP]
exact h (h_ss ha)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, a ∈ condCdfSet ρ
[PROOFSTEP]
simp_rw [ae_iff, condCdfSet, not_mem_compl_iff, setOf_mem_eq, measure_toMeasurable]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ↑↑(Measure.fst ρ) {b | ¬HasCondCdf ρ b} = 0
[PROOFSTEP]
exact hasCondCdf_ae ρ
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
r : ℚ
⊢ condCdfRat ρ a r = if r < 0 then 0 else 1
[PROOFSTEP]
simp only [condCdfRat, h, if_false]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
r : ℚ
⊢ condCdfRat ρ a r = ENNReal.toReal (preCdf ρ r a)
[PROOFSTEP]
simp only [condCdfRat, h, if_true]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Monotone (condCdfRat ρ a)
[PROOFSTEP]
by_cases h : a ∈ condCdfSet ρ
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ Monotone (condCdfRat ρ a)
[PROOFSTEP]
simp only [condCdfRat, h, if_true, forall_const, and_self_iff]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ Monotone fun r => ENNReal.toReal (preCdf ρ r a)
[PROOFSTEP]
intro r r' hrr'
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
r r' : ℚ
hrr' : r ≤ r'
⊢ (fun r => ENNReal.toReal (preCdf ρ r a)) r ≤ (fun r => ENNReal.toReal (preCdf ρ r a)) r'
[PROOFSTEP]
have h' := hasCondCdf_of_mem_condCdfSet h
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
r r' : ℚ
hrr' : r ≤ r'
h' : HasCondCdf ρ a
⊢ (fun r => ENNReal.toReal (preCdf ρ r a)) r ≤ (fun r => ENNReal.toReal (preCdf ρ r a)) r'
[PROOFSTEP]
have h_ne_top : ∀ r, preCdf ρ r a ≠ ∞ := fun r => ((h'.le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
r r' : ℚ
hrr' : r ≤ r'
h' : HasCondCdf ρ a
h_ne_top : ∀ (r : ℚ), preCdf ρ r a ≠ ⊤
⊢ (fun r => ENNReal.toReal (preCdf ρ r a)) r ≤ (fun r => ENNReal.toReal (preCdf ρ r a)) r'
[PROOFSTEP]
rw [ENNReal.toReal_le_toReal (h_ne_top _) (h_ne_top _)]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
r r' : ℚ
hrr' : r ≤ r'
h' : HasCondCdf ρ a
h_ne_top : ∀ (r : ℚ), preCdf ρ r a ≠ ⊤
⊢ preCdf ρ r a ≤ preCdf ρ r' a
[PROOFSTEP]
exact h'.1 hrr'
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ Monotone (condCdfRat ρ a)
[PROOFSTEP]
simp only [condCdfRat, h, if_false]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ Monotone fun r => if r < 0 then 0 else 1
[PROOFSTEP]
intro x y hxy
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
⊢ (fun r => if r < 0 then 0 else 1) x ≤ (fun r => if r < 0 then 0 else 1) y
[PROOFSTEP]
dsimp only
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
⊢ (if x < 0 then 0 else 1) ≤ if y < 0 then 0 else 1
[PROOFSTEP]
split_ifs with h_1 h_2 h_2
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
h_1 : x < 0
h_2 : y < 0
⊢ 0 ≤ 0
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
h_1 : x < 0
h_2 : ¬y < 0
⊢ 0 ≤ 1
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
h_1 : ¬x < 0
h_2 : y < 0
⊢ 1 ≤ 0
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
x y : ℚ
hxy : x ≤ y
h_1 : ¬x < 0
h_2 : ¬y < 0
⊢ 1 ≤ 1
[PROOFSTEP]
exacts [le_rfl, zero_le_one, absurd (hxy.trans_lt h_2) h_1, le_rfl]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
q : ℚ
⊢ Measurable fun a => condCdfRat ρ a q
[PROOFSTEP]
simp_rw [condCdfRat, ite_apply]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
q : ℚ
⊢ Measurable fun a => if a ∈ condCdfSet ρ then ENNReal.toReal (preCdf ρ q a) else if q < 0 then 0 else 1
[PROOFSTEP]
exact Measurable.ite (measurableSet_condCdfSet ρ) measurable_preCdf.ennreal_toReal measurable_const
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ 0 ≤ condCdfRat ρ a r
[PROOFSTEP]
unfold condCdfRat
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ 0 ≤ ite (a ∈ condCdfSet ρ) (fun r => ENNReal.toReal (preCdf ρ r a)) (fun r => if r < 0 then 0 else 1) r
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h✝ : a ∈ condCdfSet ρ
⊢ 0 ≤ (fun r => ENNReal.toReal (preCdf ρ r a)) r
[PROOFSTEP]
exact ENNReal.toReal_nonneg
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h✝ : ¬a ∈ condCdfSet ρ
⊢ 0 ≤ (fun r => if r < 0 then 0 else 1) r
[PROOFSTEP]
dsimp only
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h✝ : ¬a ∈ condCdfSet ρ
⊢ 0 ≤ if r < 0 then 0 else 1
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h✝¹ : ¬a ∈ condCdfSet ρ
h✝ : r < 0
⊢ 0 ≤ 0
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h✝¹ : ¬a ∈ condCdfSet ρ
h✝ : ¬r < 0
⊢ 0 ≤ 1
[PROOFSTEP]
exacts [le_rfl, zero_le_one]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ condCdfRat ρ a r ≤ 1
[PROOFSTEP]
unfold condCdfRat
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ ite (a ∈ condCdfSet ρ) (fun r => ENNReal.toReal (preCdf ρ r a)) (fun r => if r < 0 then 0 else 1) r ≤ 1
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : a ∈ condCdfSet ρ
⊢ (fun r => ENNReal.toReal (preCdf ρ r a)) r ≤ 1
[PROOFSTEP]
refine' ENNReal.toReal_le_of_le_ofReal zero_le_one _
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : a ∈ condCdfSet ρ
⊢ preCdf ρ r a ≤ ENNReal.ofReal 1
[PROOFSTEP]
rw [ENNReal.ofReal_one]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : a ∈ condCdfSet ρ
⊢ preCdf ρ r a ≤ 1
[PROOFSTEP]
exact (hasCondCdf_of_mem_condCdfSet h).le_one r
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : ¬a ∈ condCdfSet ρ
⊢ (fun r => if r < 0 then 0 else 1) r ≤ 1
[PROOFSTEP]
dsimp only
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : ¬a ∈ condCdfSet ρ
⊢ (if r < 0 then 0 else 1) ≤ 1
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : ¬a ∈ condCdfSet ρ
h✝ : r < 0
⊢ 0 ≤ 1
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
h : ¬a ∈ condCdfSet ρ
h✝ : ¬r < 0
⊢ 1 ≤ 1
[PROOFSTEP]
exacts [zero_le_one, le_rfl]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (condCdfRat ρ a) atBot (𝓝 0)
[PROOFSTEP]
unfold condCdfRat
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (if a ∈ condCdfSet ρ then fun r => ENNReal.toReal (preCdf ρ r a) else fun r => if r < 0 then 0 else 1) atBot
    (𝓝 0)
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ Tendsto (fun r => ENNReal.toReal (preCdf ρ r a)) atBot (𝓝 0)
[PROOFSTEP]
rw [← ENNReal.zero_toReal, ENNReal.tendsto_toReal_iff]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ Tendsto (fun r => preCdf ρ r a) atBot (𝓝 0)
[PROOFSTEP]
exact (hasCondCdf_of_mem_condCdfSet h).tendsto_atBot_zero
[GOAL]
case pos.hf
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ ∀ (i : ℚ), preCdf ρ i a ≠ ⊤
[PROOFSTEP]
have h' := hasCondCdf_of_mem_condCdfSet h
[GOAL]
case pos.hf
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
h' : HasCondCdf ρ a
⊢ ∀ (i : ℚ), preCdf ρ i a ≠ ⊤
[PROOFSTEP]
exact fun r => ((h'.le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
case pos.hx
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ 0 ≠ ⊤
[PROOFSTEP]
exact ENNReal.zero_ne_top
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ Tendsto (fun r => if r < 0 then 0 else 1) atBot (𝓝 0)
[PROOFSTEP]
refine' (tendsto_congr' _).mp tendsto_const_nhds
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ (fun x => 0) =ᶠ[atBot] fun r => if r < 0 then 0 else 1
[PROOFSTEP]
rw [EventuallyEq, eventually_atBot]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ ∃ a, ∀ (b : ℚ), b ≤ a → 0 = if b < 0 then 0 else 1
[PROOFSTEP]
refine' ⟨-1, fun q hq => (if_pos (hq.trans_lt _)).symm⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
q : ℚ
hq : q ≤ -1
⊢ -1 < 0
[PROOFSTEP]
linarith
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (condCdfRat ρ a) atTop (𝓝 1)
[PROOFSTEP]
unfold condCdfRat
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (if a ∈ condCdfSet ρ then fun r => ENNReal.toReal (preCdf ρ r a) else fun r => if r < 0 then 0 else 1) atTop
    (𝓝 1)
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
⊢ Tendsto (fun r => ENNReal.toReal (preCdf ρ r a)) atTop (𝓝 1)
[PROOFSTEP]
have h' := hasCondCdf_of_mem_condCdfSet h
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
h' : HasCondCdf ρ a
⊢ Tendsto (fun r => ENNReal.toReal (preCdf ρ r a)) atTop (𝓝 1)
[PROOFSTEP]
rw [← ENNReal.one_toReal, ENNReal.tendsto_toReal_iff]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
h' : HasCondCdf ρ a
⊢ Tendsto (fun r => preCdf ρ r a) atTop (𝓝 1)
[PROOFSTEP]
exact h'.tendsto_atTop_one
[GOAL]
case pos.hf
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
h' : HasCondCdf ρ a
⊢ ∀ (i : ℚ), preCdf ρ i a ≠ ⊤
[PROOFSTEP]
exact fun r => ((h'.le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
case pos.hx
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : a ∈ condCdfSet ρ
h' : HasCondCdf ρ a
⊢ 1 ≠ ⊤
[PROOFSTEP]
exact ENNReal.one_ne_top
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ Tendsto (fun r => if r < 0 then 0 else 1) atTop (𝓝 1)
[PROOFSTEP]
refine' (tendsto_congr' _).mp tendsto_const_nhds
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ (fun x => 1) =ᶠ[atTop] fun r => if r < 0 then 0 else 1
[PROOFSTEP]
rw [EventuallyEq, eventually_atTop]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h : ¬a ∈ condCdfSet ρ
⊢ ∃ a, ∀ (b : ℚ), b ≥ a → 1 = if b < 0 then 0 else 1
[PROOFSTEP]
exact ⟨0, fun q hq => (if_neg (not_lt.mpr hq)).symm⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
⊢ (fun a => condCdfRat ρ a r) =ᵐ[Measure.fst ρ] fun a => ENNReal.toReal (preCdf ρ r a)
[PROOFSTEP]
filter_upwards [mem_condCdfSet_ae ρ] with a ha using condCdfRat_of_mem ρ a ha r
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
⊢ (fun a => ENNReal.ofReal (condCdfRat ρ a r)) =ᵐ[Measure.fst ρ] preCdf ρ r
[PROOFSTEP]
filter_upwards [condCdfRat_ae_eq ρ r, preCdf_le_one ρ] with a ha ha_le_one
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
a : α
ha : condCdfRat ρ a r = ENNReal.toReal (preCdf ρ r a)
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ ENNReal.ofReal (condCdfRat ρ a r) = preCdf ρ r a
[PROOFSTEP]
rw [ha, ENNReal.ofReal_toReal]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
a : α
ha : condCdfRat ρ a r = ENNReal.toReal (preCdf ρ r a)
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ preCdf ρ r a ≠ ⊤
[PROOFSTEP]
exact ((ha_le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
⊢ ⨅ (r : ↑(Ioi t)), condCdfRat ρ a ↑r = condCdfRat ρ a t
[PROOFSTEP]
by_cases ha : a ∈ condCdfSet ρ
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
⊢ ⨅ (r : ↑(Ioi t)), condCdfRat ρ a ↑r = condCdfRat ρ a t
[PROOFSTEP]
simp_rw [condCdfRat_of_mem ρ a ha]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
⊢ ⨅ (r : ↑(Ioi t)), ENNReal.toReal (preCdf ρ (↑r) a) = ENNReal.toReal (preCdf ρ t a)
[PROOFSTEP]
have ha' := hasCondCdf_of_mem_condCdfSet ha
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
ha' : HasCondCdf ρ a
⊢ ⨅ (r : ↑(Ioi t)), ENNReal.toReal (preCdf ρ (↑r) a) = ENNReal.toReal (preCdf ρ t a)
[PROOFSTEP]
rw [← ENNReal.toReal_iInf]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
ha' : HasCondCdf ρ a
⊢ ENNReal.toReal (⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a) = ENNReal.toReal (preCdf ρ t a)
[PROOFSTEP]
suffices ⨅ i : ↥(Ioi t), preCdf ρ (↑i) a = preCdf ρ t a by rw [this]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
ha' : HasCondCdf ρ a
this : ⨅ (i : ↑(Ioi t)), preCdf ρ (↑i) a = preCdf ρ t a
⊢ ENNReal.toReal (⨅ (r : ↑(Ioi t)), preCdf ρ (↑r) a) = ENNReal.toReal (preCdf ρ t a)
[PROOFSTEP]
rw [this]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
ha' : HasCondCdf ρ a
⊢ ⨅ (i : ↑(Ioi t)), preCdf ρ (↑i) a = preCdf ρ t a
[PROOFSTEP]
rw [← ha'.iInf_rat_gt_eq]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : a ∈ condCdfSet ρ
ha' : HasCondCdf ρ a
⊢ ∀ (i : ↑(Ioi t)), preCdf ρ (↑i) a ≠ ⊤
[PROOFSTEP]
exact fun r => ((ha'.le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
⊢ ⨅ (r : ↑(Ioi t)), condCdfRat ρ a ↑r = condCdfRat ρ a t
[PROOFSTEP]
simp_rw [condCdfRat_of_not_mem ρ a ha]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) = if t < 0 then 0 else 1
[PROOFSTEP]
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]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
⊢ BddBelow (range fun r => if ↑r < 0 then 0 else 1)
[PROOFSTEP]
refine' ⟨0, fun x hx => _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
x : ℝ
hx : x ∈ range fun r => if ↑r < 0 then 0 else 1
⊢ 0 ≤ x
[PROOFSTEP]
obtain ⟨y, rfl⟩ := mem_range.mpr hx
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
y : ↑(Ioi t)
hx : (fun y => (fun r => if ↑r < 0 then 0 else 1) y) y ∈ range fun r => if ↑r < 0 then 0 else 1
⊢ 0 ≤ (fun y => (fun r => if ↑r < 0 then 0 else 1) y) y
[PROOFSTEP]
dsimp only
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
y : ↑(Ioi t)
hx : (fun y => (fun r => if ↑r < 0 then 0 else 1) y) y ∈ range fun r => if ↑r < 0 then 0 else 1
⊢ 0 ≤ if ↑y < 0 then 0 else 1
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
y : ↑(Ioi t)
hx : (fun y => (fun r => if ↑r < 0 then 0 else 1) y) y ∈ range fun r => if ↑r < 0 then 0 else 1
h✝ : ↑y < 0
⊢ 0 ≤ 0
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
t : ℚ
ha : ¬a ∈ condCdfSet ρ
y : ↑(Ioi t)
hx : (fun y => (fun r => if ↑r < 0 then 0 else 1) y) y ∈ range fun r => if ↑r < 0 then 0 else 1
h✝ : ¬↑y < 0
⊢ 0 ≤ 1
[PROOFSTEP]
exacts [le_rfl, zero_le_one]
[GOAL]
case neg
α : 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)
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) = if t < 0 then 0 else 1
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : 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
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) = 0
[PROOFSTEP]
refine' le_antisymm _ (le_ciInf fun x => _)
[GOAL]
case pos.refine'_1
α : 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
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) ≤ 0
[PROOFSTEP]
obtain ⟨q, htq, hq_neg⟩ : ∃ q, t < q ∧ q < 0 := by
  refine' ⟨t / 2, _, _⟩
  · linarith
  · linarith
[GOAL]
α : 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
⊢ ∃ q, t < q ∧ q < 0
[PROOFSTEP]
refine' ⟨t / 2, _, _⟩
[GOAL]
case refine'_1
α : 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
⊢ t < t / 2
[PROOFSTEP]
linarith
[GOAL]
case refine'_2
α : 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
⊢ t / 2 < 0
[PROOFSTEP]
linarith
[GOAL]
case pos.refine'_1.intro.intro
α : 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
q : ℚ
htq : t < q
hq_neg : q < 0
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) ≤ 0
[PROOFSTEP]
refine' (ciInf_le h_bdd ⟨q, htq⟩).trans _
[GOAL]
case pos.refine'_1.intro.intro
α : 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
q : ℚ
htq : t < q
hq_neg : q < 0
⊢ (if ↑{ val := q, property := htq } < 0 then 0 else 1) ≤ 0
[PROOFSTEP]
rw [if_pos]
[GOAL]
case pos.refine'_1.intro.intro.hc
α : 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
q : ℚ
htq : t < q
hq_neg : q < 0
⊢ ↑{ val := q, property := htq } < 0
[PROOFSTEP]
rwa [Subtype.coe_mk]
[GOAL]
case pos.refine'_2
α : 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)
⊢ 0 ≤ if ↑x < 0 then 0 else 1
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : 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)
h✝ : ↑x < 0
⊢ 0 ≤ 0
case neg
α : 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)
h✝ : ¬↑x < 0
⊢ 0 ≤ 1
[PROOFSTEP]
exacts [le_rfl, zero_le_one]
[GOAL]
case neg
α : 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
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) = 1
[PROOFSTEP]
refine' le_antisymm _ _
[GOAL]
case neg.refine'_1
α : 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
⊢ (⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1) ≤ 1
[PROOFSTEP]
refine' (ciInf_le h_bdd ⟨t + 1, lt_add_one t⟩).trans _
[GOAL]
case neg.refine'_1
α : 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
⊢ (if ↑{ val := t + 1, property := (_ : t < t + 1) } < 0 then 0 else 1) ≤ 1
[PROOFSTEP]
split_ifs
[GOAL]
case pos
α : 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
h✝ : ↑{ val := t + 1, property := (_ : t < t + 1) } < 0
⊢ 0 ≤ 1
case neg
α : 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
h✝ : ¬↑{ val := t + 1, property := (_ : t < t + 1) } < 0
⊢ 1 ≤ 1
[PROOFSTEP]
exacts [zero_le_one, le_rfl]
[GOAL]
case neg.refine'_2
α : 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
⊢ 1 ≤ ⨅ (r : ↑(Ioi t)), if ↑r < 0 then 0 else 1
[PROOFSTEP]
refine' le_ciInf fun x => _
[GOAL]
case neg.refine'_2
α : 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)
⊢ 1 ≤ if ↑x < 0 then 0 else 1
[PROOFSTEP]
rw [if_neg]
[GOAL]
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
[PROOFSTEP]
rw [not_lt] at h ⊢
[GOAL]
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
[PROOFSTEP]
exact h.trans (mem_Ioi.mp x.prop).le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ condCdf' ρ a x = ⨅ (r : { r // x < ↑r }), condCdfRat ρ a ↑r
[PROOFSTEP]
rw [condCdf']
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ condCdf' ρ a ↑r = condCdfRat ρ a r
[PROOFSTEP]
rw [← inf_gt_condCdfRat ρ a r, condCdf']
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ ⨅ (r_1 : { r' // ↑r < ↑r' }), condCdfRat ρ a ↑r_1 = ⨅ (r_1 : ↑(Ioi r)), condCdfRat ρ a ↑r_1
[PROOFSTEP]
refine' Equiv.iInf_congr _ _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
⊢ { r' // ↑r < ↑r' } ≃ ↑(Ioi r)
[PROOFSTEP]
exact
  { toFun := fun t => ⟨t.1, by exact_mod_cast t.2⟩
    invFun := fun t => ⟨t.1, by exact_mod_cast t.2⟩
    left_inv := fun t => by simp only [Subtype.coe_eta]
    right_inv := fun t => by simp only [Subtype.coe_eta] }
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
t : { r' // ↑r < ↑r' }
⊢ ↑t ∈ Ioi r
[PROOFSTEP]
exact_mod_cast t.2
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℚ
t : ↑(Ioi r)
⊢ ↑r < ↑↑t
[PROOFSTEP]
exact_mod_cast t.2
[GOAL]
α : 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
[PROOFSTEP]
simp only [Subtype.coe_eta]
[GOAL]
α : 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
[PROOFSTEP]
simp only [Subtype.coe_eta]
[GOAL]
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
[PROOFSTEP]
intro t
[GOAL]
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
[PROOFSTEP]
simp only [Equiv.coe_fn_mk, Subtype.coe_mk]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
⊢ 0 ≤ condCdf' ρ a r
[PROOFSTEP]
have : Nonempty { r' : ℚ // r < ↑r' } := by
  obtain ⟨r, hrx⟩ := exists_rat_gt r
  exact ⟨⟨r, hrx⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
⊢ Nonempty { r' // r < ↑r' }
[PROOFSTEP]
obtain ⟨r, hrx⟩ := exists_rat_gt r
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r✝ : ℝ
r : ℚ
hrx : r✝ < ↑r
⊢ Nonempty { r' // r✝ < ↑r' }
[PROOFSTEP]
exact ⟨⟨r, hrx⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
this : Nonempty { r' // r < ↑r' }
⊢ 0 ≤ condCdf' ρ a r
[PROOFSTEP]
rw [condCdf'_def]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
r : ℝ
this : Nonempty { r' // r < ↑r' }
⊢ 0 ≤ ⨅ (r_1 : { r' // r < ↑r' }), condCdfRat ρ a ↑r_1
[PROOFSTEP]
exact le_ciInf fun r' => condCdfRat_nonneg ρ a _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ BddBelow (range fun r => condCdfRat ρ a ↑r)
[PROOFSTEP]
refine' ⟨0, fun z => _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x z : ℝ
⊢ (z ∈ range fun r => condCdfRat ρ a ↑r) → 0 ≤ z
[PROOFSTEP]
rintro ⟨u, rfl⟩
[GOAL]
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
[PROOFSTEP]
exact condCdfRat_nonneg ρ a _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Monotone (condCdf' ρ a)
[PROOFSTEP]
intro x y hxy
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
⊢ condCdf' ρ a x ≤ condCdf' ρ a y
[PROOFSTEP]
have : Nonempty { r' : ℚ // y < ↑r' } := by
  obtain ⟨r, hrx⟩ := exists_rat_gt y
  exact ⟨⟨r, hrx⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x y : ℝ
hxy : x ≤ y
⊢ Nonempty { r' // y < ↑r' }
[PROOFSTEP]
obtain ⟨r, hrx⟩ := exists_rat_gt y
[GOAL]
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' }
[PROOFSTEP]
exact ⟨⟨r, hrx⟩⟩
[GOAL]
α : 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
[PROOFSTEP]
simp_rw [condCdf'_def]
[GOAL]
α : 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' // x < ↑r' }), condCdfRat ρ a ↑r ≤ ⨅ (r : { r' // y < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
refine' le_ciInf fun r => (ciInf_le _ _).trans_eq _
[GOAL]
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)
[PROOFSTEP]
exact bddBelow_range_condCdfRat_gt ρ a x
[GOAL]
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' }
[PROOFSTEP]
exact ⟨r.1, hxy.trans_lt r.prop⟩
[GOAL]
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
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ici x) x
[PROOFSTEP]
rw [← continuousWithinAt_Ioi_iff_Ici]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x
[PROOFSTEP]
convert Monotone.tendsto_nhdsWithin_Ioi (monotone_condCdf' ρ a) x
[GOAL]
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) (𝓝[Ioi x] x) (𝓝 (sInf (condCdf' ρ a '' Ioi x)))
[PROOFSTEP]
rw [sInf_image']
[GOAL]
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) (𝓝[Ioi x] x) (𝓝 (⨅ (a_1 : ↑(Ioi x)), condCdf' ρ a ↑a_1))
[PROOFSTEP]
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
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
[PROOFSTEP]
refine' Real.iInf_Ioi_eq_iInf_rat_gt x _ (monotone_condCdf' ρ a)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ BddBelow (condCdf' ρ a '' Ioi x)
[PROOFSTEP]
refine' ⟨0, fun z => _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x z : ℝ
⊢ z ∈ condCdf' ρ a '' Ioi x → 0 ≤ z
[PROOFSTEP]
rintro ⟨u, -, rfl⟩
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x u : ℝ
⊢ 0 ≤ condCdf' ρ a u
[PROOFSTEP]
exact condCdf'_nonneg ρ a u
[GOAL]
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔
    Tendsto (condCdf' ρ a) (𝓝[Ioi x] x) (𝓝 (⨅ (a_1 : ↑(Ioi x)), condCdf' ρ a ↑a_1))
[PROOFSTEP]
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
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
⊢ ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
congr with r
[GOAL]
case e_s.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
r : { r' // x < ↑r' }
⊢ condCdf' ρ a ↑↑r = condCdfRat ρ a ↑r
[PROOFSTEP]
exact condCdf'_eq_condCdfRat ρ a r
[GOAL]
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
h'' : ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
⊢ ContinuousWithinAt (condCdf' ρ a) (Ioi x) x ↔
    Tendsto (condCdf' ρ a) (𝓝[Ioi x] x) (𝓝 (⨅ (a_1 : ↑(Ioi x)), condCdf' ρ a ↑a_1))
[PROOFSTEP]
rw [h', h'', ContinuousWithinAt]
[GOAL]
case a
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
h'' : ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
⊢ Tendsto (condCdf' ρ a) (𝓝[Ioi x] x) (𝓝 (condCdf' ρ a x)) ↔
    Tendsto (condCdf' ρ a) (𝓝[Ioi x] x) (𝓝 (⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r))
[PROOFSTEP]
congr!
[GOAL]
case a.a.h.e'_5.h.e'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
h' : ⨅ (r : ↑(Ioi x)), condCdf' ρ a ↑r = ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r
h'' : ⨅ (r : { r' // x < ↑r' }), condCdf' ρ a ↑↑r = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
⊢ condCdf' ρ a x = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
exact condCdf'_def'
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ↑(condCdf ρ a) x ≤ 1
[PROOFSTEP]
obtain ⟨r, hrx⟩ := exists_rat_gt x
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
r : ℚ
hrx : x < ↑r
⊢ ↑(condCdf ρ a) x ≤ 1
[PROOFSTEP]
rw [← StieltjesFunction.iInf_rat_gt_eq]
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
r : ℚ
hrx : x < ↑r
⊢ ⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r ≤ 1
[PROOFSTEP]
simp_rw [condCdf_eq_condCdfRat]
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
r : ℚ
hrx : x < ↑r
⊢ ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r ≤ 1
[PROOFSTEP]
refine' ciInf_le_of_le (bddBelow_range_condCdfRat_gt ρ a x) _ (condCdfRat_le_one _ _ _)
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
r : ℚ
hrx : x < ↑r
⊢ { r' // x < ↑r' }
[PROOFSTEP]
exact ⟨r, hrx⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (↑(condCdf ρ a)) atBot (𝓝 0)
[PROOFSTEP]
have h_exists : ∀ x : ℝ, ∃ q : ℚ, x < q ∧ ↑q < x + 1 := fun x => exists_rat_btwn (lt_add_one x)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
⊢ Tendsto (↑(condCdf ρ a)) atBot (𝓝 0)
[PROOFSTEP]
let qs : ℝ → ℚ := fun x => (h_exists x).choose
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
⊢ Tendsto (↑(condCdf ρ a)) atBot (𝓝 0)
[PROOFSTEP]
have hqs_tendsto : Tendsto qs atBot atBot := by
  rw [tendsto_atBot_atBot]
  refine' fun q => ⟨q - 1, fun y hy => _⟩
  have h_le : ↑(qs y) ≤ (q : ℝ) - 1 + 1 := (h_exists y).choose_spec.2.le.trans (add_le_add hy le_rfl)
  rw [sub_add_cancel] at h_le 
  exact_mod_cast h_le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
⊢ Tendsto qs atBot atBot
[PROOFSTEP]
rw [tendsto_atBot_atBot]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
⊢ ∀ (b : ℚ), ∃ i, ∀ (a : ℝ), a ≤ i → qs a ≤ b
[PROOFSTEP]
refine' fun q => ⟨q - 1, fun y hy => _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
q : ℚ
y : ℝ
hy : y ≤ ↑q - 1
⊢ qs y ≤ q
[PROOFSTEP]
have h_le : ↑(qs y) ≤ (q : ℝ) - 1 + 1 := (h_exists y).choose_spec.2.le.trans (add_le_add hy le_rfl)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
q : ℚ
y : ℝ
hy : y ≤ ↑q - 1
h_le : ↑(qs y) ≤ ↑q - 1 + 1
⊢ qs y ≤ q
[PROOFSTEP]
rw [sub_add_cancel] at h_le 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
q : ℚ
y : ℝ
hy : y ≤ ↑q - 1
h_le : ↑(qs y) ≤ ↑q
⊢ qs y ≤ q
[PROOFSTEP]
exact_mod_cast h_le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
hqs_tendsto : Tendsto qs atBot atBot
⊢ Tendsto (↑(condCdf ρ a)) atBot (𝓝 0)
[PROOFSTEP]
refine'
  tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds ((tendsto_condCdfRat_atBot ρ a).comp hqs_tendsto)
    (condCdf_nonneg ρ a) fun x => _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
hqs_tendsto : Tendsto qs atBot atBot
x : ℝ
⊢ ↑(condCdf ρ a) x ≤ (condCdfRat ρ a ∘ qs) x
[PROOFSTEP]
rw [Function.comp_apply, ← condCdf_eq_condCdfRat]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x < ↑q ∧ ↑q < x + 1
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x < ↑q ∧ ↑q < x + 1)
hqs_tendsto : Tendsto qs atBot atBot
x : ℝ
⊢ ↑(condCdf ρ a) x ≤ ↑(condCdf ρ a) ↑(qs x)
[PROOFSTEP]
exact (condCdf ρ a).mono (h_exists x).choose_spec.1.le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ Tendsto (↑(condCdf ρ a)) atTop (𝓝 1)
[PROOFSTEP]
have h_exists : ∀ x : ℝ, ∃ q : ℚ, x - 1 < q ∧ ↑q < x := fun x => exists_rat_btwn (sub_one_lt x)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
⊢ Tendsto (↑(condCdf ρ a)) atTop (𝓝 1)
[PROOFSTEP]
let qs : ℝ → ℚ := fun x => (h_exists x).choose
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
⊢ Tendsto (↑(condCdf ρ a)) atTop (𝓝 1)
[PROOFSTEP]
have hqs_tendsto : Tendsto qs atTop atTop := by
  rw [tendsto_atTop_atTop]
  refine' fun q => ⟨q + 1, fun y hy => _⟩
  have h_le : y - 1 ≤ qs y := (h_exists y).choose_spec.1.le
  rw [sub_le_iff_le_add] at h_le 
  exact_mod_cast le_of_add_le_add_right (hy.trans h_le)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
⊢ Tendsto qs atTop atTop
[PROOFSTEP]
rw [tendsto_atTop_atTop]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
⊢ ∀ (b : ℚ), ∃ i, ∀ (a : ℝ), i ≤ a → b ≤ qs a
[PROOFSTEP]
refine' fun q => ⟨q + 1, fun y hy => _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
q : ℚ
y : ℝ
hy : ↑q + 1 ≤ y
⊢ q ≤ qs y
[PROOFSTEP]
have h_le : y - 1 ≤ qs y := (h_exists y).choose_spec.1.le
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
q : ℚ
y : ℝ
hy : ↑q + 1 ≤ y
h_le : y - 1 ≤ ↑(qs y)
⊢ q ≤ qs y
[PROOFSTEP]
rw [sub_le_iff_le_add] at h_le 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
q : ℚ
y : ℝ
hy : ↑q + 1 ≤ y
h_le : y ≤ ↑(qs y) + 1
⊢ q ≤ qs y
[PROOFSTEP]
exact_mod_cast le_of_add_le_add_right (hy.trans h_le)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
hqs_tendsto : Tendsto qs atTop atTop
⊢ Tendsto (↑(condCdf ρ a)) atTop (𝓝 1)
[PROOFSTEP]
refine'
  tendsto_of_tendsto_of_tendsto_of_le_of_le ((tendsto_condCdfRat_atTop ρ a).comp hqs_tendsto) tendsto_const_nhds _
    (condCdf_le_one ρ a)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
hqs_tendsto : Tendsto qs atTop atTop
⊢ condCdfRat ρ a ∘ qs ≤ ↑(condCdf ρ a)
[PROOFSTEP]
intro x
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
hqs_tendsto : Tendsto qs atTop atTop
x : ℝ
⊢ (condCdfRat ρ a ∘ qs) x ≤ ↑(condCdf ρ a) x
[PROOFSTEP]
rw [Function.comp_apply, ← condCdf_eq_condCdfRat]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
h_exists : ∀ (x : ℝ), ∃ q, x - 1 < ↑q ∧ ↑q < x
qs : ℝ → ℚ := fun x => Exists.choose (_ : ∃ q, x - 1 < ↑q ∧ ↑q < x)
hqs_tendsto : Tendsto qs atTop atTop
x : ℝ
⊢ ↑(condCdf ρ a) ↑(qs x) ≤ ↑(condCdf ρ a) x
[PROOFSTEP]
exact (condCdf ρ a).mono (le_of_lt (h_exists x).choose_spec.2)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
⊢ (fun a => ↑(condCdf ρ a) ↑r) =ᵐ[Measure.fst ρ] fun a => ENNReal.toReal (preCdf ρ r a)
[PROOFSTEP]
filter_upwards [mem_condCdfSet_ae ρ] with a ha using (condCdf_eq_condCdfRat ρ a r).trans (condCdfRat_of_mem ρ a ha r)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
⊢ (fun a => ENNReal.ofReal (↑(condCdf ρ a) ↑r)) =ᵐ[Measure.fst ρ] preCdf ρ r
[PROOFSTEP]
filter_upwards [condCdf_ae_eq ρ r, preCdf_le_one ρ] with a ha ha_le_one
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
a : α
ha : ↑(condCdf ρ a) ↑r = ENNReal.toReal (preCdf ρ r a)
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ ENNReal.ofReal (↑(condCdf ρ a) ↑r) = preCdf ρ r a
[PROOFSTEP]
rw [ha, ENNReal.ofReal_toReal]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
a : α
ha : ↑(condCdf ρ a) ↑r = ENNReal.toReal (preCdf ρ r a)
ha_le_one : ∀ (r : ℚ), preCdf ρ r a ≤ 1
⊢ preCdf ρ r a ≠ ⊤
[PROOFSTEP]
exact ((ha_le_one r).trans_lt ENNReal.one_lt_top).ne
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
⊢ Measurable fun a => ↑(condCdf ρ a) x
[PROOFSTEP]
have : (fun a => condCdf ρ a x) = fun a => ⨅ r : { r' : ℚ // x < r' }, condCdfRat ρ a ↑r :=
  by
  ext1 a
  rw [← StieltjesFunction.iInf_rat_gt_eq]
  congr with q
  rw [condCdf_eq_condCdfRat]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
⊢ (fun a => ↑(condCdf ρ a) x) = fun a => ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
ext1 a
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
a : α
⊢ ↑(condCdf ρ a) x = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
rw [← StieltjesFunction.iInf_rat_gt_eq]
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
a : α
⊢ ⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r = ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
congr with q
[GOAL]
case h.e_s.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
a : α
q : { r' // x < ↑r' }
⊢ ↑(condCdf ρ a) ↑↑q = condCdfRat ρ a ↑q
[PROOFSTEP]
rw [condCdf_eq_condCdfRat]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
this : (fun a => ↑(condCdf ρ a) x) = fun a => ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
⊢ Measurable fun a => ↑(condCdf ρ a) x
[PROOFSTEP]
rw [this]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
x : ℝ
this : (fun a => ↑(condCdf ρ a) x) = fun a => ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
⊢ Measurable fun a => ⨅ (r : { r' // x < ↑r' }), condCdfRat ρ a ↑r
[PROOFSTEP]
exact measurable_ciInf (fun q => measurable_condCdfRat ρ q) fun a => bddBelow_range_condCdfRat_gt ρ a _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑r) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic ↑r)
[PROOFSTEP]
have : ∀ᵐ a ∂ρ.fst, a ∈ s → ENNReal.ofReal (condCdf ρ a r) = preCdf ρ r a := by
  filter_upwards [ofReal_condCdf_ae_eq ρ r] with a ha using fun _ => ha
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
⊢ ∀ᵐ (a : α) ∂Measure.fst ρ, a ∈ s → ENNReal.ofReal (↑(condCdf ρ a) ↑r) = preCdf ρ r a
[PROOFSTEP]
filter_upwards [ofReal_condCdf_ae_eq ρ r] with a ha using fun _ => ha
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
this : ∀ᵐ (a : α) ∂Measure.fst ρ, a ∈ s → ENNReal.ofReal (↑(condCdf ρ a) ↑r) = preCdf ρ r a
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑r) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic ↑r)
[PROOFSTEP]
rw [set_lintegral_congr_fun hs this, set_lintegral_preCdf_fst ρ r hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
this : ∀ᵐ (a : α) ∂Measure.fst ρ, a ∈ s → ENNReal.ofReal (↑(condCdf ρ a) ↑r) = preCdf ρ r a
⊢ ↑↑(Measure.IicSnd ρ ↑r) s = ↑↑ρ (s ×ˢ Iic ↑r)
[PROOFSTEP]
exact ρ.IicSnd_apply r hs
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
by_cases hρ_zero : ρ.fst.restrict s = 0
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
rw [hρ_zero, lintegral_zero_measure]
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ 0 = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
refine' le_antisymm (zero_le _) _
[GOAL]
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ ↑↑ρ (s ×ˢ Iic x) ≤ 0
[PROOFSTEP]
calc
  ρ (s ×ˢ Iic x) ≤ ρ (Prod.fst ⁻¹' s) := measure_mono (prod_subset_preimage_fst s (Iic x))
  _ = ρ.fst s := by rw [Measure.fst_apply hs]
  _ = ρ.fst.restrict s univ := by rw [Measure.restrict_apply_univ]
  _ = 0 := by simp only [hρ_zero, Measure.coe_zero, Pi.zero_apply]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ ↑↑ρ (Prod.fst ⁻¹' s) = ↑↑(Measure.fst ρ) s
[PROOFSTEP]
rw [Measure.fst_apply hs]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ ↑↑(Measure.fst ρ) s = ↑↑(Measure.restrict (Measure.fst ρ) s) univ
[PROOFSTEP]
rw [Measure.restrict_apply_univ]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : Measure.restrict (Measure.fst ρ) s = 0
⊢ ↑↑(Measure.restrict (Measure.fst ρ) s) univ = 0
[PROOFSTEP]
simp only [hρ_zero, Measure.coe_zero, Pi.zero_apply]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
have h :
  ∫⁻ a in s, ENNReal.ofReal (condCdf ρ a x) ∂ρ.fst =
    ∫⁻ a in s, ENNReal.ofReal (⨅ r : { r' : ℚ // x < r' }, condCdf ρ a r) ∂ρ.fst :=
  by
  congr with a : 1
  rw [← (condCdf ρ a).iInf_rat_gt_eq x]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
[PROOFSTEP]
congr with a : 1
[GOAL]
case e_f.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
a : α
⊢ ENNReal.ofReal (↑(condCdf ρ a) x) = ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r)
[PROOFSTEP]
rw [← (condCdf ρ a).iInf_rat_gt_eq x]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
have h_nonempty : Nonempty { r' : ℚ // x < ↑r' } :=
  by
  obtain ⟨r, hrx⟩ := exists_rat_gt x
  exact ⟨⟨r, hrx⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
⊢ Nonempty { r' // x < ↑r' }
[PROOFSTEP]
obtain ⟨r, hrx⟩ := exists_rat_gt x
[GOAL]
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
r : ℚ
hrx : x < ↑r
⊢ Nonempty { r' // x < ↑r' }
[PROOFSTEP]
exact ⟨⟨r, hrx⟩⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
rw [h]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
simp_rw [ENNReal.ofReal_cinfi]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
⊢ ∫⁻ (a : α) in s, ⨅ (i : { r' // x < ↑r' }), ENNReal.ofReal (↑(condCdf ρ a) ↑↑i) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
have h_coe : ∀ b : { r' : ℚ // x < ↑r' }, (b : ℝ) = ((b : ℚ) : ℝ) := fun _ => by congr
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
x✝ : { r' // x < ↑r' }
⊢ ↑↑x✝ = ↑↑x✝
[PROOFSTEP]
congr
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ∫⁻ (a : α) in s, ⨅ (i : { r' // x < ↑r' }), ENNReal.ofReal (↑(condCdf ρ a) ↑↑i) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
rw [lintegral_iInf_directed_of_measurable hρ_zero fun q : { r' : ℚ // x < ↑r' } =>
    (measurable_condCdf ρ q).ennreal_ofReal]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ⨅ (b : { r' // x < ↑r' }), ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑↑b) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
case neg.hf_int
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ∀ (b : { r' // x < ↑r' }), ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑↑b) ∂Measure.fst ρ ≠ ⊤
case neg.h_directed
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ Directed (fun x x_1 => x ≥ x_1) fun q x_1 => ENNReal.ofReal (↑(condCdf ρ x_1) ↑↑q)
[PROOFSTEP]
rotate_left
[GOAL]
case neg.hf_int
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ∀ (b : { r' // x < ↑r' }), ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑↑b) ∂Measure.fst ρ ≠ ⊤
[PROOFSTEP]
intro b
[GOAL]
case neg.hf_int
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
b : { r' // x < ↑r' }
⊢ ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑↑b) ∂Measure.fst ρ ≠ ⊤
[PROOFSTEP]
rw [set_lintegral_condCdf_rat ρ _ hs]
[GOAL]
case neg.hf_int
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
b : { r' // x < ↑r' }
⊢ ↑↑ρ (s ×ˢ Iic ↑↑b) ≠ ⊤
[PROOFSTEP]
exact measure_ne_top ρ _
[GOAL]
case neg.h_directed
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ Directed (fun x x_1 => x ≥ x_1) fun q x_1 => ENNReal.ofReal (↑(condCdf ρ x_1) ↑↑q)
[PROOFSTEP]
refine' Monotone.directed_ge fun i j hij a => ENNReal.ofReal_le_ofReal ((condCdf ρ a).mono _)
[GOAL]
case neg.h_directed
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
i j : { r' // x < ↑r' }
hij : i ≤ j
a : α
⊢ ↑↑i ≤ ↑↑j
[PROOFSTEP]
rw [h_coe, h_coe]
[GOAL]
case neg.h_directed
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
i j : { r' // x < ↑r' }
hij : i ≤ j
a : α
⊢ ↑↑i ≤ ↑↑j
[PROOFSTEP]
exact_mod_cast hij
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ⨅ (b : { r' // x < ↑r' }), ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) ↑↑b) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
simp_rw [set_lintegral_condCdf_rat ρ _ hs]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ⨅ (b : { r' // x < ↑r' }), ↑↑ρ (s ×ˢ Iic ↑↑b) = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
rw [← measure_iInter_eq_iInf]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ↑↑ρ (⋂ (i : { r' // x < ↑r' }), s ×ˢ Iic ↑↑i) = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
rw [← prod_iInter]
[GOAL]
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ↑↑ρ (s ×ˢ ⋂ (i : { r' // x < ↑r' }), Iic ↑↑i) = ↑↑ρ (s ×ˢ Iic x)
[PROOFSTEP]
congr with y
[GOAL]
case neg.e_a.e_a.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
y : ℝ
⊢ y ∈ ⋂ (i : { r' // x < ↑r' }), Iic ↑↑i ↔ y ∈ Iic x
[PROOFSTEP]
simp only [mem_iInter, mem_Iic, Subtype.forall, Subtype.coe_mk]
[GOAL]
case neg.e_a.e_a.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
y : ℝ
⊢ (∀ (a : ℚ), x < ↑a → y ≤ ↑a) ↔ y ≤ x
[PROOFSTEP]
exact ⟨le_of_forall_lt_rat_imp_le, fun hyx q hq => hyx.trans hq.le⟩
[GOAL]
case neg.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ∀ (i : { r' // x < ↑r' }), MeasurableSet (s ×ˢ Iic ↑↑i)
[PROOFSTEP]
exact fun i => hs.prod measurableSet_Iic
[GOAL]
case neg.hd
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ Directed (fun x x_1 => x ⊇ x_1) fun b => s ×ˢ Iic ↑↑b
[PROOFSTEP]
refine' Monotone.directed_ge fun i j hij => _
[GOAL]
case neg.hd
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
i j : { r' // x < ↑r' }
hij : i ≤ j
⊢ s ×ˢ Iic ↑↑i ≤ s ×ˢ Iic ↑↑j
[PROOFSTEP]
refine' prod_subset_prod_iff.mpr (Or.inl ⟨subset_rfl, Iic_subset_Iic.mpr _⟩)
[GOAL]
case neg.hd
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
i j : { r' // x < ↑r' }
hij : i ≤ j
⊢ ↑↑i ≤ ↑↑j
[PROOFSTEP]
exact_mod_cast hij
[GOAL]
case neg.hfin
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
hρ_zero : ¬Measure.restrict (Measure.fst ρ) s = 0
h :
  ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ =
    ∫⁻ (a : α) in s, ENNReal.ofReal (⨅ (r : { r' // x < ↑r' }), ↑(condCdf ρ a) ↑↑r) ∂Measure.fst ρ
h_nonempty : Nonempty { r' // x < ↑r' }
h_coe : ∀ (b : { r' // x < ↑r' }), ↑↑b = ↑↑b
⊢ ∃ i, ↑↑ρ (s ×ˢ Iic ↑↑i) ≠ ⊤
[PROOFSTEP]
exact ⟨h_nonempty.some, measure_ne_top _ _⟩
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ ∫⁻ (a : α), ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (univ ×ˢ Iic x)
[PROOFSTEP]
rw [← set_lintegral_univ, set_lintegral_condCdf ρ _ MeasurableSet.univ]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ Integrable fun a => ↑(condCdf ρ a) x
[PROOFSTEP]
refine' integrable_of_forall_fin_meas_le _ (measure_lt_top ρ.fst univ) _ fun t _ _ => _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ AEStronglyMeasurable (fun a => ↑(condCdf ρ a) x) (Measure.fst ρ)
[PROOFSTEP]
exact (stronglyMeasurable_condCdf ρ _).aestronglyMeasurable
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
⊢ ∫⁻ (x_1 : α) in t, ↑‖↑(condCdf ρ x_1) x‖₊ ∂Measure.fst ρ ≤ ↑↑(Measure.fst ρ) univ
[PROOFSTEP]
have : ∀ y, (‖condCdf ρ y x‖₊ : ℝ≥0∞) ≤ 1 := by
  intro y
  rw [Real.nnnorm_of_nonneg (condCdf_nonneg _ _ _)]
    -- Porting note: was exact_mod_cast condCdf_le_one _ _ _
  simp only [ENNReal.coe_le_one_iff]
  exact condCdf_le_one _ _ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
⊢ ∀ (y : α), ↑‖↑(condCdf ρ y) x‖₊ ≤ 1
[PROOFSTEP]
intro y
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
y : α
⊢ ↑‖↑(condCdf ρ y) x‖₊ ≤ 1
[PROOFSTEP]
rw [Real.nnnorm_of_nonneg (condCdf_nonneg _ _ _)]
  -- Porting note: was exact_mod_cast condCdf_le_one _ _ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
y : α
⊢ ↑{ val := ↑(condCdf ρ y) x, property := (_ : 0 ≤ ↑(condCdf ρ y) x) } ≤ 1
[PROOFSTEP]
simp only [ENNReal.coe_le_one_iff]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
y : α
⊢ { val := ↑(condCdf ρ y) x, property := (_ : 0 ≤ ↑(condCdf ρ y) x) } ≤ 1
[PROOFSTEP]
exact condCdf_le_one _ _ _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
this : ∀ (y : α), ↑‖↑(condCdf ρ y) x‖₊ ≤ 1
⊢ ∫⁻ (x_1 : α) in t, ↑‖↑(condCdf ρ x_1) x‖₊ ∂Measure.fst ρ ≤ ↑↑(Measure.fst ρ) univ
[PROOFSTEP]
refine' (set_lintegral_mono (measurable_condCdf _ _).ennnorm measurable_one fun y _ => this y).trans _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
this : ∀ (y : α), ↑‖↑(condCdf ρ y) x‖₊ ≤ 1
⊢ ∫⁻ (x : α) in t, OfNat.ofNat 1 x ∂Measure.fst ρ ≤ ↑↑(Measure.fst ρ) univ
[PROOFSTEP]
simp only [Pi.one_apply, lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
t : Set α
x✝¹ : MeasurableSet t
x✝ : ↑↑(Measure.fst ρ) t ≠ ⊤
this : ∀ (y : α), ↑‖↑(condCdf ρ y) x‖₊ ≤ 1
⊢ ↑↑(Measure.fst ρ) t ≤ ↑↑(Measure.fst ρ) univ
[PROOFSTEP]
exact measure_mono (subset_univ _)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
⊢ ∫ (a : α) in s, ↑(condCdf ρ a) x ∂Measure.fst ρ = ENNReal.toReal (↑↑ρ (s ×ˢ Iic x))
[PROOFSTEP]
have h := set_lintegral_condCdf ρ x hs
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
h : ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
⊢ ∫ (a : α) in s, ↑(condCdf ρ a) x ∂Measure.fst ρ = ENNReal.toReal (↑↑ρ (s ×ˢ Iic x))
[PROOFSTEP]
rw [← ofReal_integral_eq_lintegral_ofReal] at h 
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
h : ENNReal.ofReal (∫ (x_1 : α) in s, ↑(condCdf ρ x_1) x ∂Measure.fst ρ) = ↑↑ρ (s ×ˢ Iic x)
⊢ ∫ (a : α) in s, ↑(condCdf ρ a) x ∂Measure.fst ρ = ENNReal.toReal (↑↑ρ (s ×ˢ Iic x))
[PROOFSTEP]
rw [← h, ENNReal.toReal_ofReal]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
h : ENNReal.ofReal (∫ (x_1 : α) in s, ↑(condCdf ρ x_1) x ∂Measure.fst ρ) = ↑↑ρ (s ×ˢ Iic x)
⊢ 0 ≤ ∫ (x_1 : α) in s, ↑(condCdf ρ x_1) x ∂Measure.fst ρ
[PROOFSTEP]
exact integral_nonneg fun _ => condCdf_nonneg _ _ _
[GOAL]
case hfi
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
h : ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
⊢ Integrable fun a => ↑(condCdf ρ a) x
[PROOFSTEP]
exact (integrable_condCdf _ _).integrableOn
[GOAL]
case f_nn
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
s : Set α
hs : MeasurableSet s
h : ∫⁻ (a : α) in s, ENNReal.ofReal (↑(condCdf ρ a) x) ∂Measure.fst ρ = ↑↑ρ (s ×ˢ Iic x)
⊢ 0 ≤ᵐ[Measure.restrict (Measure.fst ρ) s] fun a => ↑(condCdf ρ a) x
[PROOFSTEP]
exact eventually_of_forall fun _ => condCdf_nonneg _ _ _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
x : ℝ
⊢ ∫ (a : α), ↑(condCdf ρ a) x ∂Measure.fst ρ = ENNReal.toReal (↑↑ρ (univ ×ˢ Iic x))
[PROOFSTEP]
rw [← set_integral_condCdf ρ _ MeasurableSet.univ, Measure.restrict_univ]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ↑↑(StieltjesFunction.measure (condCdf ρ a)) (Iic x) = ENNReal.ofReal (↑(condCdf ρ a) x)
[PROOFSTEP]
rw [← sub_zero (condCdf ρ a x)]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
x : ℝ
⊢ ↑↑(StieltjesFunction.measure (condCdf ρ a)) (Iic x) = ENNReal.ofReal (↑(condCdf ρ a) x - 0)
[PROOFSTEP]
exact (condCdf ρ a).measure_Iic (tendsto_condCdf_atBot ρ a) _
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ = 1
[PROOFSTEP]
rw [← ENNReal.ofReal_one, ← sub_zero (1 : ℝ)]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
a : α
⊢ ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ = ENNReal.ofReal (1 - 0)
[PROOFSTEP]
exact StieltjesFunction.measure_univ _ (tendsto_condCdf_atBot ρ a) (tendsto_condCdf_atTop ρ a)
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ Measurable fun a => StieltjesFunction.measure (condCdf ρ a)
[PROOFSTEP]
rw [Measure.measurable_measure]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ ∀ (s : Set ℝ), MeasurableSet s → Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s
[PROOFSTEP]
refine' fun s hs =>
  ?_
    -- Porting note: supplied `C`
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s
[PROOFSTEP]
refine'
  MeasurableSpace.induction_on_inter (C := fun s => Measurable fun b ↦ StieltjesFunction.measure (condCdf ρ b) s)
    (borel_eq_generateFrom_Iic ℝ) isPiSystem_Iic _ _ _ _ hs
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) ∅
[PROOFSTEP]
simp only [measure_empty, measurable_const]
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ), t ∈ range Iic → (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) t
[PROOFSTEP]
rintro S ⟨u, rfl⟩
[GOAL]
case refine'_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) (Iic u)
[PROOFSTEP]
simp_rw [measure_condCdf_Iic ρ _ u]
[GOAL]
case refine'_2.intro
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
u : ℝ
⊢ Measurable fun b => ENNReal.ofReal (↑(condCdf ρ b) u)
[PROOFSTEP]
exact (measurable_condCdf ρ u).ennreal_ofReal
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (t : Set ℝ),
    MeasurableSet t →
      (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) t →
        (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) tᶜ
[PROOFSTEP]
intro t ht ht_cd_meas
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) t
⊢ Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) tᶜ
[PROOFSTEP]
have : (fun a => (condCdf ρ a).measure tᶜ) = (fun a => (condCdf ρ a).measure univ) - fun a => (condCdf ρ a).measure t :=
  by
  ext1 a
  rw [measure_compl ht (measure_ne_top (condCdf ρ a).measure _), Pi.sub_apply]
[GOAL]
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) t
⊢ (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) tᶜ) =
    (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ) - fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) t
[PROOFSTEP]
ext1 a
[GOAL]
case h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) t
a : α
⊢ ↑↑(StieltjesFunction.measure (condCdf ρ a)) tᶜ =
    ((fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ) - fun a =>
        ↑↑(StieltjesFunction.measure (condCdf ρ a)) t)
      a
[PROOFSTEP]
rw [measure_compl ht (measure_ne_top (condCdf ρ a).measure _), Pi.sub_apply]
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) t
this :
  (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) tᶜ) =
    (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ) - fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) t
⊢ Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) tᶜ
[PROOFSTEP]
simp_rw [this, measure_condCdf_univ ρ]
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
t : Set ℝ
ht : MeasurableSet t
ht_cd_meas : Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) t
this :
  (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) tᶜ) =
    (fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) univ) - fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) t
⊢ Measurable ((fun a => 1) - fun a => ↑↑(StieltjesFunction.measure (condCdf ρ a)) t)
[PROOFSTEP]
exact Measurable.sub measurable_const ht_cd_meas
[GOAL]
case refine'_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
⊢ ∀ (f : ℕ → Set ℝ),
    Pairwise (Disjoint on f) →
      (∀ (i : ℕ), MeasurableSet (f i)) →
        (∀ (i : ℕ), (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) (f i)) →
          (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) (⋃ (i : ℕ), f i)
[PROOFSTEP]
intro f hf_disj hf_meas hf_cd_meas
[GOAL]
case refine'_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) (f i)
⊢ Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) (⋃ (i : ℕ), f i)
[PROOFSTEP]
simp_rw [measure_iUnion hf_disj hf_meas]
[GOAL]
case refine'_4
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
s : Set ℝ
hs : MeasurableSet s
f : ℕ → Set ℝ
hf_disj : Pairwise (Disjoint on f)
hf_meas : ∀ (i : ℕ), MeasurableSet (f i)
hf_cd_meas : ∀ (i : ℕ), (fun s => Measurable fun b => ↑↑(StieltjesFunction.measure (condCdf ρ b)) s) (f i)
⊢ Measurable fun b => ∑' (i : ℕ), ↑↑(StieltjesFunction.measure (condCdf ρ b)) (f i)
[PROOFSTEP]
exact Measurable.ennreal_tsum hf_cd_meas
