Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit bfe595d

Browse files
committed
feat(order/filter,topology/instances/real): lemmas about at_top, at_bot, and cocompact (#10652)
* prove `comap abs at_top = at_bot ⊔ at_top`; * prove `comap coe at_top = at_top` and `comap coe at_bot = at_bot` for coercion from `ℕ`, `ℤ`, or `ℚ` to an archimedian semiring, ring, or field, respectively; * prove `cocompact ℤ = at_bot ⊔ at_top` and `cocompact ℝ = at_bot ⊔ at_top`.
1 parent e3d9adf commit bfe595d

File tree

4 files changed

+70
-17
lines changed

4 files changed

+70
-17
lines changed

src/algebra/order/group.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,8 +1125,9 @@ section linear_ordered_add_comm_group
11251125

11261126
variables [linear_ordered_add_comm_group α] {a b c d : α}
11271127

1128-
lemma abs_le : |a| ≤ b ↔ - b ≤ a ∧ a ≤ b :=
1129-
by rw [abs_le', and.comm, neg_le]
1128+
lemma abs_le : |a| ≤ b ↔ - b ≤ a ∧ a ≤ b := by rw [abs_le', and.comm, neg_le]
1129+
1130+
lemma le_abs' : a ≤ |b| ↔ b ≤ -a ∨ a ≤ b := by rw [le_abs, or.comm, le_neg]
11301131

11311132
lemma neg_le_of_abs_le (h : |a| ≤ b) : -b ≤ a := (abs_le.mp h).1
11321133

src/order/filter/archimedean.lean

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ variables {α R : Type*}
1919

2020
open filter set
2121

22+
@[simp] lemma nat.comap_coe_at_top [ordered_semiring R] [nontrivial R] [archimedean R] :
23+
comap (coe : ℕ → R) at_top = at_top :=
24+
comap_embedding_at_top (λ _ _, nat.cast_le) exists_nat_ge
25+
2226
lemma tendsto_coe_nat_at_top_iff [ordered_semiring R] [nontrivial R] [archimedean R]
2327
{f : α → ℕ} {l : filter α} :
2428
tendsto (λ n, (f n : R)) l at_top ↔ tendsto f l at_top :=
@@ -28,22 +32,48 @@ lemma tendsto_coe_nat_at_top_at_top [ordered_semiring R] [archimedean R] :
2832
tendsto (coe : ℕ → R) at_top at_top :=
2933
nat.mono_cast.tendsto_at_top_at_top exists_nat_ge
3034

35+
@[simp] lemma int.comap_coe_at_top [ordered_ring R] [nontrivial R] [archimedean R] :
36+
comap (coe : ℤ → R) at_top = at_top :=
37+
comap_embedding_at_top (λ _ _, int.cast_le) $ λ r, let ⟨n, hn⟩ := exists_nat_ge r in ⟨n, hn⟩
38+
39+
@[simp] lemma int.comap_coe_at_bot [ordered_ring R] [nontrivial R] [archimedean R] :
40+
comap (coe : ℤ → R) at_bot = at_bot :=
41+
comap_embedding_at_bot (λ _ _, int.cast_le) $ λ r,
42+
let ⟨n, hn⟩ := exists_nat_ge (-r) in ⟨-n, by simpa [neg_le] using hn⟩
43+
3144
lemma tendsto_coe_int_at_top_iff [ordered_ring R] [nontrivial R] [archimedean R]
3245
{f : α → ℤ} {l : filter α} :
3346
tendsto (λ n, (f n : R)) l at_top ↔ tendsto f l at_top :=
34-
tendsto_at_top_embedding (assume a₁ a₂, int.cast_le) $
35-
assume r, let ⟨n, hn⟩ := exists_nat_ge r in ⟨(n:ℤ), hn⟩
47+
by rw [← tendsto_comap_iff, int.comap_coe_at_top]
48+
49+
lemma tendsto_coe_int_at_bot_iff [ordered_ring R] [nontrivial R] [archimedean R]
50+
{f : α → ℤ} {l : filter α} :
51+
tendsto (λ n, (f n : R)) l at_bot ↔ tendsto f l at_bot :=
52+
by rw [← tendsto_comap_iff, int.comap_coe_at_bot]
3653

3754
lemma tendsto_coe_int_at_top_at_top [ordered_ring R] [archimedean R] :
3855
tendsto (coe : ℤ → R) at_top at_top :=
3956
int.cast_mono.tendsto_at_top_at_top $ λ b,
4057
let ⟨n, hn⟩ := exists_nat_ge b in ⟨n, hn⟩
4158

59+
@[simp] lemma rat.comap_coe_at_top [linear_ordered_field R] [archimedean R] :
60+
comap (coe : ℚ → R) at_top = at_top :=
61+
comap_embedding_at_top (λ _ _, rat.cast_le) $ λ r, let ⟨n, hn⟩ := exists_nat_ge r in ⟨n, by simpa⟩
62+
63+
@[simp] lemma rat.comap_coe_at_bot [linear_ordered_field R] [archimedean R] :
64+
comap (coe : ℚ → R) at_bot = at_bot :=
65+
comap_embedding_at_bot (λ _ _, rat.cast_le) $ λ r, let ⟨n, hn⟩ := exists_nat_ge (-r)
66+
in ⟨-n, by simpa [neg_le]⟩
67+
4268
lemma tendsto_coe_rat_at_top_iff [linear_ordered_field R] [archimedean R]
4369
{f : α → ℚ} {l : filter α} :
4470
tendsto (λ n, (f n : R)) l at_top ↔ tendsto f l at_top :=
45-
tendsto_at_top_embedding (assume a₁ a₂, rat.cast_le) $
46-
assume r, let ⟨n, hn⟩ := exists_nat_ge r in ⟨(n:ℚ), by assumption_mod_cast⟩
71+
by rw [← tendsto_comap_iff, rat.comap_coe_at_top]
72+
73+
lemma tendsto_coe_rat_at_bot_iff [linear_ordered_field R] [archimedean R]
74+
{f : α → ℚ} {l : filter α} :
75+
tendsto (λ n, (f n : R)) l at_bot ↔ tendsto f l at_bot :=
76+
by rw [← tendsto_comap_iff, rat.comap_coe_at_bot]
4777

4878
lemma at_top_countable_basis_of_archimedean [linear_ordered_semiring R] [archimedean R] :
4979
(at_top : filter R).has_countable_basis (λ n : ℕ, true) (λ n, Ici n) :=

src/order/filter/at_top_bot.lean

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,16 @@ tendsto_at_top_mono le_abs_self tendsto_id
635635
lemma tendsto_abs_at_bot_at_top : tendsto (abs : α → α) at_bot at_top :=
636636
tendsto_at_top_mono neg_le_abs_self tendsto_neg_at_bot_at_top
637637

638+
@[simp] lemma comap_abs_at_top : comap (abs : α → α) at_top = at_bot ⊔ at_top :=
639+
begin
640+
refine le_antisymm (((at_top_basis.comap _).le_basis_iff (at_bot_basis.sup at_top_basis)).2 _)
641+
(sup_le tendsto_abs_at_bot_at_top.le_comap tendsto_abs_at_top_at_top.le_comap),
642+
rintro ⟨a, b⟩ -,
643+
refine ⟨max (-a) b, trivial, λ x hx, _⟩,
644+
rw [mem_preimage, mem_Ici, le_abs', max_le_iff, ← min_neg_neg, le_min_iff, neg_neg] at hx,
645+
exact hx.imp and.left and.right
646+
end
647+
638648
end linear_ordered_add_comm_group
639649

640650
section linear_ordered_semiring
@@ -828,15 +838,23 @@ alias tendsto_at_bot_at_bot_of_monotone ← monotone.tendsto_at_bot_at_bot
828838
alias tendsto_at_top_at_top_iff_of_monotone ← monotone.tendsto_at_top_at_top_iff
829839
alias tendsto_at_bot_at_bot_iff_of_monotone ← monotone.tendsto_at_bot_at_bot_iff
830840

841+
lemma comap_embedding_at_top [preorder β] [preorder γ] {e : β → γ}
842+
(hm : ∀b₁ b₂, e b₁ ≤ e b₂ ↔ b₁ ≤ b₂) (hu : ∀c, ∃b, c ≤ e b) :
843+
comap e at_top = at_top :=
844+
le_antisymm
845+
(le_infi $ λ b, le_principal_iff.2 $ mem_comap.2 ⟨Ici (e b), mem_at_top _, λ x, (hm _ _).1⟩)
846+
(tendsto_at_top_at_top_of_monotone (λ _ _, (hm _ _).2) hu).le_comap
847+
848+
lemma comap_embedding_at_bot [preorder β] [preorder γ] {e : β → γ}
849+
(hm : ∀ b₁ b₂, e b₁ ≤ e b₂ ↔ b₁ ≤ b₂) (hu : ∀c, ∃b, e b ≤ c) :
850+
comap e at_bot = at_bot :=
851+
@comap_embedding_at_top (order_dual β) (order_dual γ) _ _ e (function.swap hm) hu
852+
831853
lemma tendsto_at_top_embedding [preorder β] [preorder γ]
832854
{f : α → β} {e : β → γ} {l : filter α}
833855
(hm : ∀b₁ b₂, e b₁ ≤ e b₂ ↔ b₁ ≤ b₂) (hu : ∀c, ∃b, c ≤ e b) :
834856
tendsto (e ∘ f) l at_top ↔ tendsto f l at_top :=
835-
begin
836-
refine ⟨_, (tendsto_at_top_at_top_of_monotone (λ b₁ b₂, (hm b₁ b₂).2) hu).comp⟩,
837-
rw [tendsto_at_top, tendsto_at_top],
838-
exact λ hc b, (hc (e b)).mono (λ a, (hm b (f a)).1)
839-
end
857+
by rw [← comap_embedding_at_top hm hu, tendsto_comap_iff]
840858

841859
/-- A function `f` goes to `-∞` independent of an order-preserving embedding `e`. -/
842860
lemma tendsto_at_bot_embedding [preorder β] [preorder γ]

src/topology/instances/real.lean

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import topology.algebra.ring
99
import ring_theory.subring.basic
1010
import group_theory.archimedean
1111
import algebra.periodic
12+
import order.filter.archimedean
1213

1314
/-!
1415
# Topological properties of ℝ
@@ -98,13 +99,12 @@ instance : proper_space ℤ :=
9899
exact (set.finite_Icc _ _).is_compact,
99100
end
100101

102+
@[simp] lemma cocompact_eq : cocompact ℤ = at_bot ⊔ at_top :=
103+
by simp only [← comap_dist_right_at_top_eq_cocompact (0 : ℤ), dist_eq, sub_zero, cast_zero,
104+
← cast_abs, ← @comap_comap _ _ _ _ abs, int.comap_coe_at_top, comap_abs_at_top]
105+
101106
instance : noncompact_space ℤ :=
102-
begin
103-
rw [← not_compact_space_iff, metric.compact_space_iff_bounded_univ],
104-
rintro ⟨r, hr⟩,
105-
refine (hr (⌊r⌋ + 1) 0 trivial trivial).not_lt _,
106-
simpa [dist_eq] using (lt_floor_add_one r).trans_le (le_abs_self _)
107-
end
107+
noncompact_space_of_ne_bot $ by simp [at_top_ne_bot]
108108

109109
end int
110110

@@ -160,6 +160,10 @@ is_topological_basis_of_open_of_nhds
160160
by { simp only [mem_Union], exact ⟨q, p, rat.cast_lt.1 $ hqa.trans hap, rfl⟩ },
161161
⟨hqa, hap⟩, assume a' ⟨hqa', ha'p⟩, h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩)
162162

163+
@[simp] lemma real.cocompact_eq : cocompact ℝ = at_bot ⊔ at_top :=
164+
by simp only [← comap_dist_right_at_top_eq_cocompact (0 : ℝ), real.dist_eq, sub_zero,
165+
comap_abs_at_top]
166+
163167
/- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings
164168
lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (λp:ℚ, p + r) :=
165169
_

0 commit comments

Comments
 (0)