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

| 1 | import NavierStokes.ActualParticularControl |
| 2 | import NavierStokes.ActualSignedGeometry |
| 3 | |
| 4 | /-! |
| 5 | # Complete controls for the scaled actual particular inverse |
| 6 | |
| 7 | The clock, normal, integration interval and native geometry are transported |
| 8 | together. The forcing is the current target residual, with no source |
| 9 | naturality assumption and no supplied modal-control record. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | namespace NavierStokes.ScaledActualParticularControl |
| 15 | |
| 16 | open Set Function Filter WeightedClasses PhaseJetBounds PrimaryPulseBounds |
| 17 | open CommonCoverSolve TorusInverse ParticularWaveBounds LabelSumBounds |
| 18 | open ActualParticularControl |
| 19 | open scoped Topology ContDiff InnerProductSpace BigOperators |
| 20 | |
| 21 | abbrev Plane := TorusInverse.Plane |
| 22 | abbrev Slow := PhaseCalculus.Slow |
| 23 | |
| 24 | |
| 25 | variable {Label P : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 26 | {D : PhaseJetBounds.Domain (Label × ℕ) Slow} |
| 27 | |
| 28 | noncomputable def targetDomain (s : StripData P) |
| 29 | (φ : (Label × ℕ) → Slow →L[ℝ] Slow) : PhaseJetBounds.Domain (Label × ℕ) Slow where |
| 30 | scale i := s.slow i.2 |
| 31 | carrier i := φ i ⁻¹' D.carrier i |
| 32 | isOpen i := (D.isOpen i).preimage (φ i).continuous |
| 33 | one_le_scale i := s.one_le_slow i.2 |
| 34 | |
| 35 | noncomputable def interval (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 36 | (i : Label × ℕ) : Set ℝ := (fun v => clock.value i.1 i.2*v) ⁻¹' F.V i |
| 37 | |
| 38 | theorem interval_open (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 39 | (i : Label × ℕ) : IsOpen (interval F clock i) := |
| 40 | (F.openV i).preimage (continuous_const.mul continuous_id) |
| 41 | |
| 42 | noncomputable def length (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 43 | (l : Label) (n : ℕ) : ℝ := F.L (l,n)/clock.value l n |
| 44 | |
| 45 | theorem length_pos (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 46 | (l : Label) (n : ℕ) : 0 < length F clock l n := |
| 47 | div_pos (F.L_pos (l,n)) (clock.value_pos l n) |
| 48 | |
| 49 | theorem clock_mem (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 50 | {l : Label} {n : ℕ} {v : ℝ} (hv : v ∈ Icc 0 (length F clock l n)) : |
| 51 | clock.value l n*v ∈ Icc 0 (F.L (l,n)) := by |
| 52 | refine ⟨mul_nonneg (clock.value_pos l n).le hv.1, ?_⟩ |
| 53 | simpa only [mul_comm] using (le_div_iff₀ (clock.value_pos l n)).mp hv.2 |
| 54 | |
| 55 | theorem interval_contains (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 56 | (i : Label × ℕ) : Icc 0 (length F clock i.1 i.2) ⊆ interval F clock i := |
| 57 | fun _ hv => F.interval i (clock_mem F clock hv) |
| 58 | |
| 59 | noncomputable def geometry (reference : Label → ℕ → Geometry) (gap : Label → ℕ → ℕ) |
| 60 | (clock : ActualSignedControl.PositiveScale Label) (l : Label) (n : ℕ) : Geometry := |
| 61 | CopySolveCompatibility.transportGeometry (reference l n) (gap l n) 0 (clock.value l n) |
| 62 | (clock.value_pos l n).ne' |
| 63 | |
| 64 | noncomputable def envelope (F : PhaseConstruction D) (clock : ActualSignedControl.PositiveScale Label) |
| 65 | (l : Label) (n : ℕ) (v : ℝ) : ℝ := |
| 66 | referenceP (F.lam (l,n)) (F.u (l,n)) (F.L (l,n)) (clock.value l n*v) |
| 67 | |
| 68 | noncomputable def frame (F : PhaseConstruction D) |
| 69 | (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 70 | (clock normal : ActualSignedControl.PositiveScale Label) (i : Label × ℕ) : |
| 71 | PrimaryODE.FrameData Slow := |
| 72 | scaledSelectedFrame F φ (fun i => clock.value i.1 i.2) (fun i => normal.value i.1 i.2) i |
| 73 | |
| 74 | noncomputable def neighborhood (s : StripData P) (F : PhaseConstruction D) |
| 75 | (χ : P →L[ℝ] Slow) (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 76 | (clock : ActualSignedControl.PositiveScale Label) (g : Label → ℕ → Geometry) |
| 77 | (l : Label) (n : ℕ) (k : Frequency) : Set (P × Plane) := |
| 78 | {x | x.1 ∈ s.domain ∧ φ (l,n) (χ x.1) ∈ D.carrier (l,n) ∧ |
| 79 | ((g l n).coordinates k x.2).2 ∈ Ioo 0 (length F clock l n)} |
| 80 | |
| 81 | noncomputable def patch (s : StripData P) (F : PhaseConstruction D) |
| 82 | (χ : P →L[ℝ] Slow) (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 83 | (clock : ActualSignedControl.PositiveScale Label) (g : Label → ℕ → Geometry) |
| 84 | (r : Label → ℕ → ℝ) (l : Label) (n : ℕ) (k : Frequency) : Set (P × Plane) := |
| 85 | neighborhood s F χ φ clock g l n k ∩ |
| 86 | {x | ((g l n).coordinates k x.2).1 ∈ Icc (-(r l n)) (r l n)} |
| 87 | |
| 88 | theorem neighborhood_open (s : StripData P) (F : PhaseConstruction D) |
| 89 | (χ : P →L[ℝ] Slow) (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 90 | (clock : ActualSignedControl.PositiveScale Label) (g : Label → ℕ → Geometry) |
| 91 | (l : Label) (n : ℕ) (k : Frequency) : |
| 92 | IsOpen (neighborhood s F χ φ clock g l n k) := |
| 93 | (s.isOpen_domain.preimage continuous_fst).inter |
| 94 | (((D.isOpen (l,n)).preimage (((φ (l,n)).comp χ).continuous.comp continuous_fst)).inter |
| 95 | (isOpen_Ioo.preimage (((g l n).coordinates_contDiff k).continuous.comp continuous_snd |>.snd))) |
| 96 | |
| 97 | private theorem frame_smooth_mono {Q : Type} [NormedAddCommGroup Q] [NormedSpace ℝ Q] |
| 98 | {d : PrimaryODE.FrameData Q} {U V : Set (Q × ℝ)} (h : d.SmoothOn U) (hVU : V ⊆ U) : |
| 99 | d.SmoothOn V := |
| 100 | ⟨h.beta.mono hVU, h.betaDot.mono hVU, h.rho.mono hVU, h.rhoDot.mono hVU, |
| 101 | h.rotation.mono hVU, h.F.mono hVU, h.shear.mono hVU, fun i => (h.frame i).mono hVU, |
| 102 | h.eigenvalue.mono hVU, h.eigenvector.mono hVU, h.eigenRate.mono hVU, |
| 103 | h.viscosity.mono hVU, fun x hx => h.eigenvector_ne_zero x (hVU hx)⟩ |
| 104 | |
| 105 | /-- Every frame jet follows from the selected reference phase and the |
| 106 | existing bounded affine/positive-scale data. -/ |
| 107 | theorem frame_jets (s : StripData P) (F : PhaseConstruction D) |
| 108 | (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 109 | (clock normal : ActualSignedControl.PositiveScale Label) |
| 110 | {A B : ℝ} (hA : 1 ≤ A) (hB : 1 ≤ B) |
| 111 | (hφ : ∀ i, ‖φ i‖ ≤ A) (hscale : ∀ i, D.scale i ≤ B*s.slow i.2) : |
| 112 | FrameJets ((targetDomain (D := D) s φ).slot (interval F clock) (interval_open F clock)) |
| 113 | (frame F φ clock normal) := by |
| 114 | let R := max clock.upper normal.upper |
| 115 | have hR : 1 ≤ R := clock.upper_one.trans (le_max_left _ _) |
| 116 | have hclock (i : Label × ℕ) : |clock.value i.1 i.2| ≤ R := by |
| 117 | rw [abs_of_pos (clock.value_pos i.1 i.2)] |
| 118 | exact (clock.bounds i.1 i.2).2.trans (le_max_left _ _) |
| 119 | have hnormal (i : Label × ℕ) : |normal.value i.1 i.2| ≤ R := by |
| 120 | rw [abs_of_pos (normal.value_pos i.1 i.2)] |
| 121 | exact (normal.bounds i.1 i.2).2.trans (le_max_right _ _) |
| 122 | have hlin (i : Label × ℕ) : |
| 123 | ‖transportArgument (φ i) (clock.value i.1 i.2)‖ ≤ (A+R)*s.slow i.2^0 := by |
| 124 | simpa only [pow_zero,mul_one] using (norm_transportArgument_le _ _).trans |
| 125 | (add_le_add (hφ i) (hclock i)) |
| 126 | have hj := transported_frame_jets (selected_frame_jets F) φ (fun _ => 0) (fun _ => 0) |
| 127 | (fun i => clock.value i.1 i.2) (fun i => normal.value i.1 i.2) |
| 128 | (a := 0) (b := 1) |
| 129 | (T := (targetDomain (D := D) s φ).slot (interval F clock) (interval_open F clock)) |
| 130 | (show 1 ≤ A+R by linarith) hB hR hclock hnormal hlin |
| 131 | (by simpa only [targetDomain,Domain.slot,pow_one] using hscale) |
| 132 | (by intro i z hz; simp only [add_zero, zero_add]; exact ⟨hz.1, hz.2⟩) |
| 133 | simp only [add_zero] at hj ⊢ |
| 134 | exact hj |
| 135 | |
| 136 | /-- All fields of the scaled modal control are derived. The remaining |
| 137 | quantitative inputs are affine/scale/rectangle facts about the chosen |
| 138 | geometry and the current source coefficient class. -/ |
| 139 | noncomputable def scaledControl |
| 140 | (s : StripData P) (F : PhaseConstruction D) (χ : P →L[ℝ] Slow) |
| 141 | (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 142 | (clock normal : ActualSignedControl.PositiveScale Label) |
| 143 | (reference : Label → ℕ → Geometry) (gap : Label → ℕ → ℕ) (r : Label → ℕ → ℝ) |
| 144 | {A B C : ℝ} {a : ℕ} (hA : 1 ≤ A) (hB : 1 ≤ B) (hC : 1 ≤ C) |
| 145 | (hφ : ∀ i, ‖φ i‖ ≤ A) (hscale : ∀ i, D.scale i ≤ B*s.slow i.2) |
| 146 | (hsep : ∀ l n, WaveEnvelopeTransport.Separated (reference l n) (r l n) (F.L (l,n))) |
| 147 | (hgeometry : ∀ l n, CommonCoverClass.argumentCost (geometry reference gap clock l n) ≤ C*s.slow n^a) |
| 148 | (j : ℤ) (hj : j ≠ 0) {α : ℝ} (f : Label → ℕ → P × Plane → ProblemStatement.Space) |
| 149 | (hf : UniformWaveClass (CommonCoverClass.sourceStrip s) |
| 150 | (groupedEnvelope (geometry reference gap clock) r (length F clock) (envelope F clock)) α f) : |
| 151 | ParticularCopyBounds.UniformModalControl (CommonCoverClass.sourceStrip s) α |
| 152 | (fun l n => nativeFrame (frame F φ clock normal (l,n)) χ) |
| 153 | (fun l n => PrimaryCopyBridge.frameTangentData (nativeFrame (frame F φ clock normal (l,n)) χ) j (f l n)) |
| 154 | j (geometry reference gap clock) (length F clock) (envelope F clock) |
| 155 | (patch s F χ φ clock (geometry reference gap clock) r) := by |
| 156 | let g := geometry reference gap clock |
| 157 | let Lc := F.M*B/clock.lower |
| 158 | let K := Lc + Real.exp ((F.E+4*F.C)*F.M) + C + 1 |
| 159 | have hLc : 0 ≤ Lc := div_nonneg (mul_nonneg (zero_le_one.trans F.one_le_M) |
| 160 | (zero_le_one.trans hB)) clock.lower_pos.le |
| 161 | have hK : 1 ≤ K := by dsimp [K]; linarith [Real.exp_pos ((F.E+4*F.C)*F.M)] |
| 162 | have hCK : C ≤ K := by dsimp [K]; linarith [Real.exp_pos ((F.E+4*F.C)*F.M)] |
| 163 | have hLK : Lc ≤ K := by dsimp [K]; linarith [Real.exp_pos ((F.E+4*F.C)*F.M)] |
| 164 | have heK : Real.exp ((F.E+4*F.C)*F.M) ≤ K := by dsimp [K]; linarith |
| 165 | have hd := frame_jets s F φ clock normal hA hB hφ hscale |
| 166 | have hcopy (l : Label) (n : ℕ) (k : Frequency) : |
| 167 | (PrimaryCopyBridge.copyFrame (nativeFrame (frame F φ clock normal (l,n)) χ) (g l n) k).SmoothOn |
| 168 | (neighborhood s F χ φ clock g l n k ×ˢ interval F clock (l,n)) := by |
| 169 | change (PrimaryCopyBridge.reindex (frame F φ clock normal (l,n)) |
| 170 | (fun x : P × Plane => χ x.1)).SmoothOn _ |
| 171 | exact PrimaryCopyBridge.reindex_smoothOn _ _ (hd.smoothOn (l,n)) |
| 172 | (frameArgument χ).contDiff.contDiffOn (fun z hz => ⟨hz.1.2.1,hz.2⟩) |
| 173 | have hsource (l : Label) (n : ℕ) (k : Frequency) : |
| 174 | ContDiffOn ℝ ∞ (PrimaryCopyBridge.copySource (f l n) (g l n) k) |
| 175 | (neighborhood s F χ φ clock g l n k ×ˢ interval F clock (l,n)) := |
| 176 | PrimaryCopyBridge.copySource_contDiffOn (g l n) k (hf.smooth l n) (fun z hz => hz.1.1) |
| 177 | have hlength (l : Label) (n : ℕ) : F.L (l,n) ≤ F.M*D.scale (l,n) := by |
| 178 | simpa only [abs_of_pos (F.L_pos (l,n))] using F.slot (l,n) (F.L (l,n)) |
| 179 | (F.interval (l,n) ⟨(F.L_pos (l,n)).le,le_rfl⟩) |
| 180 | have hsepTarget (l : Label) (n : ℕ) : WaveEnvelopeTransport.Separated (g l n) (r l n) (length F clock l n) := |
| 181 | separated_transport (hsep l n) (clock.value_pos l n) (gap l n) |
| 182 | have herror : 0 ≤ F.E+4*F.C := by linarith [F.E_nonneg,F.C_nonneg] |
| 183 | refine { |
| 184 | neighborhood := neighborhood s F χ φ clock g |
| 185 | open_neighborhood := neighborhood_open s F χ φ clock g |
| 186 | contains := fun _ _ _ _ _ hx => hx.1 |
| 187 | interval := fun l n => interval F clock (l,n) |
| 188 | open_interval := fun l n => interval_open F clock (l,n) |
| 189 | length_pos := length_pos F clock |
| 190 | contains_interval := fun l n => interval_contains F clock (l,n) |
| 191 | bridge := ?_ |
| 192 | coefficient_smooth := fun l n k => (hcopy l n k).coefficient j |
| 193 | forcing_smooth := fun l n k => (hcopy l n k).forcing (hsource l n k) |
| 194 | columns_smooth := ?_ |
| 195 | current_slot := fun _ _ _ _ hx => hx.2.2 |
| 196 | rate := fun l n v => clock.value l n * GaussianEnvelope.referenceRate |
| 197 | (F.lam (l,n)) (F.u (l,n)) (F.L (l,n)) (clock.value l n*v) |
| 198 | envelope_pos := fun _ _ _ => referenceP_pos _ _ _ _ |
| 199 | envelope_deriv := ?_ |
| 200 | errorRate := fun l n => clock.value l n*((F.E+4*F.C)/D.scale (l,n)) |
| 201 | errorRate_nonneg := fun l n => mul_nonneg (clock.value_pos l n).le |
| 202 | (div_nonneg herror (zero_le_one.trans (D.one_le_scale (l,n)))) |
| 203 | constant := K |
| 204 | constant_ge_one := hK |
| 205 | coordinate_power := a |
| 206 | length_bound := ?_ |
| 207 | exponential_bound := ?_ |
| 208 | coordinate_bound := fun l n => (hgeometry l n).trans |
| 209 | (mul_le_mul_of_nonneg_right hCK (pow_nonneg (zero_le_one.trans (s.one_le_slow n)) _)) |
| 210 | energy := ?_ |
| 211 | input_jets := ?_ } |
| 212 | · intro l n k |
| 213 | apply PrimaryCopyBridge.inputs_of_smooth_frame |
| 214 | · exact frame_smooth_mono (hcopy l n k) (prod_mono Subset.rfl (interval_contains F clock (l,n))) |
| 215 | · exact (hsource l n k).mono (prod_mono Subset.rfl (interval_contains F clock (l,n))) |
| 216 | · intro x hx |
| 217 | apply PrimaryCopyBridge.reindex_kinematics |
| 218 | apply transported_kinematics (F.frame (l,n)) (φ (l,n)) 0 (clock.value l n) |
| 219 | (normal.value l n) (normal.value_pos l n).ne' (χ x.1) _ (Icc 0 (F.L (l,n))) |
| 220 | · intro v hv |
| 221 | simpa only [zero_add] using clock_mem F clock hv |
| 222 | · exact selected_kinematics F (l,n) hx.2.1 |
| 223 | · intro l n k i |
| 224 | exact ((synthesisColumn_polynomial hd i).smooth (l,n)).comp |
| 225 | (frameArgument χ).contDiff.contDiffOn (fun z hz => ⟨hz.1.2.1,hz.2⟩) |
| 226 | · intro l n v |
| 227 | have he := transported_envelope_deriv |
| 228 | (F.lam (l,n)) (F.u (l,n)) (F.L (l,n)) 0 (clock.value l n) v |
| 229 | simp only [zero_add] at he |
| 230 | exact he |
| 231 | · intro l n |
| 232 | change F.L (l,n)/clock.value l n ≤ K*s.slow n |
| 233 | calc |
| 234 | _ ≤ F.L (l,n)/clock.lower := div_le_div_of_nonneg_left (F.L_pos (l,n)).le |
| 235 | clock.lower_pos (clock.bounds l n).1 |
| 236 | _ ≤ (F.M*(B*s.slow n))/clock.lower := div_le_div_of_nonneg_right |
| 237 | ((hlength l n).trans (mul_le_mul_of_nonneg_left (hscale (l,n)) (zero_le_one.trans F.one_le_M))) |
| 238 | clock.lower_pos.le |
| 239 | _ = Lc*s.slow n := by dsimp [Lc]; ring |
| 240 | _ ≤ K*s.slow n := mul_le_mul_of_nonneg_right hLK (zero_le_one.trans (s.one_le_slow n)) |
| 241 | · intro l n |
| 242 | change Real.exp ((clock.value l n*((F.E+4*F.C)/D.scale (l,n)))*(F.L (l,n)/clock.value l n)) ≤ K |
| 243 | rw [transported_exponential _ _ _ (clock.value_pos l n).ne'] |
| 244 | apply le_trans _ heK |
| 245 | apply Real.exp_le_exp.mpr |
| 246 | have hS : 0 < D.scale (l,n) := zero_lt_one.trans_le (D.one_le_scale (l,n)) |
| 247 | have hmu : 0 ≤ (F.E+4*F.C)/D.scale (l,n) := div_nonneg herror hS.le |
| 248 | calc |
| 249 | _ ≤ ((F.E+4*F.C)/D.scale (l,n))*(F.M*D.scale (l,n)) := |
| 250 | mul_le_mul_of_nonneg_left (hlength l n) hmu |
| 251 | _ = _ := by field_simp |
| 252 | · intro l n k x hx hcell v hv z |
| 253 | exact scaled_selected_copy_energy F φ (fun i => clock.value i.1 i.2) |
| 254 | (fun i => normal.value i.1 i.2) χ g l n k (clock.value_pos l n) x hcell.1.2.1 hv hj z |
| 255 | · intro N |
| 256 | obtain ⟨C0,hC0,m,hb⟩ := frame_input_jets s (interval F clock) (interval_open F clock) |
| 257 | (frame F φ clock normal) (fun i => length F clock i.1 i.2) (envelope F clock) |
| 258 | hd (interval_contains F clock) (fun _ _ _ => (referenceP_pos _ _ _ _).le) |
| 259 | χ g r (fun _ _ => rfl) hsepTarget hC hgeometry (fun _ => j) |
| 260 | (J := |(j : ℝ)|+1) (by linarith [abs_nonneg (j:ℝ)]) (fun _ => by linarith) hf N |
| 261 | exact ⟨C0,hC0,m,fun l n k x hx hcell i hi v hv => |
| 262 | hb l n k x hx hcell.1.2.1 hcell.2 i hi v hv⟩ |
| 263 | |
| 264 | /-- Overwrite only the source, exactly as `realData` and `imagData` do. -/ |
| 265 | noncomputable def withSource (t : TangentData P ProblemStatement.Space) |
| 266 | (f : P × Plane → ProblemStatement.Space) : TangentData P ProblemStatement.Space := |
| 267 | { t with source := f } |
| 268 | |
| 269 | /-- Normal and clock transport commute with the selected slow-coordinate |
| 270 | map. The transverse coordinate remains an auxiliary parameter. -/ |
| 271 | theorem nativeFrame_transport (d : PrimaryODE.FrameData Slow) (χ : P →L[ℝ] Slow) |
| 272 | (φ : Slow →L[ℝ] Slow) (ψ : P → P) (hχ : ∀ p, χ (ψ p) = φ (χ p)) |
| 273 | (rate normal : ℝ) : |
| 274 | transportedFrame (nativeFrame d χ) (fun q : P × ℝ => (ψ q.1,q.2)) 0 rate normal = |
| 275 | nativeFrame (transportedFrame d φ 0 rate normal) χ := by |
| 276 | simp only [transportedFrame,nativeFrame,PrimaryCopyBridge.reindex,hχ] |
| 277 | |
| 278 | /-- The selected transported frame gives the exact angle-lifted STT |
| 279 | tangent after inserting the current target source. No equality between |
| 280 | the current source and a transported old source is used. -/ |
| 281 | theorem angle_transport_withSource (d : PrimaryODE.FrameData Slow) (χ : P →L[ℝ] Slow) |
| 282 | (φ : Slow →L[ℝ] Slow) (ψ : P → P) (hχ : ∀ p, χ (ψ p) = φ (χ p)) |
| 283 | (referenceSource : P × Plane → ProblemStatement.Space) |
| 284 | (targetSource : (P × ℝ) × Plane → ProblemStatement.Space) |
| 285 | (j : ℤ) (gap : ℕ) (rate amplitude normal : ℝ) : |
| 286 | withSource (ParticularWaveAssembly.angleTangent |
| 287 | (ScaledTangentTransport.transportTangent |
| 288 | (PrimaryCopyBridge.frameTangentData (nativeFrame d χ) j referenceSource) |
| 289 | ψ gap 0 rate amplitude normal)) targetSource = |
| 290 | PrimaryCopyBridge.frameTangentData |
| 291 | (nativeFrame (transportedFrame d φ 0 rate normal) (χ.comp (ContinuousLinearMap.fst ℝ P ℝ))) |
| 292 | j targetSource := by |
| 293 | rw [← frameTangentData_transport (nativeFrame d χ) ψ referenceSource j gap 0 rate amplitude normal, |
| 294 | nativeFrame_transport d χ φ ψ hχ rate normal] |
| 295 | rfl |
| 296 | |
| 297 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 298 | @[simp] theorem withSource_real (t : TangentData P ProblemStatement.Space) |
| 299 | (f : P × Plane → HarmonicCalculus.ComplexVector) : |
| 300 | withSource t (fun x => realPart (f x)) = realData t f := rfl |
| 301 | |
| 302 | omit [NormedAddCommGroup P] [NormedSpace ℝ P] in |
| 303 | @[simp] theorem withSource_imag (t : TangentData P ProblemStatement.Space) |
| 304 | (f : P × Plane → HarmonicCalculus.ComplexVector) : |
| 305 | withSource t (fun x => imagPart (f x)) = imagData t f := rfl |
| 306 | |
| 307 | noncomputable def transportedTangent |
| 308 | (F : PhaseConstruction D) (χ : P →L[ℝ] Slow) (ψ : (Label × ℕ) → P → P) |
| 309 | (clock normal : ActualSignedControl.PositiveScale Label) |
| 310 | (referenceSource : Label → ℕ → P × Plane → ProblemStatement.Space) |
| 311 | (gap : Label → ℕ → ℕ) (amplitude : Label → ℕ → ℝ) (j : ℤ) |
| 312 | (l : Label) (n : ℕ) : TangentData (P × ℝ) ProblemStatement.Space := |
| 313 | ParticularWaveAssembly.angleTangent (ScaledTangentTransport.transportTangent |
| 314 | (PrimaryCopyBridge.frameTangentData (nativeFrame (F.frame (l,n)) χ) j (referenceSource l n)) |
| 315 | (ψ (l,n)) (gap l n) 0 (clock.value l n) (amplitude l n) (normal.value l n)) |
| 316 | |
| 317 | /-- The full control for the literal target HR source and the exact |
| 318 | angle-lifted `ScaledTangentTransport` datum. Inserting the current source |
| 319 | does not require it to equal a scaled old source. -/ |
| 320 | noncomputable def actualControl |
| 321 | (s : StripData P) (F : PhaseConstruction D) (χ : P →L[ℝ] Slow) |
| 322 | (φ : (Label × ℕ) → Slow →L[ℝ] Slow) (ψ : (Label × ℕ) → P → P) |
| 323 | (hχ : ∀ i p, χ (ψ i p) = φ i (χ p)) |
| 324 | (clock normal : ActualSignedControl.PositiveScale Label) |
| 325 | (reference : Label → ℕ → Geometry) |
| 326 | (referenceSource : Label → ℕ → P × Plane → ProblemStatement.Space) |
| 327 | (gap : Label → ℕ → ℕ) (amplitude r : Label → ℕ → ℝ) |
| 328 | {A B C : ℝ} {a : ℕ} (hA : 1 ≤ A) (hB : 1 ≤ B) (hC : 1 ≤ C) |
| 329 | (hφ : ∀ i, ‖φ i‖ ≤ A) (hscale : ∀ i, D.scale i ≤ B*s.slow i.2) |
| 330 | (hsep : ∀ l n, WaveEnvelopeTransport.Separated (reference l n) (r l n) (F.L (l,n))) |
| 331 | (hgeometry : ∀ l n, CommonCoverClass.argumentCost (geometry reference gap clock l n) ≤ C*s.slow n^a) |
| 332 | (c : CorrectionState.Context (P × Plane)) (u : CorrectionState.State (P × Plane)) |
| 333 | (b : Label → CorrectionState.HarmonicBlock (P × Plane)) |
| 334 | (G A0 : Label → HarmonicResidual.BlockCoefficients (P × Plane)) (j : ℤ) (hj : j ≠ 0) |
| 335 | {α : ℝ} |
| 336 | (hsource : ∀ i : Fin 3, UniformWaveClass (CommonCoverClass.sourceStrip s) |
| 337 | (groupedEnvelope (geometry reference gap clock) r (length F clock) (envelope F clock)) α |
| 338 | (fun l n x => (HarmonicResidual.residualBlock c u (b l) (G l) (A0 l)).velocity n i j x)) |
| 339 | (part : HarmonicCalculus.ComplexVector →L[ℝ] ProblemStatement.Space) : |
| 340 | ParticularCopyBounds.UniformModalControl (CommonCoverClass.sourceStrip (angleStrip s)) α |
| 341 | (fun l n => nativeFrame (frame F φ clock normal (l,n)) (χ.comp (ContinuousLinearMap.fst ℝ P ℝ))) |
| 342 | (fun l n => withSource (transportedTangent F χ ψ clock normal referenceSource gap amplitude j l n) |
| 343 | (fun x => part (ParticularWaveAssembly.sourceFamily c u (b l) (G l) (A0 l) j n x))) |
| 344 | j (geometry reference gap clock) (length F clock) (envelope F clock) |
| 345 | (patch (angleStrip s) F (χ.comp (ContinuousLinearMap.fst ℝ P ℝ)) φ clock |
| 346 | (geometry reference gap clock) r) := by |
| 347 | have ht : (fun l n => withSource |
| 348 | (transportedTangent F χ ψ clock normal referenceSource gap amplitude j l n) |
| 349 | (fun x => part (ParticularWaveAssembly.sourceFamily c u (b l) (G l) (A0 l) j n x))) = |
| 350 | (fun l n => PrimaryCopyBridge.frameTangentData |
| 351 | (nativeFrame (frame F φ clock normal (l,n)) (χ.comp (ContinuousLinearMap.fst ℝ P ℝ))) j |
| 352 | (fun x => part (ParticularWaveAssembly.sourceFamily c u (b l) (G l) (A0 l) j n x))) := by |
| 353 | funext l n |
| 354 | exact angle_transport_withSource (F.frame (l,n)) χ (φ (l,n)) (ψ (l,n)) (hχ (l,n)) |
| 355 | (referenceSource l n) _ j (gap l n) (clock.value l n) (amplitude l n) (normal.value l n) |
| 356 | rw [ht] |
| 357 | exact scaledControl (angleStrip s) F (χ.comp (ContinuousLinearMap.fst ℝ P ℝ)) φ clock normal |
| 358 | reference gap r hA hB hC hφ hscale hsep hgeometry j hj _ |
| 359 | ((sourceFamily_uniform s (geometry reference gap clock) r (length F clock) (envelope F clock) |
| 360 | α c u b G A0 (fun _ => j) hsource).map part) |
| 361 | |
| 362 | /-! ## The clock change preserves the native Gaussian and polynomial geometry cost -/ |
| 363 | |
| 364 | theorem patch_envelope (s : StripData P) (F : PhaseConstruction D) |
| 365 | (χ : P →L[ℝ] Slow) (φ : (Label × ℕ) → Slow →L[ℝ] Slow) |
| 366 | (clock : ActualSignedControl.PositiveScale Label) |
| 367 | (reference : Label → ℕ → Geometry) (gap : Label → ℕ → ℕ) (r : Label → ℕ → ℝ) |
| 368 | (hsep : ∀ l n, WaveEnvelopeTransport.Separated (reference l n) (r l n) (F.L (l,n))) |
| 369 | {l : Label} {n : ℕ} {k : Frequency} {x : P × Plane} |
| 370 | (hx : x ∈ patch s F χ φ clock (geometry reference gap clock) r l n k) : |
| 371 | groupedEnvelope (geometry reference gap clock) r (length F clock) (envelope F clock) l n x = |
| 372 | envelope F clock l n ((geometry reference gap clock l n).coordinates k x.2).2 := |
| 373 | WaveEnvelopeTransport.copyEnvelope_eq_copy |
| 374 | (separated_transport (hsep l n) (clock.value_pos l n) (gap l n)) _ |
| 375 | ⟨hx.2,hx.1.2.2.1.le,hx.1.2.2.2.le⟩ |
| 376 | |
| 377 | theorem coordinateLinear_transport (g : Geometry) (gap : ℕ) (rate : ℝ) (hrate : rate ≠ 0) : |
| 378 | (CopySolveCompatibility.transportGeometry g gap 0 rate hrate).coordinateLinear = |
| 379 | ((TorusAverages.transverseChart rate hrate).symm : Plane →L[ℝ] Plane).comp |
| 380 | (g.coordinateLinear.comp (coverPower gap : Plane →L[ℝ] Plane)) := by |
| 381 | apply ContinuousLinearMap.ext |
| 382 | intro Y |
| 383 | change (TorusAverages.transverseChart rate hrate).symm |
| 384 | (g.basis.symm (coverPower (g.gap+gap) Y)) = |
| 385 | (TorusAverages.transverseChart rate hrate).symm |
| 386 | (g.basis.symm (coverPower g.gap (coverPower gap Y))) |
| 387 | rw [CopySolveCompatibility.coverPower_add] |
| 388 | |
| 389 | theorem pointLinear_transport (g : Geometry) (gap : ℕ) (rate : ℝ) (hrate : rate ≠ 0) : |
| 390 | (CopySolveCompatibility.transportGeometry g gap 0 rate hrate).pointLinear = |
| 391 | ((coverPower gap).symm : Plane →L[ℝ] Plane).comp |
| 392 | (g.pointLinear.comp (TorusAverages.transverseChart rate hrate : Plane →L[ℝ] Plane)) := by |
| 393 | apply ContinuousLinearMap.ext |
| 394 | intro Y |
| 395 | apply (coverPower (g.gap+gap)).injective |
| 396 | change coverPower (g.gap+gap) ((coverPower (g.gap+gap)).symm |
| 397 | (g.basis (TorusAverages.transverseChart rate hrate Y))) = |
| 398 | coverPower (g.gap+gap) ((coverPower gap).symm ((coverPower g.gap).symm |
| 399 | (g.basis (TorusAverages.transverseChart rate hrate Y)))) |
| 400 | rw [ContinuousLinearEquiv.apply_symm_apply, CopySolveCompatibility.coverPower_add, |
| 401 | ContinuousLinearEquiv.apply_symm_apply, ContinuousLinearEquiv.apply_symm_apply] |
| 402 | |
| 403 | theorem norm_timeChart_le (rate : ℝ) (hrate : rate ≠ 0) : |
| 404 | ‖(TorusAverages.transverseChart rate hrate : Plane →L[ℝ] Plane)‖ ≤ 1+|rate| := by |
| 405 | apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) |
| 406 | intro z |
| 407 | rw [ContinuousLinearEquiv.coe_coe, TorusAverages.transverseChart_apply, Prod.norm_def] |
| 408 | refine max_le ((norm_fst_le z).trans ?_) ?_ |
| 409 | · exact le_mul_of_one_le_left (norm_nonneg _) (by linarith [abs_nonneg rate]) |
| 410 | · rw [norm_mul, Real.norm_eq_abs rate] |
| 411 | exact mul_le_mul (by linarith [abs_nonneg rate] : |rate| ≤ 1+|rate|) |
| 412 | (norm_snd_le z) (norm_nonneg _) (by positivity) |
| 413 | |
| 414 | noncomputable def geometryFactor (clock : ActualSignedControl.PositiveScale Label) (budget : ℕ) : ℝ := |
| 415 | 1 + coveringBound budget * (2+clock.upper+clock.lower⁻¹) |
| 416 | |
| 417 | theorem geometryFactor_one (clock : ActualSignedControl.PositiveScale Label) (budget : ℕ) : |
| 418 | 1 ≤ geometryFactor clock budget := by |
| 419 | unfold geometryFactor |
| 420 | have hi := inv_pos.mpr clock.lower_pos |
| 421 | have hH := coveringBound_pos budget |
| 422 | nlinarith [clock.upper_one] |
| 423 | |
| 424 | /-- Refining the cover and scaling its time column has polynomial cost. |
| 425 | The constant uses only the already selected scale bounds and gap budget. -/ |
| 426 | theorem geometry_cost (clock : ActualSignedControl.PositiveScale Label) |
| 427 | (g : Geometry) {l : Label} {n gap budget : ℕ} (hgap : gap ≤ budget) : |
| 428 | CommonCoverClass.argumentCost |
| 429 | (CopySolveCompatibility.transportGeometry g gap 0 (clock.value l n) (clock.value_pos l n).ne') ≤ |
| 430 | 4*(geometryFactor clock budget)^2*(CommonCoverClass.argumentCost g)^2 := by |
| 431 | let H := coveringBound budget |
| 432 | let U := geometryFactor clock budget |
| 433 | let G := CopySolveCompatibility.transportGeometry g gap 0 (clock.value l n) (clock.value_pos l n).ne' |
| 434 | have hH : 0 ≤ H := (coveringBound_pos budget).le |
| 435 | have hU : 1 ≤ U := geometryFactor_one clock budget |
| 436 | have hrate : |clock.value l n| ≤ clock.upper := by |
| 437 | rw [abs_of_pos (clock.value_pos l n)] |
| 438 | exact (clock.bounds l n).2 |
| 439 | have hinv : |(clock.value l n)⁻¹| ≤ clock.lower⁻¹ := by |
| 440 | rw [abs_of_pos (inv_pos.mpr (clock.value_pos l n))] |
| 441 | exact inv_anti₀ clock.lower_pos (clock.bounds l n).1 |
| 442 | have hU1 : (1+|(clock.value l n)⁻¹|)*H ≤ U := by |
| 443 | dsimp [U,geometryFactor,H] |
| 444 | nlinarith [clock.upper_one, coveringBound_pos budget, |
| 445 | mul_nonneg (coveringBound_pos budget).le (sub_nonneg.mpr hinv)] |
| 446 | have hU2 : H*(1+|clock.value l n|) ≤ U := by |
| 447 | dsimp [U,geometryFactor,H] |
| 448 | nlinarith [inv_pos.mpr clock.lower_pos, coveringBound_pos budget, |
| 449 | mul_nonneg (coveringBound_pos budget).le (sub_nonneg.mpr hrate)] |
| 450 | have hcoord : ‖G.coordinateLinear‖ ≤ U*‖g.coordinateLinear‖ := by |
| 451 | dsimp [G] |
| 452 | rw [coordinateLinear_transport] |
| 453 | calc |
| 454 | _ ≤ ‖((TorusAverages.transverseChart (clock.value l n) (clock.value_pos l n).ne').symm : |
| 455 | Plane →L[ℝ] Plane)‖ * ‖g.coordinateLinear.comp (coverPower gap : Plane →L[ℝ] Plane)‖ := |
| 456 | ContinuousLinearMap.opNorm_comp_le _ _ |
| 457 | _ ≤ (1+|(clock.value l n)⁻¹|)*(‖g.coordinateLinear‖*H) := |
| 458 | mul_le_mul (CommonCoverClass.norm_inverse_transverseChart_le _ _) |
| 459 | ((ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 460 | (mul_le_mul_of_nonneg_left (coveringNorm_le_bound hgap) (norm_nonneg _))) |
| 461 | (norm_nonneg _) (by positivity) |
| 462 | _ = ((1+|(clock.value l n)⁻¹|)*H)*‖g.coordinateLinear‖ := by ring |
| 463 | _ ≤ U*‖g.coordinateLinear‖ := mul_le_mul_of_nonneg_right hU1 (norm_nonneg _) |
| 464 | have hpoint : ‖G.pointLinear‖ ≤ U*‖g.pointLinear‖ := by |
| 465 | dsimp [G] |
| 466 | rw [pointLinear_transport] |
| 467 | calc |
| 468 | _ ≤ ‖((coverPower gap).symm : Plane →L[ℝ] Plane)‖ * |
| 469 | ‖g.pointLinear.comp (TorusAverages.transverseChart (clock.value l n) (clock.value_pos l n).ne' : |
| 470 | Plane →L[ℝ] Plane)‖ := ContinuousLinearMap.opNorm_comp_le _ _ |
| 471 | _ ≤ H*(‖g.pointLinear‖*(1+|clock.value l n|)) := |
| 472 | mul_le_mul (inverseCoveringNorm_le_bound hgap) |
| 473 | ((ContinuousLinearMap.opNorm_comp_le _ _).trans |
| 474 | (mul_le_mul_of_nonneg_left (norm_timeChart_le _ _) (norm_nonneg _))) |
| 475 | (norm_nonneg _) hH |
| 476 | _ = (H*(1+|clock.value l n|))*‖g.pointLinear‖ := by ring |
| 477 | _ ≤ U*‖g.pointLinear‖ := mul_le_mul_of_nonneg_right hU2 (norm_nonneg _) |
| 478 | have hc0 := norm_nonneg g.coordinateLinear |
| 479 | have hp0 := norm_nonneg g.pointLinear |
| 480 | have hcost := CommonCoverClass.one_le_argumentCost g |
| 481 | have hc : ‖g.coordinateLinear‖ ≤ CommonCoverClass.argumentCost g := by |
| 482 | unfold CommonCoverClass.argumentCost |
| 483 | nlinarith |
| 484 | have hp : ‖g.pointLinear‖ ≤ CommonCoverClass.argumentCost g := by |
| 485 | unfold CommonCoverClass.argumentCost |
| 486 | nlinarith |
| 487 | have hcx := hcoord.trans (mul_le_mul_of_nonneg_left hc (zero_le_one.trans hU)) |
| 488 | have hpx := hpoint.trans (mul_le_mul_of_nonneg_left hp (zero_le_one.trans hU)) |
| 489 | have hB : 1 ≤ U*CommonCoverClass.argumentCost g := by |
| 490 | nlinarith [mul_nonneg (sub_nonneg.mpr hU) (sub_nonneg.mpr hcost)] |
| 491 | change 1+‖G.coordinateLinear‖+‖G.pointLinear‖*(1+‖G.coordinateLinear‖) ≤ _ |
| 492 | have hproduct := mul_le_mul hpx (add_le_add_right hcx 1) |
| 493 | (by positivity : 0 ≤ 1+‖G.coordinateLinear‖) (by positivity : 0 ≤ U*CommonCoverClass.argumentCost g) |
| 494 | nlinarith [sq_nonneg (U*CommonCoverClass.argumentCost g-1)] |
| 495 | |
| 496 | theorem geometry_cost_uniform (s : StripData P) (clock : ActualSignedControl.PositiveScale Label) |
| 497 | (reference : Label → ℕ → Geometry) (gap : Label → ℕ → ℕ) (budget : ℕ) |
| 498 | {C : ℝ} {a : ℕ} (hgap : ∀ l n, gap l n ≤ budget) |
| 499 | (href : ∀ l n, CommonCoverClass.argumentCost (reference l n) ≤ C*s.slow n^a) : |
| 500 | ∀ l n, CommonCoverClass.argumentCost (geometry reference gap clock l n) ≤ |
| 501 | (4*(geometryFactor clock budget)^2*C^2)*s.slow n^(2*a) := by |
| 502 | intro l n |
| 503 | refine (geometry_cost clock (reference l n) (hgap l n)).trans ?_ |
| 504 | have hsq := pow_le_pow_left₀ |
| 505 | (zero_le_one.trans (CommonCoverClass.one_le_argumentCost (reference l n))) (href l n) 2 |
| 506 | have hm := mul_le_mul_of_nonneg_left hsq |
| 507 | (by positivity : 0 ≤ 4*(geometryFactor clock budget)^2) |
| 508 | convert! hm using 1 |
| 509 | ring |
| 510 | |
| 511 | theorem geometry_cost_constant_one (clock : ActualSignedControl.PositiveScale Label) |
| 512 | (budget : ℕ) {C : ℝ} (hC : 1 ≤ C) : 1 ≤ 4*(geometryFactor clock budget)^2*C^2 := by |
| 513 | have hU := one_le_pow₀ (n := 2) (geometryFactor_one clock budget) |
| 514 | have hC2 := one_le_pow₀ (n := 2) hC |
| 515 | nlinarith [mul_nonneg (sub_nonneg.mpr hU) (sub_nonneg.mpr hC2)] |
| 516 | |
| 517 | /-! ## The actual active-window parameter and frequency scales -/ |
| 518 | |
| 519 | noncomputable def physicalPhi (h : ℝ) (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 520 | (i : Label × ℕ) : Slow →L[ℝ] Slow := |
| 521 | ActualSignedGeometry.slowChange h (ChartScales.Q (chart i.2)) (ChartScales.Q (reference i.1 i.2)) |
| 522 | |
| 523 | noncomputable def physicalPsi (h : ℝ) (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 524 | (i : Label × ℕ) : Slow → Slow := |
| 525 | PhysicalParticularWave.parameterChange h (ChartScales.Q (chart i.2)) |
| 526 | (ChartScales.Q (reference i.1 i.2)) |
| 527 | |
| 528 | theorem physical_commute (h : ℝ) (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 529 | (i : Label × ℕ) (p : Slow) : |
| 530 | ActualSignedGeometry.swapParameter (physicalPsi h chart reference i p) = |
| 531 | physicalPhi h chart reference i (ActualSignedGeometry.swapParameter p) := rfl |
| 532 | |
| 533 | theorem physicalPhi_bound (h : ℝ) (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 534 | (hnear : ∀ l n, chart n ≤ reference l n+4 ∧ reference l n ≤ chart n+4) (i : Label × ℕ) : |
| 535 | ‖physicalPhi h chart reference i‖ ≤ ActualSignedGeometry.slowChangeCost h := |
| 536 | ActualSignedGeometry.norm_slowChange_le h (hnear i.1 i.2).1 (hnear i.1 i.2).2 |
| 537 | |
| 538 | theorem active_scale_bound (s : StripData P) (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 539 | (hchart : ∀ n, 1 ≤ chart n) |
| 540 | (hnear : ∀ l n, chart n ≤ reference l n+4 ∧ reference l n ≤ chart n+4) |
| 541 | (hs : ∀ n, ChartScales.S (chart n) ≤ s.slow n) (l : Label) (n : ℕ) : |
| 542 | ChartScales.S (reference l n) ≤ 25*s.slow n := |
| 543 | (ActualSignedGeometry.S_window_le (hchart n) (hnear l n).2).trans |
| 544 | (mul_le_mul_of_nonneg_left (hs n) (by norm_num)) |
| 545 | |
| 546 | /-- The same nonzero harmonic appears in both physical frequencies, so |
| 547 | normal scaling is independent of its sign and size. -/ |
| 548 | theorem normalWeight_harmonic (Q Qr K Kr : ℝ) (j : ℤ) (hj : j ≠ 0) : |
| 549 | PhysicalParticularWave.normalWeight Q Qr ((j:ℝ)*K) ((j:ℝ)*Kr) = |
| 550 | PhysicalParticularWave.normalWeight Q Qr K Kr := by |
| 551 | have hjR : (j:ℝ) ≠ 0 := by exact_mod_cast hj |
| 552 | unfold PhysicalParticularWave.normalWeight |
| 553 | rw [mul_div_mul_left _ _ hjR] |
| 554 | |
| 555 | theorem normalScale_harmonic {h : ℝ} (hh : 0 ≤ h) |
| 556 | (chart : ℕ → ℕ) (reference : Label → ℕ → ℕ) |
| 557 | (hnear : ∀ l n, chart n ≤ reference l n+4 ∧ reference l n ≤ chart n+4) |
| 558 | (j : ℤ) (hj : j ≠ 0) (l : Label) (n : ℕ) : |
| 559 | (ActualSignedGeometry.normalScale chart reference hnear hh).value l n = |
| 560 | PhysicalParticularWave.normalWeight (ChartScales.Q (chart n)) (ChartScales.Q (reference l n)) |
| 561 | ((j:ℝ)*(ChartScales.carrier h (chart n):ℝ)) |
| 562 | ((j:ℝ)*(ChartScales.carrier h (reference l n):ℝ)) := by |
| 563 | rw [normalWeight_harmonic _ _ _ _ j hj] |
| 564 | exact ActualSignedGeometry.normalScale_value chart reference hnear hh l n |
| 565 | |
| 566 | section Slots |
| 567 | |
| 568 | variable {h dimension : ℝ} {vr vt : Plane} |
| 569 | (sys : PartitionedCovariance.SlotSystem dimension h vr vt) |
| 570 | (hdet : vr.1*vt.2-vr.2*vt.1 ≠ 0) |
| 571 | (slot : Label → ℕ → SlotColoring.Label) |
| 572 | |
| 573 | noncomputable def slotReference (l : Label) (n : ℕ) : Geometry := |
| 574 | ActualSignedGeometry.slotGeometry sys hdet (slot l n) 0 |
| 575 | |
| 576 | noncomputable def slotCost (clock : ActualSignedControl.PositiveScale Label) (budget : ℕ) : ℝ := |
| 577 | 4*(geometryFactor clock budget)^2* |
| 578 | (25*CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) 0)^2 |
| 579 | |
| 580 | theorem slotCost_one (clock : ActualSignedControl.PositiveScale Label) (budget : ℕ) : |
| 581 | 1 ≤ slotCost hdet clock budget := |
| 582 | geometry_cost_constant_one clock budget (by |
| 583 | have hc := CommonCoverClass.bandArgumentCost_one_le (TorusAverages.slotChart vr vt hdet) 0 |
| 584 | nlinarith) |
| 585 | |
| 586 | theorem slot_geometry_cost (s : StripData P) (hh : 0 ≤ h) |
| 587 | (clock : ActualSignedControl.PositiveScale Label) (gap : Label → ℕ → ℕ) (budget : ℕ) |
| 588 | (hgap : ∀ l n, gap l n ≤ budget) (hslot : ∀ l n, 4 ≤ (slot l n).1) |
| 589 | (hscale : ∀ l n, ChartScales.S (slot l n).1 ≤ 25*s.slow n) : |
| 590 | ∀ l n, CommonCoverClass.argumentCost |
| 591 | (geometry (slotReference sys hdet slot) gap clock l n) ≤ slotCost hdet clock budget*s.slow n^2 := by |
| 592 | have hr (l : Label) (n : ℕ) : |
| 593 | CommonCoverClass.argumentCost (slotReference sys hdet slot l n) ≤ |
| 594 | (25*CommonCoverClass.bandArgumentCost (TorusAverages.slotChart vr vt hdet) 0)*s.slow n^1 := by |
| 595 | refine (ActualSignedGeometry.slotGeometry_argumentCost sys hdet hh (hslot l n) (le_refl 0)).trans ?_ |
| 596 | have hm := mul_le_mul_of_nonneg_left (hscale l n) |
| 597 | (zero_le_one.trans (CommonCoverClass.bandArgumentCost_one_le (TorusAverages.slotChart vr vt hdet) 0)) |
| 598 | convert! hm using 1 |
| 599 | ring |
| 600 | simpa only [slotCost, Nat.mul_one] using geometry_cost_uniform s clock |
| 601 | (slotReference sys hdet slot) gap budget hgap hr |
| 602 | |
| 603 | /-- A full target control built from the original slot system, the selected |
| 604 | reference phase, active-band bounds, and current HR coefficient classes. |
| 605 | All clock, normal, affine and geometry bounds are supplied by the concrete |
| 606 | active-window constructions; no energy or output-control premise remains. -/ |
| 607 | noncomputable def actualSlotControl |
| 608 | (s : StripData Slow) (F : PhaseConstruction D) (hh : 0 ≤ h) |
| 609 | (chart : ℕ → ℕ) (hchart : ∀ n, 1 ≤ chart n) |
| 610 | (hnear : ∀ l n, chart n ≤ (slot l n).1+4 ∧ (slot l n).1 ≤ chart n+4) |
| 611 | (hslot : ∀ l n, 4 ≤ (slot l n).1) |
| 612 | (hs : ∀ n, ChartScales.S (chart n) ≤ s.slow n) |
| 613 | (hscale : ∀ i, D.scale i = ChartScales.S (slot i.1 i.2).1) |
| 614 | (hL : ∀ i, F.L i = ChartScales.slotLength sys.radius h (slot i.1 i.2).1) |
| 615 | (gap : Label → ℕ → ℕ) (budget : ℕ) (hgap : ∀ l n, gap l n ≤ budget) |
| 616 | (referenceSource : Label → ℕ → Slow × Plane → ProblemStatement.Space) |
| 617 | (c : CorrectionState.Context (Slow × Plane)) (u : CorrectionState.State (Slow × Plane)) |
| 618 | (b : Label → CorrectionState.HarmonicBlock (Slow × Plane)) |
| 619 | (G A0 : Label → HarmonicResidual.BlockCoefficients (Slow × Plane)) (j : ℤ) (hj : j ≠ 0) |
| 620 | {α : ℝ} |
| 621 | (hsource : ∀ i : Fin 3, UniformWaveClass (CommonCoverClass.sourceStrip s) |
| 622 | (groupedEnvelope |
| 623 | (geometry (slotReference sys hdet slot) gap |
| 624 | (ActualSignedGeometry.clockScale chart (fun l n => (slot l n).1) hnear h)) |
| 625 | (fun _ _ => sys.radius) |
| 626 | (length F (ActualSignedGeometry.clockScale chart (fun l n => (slot l n).1) hnear h)) |
| 627 | (envelope F (ActualSignedGeometry.clockScale chart (fun l n => (slot l n).1) hnear h))) α |
| 628 | (fun l n x => (HarmonicResidual.residualBlock c u (b l) (G l) (A0 l)).velocity n i j x)) |
| 629 | (part : HarmonicCalculus.ComplexVector →L[ℝ] ProblemStatement.Space) := |
| 630 | actualControl s F ActualSignedGeometry.swapParameter.toContinuousLinearEquiv.toContinuousLinearMap |
| 631 | (physicalPhi h chart (fun l n => (slot l n).1)) |
| 632 | (physicalPsi h chart (fun l n => (slot l n).1)) |
| 633 | (physical_commute h chart (fun l n => (slot l n).1)) |
| 634 | (ActualSignedGeometry.clockScale chart (fun l n => (slot l n).1) hnear h) |
| 635 | (ActualSignedGeometry.normalScale chart (fun l n => (slot l n).1) hnear hh) |
| 636 | (slotReference sys hdet slot) referenceSource gap |
| 637 | (fun l n => PhysicalParticularWave.velocityWeight h (ChartScales.Q (chart n)) (ChartScales.Q (slot l n).1)) |
| 638 | (fun _ _ => sys.radius) |
| 639 | (ActualSignedGeometry.slowChangeCost_one h) (by norm_num : (1:ℝ) ≤ 25) |
| 640 | (slotCost_one hdet _ budget) |
| 641 | (physicalPhi_bound h chart (fun l n => (slot l n).1) hnear) |
| 642 | (fun i => by rw [hscale i]; exact active_scale_bound s chart _ hchart hnear hs i.1 i.2) |
| 643 | (fun l n => by |
| 644 | rw [hL (l,n)] |
| 645 | exact ActualSignedGeometry.slotGeometry_separated sys hdet hh (hslot l n) 0) |
| 646 | (slot_geometry_cost sys hdet slot s hh _ gap budget hgap hslot |
| 647 | (active_scale_bound s chart _ hchart hnear hs)) |
| 648 | c u b G A0 j hj hsource part |
| 649 | |
| 650 | theorem actualSlot_tangent_eq |
| 651 | (F : PhaseConstruction D) (hh : 0 ≤ h) (chart : ℕ → ℕ) |
| 652 | (hnear : ∀ l n, chart n ≤ (slot l n).1+4 ∧ (slot l n).1 ≤ chart n+4) |
| 653 | (referenceSource : Label → ℕ → Slow × Plane → ProblemStatement.Space) |
| 654 | (gap : Label → ℕ → ℕ) (j : ℤ) (hj : j ≠ 0) (l : Label) (n : ℕ) : |
| 655 | transportedTangent F ActualSignedGeometry.swapParameter.toContinuousLinearEquiv.toContinuousLinearMap |
| 656 | (physicalPsi h chart (fun l n => (slot l n).1)) |
| 657 | (ActualSignedGeometry.clockScale chart (fun l n => (slot l n).1) hnear h) |
| 658 | (ActualSignedGeometry.normalScale chart (fun l n => (slot l n).1) hnear hh) |
| 659 | referenceSource gap |
| 660 | (fun l n => PhysicalParticularWave.velocityWeight h (ChartScales.Q (chart n)) |
| 661 | (ChartScales.Q (slot l n).1)) j l n = |
| 662 | ParticularWaveAssembly.angleTangent (ScaledTangentTransport.transportTangent |
| 663 | (PrimaryCopyBridge.frameTangentData |
| 664 | (nativeFrame (F.frame (l,n)) |
| 665 | ActualSignedGeometry.swapParameter.toContinuousLinearEquiv.toContinuousLinearMap) |
| 666 | j (referenceSource l n)) |
| 667 | (PhysicalParticularWave.parameterChange h (ChartScales.Q (chart n)) (ChartScales.Q (slot l n).1)) |
| 668 | (gap l n) 0 |
| 669 | (PhysicalParticularWave.clockWeight h (ChartScales.Q (chart n)) (ChartScales.Q (slot l n).1)) |
| 670 | (PhysicalParticularWave.velocityWeight h (ChartScales.Q (chart n)) (ChartScales.Q (slot l n).1)) |
| 671 | (PhysicalParticularWave.normalWeight (ChartScales.Q (chart n)) (ChartScales.Q (slot l n).1) |
| 672 | ((j:ℝ)*(ChartScales.carrier h (chart n):ℝ)) |
| 673 | ((j:ℝ)*(ChartScales.carrier h (slot l n).1:ℝ)))) := by |
| 674 | simp only [transportedTangent, physicalPsi, ActualSignedGeometry.clockScale_value, |
| 675 | normalScale_harmonic hh chart (fun l n => (slot l n).1) hnear j hj l n] |
| 676 | |
| 677 | end Slots |
| 678 | |
| 679 | end NavierStokes.ScaledActualParticularControl |