Skip to content

Commit e9d109b

Browse files
committed
chore(Topology): restack paths_discrete dependencies
1 parent 7cd3677 commit e9d109b

3 files changed

Lines changed: 13 additions & 143 deletions

File tree

Mathlib/AlgebraicTopology/FundamentalGroupoid/SemilocallySimplyConnected.lean

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,11 @@ lemma PathInTube.subpathOn_range_subset {X : Type*} [TopologicalSpace X] {x y :
339339
(part.h_mono.monotone i.castSucc_lt_succ.le)) ⊆ T.U i := by
340340
intro z hz
341341
obtain ⟨t, rfl⟩ := hz
342-
apply hγ.stays_in_U i
343342
have h_mono : (part.t i.castSucc : ℝ) ≤ part.t i.succ :=
344343
part.h_mono.monotone i.castSucc_lt_succ.le
345-
constructor
346-
· apply le_add_of_nonneg_right
347-
apply mul_nonneg t.2.1
348-
linarith
349-
· calc (part.t i.castSucc : ℝ) + t * (part.t i.succ - part.t i.castSucc)
350-
≤ part.t i.castSucc + 1 * (part.t i.succ - part.t i.castSucc) := by
351-
apply add_le_add_right
352-
apply mul_le_mul_of_nonneg_right t.2.2
353-
linarith
354-
_ = part.t i.succ := by ring
344+
simpa [Path.subpathOn_apply] using
345+
hγ.stays_in_U i (Set.Icc.convexCombo (part.t i.castSucc) (part.t i.succ) t)
346+
⟨Set.Icc.le_convexCombo h_mono t, Set.Icc.convexCombo_le h_mono t⟩
355347

356348
/-- Convert TubeData with partition to the set of paths in the tube -/
357349
def TubeData.toSet {X : Type*} [TopologicalSpace X] {x y : X} {n : ℕ}
@@ -390,10 +382,12 @@ theorem Path.exists_partition_in_slsc_neighborhoods (hX : SemilocallySimplyConne
390382
have hγ_in_inter : γ (t j) ∈ U_inter := by
391383
simp only [U_inter, Set.mem_iInter]
392384
intro i hi
393-
apply hU_contains i (t j)
385+
refine hU_contains i ?_
394386
cases hi with
395-
| inl h => constructor <;> apply h_mono.monotone <;> simp [h, Fin.le_def]
396-
| inr h => constructor <;> apply h_mono.monotone <;> simp [h, Fin.le_def, Fin.succ]
387+
| inl h =>
388+
constructor <;> apply h_mono.monotone <;> simp [h, Fin.le_def]
389+
| inr h =>
390+
constructor <;> apply h_mono.monotone <;> simp [h, Fin.le_def, Fin.succ]
397391
-- Take the path component of γ(t_j) in the intersection
398392
refine ⟨pathComponentIn U_inter (γ (t j)),
399393
?_, isPathConnected_pathComponentIn hγ_in_inter,
@@ -1014,10 +1008,11 @@ theorem Path.Homotopic.Quotient.discreteTopology
10141008
induction a using Quotient.inductionOn with
10151009
| h p =>
10161010
-- The preimage of {⟦p⟧} is the homotopy class {p' | Homotopic p' p}, which is open
1017-
rw [isOpen_coinduced]
1011+
change IsOpen ((Path.Homotopic.Quotient.mk : Path x y → Path.Homotopic.Quotient x y) ⁻¹'
1012+
({⟦p⟧} : Set (Path.Homotopic.Quotient x y)))
10181013
convert isOpen_setOf_homotopic hX p
10191014
ext p'
1020-
simp only [Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq]
1015+
simp only [Set.mem_preimage, Set.mem_setOf_eq]
10211016
exact Path.Homotopic.Quotient.eq
10221017

10231018
end

Mathlib/Topology/Homotopy/Path.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ variable {X : Type*} [TopologicalSpace X] {x y : X}
472472

473473
/-- Extract a subpath from γ on the interval [a, b] ⊆ [0, 1].
474474
This is γ reparametrized via the affine map t ↦ a + t(b - a). -/
475-
def subpathOn (γ : Path x y) (a b : unitInterval) (hab : a ≤ b) : Path (γ a) (γ b) where
475+
def subpathOn (γ : Path x y) (a b : unitInterval) (_hab : a ≤ b) : Path (γ a) (γ b) where
476476
toFun t := γ (convexCombo a b t)
477477
source' := by simp
478478
target' := by simp

Mathlib/Topology/UnitInterval.lean

Lines changed: 1 addition & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ theorem mul_mem {x y : ℝ} (hx : x ∈ I) (hy : y ∈ I) : x * y ∈ I :=
4949
theorem div_mem {x y : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) (hxy : x ≤ y) : x / y ∈ I :=
5050
⟨div_nonneg hx hy, div_le_one_of_le₀ hxy hy⟩
5151

52-
/-- The midpoint of the unit interval. -/
53-
def half : I := ⟨1 / 2, by constructor <;> linarith⟩
54-
5552
theorem fract_mem (x : ℝ) : fract x ∈ I :=
5653
⟨fract_nonneg _, (fract_lt_one _).le⟩
5754

@@ -337,7 +334,7 @@ theorem convexCombo_eq {a b : ℝ} (x : Icc a b) (t : unitInterval) : convexComb
337334

338335
@[simp, grind =]
339336
theorem convexCombo_same {a b : ℝ} (x : Icc a b) (t : unitInterval) : convexCombo x x t = x := by
340-
convexCombo_eq x t
337+
simp [convexCombo_eq]
341338

342339
/-- Convex combination of the endpoints of the unit interval gives the parameter. -/
343340
@[simp]
@@ -477,12 +474,6 @@ theorem eq_convexCombo {a b : ℝ} {x y z : Icc a b} (hxy : x ≤ y) (hyz : y
477474
· field_simp
478475
ring_nf
479476

480-
theorem continuous_convexCombo {a b : ℝ} :
481-
Continuous (fun (p : Icc a b × Icc a b × unitInterval) => convexCombo p.1 p.2.1 p.2.2) := by
482-
apply Continuous.subtype_mk
483-
fun_prop
484-
485-
486477
end Set.Icc
487478

488479
open scoped unitInterval
@@ -735,122 +726,6 @@ lemma exists_strictMono_Icc_subset_open_cover_unitInterval {ι} {c : ι → Set
735726
· ext; exact ht0
736727
· ext; exact htn
737728

738-
lemma exists_monotone_Icc_subset_open_cover_unitInterval_prod_self {ι} {c : ι → Set (I × I)}
739-
(hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
740-
∃ t : ℕ → I, t 0 = 0 ∧ Monotone t ∧ (∃ n, ∀ m ≥ n, t m = 1) ∧
741-
∀ n m, ∃ i, Icc (t n) (t (n + 1)) ×ˢ Icc (t m) (t (m + 1)) ⊆ c i := by
742-
obtain ⟨δ, δ_pos, ball_subset⟩ := lebesgue_number_lemma_of_metric isCompact_univ hc₁ hc₂
743-
have hδ := half_pos δ_pos
744-
simp_rw [Subtype.ext_iff]
745-
have h : (0 : ℝ) ≤ 1 := zero_le_one
746-
refine ⟨addNSMul h (δ/2), addNSMul_zero h,
747-
monotone_addNSMul h hδ.le, addNSMul_eq_right h hδ, fun n m ↦ ?_⟩
748-
obtain ⟨i, hsub⟩ := ball_subset (addNSMul h (δ / 2) n, addNSMul h (δ / 2) m) trivial
749-
exact ⟨i, fun t ht ↦ hsub (Metric.mem_ball.mpr <| (max_le (abs_sub_addNSMul_le h hδ.le n ht.1) <|
750-
abs_sub_addNSMul_le h hδ.le m ht.2).trans_lt <| half_lt_self δ_pos)⟩
751-
752-
/-- Finite partition variant: Any open cover of `[a, b]` can be refined to a finite partition
753-
with strictly monotone partition points indexed by `Fin (n + 1)`. -/
754-
lemma exists_strictMono_Icc_subset_open_cover_Icc {ι} {a b : ℝ} (h : a ≤ b) {c : ι → Set (Icc a b)}
755-
(hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
756-
∃ (n : ℕ) (t : Fin (n + 1) → Icc a b),
757-
StrictMono t ∧ t 0 = a ∧ t (Fin.last n) = b ∧
758-
∀ i : Fin n, ∃ j : ι, Icc (t i.castSucc) (t i.succ) ⊆ c j := by
759-
-- Get Lebesgue number
760-
obtain ⟨δ, δ_pos, hδ⟩ := lebesgue_number_lemma_of_metric isCompact_univ hc₁ hc₂
761-
-- Pick n: if a = b then n = 0, otherwise pick n large enough so that (b - a) / n < δ
762-
by_cases hab : a = b
763-
· -- Case a = b: take n = 0 with single partition point
764-
subst hab
765-
exact ⟨0, fun _ => ⟨a, by simp⟩, Subsingleton.strictMono (α := Fin 1) _, rfl, rfl,
766-
fun i => i.elim0⟩
767-
· -- Case a < b: pick n with (b - a) / n < δ
768-
have hab_pos : 0 < b - a := sub_pos.mpr (Ne.lt_of_le hab h)
769-
obtain ⟨n, hn_pos, hn_small⟩ : ∃ n : ℕ, 0 < n ∧ (b - a) / n < δ := by
770-
obtain ⟨n, hn⟩ := exists_nat_gt ((b - a) / δ)
771-
have hn_pos : 0 < n := by
772-
have h1 : 0 < (b - a) / δ := div_pos hab_pos δ_pos
773-
have h2 : (0 : ℝ) < n := by linarith
774-
exact Nat.cast_pos.mp h2
775-
refine ⟨n, hn_pos, ?_⟩
776-
have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
777-
-- From (b - a) / δ < n, multiply both sides by δ to get b - a < n * δ
778-
have h_mul : b - a < n * δ := calc
779-
b - a = (b - a) / δ * δ := by field_simp [δ_pos.ne']
780-
_ < n * δ := by nlinarith [δ_pos]
781-
calc (b - a) / n < (n * δ) / n := by gcongr
782-
_ = δ := by field_simp
783-
-- Define partition: t k = a + k * (b - a) / n
784-
let t : Fin (n + 1) → Icc a b := fun k => ⟨a + k * (b - a) / n, by
785-
constructor
786-
· linarith [mul_nonneg (Nat.cast_nonneg (k : ℕ)) (sub_nonneg.mpr h),
787-
div_nonneg (mul_nonneg (Nat.cast_nonneg (k : ℕ)) (sub_nonneg.mpr h)) (Nat.cast_nonneg n)]
788-
· have hk : (k : ℝ) ≤ n := Nat.cast_le.mpr (Nat.lt_succ_iff.mp k.is_lt)
789-
have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
790-
calc a + k * (b - a) / n ≤ a + n * (b - a) / n := by {
791-
have : k * (b - a) ≤ n * (b - a) := by nlinarith
792-
linarith [div_le_div_of_nonneg_right this hn_pos'.le] }
793-
_ = b := by field_simp [hn_pos'.ne']; ring⟩
794-
have ht_strict : StrictMono t := by
795-
intro i j hij
796-
change (t i : ℝ) < (t j : ℝ)
797-
simp only [t]
798-
have hij' : (i : ℝ) < (j : ℝ) := Nat.cast_lt.mpr hij
799-
have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
800-
have : i * (b - a) < j * (b - a) := by nlinarith [hab_pos]
801-
linarith [div_lt_div_of_pos_right this hn_pos']
802-
refine ⟨n, t, ht_strict, ?_, ?_, ?_⟩
803-
· -- t 0 = a
804-
simp [t]
805-
· -- t (Fin.last n) = b
806-
simp [t]
807-
field_simp [Nat.cast_pos.mpr hn_pos]
808-
ring
809-
· -- Covering property
810-
intro i
811-
-- Use StrictMono to get that t i.castSucc < t i.succ
812-
have h_mono : (t i.castSucc : ℝ) < (t i.succ : ℝ) := ht_strict i.castSucc_lt_succ
813-
-- Define the midpoint
814-
let m : Icc a b := ⟨((t i.castSucc : ℝ) + (t i.succ : ℝ)) / 2, by
815-
constructor
816-
· linarith [(t i.castSucc).2.1, (t i.succ).2.1]
817-
· linarith [(t i.castSucc).2.2, (t i.succ).2.2]⟩
818-
-- The segment is contained in ball m δ
819-
have h_subset : Icc (t i.castSucc) (t i.succ) ⊆ Metric.ball m δ := by
820-
intro x hx
821-
simp only [Metric.ball, mem_setOf_eq]
822-
have segment_len : (t i.succ : ℝ) - (t i.castSucc : ℝ) = (b - a) / n := by
823-
simp [t]
824-
field_simp
825-
ring
826-
-- x is in the segment, so its distance from midpoint is at most (b-a)/(2n) < δ
827-
have hx_bounds : (t i.castSucc : ℝ) ≤ (x : ℝ) ∧ (x : ℝ) ≤ (t i.succ : ℝ) := ⟨hx.1, hx.2
828-
have dist_bound : dist (x : ℝ) (m : ℝ) ≤ ((b - a) / n) / 2 := by
829-
rw [dist_comm, Real.dist_eq]
830-
simp only [m, abs_sub_le_iff]
831-
constructor <;>
832-
· linarith [hx_bounds.1, hx_bounds.2, segment_len]
833-
-- Since (b-a)/n < δ, we have (b-a)/(2n) < δ/2 < δ
834-
calc dist (x : ℝ) (m : ℝ) ≤ ((b - a) / n) / 2 := dist_bound
835-
_ < δ / 2 := by linarith [hn_small]
836-
_ < δ := by linarith [δ_pos]
837-
-- Apply Lebesgue number property to get the covering set
838-
obtain ⟨j, hj⟩ := hδ m trivial
839-
exact ⟨j, Subset.trans h_subset hj⟩
840-
841-
/-- Finite partition variant: Any open cover of the unit interval can be refined to a finite
842-
partition with strictly monotone partition points indexed by `Fin (n + 1)`. -/
843-
lemma exists_strictMono_Icc_subset_open_cover_unitInterval {ι} {c : ι → Set I}
844-
(hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
845-
∃ (n : ℕ) (t : Fin (n + 1) → I),
846-
StrictMono t ∧ t 0 = 0 ∧ t (Fin.last n) = 1
847-
∀ i : Fin n, ∃ j : ι, Icc (t i.castSucc) (t i.succ) ⊆ c j := by
848-
obtain ⟨n, t, ht_strict, ht0, htn, ht_cover⟩ :=
849-
exists_strictMono_Icc_subset_open_cover_Icc zero_le_one hc₁ hc₂
850-
refine ⟨n, t, ht_strict, ?_, ?_, ht_cover⟩
851-
· ext; exact ht0
852-
· ext; exact htn
853-
854729
end partition
855730

856731
@[simp]

0 commit comments

Comments
 (0)