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/ConnectionNativeTime.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricInverse |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureTrace |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Comparison.ScalarMixedDerivative |
| 8 | import Mathlib.Analysis.Calculus.Deriv.Slope |
| 9 | |
| 10 | /-! |
| 11 | # Native time derivatives and terminal curvature-gradient control |
| 12 | |
| 13 | The connection variation API is stated after pairing with the evolving metric. |
| 14 | These finite-dimensional lemmas reconstruct the native derivative in fixed |
| 15 | model coordinates, so the coordinate-rate producer can apply the pairing |
| 16 | identity without changing tangent-space norms. |
| 17 | The final theorem uses the native scalar heat inequality and a compact |
| 18 | spacetime maximum argument to bound the first curvature derivative on a |
| 19 | positive terminal slab, as in Morgan-Tian, Proposition 4.12, printed p. 68. |
| 20 | -/ |
| 21 | |
| 22 | set_option autoImplicit false |
| 23 | |
| 24 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 25 | open Bundle Manifold Set Filter |
| 26 | |
| 27 | namespace PoincareMT.RicciFlow.Local |
| 28 | |
| 29 | theorem coordinate_covector_reconstruction |
| 30 | {n : Nat} (l : EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) : |
| 31 | l = ∑ i : Fin n, |
| 32 | (l (EuclideanSpace.single i 1)) • EuclideanSpace.proj i := by |
| 33 | classical |
| 34 | let b := PiLp.basisFun 2 ℝ (Fin n) |
| 35 | have hv (v : EuclideanSpace ℝ (Fin n)) : |
| 36 | v = ∑ i : Fin n, v i • EuclideanSpace.single i 1 := by |
| 37 | calc |
| 38 | v = ∑ i : Fin n, (b.repr v) i • b i := (b.sum_repr v).symm |
| 39 | _ = ∑ i : Fin n, v i • EuclideanSpace.single i 1 := by |
| 40 | apply Finset.sum_congr rfl |
| 41 | intro i hi |
| 42 | simp [b, PiLp.basisFun_repr, PiLp.basisFun_apply] |
| 43 | apply ContinuousLinearMap.ext |
| 44 | intro v |
| 45 | calc |
| 46 | l v = l (∑ i : Fin n, v i • EuclideanSpace.single i 1) := |
| 47 | congrArg l (hv v) |
| 48 | _ = (∑ i : Fin n, |
| 49 | (l (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) v := by |
| 50 | simp only [map_sum, map_smul] |
| 51 | simp [EuclideanSpace.proj, mul_comm] |
| 52 | |
| 53 | theorem inverse_bilinear_reconstruct |
| 54 | {n : Nat} |
| 55 | {G : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 56 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ} |
| 57 | (hG : G.IsInvertible) (v : EuclideanSpace ℝ (Fin n)) : |
| 58 | G.inverse (∑ i : Fin n, |
| 59 | (G v (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) = v := by |
| 60 | have hc := coordinate_covector_reconstruction (G v) |
| 61 | rw [← hc] |
| 62 | simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply] using |
| 63 | congrArg (fun L : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 64 | EuclideanSpace ℝ (Fin n) => L v) hG.inverse_comp_self |
| 65 | |
| 66 | theorem native_derivative_of_lowered_pairings |
| 67 | {n : Nat} |
| 68 | {G : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 69 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ} |
| 70 | (hG : G.IsInvertible) (dv : EuclideanSpace ℝ (Fin n)) |
| 71 | (p : Fin n -> ℝ) |
| 72 | (hp : ∀ i : Fin n, |
| 73 | G dv (EuclideanSpace.single i 1) = p i) : |
| 74 | dv = G.inverse (∑ i : Fin n, p i • EuclideanSpace.proj i) := by |
| 75 | calc |
| 76 | dv = G.inverse (∑ i : Fin n, |
| 77 | (G dv (EuclideanSpace.single i 1)) • EuclideanSpace.proj i) := |
| 78 | (inverse_bilinear_reconstruct hG dv).symm |
| 79 | _ = G.inverse (∑ i : Fin n, p i • EuclideanSpace.proj i) := by |
| 80 | congr 1 |
| 81 | apply Finset.sum_congr rfl |
| 82 | intro i hi |
| 83 | rw [hp i] |
| 84 | |
| 85 | universe u |
| 86 | |
| 87 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 88 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 89 | |
| 90 | set_option maxHeartbeats 8000000 in |
| 91 | set_option synthInstance.maxHeartbeats 200000 in |
| 92 | set_option maxRecDepth 2000 in |
| 93 | theorem ricciFlow_curvature_derivative_energy_terminal_bound |
| 94 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 95 | {T C a : ℝ} (_hT : 0 < T) (F : RicciFlow n M (Ico 0 T)) |
| 96 | (hC : ∀ s ∈ Ico 0 T, ∀ x : M, (F.connection s).curvatureTensorNorm x ≤ C) |
| 97 | (ha : 0 < a) (haT : a < T) : |
| 98 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 99 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 100 | let N := fun s (P A : (y : M) → TangentSpace (𝓡 n) y) y => |
| 101 | (F.connection s).connection A y (P y) |
| 102 | let R := fun s (A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 103 | (F.connection s).curvatureOnFields A B C y |
| 104 | let K := fun s (P A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 105 | N s P (R s A B C) y - R s (N s P A) B C y - |
| 106 | R s A (N s P B) C y - R s A B (N s P C) y |
| 107 | let Q := fun s x => |
| 108 | let b := (F.metric s).orthonormalBasis x |
| 109 | let E := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 110 | let k := fun γ : Fin 4 → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 111 | K s (E (γ 0)) (E (γ 1)) (E (γ 2)) (E (γ 3)) x |
| 112 | ∑ γ, (F.metric s).inner x (k γ) (k γ) |
| 113 | let L := 96 * ((n : ℝ) + 1) ^ 3 * max C 0 |
| 114 | ∃ Qa : ℝ, 0 ≤ Qa ∧ (∀ x : M, Q a x ≤ Qa) ∧ |
| 115 | (∀ s ∈ Ico a T, ∀ x : M, Q s x ≤ Qa * Real.exp (L * (s - a))) ∧ |
| 116 | (∀ s ∈ Ico a T, ∀ x : M, Q s x ≤ Qa * Real.exp (L * (T - a))) := by |
| 117 | classical |
| 118 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 119 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 120 | let : IsManifold (𝓡 n) (∞ + 1) M := by |
| 121 | simpa using (inferInstance : IsManifold (𝓡 n) ∞ M) |
| 122 | let : IsManifold (𝓡 n) (minSmoothness ℝ 2) M := |
| 123 | IsManifold.of_le (n := ∞) (by |
| 124 | simpa only [minSmoothness_of_isRCLikeNormedField] using |
| 125 | (ENat.LEInfty.out (m := (2 : ℕ∞ω)))) |
| 126 | let : ContMDiffMul 𝓘(ℝ, ℝ) ∞ ℝ := |
| 127 | { contMDiff_mul := by |
| 128 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 129 | exact contDiff_mul.contMDiff } |
| 130 | let V := EuclideanSpace ℝ (Fin n) |
| 131 | let N := fun s (P A : (y : M) → TangentSpace (𝓡 n) y) y => |
| 132 | (F.connection s).connection A y (P y) |
| 133 | let R := fun s (A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 134 | (F.connection s).curvatureOnFields A B C y |
| 135 | let K := fun s (P A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 136 | N s P (R s A B C) y - R s (N s P A) B C y - |
| 137 | R s A (N s P B) C y - R s A B (N s P C) y |
| 138 | let Q := fun s x => |
| 139 | let b := (F.metric s).orthonormalBasis x |
| 140 | let E := fun i => FiberBundle.extend V (b i) |
| 141 | let k := fun γ : Fin 4 → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 142 | K s (E (γ 0)) (E (γ 1)) (E (γ 2)) (E (γ 3)) x |
| 143 | ∑ γ, (F.metric s).inner x (k γ) (k γ) |
| 144 | let L := 96 * ((n : ℝ) + 1) ^ 3 * max C 0 |
| 145 | change ∃ Qa : ℝ, 0 ≤ Qa ∧ (∀ x : M, Q a x ≤ Qa) ∧ |
| 146 | (∀ s ∈ Ico a T, ∀ x : M, Q s x ≤ Qa * Real.exp (L * (s - a))) ∧ |
| 147 | (∀ s ∈ Ico a T, ∀ x : M, Q s x ≤ Qa * Real.exp (L * (T - a))) |
| 148 | have hQnonneg (s : ℝ) (x : M) : 0 ≤ Q s x := by |
| 149 | apply Finset.sum_nonneg |
| 150 | intro γ _ |
| 151 | let v := K s |
| 152 | (FiberBundle.extend V ((F.metric s).orthonormalBasis x (γ 0))) |
| 153 | (FiberBundle.extend V ((F.metric s).orthonormalBasis x (γ 1))) |
| 154 | (FiberBundle.extend V ((F.metric s).orthonormalBasis x (γ 2))) |
| 155 | (FiberBundle.extend V ((F.metric s).orthonormalBasis x (γ 3))) x |
| 156 | change 0 ≤ (F.metric s).inner x v v |
| 157 | by_cases hv : v = 0 |
| 158 | · simp [hv] |
| 159 | · exact ((F.metric s).pos x v hv).le |
| 160 | let e := fun x0 : M => trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 161 | let E := fun x0 : M => (e x0).localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 162 | let G := fun (x0 : M) (s : ℝ) (y : M) => ContinuousLinearMap.inCoordinates V |
| 163 | (TangentSpace (𝓡 n)) (V →L[ℝ] ℝ) |
| 164 | (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) x0 y x0 y ((F.metric s).inner y) |
| 165 | let ai := fun (x0 : M) (s : ℝ) (y : M) (i j : Fin n) => |
| 166 | ((G x0 s y).inverse (EuclideanSpace.proj j)) i |
| 167 | let k := fun (x0 : M) s (α : Fin 4 → Fin n) => |
| 168 | K s (E x0 (α 0)) (E x0 (α 1)) (E x0 (α 2)) (E x0 (α 3)) |
| 169 | let q := fun (x0 : M) s y => ∑ α : Fin 4 → Fin n, ∑ β : Fin 4 → Fin n, |
| 170 | (∏ r, ai x0 s y (α r) (β r)) * (F.metric s).inner y (k x0 s α y) (k x0 s β y) |
| 171 | have hqQ (x0 : M) (s : ℝ) {x : M} (hx : x ∈ (e x0).baseSet) : |
| 172 | q x0 s x = Q s x := |
| 173 | curvature_derivative_squared_norm_frame_eq_orthonormal (F.connection s) x0 hx |
| 174 | have hlocal (x0 : M) : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 175 | (fun p : ℝ × M => q x0 p.1 p.2) (Ico 0 T ×ˢ (e x0).baseSet) := by |
| 176 | let U := (e x0).baseSet |
| 177 | let S := fun X : (y : M) → TangentSpace (𝓡 n) y => |
| 178 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% X) U |
| 179 | let B := fun X : ℝ → (y : M) → TangentSpace (𝓡 n) y => |
| 180 | ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 181 | (fun p : ℝ × M => Bundle.TotalSpace.mk' V p.2 (X p.1 p.2)) (Ico 0 T ×ˢ U) |
| 182 | have hU : IsOpen U := (e x0).open_baseSet |
| 183 | have hE (i : Fin n) : S (E x0 i) := |
| 184 | (e x0).contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ |
| 185 | (EuclideanSpace.basisFun (Fin n) ℝ).toBasis i |
| 186 | have hfixed (X : (y : M) → TangentSpace (𝓡 n) y) (hX : S X) : B (fun _ => X) := |
| 187 | hX.comp (I := 𝓘(ℝ, ℝ).prod (𝓡 n)) contMDiffOn_snd (fun _ hp => hp.2) |
| 188 | have hslice (X : ℝ → (y : M) → TangentSpace (𝓡 n) y) (hX : B X) |
| 189 | (s : ℝ) (hs : s ∈ Ico 0 T) : S (X s) := |
| 190 | hX.comp (contMDiffOn_const.prodMk contMDiffOn_id) (fun _ hy => ⟨hs, hy⟩) |
| 191 | have hpair {U' : Set M} |
| 192 | (X Y : ℝ → (y : M) → TangentSpace (𝓡 n) y) |
| 193 | (hX : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 194 | (fun p : ℝ × M => Bundle.TotalSpace.mk' V p.2 (X p.1 p.2)) (Ico 0 T ×ˢ U')) |
| 195 | (hY : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 196 | (fun p : ℝ × M => Bundle.TotalSpace.mk' V p.2 (Y p.1 p.2)) (Ico 0 T ×ˢ U')) : |
| 197 | ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 198 | (fun p : ℝ × M => (F.metric p.1).inner p.2 (X p.1 p.2) (Y p.1 p.2)) |
| 199 | (Ico 0 T ×ˢ U') := by |
| 200 | have hp := ContMDiffOn.clm_bundle_apply₂ |
| 201 | (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 202 | (E₁ := fun y : M => TangentSpace (𝓡 n) y) |
| 203 | (E₂ := fun y : M => TangentSpace (𝓡 n) y) (E₃ := fun _ : M => ℝ) |
| 204 | (ψ := fun p : ℝ × M => (F.metric p.1).inner p.2) (b := Prod.snd) |
| 205 | (F.smooth.mono (Set.prod_mono subset_rfl (subset_univ U'))) hX hY |
| 206 | intro p hpS |
| 207 | exact (Bundle.contMDiffWithinAt_totalSpace.mp (hp p hpS)).2 |
| 208 | have hNmoving (P : (y : M) → TangentSpace (𝓡 n) y) (hP : S P) |
| 209 | (X : ℝ → (y : M) → TangentSpace (𝓡 n) y) (hX : B X) : |
| 210 | B (fun s => N s P (X s)) := by |
| 211 | apply contMDiffOn_family_vector_of_metric_pair F.smooth hU |
| 212 | intro U' hU' hU'U W hW |
| 213 | have hX' := hX.mono (Set.prod_mono subset_rfl hU'U) |
| 214 | have hW' := hW.comp (I := 𝓘(ℝ, ℝ).prod (𝓡 n)) contMDiffOn_snd |
| 215 | (fun (p : ℝ × M) (hp : p ∈ Ico 0 T ×ˢ U') => hp.2) |
| 216 | have hNW := contMDiffOn_connection_family_apply F.smooth F.connection |
| 217 | hU' W P hW (hP.mono hU'U) |
| 218 | have hd := contMDiffOn_family_spatial_mvfderiv |
| 219 | (f := fun s y => (F.metric s).inner y (X s y) (W y)) hU' |
| 220 | (hpair X (fun _ => W) hX' hW') P (hP.mono hU'U) |
| 221 | apply (hd.sub (hpair X (fun s => N s P W) hX' hNW)).congr |
| 222 | intro p hp |
| 223 | have hXp := ((hslice X hX p.1 hp.1).contMDiffAt |
| 224 | (hU.mem_nhds (hU'U hp.2))).mdifferentiableAt (by simp) |
| 225 | have hWp := (hW.contMDiffAt (hU'.mem_nhds hp.2)).mdifferentiableAt (by simp) |
| 226 | rw [(F.connection p.1).localTheory_mvfderiv_inner P (X p.1) W hXp hWp] |
| 227 | dsimp only [N] |
| 228 | ring |
| 229 | let : NormedAddCommGroup (V →L[ℝ] V) := inferInstance |
| 230 | let : NormedSpace ℝ (V →L[ℝ] V) := inferInstance |
| 231 | let : NormedAddCommGroup (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 232 | let : NormedSpace ℝ (V →L[ℝ] V →L[ℝ] V) := inferInstance |
| 233 | obtain ⟨Rc, hRc, hRcs⟩ := |
| 234 | exists_contMDiffOn_curvature_family_trilinearMap F.smooth F.connection |
| 235 | have hRmoving (X Y Z : ℝ → (y : M) → TangentSpace (𝓡 n) y) |
| 236 | (hX : B X) (hY : B Y) (hZ : B Z) : B (fun s => R s (X s) (Y s) (Z s)) := by |
| 237 | have hRc' := hRcs.mono (Set.prod_mono subset_rfl (subset_univ U)) |
| 238 | have h1 := ContMDiffOn.clm_bundle_apply |
| 239 | (F₁ := V) (F₂ := V →L[ℝ] V →L[ℝ] V) |
| 240 | (E₁ := fun y : M => TangentSpace (𝓡 n) y) |
| 241 | (E₂ := fun y : M => TangentSpace (𝓡 n) y →L[ℝ] |
| 242 | TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) |
| 243 | (b := Prod.snd) hRc' hX |
| 244 | have h2 := ContMDiffOn.clm_bundle_apply |
| 245 | (F₁ := V) (F₂ := V →L[ℝ] V) |
| 246 | (E₁ := fun y : M => TangentSpace (𝓡 n) y) |
| 247 | (E₂ := fun y : M => TangentSpace (𝓡 n) y →L[ℝ] TangentSpace (𝓡 n) y) |
| 248 | (b := Prod.snd) h1 hY |
| 249 | have h3 := ContMDiffOn.clm_bundle_apply |
| 250 | (F₁ := V) (F₂ := V) |
| 251 | (E₁ := fun y : M => TangentSpace (𝓡 n) y) |
| 252 | (E₂ := fun y : M => TangentSpace (𝓡 n) y) |
| 253 | (b := Prod.snd) h2 hZ |
| 254 | apply h3.congr |
| 255 | intro p hp |
| 256 | congr 1 |
| 257 | exact (curvature_eq_curvatureOnFields (F.connection p.1) hU |
| 258 | (X p.1) (Y p.1) (Z p.1) (hslice X hX p.1 hp.1) |
| 259 | (hslice Y hY p.1 hp.1) (hslice Z hZ p.1 hp.1) hp.2).symm.trans |
| 260 | (hRc p.1 p.2 (X p.1 p.2) (Y p.1 p.2) (Z p.1 p.2)).symm |
| 261 | have hNk (i j : Fin n) : B (fun s => N s (E x0 i) (E x0 j)) := |
| 262 | hNmoving (E x0 i) (hE i) (fun _ => E x0 j) (hfixed (E x0 j) (hE j)) |
| 263 | have hsub (X Y : ℝ → (y : M) → TangentSpace (𝓡 n) y) |
| 264 | (hX : B X) (hY : B Y) : B (fun s y => X s y - Y s y) := by |
| 265 | apply contMDiffOn_family_vector_of_metric_pair F.smooth hU |
| 266 | intro U' hU' hU'U W hW |
| 267 | have hW' := hW.comp (I := 𝓘(ℝ, ℝ).prod (𝓡 n)) contMDiffOn_snd |
| 268 | (fun (p : ℝ × M) (hp : p ∈ Ico 0 T ×ˢ U') => hp.2) |
| 269 | apply ((hpair X (fun _ => W) (hX.mono (Set.prod_mono subset_rfl hU'U)) hW').sub |
| 270 | (hpair Y (fun _ => W) (hY.mono (Set.prod_mono subset_rfl hU'U)) hW')).congr |
| 271 | intro p _ |
| 272 | change (F.metric p.1).inner p.2 (X p.1 p.2 - Y p.1 p.2) (W p.2) = _ |
| 273 | rw [map_sub, sub_apply] |
| 274 | have hk (α : Fin 4 → Fin n) : B (fun s => k x0 s α) := by |
| 275 | let A0 := fun s => N s (E x0 (α 0)) |
| 276 | (R s (E x0 (α 1)) (E x0 (α 2)) (E x0 (α 3))) |
| 277 | let A1 := fun s => R s (N s (E x0 (α 0)) (E x0 (α 1))) |
| 278 | (E x0 (α 2)) (E x0 (α 3)) |
| 279 | let A2 := fun s => R s (E x0 (α 1)) |
| 280 | (N s (E x0 (α 0)) (E x0 (α 2))) (E x0 (α 3)) |
| 281 | let A3 := fun s => R s (E x0 (α 1)) (E x0 (α 2)) |
| 282 | (N s (E x0 (α 0)) (E x0 (α 3))) |
| 283 | have h0 : B A0 := hNmoving (E x0 (α 0)) (hE (α 0)) |
| 284 | (fun s => R s (E x0 (α 1)) (E x0 (α 2)) (E x0 (α 3))) |
| 285 | (hRmoving (fun _ => E x0 (α 1)) (fun _ => E x0 (α 2)) (fun _ => E x0 (α 3)) |
| 286 | (hfixed (E x0 (α 1)) (hE (α 1))) (hfixed (E x0 (α 2)) (hE (α 2))) |
| 287 | (hfixed (E x0 (α 3)) (hE (α 3)))) |
| 288 | have h1 : B A1 := hRmoving |
| 289 | (fun s => N s (E x0 (α 0)) (E x0 (α 1))) |
| 290 | (fun _ => E x0 (α 2)) (fun _ => E x0 (α 3)) |
| 291 | (hNk (α 0) (α 1)) (hfixed (E x0 (α 2)) (hE (α 2))) |
| 292 | (hfixed (E x0 (α 3)) (hE (α 3))) |
| 293 | have h2 : B A2 := hRmoving (fun _ => E x0 (α 1)) |
| 294 | (fun s => N s (E x0 (α 0)) (E x0 (α 2))) (fun _ => E x0 (α 3)) |
| 295 | (hfixed (E x0 (α 1)) (hE (α 1))) (hNk (α 0) (α 2)) |
| 296 | (hfixed (E x0 (α 3)) (hE (α 3))) |
| 297 | have h3 : B A3 := hRmoving (fun _ => E x0 (α 1)) (fun _ => E x0 (α 2)) |
| 298 | (fun s => N s (E x0 (α 0)) (E x0 (α 3))) |
| 299 | (hfixed (E x0 (α 1)) (hE (α 1))) (hfixed (E x0 (α 2)) (hE (α 2))) |
| 300 | (hNk (α 0) (α 3)) |
| 301 | exact hsub (fun s y => A0 s y - A1 s y - A2 s y) A3 |
| 302 | (hsub (fun s y => A0 s y - A1 s y) A2 (hsub A0 A1 h0 h1) h2) h3 |
| 303 | have hinv := (contMDiffOn_family_metric_frame_inverse F.smooth x0).2.2 |
| 304 | have hai (i j : Fin n) : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 305 | (fun p : ℝ × M => ai x0 p.1 p.2 i j) (Ico 0 T ×ˢ U) := |
| 306 | (contMDiffOn_const (c := EuclideanSpace.proj i)).clm_apply |
| 307 | (hinv.clm_apply (contMDiffOn_const (c := EuclideanSpace.proj j))) |
| 308 | apply contMDiffOn_finsetSum |
| 309 | intro α _ |
| 310 | apply contMDiffOn_finsetSum |
| 311 | intro β _ |
| 312 | exact (contMDiffOn_finsetProd (fun r _ => hai (α r) (β r))).mul |
| 313 | (hpair (fun s => k x0 s α) (fun s => k x0 s β) (hk α) (hk β)) |
| 314 | have hQsm (s : ℝ) (hs : s ∈ Ioo 0 T) (x : M) : |
| 315 | ContMDiffAt (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 316 | (fun p : ℝ × M => Q p.1 p.2) (s, x) := by |
| 317 | have hx : x ∈ (e x).baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 318 | have htime : Ico 0 T ∈ 𝓝 s := Ico_mem_nhds_iff.mpr hs |
| 319 | have hdom : Ico 0 T ×ˢ (e x).baseSet ∈ 𝓝 (s, x) := |
| 320 | prod_mem_nhds htime ((e x).open_baseSet.mem_nhds hx) |
| 321 | apply ((hlocal x).contMDiffAt hdom).congr_of_eventuallyEq |
| 322 | filter_upwards [hdom] with p hp |
| 323 | exact (hqQ x p.1 hp.2).symm |
| 324 | have hQslice (s : ℝ) (hs : s ∈ Ioo 0 T) : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (Q s) := by |
| 325 | intro x |
| 326 | exact (hQsm s hs x).comp x (contMDiffAt_const.prodMk contMDiffAt_id) |
| 327 | have hQderiv (s : ℝ) (hs : s ∈ Ioo 0 T) (x : M) : |
| 328 | HasDerivAt (fun r => Q r x) (deriv (fun r => Q r x) s) s := by |
| 329 | have hh : ContDiffAt ℝ ∞ (fun r => Q r x) s := |
| 330 | ((hQsm s hs x).comp s (contMDiffAt_id.prodMk contMDiffAt_const)).contDiffAt |
| 331 | exact (hh.differentiableAt (by simp)).hasDerivAt |
| 332 | have hL : 0 ≤ L := by dsimp only [L]; positivity |
| 333 | have hmaxrate (s : ℝ) (hs : s ∈ Ioo 0 T) (x : M) |
| 334 | (hmax : IsLocalMax (Q s) x) : |
| 335 | deriv (fun r => Q r x) s ≤ L * Q s x := by |
| 336 | have hx : x ∈ (e x).baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 337 | have hsq : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ (q x s) (e x).baseSet := by |
| 338 | have hmap : ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 339 | (fun y : M => (s, y)) (e x).baseSet := |
| 340 | contMDiffOn_const.prodMk contMDiffOn_id |
| 341 | have hsall := (hlocal x).comp (f := fun y : M => (s, y)) hmap |
| 342 | (fun _ hy => ⟨⟨hs.1.le, hs.2⟩, hy⟩) |
| 343 | exact hsall |
| 344 | have heq : q x s =ᶠ[𝓝 x] Q s := by |
| 345 | filter_upwards [(e x).open_baseSet.mem_nhds hx] with y hy |
| 346 | exact hqQ x s hy |
| 347 | have hqmax : IsLocalMax (q x s) x := heq.isLocalMax_iff.mpr hmax |
| 348 | let d := fun (P : (y : M) → TangentSpace (𝓡 n) y) (f : M → ℝ) y => |
| 349 | mvfderiv (𝓡 n) f y (P y) |
| 350 | let lap := ∑ i, ∑ j, ai x s x i j * |
| 351 | (d (E x i) (d (E x j) (q x s)) x - d (N s (E x i) (E x j)) (q x s) x) |
| 352 | have hlap : lap ≤ 0 := |
| 353 | scalar_frame_laplacian_nonpos_of_isLocalMax (F.connection s) x hx |
| 354 | (q x s) hsq hqmax |
| 355 | have hsi : s ∈ interior (Ico 0 T) := by simpa only [interior_Ico] using hs |
| 356 | have hheat := ricciFlow_curvature_derivative_scalar_heat_le F hsi x hx |
| 357 | have hheat0 := hheat.1 |
| 358 | have hineq := hheat.2 |
| 359 | change deriv (fun r => q x r x) s - lap ≤ |
| 360 | -2 * _ + 96 * ((n : ℝ) + 1) ^ 3 * (F.connection s).curvatureTensorNorm x * q x s x |
| 361 | at hineq |
| 362 | have htime : (fun r => q x r x) = (fun r => Q r x) := |
| 363 | funext (fun r => hqQ x r hx) |
| 364 | rw [htime, hqQ x s hx] at hineq |
| 365 | have hcurv : (F.connection s).curvatureTensorNorm x ≤ max C 0 := |
| 366 | (hC s ⟨hs.1.le, hs.2⟩ x).trans (le_max_left _ _) |
| 367 | have hcoef := mul_le_mul_of_nonneg_right |
| 368 | (mul_le_mul_of_nonneg_left hcurv |
| 369 | (by positivity : 0 ≤ 96 * ((n : ℝ) + 1) ^ 3)) (hQnonneg s x) |
| 370 | change 96 * ((n : ℝ) + 1) ^ 3 * (F.connection s).curvatureTensorNorm x * Q s x ≤ |
| 371 | L * Q s x at hcoef |
| 372 | linarith only [hineq, hheat0, hlap, hcoef] |
| 373 | cases isEmpty_or_nonempty M with |
| 374 | | inl hM => |
| 375 | let : IsEmpty M := hM |
| 376 | exact ⟨0, le_rfl, fun x => isEmptyElim x, |
| 377 | fun _ _ x => isEmptyElim x, fun _ _ x => isEmptyElim x⟩ |
| 378 | | inr hM => |
| 379 | let : Nonempty M := hM |
| 380 | obtain ⟨xa, _, hma⟩ := isCompact_univ.exists_isMaxOn |
| 381 | (univ_nonempty : (univ : Set M).Nonempty) (hQslice a ⟨ha, haT⟩).continuous.continuousOn |
| 382 | let Qa := Q a xa |
| 383 | have hQa : 0 ≤ Qa := hQnonneg a xa |
| 384 | have hQaBound (x : M) : Q a x ≤ Qa := isMaxOn_iff.mp hma x (mem_univ x) |
| 385 | have hgrowth (b : ℝ) (hb : b ∈ Ico a T) (x : M) : |
| 386 | Q b x ≤ Qa * Real.exp (L * (b - a)) := by |
| 387 | rcases eq_or_lt_of_le hb.1 with hab | hab |
| 388 | · subst b |
| 389 | simpa only [sub_self, mul_zero, Real.exp_zero, mul_one] using hQaBound x |
| 390 | let v := fun (s : ℝ) (y : M) => Real.exp (-L * (s - a)) * Q s y |
| 391 | have hv : v b x ≤ Qa := by |
| 392 | by_contra hnot |
| 393 | have hgap : Qa < v b x := lt_of_not_ge hnot |
| 394 | let ε := (v b x - Qa) / (2 * (b - a)) |
| 395 | have heps : 0 < ε := div_pos (sub_pos.mpr hgap) (by linarith) |
| 396 | have hepsmul : 2 * (ε * (b - a)) = v b x - Qa := by |
| 397 | dsimp only [ε] |
| 398 | field_simp [ne_of_gt (sub_pos.mpr hab)] |
| 399 | let w := fun p : ℝ × M => v p.1 p.2 - ε * (p.1 - a) |
| 400 | let slab := Icc a b ×ˢ (univ : Set M) |
| 401 | have hwgt : Qa < w (b, x) := by |
| 402 | change Qa < v b x - ε * (b - a) |
| 403 | linarith only [hepsmul, hgap] |
| 404 | have hQcont : ContinuousOn (fun p : ℝ × M => Q p.1 p.2) slab := by |
| 405 | intro p hp |
| 406 | exact (hQsm p.1 ⟨ha.trans_le hp.1.1, hp.1.2.trans_lt hb.2⟩ |
| 407 | p.2).continuousAt.continuousWithinAt |
| 408 | have hecont : Continuous (fun p : ℝ × M => Real.exp (-L * (p.1 - a))) := by |
| 409 | fun_prop |
| 410 | have helin : Continuous (fun p : ℝ × M => ε * (p.1 - a)) := by fun_prop |
| 411 | have hwcont : ContinuousOn w slab := |
| 412 | (hecont.continuousOn.mul hQcont).sub helin.continuousOn |
| 413 | have hslab : IsCompact slab := isCompact_Icc.prod isCompact_univ |
| 414 | have hbx : (b, x) ∈ slab := ⟨⟨hab.le, le_rfl⟩, mem_univ x⟩ |
| 415 | obtain ⟨p, hp, hmax⟩ := hslab.exists_isMaxOn ⟨(b, x), hbx⟩ hwcont |
| 416 | have hpgt : Qa < w p := hwgt.trans_le (isMaxOn_iff.mp hmax (b, x) hbx) |
| 417 | have hpa : a < p.1 := by |
| 418 | apply lt_of_le_of_ne hp.1.1 |
| 419 | intro heq |
| 420 | have hwa : w p = Q a p.2 := by |
| 421 | dsimp only [w, v] |
| 422 | rw [← heq] |
| 423 | simp only [sub_self, mul_zero, Real.exp_zero, one_mul, sub_zero] |
| 424 | rw [hwa] at hpgt |
| 425 | exact (not_lt_of_ge (hQaBound p.2)) hpgt |
| 426 | have hpt : p.1 ∈ Ioo 0 T := ⟨ha.trans hpa, hp.1.2.trans_lt hb.2⟩ |
| 427 | have hQmax : IsLocalMax (Q p.1) p.2 := by |
| 428 | apply Filter.Eventually.of_forall |
| 429 | intro y |
| 430 | have hh := isMaxOn_iff.mp hmax (p.1, y) ⟨hp.1, mem_univ y⟩ |
| 431 | change Real.exp (-L * (p.1 - a)) * Q p.1 y - ε * (p.1 - a) ≤ |
| 432 | Real.exp (-L * (p.1 - a)) * Q p.1 p.2 - ε * (p.1 - a) at hh |
| 433 | exact (mul_le_mul_iff_right₀ (Real.exp_pos _)).mp ((sub_le_sub_iff_right _).mp hh) |
| 434 | let rate := Real.exp (-L * (p.1 - a)) * |
| 435 | (deriv (fun r => Q r p.2) p.1 - L * Q p.1 p.2) - ε |
| 436 | have hwd : HasDerivAt (fun r => w (r, p.2)) rate p.1 := by |
| 437 | have he := (((hasDerivAt_id p.1).sub_const a).const_mul (-L)).exp |
| 438 | have hl := ((hasDerivAt_id p.1).sub_const a).const_mul ε |
| 439 | convert (he.mul (hQderiv p.1 hpt p.2)).sub hl using 1 |
| 440 | · rfl |
| 441 | · rfl |
| 442 | · rfl |
| 443 | · dsimp only [rate, id_eq] |
| 444 | ring |
| 445 | have hrateNonneg : 0 ≤ rate := by |
| 446 | apply ge_of_tendsto (hasDerivAt_iff_tendsto_slope_left_right.mp hwd).1 |
| 447 | filter_upwards [Ico_mem_nhdsLT hpa] with r hr |
| 448 | have hh := isMaxOn_iff.mp hmax (r, p.2) |
| 449 | ⟨⟨hr.1, hr.2.le.trans hp.1.2⟩, mem_univ p.2⟩ |
| 450 | rw [slope_def_field] |
| 451 | exact div_nonneg_of_nonpos (sub_nonpos.mpr hh) (sub_nonpos.mpr hr.2.le) |
| 452 | have hrateNeg : rate < 0 := by |
| 453 | have hh := hmaxrate p.1 hpt p.2 hQmax |
| 454 | have hm := mul_nonpos_of_nonneg_of_nonpos (Real.exp_pos (-L * (p.1 - a))).le |
| 455 | (sub_nonpos.mpr hh) |
| 456 | dsimp only [rate] |
| 457 | linarith only [hm, heps] |
| 458 | exact (not_lt_of_ge hrateNonneg) hrateNeg |
| 459 | calc |
| 460 | Q b x = Real.exp (L * (b - a)) * v b x := by |
| 461 | dsimp only [v] |
| 462 | rw [← mul_assoc, ← Real.exp_add] |
| 463 | have he : L * (b - a) + -L * (b - a) = 0 := by ring |
| 464 | rw [he, Real.exp_zero, one_mul] |
| 465 | _ ≤ Real.exp (L * (b - a)) * Qa := |
| 466 | mul_le_mul_of_nonneg_left hv (Real.exp_pos _).le |
| 467 | _ = Qa * Real.exp (L * (b - a)) := mul_comm _ _ |
| 468 | refine ⟨Qa, hQa, hQaBound, hgrowth, ?_⟩ |
| 469 | intro s hs x |
| 470 | exact (hgrowth s hs x).trans (mul_le_mul_of_nonneg_left |
| 471 | (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left (sub_le_sub_right hs.2.le a) hL)) hQa) |
| 472 | |
| 473 | set_option maxHeartbeats 4000000 in |
| 474 | set_option synthInstance.maxHeartbeats 200000 in |
| 475 | /-- The native zeroth-order evolution in the fixed frame used by the iteration. -/ |
| 476 | theorem hasDerivAt_ricciFlow_iteratedCurvature_zero |
| 477 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 478 | (x0 : M) (X : Fin 3 → (y : M) → TangentSpace (𝓡 n) y) |
| 479 | (hX : ∀ j, ContMDiffOn (𝓡 n) |
| 480 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X j)) |
| 481 | (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x0).baseSet) |
| 482 | {x : M} (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 483 | (TangentSpace (𝓡 n)) x0).baseSet) : |
| 484 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 485 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 486 | let D := F.connection t |
| 487 | let V := EuclideanSpace ℝ (Fin n) |
| 488 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 489 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 490 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 491 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 492 | x0 x x0 x ((F.metric t).inner x) |
| 493 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 494 | let R := D.curvature x |
| 495 | let u := X 0 x |
| 496 | let v := X 1 x |
| 497 | let w := X 2 x |
| 498 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 499 | R (R u v r) s w - (2 : ℝ) • R v r (R s u w) + |
| 500 | (2 : ℝ) • R r u (R v s w) + R (R u v w) r s - |
| 501 | R (R u r s) v w - R u (R v r s) w - R u v (R w r s) |
| 502 | HasDerivAt |
| 503 | (fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) 0 X x) |
| 504 | ((∑ i : Fin n, ∑ j : Fin n, a i j • |
| 505 | curvatureOnFields_iteratedCovariantDerivative D 2 |
| 506 | (Fin.cons (E i) (Fin.cons (E j) X)) x) + |
| 507 | ∑ i : Fin n, ∑ j : Fin n, a i j • Z (E i x) (E j x)) t := by |
| 508 | classical |
| 509 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 510 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 511 | let D := F.connection t |
| 512 | let g := F.metric t |
| 513 | let V := EuclideanSpace ℝ (Fin n) |
| 514 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 515 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 516 | let E := e.localFrame cb |
| 517 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 518 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 519 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 520 | x0 x x0 x (g.inner x) |
| 521 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 522 | let u := X 0 x |
| 523 | let v := X 1 x |
| 524 | let w := X 2 x |
| 525 | let b := g.orthonormalBasis x |
| 526 | let ext := fun z : TangentSpace (𝓡 n) x => FiberBundle.extend V z |
| 527 | let eb := fun r => ext (b r) |
| 528 | let ex := trivializationAt V (TangentSpace (𝓡 n)) x |
| 529 | have hxx : x ∈ ex.baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 530 | let S := fun (U : Set M) (A : (y : M) → TangentSpace (𝓡 n) y) => |
| 531 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% A) U |
| 532 | have hE (i : Fin n) : S e.baseSet (E i) := |
| 533 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 534 | have hExt (z : TangentSpace (𝓡 n) x) : S ex.baseSet (ext z) := by |
| 535 | suffices hh : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 536 | (fun y => (ex ⟨y, ext z y⟩).2) ex.baseSet by |
| 537 | intro y hy |
| 538 | rw [ex.contMDiffWithinAt_section _ hy] |
| 539 | exact hh y hy |
| 540 | apply (contMDiffOn_const (c := (ex ⟨x, z⟩).2)).congr |
| 541 | intro y hy |
| 542 | change (ex ⟨y, ex.symm y (ex ⟨x, z⟩).2⟩).2 = (ex ⟨x, z⟩).2 |
| 543 | have hh := congrArg Prod.snd (ex.apply_mk_symm hy (ex ⟨x, z⟩).2) |
| 544 | exact hh |
| 545 | have hExtx (z : TangentSpace (𝓡 n) x) : ext z x = z := |
| 546 | FiberBundle.extend_apply_self _ _ |
| 547 | let N := fun (A B : (y : M) → TangentSpace (𝓡 n) y) y => D.connection B y (A y) |
| 548 | let Rf := fun (A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 549 | D.curvatureOnFields A B C y |
| 550 | let K := fun (P A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 551 | N P (Rf A B C) y - Rf (N P A) B C y - |
| 552 | Rf A (N P B) C y - Rf A B (N P C) y |
| 553 | let H := fun (P Q A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 554 | N P (K Q A B C) y - K (N P Q) A B C y - |
| 555 | K Q (N P A) B C y - K Q A (N P B) C y - K Q A B (N P C) y |
| 556 | have hK (Y : Fin 4 → (y : M) → TangentSpace (𝓡 n) y) : |
| 557 | curvatureOnFields_iteratedCovariantDerivative D 1 Y = |
| 558 | K (Y 0) (Y 1) (Y 2) (Y 3) := by |
| 559 | funext y |
| 560 | simp [curvatureOnFields_iteratedCovariantDerivative, Fin.sum_univ_succ, |
| 561 | Fin.tail, K, N, Rf, sub_add_eq_sub_sub] |
| 562 | have hH (Y : Fin 5 → (y : M) → TangentSpace (𝓡 n) y) : |
| 563 | curvatureOnFields_iteratedCovariantDerivative D 2 Y = |
| 564 | H (Y 0) (Y 1) (Y 2) (Y 3) (Y 4) := by |
| 565 | funext y |
| 566 | rw [curvatureOnFields_iteratedCovariantDerivative] |
| 567 | simp only [hK] |
| 568 | simp [Fin.sum_univ_succ, Fin.tail, H, N, sub_add_eq_sub_sub] |
| 569 | obtain ⟨T, hT⟩ := exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap D 2 x |
| 570 | have hleft (r) : |
| 571 | H (eb r) (eb r) (ext u) (ext v) (ext w) x = T ![b r, b r, u, v, w] := by |
| 572 | have hh := hT ex.open_baseSet ![eb r, eb r, ext u, ext v, ext w] |
| 573 | (by intro j; fin_cases j <;> exact hExt _) hxx |
| 574 | rw [hH] at hh |
| 575 | change T (fun j => ![eb r, eb r, ext u, ext v, ext w] j x) = |
| 576 | H (eb r) (eb r) (ext u) (ext v) (ext w) x at hh |
| 577 | rw [← hh] |
| 578 | congr 1 |
| 579 | funext j |
| 580 | fin_cases j <;> exact hExtx _ |
| 581 | have hright (i j : Fin n) : |
| 582 | T ![E i x, E j x, u, v, w] = |
| 583 | curvatureOnFields_iteratedCovariantDerivative D 2 (Fin.cons (E i) (Fin.cons (E j) X)) x := by |
| 584 | have hh := hT e.open_baseSet (Fin.cons (E i) (Fin.cons (E j) X)) |
| 585 | (by intro r; refine Fin.cases (hE i) ?_ r |
| 586 | intro r; refine Fin.cases (hE j) ?_ r |
| 587 | exact hX) hx |
| 588 | convert hh using 1 |
| 589 | congr 1 |
| 590 | ext r |
| 591 | fin_cases r <;> rfl |
| 592 | have hframe (z : TangentSpace (𝓡 n) x) : |
| 593 | z = ∑ i : Fin n, theta i x z • E i x := by |
| 594 | simpa only [FiberBundle.extend_apply_self] using |
| 595 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 596 | (s := FiberBundle.extend V z) hx |
| 597 | have hgram (i j : Fin n) : |
| 598 | a i j = ∑ r, theta i x (b r) * theta j x (b r) := |
| 599 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 600 | have hsecond (p q : TangentSpace (𝓡 n) x) : |
| 601 | T ![p, q, u, v, w] = |
| 602 | ∑ j : Fin n, theta j x q • T ![p, E j x, u, v, w] := by |
| 603 | change (T.curryLeft p).curryLeft q ![u, v, w] = _ |
| 604 | nth_rw 1 [hframe q] |
| 605 | simp only [map_sum, map_smul, sum_apply, smul_apply, MultilinearMap.curryLeft_apply] |
| 606 | rfl |
| 607 | have hexpand (p q : TangentSpace (𝓡 n) x) : |
| 608 | T ![p, q, u, v, w] = |
| 609 | ∑ i : Fin n, ∑ j : Fin n, |
| 610 | (theta i x p * theta j x q) • T ![E i x, E j x, u, v, w] := by |
| 611 | change T.curryLeft p ![q, u, v, w] = _ |
| 612 | nth_rw 1 [hframe p] |
| 613 | simp only [map_sum, map_smul, sum_apply, smul_apply, MultilinearMap.curryLeft_apply] |
| 614 | change (∑ i, theta i x p • T ![E i x, q, u, v, w]) = _ |
| 615 | apply Finset.sum_congr rfl |
| 616 | intro i _ |
| 617 | rw [hsecond] |
| 618 | simp only [Finset.smul_sum, smul_smul] |
| 619 | have htrace : |
| 620 | (∑ r, H (eb r) (eb r) (ext u) (ext v) (ext w) x) = |
| 621 | ∑ i : Fin n, ∑ j : Fin n, a i j • |
| 622 | curvatureOnFields_iteratedCovariantDerivative D 2 |
| 623 | (Fin.cons (E i) (Fin.cons (E j) X)) x := by |
| 624 | have hs : (∑ r, H (eb r) (eb r) (ext u) (ext v) (ext w) x) = |
| 625 | ∑ r, ∑ i : Fin n, ∑ j : Fin n, |
| 626 | (theta i x (b r) * theta j x (b r)) • T ![E i x, E j x, u, v, w] := by |
| 627 | apply Finset.sum_congr rfl |
| 628 | intro r _ |
| 629 | exact (hleft r).trans (hexpand _ _) |
| 630 | rw [hs] |
| 631 | rw [Finset.sum_comm] |
| 632 | apply Finset.sum_congr rfl |
| 633 | intro i _ |
| 634 | rw [Finset.sum_comm] |
| 635 | apply Finset.sum_congr rfl |
| 636 | intro j _ |
| 637 | rw [← Finset.sum_smul, ← hgram, hright] |
| 638 | let R := D.curvature x |
| 639 | let P := fun z : TangentSpace (𝓡 n) x => ∑ r, D.ricci x z (b r) • b r |
| 640 | let Q := (∑ r, (R (R u v (b r)) (b r) w - |
| 641 | (2 : ℝ) • R v (b r) (R (b r) u w) + |
| 642 | (2 : ℝ) • R (b r) u (R v (b r) w))) + |
| 643 | P (R u v w) - R (P u) v w - R u (P v) w - R u v (P w) |
| 644 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 645 | R (R u v r) s w - (2 : ℝ) • R v r (R s u w) + |
| 646 | (2 : ℝ) • R r u (R v s w) + R (R u v w) r s - |
| 647 | R (R u r s) v w - R u (R v r s) w - R u v (R w r s) |
| 648 | have hreact := curvature_reaction_eq_pure_inverse_frame_sum D x0 x hx u v w |
| 649 | change Q = ∑ i : Fin n, ∑ j : Fin n, a i j • Z (E i x) (E j x) at hreact |
| 650 | have htime := hasDerivAt_ricciFlow_curvature_diffusion_reaction F ht x u v w |
| 651 | change HasDerivAt (fun s => (F.connection s).curvature x u v w) |
| 652 | ((∑ r, H (eb r) (eb r) (ext u) (ext v) (ext w) x) + Q) t at htime |
| 653 | rw [htrace, hreact] at htime |
| 654 | apply htime.congr_of_eventuallyEq |
| 655 | exact Filter.Eventually.of_forall fun s => |
| 656 | (curvature_eq_curvatureOnFields (F.connection s) e.open_baseSet |
| 657 | (X 0) (X 1) (X 2) (hX 0) (hX 1) (hX 2) hx).symm |
| 658 | |
| 659 | set_option maxHeartbeats 4000000 in |
| 660 | set_option synthInstance.maxHeartbeats 200000 in |
| 661 | /-- The actual connection rate in a fixed frame, with the native three trace orders. -/ |
| 662 | theorem ricciFlow_connection_variation_pairing_eq_inverse_frame |
| 663 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 664 | (x0 : M) : |
| 665 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 666 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 667 | let g := F.metric t |
| 668 | let V := EuclideanSpace ℝ (Fin n) |
| 669 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 670 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 671 | let G := fun y : M => ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 672 | (V →L[ℝ] ℝ) (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) |
| 673 | x0 y x0 y (g.inner y) |
| 674 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 675 | let K := curvatureOnFields_iteratedCovariantDerivative (F.connection t) |
| 676 | let low := fun (Z : Fin 5 → (y : M) → TangentSpace (𝓡 n) y) y => |
| 677 | g.inner y (K 1 (Fin.init Z) y) (Z (Fin.last 4) y) |
| 678 | ∀ (X Y Z : (y : M) → TangentSpace (𝓡 n) y), |
| 679 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% X) e.baseSet → |
| 680 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% Y) e.baseSet → |
| 681 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% Z) e.baseSet → |
| 682 | ∀ {x : M}, x ∈ e.baseSet → |
| 683 | g.inner x (deriv (fun s => (F.connection s).connection Y x (X x)) t) (Z x) = |
| 684 | -(∑ i, ∑ j, a x i j * low ![X, E i, Y, Z, E j] x) - |
| 685 | (∑ i, ∑ j, a x i j * low ![Y, E i, Z, X, E j] x) + |
| 686 | ∑ i, ∑ j, a x i j * low ![Z, E i, X, Y, E j] x := by |
| 687 | classical |
| 688 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 689 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 690 | dsimp only |
| 691 | let g := F.metric t |
| 692 | let D := F.connection t |
| 693 | let V := EuclideanSpace ℝ (Fin n) |
| 694 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 695 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 696 | let E := e.localFrame cb |
| 697 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 698 | let G := fun y : M => ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 699 | (V →L[ℝ] ℝ) (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) |
| 700 | x0 y x0 y (g.inner y) |
| 701 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 702 | let K := curvatureOnFields_iteratedCovariantDerivative D |
| 703 | let low := fun (Z : Fin 5 → (y : M) → TangentSpace (𝓡 n) y) y => |
| 704 | g.inner y (K 1 (Fin.init Z) y) (Z (Fin.last 4) y) |
| 705 | intro X Y Z hX hY hZ x hx |
| 706 | let b := g.orthonormalBasis x |
| 707 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 708 | let eb := fun i : ι => FiberBundle.extend V (b i) |
| 709 | let ex := trivializationAt V (TangentSpace (𝓡 n)) x |
| 710 | let U := e.baseSet ∩ ex.baseSet |
| 711 | have hU : IsOpen U := e.open_baseSet.inter ex.open_baseSet |
| 712 | have hxU : x ∈ U := ⟨hx, FiberBundle.mem_baseSet_trivializationAt' x⟩ |
| 713 | let S := fun Q : (y : M) → TangentSpace (𝓡 n) y => |
| 714 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% Q) e.baseSet |
| 715 | have hE (i : Fin n) : S (E i) := |
| 716 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 717 | have heb (i : ι) : ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 718 | (T% (eb i)) U := by |
| 719 | have hc : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 720 | (fun _y : M => (ex ⟨x, b i⟩).2) ex.baseSet := contMDiffOn_const |
| 721 | have hec : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 722 | (fun y => (ex ⟨y, eb i y⟩).2) ex.baseSet := by |
| 723 | apply hc.congr |
| 724 | intro y hy |
| 725 | change (ex ⟨y, ex.symm y (ex ⟨x, b i⟩).2⟩).2 = (ex ⟨x, b i⟩).2 |
| 726 | simpa only using congrArg Prod.snd (ex.apply_mk_symm hy (ex ⟨x, b i⟩).2) |
| 727 | have hs : ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 728 | (T% (eb i)) ex.baseSet := by |
| 729 | intro y hy |
| 730 | rw [ex.contMDiffWithinAt_section _ hy] |
| 731 | exact hec y hy |
| 732 | exact hs.mono inter_subset_right |
| 733 | let N := fun (A B : (y : M) → TangentSpace (𝓡 n) y) y => |
| 734 | D.connection B y (A y) |
| 735 | let R := fun (A B C : (y : M) → TangentSpace (𝓡 n) y) y => |
| 736 | D.curvatureOnFields A B C y |
| 737 | let dR := fun (A B C W : (y : M) → TangentSpace (𝓡 n) y) y => |
| 738 | N A (R B C W) y - R (N A B) C W y - |
| 739 | R B (N A C) W y - R B C (N A W) y |
| 740 | have hK (Q : Fin 4 → (y : M) → TangentSpace (𝓡 n) y) : |
| 741 | K 1 Q = dR (Q 0) (Q 1) (Q 2) (Q 3) := by |
| 742 | funext y |
| 743 | simp [K, curvatureOnFields_iteratedCovariantDerivative, Fin.sum_univ_succ, |
| 744 | Fin.tail, dR, N, R, sub_add_eq_sub_sub] |
| 745 | obtain ⟨T, hT⟩ := exists_curvatureOnFields_derivative_quadrilinearMap D x |
| 746 | have hframe (v : TangentSpace (𝓡 n) x) : |
| 747 | v = ∑ i : Fin n, theta i x v • E i x := by |
| 748 | simpa only [FiberBundle.extend_apply_self] using |
| 749 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 750 | (s := FiberBundle.extend V v) hx |
| 751 | have hgram (i j : Fin n) : |
| 752 | a x i j = ∑ r, theta i x (b r) * theta j x (b r) := |
| 753 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 754 | have htrace (u v w : TangentSpace (𝓡 n) x) : |
| 755 | (∑ i, ∑ j, a x i j * g.inner x (T u (E i x) v w) (E j x)) = |
| 756 | ∑ r : ι, g.inner x (T u (b r) v w) (b r) := by |
| 757 | have hterm (r : ι) : g.inner x (T u (b r) v w) (b r) = |
| 758 | ∑ i, ∑ j, (theta i x (b r) * theta j x (b r)) * |
| 759 | g.inner x (T u (E i x) v w) (E j x) := by |
| 760 | calc |
| 761 | _ = g.inner x (T u (∑ i, theta i x (b r) • E i x) v w) |
| 762 | (∑ j, theta j x (b r) • E j x) := |
| 763 | congrArg₂ (fun A B => g.inner x (T u A v w) B) (hframe (b r)) (hframe (b r)) |
| 764 | _ = _ := by |
| 765 | simp only [map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 766 | sum_apply, smul_apply, smul_eq_mul, Finset.mul_sum] |
| 767 | rw [Finset.sum_comm] |
| 768 | apply Finset.sum_congr rfl |
| 769 | intro i _ |
| 770 | apply Finset.sum_congr rfl |
| 771 | intro j _ |
| 772 | ring |
| 773 | simp only [hgram, Finset.sum_mul] |
| 774 | rw [Finset.sum_comm] |
| 775 | conv_lhs => arg 2; ext j; rw [Finset.sum_comm] |
| 776 | rw [Finset.sum_comm] |
| 777 | simp only [hterm] |
| 778 | apply Finset.sum_congr rfl |
| 779 | intro r _ |
| 780 | rw [Finset.sum_comm] |
| 781 | have hlow (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 782 | (hA : S A) (hB : S B) (hC : S C) (i j : Fin n) : |
| 783 | low ![A, E i, B, C, E j] x = |
| 784 | g.inner x (T (A x) (E i x) (B x) (C x)) (E j x) := by |
| 785 | dsimp only [low] |
| 786 | rw [hK] |
| 787 | change g.inner x (dR A (E i) B C x) (E j x) = _ |
| 788 | exact congrArg (fun v => g.inner x v (E j x)) |
| 789 | (hT e.open_baseSet A (E i) B C hA (hE i) hB hC hx).symm |
| 790 | have horth (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 791 | (hA : S A) (hB : S B) (hC : S C) (r : ι) : |
| 792 | dR A (eb r) B C x = T (A x) (b r) (B x) (C x) := by |
| 793 | have hh := hT hU A (eb r) B C (hA.mono inter_subset_left) (heb r) |
| 794 | (hB.mono inter_subset_left) (hC.mono inter_subset_left) hxU |
| 795 | simpa only [eb, FiberBundle.extend_apply_self] using hh.symm |
| 796 | have hh := ricciFlow_connection_variation_pairing_eq_curvature_derivative_trace |
| 797 | F ht e.open_baseSet X Y Z hX hY hZ hx |
| 798 | change g.inner x (deriv (fun s => (F.connection s).connection Y x (X x)) t) (Z x) = |
| 799 | -(∑ r : ι, g.inner x (dR X (eb r) Y Z x) (b r)) - |
| 800 | (∑ r : ι, g.inner x (dR Y (eb r) Z X x) (b r)) + |
| 801 | ∑ r : ι, g.inner x (dR Z (eb r) X Y x) (b r) at hh |
| 802 | simp only [horth X Y Z hX hY hZ, horth Y Z X hY hZ hX, |
| 803 | horth Z X Y hZ hX hY] at hh |
| 804 | change g.inner x (deriv (fun s => (F.connection s).connection Y x (X x)) t) (Z x) = |
| 805 | -(∑ i, ∑ j, a x i j * low ![X, E i, Y, Z, E j] x) - |
| 806 | (∑ i, ∑ j, a x i j * low ![Y, E i, Z, X, E j] x) + |
| 807 | ∑ i, ∑ j, a x i j * low ![Z, E i, X, Y, E j] x |
| 808 | simp only [hlow X Y Z hX hY hZ, hlow Y Z X hY hZ hX, |
| 809 | hlow Z X Y hZ hX hY, htrace] |
| 810 | exact hh |
| 811 | |
| 812 | set_option maxHeartbeats 1000000 in |
| 813 | set_option synthInstance.maxHeartbeats 200000 in |
| 814 | /-- The actual zeroth-order time-diffusion error is the seven native patterns. -/ |
| 815 | theorem ricciFlow_iteratedCurvature_lowered_residual_zero_patterns |
| 816 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 817 | (x0 : M) : |
| 818 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 819 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 820 | let g := F.metric t |
| 821 | let V := EuclideanSpace ℝ (Fin n) |
| 822 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 823 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 824 | let G := fun y : M => ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 825 | (V →L[ℝ] ℝ) (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) |
| 826 | x0 y x0 y (g.inner y) |
| 827 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 828 | let K := fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) |
| 829 | let low := fun r (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) y => |
| 830 | g.inner y (K t r (Fin.init Z) y) (Z (Fin.last (r + 3)) y) |
| 831 | ∀ (X : Fin 4 → (y : M) → TangentSpace (𝓡 n) y), |
| 832 | (∀ j, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (X j)) e.baseSet) → |
| 833 | ∀ {x : M}, x ∈ e.baseSet → |
| 834 | g.inner x (deriv (fun s => K s 0 (Fin.init X) x) t - |
| 835 | ∑ i, ∑ j, a x i j • K t 2 (Fin.cons (E i) (Fin.cons (E j) (Fin.init X))) x) |
| 836 | (X (Fin.last 3) x) = |
| 837 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern1 |
| 838 | (a x) (fun r Z => low r Z x) E X + |
| 839 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern2 |
| 840 | (a x) (fun r Z => low r Z x) E X + |
| 841 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern3 |
| 842 | (a x) (fun r Z => low r Z x) E X + |
| 843 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern4 |
| 844 | (a x) (fun r Z => low r Z x) E X + |
| 845 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern5 |
| 846 | (a x) (fun r Z => low r Z x) E X + |
| 847 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern6 |
| 848 | (a x) (fun r Z => low r Z x) E X + |
| 849 | CurvatureResidualPattern.evaluate CurvatureResidualPattern.basePattern7 |
| 850 | (a x) (fun r Z => low r Z x) E X := by |
| 851 | classical |
| 852 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 853 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 854 | dsimp only |
| 855 | let g := F.metric t |
| 856 | let D := F.connection t |
| 857 | let V := EuclideanSpace ℝ (Fin n) |
| 858 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 859 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 860 | let G := fun y : M => ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 861 | (V →L[ℝ] ℝ) (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) |
| 862 | x0 y x0 y (g.inner y) |
| 863 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 864 | let K := fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) |
| 865 | let low := fun r (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) y => |
| 866 | g.inner y (K t r (Fin.init Z) y) (Z (Fin.last (r + 3)) y) |
| 867 | intro X hX x hx |
| 868 | let R := D.curvature x |
| 869 | let L := fun u v w z => g.inner x (R u v w) z |
| 870 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 871 | R (R (X 0 x) (X 1 x) r) s (X 2 x) - |
| 872 | (2 : ℝ) • R (X 1 x) r (R s (X 0 x) (X 2 x)) + |
| 873 | (2 : ℝ) • R r (X 0 x) (R (X 1 x) s (X 2 x)) + |
| 874 | R (R (X 0 x) (X 1 x) (X 2 x)) r s - |
| 875 | R (R (X 0 x) r s) (X 1 x) (X 2 x) - |
| 876 | R (X 0 x) (R (X 1 x) r s) (X 2 x) - |
| 877 | R (X 0 x) (X 1 x) (R (X 2 x) r s) |
| 878 | have hd := (hasDerivAt_ricciFlow_iteratedCurvature_zero F ht x0 |
| 879 | (Fin.init X) (fun j => hX j.castSucc) hx).deriv |
| 880 | change deriv (fun s => K s 0 (Fin.init X) x) t = |
| 881 | (∑ i, ∑ j, a x i j • K t 2 (Fin.cons (E i) (Fin.cons (E j) (Fin.init X))) x) + |
| 882 | ∑ i, ∑ j, a x i j • Z (E i x) (E j x) at hd |
| 883 | rw [CurvatureResidualPattern.basePatterns_evaluate, hd, add_sub_cancel_left] |
| 884 | let S := fun Q : (y : M) → TangentSpace (𝓡 n) y => |
| 885 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% Q) e.baseSet |
| 886 | have hE (i : Fin n) : S (E i) := |
| 887 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ _ i |
| 888 | let fill := fun (γ : Fin 4 → Fin n) => Sum.elim X (fun s => E (γ s)) |
| 889 | have hfill (γ : Fin 4 → Fin n) (s : Fin 4 ⊕ Fin 4) : S (fill γ s) := by |
| 890 | cases s with |
| 891 | | inl j => exact hX j |
| 892 | | inr j => exact hE (γ j) |
| 893 | have hlow (γ : Fin 4 → Fin n) (slots : Fin 4 → Fin 4 ⊕ Fin 4) : |
| 894 | low 0 (fun j => fill γ (slots j)) x = |
| 895 | L (fill γ (slots 0) x) (fill γ (slots 1) x) |
| 896 | (fill γ (slots 2) x) (fill γ (slots 3) x) := by |
| 897 | change g.inner x |
| 898 | (D.curvatureOnFields (fill γ (slots 0)) (fill γ (slots 1)) (fill γ (slots 2)) x) |
| 899 | (fill γ (slots 3) x) = _ |
| 900 | rw [← curvature_eq_curvatureOnFields D e.open_baseSet _ _ _ |
| 901 | (hfill γ _) (hfill γ _) (hfill γ _) hx] |
| 902 | have hr := curvature_reaction_lowered_two_contractions D x0 x hx |
| 903 | (X 0 x) (X 1 x) (X 2 x) (X (Fin.last 3) x) |
| 904 | change g.inner x (∑ j0, ∑ j1, a x j0 j1 • Z (E j0 x) (E j1 x)) (X (Fin.last 3) x) = |
| 905 | ∑ j0, ∑ j1, ∑ i0, ∑ i1, (a x i0 i1 * a x j0 j1) * |
| 906 | (L (X 0 x) (X 1 x) (E j0 x) (E i1 x) * |
| 907 | L (E i0 x) (E j1 x) (X 2 x) (X (Fin.last 3) x) - |
| 908 | 2 * (L (X 1 x) (E j0 x) (E i0 x) (X (Fin.last 3) x) * |
| 909 | L (E j1 x) (X 0 x) (X 2 x) (E i1 x)) + |
| 910 | 2 * (L (E j0 x) (X 0 x) (E i0 x) (X (Fin.last 3) x) * |
| 911 | L (X 1 x) (E j1 x) (X 2 x) (E i1 x)) + |
| 912 | L (X 0 x) (X 1 x) (X 2 x) (E i1 x) * |
| 913 | L (E i0 x) (E j0 x) (E j1 x) (X (Fin.last 3) x) - |
| 914 | L (X 0 x) (E j0 x) (E j1 x) (E i1 x) * |
| 915 | L (E i0 x) (X 1 x) (X 2 x) (X (Fin.last 3) x) - |
| 916 | L (X 1 x) (E j0 x) (E j1 x) (E i1 x) * |
| 917 | L (X 0 x) (E i0 x) (X 2 x) (X (Fin.last 3) x) - |
| 918 | L (X 2 x) (E j0 x) (E j1 x) (E i1 x) * |
| 919 | L (X 0 x) (X 1 x) (E i0 x) (X (Fin.last 3) x)) at hr |
| 920 | rw [hr] |
| 921 | change _ = CurvatureResidualPattern.baseReaction (a x) (fun r W => low r W x) E X |
| 922 | dsimp only [CurvatureResidualPattern.baseReaction] |
| 923 | rw [CurvatureResidualPattern.sum_fin_four] |
| 924 | have hfour (f : Fin n → Fin n → Fin n → Fin n → ℝ) : |
| 925 | (∑ u, ∑ v, ∑ i, ∑ j, f i j u v) = ∑ i, ∑ j, ∑ u, ∑ v, f i j u v := by |
| 926 | conv_lhs => arg 2; ext u; rw [Finset.sum_comm] |
| 927 | rw [Finset.sum_comm] |
| 928 | apply Finset.sum_congr rfl |
| 929 | intro i _ |
| 930 | conv_lhs => arg 2; ext u; rw [Finset.sum_comm] |
| 931 | rw [Finset.sum_comm] |
| 932 | rw [hfour] |
| 933 | apply Finset.sum_congr rfl |
| 934 | intro i0 _ |
| 935 | apply Finset.sum_congr rfl |
| 936 | intro i1 _ |
| 937 | apply Finset.sum_congr rfl |
| 938 | intro j0 _ |
| 939 | apply Finset.sum_congr rfl |
| 940 | intro j1 _ |
| 941 | let poly := fun f : (Fin 4 → Fin 4 ⊕ Fin 4) → ℝ => |
| 942 | f ![.inl 0, .inl 1, .inr 2, .inr 1] * f ![.inr 0, .inr 3, .inl 2, .inl 3] - |
| 943 | 2 * (f ![.inl 1, .inr 2, .inr 0, .inl 3] * f ![.inr 3, .inl 0, .inl 2, .inr 1]) + |
| 944 | 2 * (f ![.inr 2, .inl 0, .inr 0, .inl 3] * f ![.inl 1, .inr 3, .inl 2, .inr 1]) + |
| 945 | f ![.inl 0, .inl 1, .inl 2, .inr 1] * f ![.inr 0, .inr 2, .inr 3, .inl 3] - |
| 946 | f ![.inl 0, .inr 2, .inr 3, .inr 1] * f ![.inr 0, .inl 1, .inl 2, .inl 3] - |
| 947 | f ![.inl 1, .inr 2, .inr 3, .inr 1] * f ![.inl 0, .inr 0, .inl 2, .inl 3] - |
| 948 | f ![.inl 2, .inr 2, .inr 3, .inr 1] * f ![.inl 0, .inl 1, .inr 0, .inl 3] |
| 949 | exact (congrArg (fun f => (a x i0 i1 * a x j0 j1) * poly f) |
| 950 | (funext (hlow ![i0, i1, j0, j1]))).symm |
| 951 | |
| 952 | end PoincareMT.RicciFlow.Local |