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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/HalfSpaceExtensionNative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 6 | import Mathlib.Analysis.Calculus.TangentCone.Prod |
| 7 | import Mathlib.Analysis.Calculus.TangentCone.Real |
| 8 | import Mathlib.LinearAlgebra.Vandermonde |
| 9 | import Mathlib.LinearAlgebra.Matrix.NonsingularInverse |
| 10 | import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension |
| 11 | |
| 12 | /-! |
| 13 | # Finite-order extension at the initial time boundary |
| 14 | |
| 15 | Closed-side Taylor series can be glued when all their boundary jets agree. |
| 16 | Finite reflected combinations obtain the required jet identities from |
| 17 | actual Vandermonde coefficients. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set Filter Matrix |
| 24 | open scoped Topology ContDiff BigOperators |
| 25 | |
| 26 | noncomputable section |
| 27 | |
| 28 | namespace PoincareMT.HalfSpaceExtensionNative |
| 29 | |
| 30 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 31 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 32 | |
| 33 | theorem hasFTaylorSeriesUpToOn_union {k : ℕ∞ω} {f : E → F} |
| 34 | {p : E → FormalMultilinearSeries ℝ E F} {s t : Set E} |
| 35 | (hs : IsClosed s) (ht : IsClosed t) |
| 36 | (hfs : HasFTaylorSeriesUpToOn k f p s) |
| 37 | (hft : HasFTaylorSeriesUpToOn k f p t) : |
| 38 | HasFTaylorSeriesUpToOn k f p (s ∪ t) := by |
| 39 | classical |
| 40 | constructor |
| 41 | · intro x hx |
| 42 | exact hx.elim (hfs.zero_eq x) (hft.zero_eq x) |
| 43 | · intro m hm x _ |
| 44 | apply HasFDerivWithinAt.union |
| 45 | · by_cases hx : x ∈ s |
| 46 | · exact hfs.fderivWithin m hm x hx |
| 47 | · exact HasFDerivWithinAt.of_notMem_closure (by simpa only [hs.closure_eq] using hx) |
| 48 | · by_cases hx : x ∈ t |
| 49 | · exact hft.fderivWithin m hm x hx |
| 50 | · exact HasFDerivWithinAt.of_notMem_closure (by simpa only [ht.closure_eq] using hx) |
| 51 | · intro m hm |
| 52 | exact (hfs.cont m hm).union_of_isClosed (hft.cont m hm) hs ht |
| 53 | |
| 54 | theorem hasFTaylorSeriesUpToOn_sum {k : ℕ∞ω} {ι : Type*} (u : Finset ι) |
| 55 | {f : ι → E → F} {p : ι → E → FormalMultilinearSeries ℝ E F} {s : Set E} |
| 56 | (hf : ∀ i ∈ u, HasFTaylorSeriesUpToOn k (f i) (p i) s) : |
| 57 | HasFTaylorSeriesUpToOn k (fun x => ∑ i ∈ u, f i x) |
| 58 | (fun x m => ∑ i ∈ u, p i x m) s := by |
| 59 | constructor |
| 60 | · intro x hx |
| 61 | simp only [ContinuousMultilinearMap.curry0_apply, ContinuousMultilinearMap.sum_apply] |
| 62 | exact Finset.sum_congr rfl (fun i hi => (hf i hi).zero_eq x hx) |
| 63 | · intro m hm x hx |
| 64 | have hder : HasFDerivWithinAt (fun y => ∑ i ∈ u, p i y m) |
| 65 | (∑ i ∈ u, (p i x m.succ).curryLeft) s x := |
| 66 | HasFDerivWithinAt.fun_sum (fun i hi => (hf i hi).fderivWithin m hm x hx) |
| 67 | apply hder.congr_fderiv |
| 68 | ext v w |
| 69 | simp only [ContinuousMultilinearMap.curryLeft_apply, ContinuousMultilinearMap.sum_apply, |
| 70 | ContinuousLinearMap.sum_apply] |
| 71 | · intro m hm |
| 72 | exact continuousOn_finsetSum u (fun i hi => (hf i hi).cont m hm) |
| 73 | |
| 74 | theorem hasFTaylorSeriesUpToOn_const_smul {k : ℕ∞ω} {f : E → F} |
| 75 | {p : E → FormalMultilinearSeries ℝ E F} {s : Set E} |
| 76 | (hf : HasFTaylorSeriesUpToOn k f p s) (c : ℝ) : |
| 77 | HasFTaylorSeriesUpToOn k (fun x => c • f x) (fun x m => c • p x m) s := by |
| 78 | constructor |
| 79 | · intro x hx |
| 80 | simpa only [ContinuousMultilinearMap.curry0_apply, ContinuousMultilinearMap.smul_apply] using |
| 81 | congrArg (fun v : F => c • v) (hf.zero_eq x hx) |
| 82 | · intro m hm x hx |
| 83 | have hder : HasFDerivWithinAt (fun y => c • p y m) |
| 84 | (c • (p x m.succ).curryLeft) s x := |
| 85 | (hf.fderivWithin m hm x hx).const_smul c |
| 86 | apply hder.congr_fderiv |
| 87 | ext v w |
| 88 | simp only [ContinuousMultilinearMap.curryLeft_apply, ContinuousMultilinearMap.smul_apply, |
| 89 | ContinuousLinearMap.smul_apply] |
| 90 | · intro m hm |
| 91 | exact (hf.cont m hm).const_smul c |
| 92 | |
| 93 | theorem contDiff_piecewise_of_matching_taylor {k : ℕ∞} {f g : E → F} |
| 94 | {p q : E → FormalMultilinearSeries ℝ E F} {s t : Set E} |
| 95 | [DecidablePred (· ∈ s)] |
| 96 | (hs : IsClosed s) (ht : IsClosed t) (hcover : s ∪ t = univ) |
| 97 | (hf : HasFTaylorSeriesUpToOn k f p s) (hg : HasFTaylorSeriesUpToOn k g q t) |
| 98 | (hmatch : ∀ x ∈ s ∩ t, ∀ m : ℕ, m ≤ k → p x m = q x m) : |
| 99 | ContDiff ℝ k (s.piecewise f g) := by |
| 100 | classical |
| 101 | let r : E → FormalMultilinearSeries ℝ E F := s.piecewise p q |
| 102 | have hvalue (x : E) (hx : x ∈ s ∩ t) : f x = g x := by |
| 103 | rw [← hf.zero_eq x hx.1, ← hg.zero_eq x hx.2, hmatch x hx 0 (by simp)] |
| 104 | have hf' : HasFTaylorSeriesUpToOn k (s.piecewise f g) r s := by |
| 105 | apply (hf.congr (fun x hx => by simp [hx])).congr_series |
| 106 | intro m hm x hx |
| 107 | simp [r, hx] |
| 108 | have hg' : HasFTaylorSeriesUpToOn k (s.piecewise f g) r t := by |
| 109 | have hfunction : HasFTaylorSeriesUpToOn k (s.piecewise f g) q t := by |
| 110 | apply hg.congr |
| 111 | intro x hx |
| 112 | by_cases hxs : x ∈ s |
| 113 | · simpa only [Set.piecewise_eq_of_mem s f g hxs] using hvalue x ⟨hxs, hx⟩ |
| 114 | · simp [hxs] |
| 115 | apply hfunction.congr_series |
| 116 | intro m hm x hx |
| 117 | by_cases hxs : x ∈ s |
| 118 | · simpa only [r, Set.piecewise_eq_of_mem s p q hxs] using |
| 119 | (hmatch x ⟨hxs, hx⟩ m (by exact_mod_cast hm)).symm |
| 120 | · simp [r, hxs] |
| 121 | have hglobal := hasFTaylorSeriesUpToOn_union hs ht hf' hg' |
| 122 | rw [hcover] at hglobal |
| 123 | exact contDiffOn_univ.mp hglobal.contDiffOn |
| 124 | |
| 125 | def reflectionScale (k : ℕ) (j : Fin (k + 1)) : ℝ := -((j : ℕ) + 1 : ℝ) |
| 126 | |
| 127 | theorem reflectionScale_neg (k : ℕ) (j : Fin (k + 1)) : reflectionScale k j < 0 := by |
| 128 | dsimp [reflectionScale] |
| 129 | apply neg_lt_zero.mpr |
| 130 | positivity |
| 131 | |
| 132 | theorem reflectionScale_injective (k : ℕ) : Function.Injective (reflectionScale k) := by |
| 133 | intro i j hij |
| 134 | apply Fin.ext |
| 135 | dsimp [reflectionScale] at hij |
| 136 | have hcast : (i : ℝ) = (j : ℝ) := by linarith |
| 137 | exact_mod_cast hcast |
| 138 | |
| 139 | theorem exists_reflectionWeights (k : ℕ) : |
| 140 | ∃ c : Fin (k + 1) → ℝ, ∀ m : Fin (k + 1), |
| 141 | ∑ j, c j * reflectionScale k j ^ (m : ℕ) = 1 := by |
| 142 | let A : Matrix (Fin (k + 1)) (Fin (k + 1)) ℝ := |
| 143 | (Matrix.vandermonde (reflectionScale k)).transpose |
| 144 | have hdet : A.det ≠ 0 := by |
| 145 | rw [Matrix.det_transpose] |
| 146 | exact Matrix.det_vandermonde_ne_zero_iff.mpr (reflectionScale_injective k) |
| 147 | let c : Fin (k + 1) → ℝ := A⁻¹ *ᵥ fun _ => 1 |
| 148 | have hc : A *ᵥ c = fun _ => 1 := by |
| 149 | dsimp [c] |
| 150 | rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv _ (isUnit_iff_ne_zero.mpr hdet), |
| 151 | Matrix.one_mulVec] |
| 152 | refine ⟨c, fun m => ?_⟩ |
| 153 | simpa only [A, Matrix.mulVec, dotProduct, Matrix.transpose_apply, |
| 154 | Matrix.vandermonde_apply, mul_comm] using congrFun hc m |
| 155 | |
| 156 | def timeScale (a : ℝ) : (ℝ × E) →L[ℝ] ℝ × E := |
| 157 | (a • ContinuousLinearMap.fst ℝ ℝ E).prod (ContinuousLinearMap.snd ℝ ℝ E) |
| 158 | |
| 159 | @[simp] theorem timeScale_apply (a : ℝ) (x : ℝ × E) : |
| 160 | timeScale a x = (a * x.1, x.2) := rfl |
| 161 | |
| 162 | @[simp] theorem timeScale_boundary (a : ℝ) (x : E) : |
| 163 | timeScale a (0, x) = (0, x) := by simp |
| 164 | |
| 165 | theorem multilinear_timeScale_expansion {m : ℕ} |
| 166 | (A : (ℝ × E) [×m]→L[ℝ] F) (a : ℝ) (v : Fin m → ℝ × E) : |
| 167 | A (fun i => timeScale a (v i)) = |
| 168 | ∑ s : Finset (Fin m), a ^ s.card • |
| 169 | A (s.piecewise (fun i => ((v i).1, (0 : E))) (fun i => (0, (v i).2))) := by |
| 170 | classical |
| 171 | let vt : Fin m → ℝ × E := fun i => ((v i).1, 0) |
| 172 | let vx : Fin m → ℝ × E := fun i => (0, (v i).2) |
| 173 | have hsplit : (fun i => timeScale a (v i)) = (fun i => a • vt i) + vx := by |
| 174 | funext i |
| 175 | ext <;> simp [vt, vx] |
| 176 | rw [hsplit, A.map_add_univ] |
| 177 | apply Finset.sum_congr rfl |
| 178 | intro s _ |
| 179 | have hpiece : s.piecewise (fun i => a • vt i) vx = |
| 180 | fun i => (if i ∈ s then a else 1) • s.piecewise vt vx i := by |
| 181 | funext i |
| 182 | by_cases hi : i ∈ s <;> simp [Finset.piecewise, hi] |
| 183 | rw [hpiece, A.map_smul_univ] |
| 184 | congr 1 |
| 185 | simp |
| 186 | |
| 187 | theorem weighted_timeScale_jet {k m : ℕ} (hm : m ≤ k) |
| 188 | (c : Fin (k + 1) → ℝ) |
| 189 | (hc : ∀ l : Fin (k + 1), ∑ j, c j * reflectionScale k j ^ (l : ℕ) = 1) |
| 190 | (A : (ℝ × E) [×m]→L[ℝ] F) : |
| 191 | (∑ j, c j • A.compContinuousLinearMap (fun _ => timeScale (reflectionScale k j))) = A := by |
| 192 | classical |
| 193 | ext v |
| 194 | simp only [ContinuousMultilinearMap.sum_apply, ContinuousMultilinearMap.smul_apply, |
| 195 | ContinuousMultilinearMap.compContinuousLinearMap_apply] |
| 196 | simp_rw [multilinear_timeScale_expansion, Finset.smul_sum, smul_smul] |
| 197 | rw [Finset.sum_comm] |
| 198 | simp_rw [← Finset.sum_smul] |
| 199 | have hmoment (s : Finset (Fin m)) : ∑ j, c j * reflectionScale k j ^ s.card = 1 := by |
| 200 | have hcard : s.card ≤ m := by simpa using s.card_le_univ |
| 201 | exact hc ⟨s.card, Nat.lt_succ_of_le (hcard.trans hm)⟩ |
| 202 | simp_rw [hmoment, one_smul] |
| 203 | rw [← A.map_add_univ] |
| 204 | congr 1 |
| 205 | funext i |
| 206 | ext <;> simp |
| 207 | |
| 208 | def upperHalfSpace (E : Type*) : Set (ℝ × E) := Ici 0 ×ˢ univ |
| 209 | |
| 210 | def lowerHalfSpace (E : Type*) : Set (ℝ × E) := Iic 0 ×ˢ univ |
| 211 | |
| 212 | theorem upper_lower_cover : upperHalfSpace E ∪ lowerHalfSpace E = univ := by |
| 213 | ext x |
| 214 | simp only [upperHalfSpace, lowerHalfSpace, mem_union, mem_prod, mem_Ici, mem_Iic, |
| 215 | mem_univ, and_true, iff_true] |
| 216 | exact le_total 0 x.1 |
| 217 | |
| 218 | def reflectionExtension {k : ℕ} (c : Fin (k + 1) → ℝ) (f : ℝ × E → F) : ℝ × E → F := by |
| 219 | classical |
| 220 | exact (upperHalfSpace E).piecewise f |
| 221 | (fun x => ∑ j, c j • f (timeScale (reflectionScale k j) x)) |
| 222 | |
| 223 | theorem reflectionExtension_eqOn_upper {k : ℕ} (c : Fin (k + 1) → ℝ) (f : ℝ × E → F) : |
| 224 | EqOn (reflectionExtension c f) f (upperHalfSpace E) := by |
| 225 | classical |
| 226 | intro x hx |
| 227 | simp [reflectionExtension, hx] |
| 228 | |
| 229 | theorem reflectionExtension_of_negative {k : ℕ} (c : Fin (k + 1) → ℝ) |
| 230 | (f : ℝ × E → F) {x : ℝ × E} (hx : x.1 < 0) : |
| 231 | reflectionExtension c f x = ∑ j, c j • f (timeScale (reflectionScale k j) x) := by |
| 232 | classical |
| 233 | have hx' : x ∉ upperHalfSpace E := by |
| 234 | simpa only [upperHalfSpace, mem_prod, mem_Ici, mem_univ, and_true] using not_le.mpr hx |
| 235 | simp [reflectionExtension, hx'] |
| 236 | |
| 237 | theorem contDiff_reflectionExtension (k : ℕ) (c : Fin (k + 1) → ℝ) |
| 238 | (hc : ∀ m : Fin (k + 1), ∑ j, c j * reflectionScale k j ^ (m : ℕ) = 1) |
| 239 | (f : ℝ × E → F) |
| 240 | (hf : ContDiffOn ℝ k f (upperHalfSpace E)) : |
| 241 | ContDiff ℝ k (reflectionExtension c f) := by |
| 242 | classical |
| 243 | let p : (ℝ × E) → FormalMultilinearSeries ℝ (ℝ × E) F := |
| 244 | ftaylorSeriesWithin ℝ f (upperHalfSpace E) |
| 245 | have hp : HasFTaylorSeriesUpToOn k f p (upperHalfSpace E) := |
| 246 | hf.ftaylorSeriesWithin ((uniqueDiffOn_Ici 0).prod uniqueDiffOn_univ) |
| 247 | let g : ℝ × E → F := fun x => ∑ j, c j • f (timeScale (reflectionScale k j) x) |
| 248 | let q : (ℝ × E) → FormalMultilinearSeries ℝ (ℝ × E) F := fun x m => |
| 249 | ∑ j, c j • (p (timeScale (reflectionScale k j) x) m).compContinuousLinearMap |
| 250 | (fun _ => timeScale (reflectionScale k j)) |
| 251 | have hq : HasFTaylorSeriesUpToOn k g q (lowerHalfSpace E) := by |
| 252 | apply hasFTaylorSeriesUpToOn_sum Finset.univ |
| 253 | intro j _ |
| 254 | apply (hasFTaylorSeriesUpToOn_const_smul |
| 255 | (hp.compContinuousLinearMap (timeScale (reflectionScale k j))) (c j)).mono |
| 256 | intro x hx |
| 257 | exact ⟨mul_nonneg_of_nonpos_of_nonpos (reflectionScale_neg k j).le hx.1, mem_univ _⟩ |
| 258 | have hmatch : ∀ x ∈ upperHalfSpace E ∩ lowerHalfSpace E, |
| 259 | ∀ m : ℕ, m ≤ (k : ℕ∞) → p x m = q x m := by |
| 260 | intro x hx m hm |
| 261 | have htime : x.1 = 0 := le_antisymm hx.2.1 hx.1.1 |
| 262 | have hscale (j : Fin (k + 1)) : timeScale (reflectionScale k j) x = x := by |
| 263 | ext <;> simp [htime] |
| 264 | change p x m = ∑ j, c j • (p (timeScale (reflectionScale k j) x) m).compContinuousLinearMap |
| 265 | (fun _ => timeScale (reflectionScale k j)) |
| 266 | simp_rw [hscale] |
| 267 | exact (weighted_timeScale_jet (by exact_mod_cast hm) c hc (p x m)).symm |
| 268 | exact contDiff_piecewise_of_matching_taylor (isClosed_Ici.prod isClosed_univ) |
| 269 | (isClosed_Iic.prod isClosed_univ) upper_lower_cover hp hq hmatch |
| 270 | |
| 271 | theorem exists_contDiff_extension_halfSpace (k : ℕ) (f : ℝ × E → F) |
| 272 | (hf : ContDiffOn ℝ k f (upperHalfSpace E)) : |
| 273 | ∃ g : ℝ × E → F, ContDiff ℝ k g ∧ EqOn g f (upperHalfSpace E) := by |
| 274 | obtain ⟨c, hc⟩ := exists_reflectionWeights k |
| 275 | exact ⟨reflectionExtension c f, contDiff_reflectionExtension k c hc f hf, |
| 276 | reflectionExtension_eqOn_upper c f⟩ |
| 277 | |
| 278 | theorem exists_local_contDiff_extension_halfSpace [FiniteDimensional ℝ E] |
| 279 | (k : ℕ) (f : ℝ × E → F) {V : Set (ℝ × E)} (hV : IsOpen V) |
| 280 | (hf : ContDiffOn ℝ k f (upperHalfSpace E ∩ V)) (p : E) (hp : (0, p) ∈ V) : |
| 281 | ∃ g : ℝ × E → F, ContDiff ℝ k g ∧ |
| 282 | ∀ᶠ z in 𝓝 ((0 : ℝ), p), 0 ≤ z.1 → g z = f z := by |
| 283 | obtain ⟨δ, hδ, hsub⟩ := Metric.mem_nhds_iff.mp (hV.mem_nhds hp) |
| 284 | let β : ContDiffBump ((0 : ℝ), p) := |
| 285 | { rIn := δ / 4 |
| 286 | rOut := δ / 2 |
| 287 | rIn_pos := by positivity |
| 288 | rIn_lt_rOut := by linarith } |
| 289 | have hβV : tsupport β ⊆ V := by |
| 290 | rw [β.tsupport_eq] |
| 291 | intro z hz |
| 292 | apply hsub |
| 293 | exact lt_of_le_of_lt (Metric.mem_closedBall.mp hz) (by dsimp [β]; linarith) |
| 294 | let H : ℝ × E → F := fun z => β z • f z |
| 295 | have hH : ContDiffOn ℝ k H (upperHalfSpace E) := by |
| 296 | intro z hz |
| 297 | by_cases hzβ : z ∈ tsupport β |
| 298 | · have hlocal : ContDiffWithinAt ℝ k f (upperHalfSpace E) z := |
| 299 | (contDiffWithinAt_inter (hV.mem_nhds (hβV hzβ))).mp (hf z ⟨hz, hβV hzβ⟩) |
| 300 | exact β.contDiffAt.contDiffWithinAt.smul hlocal |
| 301 | · have hzero : ContDiffAt ℝ k H z := by |
| 302 | apply (contDiffAt_const (c := (0 : F))).congr_of_eventuallyEq |
| 303 | filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hzβ] with y hy |
| 304 | simp only [H, hy, Pi.zero_apply, zero_smul] |
| 305 | exact hzero.contDiffWithinAt |
| 306 | obtain ⟨g, hg, hgeq⟩ := exists_contDiff_extension_halfSpace k H hH |
| 307 | refine ⟨g, hg, ?_⟩ |
| 308 | filter_upwards [Metric.ball_mem_nhds ((0 : ℝ), p) β.rIn_pos] with z hz htime |
| 309 | rw [hgeq ⟨htime, mem_univ _⟩] |
| 310 | change β z • f z = f z |
| 311 | rw [β.one_of_mem_closedBall (Metric.ball_subset_closedBall hz), one_smul] |
| 312 | |
| 313 | theorem reflectionExtension_congr_nhds_boundary {k : ℕ} |
| 314 | (c : Fin (k + 1) → ℝ) {f g : ℝ × E → F} {p : E} |
| 315 | (hfg : ∀ᶠ z in 𝓝 ((0 : ℝ), p), 0 ≤ z.1 → f z = g z) : |
| 316 | reflectionExtension c f =ᶠ[𝓝 ((0 : ℝ), p)] reflectionExtension c g := by |
| 317 | classical |
| 318 | have hscaled : ∀ j : Fin (k + 1), ∀ᶠ z in 𝓝 ((0 : ℝ), p), |
| 319 | 0 ≤ (timeScale (reflectionScale k j) z).1 → |
| 320 | f (timeScale (reflectionScale k j) z) = |
| 321 | g (timeScale (reflectionScale k j) z) := by |
| 322 | intro j |
| 323 | have ht : Tendsto (timeScale (reflectionScale k j) : ℝ × E → ℝ × E) |
| 324 | (𝓝 ((0 : ℝ), p)) (𝓝 ((0 : ℝ), p)) := by |
| 325 | have hcont : ContinuousAt (timeScale (reflectionScale k j) : ℝ × E → ℝ × E) |
| 326 | ((0 : ℝ), p) := (timeScale (reflectionScale k j)).continuous.continuousAt |
| 327 | simpa only [timeScale_boundary] using hcont.tendsto |
| 328 | exact ht.eventually hfg |
| 329 | filter_upwards [hfg, Filter.eventually_all.mpr hscaled] with z hz hzs |
| 330 | by_cases htime : 0 ≤ z.1 |
| 331 | · rw [reflectionExtension_eqOn_upper c f ⟨htime, mem_univ _⟩, |
| 332 | reflectionExtension_eqOn_upper c g ⟨htime, mem_univ _⟩] |
| 333 | exact hz htime |
| 334 | · have hneg : z.1 < 0 := lt_of_not_ge htime |
| 335 | rw [reflectionExtension_of_negative c f hneg, reflectionExtension_of_negative c g hneg] |
| 336 | apply Finset.sum_congr rfl |
| 337 | intro j _ |
| 338 | exact congrArg (fun v : F => c j • v) |
| 339 | (hzs j (mul_nonneg_of_nonpos_of_nonpos (reflectionScale_neg k j).le hneg.le)) |
| 340 | |
| 341 | theorem contDiffAt_reflectionExtension_boundary [FiniteDimensional ℝ E] |
| 342 | (k : ℕ) (c : Fin (k + 1) → ℝ) |
| 343 | (hc : ∀ m : Fin (k + 1), ∑ j, c j * reflectionScale k j ^ (m : ℕ) = 1) |
| 344 | (f : ℝ × E → F) {V : Set (ℝ × E)} (hV : IsOpen V) |
| 345 | (hf : ContDiffOn ℝ k f (upperHalfSpace E ∩ V)) (p : E) (hp : (0, p) ∈ V) : |
| 346 | ContDiffAt ℝ k (reflectionExtension c f) (0, p) := by |
| 347 | obtain ⟨g, hg, hgeq⟩ := exists_local_contDiff_extension_halfSpace k f hV hf p hp |
| 348 | apply (contDiff_reflectionExtension k c hc g hg.contDiffOn).contDiffAt.congr_of_eventuallyEq |
| 349 | exact reflectionExtension_congr_nhds_boundary c |
| 350 | (hgeq.mono (fun _ h htime => (h htime).symm)) |
| 351 | |
| 352 | theorem contDiffOn_reflectionExtension_slab_on [FiniteDimensional ℝ E] |
| 353 | (k : ℕ) (c : Fin (k + 1) → ℝ) |
| 354 | (hc : ∀ m : Fin (k + 1), ∑ j, c j * reflectionScale k j ^ (m : ℕ) = 1) |
| 355 | (f : ℝ × E → F) {T : ℝ} (hT : 0 < T) {A : Set E} (hA : IsOpen A) |
| 356 | (hf : ContDiffOn ℝ k f (Ico 0 T ×ˢ A)) : |
| 357 | ContDiffOn ℝ k (reflectionExtension c f) |
| 358 | (Ioo (-T / ((k : ℝ) + 1)) T ×ˢ A) := by |
| 359 | classical |
| 360 | apply (isOpen_Ioo.prod hA).contDiffOn_iff.mpr |
| 361 | intro ⟨t, x⟩ ht |
| 362 | rcases lt_trichotomy t 0 with hneg | hzero | hpos |
| 363 | · have hkpos : 0 < (k : ℝ) + 1 := by positivity |
| 364 | have hbound : ((k : ℝ) + 1) * (-t) < T := by |
| 365 | have h := (div_lt_iff₀ hkpos).mp ht.1.1 |
| 366 | nlinarith |
| 367 | have hscaled (j : Fin (k + 1)) : timeScale (reflectionScale k j) (t, x) ∈ |
| 368 | Ioo 0 T ×ˢ A := by |
| 369 | have hj : (j : ℝ) + 1 ≤ (k : ℝ) + 1 := by |
| 370 | exact_mod_cast Nat.succ_le_of_lt j.is_lt |
| 371 | refine ⟨⟨mul_pos_of_neg_of_neg (reflectionScale_neg k j) hneg, ?_⟩, ht.2⟩ |
| 372 | calc |
| 373 | reflectionScale k j * t = ((j : ℝ) + 1) * (-t) := by |
| 374 | dsimp [reflectionScale] |
| 375 | ring |
| 376 | _ ≤ ((k : ℝ) + 1) * (-t) := |
| 377 | mul_le_mul_of_nonneg_right hj (neg_nonneg.mpr hneg.le) |
| 378 | _ < T := hbound |
| 379 | have hsum : ContDiffAt ℝ k |
| 380 | (fun z : ℝ × E => ∑ j, c j • f (timeScale (reflectionScale k j) z)) (t, x) := by |
| 381 | apply ContDiffAt.sum |
| 382 | intro j _ |
| 383 | have hfj : ContDiffAt ℝ k f (timeScale (reflectionScale k j) (t, x)) := |
| 384 | hf.contDiffAt (prod_mem_nhds (Ico_mem_nhds_iff.mpr (hscaled j).1) |
| 385 | (hA.mem_nhds (hscaled j).2)) |
| 386 | have hscaleSmooth : ContDiff ℝ k |
| 387 | (timeScale (reflectionScale k j) : (ℝ × E) → ℝ × E) := |
| 388 | (timeScale (reflectionScale k j) : (ℝ × E) →L[ℝ] ℝ × E).contDiff |
| 389 | exact (hfj.comp (t, x) hscaleSmooth.contDiffAt).const_smul (c j) |
| 390 | apply hsum.congr_of_eventuallyEq |
| 391 | filter_upwards [(isOpen_lt continuous_fst continuous_const).mem_nhds hneg] with z hz |
| 392 | exact reflectionExtension_of_negative c f hz |
| 393 | · subst t |
| 394 | have hf0 : ContDiffOn ℝ k f (upperHalfSpace E ∩ (Iio T ×ˢ A)) := |
| 395 | hf.mono (fun _ hz => ⟨⟨hz.1.1, hz.2.1⟩, hz.2.2⟩) |
| 396 | exact contDiffAt_reflectionExtension_boundary k c hc f |
| 397 | (isOpen_Iio.prod hA) hf0 x ⟨hT, ht.2⟩ |
| 398 | · have hft : ContDiffAt ℝ k f (t, x) := |
| 399 | hf.contDiffAt (prod_mem_nhds (Ico_mem_nhds_iff.mpr ⟨hpos, ht.1.2⟩) |
| 400 | (hA.mem_nhds ht.2)) |
| 401 | apply hft.congr_of_eventuallyEq |
| 402 | filter_upwards [(isOpen_lt continuous_const continuous_fst).mem_nhds hpos] with z hz |
| 403 | exact reflectionExtension_eqOn_upper c f ⟨hz.le, mem_univ _⟩ |
| 404 | |
| 405 | theorem contDiffOn_reflectionExtension_slab [FiniteDimensional ℝ E] |
| 406 | (k : ℕ) (c : Fin (k + 1) → ℝ) |
| 407 | (hc : ∀ m : Fin (k + 1), ∑ j, c j * reflectionScale k j ^ (m : ℕ) = 1) |
| 408 | (f : ℝ × E → F) {T : ℝ} (hT : 0 < T) |
| 409 | (hf : ContDiffOn ℝ k f (Ico 0 T ×ˢ univ)) : |
| 410 | ContDiffOn ℝ k (reflectionExtension c f) |
| 411 | (Ioo (-T / ((k : ℝ) + 1)) T ×ˢ univ) := |
| 412 | contDiffOn_reflectionExtension_slab_on k c hc f hT isOpen_univ hf |
| 413 | |
| 414 | end PoincareMT.HalfSpaceExtensionNative |
| 415 | |
| 416 | end |