import PoincareLib.Geometry.Curvature.Integral.Bochner import Mathlib.Geometry.Manifold.Algebra.LieGroup /-! # Normalization of the weighted Bochner identity The reciprocal of the squared gradient is needed only on the support of the test function. Critical points outside that support therefore cause no regularity or integrability problem. The resulting formula supplies the normal-direction curvature calculation in Petrunin, Section 2.2, pp. 3--4. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set MeasureTheory Filter open scoped Manifold ContDiff Bundle Topology BigOperators universe u namespace PoincareMT.LeviCivitaData variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {g : RiemannianMetric n M} omit [IsManifold (𝓑 n) ∞ M] in private lemma smooth_div_on_support {Ο† q : M β†’ ℝ} (hΟ† : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ Ο†) (hq : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ q) (hreg : βˆ€ x ∈ tsupport Ο†, q x β‰  0) : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun x => Ο† x / q x) := by intro x by_cases hx : x ∈ tsupport Ο† Β· simpa only [div_eq_mul_inv, Pi.mul_def] using (hΟ† x).mul ((hq x).invβ‚€ (hreg x hx)) Β· apply (contMDiffAt_const (c := (0 : ℝ))).congr_of_eventuallyEq filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy simp [hy] private lemma inner_gradient_div_on_support (D : LeviCivitaData g) {Ο† q : M β†’ ℝ} (hΟ† : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ Ο†) (hq : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ q) (hreg : βˆ€ x ∈ tsupport Ο†, q x β‰  0) (x : M) (v : TangentSpace (𝓑 n) x) : g.inner x (D.gradient (fun y => Ο† y / q y) x) v = g.inner x (D.gradient Ο† x) v / q x - Ο† x / (q x) ^ 2 * g.inner x (D.gradient q x) v := by have hw := smooth_div_on_support hΟ† hq hreg have heq : (fun y => q y * (Ο† y / q y)) = Ο† := by funext y by_cases hy : y ∈ tsupport Ο† Β· field_simp [hreg y hy] Β· simp [image_eq_zero_of_notMem_tsupport hy] by_cases hx : x ∈ tsupport Ο† Β· have h := D.gradient_mul ((hq x).mdifferentiableAt (by simp)) ((hw x).mdifferentiableAt (by simp)) rw [heq] at h have hi := congrArg (fun z => g.inner x z v) h simp only [map_add, map_smul, add_apply, smul_apply, smul_eq_mul] at hi have hqx := hreg x hx field_simp field_simp at hi nlinarith only [hi] Β· have hsupport : tsupport (fun y => Ο† y / q y) βŠ† tsupport Ο† := by apply closure_mono simp only [Function.support_div] exact inter_subset_left rw [D.gradient_eq_zero_of_notMem_tsupport (fun hy => hx (hsupport hy)), D.gradient_eq_zero_of_notMem_tsupport hx, image_eq_zero_of_notMem_tsupport hx] simp variable [MeasurableSpace M] [BorelSpace M] [T3Space M] /-- Dividing the weighted Bochner identity by the squared gradient produces the normal curvature expression. Noncriticality is needed only on the test support; the two correction terms come from differentiating that denominator. -/ theorem integral_normalized_bochner (D : LeviCivitaData g) {Ο† f : M β†’ ℝ} (hΟ† : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ Ο†) (hf : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ f) (hΟ†c : HasCompactSupport Ο†) (hreg : βˆ€ x ∈ tsupport Ο†, g.inner x (D.gradient f x) (D.gradient f x) β‰  0) : let q := fun x => g.inner x (D.gradient f x) (D.gradient f x) (∫ x, Ο† x * (((D.laplacian f x) ^ 2 - (βˆ‘ i, βˆ‘ j, (D.hessian f x (g.orthonormalBasis x i) (g.orthonormalBasis x j)) ^ 2)) / q x - D.laplacian f x * g.inner x (D.gradient q x) (D.gradient f x) / (q x) ^ 2 + g.inner x (D.gradient q x) (D.gradient q x) / (2 * (q x) ^ 2) - D.ricci x (D.gradient f x) (D.gradient f x) / q x) βˆ‚g.volumeMeasure) = ∫ x, g.inner x (D.gradient Ο† x) (D.gradient q x) / (2 * q x) - D.laplacian f x * g.inner x (D.gradient Ο† x) (D.gradient f x) / q x βˆ‚g.volumeMeasure := by dsimp only let q := fun x => g.inner x (D.gradient f x) (D.gradient f x) let w := fun x => Ο† x / q x let A := fun x => w x * ((D.laplacian f x) ^ 2 - (βˆ‘ i, βˆ‘ j, (D.hessian f x (g.orthonormalBasis x i) (g.orthonormalBasis x j)) ^ 2) - D.ricci x (D.gradient f x) (D.gradient f x)) let B := fun x => (1 / 2 : ℝ) * g.inner x (D.gradient w x) (D.gradient q x) - D.laplacian f x * g.inner x (D.gradient w x) (D.gradient f x) let C := fun x => (Ο† x / (q x) ^ 2) * (D.laplacian f x * g.inner x (D.gradient q x) (D.gradient f x) - (1 / 2 : ℝ) * g.inner x (D.gradient q x) (D.gradient q x)) have hq : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ q := D.contMDiff_inner_gradient hf hf have hw : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ w := smooth_div_on_support hΟ† hq hreg have hwc : HasCompactSupport w := by apply HasCompactSupport.of_support_subset_isCompact hΟ†c intro x hx by_contra hx' exact hx (by simp [w, image_eq_zero_of_notMem_tsupport hx']) have hA : Integrable A g.volumeMeasure := D.integrable_weighted_bochner hw hf hwc have hB : Integrable B g.volumeMeasure := ((D.integrable_inner_gradient hw hq hwc).const_mul _).sub (((D.continuous_laplacian hf).mul (D.continuous_inner_gradient hw hf)).integrable_of_hasCompactSupport (D.hasCompactSupport_inner_gradient hwc f).mul_left) have hwβ‚‚ : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun x => Ο† x / (q x) ^ 2) := smooth_div_on_support hΟ† (hq.pow 2) (fun x hx => pow_ne_zero _ (hreg x hx)) have hC : Integrable C g.volumeMeasure := by apply (hwβ‚‚.continuous.mul (((D.continuous_laplacian hf).mul (D.continuous_inner_gradient hq hf)).sub ((D.continuous_inner_gradient hq hq).const_mul (1 / 2 : ℝ)))).integrable_of_hasCompactSupport apply HasCompactSupport.of_support_subset_isCompact hΟ†c intro x hx by_contra hx' exact hx (by simp [image_eq_zero_of_notMem_tsupport hx']) have hi : (∫ x, A x βˆ‚g.volumeMeasure) = ∫ x, B x βˆ‚g.volumeMeasure := D.integral_weighted_bochner hw hf hwc calc _ = ∫ x, A x - C x βˆ‚g.volumeMeasure := by apply integral_congr_ae filter_upwards [] with x dsimp only [A, C, w] dsimp only [q] at * by_cases hx : q x = 0 Β· dsimp only [q] at hx simp [hx] Β· dsimp only [q] at hx field_simp ring _ = (∫ x, A x βˆ‚g.volumeMeasure) - ∫ x, C x βˆ‚g.volumeMeasure := integral_sub hA hC _ = ∫ x, B x - C x βˆ‚g.volumeMeasure := by rw [hi, integral_sub hB hC] _ = _ := by apply integral_congr_ae filter_upwards [] with x dsimp only [B, C, w] rw [inner_gradient_div_on_support D hΟ† hq hreg, inner_gradient_div_on_support D hΟ† hq hreg] dsimp only [q] by_cases hx : q x = 0 Β· dsimp only [q] at hx simp [hx] Β· dsimp only [q] at hx field_simp ring end PoincareMT.LeviCivitaData