Lean library · module TopologyByExample.Spaces.MisraAllPairs
Iterated all-pairs attachment of Misra's E₀
This is the explicit all-pairs alternative, not the sparse attachment pattern printed in Misra's Example 5.3.
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.
definition Stage
TopologyByExample.MisraAllPairs.Stage
Start with E₀ and attach a fresh E₀ along every ordered pair at each subsequent stage.
def Stage : ℕ → Type
| 0 => MisraE0
| n + 1 => Space (allPairs (X := Stage n))
definition stageTopology
TopologyByExample.MisraAllPairs.stageTopology
The successive quotient topologies.
@[instance_reducible] def stageTopology : (n : ℕ) → TopologicalSpace (Stage n)
instance
instance (n : ℕ) : TopologicalSpace (Stage n)
Proof
:= stageTopology n
definition step
TopologyByExample.MisraAllPairs.step
The closed embedding of one stage into the next.
def step (n : ℕ) : Stage n → Stage (n + 1)
:= base allPairs
theorem isClosedEmbedding_step
TopologyByExample.MisraAllPairs.isClosedEmbedding_step
Each bonding map is a closed embedding.
theorem isClosedEmbedding_step (n : ℕ) : IsClosedEmbedding (step n)
Proof
:=
isClosedEmbedding_base allPairs
instance
instance (n : ℕ) : T2Space (Stage n)
instance
instance (n : ℕ) : PSpace (Stage n)
inductive type Rel
TopologyByExample.MisraAllPairs.Rel
The relation identifying each point with its image in the next stage.
inductive Rel : (Σ n, Stage n) → (Σ n, Stage n) → Prop
| next (n : ℕ) (x : Stage n) : Rel ⟨n, x⟩ ⟨n + 1, step n x⟩
definition Limit
TopologyByExample.MisraAllPairs.Limit
The countable direct limit with its quotient topology.
def Limit
:= Quot Rel
On this site: Space: The all-pairs Misra limit
instance
instance : TopologicalSpace Limit
Proof
:= inferInstanceAs (TopologicalSpace (Quot Rel))
instance
instance : PSpace Limit
Proof
:= PSpace.of_isQuotientMap (isQuotientMap_quot_mk (r := Rel))
definition toLimit
TopologyByExample.MisraAllPairs.toLimit
The canonical map from a finite stage to the limit.
def toLimit (n : ℕ) (x : Stage n) : Limit
:= Quot.mk _ ⟨n, x⟩
theorem continuous_toLimit
TopologyByExample.MisraAllPairs.continuous_toLimit
Each canonical map to the limit is continuous.
theorem continuous_toLimit (n : ℕ) : Continuous (toLimit n)
Proof
:=
continuous_quot_mk.comp continuous_sigmaMk
theorem toLimit_step
TopologyByExample.MisraAllPairs.toLimit_step
The canonical maps agree along the bonding maps.
theorem toLimit_step (n : ℕ) (x : Stage n) :
toLimit n x = toLimit (n + 1) (step n x)
Proof
:= Quot.sound (Rel.next n x)
theorem apply_step_eq
TopologyByExample.MisraAllPairs.apply_step_eq
A continuous map on the next stage is constant on the preceding stage.
theorem apply_step_eq {Y : Type*} [TopologicalSpace Y] [FirstCountableTopology Y] [T1Space Y]
(n : ℕ) {f : Stage (n + 1) → Y} (hf : Continuous f) (x y : Stage n) :
f (step n x) = f (step n y)
Proof
:= apply_base_eq_allPairs hf x y
definition point
TopologyByExample.MisraAllPairs.point
A compatible distinguished point in every finite stage.
def point : (n : ℕ) → Stage n
| 0 => MisraE0.apex false
| n + 1 => step n (point n)
instance
instance : Nonempty Limit
theorem toLimit_point
TopologyByExample.MisraAllPairs.toLimit_point
All distinguished points have the same image in the limit.
theorem toLimit_point (n : ℕ) : toLimit n (point n) = toLimit 0 (point 0)
Proof
:= by
induction n with
| zero => rfl
| succ n ih => exact (toLimit_step n (point n)).symm.trans ih
theorem apply_toLimit_eq
TopologyByExample.MisraAllPairs.apply_toLimit_eq
Continuous maps from the limit to first-countable T₁ spaces are constant on each stage.
theorem apply_toLimit_eq {Y : Type*} [TopologicalSpace Y] [FirstCountableTopology Y]
[T1Space Y] {f : Limit → Y} (hf : Continuous f) (n : ℕ) (x y : Stage n) :
f (toLimit n x) = f (toLimit n y)
Proof
:= by
rw [toLimit_step n x, toLimit_step n y]
exact apply_step_eq n (hf.comp (continuous_toLimit (n + 1))) x y
theorem apply_eq
TopologyByExample.MisraAllPairs.apply_eq
Every continuous map from the limit to a first-countable T₁ space is constant.
theorem apply_eq {Y : Type*} [TopologicalSpace Y] [FirstCountableTopology Y]
[T1Space Y] {f : Limit → Y} (hf : Continuous f) (x y : Limit) : f x = f y
Proof
:= by
have hp : ∀ z : Limit, f z = f (toLimit 0 (point 0)) := by
intro z
induction z using Quot.inductionOn with
| h p =>
rcases p with ⟨n, z⟩
exact (apply_toLimit_eq hf n z (point n)).trans (congrArg f (toLimit_point n))
exact (hp x).trans (hp y).symm
instance
instance : StronglyConnectedSpace Limit
Proof
where
apply_eq_apply f x y := apply_eq f.continuous x y
instance
instance : ConnectedSpace Limit
Proof
where
toNonempty := inferInstance
toPreconnectedSpace := inferInstance
definition collapseToZero
TopologyByExample.MisraAllPairs.collapseToZero
A set-theoretic map back to the initial stage, with all fresh points sent to its apex.
def collapseToZero : (n : ℕ) → Stage n → Stage 0
| 0 => id
| n + 1 => fun x ↦ (oldLabel allPairs x).elim (point 0) (collapseToZero n)
theorem collapseToZero_step
TopologyByExample.MisraAllPairs.collapseToZero_step
The set-theoretic collapse agrees along each bonding map.
theorem collapseToZero_step (n : ℕ) (x : Stage n) :
collapseToZero (n + 1) (step n x) = collapseToZero n x
Proof
:= rfl
definition retractZero
TopologyByExample.MisraAllPairs.retractZero
The compatible collapse descends to a set-theoretic retraction of the limit.
def retractZero : Limit → Stage 0
Definition
:=
Quot.lift (fun p : Σ n, Stage n ↦ collapseToZero p.1 p.2) (by
intro a b h
cases h
rfl)
theorem toLimit_zero_injective
TopologyByExample.MisraAllPairs.toLimit_zero_injective
The initial stage is not collapsed by the direct-limit equivalence relation.
theorem toLimit_zero_injective : Function.Injective (toLimit 0)
Proof
:= by
intro x y h
exact congrArg retractZero h
instance
instance : Nontrivial Limit
Proof
:= by
refine ⟨⟨toLimit 0 (MisraE0.apex false), toLimit 0 (MisraE0.apex true), ?_⟩⟩
intro h
have h' := toLimit_zero_injective h
cases h'