Skip to content

Commit f579ecf

Browse files
committed
feat(Counterexamples): Peano curve (#26185)
Prove the existence of a continuous surjection from `unitInterval` onto `unitInterval × unitInterval`.
1 parent 9a87f17 commit f579ecf

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

Counterexamples.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Counterexamples.MapFloor
1616
import Counterexamples.MonicNonRegular
1717
import Counterexamples.Motzkin
1818
import Counterexamples.OrderedCancelAddCommMonoidWithBounds
19+
import Counterexamples.PeanoCurve
1920
import Counterexamples.Phillips
2021
import Counterexamples.PolynomialIsDomain
2122
import Counterexamples.Pseudoelement

Counterexamples/PeanoCurve.lean

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/-
2+
Copyright (c) 2025 Vasilii Nesterov. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Vasilii Nesterov
5+
-/
6+
import Mathlib.Analysis.Complex.Tietze
7+
import Mathlib.Topology.MetricSpace.HausdorffAlexandroff
8+
9+
/-!
10+
# Peano curve
11+
This file proves the existsence of a Peano curve -- continuous sujrective map from the interval
12+
`[0, 1]` onto the square `[0, 1] × [0, 1]`.
13+
-/
14+
15+
open scoped unitInterval
16+
17+
/-- There is a continuous function on `ℝ` that maps the Cantor set to the square. -/
18+
lemma exists_long_peano_curve :
19+
∃ f : C(ℝ, I × I), Set.SurjOn f cantorSet Set.univ := by
20+
-- Take a continuous surjection from the Cantor set to the square
21+
obtain ⟨g, hg1, hg2⟩ := exists_nat_bool_continuous_surjective_of_compact (I × I)
22+
let g' : C(cantorSet, I × I) :=
23+
⟨g ∘ cantorSetHomeomorphNatToBool, Continuous.comp hg1 (Homeomorph.continuous _)⟩
24+
have hg' : Function.Surjective g' := by
25+
simp only [ContinuousMap.coe_mk, EquivLike.surjective_comp, g', hg2]
26+
-- Extend it to whole `ℝ`
27+
obtain ⟨f, hf⟩ := ContinuousMap.exists_restrict_eq isClosed_cantorSet g'
28+
use f
29+
simp only [Set.surjOn_iff_surjective, ← ContinuousMap.coe_restrict, hf, hg']
30+
31+
/-- There is a continuous surjection from the interval to the square. -/
32+
theorem exists_peano_curve :
33+
∃ f : C(I, I × I), Function.Surjective f := by
34+
obtain ⟨f, hf⟩ := exists_long_peano_curve
35+
-- Restrict the map from `exists_long_peano_curve` to the interval
36+
use ContinuousMap.restrict I f
37+
rw [ContinuousMap.coe_restrict, ← Set.surjOn_iff_surjective]
38+
exact Set.SurjOn.mono cantorSet_subset_unitInterval (by rfl) hf

Mathlib/Analysis/Complex/Tietze.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ theorem Metric.instTietzeExtensionClosedBall (𝕜 : Type v) [RCLike 𝕜] {E :
9696
RCLike.norm_ofReal, abs_of_nonneg hr.le]
9797
exact (mul_le_iff_le_one_right hr).symm
9898

99+
instance unitInterval.instTietzeExtension : TietzeExtension unitInterval := by
100+
rw [unitInterval.eq_closedBall]
101+
exact Metric.instTietzeExtensionClosedBall ℝ _ (by norm_num)
102+
99103
variable {X : Type u} [TopologicalSpace X] [NormalSpace X] {s : Set X} (hs : IsClosed s)
100104
variable (𝕜 : Type v) [RCLike 𝕜]
101105
variable {E : Type w} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [FiniteDimensional 𝕜 E]

Mathlib/Topology/ContinuousMap/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def restrict (f : C(α, β)) : C(s, β) where
281281
toFun := f ∘ ((↑) : s → α)
282282

283283
@[simp]
284-
theorem coe_restrict (f : C(α, β)) : ⇑(f.restrict s) = f ∘ ((↑) : s → α) :=
284+
theorem coe_restrict (f : C(α, β)) : ⇑(f.restrict s) = s.restrict f :=
285285
rfl
286286

287287
@[simp]
@@ -378,7 +378,7 @@ theorem liftCover_coe {i : ι} (x : S i) : liftCover S φ hφ hS x = φ i x := b
378378
@[simp]
379379
theorem liftCover_restrict {i : ι} : (liftCover S φ hφ hS).restrict (S i) = φ i := by
380380
ext
381-
simp only [coe_restrict, Function.comp_apply, liftCover_coe]
381+
simp only [restrict_apply, liftCover_coe]
382382

383383
variable (A : Set (Set α)) (F : ∀ s ∈ A, C(s, β))
384384
(hF : ∀ (s) (hs : s ∈ A) (t) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),

Mathlib/Topology/UnitInterval.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ theorem mul_le_left {x y : I} : x * y ≤ x :=
6767
theorem mul_le_right {x y : I} : x * y ≤ y :=
6868
Subtype.coe_le_coe.mp <| mul_le_of_le_one_left y.2.1 x.2.2
6969

70+
theorem eq_closedBall : I = Metric.closedBall 2⁻¹ 2⁻¹ := by
71+
norm_num [unitInterval, Real.Icc_eq_closedBall]
72+
7073
/-- Unit interval central symmetry. -/
7174
def symm : I → I := fun t => ⟨1 - t, Icc.mem_iff_one_sub_mem.mp t.prop⟩
7275

0 commit comments

Comments
 (0)