Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
A pull request is already open: #737 refactor(Euler/Elapsed): 1 small module folded into the file that imports it (−17.8%, measured)
1 commit
+0 −142 Euler/ElapsedTimePathGluing.lean deleted
| @@ -1,142 +0,0 @@ | ||
| 1 | -import Euler.PacketMatchingFamily | |
| 2 | -import Euler.PacketShiftedTimeGluing | |
| 3 | - | |
| 4 | -/-! | |
| 5 | -# Joining an actual history with a forward elapsed-time path | |
| 6 | - | |
| 7 | -The two continuous paths have matching traces. This wrapper uses the fixed | |
| 8 | -linear gluing map, proves the true time derivative through the junction, | |
| 9 | -and preserves the original ordered-word Sobolev radius. | |
| 10 | --/ | |
| 11 | - | |
| 12 | -noncomputable section | |
| 13 | - | |
| 14 | -namespace EulerElapsedTimePathGluing | |
| 15 | - | |
| 16 | -open Set ContinuousLinearMap EulerTimeIntervalGlue EulerPacketTimePathGluing | |
| 17 | - EulerVolterraConvolution EulerParameterWordGevrey | |
| 18 | -open scoped ContDiff | |
| 19 | - | |
| 20 | -attribute [local instance] EulerPacketTimePathGluing.compactInterval | |
| 21 | - | |
| 22 | -variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] | |
| 23 | - (S τ : ℝ) (hτ0 : 0 ≤ τ) (hτS : τ ≤ S) | |
| 24 | - (u : C(Icc (0 : ℝ) τ,E)) (v : C(Icc (0 : ℝ) (S-τ),E)) | |
| 25 | - (hmatch : u ⟨τ,hτ0,le_rfl⟩ = v ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 26 | - | |
| 27 | -def pair : Matching (E := E) S τ hτ0 hτS := | |
| 28 | - ⟨(u,shiftPath S τ v),by | |
| 29 | - change u ⟨τ,hτ0,le_rfl⟩-shiftPath S τ v ⟨τ,le_rfl,hτS⟩ = 0 | |
| 30 | - rw [shiftPath_initial S τ hτS,hmatch,sub_self]⟩ | |
| 31 | - | |
| 32 | -def join : C(Icc (0 : ℝ) S,E) := gluePath S τ hτ0 hτS (pair S τ hτ0 hτS u v hmatch) | |
| 33 | - | |
| 34 | -theorem join_eq_projection : join S τ hτ0 hτS u v hmatch = | |
| 35 | - gluePath S τ hτ0 hτS (matchingProjection S τ hτ0 hτS (u,shiftPath S τ v)) := by | |
| 36 | - apply congrArg (gluePath S τ hτ0 hτS) | |
| 37 | - apply Subtype.ext | |
| 38 | - exact (matchingProjection_value S τ hτ0 hτS (u,shiftPath S τ v) (by | |
| 39 | - change u ⟨τ,hτ0,le_rfl⟩ = shiftPath S τ v ⟨τ,le_rfl,hτS⟩ | |
| 40 | - rw [shiftPath_initial S τ hτS] | |
| 41 | - exact hmatch)).symm | |
| 42 | - | |
| 43 | -theorem join_extend (t : ℝ) (ht : t ∈ Icc (0 : ℝ) S) : | |
| 44 | - extendPath S (hτ0.trans hτS) (join S τ hτ0 hτS u v hmatch) t = | |
| 45 | - glue τ (extendPath τ hτ0 u) (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) t := by | |
| 46 | - change glue τ (fun r => u (projIcc 0 τ hτ0 r)) | |
| 47 | - (fun r => shiftPath S τ v (projIcc τ S hτS r)) (projIcc 0 S (hτ0.trans hτS) t) = _ | |
| 48 | - rw [projIcc_of_mem (hτ0.trans hτS) ht] | |
| 49 | - by_cases h : t ≤ τ | |
| 50 | - · simp only [glue,h,ite_true] | |
| 51 | - rfl | |
| 52 | - · have hr : t ∈ Icc τ S := ⟨(not_le.mp h).le,ht.2⟩ | |
| 53 | - have he : t-τ ∈ Icc (0 : ℝ) (S-τ) := | |
| 54 | - ⟨sub_nonneg.mpr hr.1,sub_le_sub_right hr.2 τ⟩ | |
| 55 | - simp only [glue,h,ite_false,projIcc_of_mem hτS hr,shiftPath_apply, | |
| 56 | - extendPath,projIcc_of_mem (sub_nonneg.mpr hτS) he] | |
| 57 | - | |
| 58 | -theorem join_left (t : Icc (0 : ℝ) τ) : | |
| 59 | - join S τ hτ0 hτS u v hmatch ⟨t,t.property.1,t.property.2.trans hτS⟩ = u t := by | |
| 60 | - have he := join_extend S τ hτ0 hτS u v hmatch t ⟨t.property.1,t.property.2.trans hτS⟩ | |
| 61 | - simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) ⟨t.property.1,t.property.2.trans hτS⟩, | |
| 62 | - glue,t.property.2,ite_true,projIcc_of_mem hτ0 t.property] using he | |
| 63 | - | |
| 64 | -theorem join_right (t : Icc τ S) : | |
| 65 | - join S τ hτ0 hτS u v hmatch ⟨t,hτ0.trans t.property.1,t.property.2⟩ = | |
| 66 | - v ⟨(t : ℝ)-τ,sub_nonneg.mpr t.property.1,sub_le_sub_right t.property.2 τ⟩ := by | |
| 67 | - have hreal : extendPath τ hτ0 u τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v (τ-τ) := by | |
| 68 | - simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 69 | - projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch | |
| 70 | - have he := join_extend S τ hτ0 hτS u v hmatch t ⟨hτ0.trans t.property.1,t.property.2⟩ | |
| 71 | - rw [glue_right τ _ _ hreal t t.property.1] at he | |
| 72 | - simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) ⟨hτ0.trans t.property.1,t.property.2⟩, | |
| 73 | - projIcc_of_mem (sub_nonneg.mpr hτS) ⟨sub_nonneg.mpr t.property.1,sub_le_sub_right t.property.2 τ⟩] using he | |
| 74 | - | |
| 75 | -/-- Genuine within-time differentiation holds even at the joining time. -/ | |
| 76 | -theorem join_hasDerivWithinAt | |
| 77 | - (u' : C(Icc (0 : ℝ) τ,E)) (v' : C(Icc (0 : ℝ) (S-τ),E)) | |
| 78 | - (hmatch' : u' ⟨τ,hτ0,le_rfl⟩ = v' ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 79 | - (hu : ∀ t : Icc (0 : ℝ) τ, | |
| 80 | - HasDerivWithinAt (extendPath τ hτ0 u) (u' t) (Icc (0 : ℝ) τ) t) | |
| 81 | - (hv : ∀ t : Icc (0 : ℝ) (S-τ), | |
| 82 | - HasDerivWithinAt (extendPath (S-τ) (sub_nonneg.mpr hτS) v) (v' t) (Icc (0 : ℝ) (S-τ)) t) | |
| 83 | - (t : Icc (0 : ℝ) S) : | |
| 84 | - HasDerivWithinAt (extendPath S (hτ0.trans hτS) (join S τ hτ0 hτS u v hmatch)) | |
| 85 | - (join S τ hτ0 hτS u' v' hmatch' t) (Icc (0 : ℝ) S) t := by | |
| 86 | - have hr : MapsTo (fun s : ℝ => s-τ) (Icc τ S) (Icc (0 : ℝ) (S-τ)) := | |
| 87 | - fun s hs => ⟨sub_nonneg.mpr hs.1,sub_le_sub_right hs.2 τ⟩ | |
| 88 | - have hm : extendPath τ hτ0 u τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v (τ-τ) := by | |
| 89 | - simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 90 | - projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch | |
| 91 | - have hm' : extendPath τ hτ0 u' τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v' (τ-τ) := by | |
| 92 | - simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 93 | - projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch' | |
| 94 | - have hu' (s : ℝ) (hs : s ∈ Icc (0 : ℝ) τ) : | |
| 95 | - HasDerivWithinAt (extendPath τ hτ0 u) (extendPath τ hτ0 u' s) (Icc (0 : ℝ) τ) s := by | |
| 96 | - simpa only [extendPath,projIcc_of_mem hτ0 hs] using hu ⟨s,hs⟩ | |
| 97 | - have hv' (s : ℝ) (hs : s ∈ Icc τ S) : | |
| 98 | - HasDerivWithinAt (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) | |
| 99 | - (extendPath (S-τ) (sub_nonneg.mpr hτS) v' (s-τ)) (Icc τ S) s := by | |
| 100 | - have hd := (hv ⟨s-τ,hr hs⟩).scomp s ((hasDerivAt_id s).sub_const τ).hasDerivWithinAt hr | |
| 101 | - simpa only [one_smul,Function.comp_def,id_eq,extendPath, | |
| 102 | - projIcc_of_mem (sub_nonneg.mpr hτS) (hr hs)] using hd | |
| 103 | - have hd := glue_hasDerivWithinAt S τ hτ0 hτS (extendPath τ hτ0 u) | |
| 104 | - (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) | |
| 105 | - (extendPath τ hτ0 u') (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v' (r-τ)) | |
| 106 | - hm hm' hu' hv' t t.property | |
| 107 | - rw [← join_extend S τ hτ0 hτS u' v' hmatch' t t.property] at hd | |
| 108 | - simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) t.property] using | |
| 109 | - hd.congr_of_mem (fun s hs => join_extend S τ hτ0 hτS u v hmatch s hs) t.property | |
| 110 | - | |
| 111 | -section Parameter | |
| 112 | - | |
| 113 | -variable {X ι : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] [Fintype ι] | |
| 114 | - (p : X → C(Icc (0 : ℝ) τ,E)) (q : X → C(Icc (0 : ℝ) (S-τ),E)) | |
| 115 | - (hp : ContDiff ℝ ∞ p) (hq : ContDiff ℝ ∞ q) | |
| 116 | - (hm : ∀ x, p x ⟨τ,hτ0,le_rfl⟩ = q x ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 117 | - | |
| 118 | -include hp hq hm in | |
| 119 | -theorem join_contDiff : ContDiff ℝ ∞ (fun x => join S τ hτ0 hτS (p x) (q x) (hm x)) := by | |
| 120 | - simp_rw [join_eq_projection] | |
| 121 | - exact (glueOperator (E := E) S τ hτ0 hτS).contDiff.comp | |
| 122 | - (matchingFamily_contDiff S τ hτ0 hτS p (fun x => shiftPath S τ (q x)) | |
| 123 | - hp ((shiftPath (E := E) S τ).contDiff.comp hq)) | |
| 124 | - | |
| 125 | -include hp hq hm in | |
| 126 | -/-- The fixed Sobolev block is bounded by the sum of the input blocks, with | |
| 127 | -no new radius or derivative factor from the time junction. -/ | |
| 128 | -theorem join_block_bound (directions : ι → X) (k n : ℕ) (x : X) : | |
| 129 | - block directions k (fun y => join S τ hτ0 hτS (p y) (q y) (hm y)) n x ≤ | |
| 130 | - block directions k p n x+block directions k q n x := by | |
| 131 | - simp_rw [join_eq_projection] | |
| 132 | - have hm' (y) : p y ⟨τ,hτ0,le_rfl⟩ = shiftPath S τ (q y) ⟨τ,le_rfl,hτS⟩ := by | |
| 133 | - rw [shiftPath_initial S τ hτS] | |
| 134 | - exact hm y | |
| 135 | - have hb := matchingFamily_glue_block S τ hτ0 hτS directions k p (fun y => shiftPath S τ (q y)) | |
| 136 | - hp ((shiftPath (E := E) S τ).contDiff.comp hq) hm' n x | |
| 137 | - exact hb.trans (by | |
| 138 | - gcongr | |
| 139 | - exact shiftPath_block_bound S τ directions k q hq n x) | |
| 140 | - | |
| 141 | -end Parameter | |
| 142 | -end EulerElapsedTimePathGluing | |
+151 −1 Euler/ElapsedTimePathNaturality.lean View file
| @@ -1,8 +1,158 @@ | ||
| 1 | -import Euler.ElapsedTimePathGluing | |
| 1 | +import Euler.PacketMatchingFamily | |
| 2 | +import Euler.PacketShiftedTimeGluing | |
| 2 | 3 | import Euler.LpCylinderPaths |
| 3 | 4 | |
| 4 | 5 | /-! Bounded spatial maps and mixed derivative words commute with the actual elapsed-time join. -/ |
| 5 | 6 | |
| 7 | +/-! ## From `Euler/ElapsedTimePathGluing.lean` | |
| 8 | + | |
| 9 | +The text of `Euler/ElapsedTimePathGluing.lean`, folded into this file, which was its only importer. -/ | |
| 10 | + | |
| 11 | +section | |
| 12 | + | |
| 13 | +/-! | |
| 14 | +# Joining an actual history with a forward elapsed-time path | |
| 15 | + | |
| 16 | +The two continuous paths have matching traces. This wrapper uses the fixed | |
| 17 | +linear gluing map, proves the true time derivative through the junction, | |
| 18 | +and preserves the original ordered-word Sobolev radius. | |
| 19 | +-/ | |
| 20 | + | |
| 21 | +noncomputable section | |
| 22 | + | |
| 23 | +namespace EulerElapsedTimePathGluing | |
| 24 | + | |
| 25 | +open Set ContinuousLinearMap EulerTimeIntervalGlue EulerPacketTimePathGluing | |
| 26 | + EulerVolterraConvolution EulerParameterWordGevrey | |
| 27 | +open scoped ContDiff | |
| 28 | + | |
| 29 | +attribute [local instance] EulerPacketTimePathGluing.compactInterval | |
| 30 | + | |
| 31 | +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] | |
| 32 | + (S τ : ℝ) (hτ0 : 0 ≤ τ) (hτS : τ ≤ S) | |
| 33 | + (u : C(Icc (0 : ℝ) τ,E)) (v : C(Icc (0 : ℝ) (S-τ),E)) | |
| 34 | + (hmatch : u ⟨τ,hτ0,le_rfl⟩ = v ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 35 | + | |
| 36 | +def pair : Matching (E := E) S τ hτ0 hτS := | |
| 37 | + ⟨(u,shiftPath S τ v),by | |
| 38 | + change u ⟨τ,hτ0,le_rfl⟩-shiftPath S τ v ⟨τ,le_rfl,hτS⟩ = 0 | |
| 39 | + rw [shiftPath_initial S τ hτS,hmatch,sub_self]⟩ | |
| 40 | + | |
| 41 | +def join : C(Icc (0 : ℝ) S,E) := gluePath S τ hτ0 hτS (pair S τ hτ0 hτS u v hmatch) | |
| 42 | + | |
| 43 | +theorem join_eq_projection : join S τ hτ0 hτS u v hmatch = | |
| 44 | + gluePath S τ hτ0 hτS (matchingProjection S τ hτ0 hτS (u,shiftPath S τ v)) := by | |
| 45 | + apply congrArg (gluePath S τ hτ0 hτS) | |
| 46 | + apply Subtype.ext | |
| 47 | + exact (matchingProjection_value S τ hτ0 hτS (u,shiftPath S τ v) (by | |
| 48 | + change u ⟨τ,hτ0,le_rfl⟩ = shiftPath S τ v ⟨τ,le_rfl,hτS⟩ | |
| 49 | + rw [shiftPath_initial S τ hτS] | |
| 50 | + exact hmatch)).symm | |
| 51 | + | |
| 52 | +theorem join_extend (t : ℝ) (ht : t ∈ Icc (0 : ℝ) S) : | |
| 53 | + extendPath S (hτ0.trans hτS) (join S τ hτ0 hτS u v hmatch) t = | |
| 54 | + glue τ (extendPath τ hτ0 u) (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) t := by | |
| 55 | + change glue τ (fun r => u (projIcc 0 τ hτ0 r)) | |
| 56 | + (fun r => shiftPath S τ v (projIcc τ S hτS r)) (projIcc 0 S (hτ0.trans hτS) t) = _ | |
| 57 | + rw [projIcc_of_mem (hτ0.trans hτS) ht] | |
| 58 | + by_cases h : t ≤ τ | |
| 59 | + · simp only [glue,h,ite_true] | |
| 60 | + rfl | |
| 61 | + · have hr : t ∈ Icc τ S := ⟨(not_le.mp h).le,ht.2⟩ | |
| 62 | + have he : t-τ ∈ Icc (0 : ℝ) (S-τ) := | |
| 63 | + ⟨sub_nonneg.mpr hr.1,sub_le_sub_right hr.2 τ⟩ | |
| 64 | + simp only [glue,h,ite_false,projIcc_of_mem hτS hr,shiftPath_apply, | |
| 65 | + extendPath,projIcc_of_mem (sub_nonneg.mpr hτS) he] | |
| 66 | + | |
| 67 | +theorem join_left (t : Icc (0 : ℝ) τ) : | |
| 68 | + join S τ hτ0 hτS u v hmatch ⟨t,t.property.1,t.property.2.trans hτS⟩ = u t := by | |
| 69 | + have he := join_extend S τ hτ0 hτS u v hmatch t ⟨t.property.1,t.property.2.trans hτS⟩ | |
| 70 | + simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) ⟨t.property.1,t.property.2.trans hτS⟩, | |
| 71 | + glue,t.property.2,ite_true,projIcc_of_mem hτ0 t.property] using he | |
| 72 | + | |
| 73 | +theorem join_right (t : Icc τ S) : | |
| 74 | + join S τ hτ0 hτS u v hmatch ⟨t,hτ0.trans t.property.1,t.property.2⟩ = | |
| 75 | + v ⟨(t : ℝ)-τ,sub_nonneg.mpr t.property.1,sub_le_sub_right t.property.2 τ⟩ := by | |
| 76 | + have hreal : extendPath τ hτ0 u τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v (τ-τ) := by | |
| 77 | + simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 78 | + projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch | |
| 79 | + have he := join_extend S τ hτ0 hτS u v hmatch t ⟨hτ0.trans t.property.1,t.property.2⟩ | |
| 80 | + rw [glue_right τ _ _ hreal t t.property.1] at he | |
| 81 | + simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) ⟨hτ0.trans t.property.1,t.property.2⟩, | |
| 82 | + projIcc_of_mem (sub_nonneg.mpr hτS) ⟨sub_nonneg.mpr t.property.1,sub_le_sub_right t.property.2 τ⟩] using he | |
| 83 | + | |
| 84 | +/-- Genuine within-time differentiation holds even at the joining time. -/ | |
| 85 | +theorem join_hasDerivWithinAt | |
| 86 | + (u' : C(Icc (0 : ℝ) τ,E)) (v' : C(Icc (0 : ℝ) (S-τ),E)) | |
| 87 | + (hmatch' : u' ⟨τ,hτ0,le_rfl⟩ = v' ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 88 | + (hu : ∀ t : Icc (0 : ℝ) τ, | |
| 89 | + HasDerivWithinAt (extendPath τ hτ0 u) (u' t) (Icc (0 : ℝ) τ) t) | |
| 90 | + (hv : ∀ t : Icc (0 : ℝ) (S-τ), | |
| 91 | + HasDerivWithinAt (extendPath (S-τ) (sub_nonneg.mpr hτS) v) (v' t) (Icc (0 : ℝ) (S-τ)) t) | |
| 92 | + (t : Icc (0 : ℝ) S) : | |
| 93 | + HasDerivWithinAt (extendPath S (hτ0.trans hτS) (join S τ hτ0 hτS u v hmatch)) | |
| 94 | + (join S τ hτ0 hτS u' v' hmatch' t) (Icc (0 : ℝ) S) t := by | |
| 95 | + have hr : MapsTo (fun s : ℝ => s-τ) (Icc τ S) (Icc (0 : ℝ) (S-τ)) := | |
| 96 | + fun s hs => ⟨sub_nonneg.mpr hs.1,sub_le_sub_right hs.2 τ⟩ | |
| 97 | + have hm : extendPath τ hτ0 u τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v (τ-τ) := by | |
| 98 | + simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 99 | + projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch | |
| 100 | + have hm' : extendPath τ hτ0 u' τ = extendPath (S-τ) (sub_nonneg.mpr hτS) v' (τ-τ) := by | |
| 101 | + simpa only [extendPath,sub_self,projIcc_of_mem hτ0 ⟨hτ0,le_rfl⟩, | |
| 102 | + projIcc_of_mem (sub_nonneg.mpr hτS) ⟨le_rfl,sub_nonneg.mpr hτS⟩] using hmatch' | |
| 103 | + have hu' (s : ℝ) (hs : s ∈ Icc (0 : ℝ) τ) : | |
| 104 | + HasDerivWithinAt (extendPath τ hτ0 u) (extendPath τ hτ0 u' s) (Icc (0 : ℝ) τ) s := by | |
| 105 | + simpa only [extendPath,projIcc_of_mem hτ0 hs] using hu ⟨s,hs⟩ | |
| 106 | + have hv' (s : ℝ) (hs : s ∈ Icc τ S) : | |
| 107 | + HasDerivWithinAt (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) | |
| 108 | + (extendPath (S-τ) (sub_nonneg.mpr hτS) v' (s-τ)) (Icc τ S) s := by | |
| 109 | + have hd := (hv ⟨s-τ,hr hs⟩).scomp s ((hasDerivAt_id s).sub_const τ).hasDerivWithinAt hr | |
| 110 | + simpa only [one_smul,Function.comp_def,id_eq,extendPath, | |
| 111 | + projIcc_of_mem (sub_nonneg.mpr hτS) (hr hs)] using hd | |
| 112 | + have hd := glue_hasDerivWithinAt S τ hτ0 hτS (extendPath τ hτ0 u) | |
| 113 | + (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v (r-τ)) | |
| 114 | + (extendPath τ hτ0 u') (fun r => extendPath (S-τ) (sub_nonneg.mpr hτS) v' (r-τ)) | |
| 115 | + hm hm' hu' hv' t t.property | |
| 116 | + rw [← join_extend S τ hτ0 hτS u' v' hmatch' t t.property] at hd | |
| 117 | + simpa only [extendPath,projIcc_of_mem (hτ0.trans hτS) t.property] using | |
| 118 | + hd.congr_of_mem (fun s hs => join_extend S τ hτ0 hτS u v hmatch s hs) t.property | |
| 119 | + | |
| 120 | +section Parameter | |
| 121 | + | |
| 122 | +variable {X ι : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] [Fintype ι] | |
| 123 | + (p : X → C(Icc (0 : ℝ) τ,E)) (q : X → C(Icc (0 : ℝ) (S-τ),E)) | |
| 124 | + (hp : ContDiff ℝ ∞ p) (hq : ContDiff ℝ ∞ q) | |
| 125 | + (hm : ∀ x, p x ⟨τ,hτ0,le_rfl⟩ = q x ⟨0,le_rfl,sub_nonneg.mpr hτS⟩) | |
| 126 | + | |
| 127 | +include hp hq hm in | |
| 128 | +theorem join_contDiff : ContDiff ℝ ∞ (fun x => join S τ hτ0 hτS (p x) (q x) (hm x)) := by | |
| 129 | + simp_rw [join_eq_projection] | |
| 130 | + exact (glueOperator (E := E) S τ hτ0 hτS).contDiff.comp | |
| 131 | + (matchingFamily_contDiff S τ hτ0 hτS p (fun x => shiftPath S τ (q x)) | |
| 132 | + hp ((shiftPath (E := E) S τ).contDiff.comp hq)) | |
| 133 | + | |
| 134 | +include hp hq hm in | |
| 135 | +/-- The fixed Sobolev block is bounded by the sum of the input blocks, with | |
| 136 | +no new radius or derivative factor from the time junction. -/ | |
| 137 | +theorem join_block_bound (directions : ι → X) (k n : ℕ) (x : X) : | |
| 138 | + block directions k (fun y => join S τ hτ0 hτS (p y) (q y) (hm y)) n x ≤ | |
| 139 | + block directions k p n x+block directions k q n x := by | |
| 140 | + simp_rw [join_eq_projection] | |
| 141 | + have hm' (y) : p y ⟨τ,hτ0,le_rfl⟩ = shiftPath S τ (q y) ⟨τ,le_rfl,hτS⟩ := by | |
| 142 | + rw [shiftPath_initial S τ hτS] | |
| 143 | + exact hm y | |
| 144 | + have hb := matchingFamily_glue_block S τ hτ0 hτS directions k p (fun y => shiftPath S τ (q y)) | |
| 145 | + hp ((shiftPath (E := E) S τ).contDiff.comp hq) hm' n x | |
| 146 | + exact hb.trans (by | |
| 147 | + gcongr | |
| 148 | + exact shiftPath_block_bound S τ directions k q hq n x) | |
| 149 | + | |
| 150 | +end Parameter | |
| 151 | +end EulerElapsedTimePathGluing | |
| 152 | +end | |
| 153 | + | |
| 154 | +end | |
| 155 | + | |
| 6 | 156 | noncomputable section |
| 7 | 157 | |
| 8 | 158 | namespace EulerElapsedTimePathGluing |
+20 −0 routes/s5-euler-elapsed-2/README.md added View file
| @@ -0,0 +1,20 @@ | ||
| 1 | +--- | |
| 2 | +issue: 14 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s5-euler-elapsed-2 | |
| 6 | + | |
| 7 | +One unit of S-5: Lean Pool's "fewer modules" for the family `Euler/Elapsed*`. The | |
| 8 | +module `Euler/ElapsedTimePathGluing.lean` (142 lines) had exactly one importer, | |
| 9 | +`Euler/ElapsedTimePathNaturality.lean`, so it is folded into that file, text unchanged, | |
| 10 | +under a heading that names where it came from and in a `section` of its own. The file takes | |
| 11 | +over its imports and the import line is gone. The tool that does it is | |
| 12 | +`docs/s5-folding/fold.py`, the plan is `plan.json` here, and `python3 -I | |
| 13 | +docs/s5-folding/fold.py check . plan.json` rebuilds every changed file from main's text | |
| 14 | +and compares byte for byte. | |
| 15 | + | |
| 16 | +## Next | |
| 17 | + | |
| 18 | +The pull request is open. What comes next is the maintainer's verdict on this unit of the | |
| 19 | +series; the rest of the family's folds wait on it, one pull request at a time. | |
| 20 | +Nothing here reads worse folded than the two files did apart. | |
+9 −0 routes/s5-euler-elapsed-2/plan.json added View file
| @@ -0,0 +1,9 @@ | ||
| 1 | +{ | |
| 2 | +"imports": "in place", | |
| 3 | +"folds": { | |
| 4 | +"Euler/ElapsedTimePathNaturality.lean": [ | |
| 5 | +"Euler/ElapsedTimePathGluing.lean", | |
| 6 | +"Euler/ElapsedTimePathNaturality.lean" | |
| 7 | +] | |
| 8 | +} | |
| 9 | +} | |