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: #678 refactor(Euler/Gevrey): 11 small modules folded into the file that imports them (−26.6%, measured)
1 commit
+0 −95 Euler/GevreyBaseTransport.lean deleted
| @@ -1,95 +0,0 @@ | ||
| 1 | -import Euler.SobolevBaseCommutator | |
| 2 | -import Euler.GevreyLowNorms | |
| 3 | - | |
| 4 | -/-! Summation of the actual base transport commutators with no external-cutoff constant. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerGevreyBaseTransport | |
| 9 | - | |
| 10 | -open MeasureTheory EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 11 | - EulerH6Pressure EulerPacketWeights EulerSobolevGevreyOperators EulerBaseWordMetric EulerFiniteMetricEnergy | |
| 12 | - EulerWeightedCylinderEnergy EulerGevreyMetricComparison EulerSobolevWordLevel EulerSobolevBaseCommutator | |
| 13 | - EulerBaseTransportL2 EulerGevreyLowNorms | |
| 14 | - | |
| 15 | -variable (period : ℝ) [Fact (0 < period)] | |
| 16 | - | |
| 17 | -/-- Restriction commutes with taking an actual derivative word at a lower Sobolev level. -/ | |
| 18 | -theorem restrict_wordAtLevel {s p q n : ℕ} (hq : q ≤ p) (w : Fin n → Fin 4) (hp : n+p ≤ s) | |
| 19 | - (u : SobolevSpace period s) : | |
| 20 | - restrictOperator period hq (wordAtLevel period p n w hp u) = wordAtLevel period q n w (by omega) u := by | |
| 21 | - apply value_injective period | |
| 22 | - rw [value_restrictOperator, wordAtLevel_value, wordAtLevel_value] | |
| 23 | - | |
| 24 | -/-- The exact base derivative sum is contained in every truncated actual Gevrey norm. -/ | |
| 25 | -theorem sumNorm_restrict_le_weighted {s q : ℕ} (hq : q ≤ s) (N : ℕ) (ρ : ℝ) (hρ : 0 < ρ) | |
| 26 | - (u : SobolevSpace period s) : | |
| 27 | - sumNorm period (restrictOperator period hq u) ≤ weightedNorm period q N ρ u := by | |
| 28 | - have he : sumNorm period (restrictOperator period hq u) = blockNorm period (toJet period u) q 0 := by | |
| 29 | - rw [blockNorm_zero_eq_size (toJet period u) hq] | |
| 30 | - rw [sumNorm_eq_jet, ← sobolevSize_eq period (toJet period (restrictOperator period hq u)), value_restrictOperator] | |
| 31 | - rw [he] | |
| 32 | - have hsum := Finset.single_le_sum (s := Finset.range (N+1)) | |
| 33 | - (fun n _ => mul_nonneg (weight_pos hρ n).le (show 0 ≤ blockNorm period (toJet period u) q n from blockNorm_nonneg _)) | |
| 34 | - (show 0 ∈ Finset.range (N+1) by simp) | |
| 35 | - simpa [weight, weightedNorm] using hsum | |
| 36 | - | |
| 37 | -/-- Exact external-word expansion of the actual Gevrey Sobolev sum. -/ | |
| 38 | -theorem weighted_word_sums {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) (u : SobolevSpace period s) : | |
| 39 | - (∑ I : ExternalWord N, weight ρ I.1.val * sumNorm period | |
| 40 | - (wordAtLevel period q I.1.val I.2 (by have := I.1.isLt; omega) u)) = weightedNorm period q N ρ u := by | |
| 41 | - rw [Fintype.sum_sigma, weightedNorm, ← Fin.sum_univ_eq_sum_range] | |
| 42 | - apply Finset.sum_congr rfl | |
| 43 | - intro n _ | |
| 44 | - rw [blockNorm_baseWords period u (by have := n.isLt; omega : n.val+q ≤ s), Finset.mul_sum] | |
| 45 | - apply Finset.sum_congr rfl | |
| 46 | - intro w _ | |
| 47 | - rw [sumNorm_wordAtLevel] | |
| 48 | - | |
| 49 | -/-- The literal base transport forcing at every external and base derivative word. -/ | |
| 50 | -def baseTransportForcing {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 51 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 52 | - (u v : SobolevSpace period (s+1)) : ExternalWord N → BaseWord 6 → LiftL2 period := fun I a => | |
| 53 | - baseCommutator period a.1.val (by have := a.1.isLt; omega) a.2 L hL | |
| 54 | - (restrictOperator period (by omega : 7 ≤ s+1) u) | |
| 55 | - (wordAtLevel period 7 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+7 ≤ s+1) v) | |
| 56 | - | |
| 57 | -/-- Each base-word forcing family is controlled by the fixed H⁶ norms, with the fixed word-count factor 5461. -/ | |
| 58 | -theorem baseTransportForcing_family_bound {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 59 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 60 | - (u v : SobolevSpace period (s+1)) (I : ExternalWord N) : | |
| 61 | - familyNorm (baseTransportForcing period N hN L hL u v I) ≤ | |
| 62 | - (5461*baseTransportConstant period) * sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u) * | |
| 63 | - sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+6 ≤ s+1) v) := by | |
| 64 | - have hb (a : BaseWord 6) : ‖baseTransportForcing period N hN L hL u v I a‖ ≤ | |
| 65 | - baseTransportConstant period * sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u) * | |
| 66 | - sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+6 ≤ s+1) v) := by | |
| 67 | - have h := baseCommutator_bound period a.1.val (by have := a.1.isLt; omega) a.2 L hL | |
| 68 | - (restrictOperator period (by omega : 7 ≤ s+1) u) | |
| 69 | - (wordAtLevel period 7 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+7 ≤ s+1) v) | |
| 70 | - rw [restrictOperator_comp, restrict_wordAtLevel] at h | |
| 71 | - exact h | |
| 72 | - have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (BaseWord 6))) (fun a _ => hb a) | |
| 73 | - exact (familyNorm_le_sum_norm _).trans (hsum.trans_eq (by | |
| 74 | - simp only [Finset.sum_const, Finset.card_univ, card_baseWord_six, nsmul_eq_mul]; ring)) | |
| 75 | - | |
| 76 | -/-- The actual weighted base transport forcing has no external derivative loss or cutoff-dependent coefficient. -/ | |
| 77 | -theorem baseTransportForcing_weighted_bound {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 78 | - (ρ : ℝ) (hρ : 0 < ρ) (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 79 | - (u v : SobolevSpace period (s+1)) : | |
| 80 | - weightedForcingSum ρ (fun I : ExternalWord N => I.1.val) (baseTransportForcing period N hN L hL u v) ≤ | |
| 81 | - (5461*baseTransportConstant period)*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 82 | - have h := Finset.sum_le_sum (s := (Finset.univ : Finset (ExternalWord N))) (fun I _ => | |
| 83 | - mul_le_mul_of_nonneg_left (baseTransportForcing_family_bound period N hN L hL u v I) (weight_pos hρ I.1.val).le) | |
| 84 | - have he : (∑ I : ExternalWord N, weight ρ I.1.val * | |
| 85 | - ((5461*baseTransportConstant period)*sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u)* | |
| 86 | - sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega) v))) = | |
| 87 | - (5461*baseTransportConstant period)*sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u)*weightedNorm period 6 N ρ v := by | |
| 88 | - rw [← weighted_word_sums period 6 N (by omega : N+6 ≤ s+1) ρ v, Finset.mul_sum] | |
| 89 | - exact Finset.sum_congr rfl (fun I _ => by ring) | |
| 90 | - rw [he] at h | |
| 91 | - exact h.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left | |
| 92 | - (sumNorm_restrict_le_weighted period (by omega : 6 ≤ s+1) N ρ hρ u) | |
| 93 | - (mul_nonneg (by norm_num) (baseTransportConstant_nonneg period))) (weightedNorm_nonneg period 6 N ρ hρ v)) | |
| 94 | - | |
| 95 | -end EulerGevreyBaseTransport | |
+0 −78 Euler/GevreyContinuationNorm.lean deleted
| @@ -1,78 +0,0 @@ | ||
| 1 | -import Euler.GevreyMetricEstimate | |
| 2 | - | |
| 3 | -/-! Actual complete-Sobolev control from a positive-radius finite Gevrey bound, for parabolic continuation. -/ | |
| 4 | - | |
| 5 | -noncomputable section | |
| 6 | - | |
| 7 | -namespace EulerGevreyContinuationNorm | |
| 8 | - | |
| 9 | -open EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev EulerSpatialSobolevInverse | |
| 10 | - EulerJetProductBounds EulerH6Pressure EulerSobolevGevreyOperators EulerPacketWeights EulerGevreyMetricEstimate | |
| 11 | - | |
| 12 | -/-- At every retained derivative order, the Gevrey weight is bounded below by one positive fixed-cutoff weight. -/ | |
| 13 | -theorem weight_lower (ρ δ : ℝ) (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) | |
| 14 | - (n N : ℕ) (hn : n ≤ N) : weight δ N ≤ weight ρ n := by | |
| 15 | - have hρ : 0 ≤ ρ := hδ.le.trans hδρ | |
| 16 | - have hp : δ^N ≤ ρ^n := (pow_le_pow_of_le_one hδ.le hδ1 hn).trans (pow_le_pow_left₀ hδ.le hδρ n) | |
| 17 | - have hf : (n.factorial : ℝ) ≤ (N.factorial : ℝ) := by exact_mod_cast Nat.factorial_le hn | |
| 18 | - have hsq : (n.factorial : ℝ)^2 ≤ (N.factorial : ℝ)^2 := by | |
| 19 | - nlinarith [show (0 : ℝ) ≤ (n.factorial : ℝ) from Nat.cast_nonneg _] | |
| 20 | - exact div_le_div₀ (pow_nonneg hρ n) hp (by positivity) hsq | |
| 21 | - | |
| 22 | -variable (period : ℝ) [Fact (0 < period)] | |
| 23 | - | |
| 24 | -/-- Each actual derivative coordinate is bounded by its genuine homogeneous derivative-sum norm. -/ | |
| 25 | -theorem word_le_level {s : ℕ} (u : SobolevSpace period s) (w : SobolevWord s) : | |
| 26 | - ‖u.val w‖ ≤ levelNorm period (toJet period u) w.1.val := by | |
| 27 | - rw [levelNorm_eq_words] | |
| 28 | - have h := Finset.single_le_sum (s := (Finset.univ : Finset (Fin w.1.val → Fin 4))) | |
| 29 | - (fun v _ => norm_nonneg ((toJet period u).word v)) (Finset.mem_univ w.2) | |
| 30 | - rw [toJet_word period u (by have := w.1.isLt; omega) w.2] at h | |
| 31 | - exact h | |
| 32 | - | |
| 33 | -/-- Every derivative coordinate through the full energy order is contained in one retained external/base block. -/ | |
| 34 | -theorem level_le_block {s : ℕ} (u : SobolevSpace period s) (N m : ℕ) (hm : m ≤ N+6) : | |
| 35 | - levelNorm period (toJet period u) m ≤ blockNorm period (toJet period u) 6 (min m N) := by | |
| 36 | - let n := min m N | |
| 37 | - have hn : n ≤ m := Nat.min_le_left m N | |
| 38 | - have hr : m-n ≤ 6 := by dsimp [n]; omega | |
| 39 | - have he : n+(m-n) = m := Nat.add_sub_of_le hn | |
| 40 | - have h := Finset.single_le_sum (s := Finset.range 7) | |
| 41 | - (fun r _ => (levelNorm_nonneg (toJet period u) : 0 ≤ levelNorm period (toJet period u) (n+r))) | |
| 42 | - (show m-n ∈ Finset.range 7 by exact Finset.mem_range.mpr (by omega)) | |
| 43 | - rw [he] at h | |
| 44 | - exact h | |
| 45 | - | |
| 46 | -/-- A finite actual Gevrey bound controls the complete energy-order Sobolev norm on every positive-radius interval. -/ | |
| 47 | -theorem norm_le_weighted {s : ℕ} (N : ℕ) (hS : s ≤ N+6) (ρ δ : ℝ) | |
| 48 | - (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) (u : SobolevSpace period s) : | |
| 49 | - ‖u‖ ≤ weightedNorm period 6 N ρ u / weight δ N := by | |
| 50 | - have hρ : 0 < ρ := hδ.trans_le hδρ | |
| 51 | - have hw : 0 < weight δ N := weight_pos hδ N | |
| 52 | - change ‖u.val‖ ≤ _ | |
| 53 | - apply (pi_norm_le_iff_of_nonneg (div_nonneg (weightedNorm_nonneg period 6 N ρ hρ u) hw.le)).mpr | |
| 54 | - intro w | |
| 55 | - have hm : w.1.val ≤ N+6 := (Nat.le_of_lt_succ w.1.isLt).trans hS | |
| 56 | - let n := min w.1.val N | |
| 57 | - have hn : n ≤ N := Nat.min_le_right w.1.val N | |
| 58 | - have hc := (word_le_level period u w).trans (level_le_block period u N w.1.val hm) | |
| 59 | - have hh := Finset.single_le_sum (s := Finset.range (N+1)) | |
| 60 | - (fun i _ => mul_nonneg (weight_pos hρ i).le (show 0 ≤ blockNorm period (toJet period u) 6 i from blockNorm_nonneg _)) | |
| 61 | - (show n ∈ Finset.range (N+1) by exact Finset.mem_range.mpr (by omega)) | |
| 62 | - have hle : weight δ N*‖u.val w‖ ≤ weightedNorm period 6 N ρ u := by | |
| 63 | - calc | |
| 64 | - _ ≤ weight ρ n*‖u.val w‖ := mul_le_mul_of_nonneg_right (weight_lower ρ δ hδ hδρ hδ1 n N hn) (norm_nonneg _) | |
| 65 | - _ ≤ weight ρ n*blockNorm period (toJet period u) 6 n := mul_le_mul_of_nonneg_left hc (weight_pos hρ n).le | |
| 66 | - _ ≤ _ := hh | |
| 67 | - exact (le_div_iff₀ hw).mpr (by simpa only [mul_comm] using hle) | |
| 68 | - | |
| 69 | -/-- A metric Gevrey bound gives the actual finite-Sobolev state bound needed by the uniform local restart theorem. -/ | |
| 70 | -theorem norm_le_metric {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) (hS : s ≤ N+6) (ρ δ : ℝ) | |
| 71 | - (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) | |
| 72 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) (c : ℝ) (hc : 0 < c) | |
| 73 | - (hK : ∀ v, c^2*‖v‖^2 ≤ inner ℝ (K v) v) : | |
| 74 | - ‖u‖ ≤ metricAmplification c*energyNorm period N hN ρ K u / weight δ N := by | |
| 75 | - exact (norm_le_weighted period N hS ρ δ hδ hδρ hδ1 u).trans | |
| 76 | - (div_le_div_of_nonneg_right (weightedNorm_le_energy period N hN ρ (hδ.trans_le hδρ) K u c hc hK) (weight_pos hδ N).le) | |
| 77 | - | |
| 78 | -end EulerGevreyContinuationNorm | |
+97 −1 Euler/GevreyCorrectionForcing.lean View file
| @@ -1,8 +1,104 @@ | ||
| 1 | 1 | import Euler.GevreyForcingComponents |
| 2 | -import Euler.GevreyPressureComplete | |
| 2 | +import Euler.GevreyPressureEnergy | |
| 3 | 3 | |
| 4 | 4 | /-! The actual differentiated correction forcing and its cutoff-independent nonlinear bound. -/ |
| 5 | 5 | |
| 6 | +/-! ## From `Euler/GevreyPressureComplete.lean` | |
| 7 | + | |
| 8 | +The text of `Euler/GevreyPressureComplete.lean`, folded into this file, which was its only importer. -/ | |
| 9 | + | |
| 10 | +section | |
| 11 | + | |
| 12 | +/-! Complete finite-cutoff pressure commutator bounds for both actual source components. -/ | |
| 13 | + | |
| 14 | +noncomputable section | |
| 15 | + | |
| 16 | +namespace EulerGevreyPressureEnergy | |
| 17 | + | |
| 18 | +open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 19 | + EulerSpatialSobolevInverse EulerH6Pressure EulerJetProductBounds EulerPacketWeights | |
| 20 | + EulerSobolevGevreyOperators EulerBasePressureCommutator EulerGevreyPressureTransport EulerH6Nonlinear | |
| 21 | + EulerSobolevTransportCommutator EulerSobolevCoefficientPressure EulerGevreyLowNorms | |
| 22 | + | |
| 23 | +variable (period : ℝ) [Fact (0 < period)] | |
| 24 | + | |
| 25 | +omit [Fact (0 < period)] in | |
| 26 | +/-- Monotonicity of the actual coefficient derivative blocks in their fixed Sobolev index. -/ | |
| 27 | +theorem coefficientBlock_mono {s p q : ℕ} (hpq : p ≤ q) {A : SmoothCoefficient period} | |
| 28 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) (n : ℕ) : | |
| 29 | + coefficientBlock period K p n ≤ coefficientBlock period K q n := by | |
| 30 | + apply mul_le_mul (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hpq) | |
| 31 | + (Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (by omega : p+1 ≤ q+1)) | |
| 32 | + (fun r _ _ => (boundLevel_nonneg K : 0 ≤ boundLevel period K (n+r)))) | |
| 33 | + (Finset.sum_nonneg (fun r _ => (boundLevel_nonneg K : 0 ≤ boundLevel period K (n+r)))) | |
| 34 | + (pow_nonneg (by norm_num) q) | |
| 35 | + | |
| 36 | +/-- The actual nonlinear external pressure commutator bound includes the zero-cutoff case. -/ | |
| 37 | +theorem nonlinear_externalPressure_bound_all {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 38 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 39 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 40 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 41 | + (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 42 | + (hbase : (EulerH6Pressure.CoefficientJet.restrict K 6 (by omega)).pressureConstant c ≤ M) | |
| 43 | + (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 44 | + (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 45 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 46 | + (u v : SobolevSpace period (s+1)) : | |
| 47 | + externalPressureNorm period K N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 48 | + (32*Rc*M*productConstant period 3)*weightedNorm period 6 N ρ u*weightedLoss period 6 N ρ v := by | |
| 49 | + cases N with | |
| 50 | + | zero => simp [externalPressureNorm, weightedLoss, commutatorBlock_zero] | |
| 51 | + | succ N => exact nonlinear_externalPressure_bound period hs K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff L hL u v | |
| 52 | + | |
| 53 | +/-- Actual base transport-pressure commutators are bounded by the product of the two velocity energies at the same cutoff. -/ | |
| 54 | +theorem nonlinear_basePressure_bound {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 55 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 56 | + (K0 : EulerSpatialSobolevInverse.CoefficientJet period standardDirection 6 A) | |
| 57 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 58 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 59 | + (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 60 | + (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 61 | + (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 62 | + (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 63 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 64 | + (u v : SobolevSpace period (s+1)) : | |
| 65 | + basePressureNorm period K0 N hN ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 66 | + (448*baseCoefficientSum period K0)*(8*M*(5460*lowerProductConstant period 3))* | |
| 67 | + weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 68 | + have hc5 : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2 := | |
| 69 | + fun l hl hn => (coefficientBlock_mono period (by norm_num : 5 ≤ 6) K l).trans (hcoeff l hl hn) | |
| 70 | + have hp := transportPressure_lower period hs K κ m c hc hpos N (by omega) ρ Rc M hρ hRc hM hbase hsmall hc5 L hL u v | |
| 71 | + exact (basePressureNorm_lower period K0 N hN ρ hρ _).trans | |
| 72 | + ((mul_le_mul_of_nonneg_left hp (mul_nonneg (by norm_num) (baseCoefficientSum_nonneg period K0))).trans_eq (by ring)) | |
| 73 | + | |
| 74 | +/-- Both actual commutators of the order-zero pressure are controlled by the unshifted source norm. -/ | |
| 75 | +theorem source_pressure_commutators {s : ℕ} {A : SmoothCoefficient period} | |
| 76 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 77 | + (K0 : EulerSpatialSobolevInverse.CoefficientJet period standardDirection 6 A) | |
| 78 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 79 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 80 | + (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 81 | + (hbase : (EulerH6Pressure.CoefficientJet.restrict K 6 (by omega)).pressureConstant c ≤ M) | |
| 82 | + (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 83 | + (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 84 | + (f : SobolevSpace period s) : | |
| 85 | + externalPressureNorm period K N ρ (pressureSobolevOperator period K κ m c hc hpos f) + | |
| 86 | + basePressureNorm period K0 N hN ρ (pressureSobolevOperator period K κ m c hc hpos f) ≤ | |
| 87 | + (2*M*(weightedCoefficient period K 6 N ρ + 448*baseCoefficientSum period K0))*weightedNorm period 6 N ρ f := by | |
| 88 | + have he := externalPressureNorm_unshifted period K N hN ρ hρ (pressureSobolevOperator period K κ m c hc hpos f) | |
| 89 | + have hb := basePressureNorm_unshifted period K0 N hN ρ hρ (pressureSobolevOperator period K κ m c hc hpos f) | |
| 90 | + have hp := weightedNorm_pressure period K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff f | |
| 91 | + have hsum := add_le_add he hb | |
| 92 | + rw [← add_mul] at hsum | |
| 93 | + exact hsum.trans ((mul_le_mul_of_nonneg_left hp (add_nonneg | |
| 94 | + (weightedCoefficient_nonneg period K 6 N ρ hρ) | |
| 95 | + (mul_nonneg (by norm_num) (baseCoefficientSum_nonneg period K0)))).trans_eq (by ring)) | |
| 96 | + | |
| 97 | +end EulerGevreyPressureEnergy | |
| 98 | +end | |
| 99 | + | |
| 100 | +end | |
| 101 | + | |
| 6 | 102 | noncomputable section |
| 7 | 103 | |
| 8 | 104 | namespace EulerGevreyCorrectionForcing |
+0 −57 Euler/GevreyEnergyCutoff.lean deleted
| @@ -1,57 +0,0 @@ | ||
| 1 | -import Euler.GevreyEnergyLimit | |
| 2 | -import Euler.EnergyWordCoordinates | |
| 3 | - | |
| 4 | -/-! Monotonicity of the actual finite Gevrey metric energy in the external cutoff. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerGevreyEnergyCutoff | |
| 9 | - | |
| 10 | -open Set EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerGevreyMetricComparison | |
| 11 | - EulerGevreyMetricEstimate EulerGevreyEnergyLimit EulerEnergyWordCoordinates | |
| 12 | - EulerWeightedCylinderEnergy EulerFiniteMetricEnergy EulerPacketWeights EulerBaseWordMetric | |
| 13 | - | |
| 14 | -/-- The literal inclusion of external words into a larger cutoff. -/ | |
| 15 | -def externalWordInclusion {N M : ℕ} (hNM : N ≤ M) (I : ExternalWord N) : ExternalWord M := | |
| 16 | - ⟨Fin.castLE (Nat.succ_le_succ hNM) I.1,I.2⟩ | |
| 17 | - | |
| 18 | -/-- Increasing the cutoff does not identify distinct derivative words. -/ | |
| 19 | -theorem externalWordInclusion_injective {N M : ℕ} (hNM : N ≤ M) : | |
| 20 | - Function.Injective (externalWordInclusion hNM) := by | |
| 21 | - intro I J h | |
| 22 | - obtain ⟨i,w⟩ := I | |
| 23 | - obtain ⟨j,v⟩ := J | |
| 24 | - have h1 := congrArg Sigma.fst h | |
| 25 | - have hij : i=j := Fin.castLE_injective (Nat.succ_le_succ hNM) h1 | |
| 26 | - subst j | |
| 27 | - have hw : w=v := by | |
| 28 | - have hh := (Sigma.mk.inj h).2 | |
| 29 | - exact eq_of_heq hh | |
| 30 | - subst v | |
| 31 | - rfl | |
| 32 | - | |
| 33 | -variable (period : ℝ) [Fact (0 < period)] | |
| 34 | - | |
| 35 | -/-- The retained energy coordinates are identical in a larger cutoff. -/ | |
| 36 | -theorem energyValues_inclusion {s N M q : ℕ} (hNM : N ≤ M) (hM : M+q ≤ s) | |
| 37 | - (u : SobolevSpace period s) (I : ExternalWord N) : | |
| 38 | - energyValues period q M hM u (externalWordInclusion hNM I) = | |
| 39 | - energyValues period q N (by omega) u I := by | |
| 40 | - funext a | |
| 41 | - rw [energyValues_eq_word,energyValues_eq_word] | |
| 42 | - rfl | |
| 43 | - | |
| 44 | -/-- The literal finite Gevrey metric energy increases with its external derivative cutoff. -/ | |
| 45 | -theorem energyNorm_cutoff_mono {s N M : ℕ} (hNM : N ≤ M) (hM : M+6 ≤ s) | |
| 46 | - (ρ : ℝ) (hρ : 0 < ρ) (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) : | |
| 47 | - energyNorm period N (by omega) ρ K u ≤ energyNorm period M hM ρ K u := by | |
| 48 | - unfold energyNorm weightedMetricSum | |
| 49 | - apply Finset.sum_le_sum_of_injOn (externalWordInclusion hNM) | |
| 50 | - (externalWordInclusion_injective hNM).injOn (Finset.subset_univ _) | |
| 51 | - · intro I _ | |
| 52 | - rw [energyValues_inclusion] | |
| 53 | - exact le_refl _ | |
| 54 | - · intro I _ _ | |
| 55 | - exact mul_nonneg (weight_pos hρ I.1.val).le (Real.sqrt_nonneg _) | |
| 56 | - | |
| 57 | -end EulerGevreyEnergyCutoff | |
+0 −59 Euler/GevreyEnergyLimit.lean deleted
| @@ -1,59 +0,0 @@ | ||
| 1 | -import Euler.GevreyRestriction | |
| 2 | -import Euler.GevreyMetricEstimate | |
| 3 | -import Euler.MetricPathConvergence | |
| 4 | - | |
| 5 | -/-! The actual finite Gevrey metric energy passes to strong Sobolev limits. -/ | |
| 6 | - | |
| 7 | -noncomputable section | |
| 8 | - | |
| 9 | -namespace EulerGevreyEnergyLimit | |
| 10 | - | |
| 11 | -open Set EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerGevreyMetricComparison | |
| 12 | - EulerGevreyDifferentiatedEquation EulerGevreyMetricEstimate EulerGevreyRestriction | |
| 13 | - EulerMetricPathConvergence EulerWeightedCylinderEnergy EulerFiniteMetricEnergy | |
| 14 | -open scoped Topology | |
| 15 | - | |
| 16 | -variable (period : ℝ) [Fact (0 < period)] | |
| 17 | - | |
| 18 | -/-- Actual energy coordinates depend continuously on the Sobolev field. -/ | |
| 19 | -theorem energyValues_continuous {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) : | |
| 20 | - Continuous (energyValues period q N hN) := by | |
| 21 | - apply continuous_pi | |
| 22 | - intro I | |
| 23 | - apply continuous_pi | |
| 24 | - intro a | |
| 25 | - exact (energyWordOperator period q N hN I a).continuous.congr | |
| 26 | - (fun u => energyWordOperator_apply period q N hN I a u) | |
| 27 | - | |
| 28 | -/-- The actual finite Gevrey metric energy is continuous in its Sobolev field, including zero energy. -/ | |
| 29 | -theorem energyNorm_continuous {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) (ρ : ℝ) | |
| 30 | - (K : LiftL2 period →L[ℝ] LiftL2 period) : | |
| 31 | - Continuous (energyNorm period N hN ρ K) := by | |
| 32 | - unfold energyNorm weightedMetricSum | |
| 33 | - apply continuous_finsetSum | |
| 34 | - intro I _ | |
| 35 | - apply Continuous.const_mul | |
| 36 | - exact familyMetricNorm_continuous.comp | |
| 37 | - (continuous_const.prodMk ((continuous_apply I).comp (energyValues_continuous period 6 N hN))) | |
| 38 | - | |
| 39 | -/-- Restriction preserving the derivative cutoff leaves the actual Gevrey energy unchanged. -/ | |
| 40 | -theorem energyNorm_restrict {p q : ℕ} (hqp : q ≤ p) (N : ℕ) (hN : N+6 ≤ q) (ρ : ℝ) | |
| 41 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period p) : | |
| 42 | - energyNorm period N hN ρ K (restrictOperator period hqp u) = | |
| 43 | - energyNorm period N (hN.trans hqp) ρ K u := by | |
| 44 | - unfold energyNorm | |
| 45 | - rw [energyValues_restrict] | |
| 46 | - | |
| 47 | -/-- A genuine strong lower-order limit retains every finite metric-energy bound whose derivative cutoff is retained. -/ | |
| 48 | -theorem energyNorm_limit_bound {p q : ℕ} (hqp : q ≤ p) (N : ℕ) (hN : N+6 ≤ q) (ρ : ℝ) | |
| 49 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (u : ℕ → SobolevSpace period p) (e : SobolevSpace period q) | |
| 50 | - (h : Filter.Tendsto (fun n => restrictOperator period hqp (u n)) Filter.atTop (𝓝 e)) | |
| 51 | - (M : ℝ) (hb : ∀ n, energyNorm period N (hN.trans hqp) ρ K (u n) ≤ M) : | |
| 52 | - energyNorm period N hN ρ K e ≤ M := by | |
| 53 | - apply le_of_tendsto ((energyNorm_continuous period N hN ρ K).continuousAt.tendsto.comp h) | |
| 54 | - exact Filter.Eventually.of_forall (fun n => by | |
| 55 | - change energyNorm period N hN ρ K (restrictOperator period hqp (u n)) ≤ M | |
| 56 | - rw [energyNorm_restrict] | |
| 57 | - exact hb n) | |
| 58 | - | |
| 59 | -end EulerGevreyEnergyLimit | |
+133 −1 Euler/GevreyEnergyPathLimit.lean View file
| @@ -1,7 +1,139 @@ | ||
| 1 | -import Euler.GevreyEnergyCutoff | |
| 1 | +import Euler.GevreyRestriction | |
| 2 | +import Euler.GevreyMetricEstimate | |
| 3 | +import Euler.MetricPathConvergence | |
| 4 | +import Euler.EnergyWordCoordinates | |
| 2 | 5 | |
| 3 | 6 | /-! Quantitative finite Gevrey bounds survive the actual strong time-path limit. -/ |
| 4 | 7 | |
| 8 | +/-! ## From `Euler/GevreyEnergyLimit.lean` | |
| 9 | + | |
| 10 | +The text of `Euler/GevreyEnergyLimit.lean`, folded into this file, which was its only importer. -/ | |
| 11 | + | |
| 12 | +section | |
| 13 | + | |
| 14 | +/-! The actual finite Gevrey metric energy passes to strong Sobolev limits. -/ | |
| 15 | + | |
| 16 | +noncomputable section | |
| 17 | + | |
| 18 | +namespace EulerGevreyEnergyLimit | |
| 19 | + | |
| 20 | +open Set EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerGevreyMetricComparison | |
| 21 | + EulerGevreyDifferentiatedEquation EulerGevreyMetricEstimate EulerGevreyRestriction | |
| 22 | + EulerMetricPathConvergence EulerWeightedCylinderEnergy EulerFiniteMetricEnergy | |
| 23 | +open scoped Topology | |
| 24 | + | |
| 25 | +variable (period : ℝ) [Fact (0 < period)] | |
| 26 | + | |
| 27 | +/-- Actual energy coordinates depend continuously on the Sobolev field. -/ | |
| 28 | +theorem energyValues_continuous {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) : | |
| 29 | + Continuous (energyValues period q N hN) := by | |
| 30 | + apply continuous_pi | |
| 31 | + intro I | |
| 32 | + apply continuous_pi | |
| 33 | + intro a | |
| 34 | + exact (energyWordOperator period q N hN I a).continuous.congr | |
| 35 | + (fun u => energyWordOperator_apply period q N hN I a u) | |
| 36 | + | |
| 37 | +/-- The actual finite Gevrey metric energy is continuous in its Sobolev field, including zero energy. -/ | |
| 38 | +theorem energyNorm_continuous {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) (ρ : ℝ) | |
| 39 | + (K : LiftL2 period →L[ℝ] LiftL2 period) : | |
| 40 | + Continuous (energyNorm period N hN ρ K) := by | |
| 41 | + unfold energyNorm weightedMetricSum | |
| 42 | + apply continuous_finsetSum | |
| 43 | + intro I _ | |
| 44 | + apply Continuous.const_mul | |
| 45 | + exact familyMetricNorm_continuous.comp | |
| 46 | + (continuous_const.prodMk ((continuous_apply I).comp (energyValues_continuous period 6 N hN))) | |
| 47 | + | |
| 48 | +/-- Restriction preserving the derivative cutoff leaves the actual Gevrey energy unchanged. -/ | |
| 49 | +theorem energyNorm_restrict {p q : ℕ} (hqp : q ≤ p) (N : ℕ) (hN : N+6 ≤ q) (ρ : ℝ) | |
| 50 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period p) : | |
| 51 | + energyNorm period N hN ρ K (restrictOperator period hqp u) = | |
| 52 | + energyNorm period N (hN.trans hqp) ρ K u := by | |
| 53 | + unfold energyNorm | |
| 54 | + rw [energyValues_restrict] | |
| 55 | + | |
| 56 | +/-- A genuine strong lower-order limit retains every finite metric-energy bound whose derivative cutoff is retained. -/ | |
| 57 | +theorem energyNorm_limit_bound {p q : ℕ} (hqp : q ≤ p) (N : ℕ) (hN : N+6 ≤ q) (ρ : ℝ) | |
| 58 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (u : ℕ → SobolevSpace period p) (e : SobolevSpace period q) | |
| 59 | + (h : Filter.Tendsto (fun n => restrictOperator period hqp (u n)) Filter.atTop (𝓝 e)) | |
| 60 | + (M : ℝ) (hb : ∀ n, energyNorm period N (hN.trans hqp) ρ K (u n) ≤ M) : | |
| 61 | + energyNorm period N hN ρ K e ≤ M := by | |
| 62 | + apply le_of_tendsto ((energyNorm_continuous period N hN ρ K).continuousAt.tendsto.comp h) | |
| 63 | + exact Filter.Eventually.of_forall (fun n => by | |
| 64 | + change energyNorm period N hN ρ K (restrictOperator period hqp (u n)) ≤ M | |
| 65 | + rw [energyNorm_restrict] | |
| 66 | + exact hb n) | |
| 67 | + | |
| 68 | +end EulerGevreyEnergyLimit | |
| 69 | +end | |
| 70 | + | |
| 71 | +end | |
| 72 | + | |
| 73 | +/-! ## From `Euler/GevreyEnergyCutoff.lean` | |
| 74 | + | |
| 75 | +The text of `Euler/GevreyEnergyCutoff.lean`, folded into this file, which was its only importer. -/ | |
| 76 | + | |
| 77 | +section | |
| 78 | + | |
| 79 | +/-! Monotonicity of the actual finite Gevrey metric energy in the external cutoff. -/ | |
| 80 | + | |
| 81 | +noncomputable section | |
| 82 | + | |
| 83 | +namespace EulerGevreyEnergyCutoff | |
| 84 | + | |
| 85 | +open Set EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerGevreyMetricComparison | |
| 86 | + EulerGevreyMetricEstimate EulerGevreyEnergyLimit EulerEnergyWordCoordinates | |
| 87 | + EulerWeightedCylinderEnergy EulerFiniteMetricEnergy EulerPacketWeights EulerBaseWordMetric | |
| 88 | + | |
| 89 | +/-- The literal inclusion of external words into a larger cutoff. -/ | |
| 90 | +def externalWordInclusion {N M : ℕ} (hNM : N ≤ M) (I : ExternalWord N) : ExternalWord M := | |
| 91 | + ⟨Fin.castLE (Nat.succ_le_succ hNM) I.1,I.2⟩ | |
| 92 | + | |
| 93 | +/-- Increasing the cutoff does not identify distinct derivative words. -/ | |
| 94 | +theorem externalWordInclusion_injective {N M : ℕ} (hNM : N ≤ M) : | |
| 95 | + Function.Injective (externalWordInclusion hNM) := by | |
| 96 | + intro I J h | |
| 97 | + obtain ⟨i,w⟩ := I | |
| 98 | + obtain ⟨j,v⟩ := J | |
| 99 | + have h1 := congrArg Sigma.fst h | |
| 100 | + have hij : i=j := Fin.castLE_injective (Nat.succ_le_succ hNM) h1 | |
| 101 | + subst j | |
| 102 | + have hw : w=v := by | |
| 103 | + have hh := (Sigma.mk.inj h).2 | |
| 104 | + exact eq_of_heq hh | |
| 105 | + subst v | |
| 106 | + rfl | |
| 107 | + | |
| 108 | +variable (period : ℝ) [Fact (0 < period)] | |
| 109 | + | |
| 110 | +/-- The retained energy coordinates are identical in a larger cutoff. -/ | |
| 111 | +theorem energyValues_inclusion {s N M q : ℕ} (hNM : N ≤ M) (hM : M+q ≤ s) | |
| 112 | + (u : SobolevSpace period s) (I : ExternalWord N) : | |
| 113 | + energyValues period q M hM u (externalWordInclusion hNM I) = | |
| 114 | + energyValues period q N (by omega) u I := by | |
| 115 | + funext a | |
| 116 | + rw [energyValues_eq_word,energyValues_eq_word] | |
| 117 | + rfl | |
| 118 | + | |
| 119 | +/-- The literal finite Gevrey metric energy increases with its external derivative cutoff. -/ | |
| 120 | +theorem energyNorm_cutoff_mono {s N M : ℕ} (hNM : N ≤ M) (hM : M+6 ≤ s) | |
| 121 | + (ρ : ℝ) (hρ : 0 < ρ) (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) : | |
| 122 | + energyNorm period N (by omega) ρ K u ≤ energyNorm period M hM ρ K u := by | |
| 123 | + unfold energyNorm weightedMetricSum | |
| 124 | + apply Finset.sum_le_sum_of_injOn (externalWordInclusion hNM) | |
| 125 | + (externalWordInclusion_injective hNM).injOn (Finset.subset_univ _) | |
| 126 | + · intro I _ | |
| 127 | + rw [energyValues_inclusion] | |
| 128 | + exact le_refl _ | |
| 129 | + · intro I _ _ | |
| 130 | + exact mul_nonneg (weight_pos hρ I.1.val).le (Real.sqrt_nonneg _) | |
| 131 | + | |
| 132 | +end EulerGevreyEnergyCutoff | |
| 133 | +end | |
| 134 | + | |
| 135 | +end | |
| 136 | + | |
| 5 | 137 | noncomputable section |
| 6 | 138 | |
| 7 | 139 | namespace EulerGevreyEnergyPathLimit |
+0 −110 Euler/GevreyFlowBootstrap.lean deleted
| @@ -1,110 +0,0 @@ | ||
| 1 | -import Mathlib.Topology.Order.IntermediateValue | |
| 2 | -import Mathlib.Topology.Order.Compact | |
| 3 | -import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic | |
| 4 | -import Mathlib.Tactic | |
| 5 | - | |
| 6 | -/-! The finite generating-sum bootstrap used for the small lifted flow in | |
| 7 | -source (21). A first-hitting argument proves the bound from an integral | |
| 8 | -inequality valid only inside its radius of convergence. No global | |
| 9 | -smallness of the unknown path or exponential flow bound is assumed. -/ | |
| 10 | - | |
| 11 | -noncomputable section | |
| 12 | - | |
| 13 | -namespace EulerGevreyFlowBootstrap | |
| 14 | - | |
| 15 | -open Set MeasureTheory | |
| 16 | -open scoped Interval | |
| 17 | - | |
| 18 | -/-- A continuous path cannot first hit a barrier if its bound up to that | |
| 19 | -first hit lies strictly below the barrier. -/ | |
| 20 | -theorem continuous_barrier (f : ℝ → ℝ) (T B a : ℝ) | |
| 21 | - (_hT : 0 ≤ T) (hB : 0 ≤ B) (ha : 0 < a) (hBa : B*T < a) | |
| 22 | - (hf : ContinuousOn f (Icc 0 T)) (hf0 : f 0 = 0) | |
| 23 | - (hstep : ∀ t ∈ Icc 0 T, (∀ s ∈ Icc 0 t, f s ≤ a) → f t ≤ B*t) : | |
| 24 | - ∀ t ∈ Icc 0 T, f t ≤ B*t := by | |
| 25 | - have hstrict : ∀ t ∈ Icc 0 T, f t < a := by | |
| 26 | - intro t ht | |
| 27 | - by_contra hfail | |
| 28 | - let S := Icc (0 : ℝ) T ∩ f ⁻¹' Ici a | |
| 29 | - have hSc : IsCompact S := isCompact_Icc.of_isClosed_subset | |
| 30 | - (hf.preimage_isClosed_of_isClosed isClosed_Icc isClosed_Ici) inter_subset_left | |
| 31 | - have hSn : S.Nonempty := ⟨t,ht,le_of_not_gt hfail⟩ | |
| 32 | - obtain ⟨m,hm⟩ := hSc.exists_isLeast hSn | |
| 33 | - have hmI : m ∈ Icc (0 : ℝ) T := hm.1.1 | |
| 34 | - have hmhigh : a ≤ f m := hm.1.2 | |
| 35 | - have hfm : f m = a := by | |
| 36 | - have hc : ContinuousOn f (Icc 0 m) := hf.mono (Icc_subset_Icc_right hmI.2) | |
| 37 | - obtain ⟨r,hr,her⟩ := intermediate_value_Icc hmI.1 hc | |
| 38 | - (show a ∈ Icc (f 0) (f m) from ⟨by rw [hf0]; exact ha.le,hmhigh⟩) | |
| 39 | - have hmr : m ≤ r := hm.2 ⟨⟨hr.1,hr.2.trans hmI.2⟩,her.ge⟩ | |
| 40 | - have hrm : r = m := le_antisymm hr.2 hmr | |
| 41 | - simpa only [hrm] using her | |
| 42 | - have hbefore : ∀ s ∈ Icc 0 m, f s ≤ a := by | |
| 43 | - intro s hs | |
| 44 | - by_cases hsm : s = m | |
| 45 | - · simp only [hsm,hfm,le_refl] | |
| 46 | - · have hlt : s < m := lt_of_le_of_ne hs.2 hsm | |
| 47 | - by_contra hhigh | |
| 48 | - have hms : m ≤ s := hm.2 ⟨⟨hs.1,hs.2.trans hmI.2⟩,(lt_of_not_ge hhigh).le⟩ | |
| 49 | - exact (not_le_of_gt hlt) hms | |
| 50 | - have hh := hstep m hmI hbefore | |
| 51 | - have hmB : B*m ≤ B*T := mul_le_mul_of_nonneg_left hmI.2 hB | |
| 52 | - rw [hfm] at hh | |
| 53 | - linarith | |
| 54 | - intro t ht | |
| 55 | - exact hstep t ht (fun s hs => (hstrict s ⟨hs.1,hs.2.trans ht.2⟩).le) | |
| 56 | - | |
| 57 | -def rationalRate (B R a u : ℝ) : ℝ := B*(R*(a+u))/(1-R*(a+u)) | |
| 58 | - | |
| 59 | -theorem rationalRate_le (B R a u : ℝ) (hB : 0 ≤ B) | |
| 60 | - (hu : R*(a+u) ≤ 1/2) : rationalRate B R a u ≤ B := by | |
| 61 | - have hd : 0 < 1-R*(a+u) := by linarith | |
| 62 | - unfold rationalRate | |
| 63 | - apply (div_le_iff₀ hd).2 | |
| 64 | - linarith [mul_le_mul_of_nonneg_left hu hB] | |
| 65 | - | |
| 66 | -/-- The nonlinear generating-sum inequality closes at BRT≤1/8. The bound | |
| 67 | -is linear in the velocity size B and time, with no exponential factor. -/ | |
| 68 | -theorem rational_integral_bootstrap (f : ℝ → ℝ) (T B R : ℝ) | |
| 69 | - (hT : 0 ≤ T) (hB : 0 ≤ B) (hR : 0 < R) (hsmall : B*R*T ≤ 1/8) | |
| 70 | - (hf : ContinuousOn f (Icc 0 T)) (hf0 : f 0 = 0) | |
| 71 | - (hineq : ∀ t ∈ Icc 0 T, | |
| 72 | - (∀ s ∈ Icc 0 t, R*((4*R)⁻¹+f s) ≤ 1/2) → | |
| 73 | - f t ≤ ∫ s in 0..t, rationalRate B R ((4*R)⁻¹) (f s)) : | |
| 74 | - ∀ t ∈ Icc 0 T, f t ≤ B*t ∧ R*((4*R)⁻¹+f t) ≤ 3/8 := by | |
| 75 | - have ha : 0 < (4*R)⁻¹ := inv_pos.mpr (by positivity) | |
| 76 | - have hRa : R*(4*R)⁻¹ = 1/4 := by field_simp | |
| 77 | - have hBT : B*T < (4*R)⁻¹ := by | |
| 78 | - by_contra h | |
| 79 | - have hm := mul_le_mul_of_nonneg_left (le_of_not_gt h) hR.le | |
| 80 | - rw [hRa] at hm | |
| 81 | - linarith | |
| 82 | - have hb : ∀ t ∈ Icc 0 T, f t ≤ B*t := by | |
| 83 | - apply continuous_barrier f T B ((4*R)⁻¹) hT hB ha hBT hf hf0 | |
| 84 | - intro t ht hbefore | |
| 85 | - have hhalf : ∀ s ∈ Icc 0 t, R*((4*R)⁻¹+f s) ≤ 1/2 := by | |
| 86 | - intro s hs | |
| 87 | - have hm := mul_le_mul_of_nonneg_left (hbefore s hs) hR.le | |
| 88 | - linarith | |
| 89 | - have hden : ∀ s ∈ Icc 0 t, 1-R*((4*R)⁻¹+f s) ≠ 0 := by | |
| 90 | - intro s hs | |
| 91 | - have hh := hhalf s hs | |
| 92 | - linarith | |
| 93 | - have hrate : ContinuousOn (fun s => rationalRate B R ((4*R)⁻¹) (f s)) (Icc 0 t) := by | |
| 94 | - have hf' := hf.mono (Icc_subset_Icc_right ht.2) | |
| 95 | - unfold rationalRate | |
| 96 | - exact (continuousOn_const.mul (continuousOn_const.mul (continuousOn_const.add hf'))).div | |
| 97 | - (continuousOn_const.sub (continuousOn_const.mul (continuousOn_const.add hf'))) hden | |
| 98 | - have hi : IntervalIntegrable (fun s => rationalRate B R ((4*R)⁻¹) (f s)) volume 0 t := | |
| 99 | - hrate.intervalIntegrable_of_Icc ht.1 | |
| 100 | - have hm := intervalIntegral.integral_mono_on ht.1 hi intervalIntegrable_const | |
| 101 | - (fun s hs => rationalRate_le B R ((4*R)⁻¹) (f s) hB (hhalf s hs)) | |
| 102 | - have hc : (∫ s in (0 : ℝ)..t, B) = B*t := by simp [mul_comm] | |
| 103 | - exact (hineq t ht hhalf).trans (hm.trans_eq hc) | |
| 104 | - intro t ht | |
| 105 | - refine ⟨hb t ht,?_⟩ | |
| 106 | - have hm := mul_le_mul_of_nonneg_left (hb t ht) hR.le | |
| 107 | - have htB := mul_le_mul_of_nonneg_left ht.2 (mul_nonneg hB hR.le) | |
| 108 | - linarith | |
| 109 | - | |
| 110 | -end EulerGevreyFlowBootstrap | |
+117 −1 Euler/GevreyFlowLpIntegration.lean View file
| @@ -1,4 +1,4 @@ | ||
| 1 | -import Euler.GevreyJetCompositionLp | |
| 1 | +import Euler.GevreyCompositionLp | |
| 2 | 2 | import Euler.LpParameterIntegral |
| 3 | 3 | |
| 4 | 4 | /-! The all-order L² step for a volume-preserving flow. The spatial base |
| @@ -6,6 +6,122 @@ may be a periodic cylinder. The output is the actual time integral of | ||
| 6 | 6 | the finite Taylor composition; identifying it with the displacement jet |
| 7 | 7 | uses the already constructed flow's differentiated integral equation. -/ |
| 8 | 8 | |
| 9 | +/-! ## From `Euler/GevreyJetCompositionLp.lean` | |
| 10 | + | |
| 11 | +The text of `Euler/GevreyJetCompositionLp.lean`, folded into this file, which was its only importer. -/ | |
| 12 | + | |
| 13 | +section | |
| 14 | + | |
| 15 | +/-! The L² composition estimate over an arbitrary measure space. This | |
| 16 | +version allows the base to be a periodic cylinder while the derivatives | |
| 17 | +are tensors on its Euclidean cover. The output is the literal finite | |
| 18 | +Taylor composition of the given jets. -/ | |
| 19 | + | |
| 20 | +noncomputable section | |
| 21 | + | |
| 22 | +open MeasureTheory | |
| 23 | +open scoped BigOperators ENNReal | |
| 24 | + | |
| 25 | +namespace EulerGevreyJetCompositionLp | |
| 26 | + | |
| 27 | +open EulerGevreyComposition EulerGevreyCompositionLp | |
| 28 | + | |
| 29 | +variable {X E F : Type*} [MeasurableSpace X] | |
| 30 | + [NormedAddCommGroup E] [NormedSpace ℝ E] | |
| 31 | + [NormedAddCommGroup F] [NormedSpace ℝ F] | |
| 32 | + | |
| 33 | +theorem taylorComp_partition_bound | |
| 34 | + (P : FormalMultilinearSeries ℝ E E) (Q : FormalMultilinearSeries ℝ E F) | |
| 35 | + (n : ℕ) (B R : ℝ) | |
| 36 | + (hP : ∀ j, 0 < j → j ≤ n → ‖P j‖ ≤ B*R^j*(j.factorial : ℝ)^2) : | |
| 37 | + ‖Q.taylorComp P n‖ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c*‖Q c.length‖ := by | |
| 38 | + apply (norm_sum_le _ _).trans | |
| 39 | + apply Finset.sum_le_sum | |
| 40 | + intro c _ | |
| 41 | + calc | |
| 42 | + _ ≤ ‖Q c.length‖*∏ i, ‖P (c.partSize i)‖ := c.norm_compAlongOrderedFinpartition_le _ _ | |
| 43 | + _ ≤ ‖Q c.length‖*innerPartitionBound B R c := by | |
| 44 | + apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) | |
| 45 | + exact Finset.prod_le_prod (fun i _ => norm_nonneg _) | |
| 46 | + (fun i _ => hP _ (c.partSize_pos i) (c.partSize_le i)) | |
| 47 | + _ = _ := mul_comm _ _ | |
| 48 | + | |
| 49 | +/-- Outer tensors are transported in L² by the actual measure-preserving | |
| 50 | +map; only the positive inner tensors use uniform bounds. -/ | |
| 51 | +theorem composition_memLp_and_bound | |
| 52 | + (μ : Measure X) (φ : X → X) (hφ : MeasurePreserving φ μ μ) | |
| 53 | + (P : X → FormalMultilinearSeries ℝ E E) (Q : X → FormalMultilinearSeries ℝ E F) | |
| 54 | + (n : ℕ) | |
| 55 | + (hcomp : AEStronglyMeasurable (fun x => (Q (φ x)).taylorComp (P x) n) μ) | |
| 56 | + (A B R S : ℝ) (hA : 0 ≤ A) (hB : 0 ≤ B) (hR : 0 ≤ R) (hS : 0 ≤ S) | |
| 57 | + (hQLp : ∀ j ≤ n, MemLp (fun x => Q x j) 2 μ) | |
| 58 | + (hQ : ∀ j ≤ n, (eLpNorm (fun x => Q x j) 2 μ).toReal ≤ A*S^j*(j.factorial : ℝ)^2) | |
| 59 | + (hP : ∀ j, 0 < j → j ≤ n → ∀ x, ‖P x j‖ ≤ B*R^j*(j.factorial : ℝ)^2) : | |
| 60 | + MemLp (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ ∧ | |
| 61 | + (eLpNorm (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ).toReal ≤ | |
| 62 | + A*(R*(B*S+2))^n*(n.factorial : ℝ)^2 := by | |
| 63 | + let H : OrderedFinpartition n → X → ℝ := fun c x => | |
| 64 | + innerPartitionBound B R c*‖Q (φ x) c.length‖ | |
| 65 | + have hHpos (c : OrderedFinpartition n) (x : X) : 0 ≤ H c x := | |
| 66 | + mul_nonneg (innerPartitionBound_nonneg B R hB hR c) (norm_nonneg _) | |
| 67 | + have hHLp (c : OrderedFinpartition n) : MemLp (H c) 2 μ := | |
| 68 | + (((hQLp c.length c.length_le).norm).comp_measurePreserving hφ).const_mul _ | |
| 69 | + have hsumLp : MemLp (fun x => ∑ c : OrderedFinpartition n, H c x) 2 μ := | |
| 70 | + memLp_finsetSum _ (fun c _ => hHLp c) | |
| 71 | + have hdom (x : X) : ‖(Q (φ x)).taylorComp (P x) n‖ ≤ ∑ c : OrderedFinpartition n, H c x := | |
| 72 | + taylorComp_partition_bound (P x) (Q (φ x)) n B R (fun j hj hjn => hP j hj hjn x) | |
| 73 | + have hcompLp : MemLp (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ := by | |
| 74 | + apply hsumLp.of_le hcomp | |
| 75 | + filter_upwards [] with x | |
| 76 | + rw [Real.norm_of_nonneg (Finset.sum_nonneg (fun c _ => hHpos c x))] | |
| 77 | + exact hdom x | |
| 78 | + refine ⟨hcompLp,?_⟩ | |
| 79 | + have he : (fun x => ∑ c : OrderedFinpartition n, H c x) = ∑ c : OrderedFinpartition n, H c := by | |
| 80 | + funext x | |
| 81 | + simp only [Finset.sum_apply] | |
| 82 | + have hsumNorm := eLpNorm_sum_le | |
| 83 | + (fun c (_ : c ∈ (Finset.univ : Finset (OrderedFinpartition n))) => (hHLp c).aestronglyMeasurable) | |
| 84 | + (by norm_num : (1 : ℝ≥0∞) ≤ 2) | |
| 85 | + have hLpNorm : eLpNorm (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ ≤ | |
| 86 | + ∑ c : OrderedFinpartition n, eLpNorm (H c) 2 μ := by | |
| 87 | + apply (eLpNorm_mono_ae_real (Filter.Eventually.of_forall hdom)).trans | |
| 88 | + rw [he] | |
| 89 | + exact hsumNorm | |
| 90 | + have hreal := ENNReal.toReal_mono | |
| 91 | + (ENNReal.sum_ne_top.mpr (fun c _ => (hHLp c).eLpNorm_ne_top)) hLpNorm | |
| 92 | + rw [ENNReal.toReal_sum (fun c _ => (hHLp c).eLpNorm_ne_top)] at hreal | |
| 93 | + have hHnorm (c : OrderedFinpartition n) : | |
| 94 | + (eLpNorm (H c) 2 μ).toReal = innerPartitionBound B R c* | |
| 95 | + (eLpNorm (fun x => Q x c.length) 2 μ).toReal := by | |
| 96 | + have hfun : H c = innerPartitionBound B R c • ((fun y => ‖Q y c.length‖) ∘ φ) := rfl | |
| 97 | + rw [hfun, eLpNorm_const_smul, | |
| 98 | + eLpNorm_comp_measurePreserving (hQLp c.length c.length_le).aestronglyMeasurable.norm hφ, | |
| 99 | + eLpNorm_norm, ENNReal.toReal_mul, toReal_enorm, | |
| 100 | + Real.norm_of_nonneg (innerPartitionBound_nonneg B R hB hR c)] | |
| 101 | + simp_rw [hHnorm] at hreal | |
| 102 | + calc | |
| 103 | + _ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c* | |
| 104 | + (eLpNorm (fun x => Q x c.length) 2 μ).toReal := hreal | |
| 105 | + _ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c* | |
| 106 | + (A*S^c.length*(c.length.factorial : ℝ)^2) := by | |
| 107 | + exact Finset.sum_le_sum fun c _ => mul_le_mul_of_nonneg_left | |
| 108 | + (hQ c.length c.length_le) (innerPartitionBound_nonneg B R hB hR c) | |
| 109 | + _ = A*R^n*partitionSum n (B*S) := by | |
| 110 | + rw [partitionSum, Finset.mul_sum] | |
| 111 | + apply Finset.sum_congr rfl | |
| 112 | + intro c _ | |
| 113 | + rw [mul_comm] | |
| 114 | + exact partition_bound_factorization c A B R S | |
| 115 | + _ ≤ A*R^n*((B*S+2)^n*(n.factorial : ℝ)^2) := | |
| 116 | + mul_le_mul_of_nonneg_left (partitionSum_le n (B*S) (mul_nonneg hB hS)) | |
| 117 | + (mul_nonneg hA (pow_nonneg hR n)) | |
| 118 | + _ = _ := by rw [mul_pow]; ring | |
| 119 | + | |
| 120 | +end EulerGevreyJetCompositionLp | |
| 121 | +end | |
| 122 | + | |
| 123 | +end | |
| 124 | + | |
| 9 | 125 | noncomputable section |
| 10 | 126 | |
| 11 | 127 | open Set MeasureTheory Filter |
+104 −1 Euler/GevreyForcingComponents.lean View file
| @@ -1,9 +1,112 @@ | ||
| 1 | -import Euler.GevreyBaseTransport | |
| 1 | +import Euler.SobolevBaseCommutator | |
| 2 | +import Euler.GevreyLowNorms | |
| 2 | 3 | import Euler.GevreyPressureEnergy |
| 3 | 4 | import Euler.WeightedForcingAlgebra |
| 4 | 5 | |
| 5 | 6 | /-! Literal differentiated forcing arrays and their actual finite Gevrey norms. -/ |
| 6 | 7 | |
| 8 | +/-! ## From `Euler/GevreyBaseTransport.lean` | |
| 9 | + | |
| 10 | +The text of `Euler/GevreyBaseTransport.lean`, folded into this file, which was its only importer. -/ | |
| 11 | + | |
| 12 | +section | |
| 13 | + | |
| 14 | +/-! Summation of the actual base transport commutators with no external-cutoff constant. -/ | |
| 15 | + | |
| 16 | +noncomputable section | |
| 17 | + | |
| 18 | +namespace EulerGevreyBaseTransport | |
| 19 | + | |
| 20 | +open MeasureTheory EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 21 | + EulerH6Pressure EulerPacketWeights EulerSobolevGevreyOperators EulerBaseWordMetric EulerFiniteMetricEnergy | |
| 22 | + EulerWeightedCylinderEnergy EulerGevreyMetricComparison EulerSobolevWordLevel EulerSobolevBaseCommutator | |
| 23 | + EulerBaseTransportL2 EulerGevreyLowNorms | |
| 24 | + | |
| 25 | +variable (period : ℝ) [Fact (0 < period)] | |
| 26 | + | |
| 27 | +/-- Restriction commutes with taking an actual derivative word at a lower Sobolev level. -/ | |
| 28 | +theorem restrict_wordAtLevel {s p q n : ℕ} (hq : q ≤ p) (w : Fin n → Fin 4) (hp : n+p ≤ s) | |
| 29 | + (u : SobolevSpace period s) : | |
| 30 | + restrictOperator period hq (wordAtLevel period p n w hp u) = wordAtLevel period q n w (by omega) u := by | |
| 31 | + apply value_injective period | |
| 32 | + rw [value_restrictOperator, wordAtLevel_value, wordAtLevel_value] | |
| 33 | + | |
| 34 | +/-- The exact base derivative sum is contained in every truncated actual Gevrey norm. -/ | |
| 35 | +theorem sumNorm_restrict_le_weighted {s q : ℕ} (hq : q ≤ s) (N : ℕ) (ρ : ℝ) (hρ : 0 < ρ) | |
| 36 | + (u : SobolevSpace period s) : | |
| 37 | + sumNorm period (restrictOperator period hq u) ≤ weightedNorm period q N ρ u := by | |
| 38 | + have he : sumNorm period (restrictOperator period hq u) = blockNorm period (toJet period u) q 0 := by | |
| 39 | + rw [blockNorm_zero_eq_size (toJet period u) hq] | |
| 40 | + rw [sumNorm_eq_jet, ← sobolevSize_eq period (toJet period (restrictOperator period hq u)), value_restrictOperator] | |
| 41 | + rw [he] | |
| 42 | + have hsum := Finset.single_le_sum (s := Finset.range (N+1)) | |
| 43 | + (fun n _ => mul_nonneg (weight_pos hρ n).le (show 0 ≤ blockNorm period (toJet period u) q n from blockNorm_nonneg _)) | |
| 44 | + (show 0 ∈ Finset.range (N+1) by simp) | |
| 45 | + simpa [weight, weightedNorm] using hsum | |
| 46 | + | |
| 47 | +/-- Exact external-word expansion of the actual Gevrey Sobolev sum. -/ | |
| 48 | +theorem weighted_word_sums {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) (u : SobolevSpace period s) : | |
| 49 | + (∑ I : ExternalWord N, weight ρ I.1.val * sumNorm period | |
| 50 | + (wordAtLevel period q I.1.val I.2 (by have := I.1.isLt; omega) u)) = weightedNorm period q N ρ u := by | |
| 51 | + rw [Fintype.sum_sigma, weightedNorm, ← Fin.sum_univ_eq_sum_range] | |
| 52 | + apply Finset.sum_congr rfl | |
| 53 | + intro n _ | |
| 54 | + rw [blockNorm_baseWords period u (by have := n.isLt; omega : n.val+q ≤ s), Finset.mul_sum] | |
| 55 | + apply Finset.sum_congr rfl | |
| 56 | + intro w _ | |
| 57 | + rw [sumNorm_wordAtLevel] | |
| 58 | + | |
| 59 | +/-- The literal base transport forcing at every external and base derivative word. -/ | |
| 60 | +def baseTransportForcing {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 61 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 62 | + (u v : SobolevSpace period (s+1)) : ExternalWord N → BaseWord 6 → LiftL2 period := fun I a => | |
| 63 | + baseCommutator period a.1.val (by have := a.1.isLt; omega) a.2 L hL | |
| 64 | + (restrictOperator period (by omega : 7 ≤ s+1) u) | |
| 65 | + (wordAtLevel period 7 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+7 ≤ s+1) v) | |
| 66 | + | |
| 67 | +/-- Each base-word forcing family is controlled by the fixed H⁶ norms, with the fixed word-count factor 5461. -/ | |
| 68 | +theorem baseTransportForcing_family_bound {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 69 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 70 | + (u v : SobolevSpace period (s+1)) (I : ExternalWord N) : | |
| 71 | + familyNorm (baseTransportForcing period N hN L hL u v I) ≤ | |
| 72 | + (5461*baseTransportConstant period) * sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u) * | |
| 73 | + sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+6 ≤ s+1) v) := by | |
| 74 | + have hb (a : BaseWord 6) : ‖baseTransportForcing period N hN L hL u v I a‖ ≤ | |
| 75 | + baseTransportConstant period * sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u) * | |
| 76 | + sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+6 ≤ s+1) v) := by | |
| 77 | + have h := baseCommutator_bound period a.1.val (by have := a.1.isLt; omega) a.2 L hL | |
| 78 | + (restrictOperator period (by omega : 7 ≤ s+1) u) | |
| 79 | + (wordAtLevel period 7 I.1.val I.2 (by have := I.1.isLt; omega : I.1.val+7 ≤ s+1) v) | |
| 80 | + rw [restrictOperator_comp, restrict_wordAtLevel] at h | |
| 81 | + exact h | |
| 82 | + have hsum := Finset.sum_le_sum (s := (Finset.univ : Finset (BaseWord 6))) (fun a _ => hb a) | |
| 83 | + exact (familyNorm_le_sum_norm _).trans (hsum.trans_eq (by | |
| 84 | + simp only [Finset.sum_const, Finset.card_univ, card_baseWord_six, nsmul_eq_mul]; ring)) | |
| 85 | + | |
| 86 | +/-- The actual weighted base transport forcing has no external derivative loss or cutoff-dependent coefficient. -/ | |
| 87 | +theorem baseTransportForcing_weighted_bound {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) | |
| 88 | + (ρ : ℝ) (hρ : 0 < ρ) (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 89 | + (u v : SobolevSpace period (s+1)) : | |
| 90 | + weightedForcingSum ρ (fun I : ExternalWord N => I.1.val) (baseTransportForcing period N hN L hL u v) ≤ | |
| 91 | + (5461*baseTransportConstant period)*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 92 | + have h := Finset.sum_le_sum (s := (Finset.univ : Finset (ExternalWord N))) (fun I _ => | |
| 93 | + mul_le_mul_of_nonneg_left (baseTransportForcing_family_bound period N hN L hL u v I) (weight_pos hρ I.1.val).le) | |
| 94 | + have he : (∑ I : ExternalWord N, weight ρ I.1.val * | |
| 95 | + ((5461*baseTransportConstant period)*sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u)* | |
| 96 | + sumNorm period (wordAtLevel period 6 I.1.val I.2 (by have := I.1.isLt; omega) v))) = | |
| 97 | + (5461*baseTransportConstant period)*sumNorm period (restrictOperator period (by omega : 6 ≤ s+1) u)*weightedNorm period 6 N ρ v := by | |
| 98 | + rw [← weighted_word_sums period 6 N (by omega : N+6 ≤ s+1) ρ v, Finset.mul_sum] | |
| 99 | + exact Finset.sum_congr rfl (fun I _ => by ring) | |
| 100 | + rw [he] at h | |
| 101 | + exact h.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left | |
| 102 | + (sumNorm_restrict_le_weighted period (by omega : 6 ≤ s+1) N ρ hρ u) | |
| 103 | + (mul_nonneg (by norm_num) (baseTransportConstant_nonneg period))) (weightedNorm_nonneg period 6 N ρ hρ v)) | |
| 104 | + | |
| 105 | +end EulerGevreyBaseTransport | |
| 106 | +end | |
| 107 | + | |
| 108 | +end | |
| 109 | + | |
| 7 | 110 | noncomputable section |
| 8 | 111 | |
| 9 | 112 | namespace EulerGevreyForcingComponents |
+0 −177 Euler/GevreyGeneratingAlgebra.lean deleted
| @@ -1,177 +0,0 @@ | ||
| 1 | -import Euler.GevreyCompositionPartitions | |
| 2 | -import Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno | |
| 3 | -import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas | |
| 4 | -import Mathlib.Analysis.Calculus.Deriv.Polynomial | |
| 5 | -import Mathlib.Analysis.Calculus.ContDiff.Polynomial | |
| 6 | -import Mathlib.Algebra.Polynomial.Eval.Degree | |
| 7 | -import Mathlib.Algebra.Order.Field.GeomSum | |
| 8 | - | |
| 9 | -/-! Finite polynomial majorants for factorial-square Taylor coefficients. | |
| 10 | -The polynomials below are auxiliary nonnegative scalar polynomials. Their | |
| 11 | -composition is the exact scalar Faà di Bruno sum, not an assumed majorant | |
| 12 | -for a flow or for a solution of a differential equation. -/ | |
| 13 | - | |
| 14 | -noncomputable section | |
| 15 | - | |
| 16 | -open scoped BigOperators ContDiff Polynomial | |
| 17 | - | |
| 18 | -namespace EulerGevreyGeneratingAlgebra | |
| 19 | - | |
| 20 | -open EulerGevreyComposition | |
| 21 | - | |
| 22 | -lemma factorialProduct_nonneg {n : ℕ} (c : OrderedFinpartition n) : | |
| 23 | - 0 ≤ factorialProduct c := | |
| 24 | - Finset.prod_nonneg fun _ _ => Nat.cast_nonneg _ | |
| 25 | - | |
| 26 | -/-- The factorial used by an ordered partition never exceeds the total | |
| 27 | -factorial. This is the extra factor available in Gevrey order two. -/ | |
| 28 | -theorem partition_factorial_le {n : ℕ} (c : OrderedFinpartition n) : | |
| 29 | - (c.length.factorial : ℝ) * factorialProduct c ≤ n.factorial := by | |
| 30 | - induction n with | |
| 31 | - | zero => | |
| 32 | - have hc : c = default := Subsingleton.elim _ _ | |
| 33 | - subst c | |
| 34 | - simp [OrderedFinpartition.default_eq, factorialProduct] | |
| 35 | - | succ n ih => | |
| 36 | - obtain ⟨⟨d,o⟩,rfl⟩ := (OrderedFinpartition.extendEquiv n).surjective c | |
| 37 | - cases o with | |
| 38 | - | none => | |
| 39 | - simp only [OrderedFinpartition.extendEquiv_apply, | |
| 40 | - OrderedFinpartition.extend_none, OrderedFinpartition.extendLeft_length, | |
| 41 | - factorialProduct_extendLeft] | |
| 42 | - have hl : (d.length : ℝ) + 1 ≤ (n : ℝ) + 1 := by | |
| 43 | - exact_mod_cast Nat.succ_le_succ d.length_le | |
| 44 | - calc | |
| 45 | - _ = ((d.length : ℝ)+1) * ((d.length.factorial : ℝ)*factorialProduct d) := by | |
| 46 | - simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] | |
| 47 | - ring | |
| 48 | - _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := | |
| 49 | - mul_le_mul hl (ih d) | |
| 50 | - (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) | |
| 51 | - _ = _ := by simp [Nat.factorial_succ] | |
| 52 | - | some i => | |
| 53 | - simp only [OrderedFinpartition.extendEquiv_apply, | |
| 54 | - OrderedFinpartition.extend_some, OrderedFinpartition.extendMiddle_length, | |
| 55 | - factorialProduct_extendMiddle] | |
| 56 | - have hl : (d.partSize i : ℝ)+1 ≤ (n : ℝ)+1 := by | |
| 57 | - exact_mod_cast Nat.succ_le_succ (d.partSize_le i) | |
| 58 | - calc | |
| 59 | - _ = ((d.partSize i : ℝ)+1) * | |
| 60 | - ((d.length.factorial : ℝ)*factorialProduct d) := by ring | |
| 61 | - _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := | |
| 62 | - mul_le_mul hl (ih d) | |
| 63 | - (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) | |
| 64 | - _ = _ := by simp [Nat.factorial_succ] | |
| 65 | - | |
| 66 | -theorem polynomial_iteratedDeriv (p : ℝ[X]) (n : ℕ) (x : ℝ) : | |
| 67 | - iteratedDeriv n (fun y => p.eval y) x = | |
| 68 | - (Polynomial.derivative^[n] p).eval x := by | |
| 69 | - induction n generalizing x with | |
| 70 | - | zero => simp | |
| 71 | - | succ n ih => | |
| 72 | - rw [iteratedDeriv_succ] | |
| 73 | - have he : iteratedDeriv n (fun y => p.eval y) = | |
| 74 | - fun y => (Polynomial.derivative^[n] p).eval y := funext ih | |
| 75 | - rw [he, Polynomial.deriv, Function.iterate_succ_apply'] | |
| 76 | - | |
| 77 | -theorem polynomial_iteratedDeriv_zero (p : ℝ[X]) (n : ℕ) : | |
| 78 | - iteratedDeriv n (fun y => p.eval y) 0 = (n.factorial : ℝ)*p.coeff n := by | |
| 79 | - rw [polynomial_iteratedDeriv, ← Polynomial.coeff_zero_eq_eval_zero, | |
| 80 | - Polynomial.coeff_iterate_derivative] | |
| 81 | - simp [Nat.descFactorial_self] | |
| 82 | - | |
| 83 | -theorem polynomial_contDiff (p : ℝ[X]) : | |
| 84 | - ContDiff ℝ ∞ (fun y : ℝ => p.eval y) := by | |
| 85 | - induction p using Polynomial.induction_on' with | |
| 86 | - | add p q hp hq => simpa only [Polynomial.eval_add] using hp.add hq | |
| 87 | - | monomial n a => | |
| 88 | - simpa only [Polynomial.eval_monomial] using | |
| 89 | - (contDiff_const.mul (contDiff_id.pow n) : ContDiff ℝ ∞ (fun y : ℝ => a*y^n)) | |
| 90 | - | |
| 91 | -/-- Exact coefficient version of scalar Faà di Bruno at zero. -/ | |
| 92 | -theorem comp_coefficient (p q : ℝ[X]) (hp : p.coeff 0 = 0) (n : ℕ) : | |
| 93 | - (n.factorial : ℝ)*(q.comp p).coeff n = | |
| 94 | - ∑ c : OrderedFinpartition n, | |
| 95 | - ((c.length.factorial : ℝ)*q.coeff c.length) * | |
| 96 | - ∏ i, ((c.partSize i).factorial : ℝ)*p.coeff (c.partSize i) := by | |
| 97 | - have hp0 : p.eval 0 = 0 := by rw [← Polynomial.coeff_zero_eq_eval_zero, hp] | |
| 98 | - have hc := iteratedDeriv_comp_eq_sum_orderedFinpartition | |
| 99 | - ((polynomial_contDiff q).contDiffAt (x := p.eval 0)) | |
| 100 | - ((polynomial_contDiff p).contDiffAt (x := 0)) (i := n) (by simp) | |
| 101 | - have he : (fun y => (q.comp p).eval y) = | |
| 102 | - (fun y => q.eval y) ∘ (fun y => p.eval y) := by | |
| 103 | - funext y | |
| 104 | - simp | |
| 105 | - rw [← he, hp0] at hc | |
| 106 | - simpa only [polynomial_iteratedDeriv_zero] using hc | |
| 107 | - | |
| 108 | -/-- A finite scalar polynomial whose constant coefficient is zero. -/ | |
| 109 | -def jetPolynomial (N : ℕ) (a : ℕ → ℝ) : ℝ[X] := | |
| 110 | - ∑ j ∈ Finset.Icc 1 N, Polynomial.monomial j (a j) | |
| 111 | - | |
| 112 | -theorem jetPolynomial_coeff (N : ℕ) (a : ℕ → ℝ) (j : ℕ) : | |
| 113 | - (jetPolynomial N a).coeff j = if j ∈ Finset.Icc 1 N then a j else 0 := by | |
| 114 | - simp [jetPolynomial, Polynomial.coeff_monomial] | |
| 115 | - | |
| 116 | -@[simp] theorem jetPolynomial_zero (N : ℕ) (a : ℕ → ℝ) : | |
| 117 | - (jetPolynomial N a).coeff 0 = 0 := by | |
| 118 | - simp [jetPolynomial_coeff] | |
| 119 | - | |
| 120 | -theorem jetPolynomial_coeff_of_mem (N : ℕ) (a : ℕ → ℝ) (j : ℕ) | |
| 121 | - (hj : j ∈ Finset.Icc 1 N) : (jetPolynomial N a).coeff j = a j := by | |
| 122 | - simp [jetPolynomial_coeff, hj] | |
| 123 | - | |
| 124 | -theorem jetPolynomial_eval (N : ℕ) (a : ℕ → ℝ) (x : ℝ) : | |
| 125 | - (jetPolynomial N a).eval x = ∑ j ∈ Finset.Icc 1 N, a j*x^j := by | |
| 126 | - simp only [jetPolynomial, Polynomial.eval_finsetSum, Polynomial.eval_monomial] | |
| 127 | - | |
| 128 | -def NonnegativeCoefficients (p : ℝ[X]) : Prop := ∀ n, 0 ≤ p.coeff n | |
| 129 | - | |
| 130 | -theorem jetPolynomial_nonnegative (N : ℕ) (a : ℕ → ℝ) | |
| 131 | - (ha : ∀ j ∈ Finset.Icc 1 N, 0 ≤ a j) : | |
| 132 | - NonnegativeCoefficients (jetPolynomial N a) := by | |
| 133 | - intro j | |
| 134 | - rw [jetPolynomial_coeff] | |
| 135 | - split_ifs with hj | |
| 136 | - · exact ha j hj | |
| 137 | - · exact le_rfl | |
| 138 | - | |
| 139 | -theorem nonnegative_mul {p q : ℝ[X]} (hp : NonnegativeCoefficients p) | |
| 140 | - (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (p*q) := by | |
| 141 | - intro n | |
| 142 | - rw [Polynomial.coeff_mul] | |
| 143 | - exact Finset.sum_nonneg fun j _ => mul_nonneg (hp _) (hq _) | |
| 144 | - | |
| 145 | -theorem nonnegative_pow {p : ℝ[X]} (hp : NonnegativeCoefficients p) (n : ℕ) : | |
| 146 | - NonnegativeCoefficients (p^n) := by | |
| 147 | - induction n with | |
| 148 | - | zero => intro j; simp only [pow_zero, Polynomial.coeff_one]; split_ifs <;> norm_num | |
| 149 | - | succ n ih => simpa only [pow_succ] using nonnegative_mul ih hp | |
| 150 | - | |
| 151 | -theorem nonnegative_comp {p q : ℝ[X]} (hp : NonnegativeCoefficients p) | |
| 152 | - (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (q.comp p) := by | |
| 153 | - intro n | |
| 154 | - rw [Polynomial.comp_eq_sum_left, Polynomial.sum_def, Polynomial.finsetSum_coeff] | |
| 155 | - exact Finset.sum_nonneg fun j _ => by | |
| 156 | - rw [Polynomial.coeff_C_mul] | |
| 157 | - exact mul_nonneg (hq _) (nonnegative_pow hp j n) | |
| 158 | - | |
| 159 | -/-- A partial sum of a nonnegative polynomial is bounded by its actual | |
| 160 | -evaluation. No bound on the degree of the composed polynomial is needed. -/ | |
| 161 | -theorem coefficient_sum_le_eval (p : ℝ[X]) (hp : NonnegativeCoefficients p) | |
| 162 | - (s : Finset ℕ) (x : ℝ) (hx : 0 ≤ x) : | |
| 163 | - ∑ j ∈ s, p.coeff j*x^j ≤ p.eval x := by | |
| 164 | - rw [Polynomial.eval_eq_sum, Polynomial.sum_def] | |
| 165 | - calc | |
| 166 | - _ ≤ ∑ j ∈ s ∪ p.support, p.coeff j*x^j := | |
| 167 | - Finset.sum_le_sum_of_subset_of_nonneg Finset.subset_union_left | |
| 168 | - (fun j _ _ => mul_nonneg (hp j) (pow_nonneg hx j)) | |
| 169 | - _ = _ := by | |
| 170 | - symm | |
| 171 | - apply Finset.sum_subset Finset.subset_union_right | |
| 172 | - intro j _ hj | |
| 173 | - have hz : p.coeff j = 0 := by | |
| 174 | - simpa only [Polynomial.mem_support_iff, not_not] using hj | |
| 175 | - rw [hz, zero_mul] | |
| 176 | - | |
| 177 | -end EulerGevreyGeneratingAlgebra | |
+305 −2 Euler/GevreyGeneratingComposition.lean View file
| @@ -1,10 +1,313 @@ | ||
| 1 | -import Euler.GevreyGeneratingAlgebra | |
| 2 | -import Euler.GevreyFlowBootstrap | |
| 1 | +import Euler.GevreyCompositionPartitions | |
| 2 | +import Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno | |
| 3 | +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas | |
| 4 | +import Mathlib.Analysis.Calculus.Deriv.Polynomial | |
| 5 | +import Mathlib.Analysis.Calculus.ContDiff.Polynomial | |
| 6 | +import Mathlib.Algebra.Polynomial.Eval.Degree | |
| 7 | +import Mathlib.Algebra.Order.Field.GeomSum | |
| 8 | +import Mathlib.Topology.Order.IntermediateValue | |
| 9 | +import Mathlib.Topology.Order.Compact | |
| 10 | +import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic | |
| 11 | +import Mathlib.Tactic | |
| 3 | 12 | |
| 4 | 13 | /-! The finite Gevrey-two generating sum obeys an actual composition |
| 5 | 14 | estimate. In contrast to replacing all jets by one order-dependent bound, |
| 6 | 15 | this estimate retains the finite sum of the inner derivatives. -/ |
| 7 | 16 | |
| 17 | +/-! ## From `Euler/GevreyGeneratingAlgebra.lean` | |
| 18 | + | |
| 19 | +The text of `Euler/GevreyGeneratingAlgebra.lean`, folded into this file, which was its only importer. -/ | |
| 20 | + | |
| 21 | +section | |
| 22 | + | |
| 23 | +/-! Finite polynomial majorants for factorial-square Taylor coefficients. | |
| 24 | +The polynomials below are auxiliary nonnegative scalar polynomials. Their | |
| 25 | +composition is the exact scalar Faà di Bruno sum, not an assumed majorant | |
| 26 | +for a flow or for a solution of a differential equation. -/ | |
| 27 | + | |
| 28 | +noncomputable section | |
| 29 | + | |
| 30 | +open scoped BigOperators ContDiff Polynomial | |
| 31 | + | |
| 32 | +namespace EulerGevreyGeneratingAlgebra | |
| 33 | + | |
| 34 | +open EulerGevreyComposition | |
| 35 | + | |
| 36 | +lemma factorialProduct_nonneg {n : ℕ} (c : OrderedFinpartition n) : | |
| 37 | + 0 ≤ factorialProduct c := | |
| 38 | + Finset.prod_nonneg fun _ _ => Nat.cast_nonneg _ | |
| 39 | + | |
| 40 | +/-- The factorial used by an ordered partition never exceeds the total | |
| 41 | +factorial. This is the extra factor available in Gevrey order two. -/ | |
| 42 | +theorem partition_factorial_le {n : ℕ} (c : OrderedFinpartition n) : | |
| 43 | + (c.length.factorial : ℝ) * factorialProduct c ≤ n.factorial := by | |
| 44 | + induction n with | |
| 45 | + | zero => | |
| 46 | + have hc : c = default := Subsingleton.elim _ _ | |
| 47 | + subst c | |
| 48 | + simp [OrderedFinpartition.default_eq, factorialProduct] | |
| 49 | + | succ n ih => | |
| 50 | + obtain ⟨⟨d,o⟩,rfl⟩ := (OrderedFinpartition.extendEquiv n).surjective c | |
| 51 | + cases o with | |
| 52 | + | none => | |
| 53 | + simp only [OrderedFinpartition.extendEquiv_apply, | |
| 54 | + OrderedFinpartition.extend_none, OrderedFinpartition.extendLeft_length, | |
| 55 | + factorialProduct_extendLeft] | |
| 56 | + have hl : (d.length : ℝ) + 1 ≤ (n : ℝ) + 1 := by | |
| 57 | + exact_mod_cast Nat.succ_le_succ d.length_le | |
| 58 | + calc | |
| 59 | + _ = ((d.length : ℝ)+1) * ((d.length.factorial : ℝ)*factorialProduct d) := by | |
| 60 | + simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] | |
| 61 | + ring | |
| 62 | + _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := | |
| 63 | + mul_le_mul hl (ih d) | |
| 64 | + (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) | |
| 65 | + _ = _ := by simp [Nat.factorial_succ] | |
| 66 | + | some i => | |
| 67 | + simp only [OrderedFinpartition.extendEquiv_apply, | |
| 68 | + OrderedFinpartition.extend_some, OrderedFinpartition.extendMiddle_length, | |
| 69 | + factorialProduct_extendMiddle] | |
| 70 | + have hl : (d.partSize i : ℝ)+1 ≤ (n : ℝ)+1 := by | |
| 71 | + exact_mod_cast Nat.succ_le_succ (d.partSize_le i) | |
| 72 | + calc | |
| 73 | + _ = ((d.partSize i : ℝ)+1) * | |
| 74 | + ((d.length.factorial : ℝ)*factorialProduct d) := by ring | |
| 75 | + _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := | |
| 76 | + mul_le_mul hl (ih d) | |
| 77 | + (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) | |
| 78 | + _ = _ := by simp [Nat.factorial_succ] | |
| 79 | + | |
| 80 | +theorem polynomial_iteratedDeriv (p : ℝ[X]) (n : ℕ) (x : ℝ) : | |
| 81 | + iteratedDeriv n (fun y => p.eval y) x = | |
| 82 | + (Polynomial.derivative^[n] p).eval x := by | |
| 83 | + induction n generalizing x with | |
| 84 | + | zero => simp | |
| 85 | + | succ n ih => | |
| 86 | + rw [iteratedDeriv_succ] | |
| 87 | + have he : iteratedDeriv n (fun y => p.eval y) = | |
| 88 | + fun y => (Polynomial.derivative^[n] p).eval y := funext ih | |
| 89 | + rw [he, Polynomial.deriv, Function.iterate_succ_apply'] | |
| 90 | + | |
| 91 | +theorem polynomial_iteratedDeriv_zero (p : ℝ[X]) (n : ℕ) : | |
| 92 | + iteratedDeriv n (fun y => p.eval y) 0 = (n.factorial : ℝ)*p.coeff n := by | |
| 93 | + rw [polynomial_iteratedDeriv, ← Polynomial.coeff_zero_eq_eval_zero, | |
| 94 | + Polynomial.coeff_iterate_derivative] | |
| 95 | + simp [Nat.descFactorial_self] | |
| 96 | + | |
| 97 | +theorem polynomial_contDiff (p : ℝ[X]) : | |
| 98 | + ContDiff ℝ ∞ (fun y : ℝ => p.eval y) := by | |
| 99 | + induction p using Polynomial.induction_on' with | |
| 100 | + | add p q hp hq => simpa only [Polynomial.eval_add] using hp.add hq | |
| 101 | + | monomial n a => | |
| 102 | + simpa only [Polynomial.eval_monomial] using | |
| 103 | + (contDiff_const.mul (contDiff_id.pow n) : ContDiff ℝ ∞ (fun y : ℝ => a*y^n)) | |
| 104 | + | |
| 105 | +/-- Exact coefficient version of scalar Faà di Bruno at zero. -/ | |
| 106 | +theorem comp_coefficient (p q : ℝ[X]) (hp : p.coeff 0 = 0) (n : ℕ) : | |
| 107 | + (n.factorial : ℝ)*(q.comp p).coeff n = | |
| 108 | + ∑ c : OrderedFinpartition n, | |
| 109 | + ((c.length.factorial : ℝ)*q.coeff c.length) * | |
| 110 | + ∏ i, ((c.partSize i).factorial : ℝ)*p.coeff (c.partSize i) := by | |
| 111 | + have hp0 : p.eval 0 = 0 := by rw [← Polynomial.coeff_zero_eq_eval_zero, hp] | |
| 112 | + have hc := iteratedDeriv_comp_eq_sum_orderedFinpartition | |
| 113 | + ((polynomial_contDiff q).contDiffAt (x := p.eval 0)) | |
| 114 | + ((polynomial_contDiff p).contDiffAt (x := 0)) (i := n) (by simp) | |
| 115 | + have he : (fun y => (q.comp p).eval y) = | |
| 116 | + (fun y => q.eval y) ∘ (fun y => p.eval y) := by | |
| 117 | + funext y | |
| 118 | + simp | |
| 119 | + rw [← he, hp0] at hc | |
| 120 | + simpa only [polynomial_iteratedDeriv_zero] using hc | |
| 121 | + | |
| 122 | +/-- A finite scalar polynomial whose constant coefficient is zero. -/ | |
| 123 | +def jetPolynomial (N : ℕ) (a : ℕ → ℝ) : ℝ[X] := | |
| 124 | + ∑ j ∈ Finset.Icc 1 N, Polynomial.monomial j (a j) | |
| 125 | + | |
| 126 | +theorem jetPolynomial_coeff (N : ℕ) (a : ℕ → ℝ) (j : ℕ) : | |
| 127 | + (jetPolynomial N a).coeff j = if j ∈ Finset.Icc 1 N then a j else 0 := by | |
| 128 | + simp [jetPolynomial, Polynomial.coeff_monomial] | |
| 129 | + | |
| 130 | +@[simp] theorem jetPolynomial_zero (N : ℕ) (a : ℕ → ℝ) : | |
| 131 | + (jetPolynomial N a).coeff 0 = 0 := by | |
| 132 | + simp [jetPolynomial_coeff] | |
| 133 | + | |
| 134 | +theorem jetPolynomial_coeff_of_mem (N : ℕ) (a : ℕ → ℝ) (j : ℕ) | |
| 135 | + (hj : j ∈ Finset.Icc 1 N) : (jetPolynomial N a).coeff j = a j := by | |
| 136 | + simp [jetPolynomial_coeff, hj] | |
| 137 | + | |
| 138 | +theorem jetPolynomial_eval (N : ℕ) (a : ℕ → ℝ) (x : ℝ) : | |
| 139 | + (jetPolynomial N a).eval x = ∑ j ∈ Finset.Icc 1 N, a j*x^j := by | |
| 140 | + simp only [jetPolynomial, Polynomial.eval_finsetSum, Polynomial.eval_monomial] | |
| 141 | + | |
| 142 | +def NonnegativeCoefficients (p : ℝ[X]) : Prop := ∀ n, 0 ≤ p.coeff n | |
| 143 | + | |
| 144 | +theorem jetPolynomial_nonnegative (N : ℕ) (a : ℕ → ℝ) | |
| 145 | + (ha : ∀ j ∈ Finset.Icc 1 N, 0 ≤ a j) : | |
| 146 | + NonnegativeCoefficients (jetPolynomial N a) := by | |
| 147 | + intro j | |
| 148 | + rw [jetPolynomial_coeff] | |
| 149 | + split_ifs with hj | |
| 150 | + · exact ha j hj | |
| 151 | + · exact le_rfl | |
| 152 | + | |
| 153 | +theorem nonnegative_mul {p q : ℝ[X]} (hp : NonnegativeCoefficients p) | |
| 154 | + (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (p*q) := by | |
| 155 | + intro n | |
| 156 | + rw [Polynomial.coeff_mul] | |
| 157 | + exact Finset.sum_nonneg fun j _ => mul_nonneg (hp _) (hq _) | |
| 158 | + | |
| 159 | +theorem nonnegative_pow {p : ℝ[X]} (hp : NonnegativeCoefficients p) (n : ℕ) : | |
| 160 | + NonnegativeCoefficients (p^n) := by | |
| 161 | + induction n with | |
| 162 | + | zero => intro j; simp only [pow_zero, Polynomial.coeff_one]; split_ifs <;> norm_num | |
| 163 | + | succ n ih => simpa only [pow_succ] using nonnegative_mul ih hp | |
| 164 | + | |
| 165 | +theorem nonnegative_comp {p q : ℝ[X]} (hp : NonnegativeCoefficients p) | |
| 166 | + (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (q.comp p) := by | |
| 167 | + intro n | |
| 168 | + rw [Polynomial.comp_eq_sum_left, Polynomial.sum_def, Polynomial.finsetSum_coeff] | |
| 169 | + exact Finset.sum_nonneg fun j _ => by | |
| 170 | + rw [Polynomial.coeff_C_mul] | |
| 171 | + exact mul_nonneg (hq _) (nonnegative_pow hp j n) | |
| 172 | + | |
| 173 | +/-- A partial sum of a nonnegative polynomial is bounded by its actual | |
| 174 | +evaluation. No bound on the degree of the composed polynomial is needed. -/ | |
| 175 | +theorem coefficient_sum_le_eval (p : ℝ[X]) (hp : NonnegativeCoefficients p) | |
| 176 | + (s : Finset ℕ) (x : ℝ) (hx : 0 ≤ x) : | |
| 177 | + ∑ j ∈ s, p.coeff j*x^j ≤ p.eval x := by | |
| 178 | + rw [Polynomial.eval_eq_sum, Polynomial.sum_def] | |
| 179 | + calc | |
| 180 | + _ ≤ ∑ j ∈ s ∪ p.support, p.coeff j*x^j := | |
| 181 | + Finset.sum_le_sum_of_subset_of_nonneg Finset.subset_union_left | |
| 182 | + (fun j _ _ => mul_nonneg (hp j) (pow_nonneg hx j)) | |
| 183 | + _ = _ := by | |
| 184 | + symm | |
| 185 | + apply Finset.sum_subset Finset.subset_union_right | |
| 186 | + intro j _ hj | |
| 187 | + have hz : p.coeff j = 0 := by | |
| 188 | + simpa only [Polynomial.mem_support_iff, not_not] using hj | |
| 189 | + rw [hz, zero_mul] | |
| 190 | + | |
| 191 | +end EulerGevreyGeneratingAlgebra | |
| 192 | +end | |
| 193 | + | |
| 194 | +end | |
| 195 | + | |
| 196 | +/-! ## From `Euler/GevreyFlowBootstrap.lean` | |
| 197 | + | |
| 198 | +The text of `Euler/GevreyFlowBootstrap.lean`, folded into this file, which was its only importer. -/ | |
| 199 | + | |
| 200 | +section | |
| 201 | + | |
| 202 | +/-! The finite generating-sum bootstrap used for the small lifted flow in | |
| 203 | +source (21). A first-hitting argument proves the bound from an integral | |
| 204 | +inequality valid only inside its radius of convergence. No global | |
| 205 | +smallness of the unknown path or exponential flow bound is assumed. -/ | |
| 206 | + | |
| 207 | +noncomputable section | |
| 208 | + | |
| 209 | +namespace EulerGevreyFlowBootstrap | |
| 210 | + | |
| 211 | +open Set MeasureTheory | |
| 212 | +open scoped Interval | |
| 213 | + | |
| 214 | +/-- A continuous path cannot first hit a barrier if its bound up to that | |
| 215 | +first hit lies strictly below the barrier. -/ | |
| 216 | +theorem continuous_barrier (f : ℝ → ℝ) (T B a : ℝ) | |
| 217 | + (_hT : 0 ≤ T) (hB : 0 ≤ B) (ha : 0 < a) (hBa : B*T < a) | |
| 218 | + (hf : ContinuousOn f (Icc 0 T)) (hf0 : f 0 = 0) | |
| 219 | + (hstep : ∀ t ∈ Icc 0 T, (∀ s ∈ Icc 0 t, f s ≤ a) → f t ≤ B*t) : | |
| 220 | + ∀ t ∈ Icc 0 T, f t ≤ B*t := by | |
| 221 | + have hstrict : ∀ t ∈ Icc 0 T, f t < a := by | |
| 222 | + intro t ht | |
| 223 | + by_contra hfail | |
| 224 | + let S := Icc (0 : ℝ) T ∩ f ⁻¹' Ici a | |
| 225 | + have hSc : IsCompact S := isCompact_Icc.of_isClosed_subset | |
| 226 | + (hf.preimage_isClosed_of_isClosed isClosed_Icc isClosed_Ici) inter_subset_left | |
| 227 | + have hSn : S.Nonempty := ⟨t,ht,le_of_not_gt hfail⟩ | |
| 228 | + obtain ⟨m,hm⟩ := hSc.exists_isLeast hSn | |
| 229 | + have hmI : m ∈ Icc (0 : ℝ) T := hm.1.1 | |
| 230 | + have hmhigh : a ≤ f m := hm.1.2 | |
| 231 | + have hfm : f m = a := by | |
| 232 | + have hc : ContinuousOn f (Icc 0 m) := hf.mono (Icc_subset_Icc_right hmI.2) | |
| 233 | + obtain ⟨r,hr,her⟩ := intermediate_value_Icc hmI.1 hc | |
| 234 | + (show a ∈ Icc (f 0) (f m) from ⟨by rw [hf0]; exact ha.le,hmhigh⟩) | |
| 235 | + have hmr : m ≤ r := hm.2 ⟨⟨hr.1,hr.2.trans hmI.2⟩,her.ge⟩ | |
| 236 | + have hrm : r = m := le_antisymm hr.2 hmr | |
| 237 | + simpa only [hrm] using her | |
| 238 | + have hbefore : ∀ s ∈ Icc 0 m, f s ≤ a := by | |
| 239 | + intro s hs | |
| 240 | + by_cases hsm : s = m | |
| 241 | + · simp only [hsm,hfm,le_refl] | |
| 242 | + · have hlt : s < m := lt_of_le_of_ne hs.2 hsm | |
| 243 | + by_contra hhigh | |
| 244 | + have hms : m ≤ s := hm.2 ⟨⟨hs.1,hs.2.trans hmI.2⟩,(lt_of_not_ge hhigh).le⟩ | |
| 245 | + exact (not_le_of_gt hlt) hms | |
| 246 | + have hh := hstep m hmI hbefore | |
| 247 | + have hmB : B*m ≤ B*T := mul_le_mul_of_nonneg_left hmI.2 hB | |
| 248 | + rw [hfm] at hh | |
| 249 | + linarith | |
| 250 | + intro t ht | |
| 251 | + exact hstep t ht (fun s hs => (hstrict s ⟨hs.1,hs.2.trans ht.2⟩).le) | |
| 252 | + | |
| 253 | +def rationalRate (B R a u : ℝ) : ℝ := B*(R*(a+u))/(1-R*(a+u)) | |
| 254 | + | |
| 255 | +theorem rationalRate_le (B R a u : ℝ) (hB : 0 ≤ B) | |
| 256 | + (hu : R*(a+u) ≤ 1/2) : rationalRate B R a u ≤ B := by | |
| 257 | + have hd : 0 < 1-R*(a+u) := by linarith | |
| 258 | + unfold rationalRate | |
| 259 | + apply (div_le_iff₀ hd).2 | |
| 260 | + linarith [mul_le_mul_of_nonneg_left hu hB] | |
| 261 | + | |
| 262 | +/-- The nonlinear generating-sum inequality closes at BRT≤1/8. The bound | |
| 263 | +is linear in the velocity size B and time, with no exponential factor. -/ | |
| 264 | +theorem rational_integral_bootstrap (f : ℝ → ℝ) (T B R : ℝ) | |
| 265 | + (hT : 0 ≤ T) (hB : 0 ≤ B) (hR : 0 < R) (hsmall : B*R*T ≤ 1/8) | |
| 266 | + (hf : ContinuousOn f (Icc 0 T)) (hf0 : f 0 = 0) | |
| 267 | + (hineq : ∀ t ∈ Icc 0 T, | |
| 268 | + (∀ s ∈ Icc 0 t, R*((4*R)⁻¹+f s) ≤ 1/2) → | |
| 269 | + f t ≤ ∫ s in 0..t, rationalRate B R ((4*R)⁻¹) (f s)) : | |
| 270 | + ∀ t ∈ Icc 0 T, f t ≤ B*t ∧ R*((4*R)⁻¹+f t) ≤ 3/8 := by | |
| 271 | + have ha : 0 < (4*R)⁻¹ := inv_pos.mpr (by positivity) | |
| 272 | + have hRa : R*(4*R)⁻¹ = 1/4 := by field_simp | |
| 273 | + have hBT : B*T < (4*R)⁻¹ := by | |
| 274 | + by_contra h | |
| 275 | + have hm := mul_le_mul_of_nonneg_left (le_of_not_gt h) hR.le | |
| 276 | + rw [hRa] at hm | |
| 277 | + linarith | |
| 278 | + have hb : ∀ t ∈ Icc 0 T, f t ≤ B*t := by | |
| 279 | + apply continuous_barrier f T B ((4*R)⁻¹) hT hB ha hBT hf hf0 | |
| 280 | + intro t ht hbefore | |
| 281 | + have hhalf : ∀ s ∈ Icc 0 t, R*((4*R)⁻¹+f s) ≤ 1/2 := by | |
| 282 | + intro s hs | |
| 283 | + have hm := mul_le_mul_of_nonneg_left (hbefore s hs) hR.le | |
| 284 | + linarith | |
| 285 | + have hden : ∀ s ∈ Icc 0 t, 1-R*((4*R)⁻¹+f s) ≠ 0 := by | |
| 286 | + intro s hs | |
| 287 | + have hh := hhalf s hs | |
| 288 | + linarith | |
| 289 | + have hrate : ContinuousOn (fun s => rationalRate B R ((4*R)⁻¹) (f s)) (Icc 0 t) := by | |
| 290 | + have hf' := hf.mono (Icc_subset_Icc_right ht.2) | |
| 291 | + unfold rationalRate | |
| 292 | + exact (continuousOn_const.mul (continuousOn_const.mul (continuousOn_const.add hf'))).div | |
| 293 | + (continuousOn_const.sub (continuousOn_const.mul (continuousOn_const.add hf'))) hden | |
| 294 | + have hi : IntervalIntegrable (fun s => rationalRate B R ((4*R)⁻¹) (f s)) volume 0 t := | |
| 295 | + hrate.intervalIntegrable_of_Icc ht.1 | |
| 296 | + have hm := intervalIntegral.integral_mono_on ht.1 hi intervalIntegrable_const | |
| 297 | + (fun s hs => rationalRate_le B R ((4*R)⁻¹) (f s) hB (hhalf s hs)) | |
| 298 | + have hc : (∫ s in (0 : ℝ)..t, B) = B*t := by simp [mul_comm] | |
| 299 | + exact (hineq t ht hhalf).trans (hm.trans_eq hc) | |
| 300 | + intro t ht | |
| 301 | + refine ⟨hb t ht,?_⟩ | |
| 302 | + have hm := mul_le_mul_of_nonneg_left (hb t ht) hR.le | |
| 303 | + have htB := mul_le_mul_of_nonneg_left ht.2 (mul_nonneg hB hR.le) | |
| 304 | + linarith | |
| 305 | + | |
| 306 | +end EulerGevreyFlowBootstrap | |
| 307 | +end | |
| 308 | + | |
| 309 | +end | |
| 310 | + | |
| 8 | 311 | noncomputable section |
| 9 | 312 | |
| 10 | 313 | open scoped BigOperators ContDiff Polynomial |
+167 −1 Euler/GevreyInverseMap.lean View file
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import Euler.GevreyComposition |
| 2 | -import Euler.GevreyInversePartitions | |
| 2 | +import Euler.GevreyCompositionPartitions | |
| 3 | 3 | |
| 4 | 4 | /-! |
| 5 | 5 | # Gevrey bounds from the actual inverse-map differential identity |
| @@ -10,6 +10,172 @@ of `Y` have the stronger bound `C * L^n * n!²` at order `n+1`, where | ||
| 10 | 10 | strong induction, rather than iterating the general composition radius. |
| 11 | 11 | -/ |
| 12 | 12 | |
| 13 | +/-! ## From `Euler/GevreyInversePartitions.lean` | |
| 14 | + | |
| 15 | +The text of `Euler/GevreyInversePartitions.lean`, folded into this file, which was its only importer. -/ | |
| 16 | + | |
| 17 | +section | |
| 18 | + | |
| 19 | +/-! | |
| 20 | +# A shifted partition estimate for a differential equation | |
| 21 | + | |
| 22 | +For the relation `DY = A ∘ Y`, the useful induction controls the order-`j` | |
| 23 | +derivative of `Y` by `(j-1)!²`. With those inner weights the normalized | |
| 24 | +Faà di Bruno partition sum stays bounded at every positive order, provided | |
| 25 | +its scalar argument is at most one half. | |
| 26 | +-/ | |
| 27 | + | |
| 28 | +noncomputable section | |
| 29 | + | |
| 30 | +open scoped BigOperators | |
| 31 | + | |
| 32 | +namespace EulerGevreyComposition | |
| 33 | + | |
| 34 | +variable {n : ℕ} | |
| 35 | + | |
| 36 | +lemma partSize_add_length_le (c : OrderedFinpartition n) (i : Fin c.length) : | |
| 37 | + c.partSize i + c.length ≤ n + 1 := by | |
| 38 | + have hs : (∑ j : Fin c.length, (c.partSize j - 1)) + c.length = n := by | |
| 39 | + have h : ∑ j : Fin c.length, (c.partSize j - 1 + 1) = n := by | |
| 40 | + simpa only [Nat.sub_add_cancel (c.partSize_pos _)] using sum_partSize c | |
| 41 | + simpa only [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, | |
| 42 | + Fintype.card_fin, smul_eq_mul, mul_one] using h | |
| 43 | + have hi : c.partSize i - 1 ≤ ∑ j : Fin c.length, (c.partSize j - 1) := | |
| 44 | + Finset.single_le_sum (fun j _ => Nat.zero_le (c.partSize j - 1)) (Finset.mem_univ i) | |
| 45 | + have hp := c.partSize_pos i | |
| 46 | + omega | |
| 47 | + | |
| 48 | +lemma sum_partSize_sq_le (c : OrderedFinpartition n) : | |
| 49 | + ∑ i, (c.partSize i : ℝ)^2 ≤ ((n : ℝ) - c.length + 1) * n := by | |
| 50 | + calc | |
| 51 | + _ ≤ ∑ i, ((n : ℝ) - c.length + 1) * (c.partSize i : ℝ) := by | |
| 52 | + apply Finset.sum_le_sum | |
| 53 | + intro i _ | |
| 54 | + have h : (c.partSize i : ℝ) + c.length ≤ (n : ℝ) + 1 := by | |
| 55 | + exact_mod_cast partSize_add_length_le c i | |
| 56 | + have hmul := mul_le_mul_of_nonneg_right | |
| 57 | + (show (c.partSize i : ℝ) ≤ (n : ℝ) - c.length + 1 by linarith) | |
| 58 | + (show 0 ≤ (c.partSize i : ℝ) by positivity) | |
| 59 | + linarith | |
| 60 | + _ = _ := by rw [← Finset.mul_sum, sum_partSize_real] | |
| 61 | + | |
| 62 | +def predecessorFactorialProduct (c : OrderedFinpartition n) : ℝ := | |
| 63 | + ∏ i, ((c.partSize i - 1).factorial : ℝ) | |
| 64 | + | |
| 65 | +def predecessorPartitionWeight (x : ℝ) (c : OrderedFinpartition n) : ℝ := | |
| 66 | + x^c.length * ((c.length.factorial : ℝ) * predecessorFactorialProduct c)^2 | |
| 67 | + | |
| 68 | +def predecessorPartitionSum (n : ℕ) (x : ℝ) : ℝ := | |
| 69 | + ∑ c : OrderedFinpartition n, predecessorPartitionWeight x c | |
| 70 | + | |
| 71 | +lemma predecessorPartitionWeight_nonneg (x : ℝ) (hx : 0 ≤ x) | |
| 72 | + (c : OrderedFinpartition n) : 0 ≤ predecessorPartitionWeight x c := by | |
| 73 | + unfold predecessorPartitionWeight | |
| 74 | + positivity | |
| 75 | + | |
| 76 | +lemma predecessorFactorialProduct_extendLeft (c : OrderedFinpartition n) : | |
| 77 | + predecessorFactorialProduct c.extendLeft = predecessorFactorialProduct c := by | |
| 78 | + change (∏ i : Fin (c.length+1), | |
| 79 | + (Nat.factorial (Fin.cons (α := fun _ => ℕ) 1 c.partSize i - 1) : ℝ)) = | |
| 80 | + ∏ i : Fin c.length, ((c.partSize i - 1).factorial : ℝ) | |
| 81 | + rw [Fin.prod_univ_succ] | |
| 82 | + simp | |
| 83 | + | |
| 84 | +lemma predecessorFactorialProduct_extendMiddle (c : OrderedFinpartition n) | |
| 85 | + (i : Fin c.length) : | |
| 86 | + predecessorFactorialProduct (c.extendMiddle i) = | |
| 87 | + (c.partSize i : ℝ) * predecessorFactorialProduct c := by | |
| 88 | + change (∏ j : Fin c.length, | |
| 89 | + ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = | |
| 90 | + (c.partSize i : ℝ) * ∏ j : Fin c.length, ((c.partSize j - 1).factorial : ℝ) | |
| 91 | + have he : (fun j : Fin c.length => | |
| 92 | + ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = | |
| 93 | + fun j => (if j = i then (c.partSize i : ℝ) else 1) * | |
| 94 | + ((c.partSize j - 1).factorial : ℝ) := by | |
| 95 | + funext j | |
| 96 | + by_cases h : j = i | |
| 97 | + · subst j | |
| 98 | + simp only [Function.update_self, Nat.add_sub_cancel, ite_true] | |
| 99 | + exact_mod_cast (Nat.mul_factorial_pred (c.partSize_pos i).ne').symm | |
| 100 | + · simp [h] | |
| 101 | + rw [he, Finset.prod_mul_distrib] | |
| 102 | + simp | |
| 103 | + | |
| 104 | +lemma predecessorPartitionWeight_extendLeft (x : ℝ) (c : OrderedFinpartition n) : | |
| 105 | + predecessorPartitionWeight x c.extendLeft = | |
| 106 | + (x * ((c.length : ℝ) + 1)^2) * predecessorPartitionWeight x c := by | |
| 107 | + simp only [predecessorPartitionWeight, OrderedFinpartition.extendLeft_length, | |
| 108 | + predecessorFactorialProduct_extendLeft, Nat.factorial_succ, Nat.cast_mul, | |
| 109 | + Nat.cast_add, Nat.cast_one] | |
| 110 | + ring | |
| 111 | + | |
| 112 | +lemma predecessorPartitionWeight_extendMiddle (x : ℝ) (c : OrderedFinpartition n) | |
| 113 | + (i : Fin c.length) : | |
| 114 | + predecessorPartitionWeight x (c.extendMiddle i) = | |
| 115 | + (c.partSize i : ℝ)^2 * predecessorPartitionWeight x c := by | |
| 116 | + simp only [predecessorPartitionWeight, OrderedFinpartition.extendMiddle_length, | |
| 117 | + predecessorFactorialProduct_extendMiddle] | |
| 118 | + ring | |
| 119 | + | |
| 120 | +lemma predecessorPartitionSum_succ (n : ℕ) (x : ℝ) : | |
| 121 | + predecessorPartitionSum (n+1) x = | |
| 122 | + ∑ c : OrderedFinpartition n, | |
| 123 | + (x * ((c.length : ℝ) + 1)^2 + ∑ i, (c.partSize i : ℝ)^2) * | |
| 124 | + predecessorPartitionWeight x c := by | |
| 125 | + unfold predecessorPartitionSum | |
| 126 | + rw [← (OrderedFinpartition.extendEquiv n).sum_comp] | |
| 127 | + simp only [Fintype.sum_sigma, Fintype.sum_option, OrderedFinpartition.extendEquiv_apply, | |
| 128 | + OrderedFinpartition.extend_none, OrderedFinpartition.extend_some, | |
| 129 | + predecessorPartitionWeight_extendLeft, predecessorPartitionWeight_extendMiddle, | |
| 130 | + ← Finset.sum_mul] | |
| 131 | + apply Finset.sum_congr rfl | |
| 132 | + intro c _ | |
| 133 | + ring | |
| 134 | + | |
| 135 | +lemma predecessorPartitionSum_succ_le (n : ℕ) (hn : 0 < n) | |
| 136 | + (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : | |
| 137 | + predecessorPartitionSum (n+1) x ≤ | |
| 138 | + ((n : ℝ) + 1)^2 * predecessorPartitionSum n x := by | |
| 139 | + rw [predecessorPartitionSum_succ, predecessorPartitionSum, Finset.mul_sum] | |
| 140 | + apply Finset.sum_le_sum | |
| 141 | + intro c _ | |
| 142 | + apply mul_le_mul_of_nonneg_right _ (predecessorPartitionWeight_nonneg x hx c) | |
| 143 | + have hl : (c.length : ℝ) ≤ n := by exact_mod_cast c.length_le | |
| 144 | + have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn | |
| 145 | + have hprod := mul_le_mul_of_nonneg_right | |
| 146 | + (show (c.length : ℝ)+1 ≤ 2*n by linarith) | |
| 147 | + (show 0 ≤ (c.length : ℝ)+1 by positivity) | |
| 148 | + have hscalar := mul_le_mul_of_nonneg_right hxhalf (sq_nonneg ((c.length : ℝ)+1)) | |
| 149 | + have hs := sum_partSize_sq_le c | |
| 150 | + linarith | |
| 151 | + | |
| 152 | +/-- Unlike the unshifted weights, these weights have a uniformly bounded | |
| 153 | +normalized sum on the scalar interval `[0, 1/2]`. -/ | |
| 154 | +theorem predecessorPartitionSum_le (n : ℕ) (hn : 0 < n) | |
| 155 | + (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : | |
| 156 | + predecessorPartitionSum n x ≤ x * (n.factorial : ℝ)^2 := by | |
| 157 | + obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn.ne' | |
| 158 | + induction m with | |
| 159 | + | zero => | |
| 160 | + simp [predecessorPartitionSum, predecessorPartitionWeight, | |
| 161 | + predecessorFactorialProduct, OrderedFinpartition.default_eq] | |
| 162 | + | succ m ih => | |
| 163 | + calc | |
| 164 | + _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * predecessorPartitionSum (m+1) x := | |
| 165 | + predecessorPartitionSum_succ_le (m+1) (by omega) x hx hxhalf | |
| 166 | + _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) := mul_le_mul_of_nonneg_left (ih (by omega)) (sq_nonneg _) | |
| 167 | + _ = _ := by | |
| 168 | + change ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) = | |
| 169 | + x * (((m+1)+1).factorial : ℝ)^2 | |
| 170 | + rw [Nat.factorial_succ (m+1), Nat.cast_mul] | |
| 171 | + push_cast | |
| 172 | + ring | |
| 173 | + | |
| 174 | +end EulerGevreyComposition | |
| 175 | +end | |
| 176 | + | |
| 177 | +end | |
| 178 | + | |
| 13 | 179 | noncomputable section |
| 14 | 180 | |
| 15 | 181 | open scoped BigOperators ContDiff |
+0 −158 Euler/GevreyInversePartitions.lean deleted
| @@ -1,158 +0,0 @@ | ||
| 1 | -import Euler.GevreyCompositionPartitions | |
| 2 | - | |
| 3 | -/-! | |
| 4 | -# A shifted partition estimate for a differential equation | |
| 5 | - | |
| 6 | -For the relation `DY = A ∘ Y`, the useful induction controls the order-`j` | |
| 7 | -derivative of `Y` by `(j-1)!²`. With those inner weights the normalized | |
| 8 | -Faà di Bruno partition sum stays bounded at every positive order, provided | |
| 9 | -its scalar argument is at most one half. | |
| 10 | --/ | |
| 11 | - | |
| 12 | -noncomputable section | |
| 13 | - | |
| 14 | -open scoped BigOperators | |
| 15 | - | |
| 16 | -namespace EulerGevreyComposition | |
| 17 | - | |
| 18 | -variable {n : ℕ} | |
| 19 | - | |
| 20 | -lemma partSize_add_length_le (c : OrderedFinpartition n) (i : Fin c.length) : | |
| 21 | - c.partSize i + c.length ≤ n + 1 := by | |
| 22 | - have hs : (∑ j : Fin c.length, (c.partSize j - 1)) + c.length = n := by | |
| 23 | - have h : ∑ j : Fin c.length, (c.partSize j - 1 + 1) = n := by | |
| 24 | - simpa only [Nat.sub_add_cancel (c.partSize_pos _)] using sum_partSize c | |
| 25 | - simpa only [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, | |
| 26 | - Fintype.card_fin, smul_eq_mul, mul_one] using h | |
| 27 | - have hi : c.partSize i - 1 ≤ ∑ j : Fin c.length, (c.partSize j - 1) := | |
| 28 | - Finset.single_le_sum (fun j _ => Nat.zero_le (c.partSize j - 1)) (Finset.mem_univ i) | |
| 29 | - have hp := c.partSize_pos i | |
| 30 | - omega | |
| 31 | - | |
| 32 | -lemma sum_partSize_sq_le (c : OrderedFinpartition n) : | |
| 33 | - ∑ i, (c.partSize i : ℝ)^2 ≤ ((n : ℝ) - c.length + 1) * n := by | |
| 34 | - calc | |
| 35 | - _ ≤ ∑ i, ((n : ℝ) - c.length + 1) * (c.partSize i : ℝ) := by | |
| 36 | - apply Finset.sum_le_sum | |
| 37 | - intro i _ | |
| 38 | - have h : (c.partSize i : ℝ) + c.length ≤ (n : ℝ) + 1 := by | |
| 39 | - exact_mod_cast partSize_add_length_le c i | |
| 40 | - have hmul := mul_le_mul_of_nonneg_right | |
| 41 | - (show (c.partSize i : ℝ) ≤ (n : ℝ) - c.length + 1 by linarith) | |
| 42 | - (show 0 ≤ (c.partSize i : ℝ) by positivity) | |
| 43 | - linarith | |
| 44 | - _ = _ := by rw [← Finset.mul_sum, sum_partSize_real] | |
| 45 | - | |
| 46 | -def predecessorFactorialProduct (c : OrderedFinpartition n) : ℝ := | |
| 47 | - ∏ i, ((c.partSize i - 1).factorial : ℝ) | |
| 48 | - | |
| 49 | -def predecessorPartitionWeight (x : ℝ) (c : OrderedFinpartition n) : ℝ := | |
| 50 | - x^c.length * ((c.length.factorial : ℝ) * predecessorFactorialProduct c)^2 | |
| 51 | - | |
| 52 | -def predecessorPartitionSum (n : ℕ) (x : ℝ) : ℝ := | |
| 53 | - ∑ c : OrderedFinpartition n, predecessorPartitionWeight x c | |
| 54 | - | |
| 55 | -lemma predecessorPartitionWeight_nonneg (x : ℝ) (hx : 0 ≤ x) | |
| 56 | - (c : OrderedFinpartition n) : 0 ≤ predecessorPartitionWeight x c := by | |
| 57 | - unfold predecessorPartitionWeight | |
| 58 | - positivity | |
| 59 | - | |
| 60 | -lemma predecessorFactorialProduct_extendLeft (c : OrderedFinpartition n) : | |
| 61 | - predecessorFactorialProduct c.extendLeft = predecessorFactorialProduct c := by | |
| 62 | - change (∏ i : Fin (c.length+1), | |
| 63 | - (Nat.factorial (Fin.cons (α := fun _ => ℕ) 1 c.partSize i - 1) : ℝ)) = | |
| 64 | - ∏ i : Fin c.length, ((c.partSize i - 1).factorial : ℝ) | |
| 65 | - rw [Fin.prod_univ_succ] | |
| 66 | - simp | |
| 67 | - | |
| 68 | -lemma predecessorFactorialProduct_extendMiddle (c : OrderedFinpartition n) | |
| 69 | - (i : Fin c.length) : | |
| 70 | - predecessorFactorialProduct (c.extendMiddle i) = | |
| 71 | - (c.partSize i : ℝ) * predecessorFactorialProduct c := by | |
| 72 | - change (∏ j : Fin c.length, | |
| 73 | - ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = | |
| 74 | - (c.partSize i : ℝ) * ∏ j : Fin c.length, ((c.partSize j - 1).factorial : ℝ) | |
| 75 | - have he : (fun j : Fin c.length => | |
| 76 | - ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = | |
| 77 | - fun j => (if j = i then (c.partSize i : ℝ) else 1) * | |
| 78 | - ((c.partSize j - 1).factorial : ℝ) := by | |
| 79 | - funext j | |
| 80 | - by_cases h : j = i | |
| 81 | - · subst j | |
| 82 | - simp only [Function.update_self, Nat.add_sub_cancel, ite_true] | |
| 83 | - exact_mod_cast (Nat.mul_factorial_pred (c.partSize_pos i).ne').symm | |
| 84 | - · simp [h] | |
| 85 | - rw [he, Finset.prod_mul_distrib] | |
| 86 | - simp | |
| 87 | - | |
| 88 | -lemma predecessorPartitionWeight_extendLeft (x : ℝ) (c : OrderedFinpartition n) : | |
| 89 | - predecessorPartitionWeight x c.extendLeft = | |
| 90 | - (x * ((c.length : ℝ) + 1)^2) * predecessorPartitionWeight x c := by | |
| 91 | - simp only [predecessorPartitionWeight, OrderedFinpartition.extendLeft_length, | |
| 92 | - predecessorFactorialProduct_extendLeft, Nat.factorial_succ, Nat.cast_mul, | |
| 93 | - Nat.cast_add, Nat.cast_one] | |
| 94 | - ring | |
| 95 | - | |
| 96 | -lemma predecessorPartitionWeight_extendMiddle (x : ℝ) (c : OrderedFinpartition n) | |
| 97 | - (i : Fin c.length) : | |
| 98 | - predecessorPartitionWeight x (c.extendMiddle i) = | |
| 99 | - (c.partSize i : ℝ)^2 * predecessorPartitionWeight x c := by | |
| 100 | - simp only [predecessorPartitionWeight, OrderedFinpartition.extendMiddle_length, | |
| 101 | - predecessorFactorialProduct_extendMiddle] | |
| 102 | - ring | |
| 103 | - | |
| 104 | -lemma predecessorPartitionSum_succ (n : ℕ) (x : ℝ) : | |
| 105 | - predecessorPartitionSum (n+1) x = | |
| 106 | - ∑ c : OrderedFinpartition n, | |
| 107 | - (x * ((c.length : ℝ) + 1)^2 + ∑ i, (c.partSize i : ℝ)^2) * | |
| 108 | - predecessorPartitionWeight x c := by | |
| 109 | - unfold predecessorPartitionSum | |
| 110 | - rw [← (OrderedFinpartition.extendEquiv n).sum_comp] | |
| 111 | - simp only [Fintype.sum_sigma, Fintype.sum_option, OrderedFinpartition.extendEquiv_apply, | |
| 112 | - OrderedFinpartition.extend_none, OrderedFinpartition.extend_some, | |
| 113 | - predecessorPartitionWeight_extendLeft, predecessorPartitionWeight_extendMiddle, | |
| 114 | - ← Finset.sum_mul] | |
| 115 | - apply Finset.sum_congr rfl | |
| 116 | - intro c _ | |
| 117 | - ring | |
| 118 | - | |
| 119 | -lemma predecessorPartitionSum_succ_le (n : ℕ) (hn : 0 < n) | |
| 120 | - (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : | |
| 121 | - predecessorPartitionSum (n+1) x ≤ | |
| 122 | - ((n : ℝ) + 1)^2 * predecessorPartitionSum n x := by | |
| 123 | - rw [predecessorPartitionSum_succ, predecessorPartitionSum, Finset.mul_sum] | |
| 124 | - apply Finset.sum_le_sum | |
| 125 | - intro c _ | |
| 126 | - apply mul_le_mul_of_nonneg_right _ (predecessorPartitionWeight_nonneg x hx c) | |
| 127 | - have hl : (c.length : ℝ) ≤ n := by exact_mod_cast c.length_le | |
| 128 | - have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn | |
| 129 | - have hprod := mul_le_mul_of_nonneg_right | |
| 130 | - (show (c.length : ℝ)+1 ≤ 2*n by linarith) | |
| 131 | - (show 0 ≤ (c.length : ℝ)+1 by positivity) | |
| 132 | - have hscalar := mul_le_mul_of_nonneg_right hxhalf (sq_nonneg ((c.length : ℝ)+1)) | |
| 133 | - have hs := sum_partSize_sq_le c | |
| 134 | - linarith | |
| 135 | - | |
| 136 | -/-- Unlike the unshifted weights, these weights have a uniformly bounded | |
| 137 | -normalized sum on the scalar interval `[0, 1/2]`. -/ | |
| 138 | -theorem predecessorPartitionSum_le (n : ℕ) (hn : 0 < n) | |
| 139 | - (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : | |
| 140 | - predecessorPartitionSum n x ≤ x * (n.factorial : ℝ)^2 := by | |
| 141 | - obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn.ne' | |
| 142 | - induction m with | |
| 143 | - | zero => | |
| 144 | - simp [predecessorPartitionSum, predecessorPartitionWeight, | |
| 145 | - predecessorFactorialProduct, OrderedFinpartition.default_eq] | |
| 146 | - | succ m ih => | |
| 147 | - calc | |
| 148 | - _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * predecessorPartitionSum (m+1) x := | |
| 149 | - predecessorPartitionSum_succ_le (m+1) (by omega) x hx hxhalf | |
| 150 | - _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) := mul_le_mul_of_nonneg_left (ih (by omega)) (sq_nonneg _) | |
| 151 | - _ = _ := by | |
| 152 | - change ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) = | |
| 153 | - x * (((m+1)+1).factorial : ℝ)^2 | |
| 154 | - rw [Nat.factorial_succ (m+1), Nat.cast_mul] | |
| 155 | - push_cast | |
| 156 | - ring | |
| 157 | - | |
| 158 | -end EulerGevreyComposition | |
+0 −108 Euler/GevreyJetCompositionLp.lean deleted
| @@ -1,108 +0,0 @@ | ||
| 1 | -import Euler.GevreyCompositionLp | |
| 2 | - | |
| 3 | -/-! The L² composition estimate over an arbitrary measure space. This | |
| 4 | -version allows the base to be a periodic cylinder while the derivatives | |
| 5 | -are tensors on its Euclidean cover. The output is the literal finite | |
| 6 | -Taylor composition of the given jets. -/ | |
| 7 | - | |
| 8 | -noncomputable section | |
| 9 | - | |
| 10 | -open MeasureTheory | |
| 11 | -open scoped BigOperators ENNReal | |
| 12 | - | |
| 13 | -namespace EulerGevreyJetCompositionLp | |
| 14 | - | |
| 15 | -open EulerGevreyComposition EulerGevreyCompositionLp | |
| 16 | - | |
| 17 | -variable {X E F : Type*} [MeasurableSpace X] | |
| 18 | - [NormedAddCommGroup E] [NormedSpace ℝ E] | |
| 19 | - [NormedAddCommGroup F] [NormedSpace ℝ F] | |
| 20 | - | |
| 21 | -theorem taylorComp_partition_bound | |
| 22 | - (P : FormalMultilinearSeries ℝ E E) (Q : FormalMultilinearSeries ℝ E F) | |
| 23 | - (n : ℕ) (B R : ℝ) | |
| 24 | - (hP : ∀ j, 0 < j → j ≤ n → ‖P j‖ ≤ B*R^j*(j.factorial : ℝ)^2) : | |
| 25 | - ‖Q.taylorComp P n‖ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c*‖Q c.length‖ := by | |
| 26 | - apply (norm_sum_le _ _).trans | |
| 27 | - apply Finset.sum_le_sum | |
| 28 | - intro c _ | |
| 29 | - calc | |
| 30 | - _ ≤ ‖Q c.length‖*∏ i, ‖P (c.partSize i)‖ := c.norm_compAlongOrderedFinpartition_le _ _ | |
| 31 | - _ ≤ ‖Q c.length‖*innerPartitionBound B R c := by | |
| 32 | - apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) | |
| 33 | - exact Finset.prod_le_prod (fun i _ => norm_nonneg _) | |
| 34 | - (fun i _ => hP _ (c.partSize_pos i) (c.partSize_le i)) | |
| 35 | - _ = _ := mul_comm _ _ | |
| 36 | - | |
| 37 | -/-- Outer tensors are transported in L² by the actual measure-preserving | |
| 38 | -map; only the positive inner tensors use uniform bounds. -/ | |
| 39 | -theorem composition_memLp_and_bound | |
| 40 | - (μ : Measure X) (φ : X → X) (hφ : MeasurePreserving φ μ μ) | |
| 41 | - (P : X → FormalMultilinearSeries ℝ E E) (Q : X → FormalMultilinearSeries ℝ E F) | |
| 42 | - (n : ℕ) | |
| 43 | - (hcomp : AEStronglyMeasurable (fun x => (Q (φ x)).taylorComp (P x) n) μ) | |
| 44 | - (A B R S : ℝ) (hA : 0 ≤ A) (hB : 0 ≤ B) (hR : 0 ≤ R) (hS : 0 ≤ S) | |
| 45 | - (hQLp : ∀ j ≤ n, MemLp (fun x => Q x j) 2 μ) | |
| 46 | - (hQ : ∀ j ≤ n, (eLpNorm (fun x => Q x j) 2 μ).toReal ≤ A*S^j*(j.factorial : ℝ)^2) | |
| 47 | - (hP : ∀ j, 0 < j → j ≤ n → ∀ x, ‖P x j‖ ≤ B*R^j*(j.factorial : ℝ)^2) : | |
| 48 | - MemLp (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ ∧ | |
| 49 | - (eLpNorm (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ).toReal ≤ | |
| 50 | - A*(R*(B*S+2))^n*(n.factorial : ℝ)^2 := by | |
| 51 | - let H : OrderedFinpartition n → X → ℝ := fun c x => | |
| 52 | - innerPartitionBound B R c*‖Q (φ x) c.length‖ | |
| 53 | - have hHpos (c : OrderedFinpartition n) (x : X) : 0 ≤ H c x := | |
| 54 | - mul_nonneg (innerPartitionBound_nonneg B R hB hR c) (norm_nonneg _) | |
| 55 | - have hHLp (c : OrderedFinpartition n) : MemLp (H c) 2 μ := | |
| 56 | - (((hQLp c.length c.length_le).norm).comp_measurePreserving hφ).const_mul _ | |
| 57 | - have hsumLp : MemLp (fun x => ∑ c : OrderedFinpartition n, H c x) 2 μ := | |
| 58 | - memLp_finsetSum _ (fun c _ => hHLp c) | |
| 59 | - have hdom (x : X) : ‖(Q (φ x)).taylorComp (P x) n‖ ≤ ∑ c : OrderedFinpartition n, H c x := | |
| 60 | - taylorComp_partition_bound (P x) (Q (φ x)) n B R (fun j hj hjn => hP j hj hjn x) | |
| 61 | - have hcompLp : MemLp (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ := by | |
| 62 | - apply hsumLp.of_le hcomp | |
| 63 | - filter_upwards [] with x | |
| 64 | - rw [Real.norm_of_nonneg (Finset.sum_nonneg (fun c _ => hHpos c x))] | |
| 65 | - exact hdom x | |
| 66 | - refine ⟨hcompLp,?_⟩ | |
| 67 | - have he : (fun x => ∑ c : OrderedFinpartition n, H c x) = ∑ c : OrderedFinpartition n, H c := by | |
| 68 | - funext x | |
| 69 | - simp only [Finset.sum_apply] | |
| 70 | - have hsumNorm := eLpNorm_sum_le | |
| 71 | - (fun c (_ : c ∈ (Finset.univ : Finset (OrderedFinpartition n))) => (hHLp c).aestronglyMeasurable) | |
| 72 | - (by norm_num : (1 : ℝ≥0∞) ≤ 2) | |
| 73 | - have hLpNorm : eLpNorm (fun x => (Q (φ x)).taylorComp (P x) n) 2 μ ≤ | |
| 74 | - ∑ c : OrderedFinpartition n, eLpNorm (H c) 2 μ := by | |
| 75 | - apply (eLpNorm_mono_ae_real (Filter.Eventually.of_forall hdom)).trans | |
| 76 | - rw [he] | |
| 77 | - exact hsumNorm | |
| 78 | - have hreal := ENNReal.toReal_mono | |
| 79 | - (ENNReal.sum_ne_top.mpr (fun c _ => (hHLp c).eLpNorm_ne_top)) hLpNorm | |
| 80 | - rw [ENNReal.toReal_sum (fun c _ => (hHLp c).eLpNorm_ne_top)] at hreal | |
| 81 | - have hHnorm (c : OrderedFinpartition n) : | |
| 82 | - (eLpNorm (H c) 2 μ).toReal = innerPartitionBound B R c* | |
| 83 | - (eLpNorm (fun x => Q x c.length) 2 μ).toReal := by | |
| 84 | - have hfun : H c = innerPartitionBound B R c • ((fun y => ‖Q y c.length‖) ∘ φ) := rfl | |
| 85 | - rw [hfun, eLpNorm_const_smul, | |
| 86 | - eLpNorm_comp_measurePreserving (hQLp c.length c.length_le).aestronglyMeasurable.norm hφ, | |
| 87 | - eLpNorm_norm, ENNReal.toReal_mul, toReal_enorm, | |
| 88 | - Real.norm_of_nonneg (innerPartitionBound_nonneg B R hB hR c)] | |
| 89 | - simp_rw [hHnorm] at hreal | |
| 90 | - calc | |
| 91 | - _ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c* | |
| 92 | - (eLpNorm (fun x => Q x c.length) 2 μ).toReal := hreal | |
| 93 | - _ ≤ ∑ c : OrderedFinpartition n, innerPartitionBound B R c* | |
| 94 | - (A*S^c.length*(c.length.factorial : ℝ)^2) := by | |
| 95 | - exact Finset.sum_le_sum fun c _ => mul_le_mul_of_nonneg_left | |
| 96 | - (hQ c.length c.length_le) (innerPartitionBound_nonneg B R hB hR c) | |
| 97 | - _ = A*R^n*partitionSum n (B*S) := by | |
| 98 | - rw [partitionSum, Finset.mul_sum] | |
| 99 | - apply Finset.sum_congr rfl | |
| 100 | - intro c _ | |
| 101 | - rw [mul_comm] | |
| 102 | - exact partition_bound_factorization c A B R S | |
| 103 | - _ ≤ A*R^n*((B*S+2)^n*(n.factorial : ℝ)^2) := | |
| 104 | - mul_le_mul_of_nonneg_left (partitionSum_le n (B*S) (mul_nonneg hB hS)) | |
| 105 | - (mul_nonneg hA (pow_nonneg hR n)) | |
| 106 | - _ = _ := by rw [mul_pow]; ring | |
| 107 | - | |
| 108 | -end EulerGevreyJetCompositionLp | |
+82 −1 Euler/GevreyLowNorms.lean View file
| @@ -1,8 +1,89 @@ | ||
| 1 | 1 | import Euler.GevreyTransportCommutator |
| 2 | -import Euler.GevreyMetricComparison | |
| 2 | +import Euler.SobolevGevreyOperators | |
| 3 | +import Euler.BaseWordMetric | |
| 4 | +import Euler.WeightedCylinderEnergy | |
| 3 | 5 | |
| 4 | 6 | /-! Fixed-base pointwise and metric-loss control by actual finite Gevrey norms. -/ |
| 5 | 7 | |
| 8 | +/-! ## From `Euler/GevreyMetricComparison.lean` | |
| 9 | + | |
| 10 | +The text of `Euler/GevreyMetricComparison.lean`, folded into this file, which was its only importer. -/ | |
| 11 | + | |
| 12 | +section | |
| 13 | + | |
| 14 | +/-! Cutoff-independent comparison between actual Sobolev Gevrey sums and the source's metric root energies. -/ | |
| 15 | + | |
| 16 | +noncomputable section | |
| 17 | + | |
| 18 | +namespace EulerGevreyMetricComparison | |
| 19 | + | |
| 20 | +open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 21 | + EulerSpatialSobolevInverse EulerH6Pressure EulerJetProductBounds EulerPacketWeights | |
| 22 | + EulerSobolevGevreyOperators EulerBaseWordMetric EulerFiniteMetricEnergy EulerWeightedCylinderEnergy | |
| 23 | +open scoped Topology | |
| 24 | + | |
| 25 | +variable (period : ℝ) [Fact (0 < period)] | |
| 26 | + | |
| 27 | +/-- All external derivative words through the selected cutoff. -/ | |
| 28 | +abbrev ExternalWord (N : ℕ) := Σ n : Fin (N+1), Fin n.val → Fin 4 | |
| 29 | + | |
| 30 | +/-- Literal base derivatives of each external word of an actual Sobolev field. -/ | |
| 31 | +def energyValues {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (u : SobolevSpace period s) : | |
| 32 | + ExternalWord N → BaseWord q → LiftL2 period := fun I => | |
| 33 | + baseWordValues period (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) I.2 (by have := I.1.isLt; omega)) | |
| 34 | + | |
| 35 | +/-- Exact rewriting of a valid external Sobolev block as the actual base-word derivative sums. -/ | |
| 36 | +theorem blockNorm_baseWords {s q n : ℕ} (u : SobolevSpace period s) (h : n+q ≤ s) : | |
| 37 | + blockNorm period (toJet period u) q n = | |
| 38 | + ∑ w : Fin n → Fin 4, (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h).sobolevNorm := by | |
| 39 | + rw [blockNorm_eq_word_sizes (toJet period u) h] | |
| 40 | + apply Finset.sum_congr rfl | |
| 41 | + intro w _ | |
| 42 | + exact sobolevSize_eq period (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h) | |
| 43 | + | |
| 44 | +/-- The lower comparison at one external order uses only the fixed number of base Sobolev words. -/ | |
| 45 | +theorem blockNorm_metric_lower {s q n : ℕ} (u : SobolevSpace period s) (h : n+q ≤ s) | |
| 46 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (c : ℝ) (hc : 0 < c) | |
| 47 | + (hK : ∀ v, c^2*‖v‖^2 ≤ ⟪K v,v⟫_ℝ) : | |
| 48 | + blockNorm period (toJet period u) q n ≤ | |
| 49 | + (Real.sqrt (Fintype.card (BaseWord q) : ℝ)/c) * | |
| 50 | + ∑ w : Fin n → Fin 4, baseWordMetricNorm period K | |
| 51 | + (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h) := by | |
| 52 | + rw [blockNorm_baseWords period u h, Finset.mul_sum] | |
| 53 | + exact Finset.sum_le_sum fun w _ => sobolevNorm_le_baseWordMetric period K _ c hc hK | |
| 54 | + | |
| 55 | +/-- The metric-weighted energy is exactly the external-word sum of fixed-base metric roots. -/ | |
| 56 | +theorem metricSum_eq {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) | |
| 57 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) : | |
| 58 | + weightedMetricSum ρ (fun I : ExternalWord N => I.1.val) K (energyValues period q N hN u) = | |
| 59 | + ∑ n : Fin (N+1), weight ρ n.val * ∑ w : Fin n.val → Fin 4, | |
| 60 | + baseWordMetricNorm period K (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w | |
| 61 | + (by have := n.isLt; omega)) := by | |
| 62 | + simp only [weightedMetricSum, Fintype.sum_sigma, Finset.mul_sum, energyValues, baseWordMetricNorm] | |
| 63 | + | |
| 64 | +/-- The actual weighted Sobolev sum is controlled by metric roots with no external-cutoff constant. -/ | |
| 65 | +theorem weightedNorm_metric_lower {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) (hρ : 0 < ρ) | |
| 66 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) (c : ℝ) (hc : 0 < c) | |
| 67 | + (hK : ∀ v, c^2*‖v‖^2 ≤ ⟪K v,v⟫_ℝ) : | |
| 68 | + weightedNorm period q N ρ u ≤ (Real.sqrt (Fintype.card (BaseWord q) : ℝ)/c) * | |
| 69 | + weightedMetricSum ρ (fun I : ExternalWord N => I.1.val) K (energyValues period q N hN u) := by | |
| 70 | + rw [metricSum_eq, weightedNorm, ← Fin.sum_univ_eq_sum_range, Finset.mul_sum] | |
| 71 | + apply Finset.sum_le_sum | |
| 72 | + intro n _ | |
| 73 | + have h := mul_le_mul_of_nonneg_left (blockNorm_metric_lower period (q := q) (n := n.val) u (by have := n.isLt; omega) K c hc hK) | |
| 74 | + (weight_pos hρ n.val).le | |
| 75 | + exact h.trans_eq (by ring) | |
| 76 | + | |
| 77 | +/-- At the fixed base index six the comparison uses exactly 5461 base words. -/ | |
| 78 | +theorem card_baseWord_six : Fintype.card (BaseWord 6) = 5461 := by | |
| 79 | + rw [card_baseWord] | |
| 80 | + norm_num [Finset.sum_range_succ] | |
| 81 | + | |
| 82 | +end EulerGevreyMetricComparison | |
| 83 | +end | |
| 84 | + | |
| 85 | +end | |
| 86 | + | |
| 6 | 87 | noncomputable section |
| 7 | 88 | |
| 8 | 89 | namespace EulerGevreyLowNorms |
+0 −73 Euler/GevreyMetricComparison.lean deleted
| @@ -1,73 +0,0 @@ | ||
| 1 | -import Euler.SobolevGevreyOperators | |
| 2 | -import Euler.BaseWordMetric | |
| 3 | -import Euler.WeightedCylinderEnergy | |
| 4 | - | |
| 5 | -/-! Cutoff-independent comparison between actual Sobolev Gevrey sums and the source's metric root energies. -/ | |
| 6 | - | |
| 7 | -noncomputable section | |
| 8 | - | |
| 9 | -namespace EulerGevreyMetricComparison | |
| 10 | - | |
| 11 | -open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 12 | - EulerSpatialSobolevInverse EulerH6Pressure EulerJetProductBounds EulerPacketWeights | |
| 13 | - EulerSobolevGevreyOperators EulerBaseWordMetric EulerFiniteMetricEnergy EulerWeightedCylinderEnergy | |
| 14 | -open scoped Topology | |
| 15 | - | |
| 16 | -variable (period : ℝ) [Fact (0 < period)] | |
| 17 | - | |
| 18 | -/-- All external derivative words through the selected cutoff. -/ | |
| 19 | -abbrev ExternalWord (N : ℕ) := Σ n : Fin (N+1), Fin n.val → Fin 4 | |
| 20 | - | |
| 21 | -/-- Literal base derivatives of each external word of an actual Sobolev field. -/ | |
| 22 | -def energyValues {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (u : SobolevSpace period s) : | |
| 23 | - ExternalWord N → BaseWord q → LiftL2 period := fun I => | |
| 24 | - baseWordValues period (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) I.2 (by have := I.1.isLt; omega)) | |
| 25 | - | |
| 26 | -/-- Exact rewriting of a valid external Sobolev block as the actual base-word derivative sums. -/ | |
| 27 | -theorem blockNorm_baseWords {s q n : ℕ} (u : SobolevSpace period s) (h : n+q ≤ s) : | |
| 28 | - blockNorm period (toJet period u) q n = | |
| 29 | - ∑ w : Fin n → Fin 4, (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h).sobolevNorm := by | |
| 30 | - rw [blockNorm_eq_word_sizes (toJet period u) h] | |
| 31 | - apply Finset.sum_congr rfl | |
| 32 | - intro w _ | |
| 33 | - exact sobolevSize_eq period (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h) | |
| 34 | - | |
| 35 | -/-- The lower comparison at one external order uses only the fixed number of base Sobolev words. -/ | |
| 36 | -theorem blockNorm_metric_lower {s q n : ℕ} (u : SobolevSpace period s) (h : n+q ≤ s) | |
| 37 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (c : ℝ) (hc : 0 < c) | |
| 38 | - (hK : ∀ v, c^2*‖v‖^2 ≤ ⟪K v,v⟫_ℝ) : | |
| 39 | - blockNorm period (toJet period u) q n ≤ | |
| 40 | - (Real.sqrt (Fintype.card (BaseWord q) : ℝ)/c) * | |
| 41 | - ∑ w : Fin n → Fin 4, baseWordMetricNorm period K | |
| 42 | - (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w h) := by | |
| 43 | - rw [blockNorm_baseWords period u h, Finset.mul_sum] | |
| 44 | - exact Finset.sum_le_sum fun w _ => sobolevNorm_le_baseWordMetric period K _ c hc hK | |
| 45 | - | |
| 46 | -/-- The metric-weighted energy is exactly the external-word sum of fixed-base metric roots. -/ | |
| 47 | -theorem metricSum_eq {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) | |
| 48 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) : | |
| 49 | - weightedMetricSum ρ (fun I : ExternalWord N => I.1.val) K (energyValues period q N hN u) = | |
| 50 | - ∑ n : Fin (N+1), weight ρ n.val * ∑ w : Fin n.val → Fin 4, | |
| 51 | - baseWordMetricNorm period K (EulerH6Pressure.SpatialJet.derivativeJet (q := q) (toJet period u) w | |
| 52 | - (by have := n.isLt; omega)) := by | |
| 53 | - simp only [weightedMetricSum, Fintype.sum_sigma, Finset.mul_sum, energyValues, baseWordMetricNorm] | |
| 54 | - | |
| 55 | -/-- The actual weighted Sobolev sum is controlled by metric roots with no external-cutoff constant. -/ | |
| 56 | -theorem weightedNorm_metric_lower {s : ℕ} (q N : ℕ) (hN : N+q ≤ s) (ρ : ℝ) (hρ : 0 < ρ) | |
| 57 | - (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) (c : ℝ) (hc : 0 < c) | |
| 58 | - (hK : ∀ v, c^2*‖v‖^2 ≤ ⟪K v,v⟫_ℝ) : | |
| 59 | - weightedNorm period q N ρ u ≤ (Real.sqrt (Fintype.card (BaseWord q) : ℝ)/c) * | |
| 60 | - weightedMetricSum ρ (fun I : ExternalWord N => I.1.val) K (energyValues period q N hN u) := by | |
| 61 | - rw [metricSum_eq, weightedNorm, ← Fin.sum_univ_eq_sum_range, Finset.mul_sum] | |
| 62 | - apply Finset.sum_le_sum | |
| 63 | - intro n _ | |
| 64 | - have h := mul_le_mul_of_nonneg_left (blockNorm_metric_lower period (q := q) (n := n.val) u (by have := n.isLt; omega) K c hc hK) | |
| 65 | - (weight_pos hρ n.val).le | |
| 66 | - exact h.trans_eq (by ring) | |
| 67 | - | |
| 68 | -/-- At the fixed base index six the comparison uses exactly 5461 base words. -/ | |
| 69 | -theorem card_baseWord_six : Fintype.card (BaseWord 6) = 5461 := by | |
| 70 | - rw [card_baseWord] | |
| 71 | - norm_num [Finset.sum_range_succ] | |
| 72 | - | |
| 73 | -end EulerGevreyMetricComparison | |
+87 −1 Euler/GevreyPathNorm.lean View file
| @@ -1,8 +1,94 @@ | ||
| 1 | -import Euler.GevreyContinuationNorm | |
| 1 | +import Euler.GevreyMetricEstimate | |
| 2 | 2 | import Euler.EnergyMetricPaths |
| 3 | 3 | |
| 4 | 4 | /-! A genuine metric Gevrey bound supplies the uniform Banach norm used in actual continuation. -/ |
| 5 | 5 | |
| 6 | +/-! ## From `Euler/GevreyContinuationNorm.lean` | |
| 7 | + | |
| 8 | +The text of `Euler/GevreyContinuationNorm.lean`, folded into this file, which was its only importer. -/ | |
| 9 | + | |
| 10 | +section | |
| 11 | + | |
| 12 | +/-! Actual complete-Sobolev control from a positive-radius finite Gevrey bound, for parabolic continuation. -/ | |
| 13 | + | |
| 14 | +noncomputable section | |
| 15 | + | |
| 16 | +namespace EulerGevreyContinuationNorm | |
| 17 | + | |
| 18 | +open EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev EulerSpatialSobolevInverse | |
| 19 | + EulerJetProductBounds EulerH6Pressure EulerSobolevGevreyOperators EulerPacketWeights EulerGevreyMetricEstimate | |
| 20 | + | |
| 21 | +/-- At every retained derivative order, the Gevrey weight is bounded below by one positive fixed-cutoff weight. -/ | |
| 22 | +theorem weight_lower (ρ δ : ℝ) (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) | |
| 23 | + (n N : ℕ) (hn : n ≤ N) : weight δ N ≤ weight ρ n := by | |
| 24 | + have hρ : 0 ≤ ρ := hδ.le.trans hδρ | |
| 25 | + have hp : δ^N ≤ ρ^n := (pow_le_pow_of_le_one hδ.le hδ1 hn).trans (pow_le_pow_left₀ hδ.le hδρ n) | |
| 26 | + have hf : (n.factorial : ℝ) ≤ (N.factorial : ℝ) := by exact_mod_cast Nat.factorial_le hn | |
| 27 | + have hsq : (n.factorial : ℝ)^2 ≤ (N.factorial : ℝ)^2 := by | |
| 28 | + nlinarith [show (0 : ℝ) ≤ (n.factorial : ℝ) from Nat.cast_nonneg _] | |
| 29 | + exact div_le_div₀ (pow_nonneg hρ n) hp (by positivity) hsq | |
| 30 | + | |
| 31 | +variable (period : ℝ) [Fact (0 < period)] | |
| 32 | + | |
| 33 | +/-- Each actual derivative coordinate is bounded by its genuine homogeneous derivative-sum norm. -/ | |
| 34 | +theorem word_le_level {s : ℕ} (u : SobolevSpace period s) (w : SobolevWord s) : | |
| 35 | + ‖u.val w‖ ≤ levelNorm period (toJet period u) w.1.val := by | |
| 36 | + rw [levelNorm_eq_words] | |
| 37 | + have h := Finset.single_le_sum (s := (Finset.univ : Finset (Fin w.1.val → Fin 4))) | |
| 38 | + (fun v _ => norm_nonneg ((toJet period u).word v)) (Finset.mem_univ w.2) | |
| 39 | + rw [toJet_word period u (by have := w.1.isLt; omega) w.2] at h | |
| 40 | + exact h | |
| 41 | + | |
| 42 | +/-- Every derivative coordinate through the full energy order is contained in one retained external/base block. -/ | |
| 43 | +theorem level_le_block {s : ℕ} (u : SobolevSpace period s) (N m : ℕ) (hm : m ≤ N+6) : | |
| 44 | + levelNorm period (toJet period u) m ≤ blockNorm period (toJet period u) 6 (min m N) := by | |
| 45 | + let n := min m N | |
| 46 | + have hn : n ≤ m := Nat.min_le_left m N | |
| 47 | + have hr : m-n ≤ 6 := by dsimp [n]; omega | |
| 48 | + have he : n+(m-n) = m := Nat.add_sub_of_le hn | |
| 49 | + have h := Finset.single_le_sum (s := Finset.range 7) | |
| 50 | + (fun r _ => (levelNorm_nonneg (toJet period u) : 0 ≤ levelNorm period (toJet period u) (n+r))) | |
| 51 | + (show m-n ∈ Finset.range 7 by exact Finset.mem_range.mpr (by omega)) | |
| 52 | + rw [he] at h | |
| 53 | + exact h | |
| 54 | + | |
| 55 | +/-- A finite actual Gevrey bound controls the complete energy-order Sobolev norm on every positive-radius interval. -/ | |
| 56 | +theorem norm_le_weighted {s : ℕ} (N : ℕ) (hS : s ≤ N+6) (ρ δ : ℝ) | |
| 57 | + (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) (u : SobolevSpace period s) : | |
| 58 | + ‖u‖ ≤ weightedNorm period 6 N ρ u / weight δ N := by | |
| 59 | + have hρ : 0 < ρ := hδ.trans_le hδρ | |
| 60 | + have hw : 0 < weight δ N := weight_pos hδ N | |
| 61 | + change ‖u.val‖ ≤ _ | |
| 62 | + apply (pi_norm_le_iff_of_nonneg (div_nonneg (weightedNorm_nonneg period 6 N ρ hρ u) hw.le)).mpr | |
| 63 | + intro w | |
| 64 | + have hm : w.1.val ≤ N+6 := (Nat.le_of_lt_succ w.1.isLt).trans hS | |
| 65 | + let n := min w.1.val N | |
| 66 | + have hn : n ≤ N := Nat.min_le_right w.1.val N | |
| 67 | + have hc := (word_le_level period u w).trans (level_le_block period u N w.1.val hm) | |
| 68 | + have hh := Finset.single_le_sum (s := Finset.range (N+1)) | |
| 69 | + (fun i _ => mul_nonneg (weight_pos hρ i).le (show 0 ≤ blockNorm period (toJet period u) 6 i from blockNorm_nonneg _)) | |
| 70 | + (show n ∈ Finset.range (N+1) by exact Finset.mem_range.mpr (by omega)) | |
| 71 | + have hle : weight δ N*‖u.val w‖ ≤ weightedNorm period 6 N ρ u := by | |
| 72 | + calc | |
| 73 | + _ ≤ weight ρ n*‖u.val w‖ := mul_le_mul_of_nonneg_right (weight_lower ρ δ hδ hδρ hδ1 n N hn) (norm_nonneg _) | |
| 74 | + _ ≤ weight ρ n*blockNorm period (toJet period u) 6 n := mul_le_mul_of_nonneg_left hc (weight_pos hρ n).le | |
| 75 | + _ ≤ _ := hh | |
| 76 | + exact (le_div_iff₀ hw).mpr (by simpa only [mul_comm] using hle) | |
| 77 | + | |
| 78 | +/-- A metric Gevrey bound gives the actual finite-Sobolev state bound needed by the uniform local restart theorem. -/ | |
| 79 | +theorem norm_le_metric {s : ℕ} (N : ℕ) (hN : N+6 ≤ s) (hS : s ≤ N+6) (ρ δ : ℝ) | |
| 80 | + (hδ : 0 < δ) (hδρ : δ ≤ ρ) (hδ1 : δ ≤ 1) | |
| 81 | + (K : LiftL2 period →L[ℝ] LiftL2 period) (u : SobolevSpace period s) (c : ℝ) (hc : 0 < c) | |
| 82 | + (hK : ∀ v, c^2*‖v‖^2 ≤ inner ℝ (K v) v) : | |
| 83 | + ‖u‖ ≤ metricAmplification c*energyNorm period N hN ρ K u / weight δ N := by | |
| 84 | + exact (norm_le_weighted period N hS ρ δ hδ hδρ hδ1 u).trans | |
| 85 | + (div_le_div_of_nonneg_right (weightedNorm_le_energy period N hN ρ (hδ.trans_le hδρ) K u c hc hK) (weight_pos hδ N).le) | |
| 86 | + | |
| 87 | +end EulerGevreyContinuationNorm | |
| 88 | +end | |
| 89 | + | |
| 90 | +end | |
| 91 | + | |
| 6 | 92 | noncomputable section |
| 7 | 93 | |
| 8 | 94 | namespace EulerGevreyPathNorm |
+0 −88 Euler/GevreyPressureComplete.lean deleted
| @@ -1,88 +0,0 @@ | ||
| 1 | -import Euler.GevreyPressureEnergy | |
| 2 | - | |
| 3 | -/-! Complete finite-cutoff pressure commutator bounds for both actual source components. -/ | |
| 4 | - | |
| 5 | -noncomputable section | |
| 6 | - | |
| 7 | -namespace EulerGevreyPressureEnergy | |
| 8 | - | |
| 9 | -open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 10 | - EulerSpatialSobolevInverse EulerH6Pressure EulerJetProductBounds EulerPacketWeights | |
| 11 | - EulerSobolevGevreyOperators EulerBasePressureCommutator EulerGevreyPressureTransport EulerH6Nonlinear | |
| 12 | - EulerSobolevTransportCommutator EulerSobolevCoefficientPressure EulerGevreyLowNorms | |
| 13 | - | |
| 14 | -variable (period : ℝ) [Fact (0 < period)] | |
| 15 | - | |
| 16 | -omit [Fact (0 < period)] in | |
| 17 | -/-- Monotonicity of the actual coefficient derivative blocks in their fixed Sobolev index. -/ | |
| 18 | -theorem coefficientBlock_mono {s p q : ℕ} (hpq : p ≤ q) {A : SmoothCoefficient period} | |
| 19 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) (n : ℕ) : | |
| 20 | - coefficientBlock period K p n ≤ coefficientBlock period K q n := by | |
| 21 | - apply mul_le_mul (pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hpq) | |
| 22 | - (Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (by omega : p+1 ≤ q+1)) | |
| 23 | - (fun r _ _ => (boundLevel_nonneg K : 0 ≤ boundLevel period K (n+r)))) | |
| 24 | - (Finset.sum_nonneg (fun r _ => (boundLevel_nonneg K : 0 ≤ boundLevel period K (n+r)))) | |
| 25 | - (pow_nonneg (by norm_num) q) | |
| 26 | - | |
| 27 | -/-- The actual nonlinear external pressure commutator bound includes the zero-cutoff case. -/ | |
| 28 | -theorem nonlinear_externalPressure_bound_all {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 29 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 30 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 31 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 32 | - (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 33 | - (hbase : (EulerH6Pressure.CoefficientJet.restrict K 6 (by omega)).pressureConstant c ≤ M) | |
| 34 | - (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 35 | - (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 36 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 37 | - (u v : SobolevSpace period (s+1)) : | |
| 38 | - externalPressureNorm period K N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 39 | - (32*Rc*M*productConstant period 3)*weightedNorm period 6 N ρ u*weightedLoss period 6 N ρ v := by | |
| 40 | - cases N with | |
| 41 | - | zero => simp [externalPressureNorm, weightedLoss, commutatorBlock_zero] | |
| 42 | - | succ N => exact nonlinear_externalPressure_bound period hs K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff L hL u v | |
| 43 | - | |
| 44 | -/-- Actual base transport-pressure commutators are bounded by the product of the two velocity energies at the same cutoff. -/ | |
| 45 | -theorem nonlinear_basePressure_bound {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 46 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 47 | - (K0 : EulerSpatialSobolevInverse.CoefficientJet period standardDirection 6 A) | |
| 48 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 49 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 50 | - (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 51 | - (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 52 | - (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 53 | - (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 54 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 55 | - (u v : SobolevSpace period (s+1)) : | |
| 56 | - basePressureNorm period K0 N hN ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 57 | - (448*baseCoefficientSum period K0)*(8*M*(5460*lowerProductConstant period 3))* | |
| 58 | - weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 59 | - have hc5 : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2 := | |
| 60 | - fun l hl hn => (coefficientBlock_mono period (by norm_num : 5 ≤ 6) K l).trans (hcoeff l hl hn) | |
| 61 | - have hp := transportPressure_lower period hs K κ m c hc hpos N (by omega) ρ Rc M hρ hRc hM hbase hsmall hc5 L hL u v | |
| 62 | - exact (basePressureNorm_lower period K0 N hN ρ hρ _).trans | |
| 63 | - ((mul_le_mul_of_nonneg_left hp (mul_nonneg (by norm_num) (baseCoefficientSum_nonneg period K0))).trans_eq (by ring)) | |
| 64 | - | |
| 65 | -/-- Both actual commutators of the order-zero pressure are controlled by the unshifted source norm. -/ | |
| 66 | -theorem source_pressure_commutators {s : ℕ} {A : SmoothCoefficient period} | |
| 67 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 68 | - (K0 : EulerSpatialSobolevInverse.CoefficientJet period standardDirection 6 A) | |
| 69 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 70 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 71 | - (N : ℕ) (hN : N+6 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 72 | - (hbase : (EulerH6Pressure.CoefficientJet.restrict K 6 (by omega)).pressureConstant c ≤ M) | |
| 73 | - (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 74 | - (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 6 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 75 | - (f : SobolevSpace period s) : | |
| 76 | - externalPressureNorm period K N ρ (pressureSobolevOperator period K κ m c hc hpos f) + | |
| 77 | - basePressureNorm period K0 N hN ρ (pressureSobolevOperator period K κ m c hc hpos f) ≤ | |
| 78 | - (2*M*(weightedCoefficient period K 6 N ρ + 448*baseCoefficientSum period K0))*weightedNorm period 6 N ρ f := by | |
| 79 | - have he := externalPressureNorm_unshifted period K N hN ρ hρ (pressureSobolevOperator period K κ m c hc hpos f) | |
| 80 | - have hb := basePressureNorm_unshifted period K0 N hN ρ hρ (pressureSobolevOperator period K κ m c hc hpos f) | |
| 81 | - have hp := weightedNorm_pressure period K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff f | |
| 82 | - have hsum := add_le_add he hb | |
| 83 | - rw [← add_mul] at hsum | |
| 84 | - exact hsum.trans ((mul_le_mul_of_nonneg_left hp (add_nonneg | |
| 85 | - (weightedCoefficient_nonneg period K 6 N ρ hρ) | |
| 86 | - (mul_nonneg (by norm_num) (baseCoefficientSum_nonneg period K0)))).trans_eq (by ring)) | |
| 87 | - | |
| 88 | -end EulerGevreyPressureEnergy | |
+153 −1 Euler/GevreyPressureShifted.lean View file
| @@ -1,7 +1,159 @@ | ||
| 1 | -import Euler.GevreyPressureTransport | |
| 1 | +import Euler.GevreyTransportCommutator | |
| 2 | +import Euler.NonlinearPressureLower | |
| 2 | 3 | |
| 3 | 4 | /-! Cutoff-independent nonlinear pressure bounds for actual finite-Sobolev transport sources. -/ |
| 4 | 5 | |
| 6 | +/-! ## From `Euler/GevreyPressureTransport.lean` | |
| 7 | + | |
| 8 | +The text of `Euler/GevreyPressureTransport.lean`, folded into this file, which was its only importer. -/ | |
| 9 | + | |
| 10 | +section | |
| 11 | + | |
| 12 | +/-! Cutoff-independent nonlinear pressure bounds for actual finite-Sobolev transport sources. -/ | |
| 13 | + | |
| 14 | +noncomputable section | |
| 15 | + | |
| 16 | +namespace EulerGevreyPressureTransport | |
| 17 | + | |
| 18 | +open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 19 | + EulerSpatialSobolevInverse EulerMetricTransport EulerH6Pressure EulerPacketWeights | |
| 20 | + EulerSobolevGevreyOperators EulerSobolevTransport EulerSobolevL2Product EulerFunctionalVelocity | |
| 21 | + EulerH6Nonlinear EulerVectorCylinder EulerSobolevTransportCommutator EulerSobolevCoefficientPressure | |
| 22 | + EulerSobolevGevreyProduct EulerSobolevHeat | |
| 23 | +open scoped ContDiff ENNReal Topology | |
| 24 | + | |
| 25 | +variable (period : ℝ) [Fact (0 < period)] | |
| 26 | + | |
| 27 | +local instance pressureTransportGroup (q : ℕ) : NormedAddCommGroup (SobolevSpace period q) := inferInstance | |
| 28 | +local instance pressureTransportSpace (q : ℕ) : NormedSpace ℝ (SobolevSpace period q) := inferInstance | |
| 29 | + | |
| 30 | +/-- Actual coefficient pressure blocks agree with the genuine pressure-jet construction. -/ | |
| 31 | +theorem pressure_block_eq {s q n : ℕ} {A : SmoothCoefficient period} | |
| 32 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 33 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 34 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 35 | + (u : SobolevSpace period s) (h : n+q ≤ s) : | |
| 36 | + blockNorm period (toJet period (pressureSobolevOperator period K κ m c hc hpos u)) q n = | |
| 37 | + blockNorm period ((toJet period u).solvePressure K κ m c hc hpos) q n := | |
| 38 | + blockNorm_unique period _ _ (pressureSobolevOperator_value period K κ m c hc hpos u) h h | |
| 39 | + | |
| 40 | +/-- The actual finite-Sobolev pressure generated by the nonlinear transport source. -/ | |
| 41 | +def transportPressure {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 42 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 43 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 44 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 45 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 46 | + (u v : SobolevSpace period (s+1)) : SobolevSpace period s := | |
| 47 | + pressureSobolevOperator period K κ m c hc hpos (transportBilinear period hs L hL u v) | |
| 48 | + | |
| 49 | +/-- The nonlinear pressure depends continuously on its actual Sobolev velocity inputs. -/ | |
| 50 | +theorem transportPressure_continuous {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 51 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 52 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 53 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 54 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) : | |
| 55 | + Continuous (fun p : SobolevSpace period (s+1) × SobolevSpace period (s+1) => | |
| 56 | + transportPressure period hs K κ m c hc hpos L hL p.1 p.2) := | |
| 57 | + (pressureSobolevOperator period K κ m c hc hpos).continuous.comp (transportBilinear period hs L hL).continuous₂ | |
| 58 | + | |
| 59 | +/-- The four-component lifted velocity bound in a finite weighted norm. -/ | |
| 60 | +theorem velocityMap_weighted_bound (q N : ℕ) (ρ : ℝ) (hρ : 0 < ρ) | |
| 61 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 62 | + (f : LiftDomain period → Vector3) | |
| 63 | + (hf : ∀ x, ContDiff ℝ ∞ (localFieldLift period f x)) | |
| 64 | + (hfL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w f) 2 (liftMeasure period)) : | |
| 65 | + (∑ n ∈ Finset.range (N+1), weight ρ n*wordSobolevNorm period q n (velocityMap L ∘ f)) ≤ | |
| 66 | + 4 * ∑ n ∈ Finset.range (N+1), weight ρ n*wordSobolevNorm period q n f := by | |
| 67 | + rw [Finset.mul_sum] | |
| 68 | + exact Finset.sum_le_sum fun n _ => | |
| 69 | + (mul_le_mul_of_nonneg_left (velocityMap_word_bound period q n L hL f hf hfL) (weight_pos hρ n).le).trans_eq (by ring) | |
| 70 | + | |
| 71 | +/-- The actual unshifted H⁵ nonlinear pressure estimate on smooth Sobolev representatives. -/ | |
| 72 | +theorem transportPressure_lower_smooth {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 73 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 74 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 75 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 76 | + (N : ℕ) (hN : N+5 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 77 | + (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 78 | + (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 79 | + (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 80 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 81 | + (u v : SobolevSpace period (s+1)) (f g : LiftDomain period → Vector3) | |
| 82 | + (hu : (value period u : LiftDomain period → Vector3) =ᵐ[liftMeasure period] f) | |
| 83 | + (hv : (value period v : LiftDomain period → Vector3) =ᵐ[liftMeasure period] g) | |
| 84 | + (hf : ∀ x, ContDiff ℝ ∞ (localFieldLift period f x)) | |
| 85 | + (hg : ∀ x, ContDiff ℝ ∞ (localFieldLift period g x)) | |
| 86 | + (hfL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w f) 2 (liftMeasure period)) | |
| 87 | + (hgL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w g) 2 (liftMeasure period)) : | |
| 88 | + weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 89 | + (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 90 | + let b := velocityMap L ∘ f | |
| 91 | + have hb := postcomp_smooth period (velocityMap L) f hf | |
| 92 | + have hbL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w b) 2 (liftMeasure period) := | |
| 93 | + fun j w => postcomp_word_memLp period (le_refl j) (velocityMap L) f hf (fun r _ a => hfL r a) w | |
| 94 | + have hp := nonlinear_pressure_lower_bound period K (toJet period (transportBilinear period hs L hL u v)) | |
| 95 | + κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff b g hb hg hbL hgL | |
| 96 | + (transport_ae_velocityMap period hs L hL u v f g hu hv hg) | |
| 97 | + have heq : weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) = | |
| 98 | + ∑ n ∈ Finset.range (N+1), weight ρ n * blockNorm period | |
| 99 | + ((toJet period (transportBilinear period hs L hL u v)).solvePressure K κ m c hc hpos) 5 n := by | |
| 100 | + apply Finset.sum_congr rfl | |
| 101 | + intro n hn | |
| 102 | + exact congrArg (fun a : ℝ => weight ρ n*a) | |
| 103 | + (pressure_block_eq period (q := 5) (n := n) K κ m c hc hpos (transportBilinear period hs L hL u v) | |
| 104 | + (by have := Finset.mem_range.mp hn; omega : n+5 ≤ s)) | |
| 105 | + rw [heq] | |
| 106 | + conv_rhs => rw [weightedNorm_eq_classical period 6 N (by omega) ρ u f hu hf, | |
| 107 | + weightedNorm_eq_classical period 6 N (by omega) ρ v g hv hg] | |
| 108 | + have hcoef : 0 ≤ 2*M*(5460*lowerProductConstant period 3) := by | |
| 109 | + exact mul_nonneg (by linarith) (mul_nonneg (by norm_num) (lowerProductConstant_nonneg period 3)) | |
| 110 | + have hv0 : 0 ≤ ∑ j ∈ Finset.range (N+1), weight ρ j * wordSobolevNorm period 6 j g := | |
| 111 | + Finset.sum_nonneg fun j _ => mul_nonneg (weight_pos hρ j).le (wordSobolevNorm_nonneg period 6 j g) | |
| 112 | + exact hp.trans ((mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left | |
| 113 | + (velocityMap_weighted_bound period 6 N ρ hρ L hL f hf hfL) hcoef) hv0).trans_eq (by ring)) | |
| 114 | + | |
| 115 | +/-- The lower-order nonlinear pressure estimate holds for the actual finite-Sobolev fields used by the solver. -/ | |
| 116 | +theorem transportPressure_lower {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 117 | + (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 118 | + (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 119 | + (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 120 | + (N : ℕ) (hN : N+5 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 121 | + (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 122 | + (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 123 | + (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 124 | + (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 125 | + (u v : SobolevSpace period (s+1)) : | |
| 126 | + weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 127 | + (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 128 | + let U : ℕ → SobolevSpace period (s+1) := fun n => restrictOperator period (by omega : s+1 ≤ s+1+3) (smoothApprox period (s+1) n u) | |
| 129 | + let V : ℕ → SobolevSpace period (s+1) := fun n => restrictOperator period (by omega : s+1 ≤ s+1+3) (smoothApprox period (s+1) n v) | |
| 130 | + have hU : Filter.Tendsto U Filter.atTop (𝓝 u) := smoothApprox_tendsto period u | |
| 131 | + have hV : Filter.Tendsto V Filter.atTop (𝓝 v) := smoothApprox_tendsto period v | |
| 132 | + have hpairs : Filter.Tendsto (fun n => (U n,V n)) Filter.atTop (𝓝 (u,v)) := hU.prodMk_nhds hV | |
| 133 | + have hP : Filter.Tendsto | |
| 134 | + (fun p : SobolevSpace period (s+1) × SobolevSpace period (s+1) => transportPressure period hs K κ m c hc hpos L hL p.1 p.2) | |
| 135 | + (𝓝 (u,v)) (𝓝 (transportPressure period hs K κ m c hc hpos L hL u v)) := | |
| 136 | + (transportPressure_continuous period hs K κ m c hc hpos L hL).tendsto (u,v) | |
| 137 | + have hpress := hP.comp hpairs | |
| 138 | + have hW5 : Continuous (weightedNorm period (s := s) 5 N ρ) := continuous_weighted_blockNorm period N hN ρ | |
| 139 | + have hleft := (hW5.tendsto _).comp hpress | |
| 140 | + have hW : Continuous (weightedNorm period (s := s+1) 6 N ρ) := continuous_weighted_blockNorm period N (by omega) ρ | |
| 141 | + have hright : Filter.Tendsto (fun n => (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ (U n)*weightedNorm period 6 N ρ (V n)) | |
| 142 | + Filter.atTop (𝓝 ((8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v)) := | |
| 143 | + ((hW.tendsto u |>.comp hU).const_mul (8*M*(5460*lowerProductConstant period 3))).mul (hW.tendsto v |>.comp hV) | |
| 144 | + apply le_of_tendsto_of_tendsto hleft hright | |
| 145 | + apply Filter.Eventually.of_forall | |
| 146 | + intro n | |
| 147 | + obtain ⟨f,hf,hfs,hfL⟩ := smoothApprox_representative_all period n u | |
| 148 | + obtain ⟨g,hg,hgs,hgL⟩ := smoothApprox_representative_all period n v | |
| 149 | + exact transportPressure_lower_smooth period hs K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff | |
| 150 | + L hL (U n) (V n) f g hf hg hfs hgs hfL hgL | |
| 151 | + | |
| 152 | +end EulerGevreyPressureTransport | |
| 153 | +end | |
| 154 | + | |
| 155 | +end | |
| 156 | + | |
| 5 | 157 | noncomputable section |
| 6 | 158 | |
| 7 | 159 | namespace EulerGevreyPressureTransport |
+0 −144 Euler/GevreyPressureTransport.lean deleted
| @@ -1,144 +0,0 @@ | ||
| 1 | -import Euler.GevreyTransportCommutator | |
| 2 | -import Euler.NonlinearPressureLower | |
| 3 | - | |
| 4 | -/-! Cutoff-independent nonlinear pressure bounds for actual finite-Sobolev transport sources. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerGevreyPressureTransport | |
| 9 | - | |
| 10 | -open MeasureTheory InnerProductSpace EulerLiftedGradientSpace EulerCylinderSobolevSpace EulerCylinderSobolev | |
| 11 | - EulerSpatialSobolevInverse EulerMetricTransport EulerH6Pressure EulerPacketWeights | |
| 12 | - EulerSobolevGevreyOperators EulerSobolevTransport EulerSobolevL2Product EulerFunctionalVelocity | |
| 13 | - EulerH6Nonlinear EulerVectorCylinder EulerSobolevTransportCommutator EulerSobolevCoefficientPressure | |
| 14 | - EulerSobolevGevreyProduct EulerSobolevHeat | |
| 15 | -open scoped ContDiff ENNReal Topology | |
| 16 | - | |
| 17 | -variable (period : ℝ) [Fact (0 < period)] | |
| 18 | - | |
| 19 | -local instance pressureTransportGroup (q : ℕ) : NormedAddCommGroup (SobolevSpace period q) := inferInstance | |
| 20 | -local instance pressureTransportSpace (q : ℕ) : NormedSpace ℝ (SobolevSpace period q) := inferInstance | |
| 21 | - | |
| 22 | -/-- Actual coefficient pressure blocks agree with the genuine pressure-jet construction. -/ | |
| 23 | -theorem pressure_block_eq {s q n : ℕ} {A : SmoothCoefficient period} | |
| 24 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 25 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 26 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 27 | - (u : SobolevSpace period s) (h : n+q ≤ s) : | |
| 28 | - blockNorm period (toJet period (pressureSobolevOperator period K κ m c hc hpos u)) q n = | |
| 29 | - blockNorm period ((toJet period u).solvePressure K κ m c hc hpos) q n := | |
| 30 | - blockNorm_unique period _ _ (pressureSobolevOperator_value period K κ m c hc hpos u) h h | |
| 31 | - | |
| 32 | -/-- The actual finite-Sobolev pressure generated by the nonlinear transport source. -/ | |
| 33 | -def transportPressure {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 34 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 35 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 36 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 37 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 38 | - (u v : SobolevSpace period (s+1)) : SobolevSpace period s := | |
| 39 | - pressureSobolevOperator period K κ m c hc hpos (transportBilinear period hs L hL u v) | |
| 40 | - | |
| 41 | -/-- The nonlinear pressure depends continuously on its actual Sobolev velocity inputs. -/ | |
| 42 | -theorem transportPressure_continuous {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 43 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 44 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 45 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 46 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) : | |
| 47 | - Continuous (fun p : SobolevSpace period (s+1) × SobolevSpace period (s+1) => | |
| 48 | - transportPressure period hs K κ m c hc hpos L hL p.1 p.2) := | |
| 49 | - (pressureSobolevOperator period K κ m c hc hpos).continuous.comp (transportBilinear period hs L hL).continuous₂ | |
| 50 | - | |
| 51 | -/-- The four-component lifted velocity bound in a finite weighted norm. -/ | |
| 52 | -theorem velocityMap_weighted_bound (q N : ℕ) (ρ : ℝ) (hρ : 0 < ρ) | |
| 53 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 54 | - (f : LiftDomain period → Vector3) | |
| 55 | - (hf : ∀ x, ContDiff ℝ ∞ (localFieldLift period f x)) | |
| 56 | - (hfL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w f) 2 (liftMeasure period)) : | |
| 57 | - (∑ n ∈ Finset.range (N+1), weight ρ n*wordSobolevNorm period q n (velocityMap L ∘ f)) ≤ | |
| 58 | - 4 * ∑ n ∈ Finset.range (N+1), weight ρ n*wordSobolevNorm period q n f := by | |
| 59 | - rw [Finset.mul_sum] | |
| 60 | - exact Finset.sum_le_sum fun n _ => | |
| 61 | - (mul_le_mul_of_nonneg_left (velocityMap_word_bound period q n L hL f hf hfL) (weight_pos hρ n).le).trans_eq (by ring) | |
| 62 | - | |
| 63 | -/-- The actual unshifted H⁵ nonlinear pressure estimate on smooth Sobolev representatives. -/ | |
| 64 | -theorem transportPressure_lower_smooth {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 65 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 66 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 67 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 68 | - (N : ℕ) (hN : N+5 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 69 | - (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 70 | - (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 71 | - (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 72 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 73 | - (u v : SobolevSpace period (s+1)) (f g : LiftDomain period → Vector3) | |
| 74 | - (hu : (value period u : LiftDomain period → Vector3) =ᵐ[liftMeasure period] f) | |
| 75 | - (hv : (value period v : LiftDomain period → Vector3) =ᵐ[liftMeasure period] g) | |
| 76 | - (hf : ∀ x, ContDiff ℝ ∞ (localFieldLift period f x)) | |
| 77 | - (hg : ∀ x, ContDiff ℝ ∞ (localFieldLift period g x)) | |
| 78 | - (hfL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w f) 2 (liftMeasure period)) | |
| 79 | - (hgL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w g) 2 (liftMeasure period)) : | |
| 80 | - weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 81 | - (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 82 | - let b := velocityMap L ∘ f | |
| 83 | - have hb := postcomp_smooth period (velocityMap L) f hf | |
| 84 | - have hbL : ∀ j, ∀ w : Fin j → Fin 4, MemLp (iteratedFieldDerivative period w b) 2 (liftMeasure period) := | |
| 85 | - fun j w => postcomp_word_memLp period (le_refl j) (velocityMap L) f hf (fun r _ a => hfL r a) w | |
| 86 | - have hp := nonlinear_pressure_lower_bound period K (toJet period (transportBilinear period hs L hL u v)) | |
| 87 | - κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff b g hb hg hbL hgL | |
| 88 | - (transport_ae_velocityMap period hs L hL u v f g hu hv hg) | |
| 89 | - have heq : weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) = | |
| 90 | - ∑ n ∈ Finset.range (N+1), weight ρ n * blockNorm period | |
| 91 | - ((toJet period (transportBilinear period hs L hL u v)).solvePressure K κ m c hc hpos) 5 n := by | |
| 92 | - apply Finset.sum_congr rfl | |
| 93 | - intro n hn | |
| 94 | - exact congrArg (fun a : ℝ => weight ρ n*a) | |
| 95 | - (pressure_block_eq period (q := 5) (n := n) K κ m c hc hpos (transportBilinear period hs L hL u v) | |
| 96 | - (by have := Finset.mem_range.mp hn; omega : n+5 ≤ s)) | |
| 97 | - rw [heq] | |
| 98 | - conv_rhs => rw [weightedNorm_eq_classical period 6 N (by omega) ρ u f hu hf, | |
| 99 | - weightedNorm_eq_classical period 6 N (by omega) ρ v g hv hg] | |
| 100 | - have hcoef : 0 ≤ 2*M*(5460*lowerProductConstant period 3) := by | |
| 101 | - exact mul_nonneg (by linarith) (mul_nonneg (by norm_num) (lowerProductConstant_nonneg period 3)) | |
| 102 | - have hv0 : 0 ≤ ∑ j ∈ Finset.range (N+1), weight ρ j * wordSobolevNorm period 6 j g := | |
| 103 | - Finset.sum_nonneg fun j _ => mul_nonneg (weight_pos hρ j).le (wordSobolevNorm_nonneg period 6 j g) | |
| 104 | - exact hp.trans ((mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left | |
| 105 | - (velocityMap_weighted_bound period 6 N ρ hρ L hL f hf hfL) hcoef) hv0).trans_eq (by ring)) | |
| 106 | - | |
| 107 | -/-- The lower-order nonlinear pressure estimate holds for the actual finite-Sobolev fields used by the solver. -/ | |
| 108 | -theorem transportPressure_lower {s : ℕ} (hs : 6 ≤ s) {A : SmoothCoefficient period} | |
| 109 | - (K : EulerSpatialSobolevInverse.CoefficientJet period standardDirection s A) | |
| 110 | - (κ : ℝ) (m : Vector3) (c : ℝ) (hc : 0 < c) | |
| 111 | - (hpos : ∀ x v, c*‖v‖^2 ≤ ⟪A.coefficient x v,v⟫_ℝ) | |
| 112 | - (N : ℕ) (hN : N+5 ≤ s) (ρ Rc M : ℝ) (hρ : 0 < ρ) (hRc : 0 ≤ Rc) (hM : 1 ≤ M) | |
| 113 | - (hbase : (EulerH6Pressure.CoefficientJet.restrict K 5 (by omega)).pressureConstant c ≤ M) | |
| 114 | - (hsmall : 4*M*(ρ*Rc) ≤ 1) | |
| 115 | - (hcoeff : ∀ l, 1 ≤ l → l ≤ N → coefficientBlock period K 5 l ≤ Rc^l*(l.factorial : ℝ)^2) | |
| 116 | - (L : Fin 4 → Vector3 →L[ℝ] ℝ) (hL : ∀ i, ‖L i‖ ≤ 1) | |
| 117 | - (u v : SobolevSpace period (s+1)) : | |
| 118 | - weightedNorm period 5 N ρ (transportPressure period hs K κ m c hc hpos L hL u v) ≤ | |
| 119 | - (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v := by | |
| 120 | - let U : ℕ → SobolevSpace period (s+1) := fun n => restrictOperator period (by omega : s+1 ≤ s+1+3) (smoothApprox period (s+1) n u) | |
| 121 | - let V : ℕ → SobolevSpace period (s+1) := fun n => restrictOperator period (by omega : s+1 ≤ s+1+3) (smoothApprox period (s+1) n v) | |
| 122 | - have hU : Filter.Tendsto U Filter.atTop (𝓝 u) := smoothApprox_tendsto period u | |
| 123 | - have hV : Filter.Tendsto V Filter.atTop (𝓝 v) := smoothApprox_tendsto period v | |
| 124 | - have hpairs : Filter.Tendsto (fun n => (U n,V n)) Filter.atTop (𝓝 (u,v)) := hU.prodMk_nhds hV | |
| 125 | - have hP : Filter.Tendsto | |
| 126 | - (fun p : SobolevSpace period (s+1) × SobolevSpace period (s+1) => transportPressure period hs K κ m c hc hpos L hL p.1 p.2) | |
| 127 | - (𝓝 (u,v)) (𝓝 (transportPressure period hs K κ m c hc hpos L hL u v)) := | |
| 128 | - (transportPressure_continuous period hs K κ m c hc hpos L hL).tendsto (u,v) | |
| 129 | - have hpress := hP.comp hpairs | |
| 130 | - have hW5 : Continuous (weightedNorm period (s := s) 5 N ρ) := continuous_weighted_blockNorm period N hN ρ | |
| 131 | - have hleft := (hW5.tendsto _).comp hpress | |
| 132 | - have hW : Continuous (weightedNorm period (s := s+1) 6 N ρ) := continuous_weighted_blockNorm period N (by omega) ρ | |
| 133 | - have hright : Filter.Tendsto (fun n => (8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ (U n)*weightedNorm period 6 N ρ (V n)) | |
| 134 | - Filter.atTop (𝓝 ((8*M*(5460*lowerProductConstant period 3))*weightedNorm period 6 N ρ u*weightedNorm period 6 N ρ v)) := | |
| 135 | - ((hW.tendsto u |>.comp hU).const_mul (8*M*(5460*lowerProductConstant period 3))).mul (hW.tendsto v |>.comp hV) | |
| 136 | - apply le_of_tendsto_of_tendsto hleft hright | |
| 137 | - apply Filter.Eventually.of_forall | |
| 138 | - intro n | |
| 139 | - obtain ⟨f,hf,hfs,hfL⟩ := smoothApprox_representative_all period n u | |
| 140 | - obtain ⟨g,hg,hgs,hgL⟩ := smoothApprox_representative_all period n v | |
| 141 | - exact transportPressure_lower_smooth period hs K κ m c hc hpos N hN ρ Rc M hρ hRc hM hbase hsmall hcoeff | |
| 142 | - L hL (U n) (V n) f g hf hg hfs hgs hfL hgL | |
| 143 | - | |
| 144 | -end EulerGevreyPressureTransport | |
+75 −0 docs/s5-folding/ContentTail.lean added View file
| @@ -0,0 +1,75 @@ | ||
| 1 | + | |
| 2 | +-- Every named constant of the two libraries with a hash of its type (and of its value when it is a definition) in which | |
| 3 | +-- an auxiliary constant counts by what it is, not by what it is called: private declarations, nested-proof lemmas, | |
| 4 | +-- matchers and automatically named local instances get their names from the module and from the order of elaboration, | |
| 5 | +-- and a fold changes both. A theorem met inside a term counts by its statement alone. | |
| 6 | +open Lean | |
| 7 | + | |
| 8 | +namespace FoldCheck | |
| 9 | + | |
| 10 | +def isAux (n : Name) : Bool := | |
| 11 | + n.components.any fun c => match c with | |
| 12 | + | .str _ s => s.startsWith "_" || (s.startsWith "match_" && (s.drop 6).all Char.isDigit) || (s.startsWith "proof_" && (s.drop 6).all Char.isDigit) | |
| 13 | + | .num _ _ => true | |
| 14 | + | .anonymous => false | |
| 15 | + | |
| 16 | +def userName (n : Name) : Name := | |
| 17 | + if isPrivateName n then ((n.components.dropWhile fun c => !c.isNum).drop 1).foldl (· ++ ·) `_private else n | |
| 18 | + | |
| 19 | +abbrev M := StateM (Std.HashMap Name UInt64 × Std.HashSet Name) | |
| 20 | + | |
| 21 | +mutual | |
| 22 | + partial def constHash (env : Environment) (n : Name) : M UInt64 := do | |
| 23 | + if let some h := (← get).1[n]? then return h | |
| 24 | + if (← get).2.contains n then return hash (userName n) | |
| 25 | + let some ci := env.find? n | return hash (userName n) | |
| 26 | + modify fun (m, v) => (m, v.insert n) | |
| 27 | + let th ← exprHash env ci.type | |
| 28 | + let (k, vh) ← match ci with | |
| 29 | + | .thmInfo _ => pure ((1 : UInt64), (0 : UInt64)) | |
| 30 | + | .defnInfo d => do pure (2, ← exprHash env d.value) | |
| 31 | + | .opaqueInfo d => do pure (3, ← exprHash env d.value) | |
| 32 | + | .ctorInfo c => pure (4, c.cidx.toUInt64) | |
| 33 | + | .inductInfo _ => pure (5, 0) | |
| 34 | + | .recInfo _ => pure (6, 0) | |
| 35 | + | _ => pure (7, 0) | |
| 36 | + let h := mixHash k (mixHash th vh) | |
| 37 | + modify fun (m, v) => (m.insert n h, v.erase n) | |
| 38 | + return h | |
| 39 | + partial def exprHash (env : Environment) (e : Expr) : M UInt64 := do | |
| 40 | + for u in e.getUsedConstants do | |
| 41 | + if isAux u then discard <| constHash env u | |
| 42 | + let memo := (← get).1 | |
| 43 | + let e' := e.replace fun | |
| 44 | + | .const n ls => if isAux n then some (.const (Name.mkNum `_h (memo.getD n 0).toNat) ls) else none | |
| 45 | + | _ => none | |
| 46 | + return e'.hash | |
| 47 | +end | |
| 48 | + | |
| 49 | +end FoldCheck | |
| 50 | + | |
| 51 | +open FoldCheck in | |
| 52 | +#eval show CoreM Unit from do | |
| 53 | + let env ← getEnv | |
| 54 | + let mods := env.header.moduleNames | |
| 55 | + let proj (m : Name) : Bool := m.getRoot == `NavierStokes || m.getRoot == `Euler | |
| 56 | + let h ← IO.FS.Handle.mk "/out/content.tsv" IO.FS.Mode.write | |
| 57 | + let mut st : Std.HashMap Name UInt64 × Std.HashSet Name := ({}, {}) | |
| 58 | + let mut n := 0 | |
| 59 | + for (c, ci) in env.constants.map₁.toList do | |
| 60 | + let some idx := env.getModuleIdxFor? c | continue | |
| 61 | + unless proj mods[idx.toNat]! do continue | |
| 62 | + if isAux c then continue | |
| 63 | + let (th, st1) := (exprHash env ci.type).run st | |
| 64 | + st := st1 | |
| 65 | + let mut v := "-" | |
| 66 | + match ci with | |
| 67 | + | .defnInfo d => let (vh, st2) := (exprHash env d.value).run st; st := st2; v := toString vh | |
| 68 | + | .opaqueInfo d => let (vh, st2) := (exprHash env d.value).run st; st := st2; v := toString vh | |
| 69 | + | _ => pure () | |
| 70 | + let kind := match ci with | |
| 71 | + | .thmInfo _ => "theorem" | .defnInfo _ => "def" | .axiomInfo _ => "axiom" | .opaqueInfo _ => "opaque" | |
| 72 | + | .inductInfo _ => "inductive" | .ctorInfo _ => "ctor" | .recInfo _ => "rec" | .quotInfo _ => "quot" | |
| 73 | + h.putStrLn s!"{c}\t{kind}\t{th}\t{v}" | |
| 74 | + n := n + 1 | |
| 75 | + IO.println s!"{n} named constants written" | |
+12 −0 docs/s5-folding/README.md View file
| @@ -101,3 +101,15 @@ Each pull request of the series keeps its plan in its route notes (`routes/<bran | ||
| 101 | 101 | ## What this does not show |
| 102 | 102 | |
| 103 | 103 | The wall-clock time of a build on your machine; that every file is now in its best shape for reading (P-8 splits the large ones; nothing here grows past 600 lines). |
| 104 | + | |
| 105 | +## Statements, and the series as it was opened | |
| 106 | + | |
| 107 | +The first pull request of the series was cut from a plan of 582 folds. Before the others were opened, main and the folded tree were both built and every named constant of the two libraries was listed with a hash of its type and, for a definition, of its value (`ContentTail.lean`, after one `import` line a module). In that listing an auxiliary constant inside a term (a private declaration, a nested-proof lemma, an automatically named local instance) counts by what it is, not by its name, and a theorem by its statement: a fold changes the names of such constants and nothing else about them. | |
| 108 | + | |
| 109 | +The first plan did not pass. Of 53,802 named constants, 12 differed. In one, `Euler.ComparatorBridge.compactSolenoidalTests_representation`, the word `divergence` resolved to `Euler.divergence` in the folded file and to `EulerSmoothLimit.divergence` on main: once folded, the text saw more names. The build passed all the same. In the others an instance was found by another path (`NormedCommRing ℂ` through the C⋆-algebra instances, `DistribSMul ℝ` through the semiring), or a proof inside the statement differed. | |
| 110 | + | |
| 111 | +Two changes followed. `fold.py` now puts a folded module's imports where its import line stood, so that every other module is loaded in the order it was loaded before (a plan file says which way it was cut, and `check` follows it, so the first pull request still checks). And five files keep their modules: `Euler/CompactProjectedEulerLaw.lean`, `Euler/CylinderJetLpAlgebra.lean`, `Euler/MeanCutoffDifferenceBound.lean`, `NavierStokes/R3/CompactEnergy.lean`, `NavierStokes/R3/PressureRecovery.lean`. | |
| 112 | + | |
| 113 | +The series as opened is 575 folds into 338 files. On it the two listings are equal: 53,802 named constants, none missing, none with another type or value; the first pull request's twelve folds were checked alone and are equal too. The whole tree goes from 54.73 T instructions over 2,587 files to 50.97 T over 2,012 (−6.9%), in place of the figures at the top of this page. | |
| 114 | + | |
| 115 | +What the listing does not show: that two terms with different hashes mean different things (the twelve were read one by one), or anything about proofs, which are not listed. | |
+30 −11 docs/s5-folding/fold.py View file
| @@ -111,11 +111,21 @@ def plan(src, small, cap, skip=()): | ||
| 111 | 111 | return {a: p for a, p in parts.items() if len(p) > 1} |
| 112 | 112 | |
| 113 | 113 | |
| 114 | -def folded(src, host, parts): | |
| 115 | - """the host's new text""" | |
| 114 | +def folded(src, host, parts, inplace=False): | |
| 115 | + """the host's new text. `inplace`: a folded module's import line is replaced, where it stood, by that module's own | |
| 116 | + imports, so that every other module is loaded in the order it was loaded before (Lean breaks ties between instances | |
| 117 | + by that order); otherwise the folded modules' imports come after the host's own.""" | |
| 116 | 118 | head, mods, body = split(src[host]) |
| 117 | - inside = {module(p) for p in parts} | |
| 118 | - new = [m for m in mods if m not in inside] | |
| 119 | + inside = {module(p): p for p in parts[:-1]} | |
| 120 | + if inplace: | |
| 121 | + new = [] | |
| 122 | + def take(ms): | |
| 123 | + for m in ms: | |
| 124 | + if m in inside: take(split(src[inside[m]])[1]) | |
| 125 | + elif m not in new: new.append(m) | |
| 126 | + take(mods) | |
| 127 | + else: | |
| 128 | + new = [m for m in mods if m not in inside] | |
| 119 | 129 | out_parts = [] |
| 120 | 130 | for p in parts[:-1]: |
| 121 | 131 | h, pm, pb = split(src[p]) |
| @@ -141,10 +151,16 @@ def folded(src, host, parts): | ||
| 141 | 151 | return "\n".join(out + body) |
| 142 | 152 | |
| 143 | 153 | |
| 144 | -def apply(tree, pl): | |
| 154 | +def load(path): | |
| 155 | + """(the folds, whether imports go in place) of a plan file; the first plans were a bare table of folds""" | |
| 156 | + d = json.load(open(path)) | |
| 157 | + return (d["folds"], d.get("imports") == "in place") if "folds" in d else (d, False) | |
| 158 | + | |
| 159 | + | |
| 160 | +def apply(tree, pl, inplace=False): | |
| 145 | 161 | src = read_tree(tree) |
| 146 | 162 | for host, parts in pl.items(): |
| 147 | - text = folded(src, host, parts) | |
| 163 | + text = folded(src, host, parts, inplace) | |
| 148 | 164 | # every line of every folded file and of the host is still there (imports aside) |
| 149 | 165 | want = collections.Counter(l for p in parts for l in (lambda s: s[0] + s[2])(split(src[p])) if l.strip()) |
| 150 | 166 | have = collections.Counter(l for l in text.split("\n") if l.strip() and not IMPORT.match(l)) |
| @@ -153,12 +169,12 @@ def apply(tree, pl): | ||
| 153 | 169 | for p in parts[:-1]: os.remove(os.path.join(tree, p)) |
| 154 | 170 | |
| 155 | 171 | |
| 156 | -def check(repo, pl, rev): | |
| 172 | +def check(repo, pl, rev, inplace=False): | |
| 157 | 173 | """the working tree against what `apply` makes of the revision's text: every changed file, byte for byte""" |
| 158 | 174 | show = lambda f: subprocess.run(["git", "-C", repo, "show", f"{rev}:{f}"], capture_output=True, text=True, check=True).stdout |
| 159 | 175 | bad = [] |
| 160 | 176 | for host, parts in pl.items(): |
| 161 | - want = folded({p: show(p) for p in parts}, host, parts) | |
| 177 | + want = folded({p: show(p) for p in parts}, host, parts, inplace) | |
| 162 | 178 | path = os.path.join(repo, host) |
| 163 | 179 | if not os.path.exists(path) or open(path, encoding="utf-8").read() != want: bad.append(f"{host} is not {rev}'s text folded") |
| 164 | 180 | bad += [f"{p} is still there" for p in parts[:-1] if os.path.exists(os.path.join(repo, p))] |
| @@ -178,6 +194,9 @@ def self_test(): | ||
| 178 | 194 | assert t.startswith("import Mathlib.X\nimport Euler.Bar\nimport Mathlib.Y\n\n/-! # A -/\n"), t |
| 179 | 195 | assert "end Euler.B\nend\n\nend\n" in t and t.index("theorem c") < t.index("theorem b") < t.index("theorem a"), t |
| 180 | 196 | assert unclosed(src["Euler/FooB.lean"].split("\n")) == [("section", ""), ("namespace", "Euler.B")] |
| 197 | + t2 = folded(src, "Euler/FooA.lean", pl["Euler/FooA.lean"], inplace=True) | |
| 198 | + assert t2.startswith("import Mathlib.X\nimport Mathlib.Y\nimport Euler.Bar\n\n/-! # A -/\n"), t2 | |
| 199 | + assert t2.split("\n\n", 1)[1] == t.split("\n\n", 1)[1] | |
| 181 | 200 | assert plan(src, 100, 1000, skip={"Euler/FooB.lean"}) == {} |
| 182 | 201 | assert plan(src, 2, 1000) == {}, plan(src, 2, 1000) |
| 183 | 202 | print("ok") |
| @@ -191,10 +210,10 @@ if __name__ == "__main__": | ||
| 191 | 210 | src = read_tree(a[1]) |
| 192 | 211 | skip = set(open(opt("--skip", "")).read().split()) if "--skip" in a else set() |
| 193 | 212 | pl = plan(src, int(opt("--small", 200)), int(opt("--cap", 600)), skip) |
| 194 | - json.dump(pl, open(a[2], "w"), indent=0) | |
| 213 | + json.dump({"imports": "in place", "folds": pl}, open(a[2], "w"), indent=0) | |
| 195 | 214 | n = sum(len(p) - 1 for p in pl.values()) |
| 196 | 215 | print(f"folds: {n} modules into {len(pl)} files in {len({fam(h) for h in pl})} families; largest file after: {max((sum(src[p].count(chr(10)) for p in ps), h) for h, ps in pl.items()) if pl else None}") |
| 197 | 216 | elif a[0] == "check": |
| 198 | - sys.exit(check(a[1], json.load(open(a[2])), a[3] if len(a) > 3 else "origin/main")) | |
| 217 | + pl, inplace = load(a[2]); sys.exit(check(a[1], pl, a[3] if len(a) > 3 else "origin/main", inplace)) | |
| 199 | 218 | elif a[0] == "apply": |
| 200 | - pl = json.load(open(a[2])); apply(a[1], pl); print("applied", sum(len(p) - 1 for p in pl.values()), "folds") | |
| 219 | + pl, inplace = load(a[2]); apply(a[1], pl, inplace); print("applied", sum(len(p) - 1 for p in pl.values()), "folds") | |
+11 −0 routes/s5-euler-gevrey-1/README.md added View file
| @@ -0,0 +1,11 @@ | ||
| 1 | +--- | |
| 2 | +issue: 14 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s5-euler-gevrey-1 | |
| 6 | + | |
| 7 | +One unit of S-5 (#14): the `Euler/Gevrey*` family. Eleven small modules that exactly one file each imported are folded, text unchanged, into that file: `GevreyEnergyPathLimit.lean` takes two, `GevreyGeneratingComposition.lean` two, and the other seven one each. `plan.json` is here; the tool that does the fold and its pages are in `docs/s5-folding`. | |
| 8 | + | |
| 9 | +## Next | |
| 10 | + | |
| 11 | +The pull request is open. What comes next is the maintainer's verdict on whether this kind of change is wanted; the rest of the series' folds wait on it, one family per pull request. | |
+43 −0 routes/s5-euler-gevrey-1/plan.json added View file
| @@ -0,0 +1,43 @@ | ||
| 1 | +{ | |
| 2 | +"imports": "in place", | |
| 3 | +"folds": { | |
| 4 | +"Euler/GevreyCorrectionForcing.lean": [ | |
| 5 | +"Euler/GevreyPressureComplete.lean", | |
| 6 | +"Euler/GevreyCorrectionForcing.lean" | |
| 7 | +], | |
| 8 | +"Euler/GevreyEnergyPathLimit.lean": [ | |
| 9 | +"Euler/GevreyEnergyLimit.lean", | |
| 10 | +"Euler/GevreyEnergyCutoff.lean", | |
| 11 | +"Euler/GevreyEnergyPathLimit.lean" | |
| 12 | +], | |
| 13 | +"Euler/GevreyFlowLpIntegration.lean": [ | |
| 14 | +"Euler/GevreyJetCompositionLp.lean", | |
| 15 | +"Euler/GevreyFlowLpIntegration.lean" | |
| 16 | +], | |
| 17 | +"Euler/GevreyForcingComponents.lean": [ | |
| 18 | +"Euler/GevreyBaseTransport.lean", | |
| 19 | +"Euler/GevreyForcingComponents.lean" | |
| 20 | +], | |
| 21 | +"Euler/GevreyGeneratingComposition.lean": [ | |
| 22 | +"Euler/GevreyGeneratingAlgebra.lean", | |
| 23 | +"Euler/GevreyFlowBootstrap.lean", | |
| 24 | +"Euler/GevreyGeneratingComposition.lean" | |
| 25 | +], | |
| 26 | +"Euler/GevreyInverseMap.lean": [ | |
| 27 | +"Euler/GevreyInversePartitions.lean", | |
| 28 | +"Euler/GevreyInverseMap.lean" | |
| 29 | +], | |
| 30 | +"Euler/GevreyLowNorms.lean": [ | |
| 31 | +"Euler/GevreyMetricComparison.lean", | |
| 32 | +"Euler/GevreyLowNorms.lean" | |
| 33 | +], | |
| 34 | +"Euler/GevreyPathNorm.lean": [ | |
| 35 | +"Euler/GevreyContinuationNorm.lean", | |
| 36 | +"Euler/GevreyPathNorm.lean" | |
| 37 | +], | |
| 38 | +"Euler/GevreyPressureShifted.lean": [ | |
| 39 | +"Euler/GevreyPressureTransport.lean", | |
| 40 | +"Euler/GevreyPressureShifted.lean" | |
| 41 | +] | |
| 42 | +} | |
| 43 | +} | |