import PoincareLib.Geometry.Curvature.Integral.Induction.SectionalIntegral import PoincareLib.Geometry.Riemannian.Curvature.Bounds.Sectional import PoincareLib.Geometry.Riemannian.Connection.Construction /-! # Actual sectional error on regular levels The Gauss estimate extends from orthonormal planes to every tangent pair and produces the continuous nonnegative error used by corner induction. -/ set_option autoImplicit false open Set open Poincare.Geometry.Manifold.RegularLevel open scoped Manifold ContDiff Bundle Topology /-- The actual Gauss error is continuous, nonnegative and bounds every sectional curvature of the canonical induced regular-level metric. -/ theorem PoincareMT.LeviCivitaData.regularLevel_sectionalError_bounds {m : β„•} {M : Type*} [TopologicalSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin (m + 2))) M] [IsManifold (𝓑 (m + 2)) ∞ M] {g : PoincareMT.RiemannianMetric (m + 2) M} (D : PoincareMT.LeviCivitaData g) {f : M β†’ ℝ} (hf : ContMDiff (𝓑 (m + 2)) π“˜(ℝ, ℝ) ∞ f) (t : ℝ) {K : M β†’ ℝ} (hKc : ContinuousOn K (g.regularDomain hf)) (hK : βˆ€ x, f x = t β†’ 0 ≀ K x) (hsec : βˆ€ x, f x = t β†’ βˆ€ v w : TangentSpace (𝓑 (m + 2)) x, -K x ≀ D.sectionalCurvature x v w) {Ξ² : ℝ} (hΞ² : 0 ≀ Ξ²) (hhess : βˆ€ x, f x = t β†’ βˆ€ v : TangentSpace (𝓑 (m + 2)) x, g.inner x (D.gradient f x) v = 0 β†’ D.hessian f x v v / Real.sqrt (D.levelQ f x) ≀ Ξ² * g.inner x v v) : let U := g.regularDomain hf let hreg := g.regularDomain_regular hf letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin (m + 2))) = m + 2) := ⟨finrank_euclideanSpace_fin⟩ letI := openLevelSetChartedSpace hf U hreg (m + 1) t letI := isManifold_openLevelSet hf U hreg (m + 1) t let gL := PoincareMT.RiemannianMetric.regularLevelMetric hf U hreg t g let E := D.levelSectionalError f K Ξ² ∘ openLevelIncl f U t Continuous E ∧ βˆ€ z : openLevelSet f U t, 0 ≀ E z ∧ βˆ€ v w : TangentSpace (𝓑 (m + 1)) z, -E z ≀ gL.leviCivitaData.sectionalCurvature z v w := by let U := g.regularDomain hf let hreg := g.regularDomain_regular hf let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin (m + 2))) = m + 2) := ⟨finrank_euclideanSpace_fin⟩ let := openLevelSetChartedSpace hf U hreg (m + 1) t let := isManifold_openLevelSet hf U hreg (m + 1) t let gL := PoincareMT.RiemannianMetric.regularLevelMetric hf U hreg t g let incl := openLevelIncl f U t let E := D.levelSectionalError f K Ξ² ∘ incl refine ⟨(D.continuousOn_levelSectionalError_regularDomain hf hKc Ξ²).comp_continuous (contMDiff_openLevelIncl hf U hreg (m + 1) t).continuous (fun z => z.1.2), ?_⟩ intro z have hEn : 0 ≀ E z := D.levelSectionalError_nonneg f K hΞ² (hK (incl z) z.2) refine ⟨hEn, ?_⟩ apply gL.leviCivitaData.sectionalCurvature_lower_bound_of_orthonormal z (neg_nonpos.mpr hEn) intro u v hu hv huv have htan (w : TangentSpace (𝓑 (m + 1)) z) : g.inner (incl z) (D.gradient f (incl z)) (mfderiv (𝓑 (m + 1)) (𝓑 (m + 2)) incl z w) = 0 := by have hk : mfderiv (𝓑 (m + 2)) π“˜(ℝ, ℝ) f (incl z) (mfderiv (𝓑 (m + 1)) (𝓑 (m + 2)) incl z w) = 0 := by change mfderiv (𝓑 (m + 1)) (𝓑 (m + 2)) incl z w ∈ (mfderiv (𝓑 (m + 2)) π“˜(ℝ, ℝ) f (incl z)).ker rw [← range_mfderiv_openLevelIncl hf U hreg (m + 1) t z] exact ⟨w, rfl⟩ rw [D.inner_gradient] have hk' := congrArg (fun q => NormedSpace.fromTangentSpace (f (incl z)) q) hk convert hk' using 1 <;> simp only [mvfderiv, ContinuousLinearMap.coe_comp, Function.comp_apply, map_zero]; rfl have hs := D.regularLevel_sectionalCurvature_lower_bound hf U hreg t (K (incl z)) Ξ² hΞ² gL.leviCivitaData z (fun a b _ _ _ => hsec (incl z) z.2 a b) (fun w => hhess (incl z) z.2 _ (htan w)) u v hu hv huv simpa only [E, Function.comp_apply, PoincareMT.LeviCivitaData.levelSectionalError, neg_add_rev, sub_eq_add_neg, add_comm] using hs