Lean library · module TopologyByExample.Theorems.DiscreteNaturalsPower
Arbitrary powers of the discrete naturals
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
variable {ι : Type*}
instance indexDecidableEq
TopologyByExample.DiscreteNaturalsPower.indexDecidableEq
Classical equality for the index set.
local instance indexDecidableEq : DecidableEq ι
Proof
:= Classical.decEq ι
definition cylinder
TopologyByExample.DiscreteNaturalsPower.cylinder
A cylinder fixes the coordinates in a finite set.
def cylinder (x : (ι → ℕ)) (F : Finset ι) :
Set (ι → ℕ)
:= {y | ∀ i ∈ F, y i = x i}
theorem mem_cylinder
TopologyByExample.DiscreteNaturalsPower.mem_cylinder
Every cylinder contains its centre.
theorem mem_cylinder (x : (ι → ℕ)) (F : Finset ι) :
x ∈ cylinder x F
Proof
:= fun _ _ ↦ rfl
theorem isOpen_cylinder
TopologyByExample.DiscreteNaturalsPower.isOpen_cylinder
Finite coordinate cylinders are open.
theorem isOpen_cylinder (x : (ι → ℕ)) (F : Finset ι) :
IsOpen (cylinder x F)
theorem exists_cylinder
TopologyByExample.DiscreteNaturalsPower.exists_cylinder
An open neighbourhood contains a finite coordinate cylinder.
theorem exists_cylinder {U : Set (ι → ℕ)} (hU : IsOpen U)
{x : (ι → ℕ)} (hx : x ∈ U) : ∃ F, cylinder x F ⊆ U
Proof
:= by
obtain ⟨F, A, hA, hsub⟩ := isOpen_pi_iff.mp hU x hx
refine ⟨F, fun y hy ↦ hsub ?_⟩
intro i hi
rw [hy i hi]
exact (hA i hi).2
theorem nonempty_iInter_cylinder
TopologyByExample.DiscreteNaturalsPower.nonempty_iInter_cylinder
Nested finite coordinate cylinders have a common extension.
theorem nonempty_iInter_cylinder (x : ℕ → (ι → ℕ))
(F : ℕ → Finset ι) (h : Antitone (fun n ↦ cylinder (x n) (F n))) :
(⋂ n, cylinder (x n) (F n)).Nonempty
Proof
:= by
classical
let z : (ι → ℕ) := fun j ↦
if hj : ∃ n, j ∈ F n then x hj.choose j else 0
refine ⟨z, mem_iInter.mpr fun n j hj ↦ ?_⟩
have hex : ∃ n, j ∈ F n := ⟨n, hj⟩
simp only [z, dite_eq_left hex]
let m := hex.choose
have hm : j ∈ F m := hex.choose_spec
have hmn : x (max m n) ∈ cylinder (x m) (F m) :=
h (le_max_left _ _) (mem_cylinder _ _)
have hnn : x (max m n) ∈ cylinder (x n) (F n) :=
h (le_max_right _ _) (mem_cylinder _ _)
exact (hmn j hm).symm.trans (hnn j hj)
theorem baireSpace
TopologyByExample.DiscreteNaturalsPower.baireSpace
Fusion of finite coordinate conditions proves the Baire property.
theorem baireSpace : BaireSpace (ι → ℕ)
Proof
:= by
classical
constructor
intro U hU hd
apply dense_iff_inter_open.mpr
intro O hO hOne
obtain ⟨x, hx⟩ := hOne
obtain ⟨F, hF⟩ := exists_cylinder hO hx
have step (n : ℕ) (p : (ι → ℕ) × Finset ι) :
∃ q : (ι → ℕ) × Finset ι,
cylinder q.1 q.2 ⊆ cylinder p.1 p.2 ∩ U n := by
obtain ⟨y, hyp, hyU⟩ := dense_iff_inter_open.mp (hd n) _
(isOpen_cylinder p.1 p.2) ⟨p.1, mem_cylinder _ _⟩
obtain ⟨G, hG⟩ := exists_cylinder ((isOpen_cylinder p.1 p.2).inter (hU n))
⟨hyp, hyU⟩
exact ⟨(y, G), hG⟩
choose next hnext using step
let p : ℕ → (ι → ℕ) × Finset ι :=
Nat.rec (x, F) (fun n p ↦ next n p)
have hp (n : ℕ) : cylinder (p (n + 1)).1 (p (n + 1)).2 ⊆
cylinder (p n).1 (p n).2 ∩ U n := hnext n (p n)
have hanti : Antitone (fun n ↦ cylinder (p n).1 (p n).2) :=
antitone_nat_of_succ_le fun n ↦ (hp n).trans inter_subset_left
obtain ⟨z, hz⟩ := nonempty_iInter_cylinder (fun n ↦ (p n).1) (fun n ↦ (p n).2) hanti
refine ⟨z, hF (mem_iInter.mp hz 0), mem_iInter.mpr fun n ↦ ?_⟩
exact (hp n (mem_iInter.mp hz (n + 1))).2
On this site: Theorem: Every power of the discrete naturals is Baire
theorem countableChainCondition
TopologyByExample.DiscreteNaturalsPower.countableChainCondition
Every power of the discrete naturals satisfies the countable chain condition.
theorem countableChainCondition : ∀ S : Set (Set (ι → ℕ)),
(∀ U ∈ S, IsOpen U ∧ U.Nonempty) → S.PairwiseDisjoint id → S.Countable
Proof
:= by
classical
intro S hS hd
by_contra hunc
have hA : ¬(Set.univ : Set S).Countable := by
simpa only [countable_univ_iff, countable_coe_iff] using hunc
choose x hx using fun U : S ↦ (hS U U.property).2
choose F hF using fun U : S ↦ exists_cylinder (hS U U.property).1 (hx U)
let q : S → Finset (ι × ℕ) := fun U ↦ (F U).image (fun i ↦ (i, x U i))
obtain ⟨r, hr⟩ := finiteSupportKernel Set.univ hA q
obtain ⟨U, _, _, hrU, _⟩ := hr ∅ countable_empty ∅ countable_empty
obtain ⟨V, _, hVU, hrV, havoid⟩ := hr {U} (countable_singleton U)
((F U : Set ι) ×ˢ (Set.univ : Set ℕ)) ((F U).countable_toSet.prod countable_univ)
let z : ι → ℕ := fun i ↦ if i ∈ F U then x U i else x V i
have hzU : z ∈ (U : Set (ι → ℕ)) := hF U (fun i hi ↦ by simp [z, hi])
have hzV : z ∈ (V : Set (ι → ℕ)) := by
apply hF V
intro i hi
by_cases hiU : i ∈ F U
· have hpair : (i, x V i) ∈ q V := Finset.mem_image_of_mem _ hi
have hroot := havoid (i, x V i) hpair ⟨hiU, mem_univ _⟩
obtain ⟨j, hj, he⟩ := Finset.mem_image.mp (hrU hroot)
have hji : j = i := congrArg Prod.fst he
have hval : x U i = x V i := by simpa only [hji] using congrArg Prod.snd he
simpa [z, hiU] using hval
· simp [z, hiU]
have hne : (U : Set (ι → ℕ)) ≠ (V : Set (ι → ℕ)) := by
intro he
exact hVU (by simpa only [mem_singleton_iff] using (Subtype.ext he).symm)
exact Set.disjoint_left.mp (hd U.property V.property hne) hzU hzV
On this site: Theorem: Every power of the discrete naturals satisfies the countable chain condition
theorem exists_free_coordinate
TopologyByExample.DiscreteNaturalsPower.exists_free_coordinate
A nonempty open set leaves some coordinate completely unrestricted.
theorem exists_free_coordinate [Infinite ι] {U : Set (ι → ℕ)} (hU : IsOpen U)
{x : (ι → ℕ)} (hx : x ∈ U) :
∃ a : ι, ∀ n : ℕ, Function.update x a n ∈ U
Proof
:= by
classical
obtain ⟨I, A, hA, hsub⟩ := isOpen_pi_iff.mp hU x hx
obtain ⟨a, ha⟩ := Infinite.exists_notMem_finset I
refine ⟨a, fun n ↦ hsub ?_⟩
intro i hi
have hia : i ≠ a := by intro he; exact ha (he ▸ hi)
simpa only [Function.update_of_ne hia] using (hA i hi).2
theorem no_isolated_point
TopologyByExample.DiscreteNaturalsPower.no_isolated_point
The product has no isolated points.
theorem no_isolated_point [Infinite ι] : ¬∃ x : (ι → ℕ), IsOpen ({x} : Set _)
Proof
:= by
classical
rintro ⟨x, hx⟩
obtain ⟨a, ha⟩ := exists_free_coordinate hx (mem_singleton x)
have h := congrFun (ha (x a + 1)) a
simp at h
theorem not_weaklyLocallyCompactSpace
TopologyByExample.DiscreteNaturalsPower.not_weaklyLocallyCompactSpace
The product is not weakly locally compact.
theorem not_weaklyLocallyCompactSpace [Infinite ι] : ¬WeaklyLocallyCompactSpace (ι → ℕ)
Proof
:= by
classical
intro h
let z : (ι → ℕ) := fun _ ↦ 0
obtain ⟨K, hK, hzK⟩ := exists_compact_mem_nhds z
obtain ⟨U, hUK, hU, hzU⟩ := mem_nhds_iff.mp hzK
obtain ⟨a, ha⟩ := exists_free_coordinate hU hzU
have he : (fun f : (ι → ℕ) ↦ f a) '' K = Set.univ := by
apply Set.eq_univ_of_forall
intro n
exact ⟨Function.update z a n, hUK (ha n), Function.update_self a n z⟩
have hc := hK.image (continuous_apply a)
rw [he] at hc
exact Set.infinite_univ (hc.finite IsDiscrete.univ)
theorem not_pseudocompactSpace
TopologyByExample.DiscreteNaturalsPower.not_pseudocompactSpace
A coordinate projection gives an unbounded continuous real-valued function.
theorem not_pseudocompactSpace [Nonempty ι] : ¬PseudocompactSpace (ι → ℕ)
Proof
:= by
intro h
let f : C((ι → ℕ), ℝ) :=
⟨fun x ↦ (x (Classical.arbitrary ι) : ℝ),
continuous_of_discreteTopology.comp (continuous_apply (Classical.arbitrary ι))⟩
obtain ⟨b, hb⟩ := (PseudocompactSpace.bddAbove_and_bddBelow_range f).1
obtain ⟨n, hn⟩ := exists_nat_gt b
have hle : (n : ℝ) ≤ b := hb ⟨fun _ ↦ n, rfl⟩
exact hn.not_ge hle
theorem not_sequentiallyDiscreteSpace
TopologyByExample.DiscreteNaturalsPower.not_sequentiallyDiscreteSpace
There is a convergent sequence which is not eventually constant.
theorem not_sequentiallyDiscreteSpace [Infinite ι] : ¬SequentiallyDiscreteSpace (ι → ℕ)
Proof
:= by
classical
intro h
let e : ℕ ↪ ι := Infinite.natEmbedding ι
let z : (ι → ℕ) := fun _ ↦ 0
let u : ℕ → (ι → ℕ) := fun n ↦ Function.update z (e n) 1
have ht : Tendsto u atTop (𝓝 z) := by
apply tendsto_pi_nhds.mpr
intro i
apply tendsto_const_nhds.congr'
by_cases hi : ∃ k, e k = i
· obtain ⟨k, rfl⟩ := hi
filter_upwards [eventually_gt_atTop k] with n hn
simp [u, Function.update_of_ne (e.injective.ne hn.ne)]
· have hi' : ∀ n, i ≠ e n := by simpa [eq_comm] using hi
filter_upwards [] with n
simp [u, Function.update_of_ne (hi' n)]
obtain ⟨n, hn⟩ := (SequentiallyDiscreteSpace.eventually_eq_of_tendsto u z ht).exists
have he := congrFun hn (e n)
simp [u, z] at he
theorem exists_isClosedEmbedding
TopologyByExample.DiscreteNaturalsPower.exists_isClosedEmbedding
Enlarging the index set gives a closed embedding by filling new coordinates with zero.
theorem exists_isClosedEmbedding {κ : Type*} (e : ι ↪ κ) :
∃ s : (ι → ℕ) → (κ → ℕ), IsClosedEmbedding s
Proof
:= by
classical
let r : (κ → ℕ) → (ι → ℕ) := fun f a ↦ f (e a)
let s : (ι → ℕ) → (κ → ℕ) := fun f i ↦ if h : ∃ a, e a = i then f h.choose else 0
have hs : Continuous s := by
apply continuous_pi
intro i
dsimp [s]
split_ifs
· exact continuous_apply _
· exact continuous_const
have hr : Continuous r := continuous_pi fun a ↦ continuous_apply (e a)
have hrs : Function.LeftInverse r s := by
intro f
funext a
have he : ∃ b, e b = e a := ⟨a, rfl⟩
simp only [r, s, dite_eq_left he]
exact congrArg f (e.injective he.choose_spec)
exact ⟨s, hrs.isClosedEmbedding hr hs⟩