Lean library · module TopologyByExample.Spaces.FiniteSupportOrdinalPower

The finite-support subspace of the countable power of the closed ordinal interval

Source file

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.

Imports

definition Coord

TopologyByExample.FiniteSupportOrdinalPower.Coord

The closed interval of ordinals from zero to the first uncountable ordinal.

abbrev Coord
:= OnePoint OmegaOne

definition base

TopologyByExample.FiniteSupportOrdinalPower.base

The distinguished coordinate value is the least ordinal.

noncomputable def base : Coord
:= ((⊥ : OmegaOne) : Coord)

definition Space

TopologyByExample.FiniteSupportOrdinalPower.Space

Sequences eventually equal to the ordinal zero, with the subspace topology.

def Space
:= {x : ℕ → Coord // ∃ n, ∀ i ≥ n, x i = base}

On this site: Space: Finite-support power of the closed ordinal interval

instance

instance : TopologicalSpace Space
Proof
:= inferInstanceAs (TopologicalSpace (Subtype _))

theorem eventually_base_iff_finite

TopologyByExample.FiniteSupportOrdinalPower.eventually_base_iff_finite

A sequence is eventually zero exactly when its nonzero support is finite.

theorem eventually_base_iff_finite (x : ℕ → Coord) :
    (∃ n, ∀ i ≥ n, x i = base) ↔ {i | x i ≠ base}.Finite
Proof
:= by
  constructor
  · rintro ⟨n, hn⟩
    exact (finite_Iio n).subset fun i hi ↦ lt_of_not_ge fun h ↦ hi (hn i h)
  · intro h
    obtain ⟨b, hb⟩ := h.bddAbove
    exact ⟨b + 1, fun i hi ↦ by
      by_contra hne
      exact (Nat.lt_of_succ_le hi).not_ge (hb (show i ∈ {j | x j ≠ base} from hne))⟩

definition ev

TopologyByExample.FiniteSupportOrdinalPower.ev

Evaluation at a coordinate.

def ev (i : ℕ) (x : Space) : Coord
:= x.val i

theorem continuous_ev

TopologyByExample.FiniteSupportOrdinalPower.continuous_ev

Evaluation is continuous.

theorem continuous_ev (i : ℕ) : Continuous (ev i)
Proof
:=
  (continuous_apply i).comp continuous_subtypeVal

definition pad

TopologyByExample.FiniteSupportOrdinalPower.pad

A tuple supported on the first n coordinates.

noncomputable def pad (n : ℕ) (v : Fin n → Coord) : Space
:=
  ⟨fun i ↦ if h : i < n then v ⟨i, h⟩ else base,
    n, fun _ hi ↦ dite_eq_right (Nat.not_lt.mpr hi)⟩

theorem continuous_pad

TopologyByExample.FiniteSupportOrdinalPower.continuous_pad

Padding finite tuples by zeros is continuous.

theorem continuous_pad (n : ℕ) : Continuous (pad n)
Proof
:= by
  apply Continuous.subtype_mk
  apply continuous_pi
  intro i
  by_cases h : i < n
  · simpa only [h, ↓reduceDIte] using continuous_apply (A := fun _ : Fin n ↦ Coord) ⟨i, h⟩
  · simp only [h, ↓reduceDIte]
    exact continuous_const

definition stage

TopologyByExample.FiniteSupportOrdinalPower.stage

The compact stage of points supported below n.

noncomputable def stage (n : ℕ) : Set Space
:= range (pad n)

theorem mem_stage

TopologyByExample.FiniteSupportOrdinalPower.mem_stage

Membership in a finite stage is equivalent to vanishing on the tail.

theorem mem_stage {x : Space} {n : ℕ} : x ∈ stage n ↔ ∀ i ≥ n, ev i x = base
Proof
:= by
  constructor
  · rintro ⟨v, rfl⟩ i hi
    exact dite_eq_right (Nat.not_lt.mpr hi)
  · intro h
    refine ⟨fun i ↦ ev i x, Subtype.ext (funext fun i ↦ ?_)⟩
    change (if _ : i < n then _ else _) = _
    split_ifs with hi
    · rfl
    · exact (h i (Nat.le_of_not_lt hi)).symm

theorem isCompact_stage

TopologyByExample.FiniteSupportOrdinalPower.isCompact_stage

Each finite stage is compact.

theorem isCompact_stage (n : ℕ) : IsCompact (stage n)
Proof
:= isCompact_range (continuous_pad n)

theorem iUnion_stage

TopologyByExample.FiniteSupportOrdinalPower.iUnion_stage

The stages exhaust the finite-support space.

theorem iUnion_stage : ⋃ n, stage n = univ
Proof
:= by
  apply eq_univ_of_forall
  intro x
  obtain ⟨n, hn⟩ := x.property
  exact mem_iUnion.mpr ⟨n, mem_stage.mpr hn⟩

instance

instance : SigmaCompactSpace Space
Proof
:= ⟨stage, isCompact_stage, iUnion_stage⟩

instance

instance : T2Space Space
Proof
:= inferInstanceAs (T2Space (Subtype _))

instance

instance : ZeroDimensionalSpace Space
Proof
:=
  zeroDimensionalSpace_of_isInducing (f := (Subtype.val : Space → ℕ → Coord))
    ⟨rfl⟩

definition axis

TopologyByExample.FiniteSupportOrdinalPower.axis

A single varying coordinate, the rest zero.

noncomputable def axis (a : Coord) : Space
:= pad 1 (fun _ ↦ a)

theorem ev_axis

TopologyByExample.FiniteSupportOrdinalPower.ev_axis

The first coordinate recovers an axis point.

theorem ev_axis (a : Coord) : ev 0 (axis a) = a
Proof
:= rfl

theorem continuous_axis

TopologyByExample.FiniteSupportOrdinalPower.continuous_axis

The axis map is continuous.

theorem continuous_axis : Continuous axis
Proof
:=
  (continuous_pad 1).comp (continuous_pi fun _ ↦ continuous_id)

theorem leftInverse_axis

TopologyByExample.FiniteSupportOrdinalPower.leftInverse_axis

The first coordinate exhibits the axis as a retract.

theorem leftInverse_axis : Function.LeftInverse (ev 0) axis
Proof
:= ev_axis

instance

instance : Nontrivial Space
Proof
:= leftInverse_axis.injective.nontrivial

theorem not_sequentialSpace

TopologyByExample.FiniteSupportOrdinalPower.not_sequentialSpace

A continuous retract of the finite-support space fails sequentiality.

theorem not_sequentialSpace : ¬ SequentialSpace Space
Proof
:= by
  intro _
  have hq : IsQuotientMap (ev 0) := by
    refine ⟨isCoinducing_iff.mpr fun U ↦ ⟨fun h ↦ ?_, fun h ↦ h.preimage (continuous_ev 0)⟩,
      leftInverse_axis.surjective⟩
    exact h.preimage continuous_axis
  exact OmegaOnePlusOne.not_sequentialSpace hq.sequentialSpace

On this site: The finite-support power of the closed ordinal interval is not sequential

theorem not_countableChainCondition

TopologyByExample.FiniteSupportOrdinalPower.not_countableChainCondition

The first coordinate maps onto a space which violates the countable chain condition.

theorem not_countableChainCondition :
    ¬ ∀ O : Set (Set Space), (∀ U ∈ O, IsOpen U ∧ U.Nonempty) →
      O.PairwiseDisjoint id → O.Countable
Proof
:= by
  intro h
  exact OmegaOne.not_countableChainCondition (ccc_of_isOpenEmbedding OnePoint.isOpenEmbedding_coe
    (ccc_of_continuous_surjective (continuous_ev 0) leftInverse_axis.surjective h))

On this site: The finite-support power of the closed ordinal interval does not satisfy the countable chain condition

definition twoAxes

TopologyByExample.FiniteSupportOrdinalPower.twoAxes

The product of the first two ordinal coordinates, with all other entries zero.

noncomputable def twoAxes (p : Coord × Coord) : Space
:=
  pad 2 (fun i ↦ if i.val = 0 then p.1 else p.2)

theorem continuous_twoAxes

TopologyByExample.FiniteSupportOrdinalPower.continuous_twoAxes

private theorem continuous_twoAxes : Continuous twoAxes
Proof
:= by
  apply (continuous_pad 2).comp (continuous_pi fun i ↦ ?_)
  by_cases h : i.val = 0 <;> simp only [h, ↓reduceIte]
  · exact continuous_fst
  · exact continuous_snd

theorem embedding_twoAxes

TopologyByExample.FiniteSupportOrdinalPower.embedding_twoAxes

private theorem embedding_twoAxes : IsEmbedding twoAxes
Proof
:=
  (show Function.LeftInverse (fun x ↦ (ev 0 x, ev 1 x)) twoAxes from fun _ ↦ rfl).isEmbedding
    ((continuous_ev 0).prodMk (continuous_ev 1)) continuous_twoAxes

theorem not_completelyNormalSpace

TopologyByExample.FiniteSupportOrdinalPower.not_completelyNormalSpace

The first two coordinates contain the nonnormal product of the open and closed ordinal rays.

theorem not_completelyNormalSpace : ¬ CompletelyNormalSpace Space
Proof
:= by
  intro _
  let h := embedding_twoAxes.comp (OnePoint.isOpenEmbedding_coe.isEmbedding.prodMap
    (IsEmbedding.id (X := Coord)))
  let _ := h.isInducing.completelyNormalSpace
  exact OmegaOneTimesSuccessor.not_normalSpace inferInstance

On this site: The finite-support power of the closed ordinal interval is not completely normal

definition perturb

TopologyByExample.FiniteSupportOrdinalPower.perturb

Modify a single coordinate to the greatest ordinal.

noncomputable def perturb (x : Space) (n : ℕ) : Space
Definition
:=
  ⟨Function.update x.val n ∞, by
    obtain ⟨k, hk⟩ := x.property
    refine ⟨max k (n + 1), fun i hi ↦ ?_⟩
    rw [Function.update_of_ne (by omega : i ≠ n)]
    exact hk i (by omega)⟩

theorem tendsto_perturb

TopologyByExample.FiniteSupportOrdinalPower.tendsto_perturb

Moving the modified coordinate towards infinity gives convergence in the product topology.

theorem tendsto_perturb (x : Space) : Tendsto (perturb x) atTop (𝓝 x)
Proof
:= by
  apply tendsto_subtype_rng.mpr
  apply tendsto_pi_nhds.mpr
  intro i
  apply tendsto_const_nhds.congr'
  filter_upwards [eventually_gt_atTop i] with n hn
  exact (Function.update_of_ne hn.ne _ _).symm

theorem nowhereDense_stage

TopologyByExample.FiniteSupportOrdinalPower.nowhereDense_stage

The finite stages have empty interior.

theorem nowhereDense_stage (n : ℕ) : IsNowhereDense (stage n)
Proof
:= by
  rw [IsNowhereDense, (isCompact_stage n).isClosed.closure_eq]
  apply eq_empty_iff_forall_notMem.mpr
  intro x hx
  have he : ∀ᶠ i in atTop, perturb x i ∈ stage n :=
    (tendsto_perturb x) (mem_interior_iff_mem_nhds.mp hx)
  obtain ⟨i, hi, hi'⟩ := (he.and (eventually_ge_atTop n)).exists
  have h := mem_stage.mp hi i hi'
  simp [ev, perturb, base] at h

theorem isMeagre_univ

TopologyByExample.FiniteSupportOrdinalPower.isMeagre_univ

The finite-support space is meagre in itself.

theorem isMeagre_univ : IsMeagre (univ : Set Space)
Proof
:= by
  rw [← iUnion_stage]
  exact isMeagre_iUnion (fun n ↦ (nowhereDense_stage n).isMeagre)

On this site: The finite-support power of the closed ordinal interval is not of second category

theorem not_sequentiallyDiscreteSpace

TopologyByExample.FiniteSupportOrdinalPower.not_sequentiallyDiscreteSpace

A sequence of single-coordinate perturbations witnesses failure of sequential discreteness.

theorem not_sequentiallyDiscreteSpace : ¬ SequentiallyDiscreteSpace Space
Proof
:= by
  intro h
  let x := axis base
  obtain ⟨n, hn⟩ := (h.eventually_eq_of_tendsto _ _ (tendsto_perturb x)).exists
  have he := congrArg (ev n) hn
  simp [ev, perturb, x, axis, pad, base] at he

On this site: The finite-support power of the closed ordinal interval is not sequentially discrete

theorem isOpen_base

TopologyByExample.FiniteSupportOrdinalPower.isOpen_base

private theorem isOpen_base : IsOpen ({base} : Set Coord)
Proof
:= by
  simpa only [base, image_singleton] using
    OnePoint.isOpen_image_coe.mpr (SuccOrder.isOpen_singleton_bot (α := OmegaOne))

theorem exists_zero

TopologyByExample.FiniteSupportOrdinalPower.exists_zero

Every finite-support sequence has a zero coordinate.

theorem exists_zero (x : Space) : ∃ i, ev i x = base
Proof
:= by
  obtain ⟨n, hn⟩ := x.property
  exact ⟨n, hn n le_rfl⟩

definition firstZero

TopologyByExample.FiniteSupportOrdinalPower.firstZero

The first coordinate at which a finite-support sequence is zero.

noncomputable def firstZero (x : Space) : ℕ
:= by
  classical
  exact Nat.find (exists_zero x)

theorem firstZero_eq

TopologyByExample.FiniteSupportOrdinalPower.firstZero_eq

private theorem firstZero_eq (x : Space) (m : ℕ) :
    firstZero x = m ↔ ev m x = base ∧ ∀ i < m, ev i x ≠ base
Proof
:= by
  classical
  exact Nat.find_eq_iff (exists_zero x)

theorem continuous_firstZero

TopologyByExample.FiniteSupportOrdinalPower.continuous_firstZero

The first-zero index varies continuously, since zero is clopen.

theorem continuous_firstZero : Continuous firstZero
Proof
:= by
  apply continuous_discrete_rng.mpr
  intro m
  have he : firstZero ⁻¹' {m} =
      ev m ⁻¹' {base} ∩ ⋂ i ∈ Finset.range m, (ev i ⁻¹' {base})ᶜ := by
    ext x
    simp [firstZero_eq, mem_preimage]
  rw [he]
  exact (isOpen_base.preimage (continuous_ev m)).inter
    (isOpen_biInter_finset fun i _ ↦ (isClosed_singleton.preimage (continuous_ev i)).isOpen_compl)

theorem surjective_firstZero

TopologyByExample.FiniteSupportOrdinalPower.surjective_firstZero

Every natural number is the first zero of a suitable finite-support sequence.

theorem surjective_firstZero : Function.Surjective firstZero
Proof
:= by
  intro m
  refine ⟨pad m (fun _ ↦ ∞), (firstZero_eq _ _).mpr ⟨?_, ?_⟩⟩
  · simp [ev, pad]
  · intro i hi
    simp [ev, pad, hi, base]

theorem continuous_surjective_firstZero

TopologyByExample.FiniteSupportOrdinalPower.continuous_surjective_firstZero

The first-zero map is a continuous surjection onto the discrete natural numbers.

theorem continuous_surjective_firstZero : Continuous firstZero ∧ Function.Surjective firstZero
Proof
:=
  ⟨continuous_firstZero, surjective_firstZero⟩

On this site: Finite-support power of the closed ordinal interval: The first zero coordinate

theorem not_submetrizableSpace

TopologyByExample.FiniteSupportOrdinalPower.not_submetrizableSpace

A coarser metrizable topology would embed the nonmetrizable compact ordinal axis.

theorem not_submetrizableSpace : ¬ SubmetrizableSpace Space
Proof
:= by
  rintro ⟨t, ht, hm⟩
  have hcts : @Continuous Coord Space _ t axis :=
    ⟨fun U hU ↦ @Continuous.isOpen_preimage Coord Space _ instTopologicalSpaceSpace axis
      continuous_axis U (ht U hU)⟩
  let _ : TopologicalSpace Space := t
  let _ : MetrizableSpace Space := hm
  let _ := (hcts.isClosedEmbedding leftInverse_axis.injective).isEmbedding.metrizableSpace
  exact OmegaOnePlusOne.not_firstCountableTopology inferInstance

On this site: The finite-support power of the closed ordinal interval is not submetrizable

theorem cardinality

TopologyByExample.FiniteSupportOrdinalPower.cardinality

The space has cardinality aleph one.

theorem cardinality : #Space = aleph 1
Proof
:= by
  have hc : #Coord = aleph 1 := by
    change #(Option OmegaOne) = _
    rw [mk_option, OrdinalCardinalities.omegaOne,
      add_eq_left (aleph0_le_aleph _) (one_le_aleph0.trans (aleph0_le_aleph _))]
  rw [← hc]
  apply le_antisymm _ (mk_le_of_injective leftInverse_axis.injective)
  let f (l : List Coord) := pad l.length l.get
  have hs : Function.Surjective f := by
    intro x
    obtain ⟨n, hn⟩ := x.property
    refine ⟨List.ofFn (fun i : Fin n ↦ ev i x), Subtype.ext (funext fun i ↦ ?_)⟩
    by_cases hi : i < n
    · simp [f, pad, List.get_eq_getElem, hi, ev]
    · simp [f, pad, hi, hn i (Nat.le_of_not_lt hi)]
  exact (mk_le_of_surjective hs).trans_eq (mk_list_eq_mk Coord)

On this site: Finite-support power of the closed ordinal interval: Cardinality