Lean library · module TopologyByExample.Spaces.UnitInterval
The unit interval
Mathlib's unitInterval is the closed interval [0, 1] of the real line, with the subspace
topology. It is a compact metric space. It is convex, so any two of its points are joined by the
straight path between them, and the same holds inside each small ball about a point: the space is
path connected and locally path connected, hence connected and locally connected. Being connected
and having two points, it is not totally disconnected. It has as many points as the real line.
Every continuous map of the interval to itself has a fixed point (by the intermediate value theorem).
Main statements
TopologyByExample.UnitInterval.compactSpace,TopologyByExample.UnitInterval.metrizableSpace: the interval is compact and metrizable.TopologyByExample.UnitInterval.joined: any two points are joined by a path.TopologyByExample.UnitInterval.preconnectedSpace: the interval is connected.TopologyByExample.UnitInterval.locallyPathConnectedSpace: the interval is locally path connected.TopologyByExample.UnitInterval.not_totallyDisconnectedSpace: the interval is not totally disconnected.TopologyByExample.UnitInterval.infinite,TopologyByExample.UnitInterval.mk_eq_continuum: the interval is infinite, of the cardinality of the continuum.TopologyByExample.UnitInterval.not_countable_Ioo: every nonempty open interval of[0, 1]is uncountable.TopologyByExample.UnitInterval.exists_isFixedPt: every continuous self-map has a fixed point.
Tags
unit interval, compact, connected, path connected, locally path connected, fixed point
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 compactSpace
TopologyByExample.UnitInterval.compactSpace
The unit interval is compact.
theorem compactSpace : CompactSpace I
Proof
:= inferInstance
On this site: The unit interval is compact
theorem metrizableSpace
TopologyByExample.UnitInterval.metrizableSpace
The unit interval is metrizable.
theorem metrizableSpace : MetrizableSpace I
Proof
:= inferInstance
On this site: The unit interval is metrizable
theorem pathConnectedSpace
TopologyByExample.UnitInterval.pathConnectedSpace
The unit interval is path connected (in Mathlib's sense, which includes nonemptiness).
theorem pathConnectedSpace : PathConnectedSpace I
Proof
:=
isPathConnected_iff_pathConnectedSpace.1 <| by
simpa using Convex.isPathConnected (convex_Icc (0 : ℝ) 1) (nonempty_Icc.2 zero_le_one)
theorem joined
TopologyByExample.UnitInterval.joined
Any two points of the unit interval are joined by a path.
theorem joined (x y : I) : Joined x y
Proof
:= pathConnectedSpace.joined x y
theorem locallyPathConnectedSpace
TopologyByExample.UnitInterval.locallyPathConnectedSpace
The unit interval is locally path connected: it is a convex subset of ℝ.
theorem locallyPathConnectedSpace : LocallyPathConnectedSpace I
Proof
:=
(convex_Icc (0 : ℝ) 1).locallyPathConnectedSpace
theorem connectedSpace
TopologyByExample.UnitInterval.connectedSpace
The unit interval is connected.
theorem connectedSpace : ConnectedSpace I
Proof
:= inferInstance
theorem preconnectedSpace
TopologyByExample.UnitInterval.preconnectedSpace
The unit interval is preconnected (connected, in the sense that admits the empty space).
theorem preconnectedSpace : PreconnectedSpace I
Proof
:= inferInstance
theorem not_totallyDisconnectedSpace
TopologyByExample.UnitInterval.not_totallyDisconnectedSpace
The unit interval is not totally disconnected: it is connected and has two points.
theorem not_totallyDisconnectedSpace : ¬TotallyDisconnectedSpace I
Proof
:= fun _ ↦
not_subsingleton I subsingleton_of_preconnected_totallyDisconnected
theorem mk_eq_continuum
TopologyByExample.UnitInterval.mk_eq_continuum
The unit interval has the cardinality of the continuum.
theorem mk_eq_continuum : Cardinal.mk I = Cardinal.continuum
Proof
:= Cardinal.mk_unitInterval
theorem infinite
TopologyByExample.UnitInterval.infinite
The unit interval is infinite.
theorem infinite : Infinite I
Proof
:=
Cardinal.infinite_iff.2 (mk_eq_continuum ▸ Cardinal.aleph0_le_continuum)
On this site: The unit interval is not finite
theorem exists_isFixedPt
TopologyByExample.UnitInterval.exists_isFixedPt
Every continuous map of the unit interval to itself has a fixed point.
theorem exists_isFixedPt {f : I → I} (hf : Continuous f) : ∃ x, Function.IsFixedPt f x
Proof
:= by
obtain ⟨c, -, hc⟩ :=
exists_mem_Icc_isFixedPt hf.continuousOn (zero_le_one' I) (nonneg' (t := f 0))
(le_one' (t := f 1))
exact ⟨c, hc⟩
On this site: Unit interval: Every continuous self-map has a fixed point
theorem not_countable_Ioo
TopologyByExample.UnitInterval.not_countable_Ioo
A nonempty open interval of [0, 1] is uncountable.
theorem not_countable_Ioo {x y : unitInterval} (h : x < y) :
¬(Ioo x y).Countable
Proof
:= by
intro hc
have hsub : Ioo (x : ℝ) y ⊆ Subtype.val '' Ioo x y := fun r hr ↦
⟨⟨r, (unitInterval.nonneg x).trans hr.1.le, hr.2.le.trans (unitInterval.le_one y)⟩, hr, rfl⟩
have hcr := (hc.image Subtype.val).mono hsub
have := Cardinal.mk_Ioo_real (show (x : ℝ) < y from h)
rw [← Cardinal.le_aleph0_iff_set_countable] at hcr
exact (this ▸ hcr).not_gt Cardinal.aleph0_lt_continuum
On this site: Space: Unit interval