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

Commit 89fd088

Browse files
urkudmergify[bot]
authored andcommitted
feat(topology/uniform_space/cauchy): sequentially complete space with a countable basis is complete (#1761)
* feat(topology/uniform_space/cauchy): sequentially complete space with a countable basis is complete This is a more general version of what is currently proved in `cau_seq_filter`. Migration of the latter file to the new code will be done in a separate PR. * Add docs, drop unused section vars, make arguments `U` and `U'` explicit. * Update src/topology/uniform_space/cauchy.lean Co-Authored-By: sgouezel <sebastien.gouezel@univ-rennes1.fr> * Fix some comments
1 parent 177cced commit 89fd088

File tree

1 file changed

+165
-35
lines changed

1 file changed

+165
-35
lines changed

src/topology/uniform_space/cauchy.lean

Lines changed: 165 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ Authors: Johannes Hölzl, Mario Carneiro
55
66
Theory of Cauchy filters in uniform spaces. Complete uniform spaces. Totally bounded subsets.
77
-/
8-
import topology.uniform_space.basic
8+
import topology.uniform_space.basic data.set.intervals
9+
10+
universes u v
911

1012
open filter topological_space lattice set classical
1113
open_locale classical
12-
variables {α : Type*} {β : Type*} [uniform_space α]
13-
universe u
14+
variables {α : Type u} {β : Type v} [uniform_space α]
1415

1516
open_locale uniformity topological_space
1617

@@ -20,6 +21,8 @@ open_locale uniformity topological_space
2021
cofinitely many of the `a n` is Cauchy iff `a` is a Cauchy sequence. -/
2122
def cauchy (f : filter α) := f ≠ ⊥ ∧ filter.prod f f ≤ (𝓤 α)
2223

24+
/-- A set `s` is called *complete*, if any Cauchy filter `f` such that `s ∈ f`
25+
has a limit in `s` (formally, it satisfies `f ≤ 𝓝 x` for some `x ∈ s`). -/
2326
def is_complete (s : set α) := ∀f, cauchy f → f ≤ principal s → ∃x∈s, f ≤ 𝓝 x
2427

2528
lemma cauchy_iff {f : filter α} :
@@ -50,41 +53,38 @@ cauchy_downwards cauchy_nhds
5053
(show principal {a} ≠ ⊥, by simp)
5154
(pure_le_nhds a)
5255

56+
/-- The common part of the proofs of `le_nhds_of_cauchy_adhp` and
57+
`sequentially_complete.le_nhds_of_seq_tendsto_nhds`: if for any entourage `s`
58+
one can choose a set `t ∈ f` of diameter `s` such that it contains a point `y`
59+
with `(x, y) ∈ s`, then `f` converges to `x`. -/
60+
lemma le_nhds_of_cauchy_adhp_aux {f : filter α} {x : α}
61+
(adhs : ∀ s ∈ 𝓤 α, ∃ t ∈ f, (set.prod t t ⊆ s) ∧ ∃ y, (y ∈ t) ∧ (x, y) ∈ s) :
62+
f ≤ 𝓝 x :=
63+
begin
64+
-- Consider a neighborhood `s` of `x`
65+
assume s hs,
66+
-- Take an entourage twice smaller than `s`
67+
rcases comp_mem_uniformity_sets (mem_nhds_uniformity_iff.1 hs) with ⟨U, U_mem, hU⟩,
68+
-- Take a set `t ∈ f`, `t × t ⊆ U`, and a point `y ∈ t` such that `(x, y) ∈ U`
69+
rcases adhs U U_mem with ⟨t, t_mem, ht, y, hy, hxy⟩,
70+
apply mem_sets_of_superset t_mem,
71+
-- Given a point `z ∈ t`, we have `(x, y) ∈ U` and `(y, z) ∈ t × t ⊆ U`, hence `z ∈ s`
72+
exact (λ z hz, hU (prod_mk_mem_comp_rel hxy (ht $ mk_mem_prod hy hz)) rfl)
73+
end
74+
75+
/-- If `x` is an adherent (cluster) point for a Cauchy filter `f`, then it is a limit point
76+
for `f`. -/
5377
lemma le_nhds_of_cauchy_adhp {f : filter α} {x : α} (hf : cauchy f)
5478
(adhs : f ⊓ 𝓝 x ≠ ⊥) : f ≤ 𝓝 x :=
55-
have ∀s∈f.sets, x ∈ closure s,
79+
le_nhds_of_cauchy_adhp_aux
5680
begin
57-
intros s hs,
58-
simp [closure_eq_nhds, inf_comm],
59-
exact assume h', adhs $ bot_unique $ h' ▸ inf_le_inf (by simp; exact hs) (le_refl _)
60-
end,
61-
calc f ≤ f.lift' (λs:set α, {y | x ∈ closure s ∧ y ∈ closure s}) :
62-
le_infi $ assume s, le_infi $ assume hs,
63-
begin
64-
rw [←forall_sets_neq_empty_iff_neq_bot] at adhs,
65-
simp [this s hs],
66-
exact mem_sets_of_superset hs subset_closure
67-
end
68-
... ≤ f.lift' (λs:set α, {y | (x, y) ∈ closure (set.prod s s)}) :
69-
by simp [closure_prod_eq]; exact le_refl _
70-
... = (filter.prod f f).lift' (λs:set (α×α), {y | (x, y) ∈ closure s}) :
71-
begin
72-
rw [prod_same_eq],
73-
rw [lift'_lift'_assoc],
74-
exact monotone_prod monotone_id monotone_id,
75-
exact monotone_preimage.comp (assume s t h x h', closure_mono h h')
76-
end
77-
... ≤ (𝓤 α).lift' (λs:set (α×α), {y | (x, y) ∈ closure s}) : lift'_mono hf.right (le_refl _)
78-
... = ((𝓤 α).lift' closure).lift' (λs:set (α×α), {y | (x, y) ∈ s}) :
79-
begin
80-
rw [lift'_lift'_assoc],
81-
exact assume s t h, closure_mono h,
82-
exact monotone_preimage
83-
end
84-
... = (𝓤 α).lift' (λs:set (α×α), {y | (x, y) ∈ s}) :
85-
by rw [←uniformity_eq_uniformity_closure]
86-
... = 𝓝 x :
87-
by rw [nhds_eq_uniformity]
81+
assume s hs,
82+
-- Take `t ∈ f` such that `t × t ⊆ s`.
83+
rcases (cauchy_iff.1 hf).2 s hs with ⟨t, t_mem, ht⟩,
84+
use [t, t_mem, ht],
85+
exact exists_mem_of_ne_empty (forall_sets_neq_empty_iff_neq_bot.2 adhs _
86+
(inter_mem_inf_sets t_mem (mem_nhds_left x hs)))
87+
end
8888

8989
lemma le_nhds_iff_adhp_of_cauchy {f : filter α} {x : α} (hf : cauchy f) :
9090
f ≤ 𝓝 x ↔ f ⊓ 𝓝 x ≠ ⊥ :=
@@ -122,6 +122,20 @@ lemma cauchy_seq_iff_prod_map [inhabited β] [semilattice_sup β] {u : β → α
122122
cauchy_seq u ↔ map (prod.map u u) at_top ≤ 𝓤 α :=
123123
iff.trans (and_iff_right (map_ne_bot at_top_ne_bot)) (prod_map_at_top_eq u u ▸ iff.rfl)
124124

125+
lemma cauchy_seq_of_controlled [semilattice_sup β] [inhabited β]
126+
(U : β → set (α × α)) (hU : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s)
127+
{f : β → α} (hf : ∀ {N m n : β}, N ≤ m → N ≤ n → (f m, f n) ∈ U N) :
128+
cauchy_seq f :=
129+
cauchy_seq_iff_prod_map.2
130+
begin
131+
assume s hs,
132+
rw [mem_map, mem_at_top_sets],
133+
cases hU s hs with N hN,
134+
refine ⟨(N, N), λ mn hmn, _⟩,
135+
cases mn with m n,
136+
exact hN (hf hmn.1 hmn.2)
137+
end
138+
125139
/-- A complete space is defined here using uniformities. A uniform space
126140
is complete if every Cauchy filter converges. -/
127141
class complete_space (α : Type u) [uniform_space α] : Prop :=
@@ -330,3 +344,119 @@ instance complete_of_compact {α : Type u} [uniform_space α] [compact_space α]
330344
lemma compact_of_totally_bounded_is_closed [complete_space α] {s : set α}
331345
(ht : totally_bounded s) (hc : is_closed s) : compact s :=
332346
(@compact_iff_totally_bounded_complete α _ s).2 ⟨ht, is_complete_of_is_closed hc⟩
347+
348+
/-! ### Sequentially complete space
349+
350+
In this section we prove that a uniform space is complete provided that it is sequentially complete
351+
(i.e., any Cauchy sequence converges) and its uniformity filter admits a countable generating set.
352+
In particular, this applies to (e)metric spaces, see file `topology/metric_space/cau_seq_filter`.
353+
354+
More precisely, we assume that there is a sequence of entourages `U_n` such that any other
355+
entourage includes one of `U_n`. Then any Cauchy filter `f` generates a decreasing sequence of
356+
sets `s_n ∈ f` such that `s_n × s_n ⊆ U_n`. Choose a sequence `x_n∈s_n`. It is easy to show
357+
that this is a Cauchy sequence. If this sequence converges to some `a`, then `f ≤ 𝓝 a`. -/
358+
359+
namespace sequentially_complete
360+
361+
variables {f : filter α} (hf : cauchy f) {U : ℕ → set (α × α)}
362+
(U_mem : ∀ n, U n ∈ 𝓤 α) (U_le : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s)
363+
364+
open set finset
365+
366+
noncomputable theory
367+
368+
/-- An auxiliary sequence of sets approximating a Cauchy filter. -/
369+
def set_seq_aux (n : ℕ) : {s : set α // ∃ (_ : s ∈ f), s.prod s ⊆ U n } :=
370+
indefinite_description _ $ (cauchy_iff.1 hf).2 (U n) (U_mem n)
371+
372+
/-- Given a Cauchy filter `f` and a sequence `U` of entourages, `set_seq` provides
373+
a sequence of monotonically decreasing sets `s n ∈ f` such that `(s n).prod (s n) ⊆ U`. -/
374+
def set_seq (n : ℕ) : set α := ⋂ m ∈ Iic n, (set_seq_aux hf U_mem m).val
375+
376+
lemma set_seq_mem (n : ℕ) : set_seq hf U_mem n ∈ f :=
377+
Inter_mem_sets (finite_le_nat n) (λ m _, (set_seq_aux hf U_mem m).2.fst)
378+
379+
lemma set_seq_mono ⦃m n : ℕ⦄ (h : m ≤ n) : set_seq hf U_mem n ⊆ set_seq hf U_mem m :=
380+
bInter_subset_bInter_left (λ k hk, le_trans hk h)
381+
382+
lemma set_seq_sub_aux (n : ℕ) : set_seq hf U_mem n ⊆ set_seq_aux hf U_mem n :=
383+
bInter_subset_of_mem right_mem_Iic
384+
385+
lemma set_seq_prod_subset {N m n} (hm : N ≤ m) (hn : N ≤ n) :
386+
(set_seq hf U_mem m).prod (set_seq hf U_mem n) ⊆ U N :=
387+
begin
388+
assume p hp,
389+
refine (set_seq_aux hf U_mem N).2.snd ⟨_, _⟩;
390+
apply set_seq_sub_aux,
391+
exact set_seq_mono hf U_mem hm hp.1,
392+
exact set_seq_mono hf U_mem hn hp.2
393+
end
394+
395+
/-- A sequence of points such that `seq n ∈ set_seq n`. Here `set_seq` is a monotonically
396+
decreasing sequence of sets `set_seq n ∈ f` with diameters controlled by a given sequence
397+
of entourages. -/
398+
def seq (n : ℕ) : α := some $ inhabited_of_mem_sets hf.1 (set_seq_mem hf U_mem n)
399+
400+
lemma seq_mem (n : ℕ) : seq hf U_mem n ∈ set_seq hf U_mem n :=
401+
some_spec $ inhabited_of_mem_sets hf.1 (set_seq_mem hf U_mem n)
402+
403+
lemma seq_pair_mem ⦃N m n : ℕ⦄ (hm : N ≤ m) (hn : N ≤ n) :
404+
(seq hf U_mem m, seq hf U_mem n) ∈ U N :=
405+
set_seq_prod_subset hf U_mem hm hn ⟨seq_mem hf U_mem m, seq_mem hf U_mem n⟩
406+
407+
include U_le
408+
409+
theorem seq_is_cauchy_seq : cauchy_seq $ seq hf U_mem :=
410+
cauchy_seq_of_controlled U U_le $ seq_pair_mem hf U_mem
411+
412+
/-- If the sequence `sequentially_complete.seq` converges to `a`, then `f ≤ 𝓝 a`. -/
413+
theorem le_nhds_of_seq_tendsto_nhds ⦃a : α⦄ (ha : tendsto (seq hf U_mem) at_top (𝓝 a)) :
414+
f ≤ 𝓝 a :=
415+
le_nhds_of_cauchy_adhp_aux
416+
begin
417+
assume s hs,
418+
rcases U_le s hs with ⟨m, hm⟩,
419+
rcases (tendsto_at_top' _ _).1 ha _ (mem_nhds_left a (U_mem m)) with ⟨n, hn⟩,
420+
refine ⟨set_seq hf U_mem (max m n), set_seq_mem hf U_mem _, _,
421+
seq hf U_mem (max m n), seq_mem hf U_mem _, _⟩,
422+
{ have := le_max_left m n,
423+
exact set.subset.trans (set_seq_prod_subset hf U_mem this this) hm },
424+
{ exact hm (hn _ $ le_max_right m n) }
425+
end
426+
427+
end sequentially_complete
428+
429+
namespace uniform_space
430+
431+
open sequentially_complete
432+
433+
variables (U : ℕ → set (α × α)) (U_mem : ∀ n, U n ∈ 𝓤 α) (U_le : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s)
434+
(U' : ℕ → set (α × α)) (U'_mem : ∀ n, U' n ∈ 𝓤 α)
435+
436+
/-- A uniform space is complete provided that (a) its uniformity filter has a countable basis;
437+
(b) any sequence satisfying a "controlled" version of the Cauchy condition converges. -/
438+
theorem complete_of_convergent_controlled_sequences
439+
(H : ∀ u : ℕ → α, (∀ N m n, N ≤ m → N ≤ n → (u m, u n) ∈ U' N) → ∃ a, tendsto u at_top (𝓝 a)) :
440+
complete_space α :=
441+
-- We take a sequence majorated by both `U` and `U'`
442+
let U'' := λ n, U n ∩ U' n in
443+
have U''_sub_U : ∀ n, U'' n ⊆ U n, from λ n, inter_subset_left _ _,
444+
have U''_sub_U' : ∀ n, U'' n ⊆ U' n, from λ n, inter_subset_right _ _,
445+
have U''_mem : ∀ n, U'' n ∈ 𝓤 α, from λ n, inter_mem_sets (U_mem n) (U'_mem n),
446+
have U''_le : ∀ s ∈ 𝓤 α, ∃ n, U'' n ⊆ s,
447+
from λ s hs, (U_le s hs).imp (λ n hn x hx, hn $ U''_sub_U n hx),
448+
begin
449+
refine ⟨λ f hf, (H (seq hf U''_mem) (λ N m n hm hn, _)).imp $
450+
le_nhds_of_seq_tendsto_nhds hf U''_mem U''_le⟩,
451+
exact U''_sub_U' _ (seq_pair_mem hf U''_mem hm hn),
452+
end
453+
454+
/-- A sequentially complete uniform space with a countable basis of the uniformity filter is
455+
complete. -/
456+
theorem complete_of_cauchy_seq_tendsto
457+
(H : ∀ u : ℕ → α, cauchy_seq u → ∃a, tendsto u at_top (𝓝 a)) :
458+
complete_space α :=
459+
complete_of_convergent_controlled_sequences U U_mem U_le U U_mem
460+
(λ u hu, H u $ cauchy_seq_of_controlled U U_le hu)
461+
462+
end uniform_space

0 commit comments

Comments
 (0)