Skip to content

Commit 6b3e499

Browse files
committed
feat(Topology/Order/IsLUB): introduce lemmas for rewriting inequalities under CountableInterFilter (leanprover-community#34375)
Introduce the following lemmas: - eventually_le_const_iff_forall_gt_eventually_lt_const - eventually_const_le_iff_forall_lt_eventually_const_lt which can be used to get an epsilon of room outside the filter in an eventual inequality. As an application, proofs of some lemmas for `limsup` and `ae` inequalities are simplified.
1 parent ab192c7 commit 6b3e499

3 files changed

Lines changed: 27 additions & 44 deletions

File tree

Mathlib/MeasureTheory/Function/AEEqOfLIntegral.lean

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,7 @@ variable {α : Type*} {m m0 : MeasurableSpace α} {μ : Measure α} {p : ℝ≥0
4242
theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β]
4343
[OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) :
4444
(∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0 := by
45-
rw [ae_iff]
46-
push Not
47-
constructor
48-
· intro h b hb
49-
exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h
50-
intro hc
51-
by_cases! h : ∀ b, c ≤ b
52-
· have : {a : α | f a < c} = ∅ := by
53-
apply Set.eq_empty_iff_forall_notMem.2 fun x hx => ?_
54-
exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim
55-
simp [this]
56-
by_cases! H : ¬IsLUB (Set.Iio c) c
57-
· have : c ∈ upperBounds (Set.Iio c) := fun y hy => le_of_lt hy
58-
obtain ⟨b, b_up, bc⟩ : ∃ b : β, b ∈ upperBounds (Set.Iio c) ∧ b < c := by
59-
simpa [IsLUB, IsLeast, this, lowerBounds] using H
60-
exact measure_mono_null (fun x hx => b_up hx) (hc b bc)
61-
obtain ⟨u, _, u_lt, u_lim, -⟩ :
62-
∃ u : ℕ → β,
63-
StrictMono u ∧ (∀ n : ℕ, u n < c) ∧ Tendsto u atTop (𝓝 c) ∧ ∀ n : ℕ, u n ∈ Set.Iio c :=
64-
H.exists_seq_strictMono_tendsto_of_notMem (lt_irrefl c) h
65-
have h_Union : {x | f x < c} = ⋃ n : ℕ, {x | f x ≤ u n} := by
66-
ext1 x
67-
simp_rw [Set.mem_iUnion, Set.mem_setOf_eq]
68-
constructor <;> intro h
69-
· obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists; exact ⟨n, hn.le⟩
70-
· obtain ⟨n, hn⟩ := h; exact hn.trans_lt (u_lt _)
71-
rw [h_Union, measure_iUnion_null_iff]
72-
intro n
73-
exact hc _ (u_lt n)
45+
simp_rw [eventually_const_le_iff_forall_lt_eventually_const_lt, ae_iff, not_lt]
7446

7547
lemma ae_le_const_iff_forall_gt_measure_zero {β} [LinearOrder β] [TopologicalSpace β]
7648
[OrderTopology β] [FirstCountableTopology β] {μ : Measure α} (f : α → β) (c : β) :

Mathlib/Topology/Order/IsLUB.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,4 +432,28 @@ theorem DenseRange.exists_seq_strictAnti_tendsto {β : Type*} [LinearOrder β] [
432432
∃ u : ℕ → β, StrictAnti u ∧ (∀ n, f (u n) ∈ Ioi x) ∧ Tendsto (f ∘ u) atTop (𝓝 x) :=
433433
hf.exists_seq_strictMono_tendsto (α := αᵒᵈ) (β := βᵒᵈ) hmono.dual x
434434

435+
theorem eventually_le_const_iff_forall_gt_eventually_lt_const [FirstCountableTopology α]
436+
{l : Filter γ} [CountableInterFilter l] {f : γ → α} {a : α} :
437+
(∀ᶠ x in l, f x ≤ a) ↔ ∀ b, a < b → ∀ᶠ x in l, f x < b where
438+
mp h c hbc := h.mono <| fun x hx ↦ lt_of_le_of_lt hx hbc
439+
mpr h := by
440+
rcases exists_glb_Ioi a with ⟨d, hd⟩
441+
obtain rfl | H0 := glb_Ioi_eq_self_or_Ioi_eq_Ici _ hd
442+
· obtain h | _ := isTop_or_exists_gt d
443+
· exact .of_forall (fun _ ↦ h _)
444+
obtain ⟨u, -, -, hu_tt, hu_gt⟩ := hd.exists_seq_antitone_tendsto (by simpa)
445+
replace h := fun n ↦ h (u n) (by grind)
446+
rw [← eventually_countable_forall] at h
447+
filter_upwards [h] with x hx
448+
exact ge_of_tendsto hu_tt <| .of_forall <| fun n ↦ le_of_lt <| hx n
449+
· specialize h d <| by simp [← Set.mem_Ioi, H0]
450+
filter_upwards [h] with x hx
451+
rw [← Set.compl_Iic, ← Set.compl_Iio, compl_inj_iff] at H0
452+
simpa [← Set.mem_Iic, ← Set.mem_Iio, H0] using hx
453+
454+
theorem eventually_const_le_iff_forall_lt_eventually_const_lt [FirstCountableTopology α]
455+
{l : Filter γ} [CountableInterFilter l] {f : γ → α} {a : α} :
456+
(∀ᶠ x in l, a ≤ f x) ↔ ∀ b, b < a → ∀ᶠ x in l, b < f x :=
457+
eventually_le_const_iff_forall_gt_eventually_lt_const (α := αᵒᵈ)
458+
435459
end OrderTopology

Mathlib/Topology/Order/LiminfLimsup.lean

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -366,21 +366,8 @@ variable [CountableInterFilter f] {u : β → α}
366366

367367
theorem eventually_le_limsup (hf : IsBoundedUnder (· ≤ ·) f u := by isBoundedDefault) :
368368
∀ᶠ b in f, u b ≤ f.limsup u := by
369-
obtain ha | ha := isTop_or_exists_gt (f.limsup u)
370-
· exact Eventually.of_forall fun _ => ha _
371-
by_cases H : IsGLB (Set.Ioi (f.limsup u)) (f.limsup u)
372-
· obtain ⟨u, -, -, hua, hu⟩ := H.exists_seq_antitone_tendsto ha
373-
have := fun n => eventually_lt_of_limsup_lt (hu n) hf
374-
exact
375-
(eventually_countable_forall.2 this).mono fun b hb =>
376-
ge_of_tendsto hua <| Eventually.of_forall fun n => (hb _).le
377-
· obtain ⟨x, hx, xa⟩ : ∃ x, (∀ ⦃b⦄, f.limsup u < b → x ≤ b) ∧ f.limsup u < x := by
378-
simp only [IsGLB, IsGreatest, lowerBounds, upperBounds, Set.mem_Ioi, Set.mem_setOf_eq,
379-
not_and, not_forall, not_le, exists_prop] at H
380-
exact H fun x => le_of_lt
381-
filter_upwards [eventually_lt_of_limsup_lt xa hf] with y hy
382-
contrapose! hy
383-
exact hx hy
369+
rw [eventually_le_const_iff_forall_gt_eventually_lt_const]
370+
exact fun _ hc ↦ eventually_lt_of_limsup_lt hc
384371

385372
theorem eventually_liminf_le (hf : IsBoundedUnder (· ≥ ·) f u := by isBoundedDefault) :
386373
∀ᶠ b in f, f.liminf u ≤ u b :=

0 commit comments

Comments
 (0)