Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.NormalGraphFamily |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.SmoothReference |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.GraphNeighborhood |
| 4 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.NormalLabels |
| 5 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.Interval |
| 6 | |
| 7 | /-! |
| 8 | # Actual fixed-label uniqueness on closed intervals |
| 9 | |
| 10 | Actual normal graphs over one smooth immersed reference satisfy the |
| 11 | scalar-principal parabolic comparison. The pure-normal equations then |
| 12 | fix the labels, and forward closed induction covers the entire interval. |
| 13 | MT2007 Claim 19.1, p. 437; |
| 14 | `2026-09-22-uniqueness-actual-closed-assembly.md`. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology RealInnerProductSpace |
| 22 | |
| 23 | universe u v |
| 24 | |
| 25 | namespace PoincareMT.M63 |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {ι : Type v} [Fintype ι] {a b : ℝ} {F : RicciFlow n M (Icc a b)} |
| 30 | |
| 31 | local notation "W" => EuclideanSpace ℝ ι |
| 32 | local notation "G" => ℝ × (W × W) |
| 33 | |
| 34 | /-- Two actual C2 pure-normal solutions with equal initial labels agree |
| 35 | on a strictly forward closed interval. MT2007 Claim 19.1, p. 437; |
| 36 | actual-closed-assembly derivation, statement 1. The reference may have |
| 37 | self-intersections, and the common initial graph need not vanish. -/ |
| 38 | theorem exists_forward_c2ShrinkingCurve_agreement |
| 39 | {e : M → W} (he : ContMDiff (𝓡 n) 𝓘(ℝ, W) ∞ e) |
| 40 | {N : Set W} (hN : IsOpen N) (heN : range e ⊆ N) {ρ : W → M} |
| 41 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ N) (hret : ∀ p, ρ (e p) = p) |
| 42 | {s T : ℝ} (hsT : s < T) {c d : ℝ → ℝ → M} |
| 43 | (hc : M63C2ShrinkingCurveOn F c (Icc s T)) |
| 44 | (hd : M63C2ShrinkingCurveOn F d (Icc s T)) |
| 45 | (hinit : ∀ x, c x s = d x s) : |
| 46 | ∃ tau : ℝ, s < tau ∧ tau ≤ T ∧ ∀ t ∈ Icc s tau, ∀ x, c x t = d x t := by |
| 47 | classical |
| 48 | have heinj : Function.Injective e := (show Function.LeftInverse ρ e from hret).injective |
| 49 | have hs : s ∈ Icc s T := ⟨le_rfl, hsT.le⟩ |
| 50 | have hP : 0 < curvePeriod := by unfold curvePeriod; positivity |
| 51 | have hbase := c2ShrinkingCurve_embedded_closed_data hc he |
| 52 | have himm (x : ℝ) : deriv (fun y => e (c y s)) x ≠ 0 := by |
| 53 | intro hx |
| 54 | have hv := (hbase.2.1 s hs x).deriv |
| 55 | have hzero : mfderiv (𝓡 n) 𝓘(ℝ, W) e (c x s) |
| 56 | (curveVelocity (n := n) (fun y => c y s) x) = 0 := hv.symm.trans hx |
| 57 | have hleft := (smooth_retraction_differentials he hN heN hρ hret).2.2 |
| 58 | (c x s) (curveVelocity (n := n) (fun y => c y s) x) |
| 59 | rw [hzero, map_zero] at hleft |
| 60 | exact hc.immersed s hs x hleft.symm |
| 61 | have hperiod : Function.Periodic (fun x => e (c x s)) curvePeriod := |
| 62 | fun x => congrArg e (hc.periodic s hs x) |
| 63 | obtain ⟨r, m, M0, B0, radius, eps, eta, hr, hrper, hm, hM0, hB0, |
| 64 | hradius, heps, heta, hlower, hupper, hsecond, hsmall, hmargin, htrans, |
| 65 | hclose0, hfirst0⟩ := |
| 66 | exists_periodic_smooth_normalGraph_reference hP (hbase.1 s hs) hperiod himm |
| 67 | let C : Bool → ℝ → ℝ → M := Bool.rec c d |
| 68 | have hC (i : Bool) : M63C2ShrinkingCurveOn F (C i) (Icc s T) := by |
| 69 | cases i |
| 70 | · exact hc |
| 71 | · exact hd |
| 72 | have hCinit (i : Bool) : (fun x => e (C i x s)) = (fun x => e (c x s)) := by |
| 73 | funext x |
| 74 | cases i |
| 75 | · rfl |
| 76 | · exact congrArg e (hinit x).symm |
| 77 | have hnear (i : Bool) := exists_c2ShrinkingCurve_embedded_C1_neighborhood (hC i) he |
| 78 | (hr.of_le (by simp : (1 : ℕ∞ω) ≤ ∞)) hrper hsT (Subset.refl _) heps heta |
| 79 | (fun x => by |
| 80 | change ‖(fun y => e (C i y s)) x - r x‖ < eps |
| 81 | rw [hCinit i] |
| 82 | exact (hclose0 x).trans (half_lt_self heps)) |
| 83 | (fun x => by |
| 84 | rw [hCinit i] |
| 85 | exact (hfirst0 x).trans (half_lt_self heta)) |
| 86 | choose terminal hterminal hterminalT hnearbound using hnear |
| 87 | let tau := min (terminal false) (terminal true) |
| 88 | have hstau : s < tau := lt_min (hterminal false) (hterminal true) |
| 89 | have htauterminal (i : Bool) : tau ≤ terminal i := by |
| 90 | cases i |
| 91 | · exact min_le_left _ _ |
| 92 | · exact min_le_right _ _ |
| 93 | have htauT : tau ≤ T := (htauterminal false).trans (hterminalT false) |
| 94 | have hCshort (i : Bool) : M63C2ShrinkingCurveOn F (C i) (Icc s tau) := |
| 95 | c2_restrict (hC i) (fun _ ht => ⟨ht.1, ht.2.trans htauT⟩) |
| 96 | have hclose (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 97 | ‖e (C i x t) - r x‖ < eps := |
| 98 | (hnearbound i t ⟨ht.1, ht.2.trans (htauterminal i)⟩ x).1 |
| 99 | have hfirst (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 100 | ‖deriv (fun y => e (C i y t)) x - deriv r x‖ ≤ eta := |
| 101 | (hnearbound i t ⟨ht.1, ht.2.trans (htauterminal i)⟩ x).2.le |
| 102 | have hgraphs (i : Bool) := exists_c2ShrinkingCurve_normalGraph_family |
| 103 | he hN heN hρ hret hstau (hCshort i) hr hm hM0 hB0.le hradius heps |
| 104 | hlower hupper hsecond hsmall hmargin heta.le htrans hrper (hclose i) (hfirst i) |
| 105 | choose phi hdata hfamily using hgraphs |
| 106 | let psi : Bool → ℝ → ℝ → ℝ := fun i y t => (phi i t).symm y |
| 107 | let U : Bool → ℝ → ℝ → W := fun i y t => e (C i (psi i y t) t) - r y |
| 108 | let P : Bool → ℝ → ℝ → W := fun i y t => deriv (fun z => U i z t) y |
| 109 | let Q : Bool → ℝ → ℝ → W := fun i y t => deriv (deriv (fun z => U i z t)) y |
| 110 | let V : Bool → ℝ → ℝ → W := fun i y t => deriv (fun z => e (C i (psi i z t) t)) y |
| 111 | let A : Bool → ℝ → ℝ → ℝ := fun i y t => |
| 112 | ambientCurvePrincipal F ρ t (r y + U i y t) (deriv r y + P i y t) |
| 113 | let B : Bool → ℝ → ℝ → W := fun i y t => curveGraphLower (A i y t) |
| 114 | (ambientCurveLower F e ρ t (r y + U i y t) (deriv r y + P i y t)) |
| 115 | (deriv r y) (deriv (deriv r) y) (deriv (deriv (deriv r)) y) (U i y t) (P i y t) |
| 116 | let D : Set (ℝ × ℝ) := univ ×ˢ Icc s tau |
| 117 | have hPhiC2 (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) : |
| 118 | ContDiff ℝ 2 (phi i t : ℝ → ℝ) := (hdata i t ht).2.1 |
| 119 | have hPsiC2 (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) : |
| 120 | ContDiff ℝ 2 (fun y => psi i y t) := (hdata i t ht).2.2.1 |
| 121 | have hPhiPos (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 122 | 0 < deriv (phi i t) x := (hdata i t ht).2.2.2.2.1 x |
| 123 | have hPsiPos (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 124 | 0 < deriv (fun y => psi i y t) x := ((hdata i t ht).2.2.2.2.2.1 x).2 |
| 125 | have hUC2 (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) : |
| 126 | ContDiff ℝ 2 (fun y => U i y t) := (hdata i t ht).2.2.2.2.2.2.2.2.1 |
| 127 | have hUper (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 128 | U i (x + curvePeriod) t = U i x t := (hdata i t ht).2.2.2.2.2.2.2.2.2.1 x |
| 129 | have hPsiCont (i : Bool) : ContinuousOn (Function.uncurry (psi i)) D := (hfamily i).1 |
| 130 | have hPsiC1 (i : Bool) : ContDiffOn ℝ 1 (Function.uncurry (psi i)) |
| 131 | (univ ×ˢ Ioo s tau) := (hfamily i).2.2.1 |
| 132 | have hUCont (i : Bool) : ContinuousOn (Function.uncurry (U i)) D := |
| 133 | (hfamily i).2.2.2.1 |
| 134 | have hPCont (i : Bool) : ContinuousOn (Function.uncurry (P i)) D := |
| 135 | (hfamily i).2.2.2.2.1 |
| 136 | have hQCont (i : Bool) : ContinuousOn (Function.uncurry (Q i)) D := |
| 137 | (hfamily i).2.2.2.2.2.1 |
| 138 | have hpoint (i : Bool) (y t : ℝ) : r y + U i y t = e (C i (psi i y t) t) := by |
| 139 | dsimp only [U] |
| 140 | abel |
| 141 | have hV (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (y : ℝ) : |
| 142 | V i y t = deriv r y + P i y t := by |
| 143 | have hsp := (c2ShrinkingCurve_embedded_closed_data (hCshort i) he).1 t ht |
| 144 | have hdiff := (hsp.comp (hPsiC2 i t ht)).differentiable (by norm_num) |
| 145 | have hder := deriv_sub (hdiff y) (hr.differentiable (by simp) y) |
| 146 | change P i y t = V i y t - deriv r y at hder |
| 147 | rw [hder] |
| 148 | abel |
| 149 | have htime (i : Bool) (t : ℝ) (ht : t ∈ Ioo s tau) (y : ℝ) : |
| 150 | HasDerivAt (U i y) (A i y t • Q i y t + B i y t) t := by |
| 151 | have hdtime := (hfamily i).2.2.2.2.2.2.2.2 t ht y |
| 152 | change HasDerivAt (U i y) |
| 153 | (ambientCurvePrincipal F ρ t (e (C i (psi i y t) t)) (V i y t) • Q i y t + |
| 154 | curveGraphLower (ambientCurvePrincipal F ρ t (e (C i (psi i y t) t)) (V i y t)) |
| 155 | (ambientCurveLower F e ρ t (e (C i (psi i y t) t)) (V i y t)) |
| 156 | (deriv r y) (deriv (deriv r) y) (deriv (deriv (deriv r)) y) |
| 157 | (U i y t) (P i y t)) t at hdtime |
| 158 | rw [hV i t (Ioo_subset_Icc_self ht) y, ← hpoint i y t] at hdtime |
| 159 | exact hdtime |
| 160 | let Ω : Set G := {z | r z.1 + z.2.1 ∈ N ∧ |
| 161 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (r z.1 + z.2.1) (deriv r z.1 + z.2.2) ≠ 0 ∧ |
| 162 | ⟪deriv r z.1 + z.2.2, deriv r z.1⟫ ≠ 0} |
| 163 | let state : Bool → ℝ × ℝ → G := fun i z => (z.1, U i z.1 z.2, P i z.1 z.2) |
| 164 | have hstate (i : Bool) (z : ℝ × ℝ) (hz : z ∈ D) : state i z ∈ Ω := by |
| 165 | have hg := (hfamily i).2.2.2.2.2.2.2.1 z.2 hz.2 z.1 |
| 166 | change mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (e (C i (psi i z.1 z.2) z.2)) (V i z.1 z.2) ≠ 0 ∧ |
| 167 | ⟪V i z.1 z.2, deriv r z.1⟫ ≠ 0 at hg |
| 168 | rw [hV i z.2 hz.2 z.1, ← hpoint i z.1 z.2] at hg |
| 169 | exact ⟨by rw [hpoint]; exact heN (mem_range_self _), hg⟩ |
| 170 | let rectangle : Set (ℝ × ℝ) := Icc 0 curvePeriod ×ˢ Icc s tau |
| 171 | have hrectangle : IsCompact rectangle := isCompact_Icc.prod isCompact_Icc |
| 172 | have hrectD : rectangle ⊆ D := fun _ hz => ⟨mem_univ _, hz.2⟩ |
| 173 | have hstateCont (i : Bool) : ContinuousOn (state i) rectangle := |
| 174 | continuousOn_fst.prodMk (((hUCont i).mono hrectD).prodMk ((hPCont i).mono hrectD)) |
| 175 | let K : Set G := state false '' rectangle ∪ state true '' rectangle |
| 176 | have hK : IsCompact K := |
| 177 | (hrectangle.image_of_continuousOn (hstateCont false)).union |
| 178 | (hrectangle.image_of_continuousOn (hstateCont true)) |
| 179 | have hKsub : K ⊆ Ω := by |
| 180 | rintro z (⟨w, hw, rfl⟩ | ⟨w, hw, rfl⟩) |
| 181 | · exact hstate false w (hrectD hw) |
| 182 | · exact hstate true w (hrectD hw) |
| 183 | obtain ⟨mu, _Lambda, hmu, _hLambda, LA, LB, hcoeff, hLA, hLB⟩ := |
| 184 | curveGraphCoefficients_uniform_bounds F he hN hρ hr hK hKsub |
| 185 | obtain ⟨R0, hR0⟩ := hrectangle.exists_bound_of_continuousOn ((hQCont true).mono hrectD) |
| 186 | let R := max R0 0 |
| 187 | let L : ℝ := (LA : ℝ) + (LB : ℝ) |
| 188 | have hR : 0 ≤ R := le_max_right _ _ |
| 189 | have hL : 0 ≤ L := add_nonneg LA.coe_nonneg LB.coe_nonneg |
| 190 | have hL_A : (LA : ℝ) ≤ L := le_add_of_nonneg_right LB.coe_nonneg |
| 191 | have hL_B : (LB : ℝ) ≤ L := le_add_of_nonneg_left LA.coe_nonneg |
| 192 | have hcompact (y t : ℝ) (hy : y ∈ Icc 0 curvePeriod) (ht : t ∈ Icc s tau) : |
| 193 | mu ≤ A false y t ∧ ‖Q true y t‖ ≤ R ∧ |
| 194 | |A false y t - A true y t| ≤ |
| 195 | L * (‖U false y t - U true y t‖ + ‖P false y t - P true y t‖) ∧ |
| 196 | ‖B false y t - B true y t‖ ≤ |
| 197 | L * (‖U false y t - U true y t‖ + ‖P false y t - P true y t‖) := by |
| 198 | have htF := (hCshort false).domain_subset ht |
| 199 | have hfalse : state false (y, t) ∈ K := Or.inl ⟨(y, t), ⟨hy, ht⟩, rfl⟩ |
| 200 | have htrue : state true (y, t) ∈ K := Or.inr ⟨(y, t), ⟨hy, ht⟩, rfl⟩ |
| 201 | have hdist : dist (state false (y, t)) (state true (y, t)) ≤ |
| 202 | ‖U false y t - U true y t‖ + ‖P false y t - P true y t‖ := by |
| 203 | change max (dist y y) (max (dist (U false y t) (U true y t)) |
| 204 | (dist (P false y t) (P true y t))) ≤ _ |
| 205 | rw [dist_self, max_eq_right (le_max_of_le_left dist_nonneg)] |
| 206 | rw [dist_eq_norm, dist_eq_norm] |
| 207 | exact max_le (le_add_of_nonneg_right (norm_nonneg _)) |
| 208 | (le_add_of_nonneg_left (norm_nonneg _)) |
| 209 | refine ⟨(hcoeff t htF _ hfalse).1, (hR0 (y, t) ⟨hy, ht⟩).trans (le_max_left _ _), ?_, ?_⟩ |
| 210 | · have hh := (hLA t htF).dist_le_mul _ hfalse _ htrue |
| 211 | change dist (A false y t) (A true y t) ≤ (LA : ℝ) * |
| 212 | dist (state false (y, t)) (state true (y, t)) at hh |
| 213 | rw [Real.dist_eq] at hh |
| 214 | exact hh.trans (mul_le_mul hL_A hdist dist_nonneg hL) |
| 215 | · have hh := (hLB t htF).dist_le_mul _ hfalse _ htrue |
| 216 | change dist (B false y t) (B true y t) ≤ (LB : ℝ) * |
| 217 | dist (state false (y, t)) (state true (y, t)) at hh |
| 218 | rw [dist_eq_norm] at hh |
| 219 | exact hh.trans (mul_le_mul hL_B hdist dist_nonneg hL) |
| 220 | have hr₁ := (contDiff_infty_iff_deriv.mp hr).2 |
| 221 | have hr₂ := (contDiff_infty_iff_deriv.mp hr₁).2 |
| 222 | have hrper₁ := hrper.deriv_of_differentiable (hr.differentiable (by simp)) |
| 223 | have hrper₂ := hrper₁.deriv_of_differentiable (hr₁.differentiable (by simp)) |
| 224 | have hrper₃ := hrper₂.deriv_of_differentiable (hr₂.differentiable (by simp)) |
| 225 | have hPper (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 226 | P i (x + curvePeriod) t = P i x t := |
| 227 | (Function.Periodic.deriv_of_differentiable (f := fun y => U i y t) (hUper i t ht) |
| 228 | ((hUC2 i t ht).differentiable (by norm_num))) x |
| 229 | have hQper (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 230 | Q i (x + curvePeriod) t = Q i x t := |
| 231 | (Function.Periodic.deriv_of_differentiable (f := fun y => P i y t) (hPper i t ht) |
| 232 | (hUC2 i t ht).differentiable_deriv_two) x |
| 233 | have hAper (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 234 | A i (x + curvePeriod) t = A i x t := by |
| 235 | dsimp only [A] |
| 236 | rw [hrper x, hrper₁ x, hUper i t ht x, hPper i t ht x] |
| 237 | have hBper (i : Bool) (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : |
| 238 | B i (x + curvePeriod) t = B i x t := by |
| 239 | dsimp only [B] |
| 240 | rw [hAper i t ht x, hrper x, hrper₁ x, hrper₂ x, hrper₃ x, |
| 241 | hUper i t ht x, hPper i t ht x] |
| 242 | have hbounds (x t : ℝ) (ht : t ∈ Icc s tau) : |
| 243 | mu ≤ A false x t ∧ ‖Q true x t‖ ≤ R ∧ |
| 244 | |A false x t - A true x t| ≤ |
| 245 | L * (‖U false x t - U true x t‖ + ‖P false x t - P true x t‖) ∧ |
| 246 | ‖B false x t - B true x t‖ ≤ |
| 247 | L * (‖U false x t - U true x t‖ + ‖P false x t - P true x t‖) := by |
| 248 | let tuple := fun y => (U false y t, U true y t, P false y t, P true y t, |
| 249 | Q true y t, A false y t, A true y t, B false y t, B true y t) |
| 250 | have htuple : Function.Periodic tuple curvePeriod := by |
| 251 | intro y |
| 252 | dsimp only [tuple] |
| 253 | rw [hUper false t ht y, hUper true t ht y, hPper false t ht y, hPper true t ht y, |
| 254 | hQper true t ht y, hAper false t ht y, hAper true t ht y, |
| 255 | hBper false t ht y, hBper true t ht y] |
| 256 | obtain ⟨y, hy, heq⟩ := htuple.exists_mem_Ico₀ hP x |
| 257 | dsimp only [tuple] at heq |
| 258 | simp only [Prod.mk.injEq] at heq |
| 259 | rcases heq with ⟨hu0, hu1, hp0, hp1, hq1, ha0, ha1, hb0, hb1⟩ |
| 260 | rw [hu0, hu1, hp0, hp1, hq1, ha0, ha1, hb0, hb1] |
| 261 | exact hcompact y t ⟨hy.1, hy.2.le⟩ ht |
| 262 | have hs' : s ∈ Icc s tau := ⟨le_rfl, hstau.le⟩ |
| 263 | have hphis : phi false s = phi true s := by |
| 264 | ext x |
| 265 | calc |
| 266 | phi false s x = selectedCurveFootpoint r radius eps (x, e (c x s)) := |
| 267 | (hdata false s hs').1 x |
| 268 | _ = selectedCurveFootpoint r radius eps (x, e (d x s)) := by rw [hinit x] |
| 269 | _ = phi true s x := ((hdata true s hs').1 x).symm |
| 270 | have hUinit (x : ℝ) : U false x s = U true x s := by |
| 271 | dsimp only [U, psi] |
| 272 | rw [hphis] |
| 273 | exact congrArg (fun p : M => e p - r x) (hinit ((phi true s).symm x)) |
| 274 | have hUeq : ∀ x t, t ∈ Icc s tau → U false x t = U true x t := |
| 275 | periodic_vector_eq_of_parabolic_bound |
| 276 | (w₁ := U false) (w₂ := U true) (wx₁ := P false) (wx₂ := P true) |
| 277 | (wxx₁ := Q false) (wxx₂ := Q true) |
| 278 | (wt₁ := fun x t => A false x t • Q false x t + B false x t) |
| 279 | (wt₂ := fun x t => A true x t • Q true x t + B true x t) |
| 280 | (A := A false) hP hstau hmu (add_nonneg (mul_nonneg hL hR) hL) |
| 281 | (hUCont false) (hUCont true) (hUper false) (hUper true) |
| 282 | (fun x t ht => |
| 283 | ((hUC2 false t (Ioo_subset_Icc_self ht)).differentiable (by norm_num) x).hasDerivAt) |
| 284 | (fun x t ht => |
| 285 | ((hUC2 true t (Ioo_subset_Icc_self ht)).differentiable (by norm_num) x).hasDerivAt) |
| 286 | (fun x t ht => |
| 287 | ((hUC2 false t (Ioo_subset_Icc_self ht)).differentiable_deriv_two x).hasDerivAt) |
| 288 | (fun x t ht => |
| 289 | ((hUC2 true t (Ioo_subset_Icc_self ht)).differentiable_deriv_two x).hasDerivAt) |
| 290 | (fun x t ht => htime false t ht x) (fun x t ht => htime true t ht x) |
| 291 | (fun x t ht => (hbounds x t (Ioo_subset_Icc_self ht)).1) |
| 292 | (fun x t ht => norm_parabolic_difference_le hL hR rfl rfl |
| 293 | (hbounds x t (Ioo_subset_Icc_self ht)).2.2.1 |
| 294 | (hbounds x t (Ioo_subset_Icc_self ht)).2.2.2 |
| 295 | (hbounds x t (Ioo_subset_Icc_self ht)).2.1) hUinit |
| 296 | let theta : ℝ → ℝ → ℝ := fun x t => psi true (phi false t x) t |
| 297 | have hagree (t : ℝ) (ht : t ∈ Icc s tau) (x : ℝ) : c x t = d (theta x t) t := by |
| 298 | have hh := hUeq (phi false t x) t ht |
| 299 | dsimp only [U, psi] at hh |
| 300 | rw [OrderIso.symm_apply_apply] at hh |
| 301 | exact heinj (sub_left_inj.mp hh) |
| 302 | have hinput : ContinuousOn (fun z : ℝ × ℝ => (z.1, e (c z.1 z.2))) D := |
| 303 | continuousOn_fst.prodMk (c2ShrinkingCurve_embedded_closed_data (hCshort false) he).2.2.1 |
| 304 | have hPhiCont : ContinuousOn (fun z : ℝ × ℝ => phi false z.2 z.1) D := by |
| 305 | have hraw : ContinuousOn |
| 306 | (fun z : ℝ × ℝ => selectedCurveFootpoint r radius eps (z.1, e (c z.1 z.2))) D := by |
| 307 | intro z hz |
| 308 | have hf : ContinuousAt (selectedCurveFootpoint r radius eps) (z.1, e (c z.1 z.2)) := |
| 309 | (selectedCurveFootpoint_contDiffAt hr hm hM0 hB0.le hradius heps |
| 310 | hlower hupper hsecond hsmall hmargin (z.1, e (c z.1 z.2)) |
| 311 | (hclose false z.2 hz.2 z.1)).1.continuousAt |
| 312 | exact hf.comp_continuousWithinAt (f := fun z : ℝ × ℝ => (z.1, e (c z.1 z.2))) |
| 313 | (hinput z hz) |
| 314 | exact hraw.congr (fun z hz => (hdata false z.2 hz.2).1 z.1) |
| 315 | have hPhiC1 : ContDiffOn ℝ 1 (fun z : ℝ × ℝ => phi false z.2 z.1) |
| 316 | (univ ×ˢ Ioo s tau) := by |
| 317 | have hembed : ContDiffOn ℝ 1 (fun z : ℝ × ℝ => e (c z.1 z.2)) |
| 318 | (univ ×ˢ Ioo s tau) := by |
| 319 | simpa only [interior_Icc] using |
| 320 | (c2ShrinkingCurve_embedded_interior_equation (hCshort false) he).1 |
| 321 | have hin : ContDiffOn ℝ 1 (fun z : ℝ × ℝ => (z.1, e (c z.1 z.2))) |
| 322 | (univ ×ˢ Ioo s tau) := contDiffOn_fst.prodMk hembed |
| 323 | have hraw : ContDiffOn ℝ 1 |
| 324 | (fun z : ℝ × ℝ => selectedCurveFootpoint r radius eps (z.1, e (c z.1 z.2))) |
| 325 | (univ ×ˢ Ioo s tau) := by |
| 326 | intro z hz |
| 327 | have hfoot := (selectedCurveFootpoint_contDiffAt hr hm hM0 hB0.le hradius heps |
| 328 | hlower hupper hsecond hsmall hmargin (z.1, e (c z.1 z.2)) |
| 329 | (hclose false z.2 (Ioo_subset_Icc_self hz.2) z.1)).1.of_le |
| 330 | (by simp : (1 : ℕ∞ω) ≤ ∞) |
| 331 | exact (hfoot.comp z (hin.contDiffAt |
| 332 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds hz))).contDiffWithinAt |
| 333 | exact hraw.congr (fun z hz => (hdata false z.2 (Ioo_subset_Icc_self hz.2)).1 z.1) |
| 334 | have hThetaCont : ContinuousOn (Function.uncurry theta) D := |
| 335 | (hPsiCont true).comp (hPhiCont.prodMk continuousOn_snd) |
| 336 | (fun _ hz => ⟨mem_univ _, hz.2⟩) |
| 337 | have hThetaC1 : ContDiffOn ℝ 1 (Function.uncurry theta) (univ ×ˢ Ioo s tau) := |
| 338 | (hPsiC1 true).comp (hPhiC1.prodMk contDiffOn_snd) |
| 339 | (fun _ hz => ⟨mem_univ _, hz.2⟩) |
| 340 | have hThetaC2 (t : ℝ) (ht : t ∈ Icc s tau) : ContDiff ℝ 2 (fun x => theta x t) := |
| 341 | (hPsiC2 true t ht).comp (hPhiC2 false t ht) |
| 342 | have hThetaPos (t : ℝ) (ht : t ∈ Ioo s tau) (x : ℝ) : |
| 343 | 0 < deriv (fun y => theta y t) x := by |
| 344 | have ht' := Ioo_subset_Icc_self ht |
| 345 | have hder := (((hPsiC2 true t ht').differentiable (by norm_num) |
| 346 | (phi false t x)).hasDerivAt).comp x |
| 347 | (((hPhiC2 false t ht').differentiable (by norm_num) x).hasDerivAt) |
| 348 | change HasDerivAt (fun y => theta y t) |
| 349 | (deriv (fun y => psi true y t) (phi false t x) * deriv (phi false t) x) x at hder |
| 350 | rw [hder.deriv] |
| 351 | exact mul_pos (hPsiPos true t ht' (phi false t x)) (hPhiPos false t ht' x) |
| 352 | have hThetaInit (x : ℝ) : theta x s = x := by |
| 353 | change (phi true s).symm (phi false s x) = x |
| 354 | rw [hphis, OrderIso.symm_apply_apply] |
| 355 | have hcomp : M63C2ShrinkingCurveOn F (fun x t => d (theta x t) t) (Icc s tau) := |
| 356 | c2_congr (hCshort false) (fun t ht x => (hagree t ht x).symm) |
| 357 | have htheta := normal_relabeling_eq_initial_labels (hCshort true) hcomp |
| 358 | (fun x => hThetaCont.comp (continuous_const.prodMk continuous_id).continuousOn |
| 359 | (fun _ ht => ⟨mem_univ _, ht⟩)) |
| 360 | (fun x t ht => ((hThetaC1.contDiffAt |
| 361 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ x, ht⟩)).differentiableAt |
| 362 | (by norm_num)).comp t ((differentiableAt_const x).prodMk differentiableAt_id)) |
| 363 | (fun t ht => (hThetaC2 t (Ioo_subset_Icc_self ht)).differentiable (by norm_num)) |
| 364 | hThetaPos hThetaInit |
| 365 | exact ⟨tau, hstau, htauT, fun t ht x => by simpa only [htheta t ht x] using hagree t ht x⟩ |
| 366 | |
| 367 | /-- Actual short forward agreement extends through every included time. |
| 368 | MT2007 Claim 19.1, p. 437; actual-closed-assembly derivation, |
| 369 | statement 2. Empty and singleton time intervals are retained, and |
| 370 | continuation is performed in the Hausdorff Euclidean image. -/ |
| 371 | theorem c2ShrinkingCurve_unique_closed_of_retraction |
| 372 | {e : M → W} (he : ContMDiff (𝓡 n) 𝓘(ℝ, W) ∞ e) |
| 373 | {N : Set W} (hN : IsOpen N) (heN : range e ⊆ N) {ρ : W → M} |
| 374 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ N) (hret : ∀ p, ρ (e p) = p) |
| 375 | {s T : ℝ} {c d : ℝ → ℝ → M} |
| 376 | (hc : M63C2ShrinkingCurveOn F c (Icc s T)) |
| 377 | (hd : M63C2ShrinkingCurveOn F d (Icc s T)) |
| 378 | (hinit : ∀ x, c x s = d x s) : |
| 379 | ∀ t ∈ Icc s T, ∀ x, c x t = d x t := by |
| 380 | have heinj : Function.Injective e := (show Function.LeftInverse ρ e from hret).injective |
| 381 | have hcE := (c2ShrinkingCurve_embedded_closed_data hc he).2.2.1 |
| 382 | have hdE := (c2ShrinkingCurve_embedded_closed_data hd he).2.2.1 |
| 383 | have heq := eqOn_Icc_of_forward_agreement |
| 384 | (fun x => hcE.comp (continuous_const.prodMk continuous_id).continuousOn |
| 385 | (fun _ ht => ⟨mem_univ _, ht⟩)) |
| 386 | (fun x => hdE.comp (continuous_const.prodMk continuous_id).continuousOn |
| 387 | (fun _ ht => ⟨mem_univ _, ht⟩)) |
| 388 | (fun x => congrArg e (hinit x)) (fun u hu hsame => by |
| 389 | have hsub : Icc u T ⊆ Icc s T := fun _ ht => ⟨hu.1.trans ht.1, ht.2⟩ |
| 390 | obtain ⟨tau, hutau, _htauT, hagree⟩ := exists_forward_c2ShrinkingCurve_agreement |
| 391 | he hN heN hρ hret hu.2 (c2_restrict hc hsub) (c2_restrict hd hsub) |
| 392 | (fun x => heinj (hsame x)) |
| 393 | exact ⟨tau, hutau, fun t ht _ x => congrArg e (hagree t ht x)⟩) |
| 394 | exact fun t ht x => heinj (heq t ht x) |
| 395 | |
| 396 | end PoincareMT.M63 |