Lean library · module TopologyByExample.Slices.S6.Complete

The connectedness study, unconditionally

Source file

The companion file proves the decision algorithm of the connectedness study (S6) correct and complete for any base library S6.BaseSpaces. This file supplies the eight base spaces that structure leaves as fields, from the space files, and so states both results with no hypotheses.

The base library is S6.baseSpaces: the one-point space Unit, the discrete natural numbers ℕ, the rationals ℚ, the unit interval unitInterval and the two-point indiscrete space WithTopology Bool ⊤ (the structure's defaults), Mysior's space TopologyByExample.Mysior, the countable Hausdorff space TopologyByExample.NonUrysohn that is not Urysohn, the convergent sequence with two limits TopologyByExample.TwoLimitSequence, the lexicographic square TopologyByExample.LexicographicSquare, the comb TopologyByExample.CombSpace, the cone over the lexicographic square TopologyByExample.ConeLexicographicSquare, the Sierpiński space Prop and the cofinite topology CofiniteTopology ℝ.

Main statements

  • S6.solve_correct_library: correctness. On every row of the study, the algorithm S6.data.solve either cites one of the thirteen clauses that the row violates, and no topological space (in any universe) realises the row, or returns a product of base spaces that realises the row.
  • S6.exists_topCat_realises_iff_consistent: completeness. In every universe, a row of the study is realised by some topological space if and only if it satisfies the thirteen clauses.
  • S6.ncard_setOf_realisable: exactly 41 of the 1024 rows are realised by a space.

The file ends with a worked refutation by a chain and three worked witnesses: products of four, of two and of three base spaces.

This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

theorem realises_mysior

TopologyByExample.Slices.S6.realises_mysior

Mysior's space realises the row 0000110111: it is totally separated, but not zero-dimensional.

theorem realises_mysior : Realises (TopCat.of Mysior) (data.baseRow 3)
Proof
:=
  realises_mysiorSpace (X := Mysior) Mysior.not_zeroDimensionalSpace

theorem realises_nonUrysohn

TopologyByExample.Slices.S6.realises_nonUrysohn

The countable non-Urysohn space realises the row 0000100111: it is Hausdorff and totally disconnected, and it is not totally separated, since totally separated spaces are Urysohn.

theorem realises_nonUrysohn : Realises (TopCat.of NonUrysohn) (data.baseRow 4)
Proof
:=
  realises_nonUrysohnSpace (X := NonUrysohn) fun _ ↦ NonUrysohn.not_t25Space inferInstance

theorem realises_twoLimitSequence_space

TopologyByExample.Slices.S6.realises_twoLimitSequence_space

The convergent sequence with two limits realises the row 0000100110: it is totally disconnected, but not Hausdorff.

theorem realises_twoLimitSequence_space :
    Realises (TopCat.of TwoLimitSequence) (data.baseRow 5)
Proof
:=
  realises_twoLimitSequence (X := TwoLimitSequence) TwoLimitSequence.not_t2Space

theorem realises_lexicographicSquare_space

TopologyByExample.Slices.S6.realises_lexicographicSquare_space

The lexicographic square realises the row 1010000111: it is a connected, locally connected Hausdorff space whose path components are its vertical fibres.

theorem realises_lexicographicSquare_space :
    Realises (TopCat.of LexicographicSquare) (data.baseRow 6)
Proof
:=
  realises_lexicographicSquare (X := LexicographicSquare)
    LexicographicSquare.not_pathPreconnectedSpace

theorem realises_comb

TopologyByExample.Slices.S6.realises_comb

The comb realises the row 1100000111: it is a path connected subspace of the plane, but not locally connected.

theorem realises_comb : Realises (TopCat.of CombSpace) (data.baseRow 7)
Proof
:=
  realises_combSpace (X := CombSpace) CombSpace.not_locallyConnectedSpace

theorem realises_cone

TopologyByExample.Slices.S6.realises_cone

The cone over the lexicographic square realises the row 1110000111: it is path connected, locally connected and Hausdorff, but not locally path connected.

theorem realises_cone : Realises (TopCat.of ConeLexicographicSquare) (data.baseRow 8)
Proof
:=
  realises_coneLexicographicSquare (X := ConeLexicographicSquare)
    ConeLexicographicSquare.not_locallyPathConnectedSpace

theorem realises_prop

TopologyByExample.Slices.S6.realises_prop

The Sierpiński space Prop realises the row 1111000100: its closed point lies in every nonempty open set, so it is path connected and locally path connected; it is T₀, but not T₁.

theorem realises_prop : Realises (TopCat.of Prop) (data.baseRow 9)
Proof
:=
  have := Sierpinski.pathPreconnectedSpace
  have := Sierpinski.locallyPathConnectedSpace
  realises_sierpinskiSpace (X := Prop) Sierpinski.not_t1Space

theorem realises_cofiniteTopology_real

TopologyByExample.Slices.S6.realises_cofiniteTopology_real

The cofinite topology on ℝ realises the row 1111000110: it is connected, locally path connected and T₁, but not Hausdorff.

theorem realises_cofiniteTopology_real :
    Realises (TopCat.of (_root_.CofiniteTopology ℝ)) (data.baseRow 10)
Proof
:=
  have := CofiniteReal.locallyPathConnectedSpace
  realises_cofiniteReals (X := _root_.CofiniteTopology ℝ) CofiniteReal.not_t2Space

definition baseSpaces

TopologyByExample.Slices.S6.baseSpaces

The base library of the connectedness study, from the space files. The one-point space, the discrete natural numbers, the rationals, the unit interval and the two-point indiscrete space are the defaults of BaseSpaces.

def baseSpaces : BaseSpaces
Definition
where
  mysiorSpace := TopCat.of Mysior
  mysiorSpace_realises := realises_mysior
  nonUrysohnSpace := TopCat.of NonUrysohn
  nonUrysohnSpace_realises := realises_nonUrysohn
  twoLimitSequence := TopCat.of TwoLimitSequence
  twoLimitSequence_realises := realises_twoLimitSequence_space
  lexicographicSquare := TopCat.of LexicographicSquare
  lexicographicSquare_realises := realises_lexicographicSquare_space
  combSpace := TopCat.of CombSpace
  combSpace_realises := realises_comb
  coneLexicographicSquare := TopCat.of ConeLexicographicSquare
  coneLexicographicSquare_realises := realises_cone
  sierpinskiSpace := TopCat.of Prop
  sierpinskiSpace_realises := realises_prop
  cofiniteReals := TopCat.of (_root_.CofiniteTopology ℝ)
  cofiniteReals_realises := realises_cofiniteTopology_real

definition library

TopologyByExample.Slices.S6.library

The base library of the connectedness study as a SliceData.Library.

abbrev library : data.Library prop.{0}
:= baseSpaces.library

theorem nonempty_library

TopologyByExample.Slices.S6.nonempty_library

Every space of the base library is nonempty.

theorem nonempty_library (b : Fin 13) : Nonempty (library.space b)
Proof
:=
  baseSpaces.nonempty_library b

theorem solve_correct_library

TopologyByExample.Slices.S6.solve_correct_library

Correctness of the algorithm of the connectedness study, unconditionally. On every row r, the algorithm either returns a clause of the study that r violates, and no topological space in any universe realises r, or returns an expression whose space, read as a product of base spaces, realises r.

theorem solve_correct_library (r : Row 10) :
    (data.solve r).CorrectBy .prod data prop library.space r
Proof
:=
  solve_correct baseSpaces r

On this site: The correctness of the decision procedure for Connectedness and disconnectedness

theorem exists_topCat_realises_iff_consistent

TopologyByExample.Slices.S6.exists_topCat_realises_iff_consistent

Completeness of the connectedness study, unconditionally and in every universe. A row is realised by some topological space if and only if it satisfies the thirteen implications:

  • path connected ⇒ connected; locally path connected ⇒ locally connected;
  • totally separated ⇒ totally disconnected; totally disconnected ⇒ T₁; totally separated ⇒ Hausdorff; Hausdorff ⇒ T₁; T₁ ⇒ T₀;
  • connected and locally path connected ⇒ path connected;
  • connected and totally disconnected ⇒ locally connected;
  • locally connected and totally disconnected ⇒ zero-dimensional;
  • zero-dimensional and T₀ ⇒ totally separated;
  • connected and zero-dimensional ⇒ locally path connected;
  • locally connected and zero-dimensional ⇒ locally path connected.
theorem exists_topCat_realises_iff_consistent (r : Row 10) :
    (∃ X : TopCat.{u}, Realises X r) ↔ data.Consistent r
Proof
:=
  exists_realises_iff_consistent baseSpaces r

On this site: The completeness of the decision procedure for Connectedness and disconnectedness

theorem ncard_setOf_realisable

TopologyByExample.Slices.S6.ncard_setOf_realisable

Exactly 41 of the 1024 combinations of the ten connectedness properties are realised by a topological space (in any universe).

theorem ncard_setOf_realisable : {r : Row 10 | ∃ X : TopCat.{u}, Realises X r}.ncard = 41
Proof
:= by
  have : {r : Row 10 | ∃ X : TopCat.{u}, Realises X r} =
      ↑(Finset.univ.filter fun r : Row 10 ↦ data.Consistent r) := by
    ext r
    simp [exists_topCat_realises_iff_consistent]
  rw [this, Set.ncard_coe_finset]
  decide +kernel

On this site: The number of combinations of Connectedness and disconnectedness that occur

Worked examples

check

A refuted row: connected and zero-dimensional, but none of the other eight properties. The algorithm cites the clause "connected and zero-dimensional ⇒ locally path connected" (the chain through indiscreteness: a connected space with a base of clopen sets is indiscrete).

example : data.solve ![true, false, false, false, false, false, true, false, false, false] =
    .refuted ⟨[0, 6], some 3⟩
Proof
:= by
  decide +kernel

check

So no space, in any universe, realises that row.

example (X : Type u) [TopologicalSpace X] :
    ¬Realises X ![true, false, false, false, false, false, true, false, false, false]
Proof
:=
  not_realises_of_solve_eq_refuted (c := ⟨[0, 6], some 3⟩) (by decide +kernel) X

check

A witnessed row: connected and Hausdorff (so T₀ and T₁), and none of the other properties. The base spaces above it are the lexicographic square, the comb, the cone over the lexicographic square and the unit interval, and the algorithm returns their product.

example : data.solve ![true, false, false, false, false, false, false, true, true, true] =
    .witness ((((Expr.base 6).node (.base 7)).node (.base 8)).node (.base 11))
Proof
:= by
  decide +kernel

check

So that product has the row.

example : Realises
    (((LexicographicSquare × CombSpace) × ConeLexicographicSquare) × unitInterval)
    ![true, false, false, false, false, false, false, true, true, true]
Proof
:=
  data.realises_of_solve_eq_witness_prod prodConjunctive library nonempty_library covers
    (e := (((Expr.base 6).node (.base 7)).node (.base 8)).node (.base 11)) (by decide +kernel)

check

The first two factors suffice: the product of the lexicographic square and the comb is connected, but neither path connected nor locally connected, and it is Hausdorff.

example : Realises (LexicographicSquare × CombSpace)
    ![true, false, false, false, false, false, false, true, true, true]
Proof
:= by
  have h := Expr.realises_evalBy_prod prodConjunctive nonempty_library library.realises
    ((Expr.base 6).node (.base 7))
  have hr : ((Expr.base 6).node (.base 7)).row data.baseRow =
      ![true, false, false, false, false, false, false, true, true, true] := by
    decide +kernel
  rw [hr] at h
  exact h

check

A witnessed row: zero-dimensional, and none of the other nine properties. The base spaces above it are the discrete natural numbers, the rationals and the two-point indiscrete space, and the algorithm returns their product.

example : data.solve ![false, false, false, false, false, false, true, false, false, false] =
    .witness (((Expr.base 1).node (.base 2)).node (.base 12))
Proof
:= by
  decide +kernel

check

So the product of the discrete natural numbers, the rationals and the two-point indiscrete space is zero-dimensional, and neither connected, path connected, locally connected, locally path connected, totally disconnected, totally separated, T₀, T₁ nor Hausdorff.

example : Realises ((ℕ × ℚ) × WithTopology Bool ⊤)
    ![false, false, false, false, false, false, true, false, false, false]
Proof
:=
  data.realises_of_solve_eq_witness_prod prodConjunctive library nonempty_library covers
    (e := ((Expr.base 1).node (.base 2)).node (.base 12)) (by decide +kernel)