Skip to content

Commit

Permalink
refactor(Probability/Kernel/CondCdf): mv ofReal_cinfi (#10044)
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz Firsching <firsching@google.com>
  • Loading branch information
mo271 and mo271 committed Jan 28, 2024
1 parent d5277c9 commit e8bfb67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Mathlib/Probability/Kernel/CondCdf.lean
Expand Up @@ -108,21 +108,6 @@ theorem tendsto_of_antitone {ι α : Type*} [Preorder ι] [TopologicalSpace α]
@tendsto_of_monotone ι αᵒᵈ _ _ _ _ _ h_mono
#align tendsto_of_antitone tendsto_of_antitone

-- todo: move to data/real/ennreal
theorem ENNReal.ofReal_cinfi (f : α → ℝ) [Nonempty α] :
ENNReal.ofReal (⨅ i, f i) = ⨅ i, ENNReal.ofReal (f i) := by
by_cases hf : BddBelow (range f)
· exact
Monotone.map_ciInf_of_continuousAt ENNReal.continuous_ofReal.continuousAt
(fun i j hij => ENNReal.ofReal_le_ofReal hij) hf
· symm
rw [Real.iInf_of_not_bddBelow hf, ENNReal.ofReal_zero, ← ENNReal.bot_eq_zero, iInf_eq_bot]
obtain ⟨y, hy_mem, hy_neg⟩ := not_bddBelow_iff.mp hf 0
obtain ⟨i, rfl⟩ := mem_range.mpr hy_mem
refine' fun x hx => ⟨i, _⟩
rwa [ENNReal.ofReal_of_nonpos hy_neg.le]
#align ennreal.of_real_cinfi ENNReal.ofReal_cinfi

-- todo: move to measure_theory/measurable_space
/-- Monotone convergence for an infimum over a directed family and indexed by a countable type -/
theorem lintegral_iInf_directed_of_measurable {mα : MeasurableSpace α} [Countable β]
Expand Down
14 changes: 14 additions & 0 deletions Mathlib/Topology/Instances/ENNReal.lean
Expand Up @@ -708,6 +708,20 @@ theorem exists_lt_add_of_lt_add {x y z : ℝ≥0∞} (h : x < y + z) (hy : y ≠
exact ⟨y', z', hy', hz', hx⟩
#align ennreal.exists_lt_add_of_lt_add ENNReal.exists_lt_add_of_lt_add

theorem ofReal_cinfi (f : α → ℝ) [Nonempty α] :
ENNReal.ofReal (⨅ i, f i) = ⨅ i, ENNReal.ofReal (f i) := by
by_cases hf : BddBelow (range f)
· exact
Monotone.map_ciInf_of_continuousAt ENNReal.continuous_ofReal.continuousAt
(fun i j hij => ENNReal.ofReal_le_ofReal hij) hf
· symm
rw [Real.iInf_of_not_bddBelow hf, ENNReal.ofReal_zero, ← ENNReal.bot_eq_zero, iInf_eq_bot]
obtain ⟨y, hy_mem, hy_neg⟩ := not_bddBelow_iff.mp hf 0
obtain ⟨i, rfl⟩ := mem_range.mpr hy_mem
refine' fun x hx => ⟨i, _⟩
rwa [ENNReal.ofReal_of_nonpos hy_neg.le]
#align ennreal.of_real_cinfi ENNReal.ofReal_cinfi

end TopologicalSpace

section Liminf
Expand Down

0 comments on commit e8bfb67

Please sign in to comment.