topology.G_delta
⟷
Mathlib.Topology.GDelta
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -5,6 +5,7 @@ Authors: Sébastien Gouëzel, Yury Kudryashov
-/
import topology.uniform_space.basic
import topology.separation
+import order.filter.countable_Inter
/-!
# `Gδ` sets
@@ -19,11 +20,8 @@ In this file we define `Gδ` sets and prove their basic properties.
* `is_Gδ`: a set `s` is a `Gδ` set if it can be represented as an intersection
of countably many open sets;
-* `residual`: the filter of residual sets. A set `s` is called *residual* if it includes a dense
- `Gδ` set. In a Baire space (e.g., in a complete (e)metric space), residual sets form a filter.
-
- For technical reasons, we define `residual` in any topological space but the definition agrees
- with the description above only in Baire spaces.
+* `residual`: the σ-filter of residual sets. A set `s` is called *residual* if it includes a
+ countable intersection of dense open sets.
## Main results
@@ -180,10 +178,34 @@ end
end continuous_at
-/-- A set `s` is called *residual* if it includes a dense `Gδ` set. If `α` is a Baire space
-(e.g., a complete metric space), then residual sets form a filter, see `mem_residual`.
+section residual
+
+variable [topological_space α]
-For technical reasons we define the filter `residual` in any topological space but in a non-Baire
-space it is not useful because it may contain some non-residual sets. -/
+/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
+@[derive countable_Inter_filter]
def residual (α : Type*) [topological_space α] : filter α :=
-⨅ t (ht : is_Gδ t) (ht' : dense t), 𝓟 t
+filter.countable_generate {t | is_open t ∧ dense t}
+
+instance countable_Inter_filter_residual : countable_Inter_filter (residual α) :=
+by rw [residual]; apply_instance
+
+/-- Dense open sets are residual. -/
+lemma residual_of_dense_open {s : set α} (ho : is_open s) (hd : dense s) : s ∈ residual α :=
+countable_generate_sets.basic ⟨ho, hd⟩
+
+/-- Dense Gδ sets are residual. -/
+lemma residual_of_dense_Gδ {s : set α} (ho : is_Gδ s) (hd : dense s) : s ∈ residual α :=
+begin
+ rcases ho with ⟨T, To, Tct, rfl⟩,
+ exact (countable_sInter_mem Tct).mpr (λ t tT, residual_of_dense_open (To t tT)
+ (hd.mono (sInter_subset_of_mem tT))),
+end
+
+/-- A set is residual iff it includes a countable intersection of dense open sets. -/
+lemma mem_residual_iff {s : set α} : s ∈ residual α ↔
+ ∃ (S : set (set α)), (∀ t ∈ S, is_open t) ∧ (∀ t ∈ S, dense t) ∧ S.countable ∧ ⋂₀ S ⊆ s :=
+mem_countable_generate_iff.trans $ by simp_rw
+ [subset_def, mem_set_of, forall_and_distrib, and_assoc]
+
+end residual
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -283,7 +283,7 @@ theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈
theorem mem_residual_iff {s : Set α} :
s ∈ residual α ↔
∃ S : Set (Set α), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
- mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_set_of, forall_and, and_assoc']
+ mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_set_of, forall_and, and_assoc]
#align mem_residual_iff mem_residual_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -62,65 +62,65 @@ theorem IsOpen.isGδ {s : Set α} (h : IsOpen s) : IsGδ s :=
#align is_open.is_Gδ IsOpen.isGδ
-/
-#print isGδ_empty /-
+#print IsGδ.empty /-
@[simp]
-theorem isGδ_empty : IsGδ (∅ : Set α) :=
+theorem IsGδ.empty : IsGδ (∅ : Set α) :=
isOpen_empty.IsGδ
-#align is_Gδ_empty isGδ_empty
+#align is_Gδ_empty IsGδ.empty
-/
-#print isGδ_univ /-
+#print IsGδ.univ /-
@[simp]
-theorem isGδ_univ : IsGδ (univ : Set α) :=
+theorem IsGδ.univ : IsGδ (univ : Set α) :=
isOpen_univ.IsGδ
-#align is_Gδ_univ isGδ_univ
+#align is_Gδ_univ IsGδ.univ
-/
-#print isGδ_biInter_of_isOpen /-
-theorem isGδ_biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set α}
+#print IsGδ.biInter_of_isOpen /-
+theorem IsGδ.biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set α}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
-#align is_Gδ_bInter_of_open isGδ_biInter_of_isOpen
+#align is_Gδ_bInter_of_open IsGδ.biInter_of_isOpen
-/
-#print isGδ_iInter_of_isOpen /-
-theorem isGδ_iInter_of_isOpen [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
+#print IsGδ.iInter_of_isOpen /-
+theorem IsGδ.iInter_of_isOpen [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
-#align is_Gδ_Inter_of_open isGδ_iInter_of_isOpen
+#align is_Gδ_Inter_of_open IsGδ.iInter_of_isOpen
-/
-#print isGδ_iInter /-
+#print IsGδ.iInter /-
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) :=
+theorem IsGδ.iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) :=
by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine' ⟨⋃ i, T i, _, countable_Union hTc, (sInter_Union _).symm⟩
simpa [@forall_swap ι] using hTo
-#align is_Gδ_Inter isGδ_iInter
+#align is_Gδ_Inter IsGδ.iInter
-/
-#print isGδ_biInter /-
-theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
+#print IsGδ.biInter /-
+theorem IsGδ.biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
(ht : ∀ i ∈ s, IsGδ (t i ‹_›)) : IsGδ (⋂ i ∈ s, t i ‹_›) :=
by
rw [bInter_eq_Inter]
haveI := hs.to_encodable
- exact isGδ_iInter fun x => ht x x.2
-#align is_Gδ_bInter isGδ_biInter
+ exact IsGδ.iInter fun x => ht x x.2
+#align is_Gδ_bInter IsGδ.biInter
-/
-#print isGδ_sInter /-
+#print IsGδ.sInter /-
/-- A countable intersection of Gδ sets is a Gδ set. -/
-theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
- simpa only [sInter_eq_bInter] using isGδ_biInter hS h
-#align is_Gδ_sInter isGδ_sInter
+theorem IsGδ.sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
+ simpa only [sInter_eq_bInter] using IsGδ.biInter hS h
+#align is_Gδ_sInter IsGδ.sInter
-/
#print IsGδ.inter /-
theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
- rw [inter_eq_Inter]; exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
+ rw [inter_eq_Inter]; exact IsGδ.iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
-/
@@ -131,20 +131,20 @@ theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
- apply isGδ_biInter_of_isOpen (Scount.prod Tcount)
+ apply IsGδ.biInter_of_isOpen (Scount.prod Tcount)
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
-/
-#print isGδ_biUnion /-
+#print IsGδ.biUnion /-
/-- The union of finitely many Gδ sets is a Gδ set. -/
-theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
+theorem IsGδ.biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
refine' finite.induction_on hs (by simp) _ h
simp only [ball_insert_iff, bUnion_insert]
exact fun a s _ _ ihs H => H.1.union (ihs H.2)
-#align is_Gδ_bUnion isGδ_biUnion
+#align is_Gδ_bUnion IsGδ.biUnion
-/
#print IsClosed.isGδ /-
@@ -153,7 +153,7 @@ theorem IsClosed.isGδ {α} [UniformSpace α] [IsCountablyGenerated (𝓤 α)] {
by
rcases(@uniformity_hasBasis_open α _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.bInter_bUnion_ball]
- refine' isGδ_biInter (to_countable _) fun n hn => IsOpen.isGδ _
+ refine' IsGδ.biInter (to_countable _) fun n hn => IsOpen.isGδ _
exact isOpen_biUnion fun x hx => UniformSpace.isOpen_ball _ (hUo _).2
#align is_closed.is_Gδ IsClosed.isGδ
-/
@@ -162,17 +162,17 @@ section T1Space
variable [T1Space α]
-#print isGδ_compl_singleton /-
-theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
+#print IsGδ.compl_singleton /-
+theorem IsGδ.compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
isOpen_compl_singleton.IsGδ
-#align is_Gδ_compl_singleton isGδ_compl_singleton
+#align is_Gδ_compl_singleton IsGδ.compl_singleton
-/
#print Set.Countable.isGδ_compl /-
theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) :=
by
rw [← bUnion_of_singleton s, compl_Union₂]
- exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
+ exact IsGδ.biInter hs fun x _ => IsGδ.compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
-/
@@ -198,18 +198,18 @@ open TopologicalSpace
variable [FirstCountableTopology α]
-#print isGδ_singleton /-
-theorem isGδ_singleton (a : α) : IsGδ ({a} : Set α) :=
+#print IsGδ.singleton /-
+theorem IsGδ.singleton (a : α) : IsGδ ({a} : Set α) :=
by
rcases(nhds_basis_opens a).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
rw [← biInter_basis_nhds h_basis.to_has_basis]
- exact isGδ_biInter (to_countable _) fun n hn => (hU n).2.IsGδ
-#align is_Gδ_singleton isGδ_singleton
+ exact IsGδ.biInter (to_countable _) fun n hn => (hU n).2.IsGδ
+#align is_Gδ_singleton IsGδ.singleton
-/
#print Set.Finite.isGδ /-
theorem Set.Finite.isGδ {s : Set α} (hs : s.Finite) : IsGδ s :=
- Finite.induction_on hs isGδ_empty fun a s _ _ hs => (isGδ_singleton a).union hs
+ Finite.induction_on hs IsGδ.empty fun a s _ _ hs => (IsGδ.singleton a).union hs
#align set.finite.is_Gδ Set.Finite.isGδ
-/
@@ -225,19 +225,19 @@ open scoped uniformity
variable [TopologicalSpace α]
-#print isGδ_setOf_continuousAt /-
+#print IsGδ.setOf_continuousAt /-
/-- The set of points where a function is continuous is a Gδ set. -/
-theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤 β)] (f : α → β) :
+theorem IsGδ.setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤 β)] (f : α → β) :
IsGδ {x | ContinuousAt f x} :=
by
obtain ⟨U, hUo, hU⟩ := (@uniformity_hasBasis_open_symmetric β _).exists_antitone_subbasis
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
simp only [(nhds_basis_opens _).prod_self.tendsto_iffₓ hU.to_has_basis, forall_prop_of_true,
set_of_forall, id]
- refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
+ refine' IsGδ.iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
filter_upwards [IsOpen.mem_nhds hso hsx] with _ hy using ⟨s, ⟨hy, hso⟩, hsU⟩
-#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
+#align is_Gδ_set_of_continuous_at IsGδ.setOf_continuousAt
-/
end ContinuousAt
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -76,18 +76,18 @@ theorem isGδ_univ : IsGδ (univ : Set α) :=
#align is_Gδ_univ isGδ_univ
-/
-#print isGδ_biInter_of_open /-
-theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
+#print isGδ_biInter_of_isOpen /-
+theorem isGδ_biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set α}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
-#align is_Gδ_bInter_of_open isGδ_biInter_of_open
+#align is_Gδ_bInter_of_open isGδ_biInter_of_isOpen
-/
-#print isGδ_iInter_of_open /-
-theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
+#print isGδ_iInter_of_isOpen /-
+theorem isGδ_iInter_of_isOpen [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
-#align is_Gδ_Inter_of_open isGδ_iInter_of_open
+#align is_Gδ_Inter_of_open isGδ_iInter_of_isOpen
-/
#print isGδ_iInter /-
@@ -131,7 +131,7 @@ theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
- apply isGδ_biInter_of_open (Scount.prod Tcount)
+ apply isGδ_biInter_of_isOpen (Scount.prod Tcount)
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
-/
-import Mathbin.Topology.UniformSpace.Basic
-import Mathbin.Topology.Separation
-import Mathbin.Order.Filter.CountableInter
+import Topology.UniformSpace.Basic
+import Topology.Separation
+import Order.Filter.CountableInter
#align_import topology.G_delta from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
-
-! This file was ported from Lean 3 source module topology.G_delta
-! leanprover-community/mathlib commit b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Topology.UniformSpace.Basic
import Mathbin.Topology.Separation
import Mathbin.Order.Filter.CountableInter
+#align_import topology.G_delta from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
+
/-!
# `Gδ` sets
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -121,10 +121,13 @@ theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Count
#align is_Gδ_sInter isGδ_sInter
-/
+#print IsGδ.inter /-
theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
rw [inter_eq_Inter]; exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
+-/
+#print IsGδ.union /-
/-- The union of two Gδ sets is a Gδ set. -/
theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t) :=
by
@@ -135,6 +138,7 @@ theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
+-/
#print isGδ_biUnion /-
/-- The union of finitely many Gδ sets is a Gδ set. -/
@@ -161,27 +165,37 @@ section T1Space
variable [T1Space α]
+#print isGδ_compl_singleton /-
theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
isOpen_compl_singleton.IsGδ
#align is_Gδ_compl_singleton isGδ_compl_singleton
+-/
+#print Set.Countable.isGδ_compl /-
theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) :=
by
rw [← bUnion_of_singleton s, compl_Union₂]
exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
+-/
+#print Set.Finite.isGδ_compl /-
theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ (sᶜ) :=
hs.Countable.isGδ_compl
#align set.finite.is_Gδ_compl Set.Finite.isGδ_compl
+-/
+#print Set.Subsingleton.isGδ_compl /-
theorem Set.Subsingleton.isGδ_compl {s : Set α} (hs : s.Subsingleton) : IsGδ (sᶜ) :=
hs.Finite.isGδ_compl
#align set.subsingleton.is_Gδ_compl Set.Subsingleton.isGδ_compl
+-/
+#print Finset.isGδ_compl /-
theorem Finset.isGδ_compl (s : Finset α) : IsGδ (sᶜ : Set α) :=
s.finite_toSet.isGδ_compl
#align finset.is_Gδ_compl Finset.isGδ_compl
+-/
open TopologicalSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -217,7 +217,7 @@ variable [TopologicalSpace α]
#print isGδ_setOf_continuousAt /-
/-- The set of points where a function is continuous is a Gδ set. -/
theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤 β)] (f : α → β) :
- IsGδ { x | ContinuousAt f x } :=
+ IsGδ {x | ContinuousAt f x} :=
by
obtain ⟨U, hUo, hU⟩ := (@uniformity_hasBasis_open_symmetric β _).exists_antitone_subbasis
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
@@ -225,7 +225,7 @@ theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤
set_of_forall, id]
refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
- filter_upwards [IsOpen.mem_nhds hso hsx]with _ hy using⟨s, ⟨hy, hso⟩, hsU⟩
+ filter_upwards [IsOpen.mem_nhds hso hsx] with _ hy using ⟨s, ⟨hy, hso⟩, hsU⟩
#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
-/
@@ -238,7 +238,7 @@ variable [TopologicalSpace α]
#print residual /-
/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
def residual (α : Type _) [TopologicalSpace α] : Filter α :=
- Filter.countableGenerate { t | IsOpen t ∧ Dense t }
+ Filter.countableGenerate {t | IsOpen t ∧ Dense t}
deriving CountableInterFilter
#align residual residual
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -238,7 +238,8 @@ variable [TopologicalSpace α]
#print residual /-
/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
def residual (α : Type _) [TopologicalSpace α] : Filter α :=
- Filter.countableGenerate { t | IsOpen t ∧ Dense t }deriving CountableInterFilter
+ Filter.countableGenerate { t | IsOpen t ∧ Dense t }
+deriving CountableInterFilter
#align residual residual
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -41,7 +41,7 @@ Gδ set, residual set
noncomputable section
-open Classical Topology Filter uniformity
+open scoped Classical Topology Filter uniformity
open Filter Encodable Set
@@ -210,7 +210,7 @@ section ContinuousAt
open TopologicalSpace
-open uniformity
+open scoped uniformity
variable [TopologicalSpace α]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -121,22 +121,10 @@ theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Count
#align is_Gδ_sInter isGδ_sInter
-/
-/- warning: is_Gδ.inter -> IsGδ.inter is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (IsGδ.{u1} α _inst_1 s) -> (IsGδ.{u1} α _inst_1 t) -> (IsGδ.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (IsGδ.{u1} α _inst_1 s) -> (IsGδ.{u1} α _inst_1 t) -> (IsGδ.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
-Case conversion may be inaccurate. Consider using '#align is_Gδ.inter IsGδ.interₓ'. -/
theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
rw [inter_eq_Inter]; exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
-/- warning: is_Gδ.union -> IsGδ.union is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (IsGδ.{u1} α _inst_1 s) -> (IsGδ.{u1} α _inst_1 t) -> (IsGδ.{u1} α _inst_1 (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (IsGδ.{u1} α _inst_1 s) -> (IsGδ.{u1} α _inst_1 t) -> (IsGδ.{u1} α _inst_1 (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t))
-Case conversion may be inaccurate. Consider using '#align is_Gδ.union IsGδ.unionₓ'. -/
/-- The union of two Gδ sets is a Gδ set. -/
theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t) :=
by
@@ -173,54 +161,24 @@ section T1Space
variable [T1Space α]
-/- warning: is_Gδ_compl_singleton -> isGδ_compl_singleton is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] (a : α), IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.hasSingleton.{u1} α) a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] (a : α), IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) (Singleton.singleton.{u1, u1} α (Set.{u1} α) (Set.instSingletonSet.{u1} α) a))
-Case conversion may be inaccurate. Consider using '#align is_Gδ_compl_singleton isGδ_compl_singletonₓ'. -/
theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
isOpen_compl_singleton.IsGδ
#align is_Gδ_compl_singleton isGδ_compl_singleton
-/- warning: set.countable.is_Gδ_compl -> Set.Countable.isGδ_compl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Countable.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Countable.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))
-Case conversion may be inaccurate. Consider using '#align set.countable.is_Gδ_compl Set.Countable.isGδ_complₓ'. -/
theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) :=
by
rw [← bUnion_of_singleton s, compl_Union₂]
exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
-/- warning: set.finite.is_Gδ_compl -> Set.Finite.isGδ_compl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Finite.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Finite.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))
-Case conversion may be inaccurate. Consider using '#align set.finite.is_Gδ_compl Set.Finite.isGδ_complₓ'. -/
theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ (sᶜ) :=
hs.Countable.isGδ_compl
#align set.finite.is_Gδ_compl Set.Finite.isGδ_compl
-/- warning: set.subsingleton.is_Gδ_compl -> Set.Subsingleton.isGδ_compl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Subsingleton.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] {s : Set.{u1} α}, (Set.Subsingleton.{u1} α s) -> (IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))
-Case conversion may be inaccurate. Consider using '#align set.subsingleton.is_Gδ_compl Set.Subsingleton.isGδ_complₓ'. -/
theorem Set.Subsingleton.isGδ_compl {s : Set α} (hs : s.Subsingleton) : IsGδ (sᶜ) :=
hs.Finite.isGδ_compl
#align set.subsingleton.is_Gδ_compl Set.Subsingleton.isGδ_compl
-/- warning: finset.is_Gδ_compl -> Finset.isGδ_compl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] (s : Finset.{u1} α), IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} α) (Set.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} α) (Set.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} α) (Set.{u1} α) (Finset.Set.hasCoeT.{u1} α))) s))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : T1Space.{u1} α _inst_1] (s : Finset.{u1} α), IsGδ.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) (Finset.toSet.{u1} α s))
-Case conversion may be inaccurate. Consider using '#align finset.is_Gδ_compl Finset.isGδ_complₓ'. -/
theorem Finset.isGδ_compl (s : Finset α) : IsGδ (sᶜ : Set α) :=
s.finite_toSet.isGδ_compl
#align finset.is_Gδ_compl Finset.isGδ_compl
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -127,10 +127,8 @@ lean 3 declaration is
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (IsGδ.{u1} α _inst_1 s) -> (IsGδ.{u1} α _inst_1 t) -> (IsGδ.{u1} α _inst_1 (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s t))
Case conversion may be inaccurate. Consider using '#align is_Gδ.inter IsGδ.interₓ'. -/
-theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) :=
- by
- rw [inter_eq_Inter]
- exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
+theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
+ rw [inter_eq_Inter]; exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
/- warning: is_Gδ.union -> IsGδ.union is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/75e7fca56381d056096ce5d05e938f63a6567828
@@ -286,15 +286,20 @@ def residual (α : Type _) [TopologicalSpace α] : Filter α :=
#align residual residual
-/
+#print countableInterFilter_residual /-
instance countableInterFilter_residual : CountableInterFilter (residual α) := by
rw [residual] <;> infer_instance
#align countable_Inter_filter_residual countableInterFilter_residual
+-/
+#print residual_of_dense_open /-
/-- Dense open sets are residual. -/
theorem residual_of_dense_open {s : Set α} (ho : IsOpen s) (hd : Dense s) : s ∈ residual α :=
CountableGenerateSets.basic ⟨ho, hd⟩
#align residual_of_dense_open residual_of_dense_open
+-/
+#print residual_of_dense_Gδ /-
/-- Dense Gδ sets are residual. -/
theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈ residual α :=
by
@@ -303,13 +308,16 @@ theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈
(countable_sInter_mem Tct).mpr fun t tT =>
residual_of_dense_open (To t tT) (hd.mono (sInter_subset_of_mem tT))
#align residual_of_dense_Gδ residual_of_dense_Gδ
+-/
+#print mem_residual_iff /-
/-- A set is residual iff it includes a countable intersection of dense open sets. -/
theorem mem_residual_iff {s : Set α} :
s ∈ residual α ↔
∃ S : Set (Set α), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_set_of, forall_and, and_assoc']
#align mem_residual_iff mem_residual_iff
+-/
end residual
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -4,12 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
! This file was ported from Lean 3 source module topology.G_delta
-! leanprover-community/mathlib commit 50832daea47b195a48b5b33b1c8b2162c48c3afc
+! leanprover-community/mathlib commit b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Topology.UniformSpace.Basic
import Mathbin.Topology.Separation
+import Mathbin.Order.Filter.CountableInter
/-!
# `Gδ` sets
@@ -24,11 +25,8 @@ In this file we define `Gδ` sets and prove their basic properties.
* `is_Gδ`: a set `s` is a `Gδ` set if it can be represented as an intersection
of countably many open sets;
-* `residual`: the filter of residual sets. A set `s` is called *residual* if it includes a dense
- `Gδ` set. In a Baire space (e.g., in a complete (e)metric space), residual sets form a filter.
-
- For technical reasons, we define `residual` in any topological space but the definition agrees
- with the description above only in Baire spaces.
+* `residual`: the σ-filter of residual sets. A set `s` is called *residual* if it includes a
+ countable intersection of dense open sets.
## Main results
@@ -277,14 +275,41 @@ theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤
end ContinuousAt
-#print residual /-
-/-- A set `s` is called *residual* if it includes a dense `Gδ` set. If `α` is a Baire space
-(e.g., a complete metric space), then residual sets form a filter, see `mem_residual`.
+section residual
-For technical reasons we define the filter `residual` in any topological space but in a non-Baire
-space it is not useful because it may contain some non-residual sets. -/
+variable [TopologicalSpace α]
+
+#print residual /-
+/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
def residual (α : Type _) [TopologicalSpace α] : Filter α :=
- ⨅ (t) (ht : IsGδ t) (ht' : Dense t), 𝓟 t
+ Filter.countableGenerate { t | IsOpen t ∧ Dense t }deriving CountableInterFilter
#align residual residual
-/
+instance countableInterFilter_residual : CountableInterFilter (residual α) := by
+ rw [residual] <;> infer_instance
+#align countable_Inter_filter_residual countableInterFilter_residual
+
+/-- Dense open sets are residual. -/
+theorem residual_of_dense_open {s : Set α} (ho : IsOpen s) (hd : Dense s) : s ∈ residual α :=
+ CountableGenerateSets.basic ⟨ho, hd⟩
+#align residual_of_dense_open residual_of_dense_open
+
+/-- Dense Gδ sets are residual. -/
+theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈ residual α :=
+ by
+ rcases ho with ⟨T, To, Tct, rfl⟩
+ exact
+ (countable_sInter_mem Tct).mpr fun t tT =>
+ residual_of_dense_open (To t tT) (hd.mono (sInter_subset_of_mem tT))
+#align residual_of_dense_Gδ residual_of_dense_Gδ
+
+/-- A set is residual iff it includes a countable intersection of dense open sets. -/
+theorem mem_residual_iff {s : Set α} :
+ s ∈ residual α ↔
+ ∃ S : Set (Set α), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
+ mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_set_of, forall_and, and_assoc']
+#align mem_residual_iff mem_residual_iff
+
+end residual
+
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -63,7 +63,7 @@ def IsGδ (s : Set α) : Prop :=
#print IsOpen.isGδ /-
/-- An open set is a Gδ set. -/
theorem IsOpen.isGδ {s : Set α} (h : IsOpen s) : IsGδ s :=
- ⟨{s}, by simp [h], countable_singleton _, (Set.interₛ_singleton _).symm⟩
+ ⟨{s}, by simp [h], countable_singleton _, (Set.sInter_singleton _).symm⟩
#align is_open.is_Gδ IsOpen.isGδ
-/
@@ -81,46 +81,46 @@ theorem isGδ_univ : IsGδ (univ : Set α) :=
#align is_Gδ_univ isGδ_univ
-/
-#print isGδ_binterᵢ_of_open /-
-theorem isGδ_binterᵢ_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
+#print isGδ_biInter_of_open /-
+theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
-#align is_Gδ_bInter_of_open isGδ_binterᵢ_of_open
+#align is_Gδ_bInter_of_open isGδ_biInter_of_open
-/
-#print isGδ_interᵢ_of_open /-
-theorem isGδ_interᵢ_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
+#print isGδ_iInter_of_open /-
+theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
-#align is_Gδ_Inter_of_open isGδ_interᵢ_of_open
+#align is_Gδ_Inter_of_open isGδ_iInter_of_open
-/
-#print isGδ_interᵢ /-
+#print isGδ_iInter /-
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_interᵢ [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) :=
+theorem isGδ_iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) :=
by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine' ⟨⋃ i, T i, _, countable_Union hTc, (sInter_Union _).symm⟩
simpa [@forall_swap ι] using hTo
-#align is_Gδ_Inter isGδ_interᵢ
+#align is_Gδ_Inter isGδ_iInter
-/
-#print isGδ_binterᵢ /-
-theorem isGδ_binterᵢ {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
+#print isGδ_biInter /-
+theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
(ht : ∀ i ∈ s, IsGδ (t i ‹_›)) : IsGδ (⋂ i ∈ s, t i ‹_›) :=
by
rw [bInter_eq_Inter]
haveI := hs.to_encodable
- exact isGδ_interᵢ fun x => ht x x.2
-#align is_Gδ_bInter isGδ_binterᵢ
+ exact isGδ_iInter fun x => ht x x.2
+#align is_Gδ_bInter isGδ_biInter
-/
-#print isGδ_interₛ /-
+#print isGδ_sInter /-
/-- A countable intersection of Gδ sets is a Gδ set. -/
-theorem isGδ_interₛ {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
- simpa only [sInter_eq_bInter] using isGδ_binterᵢ hS h
-#align is_Gδ_sInter isGδ_interₛ
+theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
+ simpa only [sInter_eq_bInter] using isGδ_biInter hS h
+#align is_Gδ_sInter isGδ_sInter
-/
/- warning: is_Gδ.inter -> IsGδ.inter is a dubious translation:
@@ -132,7 +132,7 @@ Case conversion may be inaccurate. Consider using '#align is_Gδ.inter IsGδ.int
theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) :=
by
rw [inter_eq_Inter]
- exact isGδ_interᵢ (Bool.forall_bool.2 ⟨ht, hs⟩)
+ exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
/- warning: is_Gδ.union -> IsGδ.union is a dubious translation:
@@ -147,19 +147,19 @@ theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
- apply isGδ_binterᵢ_of_open (Scount.prod Tcount)
+ apply isGδ_biInter_of_open (Scount.prod Tcount)
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
-#print isGδ_bunionᵢ /-
+#print isGδ_biUnion /-
/-- The union of finitely many Gδ sets is a Gδ set. -/
-theorem isGδ_bunionᵢ {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
+theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
refine' finite.induction_on hs (by simp) _ h
simp only [ball_insert_iff, bUnion_insert]
exact fun a s _ _ ihs H => H.1.union (ihs H.2)
-#align is_Gδ_bUnion isGδ_bunionᵢ
+#align is_Gδ_bUnion isGδ_biUnion
-/
#print IsClosed.isGδ /-
@@ -168,8 +168,8 @@ theorem IsClosed.isGδ {α} [UniformSpace α] [IsCountablyGenerated (𝓤 α)] {
by
rcases(@uniformity_hasBasis_open α _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.bInter_bUnion_ball]
- refine' isGδ_binterᵢ (to_countable _) fun n hn => IsOpen.isGδ _
- exact isOpen_bunionᵢ fun x hx => UniformSpace.isOpen_ball _ (hUo _).2
+ refine' isGδ_biInter (to_countable _) fun n hn => IsOpen.isGδ _
+ exact isOpen_biUnion fun x hx => UniformSpace.isOpen_ball _ (hUo _).2
#align is_closed.is_Gδ IsClosed.isGδ
-/
@@ -196,7 +196,7 @@ Case conversion may be inaccurate. Consider using '#align set.countable.is_Gδ_c
theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) :=
by
rw [← bUnion_of_singleton s, compl_Union₂]
- exact isGδ_binterᵢ hs fun x _ => isGδ_compl_singleton x
+ exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
/- warning: set.finite.is_Gδ_compl -> Set.Finite.isGδ_compl is a dubious translation:
@@ -237,8 +237,8 @@ variable [FirstCountableTopology α]
theorem isGδ_singleton (a : α) : IsGδ ({a} : Set α) :=
by
rcases(nhds_basis_opens a).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
- rw [← binterᵢ_basis_nhds h_basis.to_has_basis]
- exact isGδ_binterᵢ (to_countable _) fun n hn => (hU n).2.IsGδ
+ rw [← biInter_basis_nhds h_basis.to_has_basis]
+ exact isGδ_biInter (to_countable _) fun n hn => (hU n).2.IsGδ
#align is_Gδ_singleton isGδ_singleton
-/
@@ -269,7 +269,7 @@ theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (𝓤
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
simp only [(nhds_basis_opens _).prod_self.tendsto_iffₓ hU.to_has_basis, forall_prop_of_true,
set_of_forall, id]
- refine' isGδ_interᵢ fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
+ refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
filter_upwards [IsOpen.mem_nhds hso hsx]with _ hy using⟨s, ⟨hy, hso⟩, hsU⟩
#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
bex
and ball
from lemma names (#11615)
Follow-up to #10816.
Remaining places containing such lemmas are
Option.bex_ne_none
and Option.ball_ne_none
: defined in Lean coreNat.decidableBallLT
and Nat.decidableBallLE
: defined in Lean corebef_def
is still used in a number of places and could be renamedBAll.imp_{left,right}
, BEx.imp_{left,right}
, BEx.intro
and BEx.elim
I only audited the first ~150 lemmas mentioning "ball"; too many lemmas named after Metric.ball/openBall/closedBall.
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@@ -154,7 +154,7 @@ theorem IsGδ.sUnion {S : Set (Set X)} (hS : S.Finite) (h : ∀ s ∈ S, IsGδ s
induction S, hS using Set.Finite.dinduction_on with
| H0 => simp
| H1 _ _ ih =>
- simp only [ball_insert_iff, sUnion_insert] at *
+ simp only [forall_mem_insert, sUnion_insert] at *
exact h.1.union (ih h.2)
/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.
@@ -296,7 +296,7 @@ lemma IsClosed.isNowhereDense_iff {s : Set X} (hs : IsClosed s) :
IsNowhereDense s ↔ interior s = ∅ := by
rw [IsNowhereDense, IsClosed.closure_eq hs]
-/-- If a set `s` is nowhere dense, so is its closure.-/
+/-- If a set `s` is nowhere dense, so is its closure. -/
protected lemma IsNowhereDense.closure {s : Set X} (hs : IsNowhereDense s) :
IsNowhereDense (closure s) := by
rwa [IsNowhereDense, closure_closure]
ball
and bex
from lemma names (#10816)
ball
for "bounded forall" and bex
for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem
and exists_mem
in the few Set
lemma names that mention them.
Also deprecate ball_image_of_ball
, mem_image_elim
, mem_image_elim_on
since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image
semi-implicit), have obscure names and are completely unused.
@@ -81,14 +81,14 @@ protected theorem IsGδ.univ : IsGδ (univ : Set X) :=
theorem IsGδ.biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
- ⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
+ ⟨f '' I, by rwa [forall_mem_image], hI.image _, by rw [sInter_image]⟩
#align is_Gδ_bInter_of_open IsGδ.biInter_of_isOpen
@[deprecated] alias isGδ_biInter_of_isOpen := IsGδ.biInter_of_isOpen -- 2024-02-15
theorem IsGδ.iInter_of_isOpen [Countable ι'] {f : ι' → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
- ⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
+ ⟨range f, by rwa [forall_mem_range], countable_range _, by rw [sInter_range]⟩
#align is_Gδ_Inter_of_open IsGδ.iInter_of_isOpen
@[deprecated] alias isGδ_iInter_of_isOpen := IsGδ.iInter_of_isOpen -- 2024-02-15
@@ -161,7 +161,7 @@ theorem IsGδ.sUnion {S : Set (Set X)} (hS : S.Finite) (h : ∀ s ∈ S, IsGδ s
theorem IsGδ.biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
rw [← sUnion_image]
- exact .sUnion (hs.image _) (ball_image_iff.2 h)
+ exact .sUnion (hs.image _) (forall_mem_image.2 h)
#align is_Gδ_bUnion IsGδ.biUnion
@[deprecated] -- 2024-02-15
@@ -169,7 +169,7 @@ alias isGδ_biUnion := IsGδ.biUnion
/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
theorem IsGδ.iUnion [Finite ι'] {f : ι' → Set X} (h : ∀ i, IsGδ (f i)) : IsGδ (⋃ i, f i) :=
- .sUnion (finite_range _) <| forall_range_iff.2 h
+ .sUnion (finite_range _) <| forall_mem_range.2 h
theorem IsClosed.isGδ {X : Type*} [UniformSpace X] [IsCountablyGenerated (𝓤 X)] {s : Set X}
(hs : IsClosed s) : IsGδ s := by
@@ -337,13 +337,13 @@ lemma isMeagre_iUnion {s : ℕ → Set X} (hs : ∀ n, IsMeagre (s n)) : IsMeagr
lemma isMeagre_iff_countable_union_isNowhereDense {s : Set X} :
IsMeagre s ↔ ∃ S : Set (Set X), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
rw [IsMeagre, mem_residual_iff, compl_bijective.surjective.image_surjective.exists]
- simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← isClosed_isNowhereDense_iff_compl,
+ simp_rw [← and_assoc, ← forall_and, forall_mem_image, ← isClosed_isNowhereDense_iff_compl,
sInter_image, ← compl_iUnion₂, compl_subset_compl, ← sUnion_eq_biUnion, and_assoc]
- refine ⟨fun ⟨S, hS, hc, hsub⟩ ↦ ⟨S, fun s hs ↦ (hS s hs).2, ?_, hsub⟩, ?_⟩
+ refine ⟨fun ⟨S, hS, hc, hsub⟩ ↦ ⟨S, fun s hs ↦ (hS hs).2, ?_, hsub⟩, ?_⟩
· rw [← compl_compl_image S]; exact hc.image _
· intro ⟨S, hS, hc, hsub⟩
use closure '' S
- rw [ball_image_iff]
+ rw [forall_mem_image]
exact ⟨fun s hs ↦ ⟨isClosed_closure, (hS s hs).closure⟩,
(hc.image _).image _, hsub.trans (sUnion_mono_subsets fun s ↦ subset_closure)⟩
Rename many isGδ_some
lemmas to IsGδ.some
.
Also resolve a TODO.
@@ -66,24 +66,32 @@ theorem IsOpen.isGδ {s : Set X} (h : IsOpen s) : IsGδ s :=
#align is_open.is_Gδ IsOpen.isGδ
@[simp]
-theorem isGδ_empty : IsGδ (∅ : Set X) :=
+protected theorem IsGδ.empty : IsGδ (∅ : Set X) :=
isOpen_empty.isGδ
-#align is_Gδ_empty isGδ_empty
+#align is_Gδ_empty IsGδ.empty
+
+@[deprecated] alias isGδ_empty := IsGδ.empty -- 2024-02-15
@[simp]
-theorem isGδ_univ : IsGδ (univ : Set X) :=
+protected theorem IsGδ.univ : IsGδ (univ : Set X) :=
isOpen_univ.isGδ
-#align is_Gδ_univ isGδ_univ
+#align is_Gδ_univ IsGδ.univ
+
+@[deprecated] alias isGδ_univ := IsGδ.univ -- 2024-02-15
-theorem isGδ_biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
+theorem IsGδ.biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
-#align is_Gδ_bInter_of_open isGδ_biInter_of_isOpen
+#align is_Gδ_bInter_of_open IsGδ.biInter_of_isOpen
-theorem isGδ_iInter_of_isOpen [Countable ι'] {f : ι' → Set X} (hf : ∀ i, IsOpen (f i)) :
+@[deprecated] alias isGδ_biInter_of_isOpen := IsGδ.biInter_of_isOpen -- 2024-02-15
+
+theorem IsGδ.iInter_of_isOpen [Countable ι'] {f : ι' → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
-#align is_Gδ_Inter_of_open isGδ_iInter_of_isOpen
+#align is_Gδ_Inter_of_open IsGδ.iInter_of_isOpen
+
+@[deprecated] alias isGδ_iInter_of_isOpen := IsGδ.iInter_of_isOpen -- 2024-02-15
lemma isGδ_iff_eq_iInter_nat {s : Set X} :
IsGδ s ↔ ∃ (f : ℕ → Set X), (∀ n, IsOpen (f n)) ∧ s = ⋂ n, f n := by
@@ -94,33 +102,41 @@ lemma isGδ_iff_eq_iInter_nat {s : Set X} :
· obtain ⟨f, hf⟩ : ∃ (f : ℕ → Set X), T = range f := Countable.exists_eq_range T_count hT
exact ⟨f, by aesop, by simp [hf]⟩
· rintro ⟨f, hf, rfl⟩
- apply isGδ_iInter_of_isOpen hf
+ exact .iInter_of_isOpen hf
alias ⟨IsGδ.eq_iInter_nat, _⟩ := isGδ_iff_eq_iInter_nat
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
+protected theorem IsGδ.iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) :
+ IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine' ⟨⋃ i, T i, _, countable_iUnion hTc, (sInter_iUnion _).symm⟩
simpa [@forall_swap ι'] using hTo
-#align is_Gδ_Inter isGδ_iInter
+#align is_Gδ_Inter IsGδ.iInter
-theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set X}
+@[deprecated] alias isGδ_iInter := IsGδ.iInter
+
+theorem IsGδ.biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set X}
(ht : ∀ (i) (hi : i ∈ s), IsGδ (t i hi)) : IsGδ (⋂ i ∈ s, t i ‹_›) := by
rw [biInter_eq_iInter]
- haveI := hs.toEncodable
- exact isGδ_iInter fun x => ht x x.2
-#align is_Gδ_bInter isGδ_biInter
+ haveI := hs.to_subtype
+ exact .iInter fun x => ht x x.2
+#align is_Gδ_bInter IsGδ.biInter
+
+@[deprecated] alias isGδ_biInter := IsGδ.biInter -- 2024-02-15
/-- A countable intersection of Gδ sets is a Gδ set. -/
-theorem isGδ_sInter {S : Set (Set X)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
- simpa only [sInter_eq_biInter] using isGδ_biInter hS h
-#align is_Gδ_sInter isGδ_sInter
+theorem IsGδ.sInter {S : Set (Set X)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
+ simpa only [sInter_eq_biInter] using IsGδ.biInter hS h
+#align is_Gδ_sInter IsGδ.sInter
+
+@[deprecated] -- 2024-02-15
+alias isGδ_sInter := IsGδ.sInter
theorem IsGδ.inter {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
rw [inter_eq_iInter]
- exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
+ exact .iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
/-- The union of two Gδ sets is a Gδ set. -/
@@ -128,25 +144,38 @@ theorem IsGδ.union {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
- apply isGδ_biInter_of_isOpen (Scount.prod Tcount)
+ refine .biInter_of_isOpen (Scount.prod Tcount) ?_
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
--- TODO: add `iUnion` and `sUnion` versions
-/-- The union of finitely many Gδ sets is a Gδ set. -/
-theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
+/-- The union of finitely many Gδ sets is a Gδ set, `Set.sUnion` version. -/
+theorem IsGδ.sUnion {S : Set (Set X)} (hS : S.Finite) (h : ∀ s ∈ S, IsGδ s) : IsGδ (⋃₀ S) := by
+ induction S, hS using Set.Finite.dinduction_on with
+ | H0 => simp
+ | H1 _ _ ih =>
+ simp only [ball_insert_iff, sUnion_insert] at *
+ exact h.1.union (ih h.2)
+
+/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
+theorem IsGδ.biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
- refine' Finite.induction_on hs (by simp) _ h
- simp only [ball_insert_iff, biUnion_insert]
- exact fun _ _ ihs H => H.1.union (ihs H.2)
-#align is_Gδ_bUnion isGδ_biUnion
+ rw [← sUnion_image]
+ exact .sUnion (hs.image _) (ball_image_iff.2 h)
+#align is_Gδ_bUnion IsGδ.biUnion
+
+@[deprecated] -- 2024-02-15
+alias isGδ_biUnion := IsGδ.biUnion
+
+/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
+theorem IsGδ.iUnion [Finite ι'] {f : ι' → Set X} (h : ∀ i, IsGδ (f i)) : IsGδ (⋃ i, f i) :=
+ .sUnion (finite_range _) <| forall_range_iff.2 h
-theorem IsClosed.isGδ {X} [UniformSpace X] [IsCountablyGenerated (𝓤 X)] {s : Set X}
+theorem IsClosed.isGδ {X : Type*} [UniformSpace X] [IsCountablyGenerated (𝓤 X)] {s : Set X}
(hs : IsClosed s) : IsGδ s := by
rcases (@uniformity_hasBasis_open X _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.biInter_biUnion_ball]
- refine' isGδ_biInter (to_countable _) fun n _ => IsOpen.isGδ _
+ refine .biInter (to_countable _) fun n _ => IsOpen.isGδ ?_
exact isOpen_biUnion fun x _ => UniformSpace.isOpen_ball _ (hUo _).2
#align is_closed.is_Gδ IsClosed.isGδ
@@ -154,13 +183,15 @@ section T1Space
variable [T1Space X]
-theorem isGδ_compl_singleton (x : X) : IsGδ ({x}ᶜ : Set X) :=
+theorem IsGδ.compl_singleton (x : X) : IsGδ ({x}ᶜ : Set X) :=
isOpen_compl_singleton.isGδ
-#align is_Gδ_compl_singleton isGδ_compl_singleton
+#align is_Gδ_compl_singleton IsGδ.compl_singleton
+
+@[deprecated] alias isGδ_compl_singleton := IsGδ.compl_singleton -- 2024-02-15
theorem Set.Countable.isGδ_compl {s : Set X} (hs : s.Countable) : IsGδ sᶜ := by
rw [← biUnion_of_singleton s, compl_iUnion₂]
- exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
+ exact .biInter hs fun x _ => .compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
theorem Set.Finite.isGδ_compl {s : Set X} (hs : s.Finite) : IsGδ sᶜ :=
@@ -177,14 +208,16 @@ theorem Finset.isGδ_compl (s : Finset X) : IsGδ (sᶜ : Set X) :=
variable [FirstCountableTopology X]
-theorem isGδ_singleton (x : X) : IsGδ ({x} : Set X) := by
+protected theorem IsGδ.singleton (x : X) : IsGδ ({x} : Set X) := by
rcases (nhds_basis_opens x).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
rw [← biInter_basis_nhds h_basis.toHasBasis]
- exact isGδ_biInter (to_countable _) fun n _ => (hU n).2.isGδ
-#align is_Gδ_singleton isGδ_singleton
+ exact .biInter (to_countable _) fun n _ => (hU n).2.isGδ
+#align is_Gδ_singleton IsGδ.singleton
+
+@[deprecated] alias isGδ_singleton := IsGδ.singleton -- 2024-02-15
theorem Set.Finite.isGδ {s : Set X} (hs : s.Finite) : IsGδ s :=
- Finite.induction_on hs isGδ_empty fun _ _ hs => (isGδ_singleton _).union hs
+ Finite.induction_on hs .empty fun _ _ ↦ .union (.singleton _)
#align set.finite.is_Gδ Set.Finite.isGδ
end T1Space
@@ -196,16 +229,18 @@ section ContinuousAt
variable [TopologicalSpace X]
/-- The set of points where a function is continuous is a Gδ set. -/
-theorem isGδ_setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (𝓤 Y)] (f : X → Y) :
+theorem IsGδ.setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (𝓤 Y)] (f : X → Y) :
IsGδ { x | ContinuousAt f x } := by
obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric Y _).exists_antitone_subbasis
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
simp only [(nhds_basis_opens _).prod_self.tendsto_iff hU.toHasBasis, forall_prop_of_true,
setOf_forall, id]
- refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
+ refine .iInter fun k ↦ IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x ↦ ?_
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
filter_upwards [IsOpen.mem_nhds hso hsx] with _ hy using ⟨s, ⟨hy, hso⟩, hsU⟩
-#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
+#align is_Gδ_set_of_continuous_at IsGδ.setOf_continuousAt
+
+@[deprecated] alias isGδ_setOf_continuousAt := IsGδ.setOf_continuousAt -- 2024-02-15
end ContinuousAt
A TODO
was added inside a porting note. We change it to a TODO
.
@@ -133,7 +133,7 @@ theorem IsGδ.union {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
--- porting note: TODO: add `iUnion` and `sUnion` versions
+-- TODO: add `iUnion` and `sUnion` versions
/-- The union of finitely many Gδ sets is a Gδ set. -/
theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
@@ -96,6 +96,8 @@ lemma isGδ_iff_eq_iInter_nat {s : Set X} :
· rintro ⟨f, hf, rfl⟩
apply isGδ_iInter_of_isOpen hf
+alias ⟨IsGδ.eq_iInter_nat, _⟩ := isGδ_iff_eq_iInter_nat
+
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
theorem isGδ_iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
ℕ
.cluster_point_of_compact
to exists_clusterPt_of_compactSpace
T2Space
to T2OrLocallyCompactRegularSpace
in the file Support.lean
@@ -45,8 +45,9 @@ Gδ set, residual set, nowhere dense set, meagre set
noncomputable section
open Topology TopologicalSpace Filter Encodable Set
+open scoped Uniformity
-variable {X Y ι : Type*}
+variable {X Y ι : Type*} {ι' : Sort*}
set_option linter.uppercaseLean3 false
@@ -79,19 +80,28 @@ theorem isGδ_biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
#align is_Gδ_bInter_of_open isGδ_biInter_of_isOpen
--- porting note: TODO: generalize to `Sort*` + `Countable _`
-theorem isGδ_iInter_of_isOpen [Encodable ι] {f : ι → Set X} (hf : ∀ i, IsOpen (f i)) :
+theorem isGδ_iInter_of_isOpen [Countable ι'] {f : ι' → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
#align is_Gδ_Inter_of_open isGδ_iInter_of_isOpen
--- porting note: TODO: generalize to `Sort*` + `Countable _`
+lemma isGδ_iff_eq_iInter_nat {s : Set X} :
+ IsGδ s ↔ ∃ (f : ℕ → Set X), (∀ n, IsOpen (f n)) ∧ s = ⋂ n, f n := by
+ refine ⟨?_, ?_⟩
+ · rintro ⟨T, hT, T_count, rfl⟩
+ rcases Set.eq_empty_or_nonempty T with rfl|hT
+ · exact ⟨fun _n ↦ univ, fun _n ↦ isOpen_univ, by simp⟩
+ · obtain ⟨f, hf⟩ : ∃ (f : ℕ → Set X), T = range f := Countable.exists_eq_range T_count hT
+ exact ⟨f, by aesop, by simp [hf]⟩
+ · rintro ⟨f, hf, rfl⟩
+ apply isGδ_iInter_of_isOpen hf
+
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_iInter [Encodable ι] {s : ι → Set X} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
+theorem isGδ_iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine' ⟨⋃ i, T i, _, countable_iUnion hTc, (sInter_iUnion _).symm⟩
- simpa [@forall_swap ι] using hTo
+ simpa [@forall_swap ι'] using hTo
#align is_Gδ_Inter isGδ_iInter
theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set X}
@@ -130,8 +140,7 @@ theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i
exact fun _ _ ihs H => H.1.union (ihs H.2)
#align is_Gδ_bUnion isGδ_biUnion
--- Porting note: Did not recognize notation 𝓤 X, needed to replace with uniformity X
-theorem IsClosed.isGδ {X} [UniformSpace X] [IsCountablyGenerated (uniformity X)] {s : Set X}
+theorem IsClosed.isGδ {X} [UniformSpace X] [IsCountablyGenerated (𝓤 X)] {s : Set X}
(hs : IsClosed s) : IsGδ s := by
rcases (@uniformity_hasBasis_open X _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.biInter_biUnion_ball]
@@ -185,7 +194,7 @@ section ContinuousAt
variable [TopologicalSpace X]
/-- The set of points where a function is continuous is a Gδ set. -/
-theorem isGδ_setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (uniformity Y)] (f : X → Y) :
+theorem isGδ_setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (𝓤 Y)] (f : X → Y) :
IsGδ { x | ContinuousAt f x } := by
obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric Y _).exists_antitone_subbasis
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
The corresponding Prop is called IsMeagre
.
@@ -32,7 +32,7 @@ continuity set of a function from a topological space to an (e)metric space is a
- `isClosed_isNowhereDense_iff_compl`: a closed set is nowhere dense iff
its complement is open and dense
-- `meagre_iff_countable_union_isNowhereDense`: a set is meagre iff it is contained in a countable
+- `isMeagre_iff_countable_union_isNowhereDense`: a set is meagre iff it is contained in a countable
union of nowhere dense sets
- subsets of meagre sets are meagre; countable unions of meagre sets are meagre
@@ -283,13 +283,13 @@ lemma IsMeagre.inter {s t : Set X} (hs : IsMeagre s) : IsMeagre (s ∩ t) :=
hs.mono (inter_subset_left s t)
/-- A countable union of meagre sets is meagre. -/
-lemma meagre_iUnion {s : ℕ → Set X} (hs : ∀ n, IsMeagre (s n)) : IsMeagre (⋃ n, s n) := by
+lemma isMeagre_iUnion {s : ℕ → Set X} (hs : ∀ n, IsMeagre (s n)) : IsMeagre (⋃ n, s n) := by
rw [IsMeagre, compl_iUnion]
exact countable_iInter_mem.mpr hs
/-- A set is meagre iff it is contained in a countable union of nowhere dense sets. -/
-lemma meagre_iff_countable_union_isNowhereDense {s : Set X} : IsMeagre s ↔
- ∃ S : Set (Set X), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
+lemma isMeagre_iff_countable_union_isNowhereDense {s : Set X} :
+ IsMeagre s ↔ ∃ S : Set (Set X), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
rw [IsMeagre, mem_residual_iff, compl_bijective.surjective.image_surjective.exists]
simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← isClosed_isNowhereDense_iff_compl,
sInter_image, ← compl_iUnion₂, compl_subset_compl, ← sUnion_eq_biUnion, and_assoc]
@@ -242,7 +242,7 @@ def IsNowhereDense (s : Set X) := interior (closure s) = ∅
/-- The empty set is nowhere dense. -/
@[simp]
-lemma isNowhereDense_of_empty : IsNowhereDense (∅ : Set X) := by
+lemma isNowhereDense_empty : IsNowhereDense (∅ : Set X) := by
rw [IsNowhereDense, closure_empty, interior_empty]
/-- A closed set is nowhere dense iff its interior is empty. -/
Mostly, this means replacing "of_open" by "of_isOpen". A few lemmas names were misleading and are corrected differently. Zulip discussion.
@@ -74,16 +74,16 @@ theorem isGδ_univ : IsGδ (univ : Set X) :=
isOpen_univ.isGδ
#align is_Gδ_univ isGδ_univ
-theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set X}
+theorem isGδ_biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
-#align is_Gδ_bInter_of_open isGδ_biInter_of_open
+#align is_Gδ_bInter_of_open isGδ_biInter_of_isOpen
-- porting note: TODO: generalize to `Sort*` + `Countable _`
-theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set X} (hf : ∀ i, IsOpen (f i)) :
+theorem isGδ_iInter_of_isOpen [Encodable ι] {f : ι → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
-#align is_Gδ_Inter_of_open isGδ_iInter_of_open
+#align is_Gδ_Inter_of_open isGδ_iInter_of_isOpen
-- porting note: TODO: generalize to `Sort*` + `Countable _`
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
@@ -116,7 +116,7 @@ theorem IsGδ.union {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
- apply isGδ_biInter_of_open (Scount.prod Tcount)
+ apply isGδ_biInter_of_isOpen (Scount.prod Tcount)
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
The corresponding definition is called IsNowhereDense
; this matches rules 1 and 5 of the naming convention.
While at it, fix a doc comment (missing word), use a focusing dot (small oversight) and fix line length.
@@ -30,10 +30,10 @@ In this file we define `Gδ` sets and prove their basic properties.
We prove that finite or countable intersections of Gδ sets are Gδ sets. We also prove that the
continuity set of a function from a topological space to an (e)metric space is a Gδ set.
-- `closed_isNowhereDense_iff_compl`: a closed set is nowhere dense iff
+- `isClosed_isNowhereDense_iff_compl`: a closed set is nowhere dense iff
its complement is open and dense
-- `meagre_iff_countable_union_nowhereDense`: a set is meagre iff it is contained in a countable
-union of nowhere dense
+- `meagre_iff_countable_union_isNowhereDense`: a set is meagre iff it is contained in a countable
+union of nowhere dense sets
- subsets of meagre sets are meagre; countable unions of meagre sets are meagre
## Tags
@@ -256,12 +256,12 @@ protected lemma IsNowhereDense.closure {s : Set X} (hs : IsNowhereDense s) :
rwa [IsNowhereDense, closure_closure]
/-- A nowhere dense set `s` is contained in a closed nowhere dense set (namely, its closure). -/
-lemma IsNowhereDense.subset_of_closed_nowhereDense {s : Set X} (hs : IsNowhereDense s) :
+lemma IsNowhereDense.subset_of_closed_isNowhereDense {s : Set X} (hs : IsNowhereDense s) :
∃ t : Set X, s ⊆ t ∧ IsNowhereDense t ∧ IsClosed t :=
⟨closure s, subset_closure, ⟨hs.closure, isClosed_closure⟩⟩
/-- A set `s` is closed and nowhere dense iff its complement `sᶜ` is open and dense. -/
-lemma closed_isNowhereDense_iff_compl {s : Set X} :
+lemma isClosed_isNowhereDense_iff_compl {s : Set X} :
IsClosed s ∧ IsNowhereDense s ↔ IsOpen sᶜ ∧ Dense sᶜ := by
rw [and_congr_right IsClosed.isNowhereDense_iff,
isOpen_compl_iff, interior_eq_empty_iff_dense_compl]
@@ -288,16 +288,17 @@ lemma meagre_iUnion {s : ℕ → Set X} (hs : ∀ n, IsMeagre (s n)) : IsMeagre
exact countable_iInter_mem.mpr hs
/-- A set is meagre iff it is contained in a countable union of nowhere dense sets. -/
-lemma meagre_iff_countable_union_nowhereDense {s : Set X} : IsMeagre s ↔
+lemma meagre_iff_countable_union_isNowhereDense {s : Set X} : IsMeagre s ↔
∃ S : Set (Set X), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
rw [IsMeagre, mem_residual_iff, compl_bijective.surjective.image_surjective.exists]
- simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← closed_isNowhereDense_iff_compl,
+ simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← isClosed_isNowhereDense_iff_compl,
sInter_image, ← compl_iUnion₂, compl_subset_compl, ← sUnion_eq_biUnion, and_assoc]
- refine ⟨fun ⟨S, hS, hc, hsub⟩ ↦ ⟨S, fun s hs ↦ (hS s hs).2, ?_, hsub⟩, fun ⟨S, hS, hc, hsub⟩ ↦ ?_⟩
+ refine ⟨fun ⟨S, hS, hc, hsub⟩ ↦ ⟨S, fun s hs ↦ (hS s hs).2, ?_, hsub⟩, ?_⟩
· rw [← compl_compl_image S]; exact hc.image _
- use closure '' S
- rw [ball_image_iff]
- exact ⟨fun s hs ↦ ⟨isClosed_closure, (hS s hs).closure⟩,
- (hc.image _).image _, hsub.trans (sUnion_mono_subsets fun s ↦ subset_closure)⟩
+ · intro ⟨S, hS, hc, hsub⟩
+ use closure '' S
+ rw [ball_image_iff]
+ exact ⟨fun s hs ↦ ⟨isClosed_closure, (hS s hs).closure⟩,
+ (hc.image _).image _, hsub.trans (sUnion_mono_subsets fun s ↦ subset_closure)⟩
end meagre
rcases
, convert
and congrm
(#7725)
Replace rcases(
with rcases (
. Same thing for convert(
and congrm(
. No other change.
@@ -133,7 +133,7 @@ theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i
-- Porting note: Did not recognize notation 𝓤 X, needed to replace with uniformity X
theorem IsClosed.isGδ {X} [UniformSpace X] [IsCountablyGenerated (uniformity X)] {s : Set X}
(hs : IsClosed s) : IsGδ s := by
- rcases(@uniformity_hasBasis_open X _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
+ rcases (@uniformity_hasBasis_open X _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.biInter_biUnion_ball]
refine' isGδ_biInter (to_countable _) fun n _ => IsOpen.isGδ _
exact isOpen_biUnion fun x _ => UniformSpace.isOpen_ball _ (hUo _).2
filter_upwards
(#7719)
mathport was forgetting a space in filter_upwards [...]with
instead of filter_upwards [...] with
.
@@ -193,7 +193,7 @@ theorem isGδ_setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (uniform
setOf_forall, id]
refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
- filter_upwards [IsOpen.mem_nhds hso hsx]with _ hy using⟨s, ⟨hy, hso⟩, hsU⟩
+ filter_upwards [IsOpen.mem_nhds hso hsx] with _ hy using ⟨s, ⟨hy, hso⟩, hsU⟩
#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
end ContinuousAt
Greek letters for topological spaces are outdated, use letters X, Y, Z instead. Zulip discussion.
@@ -46,55 +46,55 @@ noncomputable section
open Topology TopologicalSpace Filter Encodable Set
-variable {α β γ ι : Type*}
+variable {X Y ι : Type*}
set_option linter.uppercaseLean3 false
section IsGδ
-variable [TopologicalSpace α]
+variable [TopologicalSpace X]
/-- A Gδ set is a countable intersection of open sets. -/
-def IsGδ (s : Set α) : Prop :=
- ∃ T : Set (Set α), (∀ t ∈ T, IsOpen t) ∧ T.Countable ∧ s = ⋂₀ T
+def IsGδ (s : Set X) : Prop :=
+ ∃ T : Set (Set X), (∀ t ∈ T, IsOpen t) ∧ T.Countable ∧ s = ⋂₀ T
#align is_Gδ IsGδ
/-- An open set is a Gδ set. -/
-theorem IsOpen.isGδ {s : Set α} (h : IsOpen s) : IsGδ s :=
+theorem IsOpen.isGδ {s : Set X} (h : IsOpen s) : IsGδ s :=
⟨{s}, by simp [h], countable_singleton _, (Set.sInter_singleton _).symm⟩
#align is_open.is_Gδ IsOpen.isGδ
@[simp]
-theorem isGδ_empty : IsGδ (∅ : Set α) :=
+theorem isGδ_empty : IsGδ (∅ : Set X) :=
isOpen_empty.isGδ
#align is_Gδ_empty isGδ_empty
@[simp]
-theorem isGδ_univ : IsGδ (univ : Set α) :=
+theorem isGδ_univ : IsGδ (univ : Set X) :=
isOpen_univ.isGδ
#align is_Gδ_univ isGδ_univ
-theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
+theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
#align is_Gδ_bInter_of_open isGδ_biInter_of_open
-- porting note: TODO: generalize to `Sort*` + `Countable _`
-theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
+theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
#align is_Gδ_Inter_of_open isGδ_iInter_of_open
-- porting note: TODO: generalize to `Sort*` + `Countable _`
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
+theorem isGδ_iInter [Encodable ι] {s : ι → Set X} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine' ⟨⋃ i, T i, _, countable_iUnion hTc, (sInter_iUnion _).symm⟩
simpa [@forall_swap ι] using hTo
#align is_Gδ_Inter isGδ_iInter
-theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
+theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set X}
(ht : ∀ (i) (hi : i ∈ s), IsGδ (t i hi)) : IsGδ (⋂ i ∈ s, t i ‹_›) := by
rw [biInter_eq_iInter]
haveI := hs.toEncodable
@@ -102,17 +102,17 @@ theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
#align is_Gδ_bInter isGδ_biInter
/-- A countable intersection of Gδ sets is a Gδ set. -/
-theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
+theorem isGδ_sInter {S : Set (Set X)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
simpa only [sInter_eq_biInter] using isGδ_biInter hS h
#align is_Gδ_sInter isGδ_sInter
-theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
+theorem IsGδ.inter {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
rw [inter_eq_iInter]
exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
/-- The union of two Gδ sets is a Gδ set. -/
-theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t) := by
+theorem IsGδ.union {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t) := by
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
rw [sInter_union_sInter]
@@ -123,17 +123,17 @@ theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪
-- porting note: TODO: add `iUnion` and `sUnion` versions
/-- The union of finitely many Gδ sets is a Gδ set. -/
-theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
+theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
refine' Finite.induction_on hs (by simp) _ h
simp only [ball_insert_iff, biUnion_insert]
exact fun _ _ ihs H => H.1.union (ihs H.2)
#align is_Gδ_bUnion isGδ_biUnion
--- Porting note: Did not recognize notation 𝓤 α, needed to replace with uniformity α
-theorem IsClosed.isGδ {α} [UniformSpace α] [IsCountablyGenerated (uniformity α)] {s : Set α}
+-- Porting note: Did not recognize notation 𝓤 X, needed to replace with uniformity X
+theorem IsClosed.isGδ {X} [UniformSpace X] [IsCountablyGenerated (uniformity X)] {s : Set X}
(hs : IsClosed s) : IsGδ s := by
- rcases(@uniformity_hasBasis_open α _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
+ rcases(@uniformity_hasBasis_open X _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
rw [← hs.closure_eq, ← hU.biInter_biUnion_ball]
refine' isGδ_biInter (to_countable _) fun n _ => IsOpen.isGδ _
exact isOpen_biUnion fun x _ => UniformSpace.isOpen_ball _ (hUo _).2
@@ -141,38 +141,38 @@ theorem IsClosed.isGδ {α} [UniformSpace α] [IsCountablyGenerated (uniformity
section T1Space
-variable [T1Space α]
+variable [T1Space X]
-theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
+theorem isGδ_compl_singleton (x : X) : IsGδ ({x}ᶜ : Set X) :=
isOpen_compl_singleton.isGδ
#align is_Gδ_compl_singleton isGδ_compl_singleton
-theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ sᶜ := by
+theorem Set.Countable.isGδ_compl {s : Set X} (hs : s.Countable) : IsGδ sᶜ := by
rw [← biUnion_of_singleton s, compl_iUnion₂]
exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
-theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ sᶜ :=
+theorem Set.Finite.isGδ_compl {s : Set X} (hs : s.Finite) : IsGδ sᶜ :=
hs.countable.isGδ_compl
#align set.finite.is_Gδ_compl Set.Finite.isGδ_compl
-theorem Set.Subsingleton.isGδ_compl {s : Set α} (hs : s.Subsingleton) : IsGδ sᶜ :=
+theorem Set.Subsingleton.isGδ_compl {s : Set X} (hs : s.Subsingleton) : IsGδ sᶜ :=
hs.finite.isGδ_compl
#align set.subsingleton.is_Gδ_compl Set.Subsingleton.isGδ_compl
-theorem Finset.isGδ_compl (s : Finset α) : IsGδ (sᶜ : Set α) :=
+theorem Finset.isGδ_compl (s : Finset X) : IsGδ (sᶜ : Set X) :=
s.finite_toSet.isGδ_compl
#align finset.is_Gδ_compl Finset.isGδ_compl
-variable [FirstCountableTopology α]
+variable [FirstCountableTopology X]
-theorem isGδ_singleton (a : α) : IsGδ ({a} : Set α) := by
- rcases (nhds_basis_opens a).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
+theorem isGδ_singleton (x : X) : IsGδ ({x} : Set X) := by
+ rcases (nhds_basis_opens x).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
rw [← biInter_basis_nhds h_basis.toHasBasis]
exact isGδ_biInter (to_countable _) fun n _ => (hU n).2.isGδ
#align is_Gδ_singleton isGδ_singleton
-theorem Set.Finite.isGδ {s : Set α} (hs : s.Finite) : IsGδ s :=
+theorem Set.Finite.isGδ {s : Set X} (hs : s.Finite) : IsGδ s :=
Finite.induction_on hs isGδ_empty fun _ _ hs => (isGδ_singleton _).union hs
#align set.finite.is_Gδ Set.Finite.isGδ
@@ -182,12 +182,12 @@ end IsGδ
section ContinuousAt
-variable [TopologicalSpace α]
+variable [TopologicalSpace X]
/-- The set of points where a function is continuous is a Gδ set. -/
-theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (uniformity β)] (f : α → β) :
+theorem isGδ_setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (uniformity Y)] (f : X → Y) :
IsGδ { x | ContinuousAt f x } := by
- obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric β _).exists_antitone_subbasis
+ obtain ⟨U, _, hU⟩ := (@uniformity_hasBasis_open_symmetric Y _).exists_antitone_subbasis
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
simp only [(nhds_basis_opens _).prod_self.tendsto_iff hU.toHasBasis, forall_prop_of_true,
setOf_forall, id]
@@ -200,24 +200,24 @@ end ContinuousAt
section residual
-variable [TopologicalSpace α]
+variable [TopologicalSpace X]
/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
-def residual (α : Type*) [TopologicalSpace α] : Filter α :=
+def residual (X : Type*) [TopologicalSpace X] : Filter X :=
Filter.countableGenerate { t | IsOpen t ∧ Dense t }
#align residual residual
-instance countableInterFilter_residual : CountableInterFilter (residual α) := by
+instance countableInterFilter_residual : CountableInterFilter (residual X) := by
rw [residual]; infer_instance
#align countable_Inter_filter_residual countableInterFilter_residual
/-- Dense open sets are residual. -/
-theorem residual_of_dense_open {s : Set α} (ho : IsOpen s) (hd : Dense s) : s ∈ residual α :=
+theorem residual_of_dense_open {s : Set X} (ho : IsOpen s) (hd : Dense s) : s ∈ residual X :=
CountableGenerateSets.basic ⟨ho, hd⟩
#align residual_of_dense_open residual_of_dense_open
/-- Dense Gδ sets are residual. -/
-theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈ residual α := by
+theorem residual_of_dense_Gδ {s : Set X} (ho : IsGδ s) (hd : Dense s) : s ∈ residual X := by
rcases ho with ⟨T, To, Tct, rfl⟩
exact
(countable_sInter_mem Tct).mpr fun t tT =>
@@ -225,9 +225,9 @@ theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈
#align residual_of_dense_Gδ residual_of_dense_Gδ
/-- A set is residual iff it includes a countable intersection of dense open sets. -/
-theorem mem_residual_iff {s : Set α} :
- s ∈ residual α ↔
- ∃ S : Set (Set α), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
+theorem mem_residual_iff {s : Set X} :
+ s ∈ residual X ↔
+ ∃ S : Set (Set X), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_setOf, forall_and, and_assoc]
#align mem_residual_iff mem_residual_iff
@@ -235,61 +235,61 @@ end residual
section meagre
open Function TopologicalSpace Set
-variable {α : Type*} [TopologicalSpace α]
+variable {X : Type*} [TopologicalSpace X]
/-- A set is called **nowhere dense** iff its closure has empty interior. -/
-def IsNowhereDense (s : Set α) := interior (closure s) = ∅
+def IsNowhereDense (s : Set X) := interior (closure s) = ∅
/-- The empty set is nowhere dense. -/
@[simp]
-lemma isNowhereDense_of_empty : IsNowhereDense (∅ : Set α) := by
+lemma isNowhereDense_of_empty : IsNowhereDense (∅ : Set X) := by
rw [IsNowhereDense, closure_empty, interior_empty]
/-- A closed set is nowhere dense iff its interior is empty. -/
-lemma IsClosed.isNowhereDense_iff {s : Set α} (hs : IsClosed s) :
+lemma IsClosed.isNowhereDense_iff {s : Set X} (hs : IsClosed s) :
IsNowhereDense s ↔ interior s = ∅ := by
rw [IsNowhereDense, IsClosed.closure_eq hs]
/-- If a set `s` is nowhere dense, so is its closure.-/
-protected lemma IsNowhereDense.closure {s : Set α} (hs : IsNowhereDense s) :
+protected lemma IsNowhereDense.closure {s : Set X} (hs : IsNowhereDense s) :
IsNowhereDense (closure s) := by
rwa [IsNowhereDense, closure_closure]
/-- A nowhere dense set `s` is contained in a closed nowhere dense set (namely, its closure). -/
-lemma IsNowhereDense.subset_of_closed_nowhereDense {s : Set α} (hs : IsNowhereDense s) :
- ∃ t : Set α, s ⊆ t ∧ IsNowhereDense t ∧ IsClosed t :=
+lemma IsNowhereDense.subset_of_closed_nowhereDense {s : Set X} (hs : IsNowhereDense s) :
+ ∃ t : Set X, s ⊆ t ∧ IsNowhereDense t ∧ IsClosed t :=
⟨closure s, subset_closure, ⟨hs.closure, isClosed_closure⟩⟩
/-- A set `s` is closed and nowhere dense iff its complement `sᶜ` is open and dense. -/
-lemma closed_isNowhereDense_iff_compl {s : Set α} :
+lemma closed_isNowhereDense_iff_compl {s : Set X} :
IsClosed s ∧ IsNowhereDense s ↔ IsOpen sᶜ ∧ Dense sᶜ := by
rw [and_congr_right IsClosed.isNowhereDense_iff,
isOpen_compl_iff, interior_eq_empty_iff_dense_compl]
/-- A set is called **meagre** iff its complement is a residual (or comeagre) set. -/
-def IsMeagre (s : Set α) := sᶜ ∈ residual α
+def IsMeagre (s : Set X) := sᶜ ∈ residual X
/-- The empty set is meagre. -/
-lemma meagre_empty : IsMeagre (∅ : Set α) := by
+lemma meagre_empty : IsMeagre (∅ : Set X) := by
rw [IsMeagre, compl_empty]
exact Filter.univ_mem
/-- Subsets of meagre sets are meagre. -/
-lemma IsMeagre.mono {s t : Set α} (hs : IsMeagre s) (hts: t ⊆ s) : IsMeagre t :=
+lemma IsMeagre.mono {s t : Set X} (hs : IsMeagre s) (hts: t ⊆ s) : IsMeagre t :=
Filter.mem_of_superset hs (compl_subset_compl.mpr hts)
/-- An intersection with a meagre set is meagre. -/
-lemma IsMeagre.inter {s t : Set α} (hs : IsMeagre s) : IsMeagre (s ∩ t) :=
+lemma IsMeagre.inter {s t : Set X} (hs : IsMeagre s) : IsMeagre (s ∩ t) :=
hs.mono (inter_subset_left s t)
/-- A countable union of meagre sets is meagre. -/
-lemma meagre_iUnion {s : ℕ → Set α} (hs : ∀ n, IsMeagre (s n)) : IsMeagre (⋃ n, s n) := by
+lemma meagre_iUnion {s : ℕ → Set X} (hs : ∀ n, IsMeagre (s n)) : IsMeagre (⋃ n, s n) := by
rw [IsMeagre, compl_iUnion]
exact countable_iInter_mem.mpr hs
/-- A set is meagre iff it is contained in a countable union of nowhere dense sets. -/
-lemma meagre_iff_countable_union_nowhereDense {s : Set α} : IsMeagre s ↔
- ∃ S : Set (Set α), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
+lemma meagre_iff_countable_union_nowhereDense {s : Set X} : IsMeagre s ↔
+ ∃ S : Set (Set X), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
rw [IsMeagre, mem_residual_iff, compl_bijective.surjective.image_surjective.exists]
simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← closed_isNowhereDense_iff_compl,
sInter_image, ← compl_iUnion₂, compl_subset_compl, ← sUnion_eq_biUnion, and_assoc]
Define nowhere dense and meagre sets and show their basic properties. Meagre sets are defined as the complement of comeagre(=residual) sets (and shown to be equivalent to the standard definition); we deduce their API from the API for comeagre sets.
Co-authored-by: grunweg <grunweg@posteo.de>
@@ -22,14 +22,23 @@ In this file we define `Gδ` sets and prove their basic properties.
* `residual`: the σ-filter of residual sets. A set `s` is called *residual* if it includes a
countable intersection of dense open sets.
+* `IsNowhereDense`: a set is called *nowhere dense* iff its closure has empty interior
+* `IsMeagre`: a set `s` is called *meagre* iff its complement is residual
+
## Main results
-We prove that finite or countable intersections of Gδ sets is a Gδ set. We also prove that the
+We prove that finite or countable intersections of Gδ sets are Gδ sets. We also prove that the
continuity set of a function from a topological space to an (e)metric space is a Gδ set.
+- `closed_isNowhereDense_iff_compl`: a closed set is nowhere dense iff
+its complement is open and dense
+- `meagre_iff_countable_union_nowhereDense`: a set is meagre iff it is contained in a countable
+union of nowhere dense
+- subsets of meagre sets are meagre; countable unions of meagre sets are meagre
+
## Tags
-Gδ set, residual set
+Gδ set, residual set, nowhere dense set, meagre set
-/
@@ -223,3 +232,72 @@ theorem mem_residual_iff {s : Set α} :
#align mem_residual_iff mem_residual_iff
end residual
+
+section meagre
+open Function TopologicalSpace Set
+variable {α : Type*} [TopologicalSpace α]
+
+/-- A set is called **nowhere dense** iff its closure has empty interior. -/
+def IsNowhereDense (s : Set α) := interior (closure s) = ∅
+
+/-- The empty set is nowhere dense. -/
+@[simp]
+lemma isNowhereDense_of_empty : IsNowhereDense (∅ : Set α) := by
+ rw [IsNowhereDense, closure_empty, interior_empty]
+
+/-- A closed set is nowhere dense iff its interior is empty. -/
+lemma IsClosed.isNowhereDense_iff {s : Set α} (hs : IsClosed s) :
+ IsNowhereDense s ↔ interior s = ∅ := by
+ rw [IsNowhereDense, IsClosed.closure_eq hs]
+
+/-- If a set `s` is nowhere dense, so is its closure.-/
+protected lemma IsNowhereDense.closure {s : Set α} (hs : IsNowhereDense s) :
+ IsNowhereDense (closure s) := by
+ rwa [IsNowhereDense, closure_closure]
+
+/-- A nowhere dense set `s` is contained in a closed nowhere dense set (namely, its closure). -/
+lemma IsNowhereDense.subset_of_closed_nowhereDense {s : Set α} (hs : IsNowhereDense s) :
+ ∃ t : Set α, s ⊆ t ∧ IsNowhereDense t ∧ IsClosed t :=
+ ⟨closure s, subset_closure, ⟨hs.closure, isClosed_closure⟩⟩
+
+/-- A set `s` is closed and nowhere dense iff its complement `sᶜ` is open and dense. -/
+lemma closed_isNowhereDense_iff_compl {s : Set α} :
+ IsClosed s ∧ IsNowhereDense s ↔ IsOpen sᶜ ∧ Dense sᶜ := by
+ rw [and_congr_right IsClosed.isNowhereDense_iff,
+ isOpen_compl_iff, interior_eq_empty_iff_dense_compl]
+
+/-- A set is called **meagre** iff its complement is a residual (or comeagre) set. -/
+def IsMeagre (s : Set α) := sᶜ ∈ residual α
+
+/-- The empty set is meagre. -/
+lemma meagre_empty : IsMeagre (∅ : Set α) := by
+ rw [IsMeagre, compl_empty]
+ exact Filter.univ_mem
+
+/-- Subsets of meagre sets are meagre. -/
+lemma IsMeagre.mono {s t : Set α} (hs : IsMeagre s) (hts: t ⊆ s) : IsMeagre t :=
+ Filter.mem_of_superset hs (compl_subset_compl.mpr hts)
+
+/-- An intersection with a meagre set is meagre. -/
+lemma IsMeagre.inter {s t : Set α} (hs : IsMeagre s) : IsMeagre (s ∩ t) :=
+ hs.mono (inter_subset_left s t)
+
+/-- A countable union of meagre sets is meagre. -/
+lemma meagre_iUnion {s : ℕ → Set α} (hs : ∀ n, IsMeagre (s n)) : IsMeagre (⋃ n, s n) := by
+ rw [IsMeagre, compl_iUnion]
+ exact countable_iInter_mem.mpr hs
+
+/-- A set is meagre iff it is contained in a countable union of nowhere dense sets. -/
+lemma meagre_iff_countable_union_nowhereDense {s : Set α} : IsMeagre s ↔
+ ∃ S : Set (Set α), (∀ t ∈ S, IsNowhereDense t) ∧ S.Countable ∧ s ⊆ ⋃₀ S := by
+ rw [IsMeagre, mem_residual_iff, compl_bijective.surjective.image_surjective.exists]
+ simp_rw [← and_assoc, ← forall_and, ball_image_iff, ← closed_isNowhereDense_iff_compl,
+ sInter_image, ← compl_iUnion₂, compl_subset_compl, ← sUnion_eq_biUnion, and_assoc]
+ refine ⟨fun ⟨S, hS, hc, hsub⟩ ↦ ⟨S, fun s hs ↦ (hS s hs).2, ?_, hsub⟩, fun ⟨S, hS, hc, hsub⟩ ↦ ?_⟩
+ · rw [← compl_compl_image S]; exact hc.image _
+ use closure '' S
+ rw [ball_image_iff]
+ exact ⟨fun s hs ↦ ⟨isClosed_closure, (hS s hs).closure⟩,
+ (hc.image _).image _, hsub.trans (sUnion_mono_subsets fun s ↦ subset_closure)⟩
+
+end meagre
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -37,7 +37,7 @@ noncomputable section
open Topology TopologicalSpace Filter Encodable Set
-variable {α β γ ι : Type _}
+variable {α β γ ι : Type*}
set_option linter.uppercaseLean3 false
@@ -70,13 +70,13 @@ theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α
⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
#align is_Gδ_bInter_of_open isGδ_biInter_of_open
--- porting note: TODO: generalize to `Sort _` + `Countable _`
+-- porting note: TODO: generalize to `Sort*` + `Countable _`
theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
#align is_Gδ_Inter_of_open isGδ_iInter_of_open
--- porting note: TODO: generalize to `Sort _` + `Countable _`
+-- porting note: TODO: generalize to `Sort*` + `Countable _`
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
theorem isGδ_iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
@@ -194,7 +194,7 @@ section residual
variable [TopologicalSpace α]
/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
-def residual (α : Type _) [TopologicalSpace α] : Filter α :=
+def residual (α : Type*) [TopologicalSpace α] : Filter α :=
Filter.countableGenerate { t | IsOpen t ∧ Dense t }
#align residual residual
@@ -2,16 +2,13 @@
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
-
-! This file was ported from Lean 3 source module topology.G_delta
-! leanprover-community/mathlib commit b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
import Mathlib.Order.Filter.CountableInter
+#align_import topology.G_delta from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
+
/-!
# `Gδ` sets
@@ -141,16 +141,16 @@ theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
isOpen_compl_singleton.isGδ
#align is_Gδ_compl_singleton isGδ_compl_singleton
-theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) := by
+theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ sᶜ := by
rw [← biUnion_of_singleton s, compl_iUnion₂]
exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
-theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ (sᶜ) :=
+theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ sᶜ :=
hs.countable.isGδ_compl
#align set.finite.is_Gδ_compl Set.Finite.isGδ_compl
-theorem Set.Subsingleton.isGδ_compl {s : Set α} (hs : s.Subsingleton) : IsGδ (sᶜ) :=
+theorem Set.Subsingleton.isGδ_compl {s : Set α} (hs : s.Subsingleton) : IsGδ sᶜ :=
hs.finite.isGδ_compl
#align set.subsingleton.is_Gδ_compl Set.Subsingleton.isGδ_compl
Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
@@ -4,12 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
! This file was ported from Lean 3 source module topology.G_delta
-! leanprover-community/mathlib commit b363547b3113d350d053abdf2884e9850a56b205
+! leanprover-community/mathlib commit b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
+import Mathlib.Order.Filter.CountableInter
/-!
# `Gδ` sets
@@ -21,11 +22,8 @@ In this file we define `Gδ` sets and prove their basic properties.
* `IsGδ`: a set `s` is a `Gδ` set if it can be represented as an intersection
of countably many open sets;
-* `residual`: the filter of residual sets. A set `s` is called *residual* if it includes a dense
- `Gδ` set. In a Baire space (e.g., in a complete (e)metric space), residual sets form a filter.
-
- For technical reasons, we define `residual` in any topological space but the definition agrees
- with the description above only in Baire spaces.
+* `residual`: the σ-filter of residual sets. A set `s` is called *residual* if it includes a
+ countable intersection of dense open sets.
## Main results
@@ -194,11 +192,37 @@ theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (unifor
end ContinuousAt
-/-- A set `s` is called *residual* if it includes a dense `Gδ` set. If `α` is a Baire space
-(e.g., a complete metric space), then residual sets form a filter, see `mem_residual`.
+section residual
+
+variable [TopologicalSpace α]
-For technical reasons we define the filter `residual` in any topological space but in a non-Baire
-space it is not useful because it may contain some non-residual sets. -/
+/-- A set `s` is called *residual* if it includes a countable intersection of dense open sets. -/
def residual (α : Type _) [TopologicalSpace α] : Filter α :=
- ⨅ (t) (_ht : IsGδ t) (_ht' : Dense t), 𝓟 t
+ Filter.countableGenerate { t | IsOpen t ∧ Dense t }
#align residual residual
+
+instance countableInterFilter_residual : CountableInterFilter (residual α) := by
+ rw [residual]; infer_instance
+#align countable_Inter_filter_residual countableInterFilter_residual
+
+/-- Dense open sets are residual. -/
+theorem residual_of_dense_open {s : Set α} (ho : IsOpen s) (hd : Dense s) : s ∈ residual α :=
+ CountableGenerateSets.basic ⟨ho, hd⟩
+#align residual_of_dense_open residual_of_dense_open
+
+/-- Dense Gδ sets are residual. -/
+theorem residual_of_dense_Gδ {s : Set α} (ho : IsGδ s) (hd : Dense s) : s ∈ residual α := by
+ rcases ho with ⟨T, To, Tct, rfl⟩
+ exact
+ (countable_sInter_mem Tct).mpr fun t tT =>
+ residual_of_dense_open (To t tT) (hd.mono (sInter_subset_of_mem tT))
+#align residual_of_dense_Gδ residual_of_dense_Gδ
+
+/-- A set is residual iff it includes a countable intersection of dense open sets. -/
+theorem mem_residual_iff {s : Set α} :
+ s ∈ residual α ↔
+ ∃ S : Set (Set α), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s :=
+ mem_countableGenerate_iff.trans <| by simp_rw [subset_def, mem_setOf, forall_and, and_assoc]
+#align mem_residual_iff mem_residual_iff
+
+end residual
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -57,7 +57,7 @@ def IsGδ (s : Set α) : Prop :=
/-- An open set is a Gδ set. -/
theorem IsOpen.isGδ {s : Set α} (h : IsOpen s) : IsGδ s :=
- ⟨{s}, by simp [h], countable_singleton _, (Set.interₛ_singleton _).symm⟩
+ ⟨{s}, by simp [h], countable_singleton _, (Set.sInter_singleton _).symm⟩
#align is_open.is_Gδ IsOpen.isGδ
@[simp]
@@ -70,69 +70,69 @@ theorem isGδ_univ : IsGδ (univ : Set α) :=
isOpen_univ.isGδ
#align is_Gδ_univ isGδ_univ
-theorem isGδ_binterᵢ_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
+theorem isGδ_biInter_of_open {I : Set ι} (hI : I.Countable) {f : ι → Set α}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
- ⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [interₛ_image]⟩
-#align is_Gδ_bInter_of_open isGδ_binterᵢ_of_open
+ ⟨f '' I, by rwa [ball_image_iff], hI.image _, by rw [sInter_image]⟩
+#align is_Gδ_bInter_of_open isGδ_biInter_of_open
-- porting note: TODO: generalize to `Sort _` + `Countable _`
-theorem isGδ_interᵢ_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
+theorem isGδ_iInter_of_open [Encodable ι] {f : ι → Set α} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
- ⟨range f, by rwa [forall_range_iff], countable_range _, by rw [interₛ_range]⟩
-#align is_Gδ_Inter_of_open isGδ_interᵢ_of_open
+ ⟨range f, by rwa [forall_range_iff], countable_range _, by rw [sInter_range]⟩
+#align is_Gδ_Inter_of_open isGδ_iInter_of_open
-- porting note: TODO: generalize to `Sort _` + `Countable _`
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
-theorem isGδ_interᵢ [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
+theorem isGδ_iInter [Encodable ι] {s : ι → Set α} (hs : ∀ i, IsGδ (s i)) : IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
- refine' ⟨⋃ i, T i, _, countable_unionᵢ hTc, (interₛ_unionᵢ _).symm⟩
+ refine' ⟨⋃ i, T i, _, countable_iUnion hTc, (sInter_iUnion _).symm⟩
simpa [@forall_swap ι] using hTo
-#align is_Gδ_Inter isGδ_interᵢ
+#align is_Gδ_Inter isGδ_iInter
-theorem isGδ_binterᵢ {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
+theorem isGδ_biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set α}
(ht : ∀ (i) (hi : i ∈ s), IsGδ (t i hi)) : IsGδ (⋂ i ∈ s, t i ‹_›) := by
- rw [binterᵢ_eq_interᵢ]
+ rw [biInter_eq_iInter]
haveI := hs.toEncodable
- exact isGδ_interᵢ fun x => ht x x.2
-#align is_Gδ_bInter isGδ_binterᵢ
+ exact isGδ_iInter fun x => ht x x.2
+#align is_Gδ_bInter isGδ_biInter
/-- A countable intersection of Gδ sets is a Gδ set. -/
-theorem isGδ_interₛ {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
- simpa only [interₛ_eq_binterᵢ] using isGδ_binterᵢ hS h
-#align is_Gδ_sInter isGδ_interₛ
+theorem isGδ_sInter {S : Set (Set α)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
+ simpa only [sInter_eq_biInter] using isGδ_biInter hS h
+#align is_Gδ_sInter isGδ_sInter
theorem IsGδ.inter {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by
- rw [inter_eq_interᵢ]
- exact isGδ_interᵢ (Bool.forall_bool.2 ⟨ht, hs⟩)
+ rw [inter_eq_iInter]
+ exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
#align is_Gδ.inter IsGδ.inter
/-- The union of two Gδ sets is a Gδ set. -/
theorem IsGδ.union {s t : Set α} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t) := by
rcases hs with ⟨S, Sopen, Scount, rfl⟩
rcases ht with ⟨T, Topen, Tcount, rfl⟩
- rw [interₛ_union_interₛ]
- apply isGδ_binterᵢ_of_open (Scount.prod Tcount)
+ rw [sInter_union_sInter]
+ apply isGδ_biInter_of_open (Scount.prod Tcount)
rintro ⟨a, b⟩ ⟨ha, hb⟩
exact (Sopen a ha).union (Topen b hb)
#align is_Gδ.union IsGδ.union
--- porting note: TODO: add `unionᵢ` and `unionₛ` versions
+-- porting note: TODO: add `iUnion` and `sUnion` versions
/-- The union of finitely many Gδ sets is a Gδ set. -/
-theorem isGδ_bunionᵢ {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
+theorem isGδ_biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set α} (h : ∀ i ∈ s, IsGδ (f i)) :
IsGδ (⋃ i ∈ s, f i) := by
refine' Finite.induction_on hs (by simp) _ h
- simp only [ball_insert_iff, bunionᵢ_insert]
+ simp only [ball_insert_iff, biUnion_insert]
exact fun _ _ ihs H => H.1.union (ihs H.2)
-#align is_Gδ_bUnion isGδ_bunionᵢ
+#align is_Gδ_bUnion isGδ_biUnion
-- Porting note: Did not recognize notation 𝓤 α, needed to replace with uniformity α
theorem IsClosed.isGδ {α} [UniformSpace α] [IsCountablyGenerated (uniformity α)] {s : Set α}
(hs : IsClosed s) : IsGδ s := by
rcases(@uniformity_hasBasis_open α _).exists_antitone_subbasis with ⟨U, hUo, hU, -⟩
- rw [← hs.closure_eq, ← hU.binterᵢ_bunionᵢ_ball]
- refine' isGδ_binterᵢ (to_countable _) fun n _ => IsOpen.isGδ _
- exact isOpen_bunionᵢ fun x _ => UniformSpace.isOpen_ball _ (hUo _).2
+ rw [← hs.closure_eq, ← hU.biInter_biUnion_ball]
+ refine' isGδ_biInter (to_countable _) fun n _ => IsOpen.isGδ _
+ exact isOpen_biUnion fun x _ => UniformSpace.isOpen_ball _ (hUo _).2
#align is_closed.is_Gδ IsClosed.isGδ
section T1Space
@@ -144,8 +144,8 @@ theorem isGδ_compl_singleton (a : α) : IsGδ ({a}ᶜ : Set α) :=
#align is_Gδ_compl_singleton isGδ_compl_singleton
theorem Set.Countable.isGδ_compl {s : Set α} (hs : s.Countable) : IsGδ (sᶜ) := by
- rw [← bunionᵢ_of_singleton s, compl_unionᵢ₂]
- exact isGδ_binterᵢ hs fun x _ => isGδ_compl_singleton x
+ rw [← biUnion_of_singleton s, compl_iUnion₂]
+ exact isGδ_biInter hs fun x _ => isGδ_compl_singleton x
#align set.countable.is_Gδ_compl Set.Countable.isGδ_compl
theorem Set.Finite.isGδ_compl {s : Set α} (hs : s.Finite) : IsGδ (sᶜ) :=
@@ -164,8 +164,8 @@ variable [FirstCountableTopology α]
theorem isGδ_singleton (a : α) : IsGδ ({a} : Set α) := by
rcases (nhds_basis_opens a).exists_antitone_subbasis with ⟨U, hU, h_basis⟩
- rw [← binterᵢ_basis_nhds h_basis.toHasBasis]
- exact isGδ_binterᵢ (to_countable _) fun n _ => (hU n).2.isGδ
+ rw [← biInter_basis_nhds h_basis.toHasBasis]
+ exact isGδ_biInter (to_countable _) fun n _ => (hU n).2.isGδ
#align is_Gδ_singleton isGδ_singleton
theorem Set.Finite.isGδ {s : Set α} (hs : s.Finite) : IsGδ s :=
@@ -187,7 +187,7 @@ theorem isGδ_setOf_continuousAt [UniformSpace β] [IsCountablyGenerated (unifor
simp only [Uniform.continuousAt_iff_prod, nhds_prod_eq]
simp only [(nhds_basis_opens _).prod_self.tendsto_iff hU.toHasBasis, forall_prop_of_true,
setOf_forall, id]
- refine' isGδ_interᵢ fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
+ refine' isGδ_iInter fun k => IsOpen.isGδ <| isOpen_iff_mem_nhds.2 fun x => _
rintro ⟨s, ⟨hsx, hso⟩, hsU⟩
filter_upwards [IsOpen.mem_nhds hso hsx]with _ hy using⟨s, ⟨hy, hso⟩, hsU⟩
#align is_Gδ_set_of_continuous_at isGδ_setOf_continuousAt
The unported dependencies are