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

Commit 5ff099b

Browse files
committed
feat(topology): preliminaries for Haar measure (#3194)
Define group operations on sets Define compacts, in a similar way to opens Prove some "separation" properties for topological groups Rename `continuous.comap` to `opens.comap` (so that we can have comaps for other kinds of sets in topological spaces) Rename `inf_val` to `inf_def` (unused) Move some definitions from `topology.opens` to `topology.compacts`
1 parent 2e140f1 commit 5ff099b

File tree

14 files changed

+417
-61
lines changed

14 files changed

+417
-61
lines changed

src/data/finset/lattice.lean

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ lemma comp_sup_eq_sup_comp_of_is_total [is_total α (≤)] {γ : Type} [semilatt
7777
(g : α → γ) (mono_g : monotone g) (bot : g ⊥ = ⊥) : g (s.sup f) = s.sup (g ∘ f) :=
7878
comp_sup_eq_sup_comp g mono_g.map_sup bot
7979

80+
/-- Computating `sup` in a subtype (closed under `sup`) is the same as computing it in `α`. -/
81+
lemma sup_coe {P : α → Prop}
82+
{Pbot : P ⊥} {Psup : ∀{{x y}}, P x → P y → P (x ⊔ y)}
83+
(t : finset β) (f : β → {x : α // P x}) :
84+
(@sup _ _ (subtype.semilattice_sup_bot Pbot Psup) t f : α) = t.sup (λ x, f x) :=
85+
by { classical, rw [comp_sup_eq_sup_comp coe]; intros; refl }
86+
8087
theorem subset_range_sup_succ (s : finset ℕ) : s ⊆ range (s.sup id).succ :=
8188
λ n hn, mem_range.2 $ nat.lt_succ_of_le $ le_sup hn
8289

@@ -99,7 +106,7 @@ def inf (s : finset β) (f : β → α) : α := s.fold (⊓) ⊤ f
99106

100107
variables {s s₁ s₂ : finset β} {f : β → α}
101108

102-
lemma inf_val : s.inf f = (s.1.map f).inf := rfl
109+
lemma inf_def : s.inf f = (s.1.map f).inf := rfl
103110

104111
@[simp] lemma inf_empty : (∅ : finset β).inf f = ⊤ :=
105112
fold_empty
@@ -143,6 +150,13 @@ lemma comp_inf_eq_inf_comp_of_is_total [h : is_total α (≤)] {γ : Type} [semi
143150
(g : α → γ) (mono_g : monotone g) (top : g ⊤ = ⊤) : g (s.inf f) = s.inf (g ∘ f) :=
144151
comp_inf_eq_inf_comp g mono_g.map_inf top
145152

153+
/-- Computating `inf` in a subtype (closed under `inf`) is the same as computing it in `α`. -/
154+
lemma inf_coe {P : α → Prop}
155+
{Ptop : P ⊤} {Pinf : ∀{{x y}}, P x → P y → P (x ⊓ y)}
156+
(t : finset β) (f : β → {x : α // P x}) :
157+
(@inf _ _ (subtype.semilattice_inf_top Ptop Pinf) t f : α) = t.inf (λ x, f x) :=
158+
by { classical, rw [comp_inf_eq_inf_comp coe]; intros; refl }
159+
146160
end inf
147161

148162
lemma inf_eq_infi [complete_lattice β] (s : finset α) (f : α → β) : s.inf f = (⨅a∈s, f a) :=

src/data/real/ennreal.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ by simp [(≠), mul_eq_top] {contextual := tt}
197197
lemma mul_lt_top {a b : ennreal} : a < ⊤ → b < ⊤ → a * b < ⊤ :=
198198
by simpa only [ennreal.lt_top_iff_ne_top] using mul_ne_top
199199

200+
@[simp] lemma mul_pos {a b : ennreal} : 0 < a * b ↔ 0 < a ∧ 0 < b :=
201+
by simp only [zero_lt_iff_ne_zero, ne.def, mul_eq_zero, not_or_distrib]
202+
200203
lemma pow_eq_top : ∀ n:ℕ, a^n=∞ → a=∞
201204
| 0 := by simp
202205
| (n+1) := λ o, (mul_eq_top.1 o).elim (λ h, pow_eq_top n h.2) and.left
@@ -753,6 +756,12 @@ inv_zero ▸ inv_eq_inv
753756

754757
lemma inv_ne_top : a⁻¹ ≠ ∞ ↔ a ≠ 0 := by simp
755758

759+
@[simp] lemma inv_lt_top {x : ennreal} : x⁻¹ < ⊤ ↔ 0 < x :=
760+
by { simp only [lt_top_iff_ne_top, inv_ne_top, zero_lt_iff_ne_zero] }
761+
762+
lemma div_lt_top {x y : ennreal} (h1 : x < ⊤) (h2 : 0 < y) : x / y < ⊤ :=
763+
mul_lt_top h1 (inv_lt_top.mpr h2)
764+
756765
@[simp] lemma inv_eq_zero : a⁻¹ = 0 ↔ a = ∞ :=
757766
inv_top ▸ inv_eq_inv
758767

@@ -1163,6 +1172,23 @@ finset.induction_on s (by simp) $ assume a s ha ih,
11631172
assume a ha, (hk _ $ finset.mem_insert_of_mem ha).right⟩,
11641173
by simp [ha, ih.symm, infi_add_infi this]
11651174

1175+
1176+
lemma infi_mul {ι} [nonempty ι] {f : ι → ennreal} {x : ennreal} (h : x ≠ ⊤) :
1177+
infi f * x = ⨅i, f i * x :=
1178+
begin
1179+
by_cases h2 : x = 0, simp only [h2, mul_zero, infi_const],
1180+
refine le_antisymm
1181+
(le_infi $ λ i, mul_right_mono $ infi_le _ _)
1182+
((div_le_iff_le_mul (or.inl h2) $ or.inl h).mp $ le_infi $
1183+
λ i, (div_le_iff_le_mul (or.inl h2) $ or.inl h).mpr $ infi_le _ _)
1184+
end
1185+
1186+
lemma mul_infi {ι} [nonempty ι] {f : ι → ennreal} {x : ennreal} (h : x ≠ ⊤) :
1187+
x * infi f = ⨅i, x * f i :=
1188+
by { rw [mul_comm, infi_mul h], simp only [mul_comm], assumption }
1189+
1190+
/-! `supr_mul`, `mul_supr` and variants are in `topology.instances.ennreal`. -/
1191+
11661192
end infi
11671193

11681194
section supr

src/order/bounded_lattice.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,13 @@ protected def semilattice_inf_bot [semilattice_inf_bot α] {P : α → Prop}
774774
bot_le := λ x, @bot_le α _ x,
775775
..subtype.semilattice_inf Pinf }
776776

777+
/-- A subtype forms a `⊓`-`⊤`-semilattice if `⊤` and `⊓` preserve the property. -/
778+
protected def semilattice_inf_top [semilattice_inf_top α] {P : α → Prop}
779+
(Ptop : P ⊤) (Pinf : ∀{{x y}}, P x → P y → P (x ⊓ y)) : semilattice_inf_top {x : α // P x} :=
780+
{ top := ⟨⊤, Ptop⟩,
781+
le_top := λ x, @le_top α _ x,
782+
..subtype.semilattice_inf Pinf }
783+
777784
/-- A subtype forms a lattice if `⊔` and `⊓` preserve the property. -/
778785
protected def lattice [lattice α] {P : α → Prop}
779786
(Psup : ∀⦃x y⦄, P x → P y → P (x ⊔ y)) (Pinf : ∀⦃x y⦄, P x → P y → P (x ⊓ y)) :

src/topology/algebra/group.lean

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,66 @@ lemma topological_group.t2_space [t1_space α] : t2_space α := regular_space.t2
402402

403403
end
404404

405+
section
406+
407+
/-! Some results about an open set containing the product of two sets in a topological group. -/
408+
409+
variables [topological_space α] [group α] [topological_group α]
410+
/-- Given a open neighborhood `U` of `1` there is a open neighborhood `V` of `1`
411+
such that `VV ⊆ U`. -/
412+
@[to_additive "Given a open neighborhood `U` of `0` there is a open neighborhood `V` of `0`
413+
such that `V + V ⊆ U`."]
414+
lemma one_open_separated_mul {U : set α} (h1U : is_open U) (h2U : (1 : α) ∈ U) :
415+
∃ V : set α, is_open V ∧ (1 : α) ∈ V ∧ V * V ⊆ U :=
416+
begin
417+
rcases exists_nhds_square (continuous_mul U h1U) (by simp only [mem_preimage, one_mul, h2U] :
418+
((1 : α), (1 : α)) ∈ (λ p : α × α, p.1 * p.2) ⁻¹' U) with ⟨V, h1V, h2V, h3V⟩,
419+
refine ⟨V, h1V, h2V, _⟩,
420+
rwa [← image_subset_iff, image_mul_prod] at h3V
421+
end
422+
423+
/-- Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of `1`
424+
such that `KV ⊆ U`. -/
425+
@[to_additive "Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of `0`
426+
such that `K + V ⊆ U`."]
427+
lemma compact_open_separated_mul {K U : set α} (hK : compact K) (hU : is_open U) (hKU : K ⊆ U) :
428+
∃ V : set α, is_open V ∧ (1 : α) ∈ V ∧ K * V ⊆ U :=
429+
begin
430+
let W : α → set α := λ x, (λ y, x * y) ⁻¹' U,
431+
have h1W : ∀ x, is_open (W x) := λ x, continuous_mul_left x U hU,
432+
have h2W : ∀ x ∈ K, (1 : α) ∈ W x := λ x hx, by simp only [mem_preimage, mul_one, hKU hx],
433+
choose V hV using λ x : K, one_open_separated_mul (h1W x) (h2W x.1 x.2),
434+
let X : K → set α := λ x, (λ y, (x : α)⁻¹ * y) ⁻¹' (V x),
435+
cases hK.elim_finite_subcover X (λ x, continuous_mul_left x⁻¹ (V x) (hV x).1) _ with t ht, swap,
436+
{ intros x hx, rw [mem_Union], use ⟨x, hx⟩, rw [mem_preimage], convert (hV _).2.1,
437+
simp only [mul_left_inv, subtype.coe_mk] },
438+
refine ⟨⋂ x ∈ t, V x, is_open_bInter (finite_mem_finset _) (λ x hx, (hV x).1), _, _⟩,
439+
{ simp only [mem_Inter], intros x hx, exact (hV x).2.1 },
440+
rintro _ ⟨x, y, hx, hy, rfl⟩, simp only [mem_Inter] at hy,
441+
have := ht hx, simp only [mem_Union, mem_preimage] at this, rcases this with ⟨z, h1z, h2z⟩,
442+
have : (z : α)⁻¹ * x * y ∈ W z := (hV z).2.2 (mul_mem_mul h2z (hy z h1z)),
443+
rw [mem_preimage] at this, convert this using 1, simp only [mul_assoc, mul_inv_cancel_left]
444+
end
445+
446+
/-- A compact set is covered by finitely many left multiplicative translates of a set
447+
with non-empty interior. -/
448+
@[to_additive "A compact set is covered by finitely many left additive translates of a set
449+
with non-empty interior."]
450+
lemma compact_covered_by_mul_left_translates {K V : set α} (hK : compact K)
451+
(hV : (interior V).nonempty) : ∃ t : finset α, K ⊆ ⋃ g ∈ t, (λ h, g * h) ⁻¹' V :=
452+
begin
453+
cases hV with g₀ hg₀,
454+
rcases compact.elim_finite_subcover hK (λ x : α, interior $ (λ h, x * h) ⁻¹' V) _ _ with ⟨t, ht⟩,
455+
{ refine ⟨t, subset.trans ht _⟩,
456+
apply Union_subset_Union, intro g, apply Union_subset_Union, intro hg, apply interior_subset },
457+
{ intro g, apply is_open_interior },
458+
{ intros g hg, rw [mem_Union], use g₀ * g⁻¹,
459+
apply preimage_interior_subset_interior_preimage, exact continuous_const.mul continuous_id,
460+
rwa [mem_preimage, inv_mul_cancel_right] }
461+
end
462+
463+
end
464+
405465
section
406466
variables [topological_space α] [comm_group α] [topological_group α]
407467

src/topology/algebra/infinite_sum.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ tsum_eq_has_sum $ has_sum_sum_of_ne_finset_zero hf
339339
lemma tsum_fintype [fintype β] (f : β → α) : (∑'b, f b) = ∑ b, f b :=
340340
tsum_eq_has_sum $ has_sum_fintype f
341341

342+
@[simp] lemma tsum_subtype_eq_sum {f : β → α} {s : finset β} :
343+
(∑'x : {x // x ∈ s}, f x) = ∑ x in s, f x :=
344+
by { rw [tsum_fintype], conv_rhs { rw ← finset.sum_attach }, refl }
345+
342346
lemma tsum_eq_single {f : β → α} (b : β) (hf : ∀b' ≠ b, f b' = 0) :
343347
(∑'b, f b) = f b :=
344348
tsum_eq_has_sum $ has_sum_single b hf

src/topology/basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,10 @@ open_locale topological_space
822822
of every open set is open. -/
823823
def continuous (f : α → β) := ∀s, is_open s → is_open (f ⁻¹' s)
824824

825+
lemma is_open.preimage {f : α → β} (hf : continuous f) {s : set β} (h : is_open s) :
826+
is_open (f ⁻¹' s) :=
827+
hf s h
828+
825829
/-- A function between topological spaces is continuous at a point `x₀`
826830
if `f x` tends to `f x₀` when `x` tends to `x₀`. -/
827831
def continuous_at (f : α → β) (x : α) := tendsto f (𝓝 x) (𝓝 (f x))
@@ -891,6 +895,10 @@ lemma continuous_iff_is_closed {f : α → β} :
891895
⟨assume hf s hs, hf sᶜ hs,
892896
assume hf s, by rw [←is_closed_compl_iff, ←is_closed_compl_iff]; exact hf _⟩
893897

898+
lemma is_closed.preimage {f : α → β} (hf : continuous f) {s : set β} (h : is_closed s) :
899+
is_closed (f ⁻¹' s) :=
900+
continuous_iff_is_closed.mp hf s h
901+
894902
lemma continuous_at_iff_ultrafilter {f : α → β} (x) : continuous_at f x ↔
895903
∀ g, is_ultrafilter g → g ≤ 𝓝 x → g.map f ≤ 𝓝 (f x) :=
896904
tendsto_iff_ultrafilter f (𝓝 x) (𝓝 (f x))

src/topology/compacts.lean

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/-
2+
Copyright (c) 2020 Floris van Doorn. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Floris van Doorn
5+
-/
6+
import topology.homeomorph
7+
/-!
8+
# Compact sets
9+
10+
## Summary
11+
12+
We define the subtype of compact sets in a topological space.
13+
14+
## Main Definitions
15+
16+
- `closeds α` is the type of closed subsets of a topological space `α`.
17+
- `compacts α` is the type of compact subsets of a topological space `α`.
18+
- `nonempty_compacts α` is the type of non-empty compact subsets.
19+
- `positive_compacts α` is the type of compact subsets with non-empty interior.
20+
-/
21+
open set
22+
23+
24+
variables (α : Type*) {β : Type*} [topological_space α] [topological_space β]
25+
namespace topological_space
26+
27+
/-- The type of closed subsets of a topological space. -/
28+
def closeds := {s : set α // is_closed s}
29+
30+
/-- The compact sets of a topological space. See also `nonempty_compacts`. -/
31+
def compacts : Type* := { s : set α // compact s }
32+
33+
/-- The type of non-empty compact subsets of a topological space. The
34+
non-emptiness will be useful in metric spaces, as we will be able to put
35+
a distance (and not merely an edistance) on this space. -/
36+
def nonempty_compacts := {s : set α // s.nonempty ∧ compact s}
37+
38+
/-- The compact sets with nonempty interior of a topological space. See also `compacts` and
39+
`nonempty_compacts`. -/
40+
@[nolint has_inhabited_instance]
41+
def positive_compacts: Type* := { s : set α // compact s ∧ (interior s).nonempty }
42+
43+
variables {α}
44+
45+
namespace compacts
46+
47+
instance : semilattice_sup_bot (compacts α) :=
48+
subtype.semilattice_sup_bot compact_empty (λ K₁ K₂, compact.union)
49+
50+
instance [t2_space α]: semilattice_inf_bot (compacts α) :=
51+
subtype.semilattice_inf_bot compact_empty (λ K₁ K₂, compact.inter)
52+
53+
instance [t2_space α] : lattice (compacts α) :=
54+
subtype.lattice (λ K₁ K₂, compact.union) (λ K₁ K₂, compact.inter)
55+
56+
@[simp] lemma bot_val : (⊥ : compacts α).1 = ∅ := rfl
57+
58+
@[simp] lemma sup_val {K₁ K₂ : compacts α} : (K₁ ⊔ K₂).1 = K₁.1 ∪ K₂.1 := rfl
59+
60+
@[ext] protected lemma ext {K₁ K₂ : compacts α} (h : K₁.1 = K₂.1) : K₁ = K₂ :=
61+
subtype.eq h
62+
63+
@[simp] lemma finset_sup_val {β} {K : β → compacts α} {s : finset β} :
64+
(s.sup K).1 = s.sup (λ x, (K x).1) :=
65+
finset.sup_coe _ _
66+
67+
instance : inhabited (compacts α) := ⟨⊥⟩
68+
69+
/-- The image of a compact set under a continuous function. -/
70+
protected def map (f : α → β) (hf : continuous f) (K : compacts α) : compacts β :=
71+
⟨f '' K.1, K.2.image hf⟩
72+
73+
@[simp] lemma map_val {f : α → β} (hf : continuous f) (K : compacts α) :
74+
(K.map f hf).1 = f '' K.1 := rfl
75+
76+
/-- A homeomorphism induces an equivalence on compact sets, by taking the image. -/
77+
@[simp] protected def equiv (f : α ≃ₜ β) : compacts α ≃ compacts β :=
78+
{ to_fun := compacts.map f f.continuous,
79+
inv_fun := compacts.map _ f.symm.continuous,
80+
left_inv := by { intro K, ext1, simp only [map_val, ← image_comp, f.symm_comp_self, image_id] },
81+
right_inv := by { intro K, ext1,
82+
simp only [map_val, ← image_comp, f.self_comp_symm, image_id] } }
83+
84+
/-- The image of a compact set under a homeomorphism can also be expressed as a preimage. -/
85+
lemma equiv_to_fun_val (f : α ≃ₜ β) (K : compacts α) :
86+
(compacts.equiv f K).1 = f.symm ⁻¹' K.1 :=
87+
congr_fun (image_eq_preimage_of_inverse f.left_inv f.right_inv) K.1
88+
89+
end compacts
90+
91+
section nonempty_compacts
92+
open topological_space set
93+
variable {α}
94+
95+
instance nonempty_compacts.to_compact_space {p : nonempty_compacts α} : compact_space p.val :=
96+
⟨compact_iff_compact_univ.1 p.property.2
97+
98+
instance nonempty_compacts.to_nonempty {p : nonempty_compacts α} : nonempty p.val :=
99+
p.property.1.to_subtype
100+
101+
/-- Associate to a nonempty compact subset the corresponding closed subset -/
102+
def nonempty_compacts.to_closeds [t2_space α] : nonempty_compacts α → closeds α :=
103+
set.inclusion $ λ s hs, hs.2.is_closed
104+
105+
end nonempty_compacts
106+
107+
end topological_space

src/topology/constructions.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,16 @@ begin
242242
⟨u, ⟨u, subset.refl u, uo, au⟩, v, ⟨v, subset.refl v, vo, bv⟩, h⟩⟩)
243243
end
244244

245+
/-- Given an open neighborhood `s` of `(x, x)`, then `(x, x)` has a square open neighborhood
246+
that is a subset of `s`. -/
247+
lemma exists_nhds_square {s : set (α × α)} (hs : is_open s) {x : α} (hx : (x, x) ∈ s) :
248+
∃U, is_open U ∧ x ∈ U ∧ set.prod U U ⊆ s :=
249+
begin
250+
rcases is_open_prod_iff.mp hs x x hx with ⟨u, v, hu, hv, h1x, h2x, h2s⟩,
251+
refine ⟨u ∩ v, is_open_inter hu hv, ⟨h1x, h2x⟩, subset.trans _ h2s⟩,
252+
simp only [prod_subset_prod_iff, inter_subset_left, true_or, inter_subset_right, and_self],
253+
end
254+
245255
/-- The first projection in a product of topological spaces sends open sets to open sets. -/
246256
lemma is_open_map_fst : is_open_map (@prod.fst α β) :=
247257
begin

src/topology/homeomorph.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ begin
103103
exact continuous_iff_is_closed.1 (h.symm.continuous) _
104104
end
105105

106+
@[simp] lemma is_open_preimage (h : α ≃ₜ β) {s : set β} : is_open (h ⁻¹' s) ↔ is_open s :=
107+
begin
108+
refine ⟨λ hs, _, h.continuous_to_fun s⟩,
109+
rw [← (image_preimage_eq h.to_equiv.surjective : _ = s)], exact h.is_open_map _ hs
110+
end
111+
106112
/-- If an bijective map `e : α ≃ β` is continuous and open, then it is a homeomorphism. -/
107113
def homeomorph_of_continuous_open (e : α ≃ β) (h₁ : continuous e) (h₂ : is_open_map e) :
108114
α ≃ₜ β :=

src/topology/instances/ennreal.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ tsum_add ennreal.summable ennreal.summable
534534
protected lemma tsum_le_tsum (h : ∀a, f a ≤ g a) : (∑'a, f a) ≤ (∑'a, g a) :=
535535
tsum_le_tsum h ennreal.summable ennreal.summable
536536

537+
protected lemma sum_le_tsum {f : α → ennreal} (s : finset α) : s.sum f ≤ tsum f :=
538+
sum_le_tsum s (λ x hx, zero_le _) ennreal.summable
539+
537540
protected lemma tsum_eq_supr_nat {f : ℕ → ennreal} :
538541
(∑'i:ℕ, f i) = (⨆i:ℕ, ∑ a in finset.range i, f a) :=
539542
ennreal.tsum_eq_supr_sum' _ finset.exists_nat_subset_range

0 commit comments

Comments
 (0)