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/CurvatureDiffusionReaction.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Evolution.CurvatureTimeHessian |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Evolution.CurvatureDiffusionContraction |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.RicciHessianCommutator |
| 8 | |
| 9 | /-! |
| 10 | # Actual curvature diffusion and reaction |
| 11 | |
| 12 | Differentiate cyclic Bianchi with every Hessian correction, commute the |
| 13 | derivatives, and collect the algebraic curvature actions in a fixed basis. |
| 14 | This is the intrinsic (1,3) formula in Kotschwar, arXiv:1206.3225v1, (9). |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option maxHeartbeats 3600000 |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 21 | open Set |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.RicciFlow.Local |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | |
| 30 | theorem hasDerivAt_ricciFlow_curvature_diffusion_reaction |
| 31 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 32 | (x : M) (u v w : TangentSpace (𝓡 n) x) : |
| 33 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 35 | let D := F.connection t |
| 36 | let b := (F.metric t).orthonormalBasis x |
| 37 | let E := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 38 | let X := FiberBundle.extend (EuclideanSpace ℝ (Fin n)) u |
| 39 | let Y := FiberBundle.extend (EuclideanSpace ℝ (Fin n)) v |
| 40 | let Z := FiberBundle.extend (EuclideanSpace ℝ (Fin n)) w |
| 41 | let dR := fun |
| 42 | (A B C E : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 43 | D.connection (fun z => D.curvatureOnFields B C E z) y (A y) - |
| 44 | D.curvatureOnFields |
| 45 | (fun z => D.connection B z (A z)) C E y - |
| 46 | D.curvatureOnFields B |
| 47 | (fun z => D.connection C z (A z)) E y - |
| 48 | D.curvatureOnFields B C |
| 49 | (fun z => D.connection E z (A z)) y |
| 50 | let ddR := fun |
| 51 | (P Q A B C : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 52 | D.connection (fun z => dR Q A B C z) y (P y) - |
| 53 | dR (fun z => D.connection Q z (P z)) A B C y - |
| 54 | dR Q (fun z => D.connection A z (P z)) B C y - |
| 55 | dR Q A (fun z => D.connection B z (P z)) C y - |
| 56 | dR Q A B (fun z => D.connection C z (P z)) y |
| 57 | let R := fun (a c d : TangentSpace (𝓡 n) x) => D.curvature x a c d |
| 58 | let P := fun a : TangentSpace (𝓡 n) x => ∑ i, D.ricci x a (b i) • b i |
| 59 | let L := ∑ i, ddR (E i) (E i) X Y Z x |
| 60 | let Q := (∑ i, |
| 61 | (R (R u v (b i)) (b i) w - |
| 62 | (2 : ℝ) • R v (b i) (R (b i) u w) + |
| 63 | (2 : ℝ) • R (b i) u (R v (b i) w))) + |
| 64 | P (R u v w) - R (P u) v w - R u (P v) w - R u v (P w) |
| 65 | HasDerivAt (fun s => (F.connection s).curvature x u v w) (L + Q) t := by |
| 66 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 67 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 68 | classical |
| 69 | let D := F.connection t |
| 70 | let g := F.metric t |
| 71 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 72 | let b := g.orthonormalBasis x |
| 73 | let b0 : Module.Basis ι ℝ (TangentSpace (𝓡 n) x) := |
| 74 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 75 | ⟨g.toRiemannianMetric⟩ |
| 76 | b.toBasis |
| 77 | have hb0 (i : ι) : b0 i = b i := by |
| 78 | simp only [b0, OrthonormalBasis.coe_toBasis] |
| 79 | let ext := fun a : TangentSpace (𝓡 n) x => |
| 80 | FiberBundle.extend (EuclideanSpace ℝ (Fin n)) a |
| 81 | let E := fun i : ι => ext (b i) |
| 82 | let X := ext u |
| 83 | let Y := ext v |
| 84 | let Z := ext w |
| 85 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 86 | let U := e.baseSet |
| 87 | have hU : IsOpen U := e.open_baseSet |
| 88 | have hx : x ∈ U := FiberBundle.mem_baseSet_trivializationAt' x |
| 89 | let S := fun A : (y : M) → TangentSpace (𝓡 n) y => |
| 90 | ContMDiffOn (𝓡 n) |
| 91 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% A) U |
| 92 | have hExt (a : TangentSpace (𝓡 n) x) : S (ext a) := by |
| 93 | suffices hh : ContMDiffOn (𝓡 n) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∞ |
| 94 | (fun y => (e ⟨y, ext a y⟩).2) U by |
| 95 | intro y hy |
| 96 | rw [e.contMDiffWithinAt_section _ hy] |
| 97 | exact hh y hy |
| 98 | have hh : ContMDiffOn (𝓡 n) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∞ |
| 99 | (fun _y : M => (e ⟨x, a⟩).2) U := contMDiffOn_const |
| 100 | apply hh.congr |
| 101 | intro y hy |
| 102 | change (e ⟨y, e.symm y (e ⟨x, a⟩).2⟩).2 = (e ⟨x, a⟩).2 |
| 103 | simpa only using congrArg Prod.snd (e.apply_mk_symm hy (e ⟨x, a⟩).2) |
| 104 | have hExtValue (a : TangentSpace (𝓡 n) x) : ext a x = a := |
| 105 | FiberBundle.extend_apply_self _ _ |
| 106 | have hX : S X := hExt u |
| 107 | have hY : S Y := hExt v |
| 108 | have hZ : S Z := hExt w |
| 109 | have hE (i : ι) : S (E i) := hExt (b i) |
| 110 | let : IsManifold (𝓡 n) (∞ + 1) M := by |
| 111 | simpa using (inferInstance : IsManifold (𝓡 n) ∞ M) |
| 112 | let : IsManifold (𝓡 n) (minSmoothness ℝ 2) M := |
| 113 | IsManifold.of_le (n := ∞) (by |
| 114 | simpa only [minSmoothness_of_isRCLikeNormedField] using |
| 115 | (ENat.LEInfty.out (m := (2 : ℕ∞ω)))) |
| 116 | let N := fun (A B : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 117 | D.connection B y (A y) |
| 118 | let Rf := fun (A B C : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 119 | D.curvatureOnFields A B C y |
| 120 | let K := fun (A B C G : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 121 | N A (Rf B C G) y - Rf (N A B) C G y - |
| 122 | Rf B (N A C) G y - Rf B C (N A G) y |
| 123 | let H := fun (A B C G L : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 124 | N A (K B C G L) y - K (N A B) C G L y - |
| 125 | K B (N A C) G L y - K B C (N A G) L y - K B C G (N A L) y |
| 126 | let c := fun (A B C : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 127 | mvfderiv (𝓡 n) (fun z => D.ricci z (B z) (C z)) y (A y) - |
| 128 | D.ricci y (N A B y) (C y) - D.ricci y (B y) (N A C y) |
| 129 | let I2 := fun (A B C G : (y : M) → TangentSpace (𝓡 n) y) (y : M) => |
| 130 | mvfderiv (𝓡 n) (c B C G) y (A y) - |
| 131 | c (N A B) C G y - c B (N A C) G y - c B C (N A G) y |
| 132 | let R := fun (a c d : TangentSpace (𝓡 n) x) => D.curvature x a c d |
| 133 | let P := fun a : TangentSpace (𝓡 n) x => ∑ i, D.ricci x a (b i) • b i |
| 134 | let L := ∑ i, H (E i) (E i) X Y Z x |
| 135 | let Q := (∑ i, |
| 136 | (R (R u v (b i)) (b i) w - |
| 137 | (2 : ℝ) • R v (b i) (R (b i) u w) + |
| 138 | (2 : ℝ) • R (b i) u (R v (b i) w))) + |
| 139 | P (R u v w) - R (P u) v w - R u (P v) w - R u v (P w) |
| 140 | let Vtime := fun s => (F.connection s).curvature x u v w |
| 141 | change HasDerivAt Vtime (L + Q) t |
| 142 | have hmd (A : (y : M) → TangentSpace (𝓡 n) y) (hA : S A) |
| 143 | {y : M} (hy : y ∈ U) : |
| 144 | MDifferentiableAt (𝓡 n) |
| 145 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) (T% A) y := |
| 146 | (hA.contMDiffAt (hU.mem_nhds hy)).mdifferentiableAt (by simp) |
| 147 | have hN (A B : (y : M) → TangentSpace (𝓡 n) y) |
| 148 | (hA : S A) (hB : S B) : S (N A B) := |
| 149 | D.contMDiffOn_connection_apply hU A B hA hB |
| 150 | have hRf (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 151 | (hA : S A) (hB : S B) (hC : S C) : S (Rf A B C) := by |
| 152 | have hbr : S (VectorField.mlieBracket (𝓡 n) A B) := by |
| 153 | intro y hy |
| 154 | exact ((hA.contMDiffAt (hU.mem_nhds hy)).mlieBracket_vectorField |
| 155 | (hB.contMDiffAt (hU.mem_nhds hy)) (m := ⊤) (n := ⊤) |
| 156 | (by simp)).contMDiffWithinAt |
| 157 | exact ((hN A _ hA (hN B C hB hC)).sub_section |
| 158 | (hN B _ hB (hN A C hA hC))).sub_section (hN _ C hbr hC) |
| 159 | have hK (A B C G : (y : M) → TangentSpace (𝓡 n) y) |
| 160 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) : S (K A B C G) := |
| 161 | (((hN A _ hA (hRf B C G hB hC hG)).sub_section |
| 162 | (hRf _ C G (hN A B hA hB) hC hG)).sub_section |
| 163 | (hRf B _ G hB (hN A C hA hC) hG)).sub_section |
| 164 | (hRf B C _ hB hC (hN A G hA hG)) |
| 165 | have hc := D.connection.isCovariantDerivativeOn (s := univ) |
| 166 | have hNadd (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 167 | (hB : S B) (hC : S C) {y : M} (hy : y ∈ U) : |
| 168 | N A (B + C) y = N A B y + N A C y := |
| 169 | congrArg (fun f => f (A y)) (hc.add (hmd B hB hy) (hmd C hC hy)) |
| 170 | have hNneg (A B : (y : M) → TangentSpace (𝓡 n) y) |
| 171 | (hB : S B) {y : M} (hy : y ∈ U) : N A (-B) y = -N A B y := by |
| 172 | simpa only [neg_one_smul, neg_apply, N] using |
| 173 | congrArg (fun f => f (A y)) (hc.smul_const (-1) (hmd B hB hy)) |
| 174 | have hNcongr (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 175 | (hB : S B) (hC : S C) (heq : ∀ y ∈ U, B y = C y) |
| 176 | {y : M} (hy : y ∈ U) : N A B y = N A C y := |
| 177 | congrArg (fun f => f (A y)) |
| 178 | ((D.connection.isCovariantDerivativeOn (s := U)).congr_of_eqOn |
| 179 | (hmd B hB hy) (hmd C hC hy) (hU.mem_nhds hy) heq) |
| 180 | have hRfSwap (A B C : (y : M) → TangentSpace (𝓡 n) y) : |
| 181 | Rf A B C = -Rf B A C := |
| 182 | funext fun y => curvatureOnFields_swap D A B C y |
| 183 | have hKSwap (A B C G : (y : M) → TangentSpace (𝓡 n) y) |
| 184 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) |
| 185 | {y : M} (hy : y ∈ U) : K A B C G y = -K A C B G y := by |
| 186 | dsimp only [K] |
| 187 | rw [hRfSwap B C G, hNneg A (Rf C B G) (hRf C B G hC hB hG) hy, |
| 188 | hRfSwap (N A B) C G, hRfSwap B (N A C) G, hRfSwap B C (N A G)] |
| 189 | simp only [Pi.neg_apply] |
| 190 | module |
| 191 | have hKCyclic (A B C G : (y : M) → TangentSpace (𝓡 n) y) |
| 192 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) |
| 193 | {y : M} (hy : y ∈ U) : |
| 194 | K A B C G y + K B C A G y + K C A B G y = 0 := |
| 195 | curvatureOnFields_second_bianchi D hU A B C G hA hB hC hG hy |
| 196 | have hHCyclic (P Q A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 197 | (hP : S P) (hQ : S Q) (hA : S A) (hB : S B) (hC : S C) : |
| 198 | H P Q A B C x + H P A B Q C x + H P B Q A C x = 0 := by |
| 199 | have hs := ((hK Q A B C hQ hA hB hC).add_section |
| 200 | (hK A B Q C hA hB hQ hC)).add_section (hK B Q A C hB hQ hA hC) |
| 201 | have heq := congrArg (fun f => f (P x)) |
| 202 | ((D.connection.isCovariantDerivativeOn (s := U)).congr_of_eqOn |
| 203 | (hmd _ hs hx) (Bundle.mdifferentiableAt_zeroSection ..) (hU.mem_nhds hx) |
| 204 | (fun y hy => hKCyclic Q A B C hQ hA hB hC hy)) |
| 205 | have hd : N P (K Q A B C) x + N P (K A B Q C) x + |
| 206 | N P (K B Q A C) x = 0 := by |
| 207 | change N P (K Q A B C + K A B Q C + K B Q A C) x = |
| 208 | D.connection 0 x (P x) at heq |
| 209 | rw [hNadd P _ _ ((hK Q A B C hQ hA hB hC).add_section |
| 210 | (hK A B Q C hA hB hQ hC)) (hK B Q A C hB hQ hA hC) hx, |
| 211 | hNadd P _ _ (hK Q A B C hQ hA hB hC) (hK A B Q C hA hB hQ hC) hx, |
| 212 | hc.zero, zero_apply] at heq |
| 213 | exact heq |
| 214 | have hq := hKCyclic (N P Q) A B C (hN P Q hP hQ) hA hB hC hx |
| 215 | have ha := hKCyclic Q (N P A) B C hQ (hN P A hP hA) hB hC hx |
| 216 | have hb := hKCyclic Q A (N P B) C hQ hA (hN P B hP hB) hC hx |
| 217 | have hh := hKCyclic Q A B (N P C) hQ hA hB (hN P C hP hC) hx |
| 218 | calc |
| 219 | _ = (N P (K Q A B C) x + N P (K A B Q C) x + N P (K B Q A C) x) - |
| 220 | (K (N P Q) A B C x + K A B (N P Q) C x + K B (N P Q) A C x) - |
| 221 | (K Q (N P A) B C x + K (N P A) B Q C x + K B Q (N P A) C x) - |
| 222 | (K Q A (N P B) C x + K A (N P B) Q C x + K (N P B) Q A C x) - |
| 223 | (K Q A B (N P C) x + K A B Q (N P C) x + K B Q A (N P C) x) := by |
| 224 | dsimp only [H] |
| 225 | module |
| 226 | _ = 0 := by rw [hd, hq, ha, hb, hh]; module |
| 227 | have hHSwap (P Q A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 228 | (hP : S P) (hQ : S Q) (hA : S A) (hB : S B) (hC : S C) : |
| 229 | H P Q A B C x = -H P Q B A C x := by |
| 230 | have hd := hNcongr P (K Q A B C) (-K Q B A C) |
| 231 | (hK Q A B C hQ hA hB hC) (hK Q B A C hQ hB hA hC).neg_section |
| 232 | (fun y hy => hKSwap Q A B C hQ hA hB hC hy) hx |
| 233 | rw [hNneg P _ (hK Q B A C hQ hB hA hC) hx] at hd |
| 234 | dsimp only [H] |
| 235 | rw [hd, |
| 236 | hKSwap (N P Q) A B C (hN P Q hP hQ) hA hB hC hx, |
| 237 | hKSwap Q (N P A) B C hQ (hN P A hP hA) hB hC hx, |
| 238 | hKSwap Q A (N P B) C hQ hA (hN P B hP hB) hC hx, |
| 239 | hKSwap Q A B (N P C) hQ hA hB (hN P C hP hC) hx] |
| 240 | module |
| 241 | have hDirectionTrace (A B C G : (y : M) → TangentSpace (𝓡 n) y) |
| 242 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) : |
| 243 | (∑ i, b0.repr (H A (E i) B C G x) i) = |
| 244 | I2 A B C G x - I2 A C B G x := by |
| 245 | have hh₁ := ricci_second_covariant_derivative_eq_sum_basis D hU A B C G |
| 246 | hA hB hC hG hx b0 |
| 247 | have hh₂ := ricci_second_covariant_derivative_eq_sum_basis D hU A C B G |
| 248 | hA hC hB hG hx b0 |
| 249 | change I2 A B C G x = ∑ i, b0.repr (H A B (E i) C G x) i at hh₁ |
| 250 | change I2 A C B G x = ∑ i, b0.repr (H A C (E i) B G x) i at hh₂ |
| 251 | rw [hh₁, hh₂, ← Finset.sum_sub_distrib] |
| 252 | apply Finset.sum_congr rfl |
| 253 | intro i _hi |
| 254 | have hc := hHCyclic A (E i) B C G hA (hE i) hB hC hG |
| 255 | rw [hHSwap A B C (E i) G hA hB hC (hE i) hG] at hc |
| 256 | have hi : H A (E i) B C G x = H A B (E i) C G x - H A C (E i) B G x := by |
| 257 | apply eq_of_sub_eq_zero |
| 258 | calc |
| 259 | _ = H A (E i) B C G x + -H A B (E i) C G x + H A C (E i) B G x := by |
| 260 | module |
| 261 | _ = 0 := hc |
| 262 | rw [hi, map_sub, Finsupp.sub_apply] |
| 263 | have hcoord (a : TangentSpace (𝓡 n) x) (i : ι) : |
| 264 | b0.repr a i = g.inner x a (b i) := by |
| 265 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 266 | ⟨g.toRiemannianMetric⟩ |
| 267 | change b.toBasis.repr a i = _ |
| 268 | rw [b.coe_toBasis_repr_apply, b.repr_apply_apply] |
| 269 | exact g.symm x (b i) a |
| 270 | have hRfEval (A B C : (y : M) → TangentSpace (𝓡 n) y) |
| 271 | (hA : S A) (hB : S B) (hC : S C) : |
| 272 | Rf A B C x = R (A x) (B x) (C x) := |
| 273 | (curvature_eq_curvatureOnFields D hU A B C hA hB hC hx).symm |
| 274 | let CR := fun (a b c d e : TangentSpace (𝓡 n) x) => |
| 275 | R a b (R c d e) - R (R a b c) d e - R c (R a b d) e - R c d (R a b e) |
| 276 | let Cr := fun (a b c d : TangentSpace (𝓡 n) x) => |
| 277 | -D.ricci x (R a b c) d - D.ricci x c (R a b d) |
| 278 | let U0 := fun d : TangentSpace (𝓡 n) x => |
| 279 | ∑ i, g.inner x (CR d (b i) u v w - CR w (b i) u v d) (b i) |
| 280 | let V0 := fun d : TangentSpace (𝓡 n) x => |
| 281 | -Cr u v w d - Cr u w v d + Cr v w u d + Cr u d v w - Cr v d u w |
| 282 | have hCurvComm (A B C G W : (y : M) → TangentSpace (𝓡 n) y) |
| 283 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) (hW : S W) : |
| 284 | H A B C G W x - H B A C G W x = CR (A x) (B x) (C x) (G x) (W x) := by |
| 285 | have hh := curvatureOnFields_second_derivative_commutator D hU |
| 286 | A B C G W hA hB hC hG hW hx |
| 287 | change H A B C G W x - H B A C G W x = |
| 288 | Rf A B (Rf C G W) x - Rf (Rf A B C) G W x - |
| 289 | Rf C (Rf A B G) W x - Rf C G (Rf A B W) x at hh |
| 290 | simp (disch := solve_by_elim [hRf]) only [hRfEval] at hh |
| 291 | exact hh |
| 292 | have hRicComm (A B C G : (y : M) → TangentSpace (𝓡 n) y) |
| 293 | (hA : S A) (hB : S B) (hC : S C) (hG : S G) : |
| 294 | I2 A B C G x - I2 B A C G x = Cr (A x) (B x) (C x) (G x) := by |
| 295 | have hh := ricci_second_covariant_derivative_commutator D hU |
| 296 | A B C G hA hB hC hG hx |
| 297 | change I2 A B C G x - I2 B A C G x = |
| 298 | -D.ricci x (Rf A B C x) (G x) - D.ricci x (C x) (Rf A B G x) at hh |
| 299 | rw [hRfEval A B C hA hB hC, hRfEval A B G hA hB hG] at hh |
| 300 | exact hh |
| 301 | have hPrincipal (W : (y : M) → TangentSpace (𝓡 n) y) (hW : S W) : |
| 302 | (I2 W X Y Z x - I2 W Y X Z x) - (I2 Z X Y W x - I2 Z Y X W x) = |
| 303 | g.inner x L (W x) + U0 (W x) := by |
| 304 | rw [← hDirectionTrace W X Y Z hW hX hY hZ, |
| 305 | ← hDirectionTrace Z X Y W hZ hX hY hW, ← Finset.sum_sub_distrib] |
| 306 | have hi (i : ι) : |
| 307 | b0.repr (H W (E i) X Y Z x) i - |
| 308 | b0.repr (H Z (E i) X Y W x) i = |
| 309 | g.inner x (H (E i) (E i) X Y Z x) (W x) + |
| 310 | g.inner x (CR (W x) (b i) u v w - CR w (b i) u v (W x)) (b i) := by |
| 311 | have hc₁ := congrArg (fun a => g.inner x a (b i)) |
| 312 | (hCurvComm W (E i) X Y Z hW (hE i) hX hY hZ) |
| 313 | have hc₂ := congrArg (fun a => g.inner x a (b i)) |
| 314 | (hCurvComm Z (E i) X Y W hZ (hE i) hX hY hW) |
| 315 | simp only [X, Y, Z, E, hExtValue, map_sub, sub_apply] at hc₁ hc₂ |
| 316 | have hp := curvatureOnFields_hessian_bianchi_pairing D hU |
| 317 | (E i) W X Y Z (E i) (hE i) hW hX hY hZ (hE i) hx |
| 318 | change g.inner x (H (E i) W X Y Z x) (E i x) - |
| 319 | g.inner x (H (E i) Z X Y W x) (E i x) = |
| 320 | g.inner x (H (E i) (E i) X Y Z x) (W x) at hp |
| 321 | have hei : E i x = b i := hExtValue (b i) |
| 322 | rw [hei] at hp |
| 323 | simp only [hcoord, map_sub, sub_apply, X, Y, Z, E] at hp ⊢ |
| 324 | linarith only [hc₁, hc₂, hp] |
| 325 | calc |
| 326 | _ = ∑ i, (g.inner x (H (E i) (E i) X Y Z x) (W x) + |
| 327 | g.inner x (CR (W x) (b i) u v w - CR w (b i) u v (W x)) (b i)) := |
| 328 | Finset.sum_congr rfl (fun i _hi => hi i) |
| 329 | _ = _ := by |
| 330 | simp only [Finset.sum_add_distrib, L, U0, map_sum, sum_apply] |
| 331 | rfl |
| 332 | have hGeo (d : TangentSpace (𝓡 n) x) : |
| 333 | g.inner x (deriv Vtime t) d = g.inner x L d + U0 d + V0 d := by |
| 334 | let W := ext d |
| 335 | have hW : S W := hExt d |
| 336 | have hh := (ricciFlow_curvature_time_derivative_pairing F ht hU |
| 337 | X Y Z W hX hY hZ hW hx).2 |
| 338 | have hxv : X x = u := hExtValue u |
| 339 | have hyv : Y x = v := hExtValue v |
| 340 | have hzv : Z x = w := hExtValue w |
| 341 | have hwv : W x = d := hExtValue d |
| 342 | change g.inner x (deriv (fun s => (F.connection s).curvature x (X x) (Y x) (Z x)) t) |
| 343 | (W x) = -I2 X Y Z W x - I2 X Z Y W x + I2 X W Y Z x + |
| 344 | I2 Y X Z W x + I2 Y Z X W x - I2 Y W X Z x at hh |
| 345 | rw [hxv, hyv, hzv, hwv] at hh |
| 346 | have hp := hPrincipal W hW |
| 347 | rw [hwv] at hp |
| 348 | have h₁ := hRicComm X Y Z W hX hY hZ hW |
| 349 | have h₂ := hRicComm X Z Y W hX hZ hY hW |
| 350 | have h₃ := hRicComm Y Z X W hY hZ hX hW |
| 351 | have h₄ := hRicComm X W Y Z hX hW hY hZ |
| 352 | have h₅ := hRicComm Y W X Z hY hW hX hZ |
| 353 | rw [hxv, hyv, hzv, hwv] at h₁ h₂ h₃ h₄ h₅ |
| 354 | change g.inner x (deriv Vtime t) d = _ at hh |
| 355 | dsimp only [V0] |
| 356 | linarith only [hh, hp, h₁, h₂, h₃, h₄, h₅] |
| 357 | let E0 := TangentSpace (𝓡 n) x |
| 358 | let k := fun (a b c d : E0) => g.inner x (R a b c) d |
| 359 | let ρ := D.ricci x |
| 360 | obtain ⟨T, hT⟩ := exists_curvature_trilinearMap D x |
| 361 | have hRT (a b c : E0) : R a b c = T a b c := (hT a b c).symm |
| 362 | have hrec (a : E0) : ∑ i, b0.repr a i • b i = a := b0.sum_repr a |
| 363 | have hk12 (A B C G : E0) : k A B C G = -k B A C G := by |
| 364 | have hh := congrArg (fun a => g.inner x a G) |
| 365 | (curvatureOnFields_swap D (ext A) (ext B) (ext C) x) |
| 366 | change g.inner x (D.curvatureOnFields (ext A) (ext B) (ext C) x) G = |
| 367 | -g.inner x (D.curvatureOnFields (ext B) (ext A) (ext C) x) G |
| 368 | simpa only [map_neg, neg_apply] using hh |
| 369 | have hk34 (A B C G : E0) : k A B C G = -k A B G C := by |
| 370 | have hh := curvature_pair_skew D x A B C G |
| 371 | rw [g.symm x C (D.curvature x A B G)] at hh |
| 372 | exact hh |
| 373 | have hkrev (A B C G : E0) : k A B C G = k G C B A := |
| 374 | curvatureTensor_pair_exchange D x A B G C |
| 375 | have hkpair (A B C G : E0) : k A B C G = k C G A B := by |
| 376 | rw [hkrev A B C G, hk12 G C B A, hk34 C G B A, neg_neg] |
| 377 | have hkcyclic (A B C G : E0) : k A B C G + k B C A G + k C A B G = 0 := by |
| 378 | have hh := congrArg (fun a => g.inner x a G) |
| 379 | (curvatureOnFields_first_bianchi D hU (ext A) (ext B) (ext C) |
| 380 | (hExt A) (hExt B) (hExt C) hx) |
| 381 | change g.inner x (D.curvatureOnFields (ext A) (ext B) (ext C) x) G + |
| 382 | g.inner x (D.curvatureOnFields (ext B) (ext C) (ext A) x) G + |
| 383 | g.inner x (D.curvatureOnFields (ext C) (ext A) (ext B) x) G = 0 |
| 384 | simpa only [map_add, add_apply, map_zero, zero_apply] using hh |
| 385 | have htrace (A B : E0) : ρ A B = ∑ p, k (b p) A B (b p) := by |
| 386 | have hh := ricci_eq_sum_basis_of_curvature_pairing D x A B b0 |
| 387 | simpa only [ρ, hcoord, k, R, hb0] using hh |
| 388 | have hρsym (A B : E0) : ρ A B = ρ B A := by |
| 389 | have he (A B : E0) : |
| 390 | HasDerivAt (fun s => (F.metric s).inner x A B) (-2 * ρ A B) t := |
| 391 | (F.equation t (interior_subset ht) x A B).hasDerivAt |
| 392 | (mem_interior_iff_mem_nhds.mp ht) |
| 393 | have hb := (he B A).congr_of_eventuallyEq |
| 394 | (Filter.Eventually.of_forall (fun s => (F.metric s).symm x A B)) |
| 395 | have hh := (he A B).unique hb |
| 396 | linarith only [hh] |
| 397 | have hksum1 (a : ι → E0) (f : ι → ℝ) (B C G : E0) : |
| 398 | k (∑ i, f i • a i) B C G = ∑ i, f i * k (a i) B C G := by |
| 399 | simp only [k, hRT, map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 400 | sum_apply, smul_apply, smul_eq_mul] |
| 401 | have hksum2 (a : ι → E0) (f : ι → ℝ) (A C G : E0) : |
| 402 | k A (∑ i, f i • a i) C G = ∑ i, f i * k A (a i) C G := by |
| 403 | simp only [k, hRT, map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 404 | sum_apply, smul_apply, smul_eq_mul] |
| 405 | have hksum3 (a : ι → E0) (f : ι → ℝ) (A B G : E0) : |
| 406 | k A B (∑ i, f i • a i) G = ∑ i, f i * k A B (a i) G := by |
| 407 | simp only [k, hRT, map_sum, map_smul, sum_apply, smul_apply, smul_eq_mul] |
| 408 | have hρsum1 (a : ι → E0) (f : ι → ℝ) (B : E0) : |
| 409 | ρ (∑ i, f i • a i) B = ∑ i, f i * ρ (a i) B := by |
| 410 | simp only [htrace, hksum2, Finset.mul_sum] |
| 411 | rw [Finset.sum_comm] |
| 412 | have hρsum2 (a : ι → E0) (f : ι → ℝ) (A : E0) : |
| 413 | ρ A (∑ i, f i • a i) = ∑ i, f i * ρ A (a i) := by |
| 414 | simp only [htrace, hksum3, Finset.mul_sum] |
| 415 | rw [Finset.sum_comm] |
| 416 | have hkR1 (A B C G L W : E0) : |
| 417 | k (R A B C) G L W = ∑ i, k A B C (b i) * k (b i) G L W := by |
| 418 | calc |
| 419 | _ = k (∑ i, b0.repr (R A B C) i • b i) G L W := by rw [hrec] |
| 420 | _ = _ := by rw [hksum1]; simp only [hcoord, k]; rfl |
| 421 | have hkR2 (A B C G L W : E0) : |
| 422 | k A (R B C G) L W = ∑ i, k B C G (b i) * k A (b i) L W := by |
| 423 | calc |
| 424 | _ = k A (∑ i, b0.repr (R B C G) i • b i) L W := by rw [hrec] |
| 425 | _ = _ := by rw [hksum2]; simp only [hcoord, k]; rfl |
| 426 | have hkR3 (A B C G L W : E0) : |
| 427 | k A B (R C G L) W = ∑ i, k C G L (b i) * k A B (b i) W := by |
| 428 | calc |
| 429 | _ = k A B (∑ i, b0.repr (R C G L) i • b i) W := by rw [hrec] |
| 430 | _ = _ := by rw [hksum3]; simp only [hcoord, k]; rfl |
| 431 | have hρR1 (A B C G : E0) : |
| 432 | ρ (R A B C) G = ∑ i, k A B C (b i) * ρ (b i) G := by |
| 433 | calc |
| 434 | _ = ρ (∑ i, b0.repr (R A B C) i • b i) G := by rw [hrec] |
| 435 | _ = _ := by rw [hρsum1]; simp only [hcoord, k]; rfl |
| 436 | have hρR2 (A B C G : E0) : |
| 437 | ρ A (R B C G) = ∑ i, k B C G (b i) * ρ A (b i) := by |
| 438 | calc |
| 439 | _ = ρ A (∑ i, b0.repr (R B C G) i • b i) := by rw [hrec] |
| 440 | _ = _ := by rw [hρsum2]; simp only [hcoord, k]; rfl |
| 441 | have hInnerP (A B : E0) : g.inner x (P A) B = ρ A B := by |
| 442 | calc |
| 443 | _ = ∑ i, ρ A (b i) * g.inner x (b i) B := by |
| 444 | simp only [P, ρ, map_sum, map_smul, sum_apply, smul_apply, smul_eq_mul] |
| 445 | _ = ∑ i, b0.repr B i * ρ A (b i) := by |
| 446 | apply Finset.sum_congr rfl |
| 447 | intro i _hi |
| 448 | rw [hcoord, g.symm x (b i) B] |
| 449 | ring |
| 450 | _ = ρ A (∑ i, b0.repr B i • b i) := (hρsum2 _ _ A).symm |
| 451 | _ = ρ A B := by rw [hrec] |
| 452 | let F0 := fun (d : E0) (p a : ι) => |
| 453 | k u v (b p) (b a) * k (b a) (b p) w d |
| 454 | let Fp := fun (d : E0) (p a : ι) => |
| 455 | k (b p) u (b a) d * k v (b p) w (b a) |
| 456 | let Fm := fun (d : E0) (p a : ι) => |
| 457 | k (b p) u w (b a) * k v (b p) (b a) d |
| 458 | let Q0 := fun d : E0 => ∑ p, ∑ a, |
| 459 | (F0 d p a - 2 * Fm d p a + 2 * Fp d p a) |
| 460 | let O := fun d : E0 => ∑ a, ρ d (b a) * k u v w (b a) |
| 461 | let I := fun d : E0 => ∑ a, ρ u (b a) * k (b a) v w d |
| 462 | let Jinput := fun d : E0 => ∑ a, ρ v (b a) * k u (b a) w d |
| 463 | let Kinput := fun d : E0 => ∑ a, ρ w (b a) * k u v (b a) d |
| 464 | let U8 := fun (d : E0) (p a : ι) => |
| 465 | k u v w (b a) * k d (b p) (b a) (b p) - |
| 466 | k d (b p) u (b a) * k (b a) v w (b p) - |
| 467 | k d (b p) v (b a) * k u (b a) w (b p) - |
| 468 | k d (b p) w (b a) * k u v (b a) (b p) - |
| 469 | k u v d (b a) * k w (b p) (b a) (b p) + |
| 470 | k w (b p) u (b a) * k (b a) v d (b p) + |
| 471 | k w (b p) v (b a) * k u (b a) d (b p) + |
| 472 | k w (b p) d (b a) * k u v (b a) (b p) |
| 473 | let V4 := fun (d : E0) (a : ι) => |
| 474 | (k u v w (b a) + k u w v (b a) - k v w u (b a)) * ρ (b a) d + |
| 475 | (k u v d (b a) - k u d v (b a) + k v d u (b a)) * ρ (b a) w + |
| 476 | (k u w d (b a) - k u d w (b a)) * ρ v (b a) + |
| 477 | (-k v w d (b a) + k v d w (b a)) * ρ u (b a) |
| 478 | have hUcore (d : E0) (p a : ι) : |
| 479 | U8 d p a = |
| 480 | (k u v w (b a) * k d (b p) (b a) (b p) - |
| 481 | k u v d (b a) * k w (b p) (b a) (b p)) + |
| 482 | (F0 d a p - 2 * Fm d a p + 2 * Fp d a p) := by |
| 483 | have h0 : |
| 484 | (k w (b p) d (b a) - k d (b p) w (b a)) * |
| 485 | k u v (b a) (b p) = F0 d a p := by |
| 486 | have hc := hkcyclic w (b p) d (b a) |
| 487 | rw [hk12 (b p) d w (b a), hk12 d w (b p) (b a), |
| 488 | hkpair w d (b p) (b a)] at hc |
| 489 | have he : k w (b p) d (b a) - k d (b p) w (b a) = |
| 490 | k (b p) (b a) w d := by |
| 491 | linarith only [hc] |
| 492 | dsimp only [F0] |
| 493 | rw [he] |
| 494 | ring |
| 495 | have h1 : k d (b p) u (b a) * k (b a) v w (b p) = -Fp d a p := by |
| 496 | dsimp only [Fp] |
| 497 | rw [hkrev d (b p) u (b a), hk12 (b a) v w (b p)] |
| 498 | ring |
| 499 | have h2 : k w (b p) u (b a) * k (b a) v d (b p) = -Fm d a p := by |
| 500 | dsimp only [Fm] |
| 501 | rw [hkpair w (b p) u (b a), hk12 u (b a) w (b p), |
| 502 | hk12 (b a) v d (b p), hk34 v (b a) d (b p)] |
| 503 | ring |
| 504 | have h3 : k d (b p) v (b a) * k u (b a) w (b p) = Fm d a p := by |
| 505 | dsimp only [Fm] |
| 506 | rw [hkrev d (b p) v (b a), hk12 (b a) v (b p) d, |
| 507 | hk12 u (b a) w (b p)] |
| 508 | ring |
| 509 | have h4 : k w (b p) v (b a) * k u (b a) d (b p) = Fp d a p := by |
| 510 | dsimp only [Fp] |
| 511 | rw [hkpair w (b p) v (b a), hk12 u (b a) d (b p), hk34 (b a) u d (b p)] |
| 512 | ring |
| 513 | calc |
| 514 | U8 d p a = |
| 515 | (k u v w (b a) * k d (b p) (b a) (b p) - |
| 516 | k u v d (b a) * k w (b p) (b a) (b p)) + |
| 517 | ((k w (b p) d (b a) - k d (b p) w (b a)) * k u v (b a) (b p)) - |
| 518 | (k d (b p) u (b a) * k (b a) v w (b p)) + |
| 519 | (k w (b p) u (b a) * k (b a) v d (b p)) - |
| 520 | (k d (b p) v (b a) * k u (b a) w (b p)) + |
| 521 | (k w (b p) v (b a) * k u (b a) d (b p)) := by |
| 522 | dsimp only [U8] |
| 523 | ring |
| 524 | _ = _ := by |
| 525 | conv_lhs => rw [h0, h1, h2, h3, h4] |
| 526 | ring |
| 527 | have htraceNeg (A B : E0) : (∑ p, k A (b p) B (b p)) = -ρ A B := by |
| 528 | calc |
| 529 | _ = ∑ p, -k (b p) A B (b p) := by |
| 530 | apply Finset.sum_congr rfl |
| 531 | intro p _hp |
| 532 | exact hk12 A (b p) B (b p) |
| 533 | _ = -ρ A B := by rw [Finset.sum_neg_distrib, ← htrace A B] |
| 534 | have hUout1 (d : E0) : |
| 535 | (∑ p, ∑ a, k u v w (b a) * k d (b p) (b a) (b p)) = -O d := by |
| 536 | calc |
| 537 | _ = ∑ a, ∑ p, k u v w (b a) * k d (b p) (b a) (b p) := Finset.sum_comm |
| 538 | _ = ∑ a, k u v w (b a) * (-ρ d (b a)) := by |
| 539 | apply Finset.sum_congr rfl |
| 540 | intro a _ha |
| 541 | rw [← Finset.mul_sum, htraceNeg d (b a)] |
| 542 | _ = ∑ a, -(ρ d (b a) * k u v w (b a)) := by |
| 543 | apply Finset.sum_congr rfl |
| 544 | intro a _ha |
| 545 | ring |
| 546 | _ = -O d := by simp only [O, Finset.sum_neg_distrib] |
| 547 | have hUout2 (d : E0) : |
| 548 | (∑ p, ∑ a, k u v d (b a) * k w (b p) (b a) (b p)) = Kinput d := by |
| 549 | calc |
| 550 | _ = ∑ a, ∑ p, k u v d (b a) * k w (b p) (b a) (b p) := Finset.sum_comm |
| 551 | _ = ∑ a, k u v d (b a) * (-ρ w (b a)) := by |
| 552 | apply Finset.sum_congr rfl |
| 553 | intro a _ha |
| 554 | rw [← Finset.mul_sum, htraceNeg w (b a)] |
| 555 | _ = Kinput d := by |
| 556 | dsimp only [Kinput] |
| 557 | apply Finset.sum_congr rfl |
| 558 | intro a _ha |
| 559 | rw [hk34 u v d (b a)] |
| 560 | ring |
| 561 | have hUfinite (d : E0) : (∑ p, ∑ a, U8 d p a) = Q0 d - O d - Kinput d := by |
| 562 | have hquad : |
| 563 | (∑ p, ∑ a, (F0 d a p - 2 * Fm d a p + 2 * Fp d a p)) = Q0 d := by |
| 564 | dsimp only [Q0] |
| 565 | exact Finset.sum_comm |
| 566 | calc |
| 567 | _ = (∑ p, ∑ a, k u v w (b a) * k d (b p) (b a) (b p)) - |
| 568 | (∑ p, ∑ a, k u v d (b a) * k w (b p) (b a) (b p)) + |
| 569 | (∑ p, ∑ a, (F0 d a p - 2 * Fm d a p + 2 * Fp d a p)) := by |
| 570 | simp_rw [hUcore d] |
| 571 | simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib] |
| 572 | rfl |
| 573 | _ = _ := by rw [hUout1 d, hUout2 d, hquad]; ring |
| 574 | have hVcore (d : E0) (a : ι) : |
| 575 | V4 d a = 2 * (ρ d (b a) * k u v w (b a)) - |
| 576 | ρ u (b a) * k (b a) v w d - ρ v (b a) * k u (b a) w d := by |
| 577 | have h1 : k u v w (b a) + k u w v (b a) - k v w u (b a) = |
| 578 | 2 * k u v w (b a) := by |
| 579 | have hc := hkcyclic u v w (b a) |
| 580 | rw [hk12 w u v (b a)] at hc |
| 581 | linarith only [hc] |
| 582 | have h2 : k u v d (b a) - k u d v (b a) + k v d u (b a) = 0 := by |
| 583 | have hc := hkcyclic u v d (b a) |
| 584 | rw [hk12 d u v (b a)] at hc |
| 585 | linarith only [hc] |
| 586 | have h3 : k u w d (b a) - k u d w (b a) = -k u (b a) w d := by |
| 587 | have hc := hkcyclic u w d (b a) |
| 588 | rw [hk12 d u w (b a), hkpair w d u (b a)] at hc |
| 589 | linarith only [hc] |
| 590 | have h4 : -k v w d (b a) + k v d w (b a) = -k (b a) v w d := by |
| 591 | have hc := hkcyclic v w d (b a) |
| 592 | rw [hk12 d v w (b a), hkpair w d v (b a), hk12 v (b a) w d] at hc |
| 593 | linarith only [hc] |
| 594 | dsimp only [V4] |
| 595 | rw [h1, h2, h3, h4, hρsym (b a) d] |
| 596 | ring |
| 597 | have hV (d : E0) : (∑ a, V4 d a) = 2 * O d - I d - Jinput d := by |
| 598 | calc |
| 599 | _ = ∑ a, (2 * (ρ d (b a) * k u v w (b a)) - |
| 600 | ρ u (b a) * k (b a) v w d - ρ v (b a) * k u (b a) w d) := by |
| 601 | apply Finset.sum_congr rfl |
| 602 | intro a _ha |
| 603 | exact hVcore d a |
| 604 | _ = _ := by |
| 605 | simp only [O, I, Jinput, Finset.sum_sub_distrib, Finset.mul_sum] |
| 606 | have hUexpand (d : E0) : U0 d = ∑ p, ∑ a, U8 d p a := by |
| 607 | dsimp only [U0] |
| 608 | apply Finset.sum_congr rfl |
| 609 | intro p _hp |
| 610 | dsimp only [CR] |
| 611 | simp only [map_sub, sub_apply] |
| 612 | change (k d (b p) (R u v w) (b p) - k (R d (b p) u) v w (b p) - |
| 613 | k u (R d (b p) v) w (b p) - k u v (R d (b p) w) (b p)) - |
| 614 | (k w (b p) (R u v d) (b p) - k (R w (b p) u) v d (b p) - |
| 615 | k u (R w (b p) v) d (b p) - k u v (R w (b p) d) (b p)) = _ |
| 616 | simp only [hkR1, hkR2, hkR3, U8, Finset.sum_add_distrib, Finset.sum_sub_distrib] |
| 617 | ring |
| 618 | have hVexpand (d : E0) : V0 d = ∑ a, V4 d a := by |
| 619 | dsimp only [V0, Cr] |
| 620 | change -(-ρ (R u v w) d - ρ w (R u v d)) - |
| 621 | (-ρ (R u w v) d - ρ v (R u w d)) + |
| 622 | (-ρ (R v w u) d - ρ u (R v w d)) + |
| 623 | (-ρ (R u d v) w - ρ v (R u d w)) - |
| 624 | (-ρ (R v d u) w - ρ u (R v d w)) = _ |
| 625 | simp only [hρR1, hρR2, hρsym w, V4, add_mul, sub_mul, neg_mul, |
| 626 | Finset.sum_add_distrib, Finset.sum_sub_distrib, Finset.sum_neg_distrib] |
| 627 | ring |
| 628 | have hQpair (d : E0) : |
| 629 | g.inner x Q d = Q0 d + O d - I d - Jinput d - Kinput d := by |
| 630 | have hquad : |
| 631 | g.inner x (∑ p, |
| 632 | (R (R u v (b p)) (b p) w - (2 : ℝ) • R v (b p) (R (b p) u w) + |
| 633 | (2 : ℝ) • R (b p) u (R v (b p) w))) d = Q0 d := by |
| 634 | simp only [map_sum, sum_apply, map_add, add_apply, |
| 635 | map_sub, sub_apply, map_smul, smul_apply, smul_eq_mul] |
| 636 | change (∑ p, (k (R u v (b p)) (b p) w d - |
| 637 | 2 * k v (b p) (R (b p) u w) d + 2 * k (b p) u (R v (b p) w) d)) = _ |
| 638 | dsimp only [Q0] |
| 639 | apply Finset.sum_congr rfl |
| 640 | intro p _hp |
| 641 | rw [hkR1, hkR3, hkR3] |
| 642 | simp only [Finset.mul_sum] |
| 643 | rw [← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] |
| 644 | apply Finset.sum_congr rfl |
| 645 | intro a _ha |
| 646 | dsimp only [F0, Fp, Fm] |
| 647 | ring |
| 648 | have ho : g.inner x (P (R u v w)) d = O d := by |
| 649 | rw [hInnerP, hρsym (R u v w) d, hρR2] |
| 650 | dsimp only [O] |
| 651 | apply Finset.sum_congr rfl |
| 652 | intro a _ha |
| 653 | ring |
| 654 | have hi : g.inner x (R (P u) v w) d = I d := |
| 655 | hksum1 (fun a => b a) (fun a => ρ u (b a)) v w d |
| 656 | have hj : g.inner x (R u (P v) w) d = Jinput d := |
| 657 | hksum2 (fun a => b a) (fun a => ρ v (b a)) u w d |
| 658 | have hk : g.inner x (R u v (P w)) d = Kinput d := |
| 659 | hksum3 (fun a => b a) (fun a => ρ w (b a)) u v d |
| 660 | simp only [Q, map_sub, sub_apply, map_add, add_apply, hquad, ho, hi, hj, hk] |
| 661 | have hReaction (d : E0) : U0 d + V0 d = g.inner x Q d := by |
| 662 | rw [hUexpand, hVexpand, hUfinite, hV, hQpair] |
| 663 | ring |
| 664 | have hVector : deriv Vtime t = L + Q := by |
| 665 | apply b0.repr.injective |
| 666 | ext i |
| 667 | rw [hcoord, hcoord, map_add, add_apply] |
| 668 | have h₁ := hGeo (b i) |
| 669 | have h₂ := hReaction (b i) |
| 670 | linarith only [h₁, h₂] |
| 671 | have hActual := (ricciFlow_curvature_time_derivative_pairing F ht hU |
| 672 | X Y Z X hX hY hZ hX hx).1 |
| 673 | have hxv : X x = u := hExtValue u |
| 674 | have hyv : Y x = v := hExtValue v |
| 675 | have hzv : Z x = w := hExtValue w |
| 676 | rw [hxv, hyv, hzv] at hActual |
| 677 | change HasDerivAt Vtime (deriv Vtime t) t at hActual |
| 678 | rw [hVector] at hActual |
| 679 | exact hActual |
| 680 | |
| 681 | /-! Expand the Ricci endomorphisms in the reaction part of the curvature |
| 682 | evolution before changing from an orthonormal basis to a fixed frame. -/ |
| 683 | theorem curvature_reaction_eq_pure_inverse_frame_sum |
| 684 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 685 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 686 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x0 x : M) |
| 687 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 688 | (TangentSpace (𝓡 n)) x0).baseSet) |
| 689 | (u v w : TangentSpace (𝓡 n) x) : |
| 690 | let V := EuclideanSpace ℝ (Fin n) |
| 691 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 692 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 693 | let b := g.orthonormalBasis x |
| 694 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 695 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 696 | x0 x x0 x (g.inner x) |
| 697 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 698 | let R := D.curvature x |
| 699 | let P := fun z : TangentSpace (𝓡 n) x => ∑ r, D.ricci x z (b r) • b r |
| 700 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 701 | R (R u v r) s w - (2 : ℝ) • R v r (R s u w) + |
| 702 | (2 : ℝ) • R r u (R v s w) + R (R u v w) r s - |
| 703 | R (R u r s) v w - R u (R v r s) w - R u v (R w r s) |
| 704 | (∑ r, (R (R u v (b r)) (b r) w - |
| 705 | (2 : ℝ) • R v (b r) (R (b r) u w) + |
| 706 | (2 : ℝ) • R (b r) u (R v (b r) w))) + |
| 707 | P (R u v w) - R (P u) v w - R u (P v) w - R u v (P w) = |
| 708 | ∑ i : Fin n, ∑ j : Fin n, a i j • Z (E i x) (E j x) := by |
| 709 | classical |
| 710 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 711 | ⟨g.toRiemannianMetric⟩ |
| 712 | let V := EuclideanSpace ℝ (Fin n) |
| 713 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 714 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 715 | let E := e.localFrame cb |
| 716 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 717 | let b := g.orthonormalBasis x |
| 718 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 719 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 720 | x0 x x0 x (g.inner x) |
| 721 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 722 | obtain ⟨T, hT⟩ := exists_curvature_trilinearMap D x |
| 723 | let P := fun z : TangentSpace (𝓡 n) x => ∑ r, D.ricci x z (b r) • b r |
| 724 | have hRic (z q : TangentSpace (𝓡 n) x) : |
| 725 | D.ricci x z q = ∑ r, g.inner x (T z (b r) (b r)) q := by |
| 726 | simp only [hT, b, LeviCivitaData.ricci, LeviCivitaData.curvatureTensor] |
| 727 | have hP (z : TangentSpace (𝓡 n) x) : |
| 728 | P z = ∑ r, T z (b r) (b r) := by |
| 729 | simp only [P, hRic, Finset.sum_smul] |
| 730 | rw [Finset.sum_comm] |
| 731 | apply Finset.sum_congr rfl |
| 732 | intro r _ |
| 733 | calc |
| 734 | _ = ∑ s, g.inner x (b s) (T z (b r) (b r)) • b s := by |
| 735 | apply Finset.sum_congr rfl |
| 736 | intro s _ |
| 737 | rw [g.symm x] |
| 738 | _ = _ := b.sum_repr' _ |
| 739 | let Z0 := fun r s : TangentSpace (𝓡 n) x => |
| 740 | T (T u v r) s w - (2 : ℝ) • T v r (T s u w) + |
| 741 | (2 : ℝ) • T r u (T v s w) + T (T u v w) r s - |
| 742 | T (T u r s) v w - T u (T v r s) w - T u v (T w r s) |
| 743 | let Z : TangentSpace (𝓡 n) x →ₗ[ℝ] |
| 744 | TangentSpace (𝓡 n) x →ₗ[ℝ] TangentSpace (𝓡 n) x := |
| 745 | LinearMap.mk₂ ℝ Z0 |
| 746 | (by |
| 747 | intro r r' s |
| 748 | simp only [Z0, map_add, LinearMap.add_apply] |
| 749 | module) |
| 750 | (by |
| 751 | intro c r s |
| 752 | simp only [Z0, map_smul, LinearMap.smul_apply, smul_add, smul_sub, |
| 753 | smul_smul] |
| 754 | module) |
| 755 | (by |
| 756 | intro r s s' |
| 757 | simp only [Z0, map_add, LinearMap.add_apply] |
| 758 | module) |
| 759 | (by |
| 760 | intro c r s |
| 761 | simp only [Z0, map_smul, LinearMap.smul_apply, smul_add, smul_sub, |
| 762 | smul_smul] |
| 763 | module) |
| 764 | have hZ (r s : TangentSpace (𝓡 n) x) : Z r s = Z0 r s := rfl |
| 765 | have hrec (z : TangentSpace (𝓡 n) x) : |
| 766 | z = ∑ i : Fin n, theta i x z • E i x := by |
| 767 | simpa only [FiberBundle.extend_apply_self] using |
| 768 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 769 | (s := FiberBundle.extend V z) hx |
| 770 | have hbilin (r s : TangentSpace (𝓡 n) x) : |
| 771 | Z r s = ∑ i : Fin n, ∑ j : Fin n, |
| 772 | (theta i x r * theta j x s) • Z (E i x) (E j x) := by |
| 773 | nth_rw 1 [hrec r] |
| 774 | rw [map_sum, LinearMap.sum_apply] |
| 775 | apply Finset.sum_congr rfl |
| 776 | intro i _ |
| 777 | rw [map_smul, LinearMap.smul_apply] |
| 778 | nth_rw 1 [hrec s] |
| 779 | rw [map_sum, Finset.smul_sum] |
| 780 | apply Finset.sum_congr rfl |
| 781 | intro j _ |
| 782 | rw [map_smul, smul_smul] |
| 783 | have htrace (i j : Fin n) : a i j = |
| 784 | ∑ r, theta i x (b r) * theta j x (b r) := |
| 785 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 786 | have hcontract : (∑ r, Z (b r) (b r)) = |
| 787 | ∑ i : Fin n, ∑ j : Fin n, a i j • Z (E i x) (E j x) := by |
| 788 | calc |
| 789 | _ = ∑ r, ∑ i : Fin n, ∑ j : Fin n, |
| 790 | (theta i x (b r) * theta j x (b r)) • Z (E i x) (E j x) := |
| 791 | Finset.sum_congr rfl (fun r _ => hbilin (b r) (b r)) |
| 792 | _ = _ := by |
| 793 | rw [Finset.sum_comm] |
| 794 | apply Finset.sum_congr rfl |
| 795 | intro i _ |
| 796 | rw [Finset.sum_comm] |
| 797 | apply Finset.sum_congr rfl |
| 798 | intro j _ |
| 799 | rw [← Finset.sum_smul, ← htrace] |
| 800 | have hreaction : |
| 801 | (∑ r, (T (T u v (b r)) (b r) w - |
| 802 | (2 : ℝ) • T v (b r) (T (b r) u w) + |
| 803 | (2 : ℝ) • T (b r) u (T v (b r) w))) + |
| 804 | P (T u v w) - T (P u) v w - T u (P v) w - T u v (P w) = |
| 805 | ∑ r, Z (b r) (b r) := by |
| 806 | simp only [hP, hZ, Z0, map_sum, LinearMap.sum_apply, |
| 807 | Finset.sum_add_distrib, Finset.sum_sub_distrib] |
| 808 | dsimp only |
| 809 | simpa only [hZ, Z0, hT, P, a, G, b, E, cb, e, V] using |
| 810 | hreaction.trans hcontract |
| 811 | |
| 812 | /-- The actual base curvature reaction is a sum of seven lowered contractions. -/ |
| 813 | theorem curvature_reaction_lowered_two_contractions |
| 814 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x0 x : M) |
| 815 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 816 | (TangentSpace (𝓡 n)) x0).baseSet) |
| 817 | (u v w z : TangentSpace (𝓡 n) x) : |
| 818 | let V := EuclideanSpace ℝ (Fin n) |
| 819 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 820 | let E := fun i => e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis i x |
| 821 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 822 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 823 | x0 x x0 x (g.inner x) |
| 824 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 825 | let R := D.curvature x |
| 826 | let L := fun A B C Z => g.inner x (R A B C) Z |
| 827 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 828 | R (R u v r) s w - (2 : ℝ) • R v r (R s u w) + |
| 829 | (2 : ℝ) • R r u (R v s w) + R (R u v w) r s - |
| 830 | R (R u r s) v w - R u (R v r s) w - R u v (R w r s) |
| 831 | g.inner x (∑ j0 : Fin n, ∑ j1 : Fin n, a j0 j1 • Z (E j0) (E j1)) z = |
| 832 | ∑ j0 : Fin n, ∑ j1 : Fin n, ∑ i0 : Fin n, ∑ i1 : Fin n, |
| 833 | (a i0 i1 * a j0 j1) * |
| 834 | (L u v (E j0) (E i1) * L (E i0) (E j1) w z - |
| 835 | 2 * (L v (E j0) (E i0) z * L (E j1) u w (E i1)) + |
| 836 | 2 * (L (E j0) u (E i0) z * L v (E j1) w (E i1)) + |
| 837 | L u v w (E i1) * L (E i0) (E j0) (E j1) z - |
| 838 | L u (E j0) (E j1) (E i1) * L (E i0) v w z - |
| 839 | L v (E j0) (E j1) (E i1) * L u (E i0) w z - |
| 840 | L w (E j0) (E j1) (E i1) * L u v (E i0) z) := by |
| 841 | classical |
| 842 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 843 | ⟨g.toRiemannianMetric⟩ |
| 844 | let V := EuclideanSpace ℝ (Fin n) |
| 845 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 846 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 847 | let E := fun i => e.localFrame cb i x |
| 848 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 849 | let b := g.orthonormalBasis x |
| 850 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 851 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 852 | x0 x x0 x (g.inner x) |
| 853 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 854 | have hframe (W : TangentSpace (𝓡 n) x) : |
| 855 | W = ∑ i : Fin n, theta i x W • E i := by |
| 856 | simpa only [FiberBundle.extend_apply_self] using |
| 857 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 858 | (s := FiberBundle.extend V W) hx |
| 859 | have hgram (i j : Fin n) : |
| 860 | a i j = ∑ r, theta i x (b r) * theta j x (b r) := |
| 861 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 862 | have hinner (W : TangentSpace (𝓡 n) x) (r) : |
| 863 | (∑ j : Fin n, theta j x (b r) * g.inner x W (E j)) = g.inner x W (b r) := by |
| 864 | nth_rw 2 [hframe (b r)] |
| 865 | simp only [map_sum, map_smul, smul_eq_mul] |
| 866 | have horth (W : TangentSpace (𝓡 n) x) : |
| 867 | (∑ r, g.inner x W (b r) • b r) = W := by |
| 868 | have hh := b.sum_repr' W |
| 869 | change (∑ r, g.inner x (b r) W • b r) = W at hh |
| 870 | simpa only [g.symm x W] using hh |
| 871 | have hcoeff (i : Fin n) (W : TangentSpace (𝓡 n) x) : |
| 872 | (∑ j : Fin n, a i j * g.inner x W (E j)) = theta i x W := by |
| 873 | simp only [hgram, Finset.sum_mul] |
| 874 | rw [Finset.sum_comm] |
| 875 | calc |
| 876 | _ = ∑ r, theta i x (b r) * |
| 877 | (∑ j : Fin n, theta j x (b r) * g.inner x W (E j)) := by |
| 878 | simp only [Finset.mul_sum, mul_assoc] |
| 879 | _ = ∑ r, theta i x (b r) * g.inner x W (b r) := by simp only [hinner] |
| 880 | _ = theta i x (∑ r, g.inner x W (b r) • b r) := by |
| 881 | simp only [map_sum, map_smul, smul_eq_mul, mul_comm] |
| 882 | _ = _ := by rw [horth] |
| 883 | have hrec (W : TangentSpace (𝓡 n) x) : |
| 884 | W = ∑ i : Fin n, ∑ j : Fin n, |
| 885 | (a i j * g.inner x W (E j)) • E i := by |
| 886 | nth_rw 1 [hframe W] |
| 887 | apply Finset.sum_congr rfl |
| 888 | intro i _ |
| 889 | rw [← Finset.sum_smul, hcoeff] |
| 890 | obtain ⟨T, hT⟩ := exists_curvature_trilinearMap D x |
| 891 | let L := fun A B C Z => g.inner x (T A B C) Z |
| 892 | have hfirst (W A B : TangentSpace (𝓡 n) x) : |
| 893 | g.inner x (T W A B) z = |
| 894 | ∑ i : Fin n, ∑ j : Fin n, |
| 895 | a i j * (g.inner x W (E j) * L (E i) A B z) := by |
| 896 | nth_rw 1 [hrec W] |
| 897 | simp only [L, map_sum, LinearMap.sum_apply, map_smul, LinearMap.smul_apply, |
| 898 | sum_apply, smul_apply, smul_eq_mul, mul_assoc] |
| 899 | have hsecond (A W B : TangentSpace (𝓡 n) x) : |
| 900 | g.inner x (T A W B) z = |
| 901 | ∑ i : Fin n, ∑ j : Fin n, |
| 902 | a i j * (g.inner x W (E j) * L A (E i) B z) := by |
| 903 | nth_rw 1 [hrec W] |
| 904 | simp only [L, map_sum, LinearMap.sum_apply, map_smul, LinearMap.smul_apply, |
| 905 | sum_apply, smul_apply, smul_eq_mul, mul_assoc] |
| 906 | have hthird (A B W : TangentSpace (𝓡 n) x) : |
| 907 | g.inner x (T A B W) z = |
| 908 | ∑ i : Fin n, ∑ j : Fin n, |
| 909 | a i j * (g.inner x W (E j) * L A B (E i) z) := by |
| 910 | nth_rw 1 [hrec W] |
| 911 | simp only [L, map_sum, map_smul, |
| 912 | sum_apply, smul_apply, smul_eq_mul, mul_assoc] |
| 913 | let Z := fun r s : TangentSpace (𝓡 n) x => |
| 914 | T (T u v r) s w - (2 : ℝ) • T v r (T s u w) + |
| 915 | (2 : ℝ) • T r u (T v s w) + T (T u v w) r s - |
| 916 | T (T u r s) v w - T u (T v r s) w - T u v (T w r s) |
| 917 | have hZ (r s : TangentSpace (𝓡 n) x) : |
| 918 | g.inner x (Z r s) z = |
| 919 | ∑ i : Fin n, ∑ j : Fin n, a i j * |
| 920 | (L u v r (E j) * L (E i) s w z - |
| 921 | 2 * (L v r (E i) z * L s u w (E j)) + |
| 922 | 2 * (L r u (E i) z * L v s w (E j)) + |
| 923 | L u v w (E j) * L (E i) r s z - |
| 924 | L u r s (E j) * L (E i) v w z - |
| 925 | L v r s (E j) * L u (E i) w z - |
| 926 | L w r s (E j) * L u v (E i) z) := by |
| 927 | dsimp only [Z] |
| 928 | simp only [map_sub, sub_apply, map_add, add_apply, map_smul, smul_apply, |
| 929 | smul_eq_mul] |
| 930 | rw [hfirst (T u v r) s w, hthird v r (T s u w), |
| 931 | hthird r u (T v s w), hfirst (T u v w) r s, |
| 932 | hfirst (T u r s) v w, hsecond u (T v r s) w, hthird u v (T w r s)] |
| 933 | simp only [Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_sub_distrib] |
| 934 | apply Finset.sum_congr rfl |
| 935 | intro i _ |
| 936 | apply Finset.sum_congr rfl |
| 937 | intro j _ |
| 938 | dsimp only [L] |
| 939 | ring |
| 940 | dsimp only |
| 941 | simp only [← hT] |
| 942 | change g.inner x (∑ j0 : Fin n, ∑ j1 : Fin n, a j0 j1 • Z (E j0) (E j1)) z = _ |
| 943 | simp only [map_sum, sum_apply, map_smul, smul_apply, smul_eq_mul, hZ, |
| 944 | Finset.mul_sum] |
| 945 | apply Finset.sum_congr rfl |
| 946 | intro j0 _ |
| 947 | apply Finset.sum_congr rfl |
| 948 | intro j1 _ |
| 949 | apply Finset.sum_congr rfl |
| 950 | intro i0 _ |
| 951 | apply Finset.sum_congr rfl |
| 952 | intro i1 _ |
| 953 | change a j0 j1 * (a i0 i1 * _) = a i0 i1 * a j0 j1 * _ |
| 954 | ring |
| 955 | |
| 956 | end PoincareMT.RicciFlow.Local |