11import Munkres.Mathlib.Prelude
2+ import Munkres.Mathlib.IsOpen
23
3- open Set TopologicalSpace
4+ open Set TopologicalSpace Topology
45
56universe u
67
78variable {α : 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
10758section 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
12375end S₁
12476
12577section 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
154108end S₂
155109
156110section S₃
157- --* Lemma 13.2
111+ --* Lemma 13.3
158112variable [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.
164118example : T' ≤ T ↔ ∀ x, ∀ b ∈ B, x ∈ b → ∃ b' ∈ B', x ∈ b' ∧ b' ⊆ b
0 commit comments