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

| 1 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/DeTurckTameCompositionNative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Analysis.Parabolic.Quasilinear.Euclidean.Mollification |
| 6 | import PoincareLib.Analysis.Parabolic.Quasilinear.Localization.DirectionalProduct |
| 7 | import Mathlib.Analysis.Convolution |
| 8 | import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm |
| 9 | |
| 10 | /-! |
| 11 | # Fixed lower-order product bounds for the native DeTurck residual |
| 12 | |
| 13 | The nonnegative convolution estimate is proved from weighted variance |
| 14 | and Fubini. Native ordered derivatives satisfy an exact product expansion, |
| 15 | which gives a concrete lower-sup/higher-L2 estimate without commuting fields. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option maxHeartbeats 1400000 |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | noncomputable section |
| 23 | |
| 24 | open MeasureTheory Set Filter |
| 25 | open scoped Topology Convolution |
| 26 | open scoped Manifold ContDiff Bundle |
| 27 | |
| 28 | namespace PoincareMT.DeTurckTameCompositionNative |
| 29 | |
| 30 | variable {n : ℕ} |
| 31 | |
| 32 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 33 | |
| 34 | /-- Weighted Cauchy-Schwarz with the actual, possibly zero, weight mass. -/ |
| 35 | theorem weighted_integral_sq_le_mass {α : Type*} [MeasurableSpace α] {μ : Measure α} |
| 36 | {w q : α → ℝ} (hw : Integrable w μ) (hwq : Integrable (fun x => w x * q x) μ) |
| 37 | (hwq2 : Integrable (fun x => w x * q x ^ 2) μ) (hw0 : ∀ x, 0 ≤ w x) : |
| 38 | (∫ x, w x * q x ∂μ) ^ 2 ≤ (∫ x, w x ∂μ) * ∫ x, w x * q x ^ 2 ∂μ := by |
| 39 | let m := ∫ x, w x ∂μ |
| 40 | have hm0 : 0 ≤ m := integral_nonneg hw0 |
| 41 | by_cases hm : m = 0 |
| 42 | · have hwz : w =ᵐ[μ] 0 := (integral_eq_zero_iff_of_nonneg hw0 hw).mp hm |
| 43 | have hwqz : (∫ x, w x * q x ∂μ) = 0 := by |
| 44 | apply integral_eq_zero_of_ae |
| 45 | filter_upwards [hwz] with x hx |
| 46 | simp only [hx, Pi.zero_apply, zero_mul] |
| 47 | rw [hwqz] |
| 48 | change (0 : ℝ) ^ 2 ≤ m * _ |
| 49 | simp only [hm, zero_pow (by omega : 2 ≠ 0), zero_mul, le_refl] |
| 50 | · have hmp : 0 < m := lt_of_le_of_ne hm0 (Ne.symm hm) |
| 51 | have hnorm : ∫ x, m⁻¹ * w x ∂μ = 1 := by |
| 52 | rw [integral_const_mul] |
| 53 | exact inv_mul_cancel₀ hm |
| 54 | have hq : Integrable (fun x => (m⁻¹ * w x) * q x) μ := by |
| 55 | simpa only [mul_assoc] using hwq.const_mul m⁻¹ |
| 56 | have hq2 : Integrable (fun x => (m⁻¹ * w x) * q x ^ 2) μ := by |
| 57 | simpa only [mul_assoc] using hwq2.const_mul m⁻¹ |
| 58 | have h := EuclideanMollificationNative.weighted_integral_sq_le |
| 59 | (hw.const_mul m⁻¹) hq hq2 |
| 60 | (fun x => mul_nonneg (inv_nonneg.mpr hm0) (hw0 x)) hnorm |
| 61 | simp only [mul_assoc, integral_const_mul] at h |
| 62 | have hmul := mul_le_mul_of_nonneg_left h (sq_nonneg m) |
| 63 | have hleft (a : ℝ) : m ^ 2 * (m⁻¹ * a) ^ 2 = a ^ 2 := by |
| 64 | field_simp [hm] |
| 65 | have hright (b : ℝ) : m ^ 2 * (m⁻¹ * b) = m * b := by |
| 66 | field_simp [hm] |
| 67 | rw [hleft, hright] at hmul |
| 68 | exact hmul |
| 69 | |
| 70 | def convolutionEnvelope (a b : E → ℝ) (x : E) : ℝ := |
| 71 | ∫ y, a y * b (x - y) |
| 72 | |
| 73 | theorem convolutionEnvelope_nonneg {a b : E → ℝ} |
| 74 | (ha0 : ∀ x, 0 ≤ a x) (hb0 : ∀ x, 0 ≤ b x) (x : E) : |
| 75 | 0 ≤ convolutionEnvelope a b x := |
| 76 | integral_nonneg (fun y => mul_nonneg (ha0 y) (hb0 (x - y))) |
| 77 | |
| 78 | theorem continuous_convolutionEnvelope {a b : E → ℝ} |
| 79 | (ha : Integrable a volume) (hb : Continuous b) |
| 80 | (hbdd : BddAbove (range (fun x => ‖b x‖))) : |
| 81 | Continuous (convolutionEnvelope a b) := |
| 82 | BddAbove.continuous_convolution_right_of_integrable |
| 83 | (ContinuousLinearMap.mul ℝ ℝ) hbdd ha hb |
| 84 | |
| 85 | theorem integrable_convolutionEnvelope_integrand {a b : E → ℝ} |
| 86 | (ha : Integrable a volume) (hb : Continuous b) |
| 87 | (hbdd : BddAbove (range (fun x => ‖b x‖))) (x : E) : |
| 88 | Integrable (fun y => a y * b (x - y)) volume := by |
| 89 | rcases hbdd with ⟨C, hC⟩ |
| 90 | apply ha.mul_bdd (hb.comp (continuous_const.sub continuous_id)).aestronglyMeasurable |
| 91 | exact Eventually.of_forall (fun y => hC (mem_range_self (x - y))) |
| 92 | |
| 93 | theorem bddAbove_sq {b : E → ℝ} (hbdd : BddAbove (range (fun x => ‖b x‖))) : |
| 94 | BddAbove (range (fun x => ‖b x ^ 2‖)) := by |
| 95 | rcases hbdd with ⟨C, hC⟩ |
| 96 | refine ⟨C ^ 2, ?_⟩ |
| 97 | rintro _ ⟨x, rfl⟩ |
| 98 | change ‖b x ^ 2‖ ≤ C ^ 2 |
| 99 | rw [norm_pow] |
| 100 | exact pow_le_pow_left₀ (norm_nonneg _) (hC (mem_range_self x)) 2 |
| 101 | |
| 102 | theorem convolutionEnvelope_sq_le {a b : E → ℝ} |
| 103 | (ha : Integrable a volume) (ha0 : ∀ x, 0 ≤ a x) |
| 104 | (hb : Continuous b) (hbdd : BddAbove (range (fun x => ‖b x‖))) (x : E) : |
| 105 | convolutionEnvelope a b x ^ 2 ≤ |
| 106 | (∫ y, a y) * ∫ y, a y * b (x - y) ^ 2 := |
| 107 | weighted_integral_sq_le_mass ha |
| 108 | (integrable_convolutionEnvelope_integrand ha hb hbdd x) |
| 109 | (integrable_convolutionEnvelope_integrand ha (hb.pow 2) (bddAbove_sq hbdd) x) ha0 |
| 110 | |
| 111 | theorem integrable_convolutionEnvelope_sq_integrand {a b : E → ℝ} |
| 112 | (ha : Integrable a volume) (hb2 : Integrable (fun x => b x ^ 2) volume) : |
| 113 | Integrable (fun p : E × E => a p.2 * b (p.1 - p.2) ^ 2) |
| 114 | (volume.prod volume) := |
| 115 | ha.convolution_integrand (ContinuousLinearMap.mul ℝ ℝ) hb2 |
| 116 | |
| 117 | /-- Product integrability is established before the order of integration changes. -/ |
| 118 | theorem integrable_convolutionEnvelope_sq {a b : E → ℝ} |
| 119 | (ha : Integrable a volume) (ha0 : ∀ x, 0 ≤ a x) |
| 120 | (hb : Continuous b) (hbdd : BddAbove (range (fun x => ‖b x‖))) |
| 121 | (hb2 : Integrable (fun x => b x ^ 2) volume) : |
| 122 | Integrable (fun x => convolutionEnvelope a b x ^ 2) volume := by |
| 123 | apply ((integrable_convolutionEnvelope_sq_integrand ha hb2).integral_prod_left.const_mul |
| 124 | (∫ y, a y)).mono' ((continuous_convolutionEnvelope ha hb hbdd).pow 2).aestronglyMeasurable |
| 125 | apply Eventually.of_forall |
| 126 | intro x |
| 127 | rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] |
| 128 | exact convolutionEnvelope_sq_le ha ha0 hb hbdd x |
| 129 | |
| 130 | theorem integral_convolutionEnvelope_sq_le {a b : E → ℝ} |
| 131 | (ha : Integrable a volume) (ha0 : ∀ x, 0 ≤ a x) |
| 132 | (hb : Continuous b) (hbdd : BddAbove (range (fun x => ‖b x‖))) |
| 133 | (hb2 : Integrable (fun x => b x ^ 2) volume) : |
| 134 | (∫ x, convolutionEnvelope a b x ^ 2) ≤ (∫ y, a y) ^ 2 * ∫ x, b x ^ 2 := by |
| 135 | have hp := integrable_convolutionEnvelope_sq_integrand ha hb2 |
| 136 | calc |
| 137 | _ ≤ ∫ x, (∫ y, a y) * ∫ y, a y * b (x - y) ^ 2 := |
| 138 | integral_mono (integrable_convolutionEnvelope_sq ha ha0 hb hbdd hb2) |
| 139 | (hp.integral_prod_left.const_mul _) (convolutionEnvelope_sq_le ha ha0 hb hbdd) |
| 140 | _ = (∫ y, a y) * ∫ y, ∫ x, a y * b (x - y) ^ 2 := by |
| 141 | rw [integral_const_mul, integral_integral_swap hp] |
| 142 | _ = (∫ y, a y) ^ 2 * ∫ x, b x ^ 2 := by |
| 143 | simp_rw [integral_const_mul, integral_sub_right_eq_self (fun x => b x ^ 2)] |
| 144 | rw [integral_mul_const] |
| 145 | ring |
| 146 | |
| 147 | theorem memLp_convolutionEnvelope {a b : E → ℝ} |
| 148 | (ha : Integrable a volume) (ha0 : ∀ x, 0 ≤ a x) |
| 149 | (hb : Continuous b) (hbdd : BddAbove (range (fun x => ‖b x‖))) |
| 150 | (hb2 : MemLp b 2 volume) : MemLp (convolutionEnvelope a b) 2 volume := |
| 151 | (memLp_two_iff_integrable_sq |
| 152 | (continuous_convolutionEnvelope ha hb hbdd).aestronglyMeasurable).mpr |
| 153 | (integrable_convolutionEnvelope_sq ha ha0 hb hbdd hb2.integrable_sq) |
| 154 | |
| 155 | /-- The L1-L2 convolution bound has constant one. -/ |
| 156 | theorem norm_convolutionEnvelope_le {a b : E → ℝ} |
| 157 | (ha : Integrable a volume) (ha0 : ∀ x, 0 ≤ a x) |
| 158 | (hb : Continuous b) (hbdd : BddAbove (range (fun x => ‖b x‖))) |
| 159 | (hb2 : MemLp b 2 volume) : |
| 160 | ‖(memLp_convolutionEnvelope ha ha0 hb hbdd hb2).toLp (convolutionEnvelope a b)‖ ≤ |
| 161 | (∫ y, a y) * ‖hb2.toLp b‖ := by |
| 162 | apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (integral_nonneg ha0) (norm_nonneg _))).mp |
| 163 | rw [mul_pow, EuclideanTranslationNative.scalar_toLp_norm_sq, |
| 164 | EuclideanTranslationNative.scalar_toLp_norm_sq] |
| 165 | exact integral_convolutionEnvelope_sq_le ha ha0 hb hbdd hb2.integrable_sq |
| 166 | |
| 167 | section NativeProducts |
| 168 | |
| 169 | open TensorProbeNative |
| 170 | |
| 171 | variable {M : Type*} [TopologicalSpace M] |
| 172 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 173 | {iota : Type*} [Fintype iota] |
| 174 | |
| 175 | /-- All ordered allocations of the derivatives between the two factors. -/ |
| 176 | def splitDirectionalWord : List iota → List (List iota × List iota) |
| 177 | | [] => [([], [])] |
| 178 | | i :: w => |
| 179 | (splitDirectionalWord w).map (fun p => (i :: p.1, p.2)) ++ |
| 180 | (splitDirectionalWord w).map (fun p => (p.1, i :: p.2)) |
| 181 | |
| 182 | theorem splitDirectionalWord_length (w : List iota) : |
| 183 | (splitDirectionalWord w).length = 2 ^ w.length := by |
| 184 | induction w with |
| 185 | | nil => simp [splitDirectionalWord] |
| 186 | | cons i w ih => simp [splitDirectionalWord, ih, pow_succ, Nat.mul_two] |
| 187 | |
| 188 | theorem splitDirectionalWord_order (w : List iota) (p : List iota × List iota) |
| 189 | (hp : p ∈ splitDirectionalWord w) : p.1.length + p.2.length = w.length := by |
| 190 | induction w generalizing p with |
| 191 | | nil => |
| 192 | simp only [splitDirectionalWord, List.mem_singleton] at hp |
| 193 | subst p |
| 194 | rfl |
| 195 | | cons i w ih => |
| 196 | rcases List.mem_append.mp hp with hp | hp |
| 197 | · obtain ⟨q, hq, rfl⟩ := List.mem_map.mp hp |
| 198 | have h := ih q hq |
| 199 | simp only [List.length_cons] |
| 200 | omega |
| 201 | · obtain ⟨q, hq, rfl⟩ := List.mem_map.mp hp |
| 202 | have h := ih q hq |
| 203 | simp only [List.length_cons] |
| 204 | omega |
| 205 | |
| 206 | private theorem contMDiff_list_sum {jota : Type*} (l : List jota) (f : jota → M → ℝ) |
| 207 | (hf : ∀ j ∈ l, ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (f j)) : |
| 208 | ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (fun x => (l.map (fun j => f j x)).sum) := by |
| 209 | induction l with |
| 210 | | nil => simpa only [List.map_nil, List.sum_nil] using (contMDiff_const (c := (0 : ℝ))) |
| 211 | | cons j l ih => |
| 212 | simp only [List.map_cons, List.sum_cons] |
| 213 | exact (hf j (List.mem_cons_self)).add (ih (fun k hk => hf k (List.mem_cons_of_mem j hk))) |
| 214 | |
| 215 | private theorem scalarDirectional_list_sum {jota : Type*} (l : List jota) |
| 216 | (V : SmoothField (n := n) (M := M)) (f : jota → M → ℝ) |
| 217 | (hf : ∀ j ∈ l, ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (f j)) (x : M) : |
| 218 | scalarDirectional V (fun y => (l.map (fun j => f j y)).sum) x = |
| 219 | (l.map (fun j => scalarDirectional V (f j) x)).sum := by |
| 220 | induction l with |
| 221 | | nil => |
| 222 | change mfderiv (𝓡 n) 𝓘(ℝ, ℝ) (fun _ : M => (0 : ℝ)) x (V x) = 0 |
| 223 | rw [mfderiv_const, ContinuousLinearMap.zero_apply] |
| 224 | | cons j l ih => |
| 225 | have hj := (hf j List.mem_cons_self).mdifferentiable (by simp) x |
| 226 | have htail := contMDiff_list_sum l f (fun k hk => hf k (List.mem_cons_of_mem j hk)) |
| 227 | have hd := congrArg (fun A : TangentSpace (𝓡 n) x →L[ℝ] ℝ => A (V x)) |
| 228 | (mfderiv_add hj (htail.mdifferentiable (by simp) x)) |
| 229 | simp only [List.map_cons, List.sum_cons] |
| 230 | change scalarDirectional V (fun y => f j y + (l.map (fun k => f k y)).sum) x = _ |
| 231 | change scalarDirectional V (fun y => f j y + (l.map (fun k => f k y)).sum) x = |
| 232 | scalarDirectional V (f j) x + scalarDirectional V |
| 233 | (fun y => (l.map (fun k => f k y)).sum) x at hd |
| 234 | rw [hd, ih (fun k hk => hf k (List.mem_cons_of_mem j hk))] |
| 235 | |
| 236 | /-- Leibniz expansion in the actual ordered native fields, without commuting them. -/ |
| 237 | theorem directionalWord_mul (F : iota → SmoothField (n := n) (M := M)) |
| 238 | (w : List iota) {f g : M → ℝ} |
| 239 | (hf : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ f) |
| 240 | (hg : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ g) (x : M) : |
| 241 | directionalWord F w (fun y => f y * g y) x = |
| 242 | ((splitDirectionalWord w).map |
| 243 | (fun p => directionalWord F p.1 f x * directionalWord F p.2 g x)).sum := by |
| 244 | induction w generalizing x with |
| 245 | | nil => simp [splitDirectionalWord] |
| 246 | | cons i w ih => |
| 247 | have heq : directionalWord F w (fun y => f y * g y) = |
| 248 | fun y => ((splitDirectionalWord w).map |
| 249 | (fun p => directionalWord F p.1 f y * directionalWord F p.2 g y)).sum := |
| 250 | funext ih |
| 251 | rw [directionalWord_cons, heq, scalarDirectional_list_sum] |
| 252 | · simp only [splitDirectionalWord, List.map_append, List.sum_append, |
| 253 | List.map_map, Function.comp_def, directionalWord_cons, ← List.sum_map_add] |
| 254 | congr 1 |
| 255 | apply List.map_congr_left |
| 256 | intro p _ |
| 257 | rw [scalarDirectional_mul (F i) |
| 258 | ((directionalWord_contMDiff F p.1 hf).mdifferentiable (by simp) x) |
| 259 | ((directionalWord_contMDiff F p.2 hg).mdifferentiable (by simp) x)] |
| 260 | ring |
| 261 | · intro p _ |
| 262 | exact (directionalWord_contMDiff F p.1 hf).mul (directionalWord_contMDiff F p.2 hg) |
| 263 | |
| 264 | variable [CompactSpace M] [MeasurableSpace M] [BorelSpace M] |
| 265 | (μ : Measure M) [IsFiniteMeasure μ] |
| 266 | |
| 267 | private theorem memLp_of_continuous {f : M → ℝ} (hf : Continuous f) : MemLp f 2 μ := |
| 268 | ContinuousMap.memLp (p := 2) (μ := μ) ℝ (⟨f, hf⟩ : C(M, ℝ)) |
| 269 | |
| 270 | private theorem lpNorm_mul_le_of_sup {f g : M → ℝ} |
| 271 | (hf : Continuous f) (hg : Continuous g) {a : ℝ} (ha : 0 ≤ a) |
| 272 | (hb : ∀ x, ‖f x‖ ≤ a) : |
| 273 | lpNorm (fun x => f x * g x) 2 μ ≤ a * lpNorm g 2 μ := by |
| 274 | have hdom : MemLp (fun x => a * ‖g x‖) 2 μ := (memLp_of_continuous μ hg).norm.const_mul a |
| 275 | calc |
| 276 | _ ≤ lpNorm (fun x => a * ‖g x‖) 2 μ := by |
| 277 | apply lpNorm_mono_real hdom |
| 278 | intro x |
| 279 | rw [norm_mul] |
| 280 | exact mul_le_mul_of_nonneg_right (hb x) (norm_nonneg _) |
| 281 | _ = a * lpNorm g 2 μ := by |
| 282 | have heq : (fun x => a * ‖g x‖) = a • (fun x => ‖g x‖) := rfl |
| 283 | rw [heq, lpNorm_const_smul, lpNorm_norm hg.aestronglyMeasurable] |
| 284 | simp only [coe_nnnorm, Real.norm_eq_abs, abs_of_nonneg ha] |
| 285 | |
| 286 | private theorem lpNorm_list_sum_le {jota : Type*} (l : List jota) (f : jota → M → ℝ) |
| 287 | (hf : ∀ j ∈ l, Continuous (f j)) : |
| 288 | lpNorm (fun x => (l.map (fun j => f j x)).sum) 2 μ ≤ |
| 289 | (l.map (fun j => lpNorm (f j) 2 μ)).sum := by |
| 290 | induction l with |
| 291 | | nil => simp |
| 292 | | cons j l ih => |
| 293 | simp only [List.map_cons, List.sum_cons] |
| 294 | exact (lpNorm_add_le (memLp_of_continuous μ (hf j List.mem_cons_self)) |
| 295 | (by norm_num : (1 : ENNReal) ≤ 2)).trans |
| 296 | (add_le_add_right (ih (fun k hk => hf k (List.mem_cons_of_mem j hk))) _) |
| 297 | |
| 298 | /-- The finite-order native derivative product uses only the lower factor in |
| 299 | the sup norm. All L2 terms are the actual directional derivatives. -/ |
| 300 | theorem lpNorm_directionalWord_mul_le |
| 301 | (F : iota → SmoothField (n := n) (M := M)) (k : ℕ) (w : List iota) |
| 302 | (hw : w.length ≤ k) {f g : M → ℝ} |
| 303 | (hf : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ f) |
| 304 | (hg : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ g) |
| 305 | {a b A B : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hA : 0 ≤ A) (hB : 0 ≤ B) |
| 306 | (hfLow : ∀ v : List iota, v.length ≤ k / 2 → ∀ x, ‖directionalWord F v f x‖ ≤ a) |
| 307 | (hgLow : ∀ v : List iota, v.length ≤ k / 2 → ∀ x, ‖directionalWord F v g x‖ ≤ b) |
| 308 | (hfHigh : ∀ v : List iota, v.length ≤ k → lpNorm (directionalWord F v f) 2 μ ≤ A) |
| 309 | (hgHigh : ∀ v : List iota, v.length ≤ k → lpNorm (directionalWord F v g) 2 μ ≤ B) : |
| 310 | lpNorm (directionalWord F w (fun x => f x * g x)) 2 μ ≤ |
| 311 | (2 : ℝ) ^ w.length * (a * B + b * A) := by |
| 312 | have heq : directionalWord F w (fun x => f x * g x) = |
| 313 | fun x => ((splitDirectionalWord w).map |
| 314 | (fun p => directionalWord F p.1 f x * directionalWord F p.2 g x)).sum := |
| 315 | funext (directionalWord_mul F w hf hg) |
| 316 | rw [heq] |
| 317 | apply (lpNorm_list_sum_le μ (splitDirectionalWord w) |
| 318 | (fun p x => directionalWord F p.1 f x * directionalWord F p.2 g x) |
| 319 | (fun p _ => (directionalWord_contMDiff F p.1 hf).continuous.mul |
| 320 | (directionalWord_contMDiff F p.2 hg).continuous)).trans |
| 321 | have hterm (p : List iota × List iota) (hp : p ∈ splitDirectionalWord w) : |
| 322 | lpNorm (fun x => directionalWord F p.1 f x * directionalWord F p.2 g x) 2 μ ≤ |
| 323 | a * B + b * A := by |
| 324 | have hlength := splitDirectionalWord_order w p hp |
| 325 | by_cases hleft : p.1.length ≤ k / 2 |
| 326 | · apply ((lpNorm_mul_le_of_sup μ (directionalWord_contMDiff F p.1 hf).continuous |
| 327 | (directionalWord_contMDiff F p.2 hg).continuous ha (hfLow p.1 hleft)).trans |
| 328 | (mul_le_mul_of_nonneg_left (hgHigh p.2 (by omega)) ha)).trans |
| 329 | exact le_add_of_nonneg_right (mul_nonneg hb hA) |
| 330 | · have hright : p.2.length ≤ k / 2 := by omega |
| 331 | have hcomm : (fun x => directionalWord F p.1 f x * directionalWord F p.2 g x) = |
| 332 | (fun x => directionalWord F p.2 g x * directionalWord F p.1 f x) := by |
| 333 | funext x |
| 334 | ring |
| 335 | rw [hcomm] |
| 336 | apply ((lpNorm_mul_le_of_sup μ (directionalWord_contMDiff F p.2 hg).continuous |
| 337 | (directionalWord_contMDiff F p.1 hf).continuous hb (hgLow p.2 hright)).trans |
| 338 | (mul_le_mul_of_nonneg_left (hfHigh p.1 (by omega)) hb)).trans |
| 339 | exact le_add_of_nonneg_left (mul_nonneg ha hB) |
| 340 | calc |
| 341 | _ ≤ ((splitDirectionalWord w).map (fun _ => a * B + b * A)).sum := |
| 342 | List.sum_le_sum hterm |
| 343 | _ = (2 : ℝ) ^ w.length * (a * B + b * A) := by |
| 344 | have hconst (l : List (List iota × List iota)) : |
| 345 | (l.map (fun _ => a * B + b * A)).sum = (l.length : ℝ) * (a * B + b * A) := by |
| 346 | induction l with |
| 347 | | nil => simp |
| 348 | | cons p l ih => |
| 349 | simp only [List.map_cons, List.sum_cons, List.length_cons, Nat.cast_add, Nat.cast_one, ih] |
| 350 | ring |
| 351 | rw [hconst, splitDirectionalWord_length, Nat.cast_pow, Nat.cast_ofNat] |
| 352 | |
| 353 | end NativeProducts |
| 354 | |
| 355 | end PoincareMT.DeTurckTameCompositionNative |