import PoincareLib.Geometry.RicciFlow.ConjugateHeat.WeakPairing import PoincareLib.Geometry.RicciFlow.ConjugateHeat.Coordinates.Laplacian import PoincareLib.Geometry.Riemannian.ScalarOperators.Divergence.Regularity /-! # Smoothness and support of the geometric backward heat test operator -/ noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Topology open Poincare.Analysis.Parabolic.WeakRegularity open Poincare.Analysis.Elliptic.Iteration open Poincare.Analysis.Elliptic.InteriorEstimates namespace PoincareMT.RicciFlow.ConjugateHeat variable {n : โ„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] {J : Set โ„} theorem testOperator_eq_zero_of_notMem_tsupport (F : RicciFlow n M J) {ฯ† : M ร— โ„ โ†’ โ„} {z : M ร— โ„} (hz : z โˆ‰ tsupport ฯ†) : testOperator F ฯ† z = 0 := by have heq := notMem_tsupport_iff_eventuallyEq.mp hz have ht : (fun ฯ„ => ฯ† (z.1, ฯ„)) =แถ [๐“ z.2] (fun _ => (0 : โ„)) := heq.comp_tendsto ((continuous_const.prodMk continuous_id).tendsto z.2) have hx : (fun x => ฯ† (x, z.2)) =แถ [๐“ z.1] (fun _ => (0 : โ„)) := heq.comp_tendsto ((continuous_id.prodMk continuous_const).tendsto z.1) rw [testOperator, ht.deriv_eq, (F.connection (-z.2)).laplacian_eq_zero_of_notMem_tsupport (notMem_tsupport_iff_eventuallyEq.mpr hx)] simp theorem tsupport_testOperator_subset (F : RicciFlow n M J) (ฯ† : M ร— โ„ โ†’ โ„) : tsupport (testOperator F ฯ†) โІ tsupport ฯ† := by apply closure_minimal _ (isClosed_tsupport _) intro z hz by_contra hฯ† exact hz (testOperator_eq_zero_of_notMem_tsupport F hฯ†) theorem hasCompactSupport_testOperator (F : RicciFlow n M J) {ฯ† : M ร— โ„ โ†’ โ„} (hฯ† : HasCompactSupport ฯ†) : HasCompactSupport (testOperator F ฯ†) := hฯ†.of_isClosed_subset (isClosed_tsupport _) (tsupport_testOperator_subset F ฯ†) private theorem partialDeriv_partialDeriv_slice_of_contDiffOn {f : Spacetime n โ†’ โ„} {V : Set (Spacetime n)} (hV : IsOpen V) (hf : ContDiffOn โ„ โˆž f V) {z : Spacetime n} (hz : z โˆˆ V) (i j : Fin n) : partialDeriv i (partialDeriv j (fun y => f (y, z.2))) z.1 = Canonical.spatialDeriv i (Canonical.spatialDeriv j f) z := by have hd : ContDiffOn โ„ โˆž (Canonical.spatialDeriv j f) V := (hf.fderiv_of_isOpen hV (by simp)).clm_apply contDiffOn_const have heq : partialDeriv j (fun y => f (y, z.2)) =แถ [๐“ z.1] (fun y => Canonical.spatialDeriv j f (y, z.2)) := by filter_upwards [((continuous_id.prodMk continuous_const).tendsto z.1) (hV.mem_nhds hz)] with y hy exact BackwardCoordinates.partialDeriv_spatialSlice ((hf.contDiffAt (hV.mem_nhds hy)).differentiableAt (by simp)) j change fderiv โ„ (partialDeriv j (fun y => f (y, z.2))) z.1 (EuclideanSpace.single i 1) = _ rw [heq.fderiv_eq] exact BackwardCoordinates.partialDeriv_spatialSlice ((hd.contDiffAt (hV.mem_nhds hz)).differentiableAt (by simp)) i private theorem timeDeriv_eq_deriv_slice {f : Spacetime n โ†’ โ„} {z : Spacetime n} (hf : DifferentiableAt โ„ f z) : Canonical.timeDeriv f z = deriv (fun ฯ„ => f (z.1, ฯ„)) z.2 := by have hd := hf.hasFDerivAt.comp_hasDerivAt z.2 ((hasDerivAt_const z.2 z.1).prodMk (hasDerivAt_id z.2)) exact hd.deriv.symm private theorem contDiffOn_testOperator_coordinates (F : RicciFlow n M J) (e : OpenPartialHomeomorph (EuclideanSpace โ„ (Fin n)) M) (he : ContMDiffOn (๐“ก n) (๐“ก n) โˆž e e.source) (hei : ContMDiffOn (๐“ก n) (๐“ก n) โˆž e.symm e.target) {ฯ† : M ร— โ„ โ†’ โ„} (hฯ† : ContMDiff ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, โ„) โˆž ฯ†) : ContDiffOn โ„ โˆž (fun z : Spacetime n => testOperator F ฯ† (e z.1, z.2)) (BackwardCoordinates.domain J e) := by let ฯˆ : Spacetime n โ†’ โ„ := fun z => ฯ† (e z.1, z.2) let V := BackwardCoordinates.domain J e have hV : IsOpen V := BackwardCoordinates.isOpen_domain e have hฯˆ : ContDiffOn โ„ โˆž ฯˆ V := by intro z hz have hmap : ContMDiffAt ((๐“ก n).prod ๐“˜(โ„, โ„)) ((๐“ก n).prod ๐“˜(โ„, โ„)) โˆž (fun y : Spacetime n => (e y.1, y.2)) z := ((he.contMDiffAt (e.open_source.mem_nhds hz.1)).comp z contMDiffAt_fst).prodMk contMDiffAt_snd have h := (hฯ† (e z.1, z.2)).comp z hmap simp +instances only [โ† modelWithCornersSelf_prod, chartedSpaceSelf_prod] at h exact h.contDiffAt.contDiffWithinAt have hd (i : Fin n) : ContDiffOn โ„ โˆž (Canonical.spatialDeriv i ฯˆ) V := (hฯˆ.fderiv_of_isOpen hV (by simp)).clm_apply contDiffOn_const have hdd (i j : Fin n) : ContDiffOn โ„ โˆž (Canonical.spatialDeriv i (Canonical.spatialDeriv j ฯˆ)) V := ((hd j).fderiv_of_isOpen hV (by simp)).clm_apply contDiffOn_const have htime : ContDiffOn โ„ โˆž (Canonical.timeDeriv ฯˆ) V := (hฯˆ.fderiv_of_isOpen hV (by simp)).clm_apply contDiffOn_const have hop : ContDiffOn โ„ โˆž (fun z => Canonical.timeDeriv ฯˆ z + ((โˆ‘ i, โˆ‘ j, BackwardCoordinates.principal F e i j z * Canonical.spatialDeriv i (Canonical.spatialDeriv j ฯˆ) z) + โˆ‘ i, BackwardCoordinates.drift F e i z * Canonical.spatialDeriv i ฯˆ z)) V := htime.add ((ContDiffOn.sum (fun i _ => ContDiffOn.sum (fun j _ => (BackwardCoordinates.contDiffOn_principal F e he hei i j).mul (hdd i j)))).add (ContDiffOn.sum (fun i _ => (BackwardCoordinates.contDiffOn_drift F e he hei i).mul (hd i)))) apply hop.congr intro z hz symm have hs : ContMDiff (๐“ก n) ๐“˜(โ„, โ„) โˆž (fun x => ฯ† (x, z.2)) := hฯ†.comp (contMDiff_id.prodMk contMDiff_const) have hL := LeviCivitaData.Dirichlet.secondOrderOperator_coordinate_eq_laplacian (F.connection (-z.2)) e he hei isOpen_univ hs.contMDiffOn hz.1 (mem_univ _) rw [timeDeriv_eq_deriv_slice ((hฯˆ.contDiffAt (hV.mem_nhds hz)).differentiableAt (by simp))] change deriv (fun ฯ„ => ฯ† (e z.1, ฯ„)) z.2 + _ = testOperator F ฯ† (e z.1, z.2) rw [testOperator, โ† hL] congr 1 unfold secondOrderOperator congr 1 ยท apply Finset.sum_congr rfl intro i _ apply Finset.sum_congr rfl intro j _ rw [โ† BackwardCoordinates.principal_eq_coordinatePrincipal F e he hei hz.1 i j] congr 1 exact (partialDeriv_partialDeriv_slice_of_contDiffOn hV hฯˆ hz i j).symm ยท apply Finset.sum_congr rfl intro i _ rw [โ† BackwardCoordinates.drift_eq_coordinateDrift F e he hei hz i] congr 1 exact (BackwardCoordinates.partialDeriv_spatialSlice ((hฯˆ.contDiffAt (hV.mem_nhds hz)).differentiableAt (by simp)) i).symm theorem contMDiffOn_testOperator (F : RicciFlow n M J) {ฯ† : M ร— โ„ โ†’ โ„} (hฯ† : ContMDiff ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, โ„) โˆž ฯ†) : ContMDiffOn ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, โ„) โˆž (testOperator F ฯ†) (univ ร—หข ((fun ฯ„ : โ„ => -ฯ„) โปยน' interior J)) := by intro z hz let e := (chartAt (EuclideanSpace โ„ (Fin n)) z.1).symm have he : ContMDiffOn (๐“ก n) (๐“ก n) โˆž e e.source := contMDiffOn_chart_symm have hei : ContMDiffOn (๐“ก n) (๐“ก n) โˆž e.symm e.target := contMDiffOn_chart have hp : z.1 โˆˆ e.target := mem_chart_source _ z.1 have hx : (e.symm z.1, z.2) โˆˆ BackwardCoordinates.domain J e := โŸจe.map_target hp, hz.2โŸฉ have hcoord := (contDiffOn_testOperator_coordinates F e he hei hฯ†).contDiffAt ((BackwardCoordinates.isOpen_domain e).mem_nhds hx) have hmap : ContMDiffAt ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, Spacetime n) โˆž (fun y : M ร— โ„ => (e.symm y.1, y.2)) z := ((hei.contMDiffAt (e.open_target.mem_nhds hp)).comp z contMDiffAt_fst).prodMk_space contMDiffAt_snd apply ((hcoord.contMDiffAt.comp z hmap).congr_of_eventuallyEq ?_).contMDiffWithinAt filter_upwards [(continuous_fst.tendsto z) (e.open_target.mem_nhds hp)] with y hy change testOperator F ฯ† y = testOperator F ฯ† (e (e.symm y.1), y.2) rw [e.right_inv hy] theorem contMDiff_testOperator_of_tsupport_subset (F : RicciFlow n M J) {ฯ† : M ร— โ„ โ†’ โ„} (hฯ† : ContMDiff ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, โ„) โˆž ฯ†) (hs : tsupport ฯ† โІ univ ร—หข ((fun ฯ„ : โ„ => -ฯ„) โปยน' interior J)) : ContMDiff ((๐“ก n).prod ๐“˜(โ„, โ„)) ๐“˜(โ„, โ„) โˆž (testOperator F ฯ†) := by intro z by_cases hz : z โˆˆ univ ร—หข ((fun ฯ„ : โ„ => -ฯ„) โปยน' interior J) ยท exact (contMDiffOn_testOperator F hฯ†).contMDiffAt ((isOpen_univ.prod (isOpen_interior.preimage continuous_neg)).mem_nhds hz) ยท have hzs : z โˆ‰ tsupport (testOperator F ฯ†) := fun h => hz (hs (tsupport_testOperator_subset F ฯ† h)) exact contMDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hzs) end PoincareMT.RicciFlow.ConjugateHeat