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

Commit 6434658

Browse files
rwbartonjohoelzl
authored andcommitted
feat(analysis/topology): locally compact spaces and the compact-open topology
1 parent 68acd76 commit 6434658

File tree

2 files changed

+163
-8
lines changed

2 files changed

+163
-8
lines changed

analysis/topology/compact_open.lean

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/-
2+
Copyright (c) 2018 Reid Barton. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Reid Barton
5+
-/
6+
7+
import analysis.topology.continuity tactic.tidy
8+
9+
open set
10+
11+
universes u v w
12+
13+
section locally_compact
14+
15+
-- There are various definitions of "locally compact space" in the
16+
-- literature, which agree for Hausdorff spaces but not in general.
17+
-- This one is the precise condition on X needed for the evaluation
18+
-- map C(X, Y) × X → Y to be continuous for all Y when C(X, Y) is
19+
-- given the compact-open topology.
20+
class locally_compact_space (α : Type u) [topological_space α] :=
21+
(local_compact_nhds : ∀ (x : α) (n ∈ (nhds x).sets), ∃ s ∈ (nhds x).sets, s ⊆ n ∧ compact s)
22+
23+
variables {α : Type u} [topological_space α]
24+
25+
lemma locally_compact_of_compact_nhds [t2_space α]
26+
(h : ∀ x : α, ∃ s, s ∈ (nhds x).sets ∧ compact s) :
27+
locally_compact_space α :=
28+
⟨assume x n hn,
29+
let ⟨u, un, uo, xu⟩ := mem_nhds_sets_iff.mp hn in
30+
let ⟨k, kx, kc⟩ := h x in
31+
-- K is compact but not necessarily contained in N.
32+
-- K \ U is again compact and doesn't contain x, so
33+
-- we may find open sets V, W separating x from K \ U.
34+
-- Then K \ W is a compact neighborhood of x contained in U.
35+
let ⟨v, w, vo, wo, xv, kuw, vw⟩ :=
36+
compact_compact_separated compact_singleton (compact_diff kc uo)
37+
(by rw [singleton_inter_eq_empty]; exact λ h, h.2 xu) in
38+
have wn : -w ∈ (nhds x).sets, from
39+
mem_nhds_sets_iff.mpr
40+
⟨v, subset_compl_iff_disjoint.mpr vw, vo, singleton_subset_iff.mp xv⟩,
41+
⟨k - w,
42+
filter.inter_mem_sets kx wn,
43+
subset.trans (diff_subset_comm.mp kuw) un,
44+
compact_diff kc wo⟩⟩
45+
46+
lemma locally_compact_of_compact [t2_space α] (h : compact (univ : set α)) :
47+
locally_compact_space α :=
48+
locally_compact_of_compact_nhds (assume x, ⟨univ, mem_nhds_sets is_open_univ trivial, h⟩)
49+
50+
end locally_compact
51+
52+
section compact_open
53+
variables {α : Type u} {β : Type v} {γ : Type w}
54+
variables [topological_space α] [topological_space β] [topological_space γ]
55+
56+
local notation `C(` α `, ` β `)` := subtype (continuous : set (α → β))
57+
58+
def compact_open_gen {s : set α} (hs : compact s) {u : set β} (hu : is_open u) : set C(α,β) :=
59+
{f | f.val '' s ⊆ u}
60+
61+
-- The compact-open topology on the space of continuous maps α → β.
62+
def compact_open : topological_space C(α, β) :=
63+
topological_space.generate_from
64+
{m | ∃ (s : set α) (hs : compact s) (u : set β) (hu : is_open u), m = compact_open_gen hs hu}
65+
66+
local attribute [instance] compact_open
67+
68+
private lemma is_open_gen {s : set α} (hs : compact s) {u : set β} (hu : is_open u) :
69+
is_open (compact_open_gen hs hu) :=
70+
topological_space.generate_open.basic _ (by dsimp [mem_set_of_eq]; tauto)
71+
72+
section functorial
73+
74+
variables {g : β → γ} (hg : continuous g)
75+
76+
def continuous_map.induced : C(α, β) → C(α, γ) :=
77+
λ f, ⟨g ∘ f, f.property.comp hg⟩
78+
79+
private lemma preimage_gen {s : set α} (hs : compact s) {u : set γ} (hu : is_open u) :
80+
continuous_map.induced hg ⁻¹' (compact_open_gen hs hu) = compact_open_gen hs (hg _ hu) :=
81+
begin
82+
ext ⟨f, _⟩,
83+
change g ∘ f '' s ⊆ u ↔ f '' s ⊆ g ⁻¹' u,
84+
rw [image_comp, image_subset_iff]
85+
end
86+
87+
-- C(α, -) is a functor.
88+
lemma continuous_induced : continuous (continuous_map.induced hg : C(α, β) → C(α, γ)) :=
89+
continuous_generated_from $ assume m ⟨s, hs, u, hu, hm⟩,
90+
by rw [hm, preimage_gen]; apply is_open_gen
91+
92+
end functorial
93+
94+
section ev
95+
96+
variables (α β)
97+
def ev : C(α, β) × α → β := λ p, p.1.val p.2
98+
99+
variables {α β}
100+
-- The evaluation map C(α, β) × α → β is continuous if α is locally compact.
101+
lemma continuous_ev [locally_compact_space α] : continuous (ev α β) :=
102+
continuous_iff_tendsto.mpr $ assume ⟨f, x⟩ n hn,
103+
let ⟨v, vn, vo, fxv⟩ := mem_nhds_sets_iff.mp hn in
104+
have v ∈ (nhds (f.val x)).sets, from mem_nhds_sets vo fxv,
105+
let ⟨s, hs, sv, sc⟩ :=
106+
locally_compact_space.local_compact_nhds x (f.val ⁻¹' v)
107+
(f.property.tendsto x this) in
108+
let ⟨u, us, uo, xu⟩ := mem_nhds_sets_iff.mp hs in
109+
show (ev α β) ⁻¹' n ∈ (nhds (f, x)).sets, from
110+
let w := set.prod (compact_open_gen sc vo) u in
111+
have w ⊆ ev α β ⁻¹' n, from assume ⟨f', x'⟩ ⟨hf', hx'⟩, calc
112+
f'.val x' ∈ f'.val '' s : mem_image_of_mem f'.val (us hx')
113+
... ⊆ v : hf'
114+
... ⊆ n : vn,
115+
have is_open w, from is_open_prod (is_open_gen _ _) uo,
116+
have (f, x) ∈ w, from ⟨image_subset_iff.mpr sv, xu⟩,
117+
mem_nhds_sets_iff.mpr ⟨w, by assumption, by assumption, by assumption⟩
118+
119+
end ev
120+
121+
section coev
122+
123+
variables (α β)
124+
def coev : β → C(α, β × α) :=
125+
λ b, ⟨λ a, (b, a), continuous.prod_mk continuous_const continuous_id⟩
126+
127+
variables {α β}
128+
lemma image_coev {y : β} (s : set α) : (coev α β y).val '' s = set.prod {y} s := by tidy
129+
130+
-- The coevaluation map β → C(α, β × α) is continuous (always).
131+
lemma continuous_coev : continuous (coev α β) :=
132+
continuous_generated_from $ begin
133+
rintros _ ⟨s, sc, u, uo, rfl⟩,
134+
rw is_open_iff_forall_mem_open,
135+
intros y hy,
136+
change (coev α β y).val '' s ⊆ u at hy,
137+
rw image_coev s at hy,
138+
rcases generalized_tube_lemma compact_singleton sc uo hy
139+
with ⟨v, w, vo, wo, yv, sw, vwu⟩,
140+
refine ⟨v, _, vo, singleton_subset_iff.mp yv⟩,
141+
intros y' hy',
142+
change (coev α β y').val '' s ⊆ u,
143+
rw image_coev s,
144+
exact subset.trans (prod_mono (singleton_subset_iff.mpr hy') sw) vwu
145+
end
146+
147+
end coev
148+
149+
end compact_open

analysis/topology/topological_space.lean

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,19 +465,25 @@ end locally_finite
465465
/- compact sets -/
466466
section compact
467467

468-
/-- A set `s` is compact if every filter that contains `s` also meets every
469-
neighborhood of some `a ∈ s`. -/
468+
/-- A set `s` is compact if for every filter `f` that contains `s`,
469+
every set of `f` also meets every neighborhood of some `a ∈ s`. -/
470470
def compact (s : set α) := ∀f, f ≠ ⊥ → f ≤ principal s → ∃a∈s, f ⊓ nhds a ≠ ⊥
471471

472-
lemma compact_of_is_closed_subset {s t : set α}
473-
(hs : compact s) (ht : is_closed t) (h : t ⊆ s) : compact t :=
474-
assume f hnf hsf,
475-
let ⟨a, hsa, (ha : f ⊓ nhds a ≠ ⊥)⟩ := hs f hnf (le_trans hsf $ by simp [h]) in
472+
lemma compact_inter {s t : set α} (hs : compact s) (ht : is_closed t) : compact (s ∩ t) :=
473+
assume f hnf hstf,
474+
let ⟨a, hsa, (ha : f ⊓ nhds a ≠ ⊥)⟩ := hs f hnf (le_trans hstf (by simp)) in
476475
have ∀a, principal t ⊓ nhds a ≠ ⊥ → a ∈ t,
477476
by intro a; rw [inf_comm]; rw [is_closed_iff_nhds] at ht; exact ht a,
478477
have a ∈ t,
479-
from this a $ neq_bot_of_le_neq_bot ha $ inf_le_inf hsf (le_refl _),
480-
⟨a, this, ha⟩
478+
from this a $ neq_bot_of_le_neq_bot ha $ inf_le_inf (le_trans hstf (by simp)) (le_refl _),
479+
⟨a, ⟨hsa, this⟩, ha⟩
480+
481+
lemma compact_diff {s t : set α} (hs : compact s) (ht : is_open t) : compact (s \ t) :=
482+
compact_inter hs (is_closed_compl_iff.mpr ht)
483+
484+
lemma compact_of_is_closed_subset {s t : set α}
485+
(hs : compact s) (ht : is_closed t) (h : t ⊆ s) : compact t :=
486+
by convert ← compact_inter hs ht; exact inter_eq_self_of_subset_right h
481487

482488
lemma compact_adherence_nhdset {s t : set α} {f : filter α}
483489
(hs : compact s) (hf₂ : f ≤ principal s) (ht₁ : is_open t) (ht₂ : ∀a∈s, nhds a ⊓ f ≠ ⊥ → a ∈ t) :

0 commit comments

Comments
 (0)