Skip to content

Commit 388e755

Browse files
committed
...
1 parent 63690c7 commit 388e755

6 files changed

Lines changed: 171 additions & 89 deletions

File tree

Munkres/Basic.lean

Lines changed: 0 additions & 1 deletion
This file was deleted.

Munkres/Defs/Subtype.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Mathlib.Topology.Separation.Hausdorff
1+
import Mathlib.Topology.Defs.Filter
22

33
universe u
44

Munkres/Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Munkres.Mathlib.AccPt.Basic
33
import Munkres.Mathlib.AccPt.Countable
44
import Munkres.Mathlib.Continuous
55
import Munkres.Mathlib.Disjoint
6+
import Munkres.Mathlib.IsOpen
67
import Munkres.Mathlib.Lipschitz
78
import Munkres.Mathlib.MonotoneSubseq
89
import Munkres.Mathlib.Prelude

Munkres/Mathlib/IsOpen.lean

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import Munkres.Mathlib.Prelude
2+
3+
open Set TopologicalSpace Topology
4+
5+
universe u
6+
7+
variable {α : Type u} {B : Set (Set α)}
8+
9+
-- If U is a set such that (for all x ∈ U, there exists some b ∈ B such that
10+
-- x ∈ b ⊆ U), then U can be written as a union of B's elements.
11+
lemma b3d183c (U : Set α) :
12+
(∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U) → ∃ s ⊆ B, U = ⋃₀ s
13+
:= by --
14+
intro h
15+
let hp (x : U) : Set α := (h x x.prop).choose
16+
let s := Set.range hp
17+
use Set.range hp
18+
refine ⟨?_, ?_⟩
19+
· intro _ ⟨x, heq⟩
20+
subst heq
21+
exact (h x x.prop).choose_spec.1
22+
· rw [Set.sUnion_range]
23+
ext x : 1
24+
rw [Set.mem_iUnion]
25+
refine ⟨?_, ?_⟩
26+
· intro hx
27+
exact ⟨⟨x, hx⟩, (h x hx).choose_spec.2.1
28+
· intro ⟨y, hy⟩
29+
exact (h y y.prop).choose_spec.2.2 hy -- ∎
30+
31+
/-- This is how Munkres defines the topology generated by a basis.
32+
In particular, `𝓣 = generateFrom B` -/
33+
theorem IsOpen_generateFrom_iff (U : Set α)
34+
(exists_subset_inter : ∀ t₁ ∈ B, ∀ t₂ ∈ B, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ B, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂)
35+
(sUnion_eq : ⋃₀ B = univ)
36+
: IsOpen[generateFrom B] U ↔ ∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U
37+
:= by --
38+
refine ⟨?_, ?_⟩
39+
· intro h x hx
40+
rw [Set.sUnion_eq_univ_iff] at sUnion_eq
41+
induction h with
42+
| basic b hb =>
43+
exact ⟨b, hb, hx, le_rfl⟩
44+
| univ =>
45+
obtain ⟨b, h⟩ := sUnion_eq x
46+
exact ⟨b, h.1, h.2, Set.subset_univ _⟩
47+
| inter u₁ u₂ _ _ hu₁ hu₂ =>
48+
obtain ⟨b₁, hb₁, hx₁, hu₁⟩ := hu₁ hx.1
49+
obtain ⟨b₂, hb₂, hx₂, hu₂⟩ := hu₂ hx.2
50+
specialize exists_subset_inter b₁ hb₁ b₂ hb₂ x ⟨hx₁, hx₂⟩
51+
obtain ⟨b, hbB, hxb, hb⟩ := exists_subset_inter
52+
refine ⟨b, hbB, hxb, ?_⟩
53+
rw [Set.subset_inter_iff] at hb ⊢
54+
exact ⟨hb.1.trans hu₁, hb.2.trans hu₂⟩
55+
| sUnion s _ hs =>
56+
obtain ⟨u, hus, hxu⟩ := hx
57+
specialize hs u hus hxu
58+
obtain ⟨b, hbB, hxb, hbu⟩ := hs
59+
refine ⟨b, hbB, hxb, ?_⟩
60+
refine hbu.trans ?_
61+
exact Set.subset_sUnion_of_subset s u le_rfl hus
62+
· intro h
63+
obtain ⟨s, hs, heq⟩ := b3d183c U h
64+
subst heq
65+
refine GenerateOpen.sUnion s ?_
66+
intro u hu
67+
exact GenerateOpen.basic u (hs hu) -- ∎

Munkres/Numbered/V13_BasisForATopology.lean

Lines changed: 41 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import Munkres.Mathlib.Prelude
2+
import Munkres.Mathlib.IsOpen
23

3-
open Set TopologicalSpace
4+
open Set TopologicalSpace Topology
45

56
universe u
67

78
variable {α : Type u} {B : Set (Set α)}
89

9-
section DefiningABasis
10-
1110
-- The reason why we reduce all finite intersection arguments to just the
1211
-- intersection of two elements — that we can extend it to finite intersections
1312
-- by induction.
14-
example {B : Set (Set α)}
13+
example
1514
(h : ∀ b₁ ∈ B, ∀ b₂ ∈ B, b₁ ∩ b₂ ∈ B)
1615
(h_univ : univ ∈ B)
1716
: ∀ s ⊆ B, s.Finite → ⋂₀ s ∈ B
@@ -33,102 +32,56 @@ example {B : Set (Set α)}
3332
rw [sInter_insert u s]
3433
exact h u huB _ ih -- ∎
3534

36-
variable
37-
(h₁ : ∀ x, ∃ b ∈ B, x ∈ b)
38-
(h₂ : ∀ b₁ ∈ B, ∀ b₂ ∈ B, ∀ x ∈ b₁ ∩ b₂, ∃ b ∈ B, x ∈ b ∧ b ⊆ b₁ ∩ b₂)
39-
40-
private lemma l₀ {U : Set α} :
41-
(∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U) → ∃ s ⊆ B, U = ⋃₀ s
42-
:= by --
43-
intro h
44-
let hp (x : U) : Set α := (h x x.prop).choose
45-
let s := Set.range hp
46-
use Set.range hp
47-
refine ⟨?_, ?_⟩
48-
· intro _ ⟨x, heq⟩
49-
subst heq
50-
exact (h x x.prop).choose_spec.1
51-
· rw [Set.sUnion_range]
52-
ext x : 1
53-
rw [Set.mem_iUnion]
54-
refine ⟨?_, ?_⟩
55-
· intro hx
56-
exact ⟨⟨x, hx⟩, (h x hx).choose_spec.2.1
57-
· intro ⟨y, hy⟩
58-
exact (h y y.prop).choose_spec.2.2 hy -- ∎
59-
60-
include h₁ h₂ in
61-
private lemma l₁
62-
: ∀ U, @IsOpen α (generateFrom B) U → ∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U
63-
:= by --
64-
intro U h x hx
65-
induction h with
66-
| basic b hb =>
67-
exact ⟨b, hb, hx, le_rfl⟩
68-
| univ =>
69-
obtain ⟨b, h⟩ := h₁ x
70-
exact ⟨b, h.1, h.2, Set.subset_univ _⟩
71-
| inter u₁ u₂ _ _ hu₁ hu₂ =>
72-
obtain ⟨b₁, hb₁, hx₁, hu₁⟩ := hu₁ hx.1
73-
obtain ⟨b₂, hb₂, hx₂, hu₂⟩ := hu₂ hx.2
74-
specialize h₂ b₁ hb₁ b₂ hb₂ x ⟨hx₁, hx₂⟩
75-
obtain ⟨b, hbB, hxb, hb⟩ := h₂
76-
refine ⟨b, hbB, hxb, ?_⟩
77-
rw [Set.subset_inter_iff] at hb ⊢
78-
exact ⟨hb.1.trans hu₁, hb.2.trans hu₂⟩
79-
| sUnion s _ hs =>
80-
obtain ⟨u, hus, hxu⟩ := hx
81-
specialize hs u hus hxu
82-
obtain ⟨b, hbB, hxb, hbu⟩ := hs
83-
refine ⟨b, hbB, hxb, ?_⟩
84-
refine hbu.trans ?_
85-
exact Set.subset_sUnion_of_subset s u le_rfl hus -- ∎
86-
87-
private lemma l₂
88-
: ∀ U, (∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U) → @IsOpen α (generateFrom B) U
35+
-- Same as the above, except that we swap out the requirement that univ ∈ B for
36+
-- the constraint that we're talking only about non-empty intersections.
37+
example
38+
(h : ∀ b₁ ∈ B, ∀ b₂ ∈ B, b₁ ∩ b₂ ∈ B)
39+
: ∀ s ⊆ B, s.Finite → s.Nonempty → ⋂₀ s ∈ B
8940
:= by --
90-
intro U h
91-
obtain ⟨s, hs, heq⟩ := l₀ h
92-
subst heq
93-
refine GenerateOpen.sUnion s ?_
94-
intro u hu
95-
refine GenerateOpen.basic u ?_
96-
exact hs hu -- ∎
97-
98-
include h₁ h₂ in
99-
/-- Here's how Munkres defines the topology generated by a basis. In particular,
100-
`T = generateFrom B` -/
101-
private lemma l₃ {U : Set α}
102-
: @IsOpen α (generateFrom B) U ↔ ∀ x ∈ U, ∃ b ∈ B, x ∈ b ∧ b ⊆ U
103-
:= ⟨l₁ h₁ h₂ U, l₂ U⟩
104-
105-
end DefiningABasis
41+
intro s hsB hsF hs₀
42+
induction s, hsF using Set.Finite.induction_on with
43+
| empty =>
44+
rw [sInter_empty]
45+
exact False.elim (Set.not_nonempty_empty hs₀)
46+
| @insert u s hus hsF ih =>
47+
have huB : u ∈ B := hsB <| mem_insert u s
48+
if hs₀ : s = ∅ then
49+
subst hs₀
50+
simp only [insert_empty_eq, sInter_singleton]
51+
exact huB
52+
else
53+
replace hs₀ : s.Nonempty := nonempty_iff_ne_empty.mpr hs₀
54+
specialize ih ((subset_insert u s).trans hsB)
55+
rw [sInter_insert u s]
56+
exact h u huB _ (ih hs₀) -- ∎
10657

10758
section S₁
10859
--* Lemma 13.1
109-
variable [TopologicalSpace α] (hB : IsTopologicalBasis B)
60+
variable [TopologicalSpace α]
11061

11162
-- In other words, 𝓣 = collection of all unions of elements of 𝓑.
112-
example {U : Set α} : IsOpen U ↔ ∃ s ⊆ B, U = ⋃₀ s := by
63+
example {U : Set α} (hB : IsTopologicalBasis B) : IsOpen U ↔ ∃ s ⊆ B, U = ⋃₀ s
64+
:= by --
11365
refine ⟨?_, ?_⟩
11466
· intro hU
11567
rw [hB.isOpen_iff] at hU
116-
exact l₀ hU
68+
exact b3d183c U hU
11769
· intro ⟨s, hs, heq⟩
11870
subst heq
11971
refine isOpen_sUnion ?_
12072
intro u hu
121-
exact hB.isOpen (hs hu)
73+
exact hB.isOpen (hs hu) -- ∎
12274

12375
end S₁
12476

12577
section S₂
12678
--* Lemma 13.2
127-
variable [TopologicalSpace α] {C : Set (Set α)}
79+
variable [TopologicalSpace α]
80+
81+
example {C : Set (Set α)}
12882
(h₁ : ∀ c ∈ C, IsOpen c)
12983
(h₂ : ∀ u, IsOpen u → ∀ x ∈ u, ∃ c ∈ C, x ∈ c ∧ c ⊆ u)
130-
131-
example : IsTopologicalBasis C
84+
: IsTopologicalBasis C
13285
:= by --
13386
have h₃ : ∀ x, ∃ b ∈ C, x ∈ b := by
13487
intro x
@@ -137,28 +90,29 @@ example : IsTopologicalBasis C
13790
have h₄ : ∀ s ∈ C, ∀ t ∈ C, ∀ x ∈ s ∩ t, ∃ c ∈ C, x ∈ c ∧ c ⊆ s ∩ t := by
13891
intro s hs t ht x hx
13992
exact h₂ (s ∩ t) ((h₁ s hs).inter (h₁ t ht)) x hx
93+
have sUnion_eq := Set.sUnion_eq_univ_iff.mpr h₃
14094
exact {
141-
sUnion_eq := Set.sUnion_eq_univ_iff.mpr h₃
142-
exists_subset_inter := h₄
95+
sUnion_eq,
96+
exists_subset_inter := h₄,
14397
eq_generateFrom := by
14498
refine TopologicalSpace.ext ?_
14599
ext u : 2
146-
rw [l₃ h₃ h₄]
100+
rw [IsOpen_generateFrom_iff u h₄ sUnion_eq]
147101
refine ⟨h₂ u, ?_⟩
148102
intro h
149-
obtain ⟨s, hs, heq⟩ := l₀ h
103+
obtain ⟨s, hs, heq⟩ := b3d183c u h
150104
subst heq
151105
exact isOpen_sUnion fun t ht ↦ h₁ t (hs ht)
152106
} -- ∎
153107

154108
end S₂
155109

156110
section S₃
157-
--* Lemma 13.2
111+
--* Lemma 13.3
158112
variable [T : TopologicalSpace α] [T' : TopologicalSpace α]
159113
{B B' : Set (Set α)}
160-
(hB : IsTopologicalBasis (t := T) B)
161-
(hB' : IsTopologicalBasis (t := T') B')
114+
(hB : @IsTopologicalBasis _ T B)
115+
(hB' : @IsTopologicalBasis _ T' B')
162116

163117
-- Note that T' is finer than T here.
164118
example : T' ≤ T ↔ ∀ x, ∀ b ∈ B, x ∈ b → ∃ b' ∈ B', x ∈ b' ∧ b' ⊆ b
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import Munkres.Closure.Subtype
2+
import Munkres.Mathlib.AccPt.Basic
3+
import Munkres.Mathlib.Disjoint
4+
import Munkres.Subtype.Topology
5+
6+
open Set Topology Filter TopologicalSpace
7+
8+
universe u v
9+
10+
variable {α : Type u} {β : Type v} [TopologicalSpace α] [TopologicalSpace β]
11+
12+
-- Mathlib's Product Topology.
13+
@[reducible]
14+
private def tₚ : TopologicalSpace (α × β) := instTopologicalSpaceProd (X := α) (Y := β)
15+
16+
private def B := { p | ∃ (U : Set α) (V : Set β), IsOpen U ∧ IsOpen V ∧ p = U ×ˢ V }
17+
18+
-- private lemma l₀ {B : Set (Set α)} :
19+
20+
example : @IsTopologicalBasis (α × β) tₚ B := by
21+
set B := B (α := α) (β := β)
22+
have exists_subset_inter : ∀ t₁ ∈ B, ∀ t₂ ∈ B, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ B, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂
23+
:= by --
24+
intro t₁ ⟨u₁, v₁, hu₁, hv₁, ht₁⟩ t₂ ⟨u₂, v₂, hu₂, hv₂, ht₂⟩ z ⟨hz₁, hz₂⟩
25+
use (u₁ ∩ u₂) ×ˢ (v₁ ∩ v₂)
26+
refine ⟨?_, ?_, ?_⟩
27+
· exact ⟨u₁ ∩ u₂, v₁ ∩ v₂, hu₁.inter hu₂, hv₁.inter hv₂, rfl⟩
28+
· rw [ht₁] at hz₁
29+
rw [ht₂] at hz₂
30+
exact mk_mem_prod ⟨hz₁.1, hz₂.1⟩ ⟨hz₁.2, hz₂.2
31+
· rw [prod_subset_iff]
32+
intro x hx y hy
33+
refine ⟨?_, ?_⟩
34+
· rw [ht₁]
35+
exact mk_mem_prod hx.1 hy.1
36+
· rw [ht₂]
37+
exact mk_mem_prod hx.2 hy.2 -- ∎
38+
have sUnion_eq : ⋃₀ B = univ
39+
:= by --
40+
refine eq_univ_of_univ_subset ?_
41+
have : univ ∈ B := by
42+
rw [<-univ_prod_univ]
43+
exact ⟨univ, univ, isOpen_univ, isOpen_univ, rfl⟩
44+
exact subset_sUnion_of_subset B univ (univ_subset_iff.mpr rfl) this -- ∎
45+
have hCover : ∀ x, ∃ b ∈ B, x ∈ b := by
46+
rw [<-Set.sUnion_eq_univ_iff]
47+
exact sUnion_eq
48+
refine { exists_subset_inter, sUnion_eq, eq_generateFrom := ?_ }
49+
· refine TopologicalSpace.ext ?_
50+
ext u : 2
51+
refine ⟨?_, ?_⟩
52+
· intro h
53+
sorry
54+
· sorry
55+
56+
-- example {U : Set α} {V : Set β} (hU : IsOpen U) (hV : IsOpen V)
57+
-- : := by
58+
-- sorry
59+
60+
section S₀
61+
end S₀

0 commit comments

Comments
 (0)