Lean library · module TopologyByExample.Spaces.HalfOpenInterval

The interval [0, 1)

Source file

The half-open interval [0, 1) of the real line, with the subspace topology. It is metrizable, σ-compact and weakly locally compact (indeed locally compact, being an open subset of the closed set [0, ∞)), not compact (it is not closed in ℝ), and, being convex, path connected and locally path connected.

Its own theory: it is homeomorphic to the closed half-line [0, ∞); its one-point compactification is the closed interval [0, 1]; it is homeomorphic neither to the real line (removing its end point leaves it connected, while removing any point disconnects the line) nor to [0, 1] (which is compact).

Main statements

Tags

half-open interval, locally compact, one-point compactification, homeomorphism

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

Values

theorem metrizableSpace

TopologyByExample.HalfOpenInterval.metrizableSpace

The interval [0, 1) is metrizable: it is a subspace of the real line.

theorem metrizableSpace : MetrizableSpace (Ico (0 : ℝ) 1)
Proof
:= inferInstance

On this site: The interval \([0, 1)\) is metrizable

theorem nonempty

TopologyByExample.HalfOpenInterval.nonempty

The interval [0, 1) is nonempty.

theorem nonempty : Nonempty (Ico (0 : ℝ) 1)
Proof
:= ⟨⟨0, le_rfl, zero_lt_one⟩⟩

theorem locallyCompactSpace

TopologyByExample.HalfOpenInterval.locallyCompactSpace

The interval [0, 1) is locally compact: it is the intersection of the closed set [0, ∞) and the open set (-∞, 1) of the real line.

theorem locallyCompactSpace : LocallyCompactSpace (Ico (0 : ℝ) 1)
Proof
:= by
  have : Ico (0 : ℝ) 1 = Ici 0 ∩ Iio 1 := Ici_inter_Iio.symm
  rw [this]
  exact (isClosed_Ici.isLocallyClosed.inter isOpen_Iio.isLocallyClosed).locallyCompactSpace

theorem sigmaLocallyCompact

TopologyByExample.HalfOpenInterval.sigmaLocallyCompact

The interval [0, 1) is σ-locally compact: σ-compact (the union of the intervals [0, 1 - 1/n]) and weakly locally compact.

theorem sigmaLocallyCompact :
    SigmaCompactSpace (Ico (0 : ℝ) 1) ∧ WeaklyLocallyCompactSpace (Ico (0 : ℝ) 1)
Proof
:= by
  have := locallyCompactSpace
  exact ⟨inferInstance, inferInstance⟩

On this site: The interval \([0, 1)\) is σ-locally compact

theorem not_compactSpace

TopologyByExample.HalfOpenInterval.not_compactSpace

The interval [0, 1) is not compact: a compact subset of ℝ is closed, and 1 lies in the closure of [0, 1).

theorem not_compactSpace : ¬CompactSpace (Ico (0 : ℝ) 1)
Proof
:= fun h ↦ by
  have hc : IsCompact (Ico (0 : ℝ) 1) := isCompact_iff_compactSpace.2 h
  have h1 : (1 : ℝ) ∈ closure (Ico (0 : ℝ) 1) := by
    rw [closure_Ico zero_ne_one]
    exact ⟨zero_le_one, le_rfl⟩
  rw [hc.isClosed.closure_eq] at h1
  exact lt_irrefl _ h1.2

On this site: The interval \([0, 1)\) is not compact

theorem pathConnectedSpace

TopologyByExample.HalfOpenInterval.pathConnectedSpace

The interval [0, 1) is path connected (in Mathlib's sense, which includes nonemptiness): it is convex.

theorem pathConnectedSpace : PathConnectedSpace (Ico (0 : ℝ) 1)
Proof
:=
  isPathConnected_iff_pathConnectedSpace.1 <|
    (convex_Ico (0 : ℝ) 1).isPathConnected ⟨0, le_rfl, zero_lt_one⟩

theorem pathPreconnectedSpace

TopologyByExample.HalfOpenInterval.pathPreconnectedSpace

Any two points of [0, 1) are joined by a path.

theorem pathPreconnectedSpace : PathPreconnectedSpace (Ico (0 : ℝ) 1)
Proof
:=
  have := pathConnectedSpace
  inferInstance

theorem locallyPathConnectedSpace

TopologyByExample.HalfOpenInterval.locallyPathConnectedSpace

The interval [0, 1) is locally path connected: it is a convex subset of ℝ.

theorem locallyPathConnectedSpace : LocallyPathConnectedSpace (Ico (0 : ℝ) 1)
Proof
:=
  (convex_Ico (0 : ℝ) 1).locallyPathConnectedSpace

Results

definition homeomorphIci

TopologyByExample.HalfOpenInterval.homeomorphIci

The homeomorphism t ↦ t / (1 - t) of [0, 1) onto [0, ∞), with inverse s ↦ s / (1 + s).

noncomputable def homeomorphIci : Ico (0 : ℝ) 1 ≃ₜ Ici (0 : ℝ)
Definition
where
  toFun t := ⟨t / (1 - t), div_nonneg t.property.1 (sub_nonneg.2 t.property.2.le)⟩
  invFun s := ⟨s / (1 + s), div_nonneg s.property (by linarith [s.property.out]),
    (div_lt_one (by linarith [s.property.out])).2 (by linarith)⟩
  left_inv t := by
    have h : (1 : ℝ) - t ≠ 0 := (sub_pos.2 t.property.2).ne'
    ext
    simp only
    field_simp
    ring
  right_inv s := by
    have h : (1 : ℝ) + s ≠ 0 := by linarith [s.property.out]
    ext
    simp only
    field_simp
    ring
  continuous_toFun := by
    refine Continuous.subtype_mk ?_ _
    exact continuous_subtypeVal.div (continuous_const.sub continuous_subtypeVal)
      fun t ↦ (sub_pos.2 t.property.2).ne'
  continuous_invFun := by
    refine Continuous.subtype_mk ?_ _
    exact continuous_subtypeVal.div (continuous_const.add continuous_subtypeVal)
      fun s ↦ by linarith [s.property.out]

theorem nonempty_homeomorph_Ici

TopologyByExample.HalfOpenInterval.nonempty_homeomorph_Ici

The interval [0, 1) is homeomorphic to the closed half-line [0, ∞).

theorem nonempty_homeomorph_Ici : Nonempty (Ico (0 : ℝ) 1 ≃ₜ Ici (0 : ℝ))
Proof
:=
  ⟨homeomorphIci⟩

On this site: Interval \([0, 1)\): Homeomorphic to the half-line \([0, \infty)\)

definition onePointEquivIcc

TopologyByExample.HalfOpenInterval.onePointEquivIcc

The inclusion of [0, 1) in [0, 1] is an embedding whose range omits exactly the point 1, so the one-point compactification of [0, 1) is [0, 1], the point at infinity going to 1.

noncomputable def onePointEquivIcc : OnePoint (Ico (0 : ℝ) 1) ≃ₜ Icc (0 : ℝ) 1
Definition
:=
  OnePoint.equivOfIsEmbeddingOfRangeEq ⟨1, zero_le_one, le_rfl⟩
    (inclusion Ico_subset_Icc_self) (IsEmbedding.inclusion Ico_subset_Icc_self) <| by
      ext x
      simp only [mem_range, mem_compl_iff, mem_singleton_iff]
      constructor
      · rintro ⟨y, rfl⟩ h
        exact (y.property.2.ne (congrArg Subtype.val h))
      · intro h
        refine ⟨⟨x, x.property.1, lt_of_le_of_ne x.property.2 fun h' ↦ h (Subtype.ext h')⟩, rfl⟩

theorem nonempty_onePoint_homeomorph_Icc

TopologyByExample.HalfOpenInterval.nonempty_onePoint_homeomorph_Icc

The one-point compactification of [0, 1) is homeomorphic to [0, 1].

theorem nonempty_onePoint_homeomorph_Icc :
    Nonempty (OnePoint (Ico (0 : ℝ) 1) ≃ₜ Icc (0 : ℝ) 1)
Proof
:=
  ⟨onePointEquivIcc⟩

On this site: Interval \([0, 1)\): The one-point compactification is \([0, 1]\)

theorem isPreconnected_compl_zero

TopologyByExample.HalfOpenInterval.isPreconnected_compl_zero

Removing the end point 0 from [0, 1) leaves a preconnected set.

theorem isPreconnected_compl_zero :
    IsPreconnected ({⟨0, le_rfl, zero_lt_one⟩}ᶜ : Set (Ico (0 : ℝ) 1))
Proof
:= by
  rw [← IsInducing.subtypeVal.isPreconnected_image]
  have : Subtype.val '' ({⟨0, le_rfl, zero_lt_one⟩}ᶜ : Set (Ico (0 : ℝ) 1)) = Ioo 0 1 := by
    ext x
    simp only [mem_image, mem_compl_iff, mem_singleton_iff, mem_Ioo]
    constructor
    · rintro ⟨y, hy, rfl⟩
      exact ⟨lt_of_le_of_ne y.property.1 fun h ↦ hy (Subtype.ext h.symm), y.property.2⟩
    · rintro ⟨h0, h1⟩
      exact ⟨⟨x, h0.le, h1⟩, fun h ↦ h0.ne' (congrArg Subtype.val h), rfl⟩
  rw [this]
  exact isPreconnected_Ioo

theorem isEmpty_homeomorph_real

TopologyByExample.HalfOpenInterval.isEmpty_homeomorph_real

The interval [0, 1) is not homeomorphic to the real line.

theorem isEmpty_homeomorph_real : IsEmpty (Ico (0 : ℝ) 1 ≃ₜ ℝ)
Proof
:= by
  refine ⟨fun h ↦ RealLine.not_isPreconnected_compl_singleton (h ⟨0, le_rfl, zero_lt_one⟩) ?_⟩
  have := isPreconnected_compl_zero.image h h.continuous.continuousOn
  rwa [image_compl_eq h.bijective, image_singleton] at this

theorem isEmpty_homeomorph_Icc

TopologyByExample.HalfOpenInterval.isEmpty_homeomorph_Icc

The interval [0, 1) is not homeomorphic to [0, 1]: the latter is compact.

theorem isEmpty_homeomorph_Icc : IsEmpty (Ico (0 : ℝ) 1 ≃ₜ Icc (0 : ℝ) 1)
Proof
:=
  ⟨fun h ↦ not_compactSpace h.symm.compactSpace⟩

theorem not_homeomorphic

TopologyByExample.HalfOpenInterval.not_homeomorphic

The interval [0, 1) is homeomorphic neither to the real line nor to [0, 1].

theorem not_homeomorphic :
    IsEmpty (Ico (0 : ℝ) 1 ≃ₜ ℝ) ∧ IsEmpty (Ico (0 : ℝ) 1 ≃ₜ Icc (0 : ℝ) 1)
Proof
:=
  ⟨isEmpty_homeomorph_real, isEmpty_homeomorph_Icc⟩

On this site: Interval \([0, 1)\): Not homeomorphic to the real line or to \([0, 1]\)

On this site: Space: Interval \([0, 1)\)