diff --git a/lean/OAI/Geometry/ProjectionBody/ProductFacetProjection.lean b/lean/OAI/Geometry/ProjectionBody/ProductFacetProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..17e9e0cd464e4b5b6a456789cc2710fd16db3ade --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ProductFacetProjection.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.ProjectionBody.ProductFacetGraphs +import OAI.Geometry.ProjectionBody.GraphProjection + +namespace OAI + +noncomputable section +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +/-- The true projected area scale of each product facet chart. -/ +theorem productFacetProjection_normDet (i : Bool × Option (Fin 10)) + {u : E 20} (hu : ‖u‖ = 1) : + ((project u).toLinearMap.comp (productFacetLinear i)).normDet = + |productFunctional i u| := by + rcases i with ⟨b, i⟩ + cases b + · cases i with + | none => + rw [productFacetLinear_first_sum, graphProjection_normDet _ _ hu, + firstSumGraph_normal_inner] + rfl + | some i => + rw [productFacetLinear_first_coordinate, coordinateProjection_normDet _ hu] + simp [firstBlock] + · cases i with + | none => + rw [productFacetLinear_second_sum, graphProjection_normDet _ _ hu, + secondSumGraph_normal_inner] + rfl + | some i => + rw [productFacetLinear_second_coordinate, coordinateProjection_normDet _ hu] + simp [secondBlock] + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/ProductFacets.lean b/lean/OAI/Geometry/ProjectionBody/ProductFacets.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f38a42909ca74bac8e0f2033042267e5d3c2c3b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ProductFacets.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.ProjectionBody.SimplexFacets +import Mathlib.Tactic.Tauto + +namespace OAI + +noncomputable section +open Set + +namespace ProjectionCounterexample + +def firstBlockLinear : E 20 →ₗ[ℝ] E 10 where + toFun := firstBlock + map_add' _ _ := rfl + map_smul' _ _ := rfl + +def secondBlockLinear : E 20 →ₗ[ℝ] E 10 where + toFun := secondBlock + map_add' _ _ := rfl + map_smul' _ _ := rfl + +/-- The twenty-two bounding inequalities of the actual Cartesian product. -/ +def productFunctional : Bool × Option (Fin 10) → E 20 →ₗ[ℝ] ℝ + | (false, i) => (simplexFunctional 10 i).comp firstBlockLinear + | (true, i) => (simplexFunctional 10 i).comp secondBlockLinear + +def productLevel (i : Bool × Option (Fin 10)) : ℝ := simplexLevel i.2 + +@[simp] theorem productFunctional_first (i : Option (Fin 10)) (x : E 20) : + productFunctional (false, i) x = simplexFunctional 10 i (firstBlock x) := rfl + +@[simp] theorem productFunctional_second (i : Option (Fin 10)) (x : E 20) : + productFunctional (true, i) x = simplexFunctional 10 i (secondBlock x) := rfl + +theorem productBody_eq_halfspaceBody : + productBody = halfspaceBody productFunctional productLevel := by + ext x + change (firstBlock x ∈ simplex 10 ∧ secondBlock x ∈ simplex 10) ↔ _ + rw [simplex_eq_halfspaceBody] + constructor + · rintro ⟨hx, hy⟩ ⟨b, i⟩ + cases b + · exact hx i + · exact hy i + · intro hx + exact ⟨fun i => hx (false, i), fun i => hx (true, i)⟩ + +theorem blocks_eq_zero_iff (x : E 20) : + firstBlock x = 0 ∧ secondBlock x = 0 ↔ x = 0 := by + constructor + · rintro ⟨hfirst, hsecond⟩ + ext i + refine Fin.addCases (n := 10) (m := 10) (fun j => ?_) (fun j => ?_) i + · exact congrArg (fun y : E 10 => y j) hfirst + · exact congrArg (fun y : E 10 => y j) hsecond + · rintro rfl + exact ⟨rfl, rfl⟩ + +theorem product_has_positive_slope {u : E 20} (hu : u ≠ 0) : + ∃ i, 0 < productFunctional i u := by + by_cases hfirst : firstBlock u = 0 + · have hsecond : secondBlock u ≠ 0 := by + intro hsecond + exact hu ((blocks_eq_zero_iff u).mp ⟨hfirst, hsecond⟩) + obtain ⟨i, hi⟩ := simplex_has_positive_slope hsecond + exact ⟨(true, i), hi⟩ + · obtain ⟨i, hi⟩ := simplex_has_positive_slope hfirst + exact ⟨(false, i), hi⟩ + +theorem product_boundingFace_first (i : Option (Fin 10)) : + boundingFace productFunctional productLevel (false, i) = + {x | firstBlock x ∈ boundingFace (simplexFunctional 10) simplexLevel i ∧ + secondBlock x ∈ simplex 10} := by + ext x + simp only [boundingFace, ← productBody_eq_halfspaceBody, productBody, + mem_ofPred_eq, productFunctional_first, productLevel, simplex_eq_halfspaceBody] + tauto + +theorem product_boundingFace_second (i : Option (Fin 10)) : + boundingFace productFunctional productLevel (true, i) = + {x | firstBlock x ∈ simplex 10 ∧ + secondBlock x ∈ boundingFace (simplexFunctional 10) simplexLevel i} := by + ext x + simp only [boundingFace, ← productBody_eq_halfspaceBody, productBody, + mem_ofPred_eq, productFunctional_second, productLevel, simplex_eq_halfspaceBody] + tauto + +theorem product_functional_balance (u : E 20) : + ∑ i, productFunctional i u = 0 := by + simp [Fintype.sum_prod_type] + +theorem product_absolute_slopes (u : E 20) : + ∑ i, |productFunctional i u| = + ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i|) + + ((∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) := by + simp [Fintype.sum_prod_type, add_comm] + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/ProductVolumes.lean b/lean/OAI/Geometry/ProjectionBody/ProductVolumes.lean new file mode 100644 index 0000000000000000000000000000000000000000..b07240a18cc69474e6f8600cb386917134557d0b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ProductVolumes.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.ProjectionBody.SimplexVolume +import OAI.Geometry.ProjectionBody.ProductFacetCharts + +namespace OAI + +noncomputable section +open Set MeasureTheory + +namespace ProjectionCounterexample + +theorem volume_productBody : + volume productBody = ENNReal.ofReal (1 / ((Nat.factorial 10 : ℝ) * Nat.factorial 10)) := by + simpa only [productBody, simplex_eq_coordinates, firstBlock, secondBlock, + Set.mem_ofPred_eq, WithLp.ofLp_toLp] using + volume_euclideanSimplexProduct 10 10 + +theorem volume_productFacetDomain (b : Bool) : + volume (productFacetDomain b) = + ENNReal.ofReal (1 / ((Nat.factorial 9 : ℝ) * Nat.factorial 10)) := by + cases b + · simpa only [productFacetDomain, simplex_eq_coordinates, Set.preimage, + Set.mem_prod, Set.mem_ofPred_eq, DiagonalZonotope.finAddEquivProd_apply, + WithLp.ofLp_toLp] using + volume_euclideanSimplexProduct 9 10 + · simpa only [productFacetDomain, simplex_eq_coordinates, Set.preimage, + Set.mem_prod, Set.mem_ofPred_eq, DiagonalZonotope.finAddEquivProd_apply, WithLp.ofLp_toLp, + mul_comm] using + volume_euclideanSimplexProduct 10 9 + +theorem productFacetDomain_compact (b : Bool) : IsCompact (productFacetDomain b) := by + cases b + · exact (@EuclideanSpace.finAddEquivProd ℝ _ 9 10).toHomeomorph.isCompact_preimage.mpr + ((simplex_compact 9).prod (simplex_compact 10)) + · exact (@EuclideanSpace.finAddEquivProd ℝ _ 10 9).toHomeomorph.isCompact_preimage.mpr + ((simplex_compact 10).prod (simplex_compact 9)) + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/ProductZonotopeBridge.lean b/lean/OAI/Geometry/ProjectionBody/ProductZonotopeBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..02716faf086e43e6db825ded4e3f46922e851f2c --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ProductZonotopeBridge.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.ProjectionBody.ZonotopeBridge +import OAI.Geometry.Zonotope.Product + +namespace OAI + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +/-- The sum of the two block support functions, with a common scale. -/ +def blockSupport {n m : ℕ} (u : E (n + m)) : ℝ := + DiagonalZonotope.support (WithLp.ofLp (EuclideanSpace.finAddEquivProd u).1) + + DiagonalZonotope.support (WithLp.ofLp (EuclideanSpace.finAddEquivProd u).2) + +lemma blockSupport_zero (n m : ℕ) : blockSupport (0 : E (n + m)) = 0 := by + simp [blockSupport, DiagonalZonotope.support] + +lemma blockSupport_smul {n m : ℕ} (u : E (n + m)) (a : ℝ) : + blockSupport (a • u) = |a| * blockSupport u := by + simp only [blockSupport, map_smul, Prod.smul_fst, Prod.smul_snd] + change DiagonalZonotope.support (a • WithLp.ofLp (EuclideanSpace.finAddEquivProd u).1) + + DiagonalZonotope.support (a • WithLp.ofLp (EuclideanSpace.finAddEquivProd u).2) = _ + rw [DiagonalZonotope.support_smul, DiagonalZonotope.support_smul, mul_add] + +/-- A proved block brightness formula identifies the product projection zonotope. -/ +theorem projectionBody_eq_productZonotope {n m : ℕ} (P : Set (E (n + m))) + (c : ℝ) (hc : 0 < c) + (hbrightness : ∀ u : E (n + m), ‖u‖ = 1 → projectionVolume P u = c * blockSupport u) : + projectionBody P = DiagonalZonotope.euclideanProduct n m c := by + calc + projectionBody P = {x : E (n + m) | ∀ u : E (n + m), ‖u‖ = 1 → + ⟪u, x⟫ ≤ c * blockSupport u} := by + ext x + constructor + · intro hx u hu + rw [← hbrightness u hu] + exact hx u hu + · intro hx u hu + rw [hbrightness u hu] + exact hx u hu + _ = {x : E (n + m) | ∀ u : E (n + m), ⟪u, x⟫ ≤ c * blockSupport u} := by + apply unit_support_halfspaces_eq + · simp [blockSupport_zero] + · intro a ha u + rw [blockSupport_smul, abs_of_nonneg ha] + ring + _ = DiagonalZonotope.euclideanProduct n m c := + (DiagonalZonotope.euclideanProduct_eq_halfspaces n m c hc).symm + +/-- Body structure and attained orthogonal-projection support values for a block formula. -/ +theorem projection_productZonotope_is_body_and_attains {n m : ℕ} + (P : Set (E (n + m))) (c : ℝ) (hc : 0 < c) + (hbrightness : ∀ u : E (n + m), ‖u‖ = 1 → projectionVolume P u = c * blockSupport u) : + IsConvexBody (projectionBody P) ∧ + ∀ u : E (n + m), ‖u‖ = 1 → ∃ x ∈ projectionBody P, ⟪u, x⟫ = projectionVolume P u := by + have hbody := projectionBody_eq_productZonotope P c hc hbrightness + constructor + · rw [hbody] + exact ⟨DiagonalZonotope.isCompact_euclideanProduct n m c, + DiagonalZonotope.convex_euclideanProduct n m c, + DiagonalZonotope.euclideanProduct_interior_nonempty n m c hc.ne'⟩ + · intro u hu + obtain ⟨x, hx, heq⟩ := DiagonalZonotope.euclideanProduct_support_attained n m c u + refine ⟨x, hbody.symm ▸ hx, ?_⟩ + rw [hbrightness u hu] + exact heq + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/ProjectionKernel.lean b/lean/OAI/Geometry/ProjectionBody/ProjectionKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..d738b41c6afee8932acb903c2ca2759a2dafc937 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ProjectionKernel.lean @@ -0,0 +1,21 @@ +import OAI.Geometry.ProjectionBody.Definitions + +namespace OAI + +noncomputable section + +namespace ProjectionCounterexample + +@[simp] theorem project_self {d : ℕ} (u : E d) : project u u = 0 := + Submodule.starProjection_orthogonalComplement_singleton_eq_zero u + +theorem project_ker {d : ℕ} (u : E d) : + (project u).toLinearMap.ker = Submodule.span ℝ {u} := by + change (ℝ ∙ u)ᗮ.starProjection.ker = ℝ ∙ u + rw [Submodule.ker_starProjection, Submodule.orthogonal_orthogonal] + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/SimplexBrightness.lean b/lean/OAI/Geometry/ProjectionBody/SimplexBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..09eb3f4114e07a00e7fa5007f492cfbbfba687f9 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/SimplexBrightness.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.ProjectionBody.SimplexFacetCharts +import OAI.Geometry.ProjectionBody.GraphProjection +import OAI.Geometry.ProjectionBody.SimplexVolume +import OAI.Geometry.ProjectionBody.AffineChartMeasure +import OAI.Geometry.ProjectionBody.BrightnessSum +import OAI.Geometry.ProjectionBody.ProjectionKernel + +namespace OAI + +noncomputable section +open Set MeasureTheory Measure +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +theorem volume_simplex (n : ℕ) : + volume (simplex n) = ENNReal.ofReal (1 / (n.factorial : ℝ)) := by + rw [simplex_eq_coordinates] + exact volume_unit_euclideanSimplex n + +theorem simplexFacetProjection_normDet {n : ℕ} (i : Option (Fin (n + 1))) + {u : E (n + 1)} (hu : ‖u‖ = 1) : + ((project u).toLinearMap.comp (simplexFacetLinear n i)).normDet = + |simplexFunctional (n + 1) i u| := by + cases i with + | none => + change ((project u).toLinearMap.comp + (graphLinear (Fin.last n) (allOnes n))).normDet = _ + rw [graphProjection_normDet _ _ hu] + have hnormal : graphNormal (Fin.last n) (allOnes n) = allOnes (n + 1) := by + ext j + induction j using Fin.lastCases <;> + simp [graphNormal, insertZero, Fin.insertNth_last'] + simp [hnormal] + | some i => + change ((project u).toLinearMap.comp (insertZero i).toLinearMap).normDet = _ + rw [coordinateProjection_normDet i hu] + simp + +theorem simplex_projected_facet_volume {n : ℕ} (i : Option (Fin (n + 1))) + {u : E (n + 1)} (hu : ‖u‖ = 1) : + μHE[n] (project u '' boundingFace (simplexFunctional (n + 1)) simplexLevel i) = + ENNReal.ofReal ((1 / (n.factorial : ℝ)) * |simplexFunctional (n + 1) i u|) := by + rw [simplex_facet_eq_affine_image] + have h := measure_projected_affine_chart (simplexFacetLinear n i) + (simplexFacetCenter n i) (project u).toLinearMap (simplex n) + simp only [finrank_euclideanSpace_fin, ContinuousLinearMap.coe_coe] at h + rw [h, simplexFacetProjection_normDet i hu, volume_simplex, + ← ENNReal.ofReal_mul (abs_nonneg _), mul_comm] + +theorem simplex_projected_facet_measurable {n : ℕ} + (i : Option (Fin (n + 1))) (u : E (n + 1)) : + MeasurableSet (project u '' boundingFace (simplexFunctional (n + 1)) simplexLevel i) := by + rw [simplex_facet_eq_affine_image] + apply IsCompact.measurableSet + apply IsCompact.image _ (project u).continuous + apply (simplex_compact n).image + exact continuous_const.add (simplexFacetLinear n i).continuous_of_finiteDimensional + +theorem simplex_projected_facet_intersection_null {n : ℕ} (hn : 0 < n) + (i j : Option (Fin (n + 1))) (hij : i ≠ j) (u : E (n + 1)) : + μHE[n] (project u '' + (boundingFace (simplexFunctional (n + 1)) simplexLevel i ∩ + boundingFace (simplexFunctional (n + 1)) simplexLevel j)) = 0 := by + have hS : boundingFace (simplexFunctional (n + 1)) simplexLevel i ⊆ + (fun x => simplexFacetCenter n i + simplexFacetLinear n i x) '' (univ : Set (E n)) := by + rw [simplex_facet_eq_affine_image] + exact Set.image_mono (subset_univ _) + simpa only [finrank_euclideanSpace_fin, ContinuousLinearMap.coe_coe] using + measure_projected_transverse_intersection (simplexFacetLinear n i) + (simplexFacetCenter n i) (project u).toLinearMap + (simplexFunctional (n + 1) j) (simplexLevel j) _ _ hS + (fun _ h => h.2) (simplex_facet_transverse hn i j hij) + +/-- Actual orthogonal projection volume of the convex-hull standard simplex. -/ +theorem simplex_projectionVolume {n : ℕ} (hn : 0 < n) + {u : E (n + 1)} (hu : ‖u‖ = 1) : + projectionVolume (simplex (n + 1)) u = + ((∑ i, |u i|) + |∑ i, u i|) / (2 * (n.factorial : ℝ)) := by + have hu0 : u ≠ 0 := by intro h; simp [h] at hu + have h := real_measure_image_halfspaceBody + (simplexFunctional (n + 1)) simplexLevel (project u).toLinearMap μHE[n] + (project_self u) (simplex_has_positive_slope hu0) (project_ker u) + (fun i => simplex_projected_facet_measurable i u) + (fun i j hij => simplex_projected_facet_intersection_null hn i j hij u) + (1 / (n.factorial : ℝ)) (by positivity) (simplex_functional_balance u) + (fun i => simplex_projected_facet_volume i hu) + rw [← simplex_eq_halfspaceBody, simplex_absolute_slopes] at h + simp only [ContinuousLinearMap.coe_coe] at h + unfold projectionVolume + simp only [Nat.add_sub_cancel] + rw [h] + ring + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/SimplexFacetCharts.lean b/lean/OAI/Geometry/ProjectionBody/SimplexFacetCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a0dbfeb8172c0ae8a733aa5c58a86bce1ee26a7 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/SimplexFacetCharts.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.ProjectionBody.GraphChart +import OAI.Geometry.ProjectionBody.SimplexFacets + +namespace OAI + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +def allOnes (n : ℕ) : E n := WithLp.toLp 2 (fun _ => 1) + +@[simp] theorem allOnes_apply {n : ℕ} (i : Fin n) : allOnes n i = 1 := rfl + +@[simp] theorem inner_allOnes {n : ℕ} (x : E n) : ⟪allOnes n, x⟫ = ∑ i, x i := by + simp [PiLp.inner_apply, allOnes] + +/-- Linear part of each simplex facet chart. -/ +def simplexFacetLinear (n : ℕ) : Option (Fin (n + 1)) → E n →ₗ[ℝ] E (n + 1) + | none => graphLinear (Fin.last n) (allOnes n) + | some i => (insertZero i).toLinearMap + +def simplexFacetCenter (n : ℕ) : Option (Fin (n + 1)) → E (n + 1) + | none => EuclideanSpace.single (Fin.last n) 1 + | some _ => 0 + +theorem simplexFacetChart_none (n : ℕ) (x : E n) : + simplexFacetCenter n none + simplexFacetLinear n none x = sumFacetMap n x := by + ext j + induction j using Fin.lastCases + · simp [simplexFacetCenter, simplexFacetLinear, graphLinear, sub_eq_add_neg] + · simp [simplexFacetCenter, simplexFacetLinear, graphLinear, insertZero, + Fin.insertNth_last'] + +theorem simplex_facet_eq_affine_image (n : ℕ) (i : Option (Fin (n + 1))) : + boundingFace (simplexFunctional (n + 1)) simplexLevel i = + (fun x => simplexFacetCenter n i + simplexFacetLinear n i x) '' simplex n := by + cases i with + | none => + simp_rw [simplex_boundingFace_sum, simplexFacetChart_none] + exact sum_facet_eq_image n + | some i => + rw [simplex_boundingFace_coordinate, coordinate_facet_eq_image] + simp [simplexFacetCenter, simplexFacetLinear] + +/-- Every defining hyperplane other than the chart's own hyperplane is transverse. +The positive dimension excludes the degenerate segment-endpoint case. -/ +theorem simplex_facet_transverse {n : ℕ} (hn : 0 < n) + (i j : Option (Fin (n + 1))) (hij : i ≠ j) : + (simplexFunctional (n + 1) j).comp (simplexFacetLinear n i) ≠ 0 := by + intro heq + let k : Fin n := ⟨0, hn⟩ + cases i with + | none => + cases j with + | none => exact hij rfl + | some j => + induction j using Fin.lastCases with + | last => + have h := LinearMap.congr_fun heq (EuclideanSpace.single k 1) + simp [simplexFacetLinear, graphLinear] at h + | cast j => + have h := LinearMap.congr_fun heq (EuclideanSpace.single j 1) + simp [simplexFacetLinear, graphLinear, insertZero, Fin.insertNth_last'] at h + | some i => + cases j with + | none => + have h := LinearMap.congr_fun heq (EuclideanSpace.single k 1) + simp [simplexFacetLinear, sum_insertZero] at h + | some j => + have hji : j ≠ i := fun h => hij (congrArg some h.symm) + obtain ⟨k, rfl⟩ := Fin.exists_succAbove_eq hji + have h := LinearMap.congr_fun heq (EuclideanSpace.single k 1) + simp [simplexFacetLinear] at h + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean b/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean new file mode 100644 index 0000000000000000000000000000000000000000..95d2a183f2120af29518b5b634b190770d958295 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.ProjectionBody.ConvexGeometry +import OAI.Geometry.ProjectionBody.FacetCover +import Mathlib.Analysis.InnerProductSpace.Projection.Basic + +namespace OAI + +noncomputable section +open Set + +namespace ProjectionCounterexample + +/-- Coordinate linear functional on the Euclidean space. -/ +def coordinateFunctional {d : ℕ} (i : Fin d) : E d →ₗ[ℝ] ℝ where + toFun x := x i + map_add' _ _ := rfl + map_smul' _ _ := rfl + +@[simp] theorem coordinateFunctional_apply {d : ℕ} (i : Fin d) (x : E d) : + coordinateFunctional i x = x i := rfl + +/-- Outward defining functionals: the sum facet, then the coordinate facets. -/ +def simplexFunctional (d : ℕ) : Option (Fin d) → E d →ₗ[ℝ] ℝ + | none => ∑ i, coordinateFunctional i + | some i => -coordinateFunctional i + +def simplexLevel {d : ℕ} : Option (Fin d) → ℝ + | none => 1 + | some _ => 0 + +@[simp] theorem simplexFunctional_none (d : ℕ) (x : E d) : + simplexFunctional d none x = ∑ i, x i := by + simp [simplexFunctional] + +@[simp] theorem simplexFunctional_some {d : ℕ} (i : Fin d) (x : E d) : + simplexFunctional d (some i) x = -x i := rfl + +theorem simplex_eq_halfspaceBody (d : ℕ) : + simplex d = halfspaceBody (simplexFunctional d) simplexLevel := by + rw [simplex_eq_coordinates] + ext x + constructor + · rintro ⟨hx, hs⟩ i + cases i with + | none => simpa [simplexLevel] using hs + | some i => simpa [simplexLevel] using neg_nonpos.mpr (hx i) + · intro hx + constructor + · intro i + have := hx (some i) + simpa [simplexLevel] using this + · have := hx none + simpa [simplexLevel] using this + +/-- Every nonzero direction has a visible defining facet of the simplex. -/ +theorem simplex_has_positive_slope {d : ℕ} {u : E d} (hu : u ≠ 0) : + ∃ i, 0 < simplexFunctional d i u := by + by_contra h + have hall (i : Option (Fin d)) : simplexFunctional d i u ≤ 0 := + le_of_not_gt (fun hi => h ⟨i, hi⟩) + have hcoords (i : Fin d) : 0 ≤ u i := by + have := hall (some i) + simpa using this + have hsum : ∑ i, u i = 0 := by + apply le_antisymm + · simpa using hall none + · exact Finset.sum_nonneg fun i _ => hcoords i + have hzero : ∀ i : Fin d, u i = 0 := by + simpa using (Finset.sum_eq_zero_iff_of_nonneg (fun i _ => hcoords i)).mp hsum + apply hu + ext i + exact hzero i + +theorem simplex_functional_balance {d : ℕ} (u : E d) : + ∑ i, simplexFunctional d i u = 0 := by + simp [Fintype.sum_option, Finset.sum_neg_distrib] + +theorem simplex_absolute_slopes {d : ℕ} (u : E d) : + ∑ i, |simplexFunctional d i u| = (∑ i, |u i|) + |∑ i, u i| := by + simp [Fintype.sum_option, add_comm] + +theorem simplex_boundingFace_coordinate {d : ℕ} (i : Fin d) : + boundingFace (simplexFunctional d) simplexLevel (some i) = + {x ∈ simplex d | x i = 0} := by + ext x + simp [boundingFace, ← simplex_eq_halfspaceBody, simplexLevel] + +theorem simplex_boundingFace_sum (d : ℕ) : + boundingFace (simplexFunctional d) simplexLevel none = + {x ∈ simplex d | ∑ i, x i = 1} := by + ext x + simp [boundingFace, ← simplex_eq_halfspaceBody, simplexLevel] + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/SimplexVolume.lean b/lean/OAI/Geometry/ProjectionBody/SimplexVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ee04bfe153a7503ecd4f6130ed3abb59e89003c --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/SimplexVolume.lean @@ -0,0 +1,188 @@ +import Mathlib.Logic.Equiv.Fin.Basic +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic +import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +import Mathlib.MeasureTheory.Constructions.Pi +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.Measurability +import Mathlib.Tactic.SplitIfs + +namespace OAI + +/-! +# Volumes of standard simplices and their products + +The simplex-volume calculation below uses Tonelli's theorem and induction on the +dimension. At first coordinate `t`, the remaining section is a simplex of radius +`r - t`; its volume is integrated over `0 ≤ t ≤ r`. The Euclidean versions use +the measure-preserving equivalence between coordinate space and `EuclideanSpace`. +The product formula is proved using the product Lebesgue measure under the +canonical splitting of `Fin (p + q)`. +-/ + +open MeasureTheory Set +open scoped BigOperators ENNReal + +namespace ProjectionCounterexample + +/-- The coordinate standard simplex with nonnegative coordinates and sum at most `r`. -/ +def coordinateSimplex (n : ℕ) (r : ℝ) : Set (Fin n → ℝ) := + {x | (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ r} + +theorem coordinateSimplex_measurableSet (n : ℕ) (r : ℝ) : + MeasurableSet (coordinateSimplex n r) := by + unfold coordinateSimplex + measurability + +theorem coordinateSimplex_eq_empty_of_neg (n : ℕ) {r : ℝ} (hr : r < 0) : + coordinateSimplex n r = ∅ := by + apply Set.eq_empty_iff_forall_notMem.mpr + intro x hx + have hsum : 0 ≤ ∑ i, x i := Finset.sum_nonneg fun i _ => hx.1 i + exact (not_lt_of_ge (hsum.trans hx.2)) hr + +theorem integral_simplex_slice (n : ℕ) {r : ℝ} (hr : 0 ≤ r) : + (∫⁻ t in Icc 0 r, ENNReal.ofReal ((r - t) ^ n / (n.factorial : ℝ))) = + ENNReal.ofReal (r ^ (n + 1) / ((n + 1).factorial : ℝ)) := by + have hi : IntegrableOn (fun t : ℝ => (r - t) ^ n / (n.factorial : ℝ)) (Icc 0 r) := + ContinuousOn.integrableOn_Icc (by fun_prop) + have hn : 0 ≤ᵐ[volume.restrict (Icc 0 r)] + (fun t : ℝ => (r - t) ^ n / (n.factorial : ℝ)) := by + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + exact div_nonneg (pow_nonneg (sub_nonneg.mpr ht.2) n) (by positivity) + rw [← ofReal_integral_eq_lintegral_ofReal hi hn, + integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hr, + intervalIntegral.integral_div, intervalIntegral.integral_comp_sub_left (fun t : ℝ => t ^ n) r] + simp only [sub_self, sub_zero, integral_pow, + zero_pow (Nat.succ_ne_zero n), sub_zero] + congr 1 + rw [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, div_div] + +theorem volume_coordinateSimplex (n : ℕ) (r : ℝ) (hr : 0 ≤ r) : + volume (coordinateSimplex n r) = + ENNReal.ofReal (r ^ n / (n.factorial : ℝ)) := by + induction n generalizing r with + | zero => + have h : coordinateSimplex 0 r = univ := by + ext x + simp [coordinateSimplex, hr] + simp [h, Measure.volume_pi_eq_dirac (0 : Fin 0 → ℝ)] + | succ n ih => + let e := MeasurableEquiv.piFinSuccAbove (fun _ : Fin (n + 1) => ℝ) 0 + have he (p : ℝ × (Fin n → ℝ)) : e.symm p = Fin.cons p.1 p.2 := by + ext i + refine Fin.cases ?_ (fun j => ?_) i <;> simp [e, MeasurableEquiv.piFinSuccAbove] + have hslice (t : ℝ) : + Prod.mk t ⁻¹' (e.symm ⁻¹' coordinateSimplex (n + 1) r) = + if t ∈ Icc 0 r then coordinateSimplex n (r - t) else ∅ := by + ext x + simp only [mem_preimage, he, coordinateSimplex, mem_ofPred_eq, + Fin.forall_fin_succ, Fin.cons_zero, Fin.cons_succ, Fin.sum_univ_succ] + split_ifs with ht + · simp only [mem_ofPred_eq] + constructor + · rintro ⟨⟨_, hx⟩, hs⟩ + exact ⟨hx, by linarith⟩ + · rintro ⟨hx, hs⟩ + exact ⟨⟨ht.1, hx⟩, by linarith⟩ + · simp only [mem_empty_iff_false, iff_false] + rintro ⟨⟨ht0, hx⟩, hs⟩ + apply ht + have hsum : 0 ≤ ∑ i, x i := Finset.sum_nonneg fun i _ => hx i + exact ⟨ht0, by linarith⟩ + rw [← (volume_preserving_piFinSuccAbove + (fun _ : Fin (n + 1) => ℝ) 0).symm.measure_preimage_equiv] + change volume (e.symm ⁻¹' coordinateSimplex (n + 1) r) = _ + rw [Measure.volume_eq_prod, Measure.prod_apply + ((coordinateSimplex_measurableSet (n + 1) r).preimage e.symm.measurable)] + simp_rw [hslice] + have hfun : (fun t : ℝ => volume + (if t ∈ Icc 0 r then coordinateSimplex n (r - t) else ∅)) = + (Icc 0 r).indicator + (fun t : ℝ => ENNReal.ofReal ((r - t) ^ n / (n.factorial : ℝ))) := by + funext t + by_cases ht : t ∈ Icc 0 r + · simp [ht, ih (r - t) (sub_nonneg.mpr ht.2)] + · simp [ht] + rw [hfun, lintegral_indicator measurableSet_Icc] + exact integral_simplex_slice n hr + +/-- The standard simplex has ordinary Lebesgue volume `1 / n!`. -/ +theorem volume_unit_coordinateSimplex (n : ℕ) : + volume (coordinateSimplex n 1) = ENNReal.ofReal (1 / (n.factorial : ℝ)) := by + simpa using volume_coordinateSimplex n 1 zero_le_one + +/-- Exact volume of a possibly degenerate linear image of the coordinate simplex. -/ +theorem volume_linearImage_unit_coordinateSimplex (n : ℕ) + (f : (Fin n → ℝ) →ₗ[ℝ] (Fin n → ℝ)) : + volume (f '' coordinateSimplex n 1) = + ENNReal.ofReal (|LinearMap.det f| / (n.factorial : ℝ)) := by + rw [Measure.addHaar_image_linearMap, volume_unit_coordinateSimplex, + ← ENNReal.ofReal_mul (abs_nonneg _)] + congr 1 + ring + +/-- The same volume statement in Euclidean space with its canonical Euclidean measure. -/ +theorem volume_unit_euclideanSimplex (n : ℕ) : + volume {x : EuclideanSpace ℝ (Fin n) | (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1} = + ENNReal.ofReal (1 / (n.factorial : ℝ)) := by + have hs : MeasurableSet + {x : EuclideanSpace ℝ (Fin n) | (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1} := by + measurability + rw [← (PiLp.volume_preserving_toLp (Fin n)).measure_preimage hs.nullMeasurableSet] + exact volume_unit_coordinateSimplex n + +/-- Real-valued version of the Euclidean simplex volume. -/ +theorem realVolume_unit_euclideanSimplex (n : ℕ) : + (volume {x : EuclideanSpace ℝ (Fin n) | + (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1}).toReal = 1 / (n.factorial : ℝ) := by + rw [volume_unit_euclideanSimplex, ENNReal.toReal_ofReal] + positivity + + +/-- The coordinate product, with the first `p` and last `q` coordinates separated. -/ +def coordinateSimplexProduct (p q : ℕ) : Set (Fin (p + q) → ℝ) := + {x | (fun i : Fin p => x (Fin.castAdd q i)) ∈ coordinateSimplex p 1 ∧ + (fun i : Fin q => x (Fin.natAdd p i)) ∈ coordinateSimplex q 1} + +/-- The product-volume identity uses the actual product Lebesgue measure. -/ +theorem volume_coordinateSimplexProduct (p q : ℕ) : + volume (coordinateSimplexProduct p q) = + ENNReal.ofReal (1 / ((p.factorial : ℝ) * (q.factorial : ℝ))) := by + let e : (Fin (p + q) → ℝ) ≃ᵐ ((Fin p → ℝ) × (Fin q → ℝ)) := + (MeasurableEquiv.piCongrLeft (fun _ : Fin (p + q) => ℝ) + finSumFinEquiv).symm.trans (MeasurableEquiv.sumPiEquivProdPi (fun _ => ℝ)) + have he (x : Fin (p + q) → ℝ) : + e x = ((fun i : Fin p => x (Fin.castAdd q i)), + (fun i : Fin q => x (Fin.natAdd p i))) := by + rfl + have hm : MeasurePreserving e := + (volume_measurePreserving_piCongrLeft (fun _ : Fin (p + q) => ℝ) + finSumFinEquiv).symm.trans (volume_measurePreserving_sumPiEquivProdPi (fun _ => ℝ)) + have hs : coordinateSimplexProduct p q = + e ⁻¹' (coordinateSimplex p 1 ×ˢ coordinateSimplex q 1) := by + ext x + simp [coordinateSimplexProduct, he] + rw [hs, hm.measure_preimage_equiv, Measure.volume_eq_prod, Measure.prod_prod, + volume_unit_coordinateSimplex, volume_unit_coordinateSimplex, + ← ENNReal.ofReal_mul (by positivity : 0 ≤ 1 / (p.factorial : ℝ))] + congr 1 + ring + +/-- Product-simplex volume in the canonical Euclidean coordinates. -/ +theorem volume_euclideanSimplexProduct (p q : ℕ) : + volume {x : EuclideanSpace ℝ (Fin (p + q)) | + ((∀ i : Fin p, 0 ≤ x (Fin.castAdd q i)) ∧ + ∑ i : Fin p, x (Fin.castAdd q i) ≤ 1) ∧ + ((∀ i : Fin q, 0 ≤ x (Fin.natAdd p i)) ∧ + ∑ i : Fin q, x (Fin.natAdd p i) ≤ 1)} = + ENNReal.ofReal (1 / ((p.factorial : ℝ) * (q.factorial : ℝ))) := by + rw [← (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp + (Fin (p + q))).symm.measure_preimage_equiv] + exact volume_coordinateSimplexProduct p q + +end ProjectionCounterexample + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/Specification.lean b/lean/OAI/Geometry/ProjectionBody/Specification.lean new file mode 100644 index 0000000000000000000000000000000000000000..f1b4db9f352175957b8965ae6050a522a4fd5091 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/Specification.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.ProjectionBody.Counterexample + +namespace OAI + +open Set +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample.Specification + +theorem product_is_convex_body : IsConvexBody productBody := productBody_convexBody + +theorem projection_support_attained : + ∀ P : Set (E 20), P = simplex 20 ∨ P = productBody → + IsConvexBody (projectionBody P) ∧ + ∀ u : E 20, ‖u‖ = 1 → + ∃ x ∈ projectionBody P, ⟪u, x⟫ = projectionVolume P u := by + intro P hP + rcases hP with rfl | rfl + · exact simplex_twenty_projection_support + · exact product_projection_support + +theorem simplex_ratio : + ratio (simplex 20) = ((21 : ℝ) * (20 : ℝ) ^ 20) / (Nat.factorial 20 : ℝ) := + simplex_twenty_ratio + +theorem product_ratio : + ratio productBody / ratio (simplex 20) = (22355476 : ℝ) / 22020096 ∧ + (1 : ℝ) < ratio productBody / ratio (simplex 20) := by + constructor + · exact product_to_simplex_ratio + · rw [product_to_simplex_ratio] + exact numerical_strict_excess + +theorem simplex_upper_bound_false : + ¬ (∀ P : Set (E 20), IsConvexBody P → ratio P ≤ ratio (simplex 20)) := + universal_simplex_upper_bound_false + +end ProjectionCounterexample.Specification + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/UnitSupport.lean b/lean/OAI/Geometry/ProjectionBody/UnitSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4fbe556326529e8e922680d8fb0074f2babdd20 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/UnitSupport.lean @@ -0,0 +1,43 @@ +import Mathlib.Analysis.InnerProductSpace.Basic + +namespace OAI + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +/-- For a positively homogeneous support bound, unit directions determine all +directions. This connects the unit-sphere definition with an +explicit zonotope's halfspace description. -/ +theorem unit_support_halfspaces_eq + {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + (f : V → ℝ) (hzero : 0 ≤ f 0) + (hscale : ∀ (a : ℝ), 0 ≤ a → ∀ u, f (a • u) = a * f u) : + {x : V | ∀ u, ‖u‖ = 1 → ⟪u, x⟫ ≤ f u} = + {x : V | ∀ u, ⟪u, x⟫ ≤ f u} := by + ext x + constructor + · intro hx u + by_cases hu : u = 0 + · simpa [hu] using hzero + have hnorm : ‖u‖ ≠ 0 := norm_ne_zero_iff.mpr hu + let v : V := ‖u‖⁻¹ • u + have hv : ‖v‖ = 1 := by + simp [v, norm_smul, hnorm] + have huv : ‖u‖ • v = u := by + simp [v, smul_smul, hnorm] + calc + ⟪u, x⟫ = ‖u‖ * ⟪v, x⟫ := by + rw [← real_inner_smul_left, huv] + _ ≤ ‖u‖ * f v := mul_le_mul_of_nonneg_left (hx v hv) (norm_nonneg u) + _ = f u := by rw [← hscale ‖u‖ (norm_nonneg u) v, huv] + · intro hx u _ + exact hx u + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionBody/ZonotopeBridge.lean b/lean/OAI/Geometry/ProjectionBody/ZonotopeBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ed1bad8f11673d5a23850c7a676b921dc7135a2 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionBody/ZonotopeBridge.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.ProjectionBody.Definitions +import OAI.Geometry.ProjectionBody.UnitSupport +import OAI.Geometry.Zonotope.Euclidean + +namespace OAI + +/-! +Generic bridge from a *proved* directional projection-volume formula to the +explicit zonotope. The brightness formula is an explicit hypothesis of these +helper lemmas; no final counterexample theorem assumes it. +-/ +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace ProjectionCounterexample + +/-- A unit-direction brightness formula identifies the actual projection body. -/ +theorem projectionBody_eq_zonotope {d : ℕ} (P : Set (E d)) (c : ℝ) (hc : 0 < c) + (hbrightness : ∀ u : E d, ‖u‖ = 1 → + projectionVolume P u = c * DiagonalZonotope.support (WithLp.ofLp u)) : + projectionBody P = DiagonalZonotope.euclidean c := by + calc + projectionBody P = {x : E d | ∀ u : E d, ‖u‖ = 1 → + ⟪u, x⟫ ≤ c * DiagonalZonotope.support (WithLp.ofLp u)} := by + ext x + constructor + · intro hx u hu + rw [← hbrightness u hu] + exact hx u hu + · intro hx u hu + rw [hbrightness u hu] + exact hx u hu + _ = {x : E d | ∀ u : E d, + ⟪u, x⟫ ≤ c * DiagonalZonotope.support (WithLp.ofLp u)} := by + apply unit_support_halfspaces_eq + · simp [DiagonalZonotope.support] + · intro a ha u + change c * DiagonalZonotope.support (a • WithLp.ofLp u) = _ + rw [DiagonalZonotope.support_smul, abs_of_nonneg ha] + ring + _ = DiagonalZonotope.euclidean c := + (DiagonalZonotope.euclidean_eq_halfspaces c hc).symm + +/-- The brightness hypothesis gives both a genuine body and support attainment. -/ +theorem projection_zonotope_is_body_and_attains {d : ℕ} (P : Set (E d)) + (c : ℝ) (hc : 0 < c) + (hbrightness : ∀ u : E d, ‖u‖ = 1 → + projectionVolume P u = c * DiagonalZonotope.support (WithLp.ofLp u)) : + IsConvexBody (projectionBody P) ∧ + ∀ u : E d, ‖u‖ = 1 → ∃ x ∈ projectionBody P, ⟪u, x⟫ = projectionVolume P u := by + have hbody := projectionBody_eq_zonotope P c hc hbrightness + constructor + · rw [hbody] + exact ⟨DiagonalZonotope.isCompact_euclidean c, + DiagonalZonotope.convex_euclidean c, + DiagonalZonotope.euclidean_interior_nonempty c hc.ne'⟩ + · intro u hu + obtain ⟨x, hx, heq⟩ := DiagonalZonotope.euclidean_support_attained c u + refine ⟨x, hbody.symm ▸ hx, ?_⟩ + rw [hbrightness u hu] + exact heq + +end ProjectionCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/AffineBrightness.lean b/lean/OAI/Geometry/ProjectionVolume/AffineBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3400ae655c3220fae38ad4ab6dcb1d8c81995ec --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/AffineBrightness.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.ProjectionVolume.Basic +import Mathlib.Analysis.InnerProductSpace.NormDet +import Mathlib.LinearAlgebra.Matrix.Determinant.Basic +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.Ring + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092 + +private def normalFrameVector {n : ℕ} {ι : Type uι} [Fintype ι] + (u : Euclidean n) (b : OrthonormalBasis ι ℝ (normalHyperplane u)) : + Unit ⊕ ι → Euclidean n + | .inl _ => ‖u‖⁻¹ • u + | .inr i => b i + +private theorem normalFrameVector_orthonormal {n : ℕ} {ι : Type uι} [Fintype ι] + (u : Euclidean n) (hu : u ≠ 0) + (b : OrthonormalBasis ι ℝ (normalHyperplane u)) : + Orthonormal ℝ (normalFrameVector u b) := by + classical + have hn : ‖‖u‖⁻¹ • u‖ = 1 := by simp [norm_smul, hu] + have hb (i : ι) : ⟪u, (b i : Euclidean n)⟫ = 0 := + Submodule.mem_orthogonal_singleton_iff_inner_right.mp (b i).property + rw [orthonormal_iff_ite] + intro i j + rcases i with i | i <;> rcases j with j | j + · simp [normalFrameVector, hn] + · simp [normalFrameVector, real_inner_smul_left, hb] + · have hbi : ⟪(b i : Euclidean n), u⟫ = 0 := by rw [real_inner_comm, hb] + simp [normalFrameVector, real_inner_smul_right, hbi] + · simpa only [normalFrameVector, Sum.inr.injEq, Submodule.coe_inner] using b.inner_eq_ite i j + +private def normalFrame {n : ℕ} {ι : Type uι} [Fintype ι] + (u : Euclidean n) (hu : u ≠ 0) + (b : OrthonormalBasis ι ℝ (normalHyperplane u)) : + OrthonormalBasis (Unit ⊕ ι) ℝ (Euclidean n) := + OrthonormalBasis.mk (normalFrameVector_orthonormal u hu b) + ((normalFrameVector_orthonormal u hu b).linearIndependent.span_eq_top_of_card_eq_finrank' + (by + have h := (Submodule.span ℝ ({u} : Set (Euclidean n))).finrank_add_finrank_orthogonal + rw [finrank_span_singleton hu] at h + change 1 + Module.finrank ℝ (normalHyperplane u) = _ at h + rw [Module.finrank_eq_card_basis b.toBasis] at h + simpa only [Fintype.card_sum, Fintype.card_unique] using h)).ge + +@[simp] private theorem normalFrame_inl {n : ℕ} {ι : Type uι} [Fintype ι] + (u : Euclidean n) (hu : u ≠ 0) + (b : OrthonormalBasis ι ℝ (normalHyperplane u)) (i : Unit) : + normalFrame u hu b (.inl i) = ‖u‖⁻¹ • u := by + simp [normalFrame, normalFrameVector] + +@[simp] private theorem normalFrame_inr {n : ℕ} {ι : Type uι} [Fintype ι] + (u : Euclidean n) (hu : u ≠ 0) + (b : OrthonormalBasis ι ℝ (normalHyperplane u)) (i : ι) : + normalFrame u hu b (.inr i) = (b i : Euclidean n) := by + simp [normalFrame, normalFrameVector] + +def projectionTransport {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (u : Euclidean n) : + normalHyperplane (L.symm u) →ₗ[ℝ] normalHyperplane u := + (normalHyperplane u).orthogonalProjectionOnto.toLinearMap ∘ₗ + L.toLinearMap ∘ₗ (normalHyperplane (L.symm u)).subtype + +private theorem projectionTransport_matrix {n : ℕ} {ι : Type uι} [Fintype ι] [DecidableEq ι] + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (u : Euclidean n) (hu : u ≠ 0) + (hv : L.symm u ≠ 0) + (bv : OrthonormalBasis ι ℝ (normalHyperplane (L.symm u))) + (bu : OrthonormalBasis ι ℝ (normalHyperplane u)) : + L.toLinearMap.toMatrix (normalFrame (L.symm u) hv bv).toBasis + (normalFrame u hu bu).toBasis = + Matrix.fromBlocks (Matrix.of (fun _ _ : Unit => ‖u‖ / ‖L.symm u‖)) + (Matrix.of (fun (_ : Unit) j => ⟪‖u‖⁻¹ • u, L (bv j)⟫)) 0 + ((projectionTransport L u).toMatrix bv.toBasis bu.toBasis) := by + ext i j + simp only [LinearMap.toMatrix_apply, OrthonormalBasis.coe_toBasis, + OrthonormalBasis.coe_toBasis_repr_apply, OrthonormalBasis.repr_apply_apply] + rcases i with i | i <;> rcases j with j | j + · simp only [normalFrame_inl] + change ⟪‖u‖⁻¹ • u, L (‖L.symm u‖⁻¹ • L.symm u)⟫ = ‖u‖ / ‖L.symm u‖ + rw [map_smul, L.apply_symm_apply, real_inner_smul_left, real_inner_smul_right, + real_inner_self_eq_norm_sq] + field_simp + · simp only [normalFrame_inl, normalFrame_inr] + rfl + · have hbi : ⟪(bu i : Euclidean n), u⟫ = 0 := by + rw [real_inner_comm] + exact Submodule.mem_orthogonal_singleton_iff_inner_right.mp (bu i).property + simp only [normalFrame_inr, normalFrame_inl] + change ⟪(bu i : Euclidean n), L (‖L.symm u‖⁻¹ • L.symm u)⟫ = 0 + rw [map_smul, L.apply_symm_apply, real_inner_smul_right, hbi, mul_zero] + · simp only [normalFrame_inr] + change ⟪(bu i : Euclidean n), L (bv j)⟫ = + ((projectionTransport L u).toMatrix bv.toBasis bu.toBasis) i j + rw [LinearMap.toMatrix_apply] + rw [bu.coe_toBasis_repr_apply, bu.repr_apply_apply] + change ⟪(bu i : Euclidean n), L (bv j)⟫ = + ⟪bu i, (normalHyperplane u).orthogonalProjectionOnto (L (bv j))⟫ + exact (Submodule.inner_orthogonalProjectionOnto_eq_of_mem_left _ _).symm + +theorem projectionTransport_normDet {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (u : Euclidean n) (hu : u ≠ 0) : + (projectionTransport L u).normDet = + |L.toLinearMap.det| * ‖L.symm u‖ / ‖u‖ := by + have hv : L.symm u ≠ 0 := by simpa using hu + let bv := (stdOrthonormalBasis ℝ (normalHyperplane (L.symm u))).reindex + (finCongr (normalHyperplane_finrank (L.symm u) hv)) + let bu := (stdOrthonormalBasis ℝ (normalHyperplane u)).reindex + (finCongr (normalHyperplane_finrank u hu)) + have hL : |L.toLinearMap.det| = + |(L.toLinearMap.toMatrix (normalFrame (L.symm u) hv bv).toBasis + (normalFrame u hu bu).toBasis).det| := by + rw [← L.toLinearMap.normDet_eq_abs_det] + simpa only [Real.norm_eq_abs] using + L.toLinearMap.normDet_eq_norm_det_toMatrix + (normalFrame (L.symm u) hv bv) (normalFrame u hu bu) + rw [projectionTransport_matrix L u hu hv bv bu, + Matrix.det_fromBlocks_zero₂₁, Matrix.det_unique, Matrix.of_apply, abs_mul, + abs_of_nonneg (div_nonneg (norm_nonneg _) (norm_nonneg _))] at hL + have hA := (projectionTransport L u).normDet_eq_norm_det_toMatrix bv bu + rw [Real.norm_eq_abs] at hA + rw [← hA] at hL + rw [hL] + field_simp + +theorem projectionTransport_project {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (u x : Euclidean n) : + projectionTransport L u ((normalHyperplane (L.symm u)).orthogonalProjectionOnto x) = + (normalHyperplane u).orthogonalProjectionOnto (L x) := by + have hmem := (normalHyperplane (L.symm u)).sub_starProjection_mem_orthogonal x + have hspan : (normalHyperplane (L.symm u))ᗮ = + Submodule.span ℝ ({L.symm u} : Set (Euclidean n)) := by + simp [normalHyperplane] + rw [hspan] at hmem + obtain ⟨t, ht⟩ := Submodule.mem_span_singleton.mp hmem + have huorth : L (x - (normalHyperplane (L.symm u)).starProjection x) ∈ + (normalHyperplane u)ᗮ := by + rw [← ht, map_smul, L.apply_symm_apply] + simpa only [normalHyperplane, Submodule.orthogonal_orthogonal] using + (Submodule.span ℝ ({u} : Set (Euclidean n))).smul_mem t + (Submodule.mem_span_singleton_self u) + have hz := (normalHyperplane u).orthogonalProjectionOnto_apply_of_mem_orthogonal huorth + rw [map_sub, map_sub] at hz + exact (sub_eq_zero.mp hz).symm + +theorem projection_image_linearEquiv {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (K : Set (Euclidean n)) (u : Euclidean n) : + (normalHyperplane u).orthogonalProjectionOnto '' (L '' K) = + projectionTransport L u '' + ((normalHyperplane (L.symm u)).orthogonalProjectionOnto '' K) := by + simp only [Set.image_image, projectionTransport_project] + +theorem projectionVolume_linearEquiv_image {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (K : Set (Euclidean n)) + (u : Euclidean n) (hu : u ≠ 0) : + projectionVolume (L '' K) u = + ENNReal.ofReal (|L.toLinearMap.det| * ‖L.symm u‖ / ‖u‖) * + projectionVolume K (L.symm u) := by + have hv : L.symm u ≠ 0 := by simpa using hu + have hrank : Module.finrank ℝ (normalHyperplane (L.symm u)) = + Module.finrank ℝ (normalHyperplane u) := by + rw [normalHyperplane_finrank (L.symm u) hv, normalHyperplane_finrank u hu] + have h := (projectionTransport L u).euclideanHausdorffMeasure_image_eq_normDet_mul_volume + ((normalHyperplane (L.symm u)).orthogonalProjectionOnto '' K) + rw [hrank, InnerProductSpace.euclideanHausdorffMeasure_eq_volume, + projectionTransport_normDet L u hu] at h + simpa only [projectionVolume, projection_image_linearEquiv] using h + +theorem brightness_linearEquiv_image {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (K : Set (Euclidean n)) (u : Euclidean n) : + brightness (L '' K) u = |L.toLinearMap.det| * brightness K (L.symm u) := by + by_cases hu : u = 0 + · simp [hu, brightness] + have hn : 0 ≤ |L.toLinearMap.det| * ‖L.symm u‖ / ‖u‖ := + div_nonneg (mul_nonneg (abs_nonneg _) (norm_nonneg _)) (norm_nonneg _) + rw [brightness, projectionVolume_linearEquiv_image L K u hu, + ENNReal.toReal_mul, ENNReal.toReal_ofReal hn, brightness] + field_simp + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/AffineCovariance.lean b/lean/OAI/Geometry/ProjectionVolume/AffineCovariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..38f05269dda6a11df8e3eb770dd1bc2f29fc5462 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/AffineCovariance.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.ProjectionVolume.AffineBrightness +import OAI.Geometry.ProjectionVolume.Translation +import OAI.Geometry.ProjectionVolume.SimplexValue +import Mathlib.Analysis.InnerProductSpace.Adjoint +import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Ring + +namespace OAI + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem det_adjoint {n : ℕ} (A : Euclidean n →ₗ[ℝ] Euclidean n) : + A.adjoint.det = A.det := by + let b := stdOrthonormalBasis ℝ (Euclidean n) + rw [← LinearMap.det_toMatrix b.toBasis A.adjoint, LinearMap.toMatrix_adjoint, + Matrix.det_conjTranspose, LinearMap.det_toMatrix] + simp + +theorem projectionBody_linearEquiv_image {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (K : Set (Euclidean n)) : + projectionBody (L '' K) = + (|L.toLinearMap.det| • L.symm.toLinearMap.adjoint) '' projectionBody K := by + have hb := brightness_linearEquiv_image L K + let c := |L.toLinearMap.det| + have hc : 0 < c := abs_pos.mpr L.isUnit_det'.ne_zero + ext y + constructor + · intro hy + let z := c⁻¹ • L.toLinearMap.adjoint y + refine ⟨z, ?_, ?_⟩ + · intro u + have h := hy (L u) + rw [hb, L.symm_apply_apply] at h + change ⟪u, c⁻¹ • L.toLinearMap.adjoint y⟫ ≤ brightness K u + rw [inner_smul_right, LinearMap.adjoint_inner_right] + calc + c⁻¹ * ⟪L u, y⟫ ≤ c⁻¹ * (c * brightness K u) := + mul_le_mul_of_nonneg_left h (inv_nonneg.mpr hc.le) + _ = brightness K u := by field_simp + · change c • L.symm.toLinearMap.adjoint z = y + have hcancel : L.symm.toLinearMap.adjoint (L.toLinearMap.adjoint y) = y := by + change (L.symm.toLinearMap.adjoint.comp L.toLinearMap.adjoint) y = y + rw [← LinearMap.adjoint_comp] + simp + simp [z, map_smul, hcancel, smul_smul, hc.ne'] + · rintro ⟨z, hz, rfl⟩ u + change ⟪u, c • L.symm.toLinearMap.adjoint z⟫ ≤ _ + rw [inner_smul_right, LinearMap.adjoint_inner_right, hb] + exact mul_le_mul_of_nonneg_left (hz (L.symm u)) hc.le + +theorem det_projectionBody_transform {n : ℕ} (hn : 0 < n) + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) : + |(|L.toLinearMap.det| • L.symm.toLinearMap.adjoint).det| = + |L.toLinearMap.det| ^ (n - 1) := by + rw [LinearMap.det_smul, det_adjoint, LinearEquiv.det_coe_symm, + finrank_euclideanSpace_fin, abs_mul, abs_pow, abs_abs, abs_inv] + obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_zero_of_lt hn) + simp [pow_succ, L.isUnit_det'.ne_zero] + +theorem normalizedProjectionVolume_linearEquiv_image {n : ℕ} + (hn : 0 < n) (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (K : Set (Euclidean n)) : + normalizedProjectionVolume (L '' K) = normalizedProjectionVolume K := by + have hc : |L.toLinearMap.det| ≠ 0 := abs_ne_zero.mpr L.isUnit_det'.ne_zero + have hvol : volume (L '' K) = + ENNReal.ofReal |L.toLinearMap.det| * volume K := + volume.addHaar_image_linearMap L.toLinearMap K + unfold normalizedProjectionVolume + rw [projectionBody_linearEquiv_image L K, + volume.addHaar_image_linearMap, det_projectionBody_transform hn L, + ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg (abs_nonneg _) _), + hvol, ENNReal.toReal_mul, ENNReal.toReal_ofReal (abs_nonneg _), mul_pow] + exact mul_div_mul_left _ _ (pow_ne_zero _ hc) + +theorem standardSimplex_affine_image_normalizedProjectionVolume {n : ℕ} (hn : 0 < n) + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) : + normalizedProjectionVolume (v +ᵥ (L '' standardSimplex n)) = simplexConstant n := by + rw [normalizedProjectionVolume_vadd, normalizedProjectionVolume_linearEquiv_image hn, + standardSimplex_normalizedProjectionVolume n hn] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean b/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..6689c897ebe64953d6d56c2d9e47469791ba917b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.ProjectionVolume.BallBrightness +import OAI.Geometry.ProjectionVolume.SupportLimit +import OAI.Geometry.ProjectionVolume.InnerSequence + +namespace OAI + +open Set Metric Filter MeasureTheory +open scoped Pointwise Topology RealInnerProductSpace + +namespace Paper092 + +theorem volume_smul_real {d : ℕ} (P : Set (Euclidean d)) {c : ℝ} (hc : 0 ≤ c) : + (volume (c • P)).toReal = c ^ d * (volume P).toReal := by + rw [Measure.addHaar_smul, finrank_euclideanSpace_fin, abs_pow, abs_of_nonneg hc, + ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg hc _)] + +theorem volume_real_mono {d : ℕ} {P K : Set (Euclidean d)} (hK : IsCompact K) (h : P ⊆ K) : + (volume P).toReal ≤ (volume K).toReal := + ENNReal.toReal_mono hK.measure_lt_top.ne (measure_mono h) + +theorem approximation_brightness_bound {d : ℕ} (hd : 2 ≤ d) + {P K : Set (Euclidean d)} (hP : IsCompact P) (hK : IsCompact K) + {scale R : ℝ} (hscale : 1 ≤ scale) (hR : 0 ≤ R) (hPK : P ⊆ K) (hKP : K ⊆ scale • P) + (hKR : K ⊆ closedBall 0 R) (u : Euclidean d) (hu : ‖u‖ = 1) : + 0 ≤ brightness K u - brightness P u ∧ + brightness K u - brightness P u ≤ + (scale ^ (d - 1) - 1) * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by + have hmono := brightness_mono hPK hK u + have hupper : brightness K u ≤ scale ^ (d - 1) * brightness P u := by + have hh := brightness_mono hKP (hP.smul scale) u + simpa only [brightness_body_smul, abs_of_nonneg (zero_le_one.trans hscale)] using hh + have hbound : brightness P u ≤ euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := + hmono.trans (by simpa only [hu, one_mul] using brightness_le_ball_bound hd hR hKR u) + have hpow : 1 ≤ scale ^ (d - 1) := one_le_pow₀ hscale + refine ⟨sub_nonneg.mpr hmono, ?_⟩ + calc + brightness K u - brightness P u ≤ (scale ^ (d - 1) - 1) * brightness P u := by nlinarith + _ ≤ _ := mul_le_mul_of_nonneg_left hbound (sub_nonneg.mpr hpow) + +theorem approximation_projectionBody_sandwich {d : ℕ} {P K : Set (Euclidean d)} + (hP : IsCompact P) (hK : IsCompact K) {scale : ℝ} (hscale : 0 < scale) + (hPK : P ⊆ K) (hKP : K ⊆ scale • P) : + projectionBody P ⊆ projectionBody K ∧ + projectionBody K ⊆ scale ^ (d - 1) • projectionBody P := by + refine ⟨projectionBody_mono hPK hK, ?_⟩ + have hh := projectionBody_mono hKP (hP.smul scale) + simpa only [projectionBody_body_smul P scale hscale.ne', abs_of_pos hscale] using hh + +theorem approximation_volume_sandwich {d : ℕ} {P K : Set (Euclidean d)} + (hP : IsCompact P) (hK : IsCompact K) {scale : ℝ} (hscale : 0 ≤ scale) + (hPK : P ⊆ K) (hKP : K ⊆ scale • P) : + (volume P).toReal ≤ (volume K).toReal ∧ + (volume K).toReal ≤ scale ^ d * (volume P).toReal := by + refine ⟨volume_real_mono hK hPK, ?_⟩ + exact (volume_real_mono (hP.smul scale) hKP).trans_eq (volume_smul_real P hscale) + +theorem approximation_projectionBody_volume_sandwich {d : ℕ} {P K : Set (Euclidean d)} + (hP : IsCompact P) (hK : IsCompact K) {scale : ℝ} (hscale : 0 < scale) + (hPK : P ⊆ K) (hKP : K ⊆ scale • P) : + (volume (projectionBody P)).toReal ≤ (volume (projectionBody K)).toReal ∧ + (volume (projectionBody K)).toReal ≤ + scale ^ (d * (d - 1)) * (volume (projectionBody P)).toReal := by + obtain ⟨hPiPK, hPiKP⟩ := approximation_projectionBody_sandwich hP hK hscale hPK hKP + have hh := approximation_volume_sandwich (projectionBody_isCompact P) + (projectionBody_isCompact K) (pow_nonneg hscale.le _) hPiPK hPiKP + simpa only [← pow_mul, Nat.mul_comm (d - 1) d] using hh + +theorem approximation_brightness_uniform {d : ℕ} (hd : 2 ≤ d) + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 1 ≤ scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + {R : ℝ} (hR : 0 ≤ R) (hKR : K ⊆ closedBall 0 R) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) : + TendstoUniformlyOn (fun m u => brightness (P m) u) (brightness K) atTop (sphere 0 1) := by + let C := euclideanUnitBallVolume (d - 1) * R ^ (d - 1) + have hcont : Continuous (fun r : ℝ => (r ^ (d - 1) - 1) * C) := by fun_prop + have hlim : Tendsto (fun m => (scale m ^ (d - 1) - 1) * C) atTop (𝓝 0) := by + simpa only [Function.comp_def, one_pow, sub_self, zero_mul] using (hcont.tendsto 1).comp hscalelim + apply Metric.tendstoUniformlyOn_iff.mpr + intro ε hε + filter_upwards [hlim.eventually (Iio_mem_nhds hε)] with m hm + intro u hu + have hunit : ‖u‖ = 1 := mem_sphere_zero_iff_norm.mp hu + have hb := approximation_brightness_bound hd (hP m) hK (hscale m) hR (hPK m) (hKP m) hKR u hunit + rw [Real.dist_eq, abs_of_nonneg hb.1] + exact hb.2.trans_lt hm + +theorem tendsto_of_multiplicative_sandwich {f q : ℕ → ℝ} {L : ℝ} + (hq : ∀ m, 0 < q m) (hqlim : Tendsto q atTop (𝓝 1)) + (hupper : ∀ m, f m ≤ L) (hlower : ∀ m, L ≤ q m * f m) : + Tendsto f atTop (𝓝 L) := by + have hlim : Tendsto (fun m => L / q m) atTop (𝓝 L) := by + have hcont : ContinuousAt (fun x : ℝ => L / x) 1 := by fun_prop (disch := norm_num) + simpa only [Function.comp_def, div_one] using hcont.tendsto.comp hqlim + apply tendsto_of_tendsto_of_tendsto_of_le_of_le hlim tendsto_const_nhds + · intro m + exact (div_le_iff₀ (hq m)).mpr (by simpa only [mul_comm] using hlower m) + · exact hupper + +theorem approximation_volume_tendsto {d : ℕ} + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 0 < scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) : + Tendsto (fun m => (volume (P m)).toReal) atTop (𝓝 (volume K).toReal) ∧ + Tendsto (fun m => (volume (projectionBody (P m))).toReal) atTop + (𝓝 (volume (projectionBody K)).toReal) := by + have hq (k : ℕ) : Tendsto (fun m => scale m ^ k) atTop (𝓝 1) := by + have hcont : Continuous (fun x : ℝ => x ^ k) := by fun_prop + simpa only [Function.comp_def, one_pow] using (hcont.tendsto 1).comp hscalelim + constructor + · apply tendsto_of_multiplicative_sandwich (fun m => pow_pos (hscale m) d) (hq d) + · exact fun m => (approximation_volume_sandwich (hP m) hK (hscale m).le (hPK m) (hKP m)).1 + · exact fun m => (approximation_volume_sandwich (hP m) hK (hscale m).le (hPK m) (hKP m)).2 + · apply tendsto_of_multiplicative_sandwich (fun m => pow_pos (hscale m) (d * (d - 1))) + (hq (d * (d - 1))) + · exact fun m => (approximation_projectionBody_volume_sandwich (hP m) hK (hscale m) (hPK m) (hKP m)).1 + · exact fun m => (approximation_projectionBody_volume_sandwich (hP m) hK (hscale m) (hPK m) (hKP m)).2 + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/AreaNormalVectors.lean b/lean/OAI/Geometry/ProjectionVolume/AreaNormalVectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bbc3fe593fb3d40be67eb07cc56562ecc147d5f --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/AreaNormalVectors.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.ProjectionVolume.FacetLinearImage +import OAI.Geometry.ProjectionVolume.GeneralProduct +import OAI.Geometry.ProjectionVolume.SimplexPolytope + +namespace OAI + +universe uι uκ + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem affineHyperplane_linearImage_areaNormal {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + (μHE[n - 1] (L '' F)).toReal • linearImageNormal L v = + (|L.toLinearMap.det| • L.symm.toLinearMap.adjoint) ((μHE[n - 1] F).toReal • v) := by + rw [affineHyperplane_linearImage_area_real L v hv c F hplane, linearImageNormal, + smul_smul, LinearMap.smul_apply, map_smul, smul_smul] + congr 1 + field_simp [norm_ne_zero_iff.mpr (inverseAdjoint_ne_zero L v hv)] + +theorem simplexFacet_coordinate_areaNormal (n : ℕ) (i : Fin (n + 1)) : + (μHE[n] (simplexFacet (n + 1) (some i))).toReal • + (-EuclideanSpace.single i (1 : ℝ)) = + -(1 / (n.factorial : ℝ)) • EuclideanSpace.single i (1 : ℝ) := by + rw [simplexFacet_coordinate_area, ENNReal.toReal_ofReal (by positivity)] + exact (smul_neg _ _).trans (neg_smul _ _).symm + +theorem simplexFacet_diagonal_areaNormal (n : ℕ) : + (μHE[n] (simplexFacet (n + 1) none)).toReal • diagonalUnitNormal (n + 1) = + (1 / (n.factorial : ℝ)) • diagonalVector (n + 1) := by + rw [simplexFacet_diagonal_area, ENNReal.toReal_ofReal (by positivity), + diagonalUnitNormal, smul_smul] + congr 1 + have hs : Real.sqrt ((n : ℝ) + 1) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by positivity)) + push_cast + field_simp + +namespace HPolytope + +theorem product_areaNormal_inl {r s : ℕ} (hr : 0 < r) + {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] (A : HPolytope r ι) (B : HPolytope s κ) + (i : ι) : + splitEuclideanProduct r s ((A.product B).faceArea (.inl i) • + (A.product B).normal (.inl i)) = + ((volume B.body).toReal • (A.faceArea i • A.normal i), 0) := by + rw [product_faceArea_inl hr] + change splitEuclideanProduct r s ((A.faceArea i * (volume B.body).toReal) • + productLiftLeft r s (A.normal i)) = _ + simp [productLiftLeft, smul_smul, mul_comm] + +theorem product_areaNormal_inr {r s : ℕ} (hs : 0 < s) + {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] (A : HPolytope r ι) (B : HPolytope s κ) + (i : κ) : + splitEuclideanProduct r s ((A.product B).faceArea (.inr i) • + (A.product B).normal (.inr i)) = + (0, (volume A.body).toReal • (B.faceArea i • B.normal i)) := by + rw [product_faceArea_inr hs] + change splitEuclideanProduct r s (((volume A.body).toReal * B.faceArea i) • + productLiftRight r s (B.normal i)) = _ + simp [productLiftRight, smul_smul] + +end HPolytope +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Arithmetic.lean b/lean/OAI/Geometry/ProjectionVolume/Arithmetic.lean new file mode 100644 index 0000000000000000000000000000000000000000..55eb4edea320f87718e2c8245a17db6d7c461a82 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Arithmetic.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.ProjectionVolume.Model +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity + +namespace OAI + +namespace Paper092 + +theorem simplex_constant_product_ratio (r s : ℕ) (hr : 0 < r) (hs : 0 < s) : + simplexConstant r * simplexConstant s / simplexConstant (r + s) = + ((r + 1 : ℝ) * (s + 1) / (r + s + 1)) * (Nat.choose (r + s) r : ℝ) * + ((r : ℝ) ^ r * (s : ℝ) ^ s / ((r + s : ℕ) : ℝ) ^ (r + s)) := by + have hfac := Nat.choose_mul_factorial_mul_factorial (show r ≤ r + s by omega) + simp only [Nat.add_sub_cancel_left] at hfac + have hfac' : (Nat.choose (r + s) r : ℝ) * r.factorial * s.factorial = + ((r + s).factorial : ℝ) := by exact_mod_cast hfac + have hr0 : (r.factorial : ℝ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero r + have hs0 : (s.factorial : ℝ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero s + have hrs0 : ((r + s : ℕ) : ℝ) ≠ 0 := by positivity + have hrs1 : (r : ℝ) + s + 1 ≠ 0 := by positivity + have hfrs0 : ((r + s).factorial : ℝ) ≠ 0 := by + exact_mod_cast Nat.factorial_ne_zero (r + s) + unfold simplexConstant + push_cast + field_simp + nlinarith [hfac'] + +theorem dimension_twenty_ratio : + simplexConstant 10 * simplexConstant 10 / simplexConstant 20 = + (22355476 : ℝ) / 22020096 := by + norm_num [simplexConstant, Nat.factorial] + +theorem dimension_twenty_strict : + simplexConstant 20 < simplexConstant 10 * simplexConstant 10 := by + norm_num [simplexConstant, Nat.factorial] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/AugmentedDeterminant.lean b/lean/OAI/Geometry/ProjectionVolume/AugmentedDeterminant.lean new file mode 100644 index 0000000000000000000000000000000000000000..8eb99e612a8198ee8f6f64530fb652bf3a24f1f8 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/AugmentedDeterminant.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +universe uι + +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +noncomputable def augmentedTangentMatrix {d : ℕ} {ι : Type uι} [Fintype ι] + (v : Euclidean d) (b : OrthonormalBasis ι ℝ (normalHyperplane v)) + (B : OrthonormalBasis (ι ⊕ Fin 1) ℝ (Euclidean d)) (u : Euclidean d) : + Matrix (ι ⊕ Fin 1) (ι ⊕ Fin 1) ℝ := + fun i j => ⟪B i, Sum.elim (fun k => (b k : Euclidean d)) (fun _ => u) j⟫ + +theorem abs_det_augmentedTangentMatrix {d : ℕ} {ι : Type uι} [Fintype ι] [DecidableEq ι] + (v : Euclidean d) (hv : ‖v‖ = 1) (b : OrthonormalBasis ι ℝ (normalHyperplane v)) + (B : OrthonormalBasis (ι ⊕ Fin 1) ℝ (Euclidean d)) (u : Euclidean d) : + |(augmentedTangentMatrix v b B u).det| = |⟪u, v⟫| := by + let w : ι ⊕ Fin 1 → Euclidean d := Sum.elim (fun k => (b k : Euclidean d)) (fun _ => u) + let a : ι → ℝ := fun i => ⟪u, (b i : Euclidean d)⟫ + let M := augmentedTangentMatrix v b B u + have hgram : Matrix.gram ℝ w = Matrix.fromBlocks + (1 : Matrix ι ι ℝ) (Matrix.of fun i (_ : Fin 1) => a i) + (Matrix.of fun (_ : Fin 1) j => a j) + (Matrix.of fun (_ _ : Fin 1) => ‖u‖ ^ 2) := by + ext i j + rcases i with i | i <;> rcases j with j | j + · exact b.inner_eq_ite i j + · change ⟪(b i : Euclidean d), u⟫ = ⟪u, (b i : Euclidean d)⟫ + exact real_inner_comm _ _ + · rfl + · exact real_inner_self_eq_norm_sq u + have hsum : (∑ i, a i ^ 2) = ‖u‖ ^ 2 - ⟪u, v⟫ ^ 2 := by + have h := b.sum_sq_inner_left ((normalHyperplane v).orthogonalProjectionOnto u) + simp only [Submodule.inner_orthogonalProjectionOnto_eq_of_mem_right] at h + change (∑ i, a i ^ 2) = ‖(normalHyperplane v).orthogonalProjectionOnto u‖ ^ 2 at h + rw [h] + change ‖(normalHyperplane v).starProjection u‖ ^ 2 = _ + rw [normal_starProjection_unit v u hv, ← real_inner_self_eq_norm_sq] + simp only [inner_sub_left, inner_sub_right, real_inner_smul_left, real_inner_smul_right, + real_inner_self_eq_norm_sq, norm_smul, Real.norm_eq_abs, hv, mul_one, sq_abs] + rw [real_inner_comm v u] + ring + have hgdet : (Matrix.gram ℝ w).det = ⟪u, v⟫ ^ 2 := by + rw [hgram, Matrix.det_fromBlocks_one₁₁, Matrix.det_unique] + change ‖u‖ ^ 2 - (∑ i, a i * a i) = ⟪u, v⟫ ^ 2 + simp_rw [← pow_two] + rw [hsum] + ring + have hfactor : M.transpose * M = Matrix.gram ℝ w := by + ext i j + change (∑ k, ⟪B k, w i⟫ * ⟪B k, w j⟫) = ⟪w i, w j⟫ + calc + (∑ k, ⟪B k, w i⟫ * ⟪B k, w j⟫) = + ∑ k, ⟪w i, B k⟫ * ⟪B k, w j⟫ := by + apply Finset.sum_congr rfl + intro k _ + rw [real_inner_comm (B k) (w i)] + _ = ⟪w i, w j⟫ := B.sum_inner_mul_inner _ _ + have hsquare : M.det ^ 2 = ⟪u, v⟫ ^ 2 := by + calc + M.det ^ 2 = (M.transpose * M).det := by + rw [Matrix.det_mul, Matrix.det_transpose, pow_two] + _ = (Matrix.gram ℝ w).det := congrArg Matrix.det hfactor + _ = ⟪u, v⟫ ^ 2 := hgdet + change |M.det| = _ + nlinarith [sq_abs M.det, sq_abs ⟪u, v⟫, abs_nonneg M.det, abs_nonneg ⟪u, v⟫] + +noncomputable def tangentColumns {n : ℕ} (v : Euclidean (n + 1)) + (b : OrthonormalBasis (Fin n) ℝ (normalHyperplane v)) (u : Euclidean (n + 1)) : + Matrix (Fin (n + 1)) (Fin (n + 1)) ℝ := + fun i j => (Fin.append (fun k => (b k : Euclidean (n + 1))) (fun _ : Fin 1 => u) j) i + +theorem abs_det_tangentColumns {n : ℕ} (v : Euclidean (n + 1)) (hv : ‖v‖ = 1) + (b : OrthonormalBasis (Fin n) ℝ (normalHyperplane v)) (u : Euclidean (n + 1)) : + |(tangentColumns v b u).det| = |⟪u, v⟫| := by + let e : Fin n ⊕ Fin 1 ≃ Fin (n + 1) := finSumFinEquiv + let B : OrthonormalBasis (Fin n ⊕ Fin 1) ℝ (Euclidean (n + 1)) := + (EuclideanSpace.basisFun (Fin (n + 1)) ℝ).reindex e.symm + have hB (i : Fin n ⊕ Fin 1) : B i = EuclideanSpace.single (e i) 1 := by + rw [OrthonormalBasis.reindex_apply] + exact EuclideanSpace.basisFun_apply (Fin (n + 1)) ℝ (e i) + have hm : augmentedTangentMatrix v b B u = (tangentColumns v b u).submatrix e e := by + ext i j + change ⟪B i, Sum.elim (fun k => (b k : Euclidean (n + 1))) (fun _ => u) j⟫ = + (Fin.append (fun k => (b k : Euclidean (n + 1))) (fun _ : Fin 1 => u) (e j)) (e i) + rw [hB] + rcases j with j | j + · simp [e, EuclideanSpace.inner_single_left] + · simp [e, EuclideanSpace.inner_single_left] + have h := abs_det_augmentedTangentMatrix v hv b B u + rw [hm, Matrix.det_submatrix_equiv_self] at h + exact h + +theorem hyperplaneProjection_normDet_eq_abs_augmented_det {n : ℕ} + (u v : Euclidean (n + 1)) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) + (b : OrthonormalBasis (Fin n) ℝ (normalHyperplane v)) : + (hyperplaneProjection u v).normDet = |(tangentColumns v b u).det| := by + rw [hyperplaneProjection_normDet u v hu hv, abs_det_tangentColumns v hv b u] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean b/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e69e0dfdd0f552ffbf2930cbac90a4829ac238a --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.ProjectionVolume.Brightness +import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls +import Mathlib.Analysis.Normed.Module.Ball.Pointwise + +namespace OAI + +open Set Metric MeasureTheory +open scoped Pointwise RealInnerProductSpace + +namespace Paper092 + +noncomputable def euclideanUnitBallVolume (d : ℕ) : ℝ := + (volume (closedBall (0 : Euclidean d) 1)).toReal + +theorem projection_image_closedBall {d : ℕ} (u : Euclidean d) (R : ℝ) : + (normalHyperplane u).orthogonalProjectionOnto '' closedBall (0 : Euclidean d) R = + closedBall (0 : normalHyperplane u) R := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + apply mem_closedBall_zero_iff.mpr + exact ((normalHyperplane u).norm_orthogonalProjectionOnto_apply_le x).trans + (mem_closedBall_zero_iff.mp hx) + · intro hy + refine ⟨y.val, ?_, (normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self y⟩ + simpa only [mem_closedBall, dist_zero_right, Submodule.norm_coe] using hy + +theorem projectionVolume_closedBall_real {d : ℕ} (hd : 2 ≤ d) + (u : Euclidean d) (hu : u ≠ 0) (R : ℝ) (hR : 0 ≤ R) : + (projectionVolume (closedBall (0 : Euclidean d) R) u).toReal = + euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := by + let : Nontrivial (normalHyperplane u) := Module.nontrivial_of_finrank_pos (by + rw [normalHyperplane_finrank u hu] + omega) + let : Nontrivial (Euclidean (d - 1)) := Module.nontrivial_of_finrank_pos (by + rw [finrank_euclideanSpace_fin] + omega) + have hunit : (volume (closedBall (0 : normalHyperplane u) 1)) = + volume (closedBall (0 : Euclidean (d - 1)) 1) := by + rw [InnerProductSpace.volume_closedBall, InnerProductSpace.volume_closedBall, + normalHyperplane_finrank u hu, finrank_euclideanSpace_fin] + have hball : R • closedBall (0 : normalHyperplane u) 1 = closedBall 0 R := by + rw [_root_.smul_closedBall _ _ zero_le_one, smul_zero, Real.norm_eq_abs, abs_of_nonneg hR, mul_one] + unfold projectionVolume + rw [projection_image_closedBall, ← hball, Measure.addHaar_smul, + normalHyperplane_finrank u hu, abs_pow, abs_of_nonneg hR, + ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg hR _), hunit] + exact mul_comm _ _ + +theorem brightness_closedBall {d : ℕ} (hd : 2 ≤ d) (R : ℝ) (hR : 0 ≤ R) + (u : Euclidean d) : + brightness (closedBall (0 : Euclidean d) R) u = + ‖u‖ * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by + by_cases hu : u = 0 + · simp [hu, brightness] + · unfold brightness + rw [projectionVolume_closedBall_real hd u hu R hR] + +theorem brightness_le_ball_bound {d : ℕ} (hd : 2 ≤ d) {K : Set (Euclidean d)} + {R : ℝ} (hR : 0 ≤ R) (hK : K ⊆ closedBall 0 R) (u : Euclidean d) : + brightness K u ≤ ‖u‖ * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by + exact (brightness_mono hK (isCompact_closedBall _ _) u).trans_eq + (brightness_closedBall hd R hR u) + +theorem ball_subset_projectionBody {d : ℕ} (hd : 2 ≤ d) {K : Set (Euclidean d)} + (hK : IsCompact K) {a : ℝ} (ha : 0 ≤ a) (hball : closedBall 0 a ⊆ K) : + closedBall (0 : Euclidean d) (euclideanUnitBallVolume (d - 1) * a ^ (d - 1)) ⊆ + projectionBody K := by + intro y hy u + calc + ⟪u, y⟫ ≤ ‖u‖ * ‖y‖ := real_inner_le_norm _ _ + _ ≤ ‖u‖ * (euclideanUnitBallVolume (d - 1) * a ^ (d - 1)) := + mul_le_mul_of_nonneg_left (mem_closedBall_zero_iff.mp hy) (norm_nonneg u) + _ = brightness (closedBall (0 : Euclidean d) a) u := (brightness_closedBall hd a ha u).symm + _ ≤ brightness K u := brightness_mono hball hK u + +theorem projectionBody_subset_ball {d : ℕ} (hd : 2 ≤ d) {K : Set (Euclidean d)} + {R : ℝ} (hR : 0 ≤ R) (hK : K ⊆ closedBall 0 R) : + projectionBody K ⊆ + closedBall (0 : Euclidean d) (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by + intro y hy + have hc : 0 ≤ euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := by + exact mul_nonneg ENNReal.toReal_nonneg (pow_nonneg hR _) + have h := (hy y).trans (brightness_le_ball_bound hd hR hK y) + rw [real_inner_self_eq_norm_sq] at h + apply mem_closedBall_zero_iff.mpr + nlinarith [norm_nonneg y] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Basic.lean b/lean/OAI/Geometry/ProjectionVolume/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce4f24062457103132800a7fbd3c9b3b99a704e9 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Basic.lean @@ -0,0 +1,27 @@ +import OAI.Geometry.ProjectionVolume.Model + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem normalHyperplane_volume_is_canonical {n : ℕ} (u : Euclidean n) : + (volume : Measure (normalHyperplane u)) = + (stdOrthonormalBasis ℝ (normalHyperplane u)).toBasis.addHaar := rfl + +theorem normalHyperplane_finrank {n : ℕ} (u : Euclidean n) (hu : u ≠ 0) : + Module.finrank ℝ (normalHyperplane u) = n - 1 := by + have h := (Submodule.span ℝ ({u} : Set (Euclidean n))).finrank_add_finrank_orthogonal + simp only [finrank_span_singleton hu, finrank_euclideanSpace_fin] at h + change Module.finrank ℝ ((Submodule.span ℝ ({u} : Set (Euclidean n)))ᗮ) = n - 1 + omega + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Brightness.lean b/lean/OAI/Geometry/ProjectionVolume/Brightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a58706db77df6fff73e16380d4276548969ad28 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Brightness.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.ProjectionVolume.Basic + +namespace OAI + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem normalHyperplane_smul {n : ℕ} (u : Euclidean n) {c : ℝ} (hc : c ≠ 0) : + normalHyperplane (c • u) = normalHyperplane u := by + unfold normalHyperplane + rw [Submodule.span_singleton_smul_eq (isUnit_iff_ne_zero.mpr hc)] + +theorem projectionVolume_smul {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) + {c : ℝ} (hc : c ≠ 0) : projectionVolume K (c • u) = projectionVolume K u := by + exact congrArg (fun V : Submodule ℝ (Euclidean n) => + (volume : Measure V) (V.orthogonalProjectionOnto '' K)) (normalHyperplane_smul u hc) + +theorem brightness_smul {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) (c : ℝ) : + brightness K (c • u) = |c| * brightness K u := by + by_cases hc : c = 0 + · simp [hc, brightness] + · rw [brightness, projectionVolume_smul K u hc, norm_smul, Real.norm_eq_abs, brightness] + ring + +theorem brightness_neg {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : + brightness K (-u) = brightness K u := by + simpa using brightness_smul K u (-1) + +theorem brightness_nonneg {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : + 0 ≤ brightness K u := mul_nonneg (norm_nonneg u) ENNReal.toReal_nonneg + +theorem zero_mem_projectionBody {n : ℕ} (K : Set (Euclidean n)) : + 0 ∈ projectionBody K := by + intro u + simpa using brightness_nonneg K u + +theorem neg_mem_projectionBody_iff {n : ℕ} (K : Set (Euclidean n)) (y : Euclidean n) : + -y ∈ projectionBody K ↔ y ∈ projectionBody K := by + constructor + · intro h u + simpa [brightness_neg] using h (-u) + · intro h u + simpa [brightness_neg] using h (-u) + +theorem projectionBody_neg_eq {n : ℕ} (K : Set (Euclidean n)) : + -projectionBody K = projectionBody K := by + ext y + simp [neg_mem_projectionBody_iff] + +theorem projectionVolume_lt_top {n : ℕ} {K : Set (Euclidean n)} (hK : IsCompact K) + (u : Euclidean n) : projectionVolume K u < ⊤ := by + exact (hK.image (normalHyperplane u).orthogonalProjectionOnto.continuous).measure_lt_top + +theorem projectionVolume_mono {n : ℕ} {A B : Set (Euclidean n)} (h : A ⊆ B) + (u : Euclidean n) : projectionVolume A u ≤ projectionVolume B u := + measure_mono (image_mono h) + +theorem brightness_mono {n : ℕ} {A B : Set (Euclidean n)} (h : A ⊆ B) + (hB : IsCompact B) (u : Euclidean n) : brightness A u ≤ brightness B u := + mul_le_mul_of_nonneg_left + (ENNReal.toReal_mono (projectionVolume_lt_top hB u).ne (projectionVolume_mono h u)) + (norm_nonneg u) + +theorem projectionBody_mono {n : ℕ} {A B : Set (Euclidean n)} (h : A ⊆ B) + (hB : IsCompact B) : projectionBody A ⊆ projectionBody B := + fun _ hy u => (hy u).trans (brightness_mono h hB u) + +theorem projectionBody_isClosed {n : ℕ} (K : Set (Euclidean n)) : + IsClosed (projectionBody K) := by + rw [projectionBody, ofPred_forall] + exact isClosed_iInter fun u => isClosed_le (innerSL ℝ u).continuous continuous_const + +theorem projectionBody_convex {n : ℕ} (K : Set (Euclidean n)) : + Convex ℝ (projectionBody K) := by + rw [projectionBody, ofPred_forall] + exact convex_iInter fun u => (convex_Iic (brightness K u)).linear_preimage (innerSL ℝ u).toLinearMap + +theorem projectionBody_norm_le {n : ℕ} (K : Set (Euclidean n)) + {y : Euclidean n} (hy : y ∈ projectionBody K) : + ‖y‖ ≤ ∑ i : Fin n, brightness K (EuclideanSpace.basisFun (Fin n) ℝ i) := by + let b := EuclideanSpace.basisFun (Fin n) ℝ + calc + ‖y‖ = ‖∑ i : Fin n, inner ℝ (b i) y • b i‖ := by rw [b.sum_repr'] + _ ≤ ∑ i : Fin n, ‖inner ℝ (b i) y • b i‖ := norm_sum_le _ _ + _ = ∑ i : Fin n, |inner ℝ (b i) y| := by simp [norm_smul, Real.norm_eq_abs] + _ ≤ ∑ i : Fin n, brightness K (b i) := by + apply Finset.sum_le_sum + intro i _ + apply abs_le.mpr + constructor + · have h := hy (-b i) + simpa [brightness_neg] using neg_le_neg h + · exact hy (b i) + +theorem projectionBody_isCompact {n : ℕ} (K : Set (Euclidean n)) : + IsCompact (projectionBody K) := by + apply Metric.isCompact_iff_isClosed_bounded.mpr + refine ⟨projectionBody_isClosed K, isBounded_iff_forall_norm_le.mpr ?_⟩ + exact ⟨_, fun _ hy => projectionBody_norm_le K hy⟩ + +theorem projectionVolume_body_smul {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) + (hu : u ≠ 0) (c : ℝ) : + projectionVolume (c • K) u = ENNReal.ofReal (|c| ^ (n - 1)) * projectionVolume K u := by + unfold projectionVolume + rw [image_smul_comm _ c K (fun x => map_smul _ c x), + Measure.addHaar_smul, normalHyperplane_finrank u hu, abs_pow] + +theorem brightness_body_smul {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) (c : ℝ) : + brightness (c • K) u = |c| ^ (n - 1) * brightness K u := by + by_cases hu : u = 0 + · simp [hu, brightness] + · rw [brightness, projectionVolume_body_smul K u hu c, ENNReal.toReal_mul, + ENNReal.toReal_ofReal (pow_nonneg (abs_nonneg c) _), brightness] + ring + +theorem projectionBody_body_smul {n : ℕ} (K : Set (Euclidean n)) (c : ℝ) (hc : c ≠ 0) : + projectionBody (c • K) = |c| ^ (n - 1) • projectionBody K := by + have hq : 0 < |c| ^ (n - 1) := pow_pos (abs_pos.mpr hc) _ + ext y + rw [mem_smul_set_iff_inv_smul_mem₀ hq.ne'] + constructor + · intro h u + have hh := mul_le_mul_of_nonneg_left (h u) (inv_nonneg.mpr hq.le) + simpa [brightness_body_smul, inner_smul_right, mul_assoc, hq.ne'] using hh + · intro h u + have hh := mul_le_mul_of_nonneg_left (h u) hq.le + simpa [brightness_body_smul, inner_smul_right, mul_assoc, hq.ne'] using hh + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/CoordinateDrop.lean b/lean/OAI/Geometry/ProjectionVolume/CoordinateDrop.lean new file mode 100644 index 0000000000000000000000000000000000000000..87eea5960653bd0eb3b561f99be0698213af848b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/CoordinateDrop.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.ProjectionVolume.FacetAreas +import OAI.Geometry.ProjectionVolume.SimplexNormals +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +def coordinateDrop (n : ℕ) (i : Fin (n + 1)) : Euclidean (n + 1) →ₗ[ℝ] Euclidean n where + toFun y := WithLp.toLp 2 (i.removeNth y) + map_add' x y := by ext j; rfl + map_smul' a x := by ext j; rfl + +theorem coordinateDrop_apply (n : ℕ) (i : Fin (n + 1)) (y : Euclidean (n + 1)) (j : Fin n) : + coordinateDrop n i y j = y (i.succAbove j) := rfl + +theorem coordinateDrop_facetEmbedding (n : ℕ) (i : Fin (n + 1)) (c : ℝ) (x : Euclidean n) : + coordinateDrop n i (facetEmbedding n i c x) = x := by + ext j + exact facetEmbedding_apply_succAbove n i c x j + +theorem facetEmbedding_mem_diagonal_tangent (n : ℕ) (i : Fin (n + 1)) (x : Euclidean n) : + facetEmbedding n i (-1) x ∈ normalHyperplane (diagonalVector (n + 1)) := by + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + rw [diagonalVector_inner, Fin.sum_univ_succAbove _ i] + simp only [facetEmbedding_apply_same, facetEmbedding_apply_succAbove, neg_one_mul, neg_add_cancel] + +noncomputable def diagonalTangentEmbedding (n : ℕ) (i : Fin (n + 1)) : + Euclidean n →ₗ[ℝ] normalHyperplane (diagonalVector (n + 1)) := + (facetEmbedding n i (-1)).codRestrict _ (facetEmbedding_mem_diagonal_tangent n i) + +noncomputable def diagonalCoordinateDrop (n : ℕ) (i : Fin (n + 1)) : + normalHyperplane (diagonalVector (n + 1)) →ₗ[ℝ] Euclidean n := + (coordinateDrop n i).comp (normalHyperplane (diagonalVector (n + 1))).subtype + +theorem diagonalCoordinateDrop_comp_embedding (n : ℕ) (i : Fin (n + 1)) : + (diagonalCoordinateDrop n i).comp (diagonalTangentEmbedding n i) = LinearMap.id := by + ext x j + exact congrArg (fun y : Euclidean n => y j) (coordinateDrop_facetEmbedding n i (-1) x) + +theorem diagonalCoordinateDrop_normDet (n : ℕ) (i : Fin (n + 1)) : + (diagonalCoordinateDrop n i).normDet = 1 / Real.sqrt (n + 1) := by + have hn : 0 < Real.sqrt (n + 1 : ℝ) := Real.sqrt_pos.mpr (by positivity) + have hw : diagonalVector (n + 1) ≠ 0 := by + intro h + have hh := diagonalVector_norm (n + 1) + simp only [h, norm_zero, Nat.cast_add, Nat.cast_one] at hh + exact hn.ne' hh.symm + have hdim : Module.finrank ℝ (Euclidean n) = + Module.finrank ℝ (normalHyperplane (diagonalVector (n + 1))) := by + rw [finrank_euclideanSpace_fin, normalHyperplane_finrank _ hw, Nat.add_sub_cancel] + have h := LinearMap.normDet_comp_of_finrank_eq + (diagonalTangentEmbedding n i) (diagonalCoordinateDrop n i) hdim + rw [diagonalCoordinateDrop_comp_embedding] at h + have he : (diagonalTangentEmbedding n i).normDet = Real.sqrt (n + 1) := by + rw [diagonalTangentEmbedding, LinearMap.normDet_codRestrict, facetEmbedding_normDet_neg_one] + rw [he] at h + have hh : 1 = (diagonalCoordinateDrop n i).normDet * Real.sqrt (n + 1) := by simpa using h + exact (eq_div_iff hn.ne').mpr hh.symm + +theorem coordinateDrop_diagonalFacet (n : ℕ) (i : Fin (n + 1)) : + coordinateDrop n i '' simplexFacet (n + 1) none = standardSimplex n := by + rw [← diagonalFacetChart_image n i, image_image] + have he : (fun x => coordinateDrop n i (diagonalFacetChart n i x)) = id := by + funext x + ext j + simp [coordinateDrop, diagonalFacetChart] + rw [he, image_id] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/CounterexampleComparison.lean b/lean/OAI/Geometry/ProjectionVolume/CounterexampleComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..07ea48b455fd9d1e54ace6153fdcc0c6120d6eae --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/CounterexampleComparison.lean @@ -0,0 +1,17 @@ +import OAI.Geometry.ProjectionVolume.ProductCounterexample +import OAI.Geometry.ProjectionVolume.SimplexValue + +namespace OAI + +namespace Paper092 + +theorem standardSimplex_normalizedProjectionVolume_lt_productWitness : + normalizedProjectionVolume (standardSimplex 20) < + normalizedProjectionVolume productWitness := by + rw [standardSimplex_normalizedProjectionVolume 20 (by norm_num), + productWitness_normalizedProjectionVolume] + exact dimension_twenty_strict + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/CubeBrightness.lean b/lean/OAI/Geometry/ProjectionVolume/CubeBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..15e9e2b357661a20636d1df8fb68cbb39595b7e6 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/CubeBrightness.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.ProjectionVolume.PolytopeCauchy +import OAI.Geometry.ProjectionVolume.EuclideanVolume +import OAI.Geometry.ProjectionVolume.FacetAreas + +namespace OAI + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section + +namespace Paper092 + +def euclideanCube (d : ℕ) : Set (Euclidean d) := + WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1 + +theorem mem_euclideanCube {d : ℕ} (x : Euclidean d) : + x ∈ euclideanCube d ↔ (∀ i, 0 ≤ x i) ∧ ∀ i, x i ≤ 1 := by + constructor + · rintro ⟨y, hy, rfl⟩ + exact hy + · intro hx + exact ⟨WithLp.ofLp x, hx, WithLp.toLp_ofLp 2 x⟩ + +theorem euclideanCube_isCompact (d : ℕ) : IsCompact (euclideanCube d) := + isCompact_Icc.image (PiLp.continuous_toLp 2 _) + +theorem euclideanCube_volume (d : ℕ) : volume (euclideanCube d) = 1 := by + rw [euclideanCube, volume_euclidean_image] + simp [Real.volume_Icc_pi] + +def cubeNormal {d : ℕ} : Fin d ⊕ Fin d → Euclidean d + | .inl i => -EuclideanSpace.single i 1 + | .inr i => EuclideanSpace.single i 1 + +def cubeOffset {d : ℕ} : Fin d ⊕ Fin d → ℝ + | .inl _ => 0 + | .inr _ => 1 + +theorem cube_constraints (d : ℕ) : + {x : Euclidean d | ∀ i, ⟪cubeNormal i, x⟫ ≤ cubeOffset i} = euclideanCube d := by + ext x + simp [mem_euclideanCube, Sum.forall, cubeNormal, cubeOffset, + EuclideanSpace.inner_single_left] + +def cubePolytope (d : ℕ) : HPolytope d (Fin d ⊕ Fin d) where + normal := cubeNormal + offset := cubeOffset + normal_unit i := by cases i <;> simp [cubeNormal] + compact := by rw [cube_constraints]; exact euclideanCube_isCompact d + strict_feasible := by + refine ⟨WithLp.toLp 2 (fun _ => (1 / 2 : ℝ)), ?_⟩ + intro i + cases i <;> norm_num [cubeNormal, cubeOffset, EuclideanSpace.inner_single_left] + distinct := by + intro i j hij + rcases i with i | i <;> rcases j with j | j + · congr 1 + by_contra h + have hc := congrArg (fun p : Euclidean d × ℝ => p.1 i) hij + simp [cubeNormal, h] at hc + · have hc := congrArg Prod.snd hij + norm_num [cubeOffset] at hc + · have hc := congrArg Prod.snd hij + norm_num [cubeOffset] at hc + · congr 1 + by_contra h + have hc := congrArg (fun p : Euclidean d × ℝ => p.1 i) hij + simp [cubeNormal, h] at hc + +theorem cubePolytope_body (d : ℕ) : (cubePolytope d).body = euclideanCube d := + cube_constraints d + +theorem cubePolytope_face_lower {d : ℕ} (i : Fin d) : + (cubePolytope d).face (.inl i) = {x | x ∈ euclideanCube d ∧ x i = 0} := by + ext x + change (x ∈ (cubePolytope d).body ∧ ⟪-EuclideanSpace.single i 1, x⟫ = 0) ↔ _ + rw [cubePolytope_body] + simp [EuclideanSpace.inner_single_left] + +theorem cubePolytope_face_upper {d : ℕ} (i : Fin d) : + (cubePolytope d).face (.inr i) = {x | x ∈ euclideanCube d ∧ x i = 1} := by + ext x + change (x ∈ (cubePolytope d).body ∧ ⟪EuclideanSpace.single i 1, x⟫ = 1) ↔ _ + rw [cubePolytope_body] + simp [EuclideanSpace.inner_single_left] + +theorem cube_lower_face_chart (n : ℕ) (i : Fin (n + 1)) : + facetEmbedding n i 0 '' euclideanCube n = (cubePolytope (n + 1)).face (.inl i) := by + rw [cubePolytope_face_lower] + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + change facetEmbedding n i 0 x ∈ euclideanCube (n + 1) ∧ facetEmbedding n i 0 x i = 0 + rw [mem_euclideanCube] at hx ⊢ + simp [facetEmbedding, Fin.forall_iff_succAbove i, hx] + · rintro ⟨hy, hi⟩ + refine ⟨WithLp.toLp 2 (i.removeNth y), ?_, ?_⟩ + · rw [mem_euclideanCube] at hy ⊢ + exact ⟨fun j => hy.1 (i.succAbove j), fun j => hy.2 (i.succAbove j)⟩ + · ext j + induction j using i.succAboveCases <;> simp [facetEmbedding, hi] + +theorem cube_lower_face_area (n : ℕ) (i : Fin (n + 1)) : + μHE[n] ((cubePolytope (n + 1)).face (.inl i)) = 1 := by + rw [← cube_lower_face_chart] + have h := (facetEmbedding n i 0).euclideanHausdorffMeasure_image_eq_normDet_mul_volume + (euclideanCube n) + simpa only [finrank_euclideanSpace_fin, facetEmbedding_normDet_zero, + ENNReal.ofReal_one, euclideanCube_volume, mul_one] using h + +theorem cube_upper_face_eq_vadd {d : ℕ} (i : Fin d) : + (cubePolytope d).face (.inr i) = + EuclideanSpace.single i (1 : ℝ) +ᵥ (cubePolytope d).face (.inl i) := by + rw [cubePolytope_face_upper, cubePolytope_face_lower] + ext y + constructor + · rintro ⟨hy, hi⟩ + refine ⟨y - EuclideanSpace.single i 1, ⟨?_, ?_⟩, ?_⟩ + · rw [mem_euclideanCube] at hy ⊢ + constructor <;> intro j + · by_cases hj : j = i + · subst j; simp [PiLp.sub_apply, hi] + · simpa [PiLp.sub_apply, PiLp.single_apply, hj] using hy.1 j + · by_cases hj : j = i + · subst j; simp [PiLp.sub_apply, hi] + · simpa [PiLp.sub_apply, PiLp.single_apply, hj] using hy.2 j + · simp [PiLp.sub_apply, hi] + · change EuclideanSpace.single i 1 + (y - EuclideanSpace.single i 1) = y + abel + · rintro ⟨x, ⟨hx, hi⟩, rfl⟩ + refine ⟨?_, ?_⟩ + · rw [mem_euclideanCube] at hx ⊢ + constructor <;> intro j + · by_cases hj : j = i + · subst j; simp [vadd_eq_add, PiLp.add_apply, hi] + · simpa [vadd_eq_add, PiLp.add_apply, PiLp.single_apply, hj] using hx.1 j + · by_cases hj : j = i + · subst j; simp [vadd_eq_add, PiLp.add_apply, hi] + · simpa [vadd_eq_add, PiLp.add_apply, PiLp.single_apply, hj] using hx.2 j + · simp [vadd_eq_add, PiLp.add_apply, hi] + +theorem cube_upper_face_area (n : ℕ) (i : Fin (n + 1)) : + μHE[n] ((cubePolytope (n + 1)).face (.inr i)) = 1 := by + rw [cube_upper_face_eq_vadd, measure_vadd, cube_lower_face_area] + +theorem cube_faceArea {d : ℕ} (hd : 0 < d) (i : Fin d ⊕ Fin d) : + (cubePolytope d).faceArea i = 1 := by + obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hd) + cases i with + | inl i => + change (μHE[n] ((cubePolytope (n + 1)).face (.inl i))).toReal = 1 + rw [cube_lower_face_area, ENNReal.toReal_one] + | inr i => + change (μHE[n] ((cubePolytope (n + 1)).face (.inr i))).toReal = 1 + rw [cube_upper_face_area, ENNReal.toReal_one] + +theorem euclideanCube_brightness {d : ℕ} (hd : 0 < d) (u : Euclidean d) : + brightness (euclideanCube d) u = ∑ i, |u i| := by + rw [← cubePolytope_body, (cubePolytope d).brightness_eq_sum] + simp only [cube_faceArea hd, one_mul, Fintype.sum_sum_type] + simp only [cubePolytope, cubeNormal, inner_neg_right, abs_neg, + EuclideanSpace.inner_single_right, one_mul, starRingEnd_apply, star_trivial] + ring + +theorem euclideanCube_diagonal_brightness {d : ℕ} (hd : 0 < d) : + brightness (euclideanCube d) (WithLp.toLp 2 (1 : Fin d → ℝ)) = d := by + rw [euclideanCube_brightness hd] + simp + +theorem euclideanCube_diagonal_extrusion {d : ℕ} (hd : 0 < d) : + (volume (euclideanCube d + + segment ℝ (0 : Euclidean d) (WithLp.toLp 2 (1 : Fin d → ℝ)))).toReal = + (volume (euclideanCube d)).toReal + + brightness (euclideanCube d) (WithLp.toLp 2 (1 : Fin d → ℝ)) := by + rw [euclideanCube_volume, ENNReal.toReal_one, euclideanCube_diagonal_brightness hd] + rw [euclideanCube, volume_euclidean_cube_add_diagonal d hd] + rw [ENNReal.toReal_add (by simp) (by simp), ENNReal.toReal_natCast, ENNReal.toReal_one] + ring + +theorem euclideanCube_diagonal_projectionBody_support {d : ℕ} (hd : 0 < d) : + SupportGeometry.support (projectionBody (euclideanCube d)) + (innerSL ℝ (WithLp.toLp 2 (1 : Fin d → ℝ))) = d := by + rw [← cubePolytope_body, (cubePolytope d).projectionBody_support, cubePolytope_body, + euclideanCube_diagonal_brightness hd] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/CubeFibers.lean b/lean/OAI/Geometry/ProjectionVolume/CubeFibers.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a19d5add11b156462c93a054c98d3613f85f682 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/CubeFibers.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.ProjectionVolume.CubeBrightness +import Mathlib.Algebra.Order.Group.Pointwise.Interval + +namespace OAI + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section + +namespace Paper092 + +def lineFiber {d : ℕ} (K : Set (Euclidean d)) (x u : Euclidean d) : Set ℝ := + {t | x + t • u ∈ K} + +theorem lineFiber_add_segment {d : ℕ} (K : Set (Euclidean d)) (x u : Euclidean d) : + lineFiber (K + segment ℝ 0 u) x u = lineFiber K x u + Icc (0 : ℝ) 1 := by + ext t + constructor + · rintro ⟨y, hy, z, hz, hsum⟩ + rw [segment_eq_image] at hz + obtain ⟨s, hs, rfl⟩ := hz + simp only [smul_zero, zero_add] at hsum + refine ⟨t - s, ?_, s, hs, sub_add_cancel t s⟩ + change x + (t - s) • u ∈ K + have heq : x + (t - s) • u = y := by + rw [sub_smul, ← add_sub_assoc, ← hsum, add_sub_cancel_right] + rwa [heq] + · rintro ⟨r, hr, s, hs, rfl⟩ + refine ⟨x + r • u, hr, s • u, ?_, ?_⟩ + · rw [segment_eq_image] + exact ⟨s, hs, by simp⟩ + · rw [add_smul] + abel_nf + +theorem projection_add_parallel_segment {d : ℕ} (K : Set (Euclidean d)) (u : Euclidean d) : + (normalHyperplane u).orthogonalProjectionOnto '' (K + segment ℝ 0 u) = + (normalHyperplane u).orthogonalProjectionOnto '' K := by + ext y + constructor + · rintro ⟨z, ⟨x, hx, v, hv, rfl⟩, rfl⟩ + rw [segment_eq_image] at hv + obtain ⟨t, ht, rfl⟩ := hv + simp only [smul_zero, zero_add] + refine ⟨x, hx, ?_⟩ + exact ((projection_eq_iff_parallel u (x + t • u) x).mpr ⟨t, rfl⟩).symm + · rintro ⟨x, hx, rfl⟩ + exact ⟨x, ⟨x, hx, 0, left_mem_segment ℝ _ _, add_zero x⟩, rfl⟩ + +theorem cube_lineFiber_eq_interval {d : ℕ} (hd : 0 < d) (x : Euclidean d) : + ∃ a b : ℝ, lineFiber (euclideanCube d) x (WithLp.toLp 2 (1 : Fin d → ℝ)) = Icc a b := by + have : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ + let a := Finset.univ.sup' Finset.univ_nonempty (fun i : Fin d => -x i) + let b := Finset.univ.inf' Finset.univ_nonempty (fun i : Fin d => 1 - x i) + refine ⟨a, b, ?_⟩ + ext t + simp only [lineFiber, mem_ofPred_eq, mem_euclideanCube, PiLp.add_apply, PiLp.smul_apply, + Pi.one_apply, smul_eq_mul, mul_one, mem_Icc, + a, b, Finset.sup'_le_iff, Finset.le_inf'_iff, Finset.mem_univ, forall_true_left] + constructor + · intro h + exact ⟨fun i => by linarith [h.1 i], fun i => by linarith [h.2 i]⟩ + · intro h + exact ⟨fun i => by linarith [h.1 i], fun i => by linarith [h.2 i]⟩ + +theorem cube_lineFiber_extrusion_intervals {d : ℕ} (hd : 0 < d) (x : Euclidean d) + (hne : (lineFiber (euclideanCube d) x (WithLp.toLp 2 (1 : Fin d → ℝ))).Nonempty) : + ∃ a b : ℝ, a ≤ b ∧ + lineFiber (euclideanCube d) x (WithLp.toLp 2 (1 : Fin d → ℝ)) = Icc a b ∧ + lineFiber (euclideanCube d + segment ℝ 0 (WithLp.toLp 2 (1 : Fin d → ℝ))) x + (WithLp.toLp 2 (1 : Fin d → ℝ)) = Icc a (b + 1) := by + obtain ⟨a, b, hab⟩ := cube_lineFiber_eq_interval hd x + have hle : a ≤ b := nonempty_Icc.mp (hab ▸ hne) + refine ⟨a, b, hle, hab, ?_⟩ + rw [lineFiber_add_segment, hab, Set.Icc_add_Icc hle (by norm_num : (0 : ℝ) ≤ 1), add_zero] + +theorem interval_line_image {d : ℕ} (x u : Euclidean d) {a b : ℝ} (hab : a ≤ b) : + (fun t : ℝ => x + t • u) '' Icc a b = segment ℝ (x + a • u) (x + b • u) := by + let f : ℝ →ᵃ[ℝ] Euclidean d := + AffineMap.const ℝ ℝ x + (LinearMap.toSpanSingleton ℝ (Euclidean d) u).toAffineMap + have hf (t : ℝ) : f t = x + t • u := rfl + simpa only [hf, segment_eq_Icc hab] using image_segment ℝ f a b + +theorem interval_line_length_increase {d : ℕ} (x u : Euclidean d) {a b : ℝ} (hab : a ≤ b) : + dist (x + a • u) (x + (b + 1) • u) = dist (x + a • u) (x + b • u) + ‖u‖ := by + rw [dist_eq_norm, dist_eq_norm] + have hsub (s : ℝ) : x + a • u - (x + s • u) = (a - s) • u := by + rw [sub_smul] + abel_nf + rw [hsub, hsub, norm_smul, norm_smul, Real.norm_eq_abs, Real.norm_eq_abs, + abs_of_nonpos (by linarith : a - (b + 1) ≤ 0), + abs_of_nonpos (by linarith : a - b ≤ 0)] + ring + +def lineFiberLength {d : ℕ} (K : Set (Euclidean d)) (x u : Euclidean d) : ℝ := + (μH[1] ((fun t : ℝ => x + t • u) '' lineFiber K x u)).toReal + +theorem lineFiberLength_of_eq_Icc {d : ℕ} (K : Set (Euclidean d)) (x u : Euclidean d) + {a b : ℝ} (hab : a ≤ b) (h : lineFiber K x u = Icc a b) : + lineFiberLength K x u = dist (x + a • u) (x + b • u) := by + rw [lineFiberLength, h, interval_line_image x u hab, hausdorffMeasure_segment] + rw [edist_dist, ENNReal.toReal_ofReal dist_nonneg] + +theorem cube_lineFiberLength_extrusion {d : ℕ} (hd : 0 < d) (x : Euclidean d) + (hne : (lineFiber (euclideanCube d) x (WithLp.toLp 2 (1 : Fin d → ℝ))).Nonempty) : + lineFiberLength (euclideanCube d + segment ℝ 0 (WithLp.toLp 2 (1 : Fin d → ℝ))) x + (WithLp.toLp 2 (1 : Fin d → ℝ)) = + lineFiberLength (euclideanCube d) x (WithLp.toLp 2 (1 : Fin d → ℝ)) + + ‖WithLp.toLp 2 (1 : Fin d → ℝ)‖ := by + obtain ⟨a, b, hab, hcube, hextrusion⟩ := cube_lineFiber_extrusion_intervals hd x hne + rw [lineFiberLength_of_eq_Icc _ _ _ (by linarith : a ≤ b + 1) hextrusion, + lineFiberLength_of_eq_Icc _ _ _ hab hcube] + exact interval_line_length_increase _ _ hab + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/EuclideanVolume.lean b/lean/OAI/Geometry/ProjectionVolume/EuclideanVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..c5c9f26b9b96bf33e8d3b1d6acf8ad5f58c16ebf --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/EuclideanVolume.lean @@ -0,0 +1,37 @@ +import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace +import OAI.Geometry.ProjectionVolume.Extrusion + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped Pointwise + +namespace Paper092 + +theorem volume_euclidean_image {ι : Type uι} [Fintype ι] (s : Set (ι → ℝ)) : + (volume : Measure (EuclideanSpace ℝ ι)) (WithLp.toLp 2 '' s) = volume s := by + change volume ((MeasurableEquiv.toLp 2 (ι → ℝ)) '' s) = volume s + rw [MeasurableEquiv.image_eq_preimage_symm] + exact (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp ι).measure_preimage_equiv s + +theorem toLp_image_add_segment {ι : Type uι} [Fintype ι] (s : Set (ι → ℝ)) : + WithLp.toLp 2 '' (s + segment ℝ (0 : ι → ℝ) 1) = + WithLp.toLp 2 '' s + segment ℝ (0 : EuclideanSpace ℝ ι) + (WithLp.toLp 2 (1 : ι → ℝ)) := by + let e := (WithLp.linearEquiv 2 ℝ (ι → ℝ)).symm + have ha := Set.image_add (s := s) (t := segment ℝ (0 : ι → ℝ) 1) e.toAddEquiv + have hs := image_segment ℝ e.toAffineEquiv.toAffineMap (0 : ι → ℝ) 1 + simpa [e] using ha.trans (congrArg (fun t => e '' s + t) hs) + +theorem volume_euclidean_cube_add_diagonal (d : ℕ) (hd : 0 < d) : + volume ((WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1) + + segment ℝ (0 : EuclideanSpace ℝ (Fin d)) (WithLp.toLp 2 (1 : Fin d → ℝ))) = + d + 1 := by + rw [← toLp_image_add_segment, volume_euclidean_image] + exact volume_Icc_add_segment_one d hd + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ExposedBounds.lean b/lean/OAI/Geometry/ProjectionVolume/ExposedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..82a81fcad22da35dd4101943250e8bf3ff251604 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ExposedBounds.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.ProjectionVolume.ExposedProduct + +namespace OAI + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem exposedFace_vectorSpan_le_normalHyperplane {n : ℕ} + (K : Set (Euclidean n)) (u : Euclidean n) : + vectorSpan ℝ (exposedFace K u) ≤ normalHyperplane u := by + rw [vectorSpan_def] + apply Submodule.span_le.mpr + rintro _ ⟨x, hx, y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪u, x - y⟫ = 0 + rw [inner_sub_right] + exact sub_eq_zero.mpr (le_antisymm (hy.2 x hx.1) (hx.2 y hy.1)) + +theorem exposedFace_finrank_le {n : ℕ} (K : Set (Euclidean n)) + {u : Euclidean n} (hu : u ≠ 0) : + Module.finrank ℝ (vectorSpan ℝ (exposedFace K u)) ≤ n - 1 := by + have h := Submodule.finrank_mono (exposedFace_vectorSpan_le_normalHyperplane K u) + rwa [normalHyperplane_finrank u hu] at h + +theorem exposedFace_ssubset {n : ℕ} (K : Set (Euclidean n)) + (hint : (interior K).Nonempty) {u : Euclidean n} (hu : u ≠ 0) : + exposedFace K u ⊂ K := by + refine ssubset_iff_subset_ne.mpr ⟨fun _ hx => hx.1, ?_⟩ + intro heq + obtain ⟨x, hx⟩ := hint + obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp hx) + have hnorm : 0 < ‖u‖ := norm_pos_iff.mpr hu + let t : ℝ := ε / (2 * ‖u‖) + have ht : 0 < t := div_pos hε (mul_pos (by norm_num) hnorm) + have hdist : dist (x + t • u) x < ε := by + rw [dist_eq_norm, add_sub_cancel_left, norm_smul, Real.norm_eq_abs, abs_of_pos ht] + dsimp [t] + field_simp + linarith + have hy := hball (Metric.mem_ball.mpr hdist) + have hface : x ∈ exposedFace K u := heq.symm ▸ interior_subset hx + have hle := hface.2 (x + t • u) hy + change ⟪u, x + t • u⟫ ≤ ⟪u, x⟫ at hle + rw [inner_add_right, real_inner_smul_right, real_inner_self_eq_norm_sq] at hle + have hpos := mul_pos ht (sq_pos_of_pos hnorm) + linarith + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ExposedProduct.lean b/lean/OAI/Geometry/ProjectionVolume/ExposedProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..ceec199af12e74c422e9127c2884a8a382de2b22 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ExposedProduct.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.ProjectionVolume.ProductPolytope +import Mathlib.Analysis.Convex.Exposed +import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +def exposedFace {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : Set (Euclidean n) := + (innerSL ℝ u).toExposed K + +@[simp] theorem exposedFace_zero {n : ℕ} (K : Set (Euclidean n)) : exposedFace K 0 = K := by + ext x + simp [exposedFace, ContinuousLinearMap.toExposed] + +theorem exposedFace_nonempty {n : ℕ} (K : Set (Euclidean n)) (hK : IsCompact K) + (hne : K.Nonempty) (u : Euclidean n) : (exposedFace K u).Nonempty := by + obtain ⟨x, hx, hmax⟩ := hK.exists_isMaxOn hne (innerSL ℝ u).continuous.continuousOn + exact ⟨x, hx, hmax⟩ + +theorem exposedFace_product {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (w : Euclidean (r + s)) : + exposedFace (cartesianBody A B) w = + cartesianBody (exposedFace A (splitEuclideanProduct r s w).1) + (exposedFace B (splitEuclideanProduct r s w).2) := by + ext x + change (x ∈ cartesianBody A B ∧ ∀ y ∈ cartesianBody A B, ⟪w, y⟫ ≤ ⟪w, x⟫) ↔ + (((splitEuclideanProduct r s x).1 ∈ A ∧ + ∀ a ∈ A, ⟪(splitEuclideanProduct r s w).1, a⟫ ≤ + ⟪(splitEuclideanProduct r s w).1, (splitEuclideanProduct r s x).1⟫) ∧ + ((splitEuclideanProduct r s x).2 ∈ B ∧ + ∀ b ∈ B, ⟪(splitEuclideanProduct r s w).2, b⟫ ≤ + ⟪(splitEuclideanProduct r s w).2, (splitEuclideanProduct r s x).2⟫)) + constructor + · rintro ⟨⟨hA, hB⟩, hmax⟩ + refine ⟨⟨hA, ?_⟩, ⟨hB, ?_⟩⟩ + · intro a ha + have hm : (splitEuclideanProduct r s).symm (a, (splitEuclideanProduct r s x).2) ∈ + cartesianBody A B := by + rw [cartesianBody_eq_preimage, Set.mem_preimage, + ContinuousLinearEquiv.apply_symm_apply] + exact ⟨ha, hB⟩ + have h := hmax _ hm + rw [splitEuclideanProduct_inner r s, splitEuclideanProduct_inner r s, + ContinuousLinearEquiv.apply_symm_apply] at h + exact (add_le_add_iff_right _).mp h + · intro b hb + have hm : (splitEuclideanProduct r s).symm ((splitEuclideanProduct r s x).1, b) ∈ + cartesianBody A B := by + rw [cartesianBody_eq_preimage, Set.mem_preimage, + ContinuousLinearEquiv.apply_symm_apply] + exact ⟨hA, hb⟩ + have h := hmax _ hm + rw [splitEuclideanProduct_inner r s, splitEuclideanProduct_inner r s, + ContinuousLinearEquiv.apply_symm_apply] at h + exact (add_le_add_iff_left _).mp h + · rintro ⟨⟨hA, hmaxA⟩, ⟨hB, hmaxB⟩⟩ + refine ⟨⟨hA, hB⟩, ?_⟩ + intro y hy + rw [splitEuclideanProduct_inner r s, splitEuclideanProduct_inner r s] + exact add_le_add (hmaxA _ hy.1) (hmaxB _ hy.2) + +theorem cartesianBody_eq_image {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) : + cartesianBody A B = (splitEuclideanProduct r s).symm '' (A ×ˢ B) := by + ext x + constructor + · intro hx + exact ⟨splitEuclideanProduct r s x, hx, (splitEuclideanProduct r s).symm_apply_apply x⟩ + · rintro ⟨y, hy, rfl⟩ + change splitEuclideanProduct r s ((splitEuclideanProduct r s).symm y) ∈ A ×ˢ B + simpa using hy + +theorem submodule_prod_finrank {r s : ℕ} (P : Submodule ℝ (Euclidean r)) + (Q : Submodule ℝ (Euclidean s)) : + Module.finrank ℝ (P.prod Q) = Module.finrank ℝ P + Module.finrank ℝ Q := by + let e : (P.prod Q) ≃ₗ[ℝ] P × Q := + { toFun := fun x => (⟨x.1.1, x.2.1⟩, ⟨x.1.2, x.2.2⟩) + invFun := fun x => ⟨(x.1, x.2), ⟨x.1.2, x.2.2⟩⟩ + left_inv := fun _ => rfl + right_inv := fun _ => rfl + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl } + rw [e.finrank_eq, Module.finrank_prod] + +theorem cartesianBody_affine_dimension {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (hA : A.Nonempty) (hB : B.Nonempty) : + Module.finrank ℝ (vectorSpan ℝ (cartesianBody A B)) = + Module.finrank ℝ (vectorSpan ℝ A) + Module.finrank ℝ (vectorSpan ℝ B) := by + let e := (splitEuclideanProduct r s).symm.toLinearEquiv + rw [cartesianBody_eq_image] + change Module.finrank ℝ (vectorSpan ℝ (e.toLinearMap.toAffineMap '' (A ×ˢ B))) = _ + rw [← AffineMap.map_vectorSpan] + change Module.finrank ℝ ((vectorSpan ℝ (A ×ˢ B)).map e.toLinearMap) = _ + rw [e.finrank_map_eq, vectorSpan_prod_eq hA hB, submodule_prod_finrank] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Extrusion.lean b/lean/OAI/Geometry/ProjectionVolume/Extrusion.lean new file mode 100644 index 0000000000000000000000000000000000000000..b94cf14b550e40095b2299404b00a0e94277c082 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Extrusion.lean @@ -0,0 +1,220 @@ +import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +import Mathlib.Analysis.Convex.Segment +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped ENNReal Pointwise + +namespace Paper092 + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def unitCube (ι : Type uι) : Set (ι → ℝ) := Icc 0 1 + +def extrusionCell (i : ι) : Set (ι → ℝ) := + {x | (1 ≤ x i ∧ x i ≤ 2) ∧ ∀ j, j ≠ i → x i - 1 ≤ x j ∧ x j ≤ x i} + +def shearMatrix (i : ι) : Matrix ι ι ℝ := + (1 : Matrix ι ι ℝ).updateCol i (fun _ => 1) + +theorem det_shearMatrix (i : ι) : (shearMatrix i).det = 1 := by + simpa [shearMatrix, Matrix.one_apply] using + Matrix.det_updateCol_sum (1 : Matrix ι ι ℝ) i (fun _ => (1 : ℝ)) + +def cellMap (i : ι) (x : ι → ℝ) : ι → ℝ := + fun j => if j = i then 1 + x i else x i + x j + +omit [Fintype ι] in +theorem cellMap_mem_iff (i : ι) (x : ι → ℝ) : + cellMap i x ∈ extrusionCell i ↔ x ∈ unitCube ι := by + simp only [extrusionCell, cellMap, unitCube, mem_ofPred_eq, mem_Icc, Pi.le_def, + Pi.zero_apply, Pi.one_apply, ite_true] + constructor + · rintro ⟨hi, h⟩ + constructor <;> intro j + · by_cases hj : j = i + · subst j; linarith + · have := h j hj + simp only [ite_eq_right hj] at this + linarith + · by_cases hj : j = i + · subst j; linarith + · have := h j hj + simp only [ite_eq_right hj] at this + linarith + · rintro ⟨h0, h1⟩ + refine ⟨⟨by linarith [h0 i], by linarith [h1 i]⟩, ?_⟩ + intro j hj + simp only [ite_eq_right hj] + constructor <;> linarith [h0 j, h1 j] + +theorem cellMap_eq_matrix (i : ι) (x : ι → ℝ) : + cellMap i x = Pi.single i 1 + Matrix.toLin' (shearMatrix i) x := by + funext j + simp only [cellMap, Pi.add_apply, Matrix.toLin'_apply, Matrix.mulVec, dotProduct, + shearMatrix, Matrix.updateCol_apply, Matrix.one_apply] + by_cases hj : j = i + · subst j + have hsum : ∀ k : ι, + (if k = i then 1 else if i = k then 1 else 0) * x k = + if k = i then x k else 0 := by + intro k + by_cases hk : k = i + · subst k; simp + · simp [hk, Ne.symm hk] + simp_rw [hsum] + simp + · have hsum : ∀ k : ι, + (if k = i then 1 else if j = k then 1 else 0) * x k = + (if k = i then x i else 0) + (if k = j then x j else 0) := by + intro k + by_cases hki : k = i + · subst k; simp [Ne.symm hj] + · by_cases hkj : k = j + · subst k; simp [hj] + · simp [hki, hkj, Ne.symm hkj] + simp_rw [hsum] + simp [hj, Finset.sum_add_distrib] + +theorem cellMap_measurePreserving (i : ι) : + MeasurePreserving (cellMap i) volume volume := by + have hs : MeasurePreserving (Matrix.toLin' (shearMatrix i)) volume volume := by + refine ⟨(Matrix.toLin' (shearMatrix i)).continuous_of_finiteDimensional.measurable, ?_⟩ + simpa [det_shearMatrix] using + Real.map_matrix_volume_pi_eq_smul_volume_pi + (M := shearMatrix i) (by rw [det_shearMatrix]; norm_num) + have h := (measurePreserving_add_left (volume : Measure (ι → ℝ)) (Pi.single i 1)).comp hs + simpa only [Function.comp_def, ← cellMap_eq_matrix] using h + +omit [DecidableEq ι] in +theorem extrusionCell_measurable (i : ι) : MeasurableSet (extrusionCell i) := by + simp only [extrusionCell, ofPred_and, ofPred_forall] + exact ((measurableSet_le measurable_const (measurable_pi_apply i)).inter + (measurableSet_le (measurable_pi_apply i) measurable_const)).inter + (MeasurableSet.iInter fun j => MeasurableSet.iInter fun _ => + (measurableSet_le ((measurable_pi_apply i).sub measurable_const) + (measurable_pi_apply j)).inter + (measurableSet_le (measurable_pi_apply j) (measurable_pi_apply i))) + +omit [DecidableEq ι] in +theorem unitCube_volume : volume (unitCube ι) = 1 := by + simp [unitCube, Real.volume_Icc_pi] + +theorem extrusionCell_volume (i : ι) : volume (extrusionCell i) = 1 := by + have hpre : cellMap i ⁻¹' extrusionCell i = unitCube ι := + Set.ext (cellMap_mem_iff i) + rw [← (cellMap_measurePreserving i).measure_preimage + (extrusionCell_measurable i).nullMeasurableSet, hpre, unitCube_volume] + +omit [DecidableEq ι] in +theorem coordinate_eq_null (i : ι) (c : ℝ) : + volume {x : ι → ℝ | x i = c} = 0 := by + simpa [volume_pi] using Measure.pi_hyperplane (fun _ : ι => (volume : Measure ℝ)) i c + +theorem coordinates_eq_null (i j : ι) (hij : i ≠ j) : + volume {x : ι → ℝ | x i = x j} = 0 := by + let f : (ι → ℝ) →ₗ[ℝ] ℝ := + (LinearMap.proj i : (ι → ℝ) →ₗ[ℝ] ℝ) - LinearMap.proj j + have hker : LinearMap.ker f ≠ ⊤ := by + intro h + have hz : f (Pi.single i 1) = 0 := by + apply LinearMap.mem_ker.mp + rw [h] + exact Submodule.mem_top + simp [f, Ne.symm hij] at hz + have hset : {x : ι → ℝ | x i = x j} = (LinearMap.ker f : Set (ι → ℝ)) := by + ext x + change x i = x j ↔ x i - x j = 0 + exact sub_eq_zero.symm + rw [hset] + exact Measure.addHaar_submodule (volume : Measure (ι → ℝ)) (LinearMap.ker f) hker + +omit [DecidableEq ι] in +theorem cube_cell_aedisjoint (i : ι) : + AEDisjoint volume (unitCube ι) (extrusionCell i) := by + apply measure_mono_null _ (coordinate_eq_null i 1) + rintro x ⟨hx, hi⟩ + exact le_antisymm (hx.2 i) hi.1.1 + +theorem cells_aedisjoint : Pairwise (fun i j : ι => + AEDisjoint volume (extrusionCell i) (extrusionCell j)) := by + intro i j hij + apply measure_mono_null _ (coordinates_eq_null i j hij) + rintro x ⟨hi, hj⟩ + exact le_antisymm (hj.2 i hij).2 (hi.2 j hij.symm).2 + +theorem cube_add_diagonal_eq_union [Nonempty ι] : + unitCube ι + segment ℝ (0 : ι → ℝ) 1 = + unitCube ι ∪ ⋃ i, extrusionCell i := by + ext x + constructor + · rintro ⟨q, hq, z, hz, rfl⟩ + change (∀ i, 0 ≤ q i) ∧ (∀ i, q i ≤ 1) at hq + rw [segment_eq_image] at hz + rcases hz with ⟨t, ht, rfl⟩ + simp only [smul_zero, zero_add] + by_cases hmax : ∀ i, q i + t ≤ 1 + · left + constructor <;> intro i + · simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.one_apply, mul_one] + exact add_nonneg (hq.1 i) ht.1 + · simpa only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.one_apply, mul_one] + using hmax i + · right + obtain ⟨i, _, hi⟩ := Finset.exists_max_image Finset.univ q Finset.univ_nonempty + refine mem_iUnion.mpr ⟨i, ?_⟩ + push Not at hmax + obtain ⟨j, hj⟩ := hmax + have hji := hi j (Finset.mem_univ j) + constructor + · constructor + · simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.one_apply, mul_one] + linarith + · simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.one_apply, mul_one] + linarith [hq.2 i, ht.2] + · intro k _ + simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.one_apply, mul_one] + constructor + · linarith [hq.2 i, hq.1 k] + · linarith [hi k (Finset.mem_univ k)] + · rintro (hx | hx) + · exact ⟨x, hx, 0, left_mem_segment ℝ _ _, add_zero x⟩ + · obtain ⟨i, hi⟩ := mem_iUnion.mp hx + refine ⟨fun j => x j - (x i - 1), ?_, (x i - 1) • (1 : ι → ℝ), ?_, ?_⟩ + · constructor <;> intro j + · change 0 ≤ x j - (x i - 1) + by_cases hj : j = i + · subst j; linarith + · linarith [(hi.2 j hj).1] + · change x j - (x i - 1) ≤ 1 + by_cases hj : j = i + · subst j; linarith + · linarith [(hi.2 j hj).2] + · rw [segment_eq_image] + refine ⟨x i - 1, ⟨by linarith [hi.1.1], by linarith [hi.1.2]⟩, ?_⟩ + simp + · ext j + simp + +theorem volume_cube_add_diagonal [Nonempty ι] : + volume (unitCube ι + segment ℝ (0 : ι → ℝ) 1) = Fintype.card ι + 1 := by + rw [cube_add_diagonal_eq_union, + measure_union₀ ((MeasurableSet.iUnion extrusionCell_measurable).nullMeasurableSet) + (AEDisjoint.iUnion_right_iff.mpr cube_cell_aedisjoint), + measure_iUnion₀ cells_aedisjoint (fun i => (extrusionCell_measurable i).nullMeasurableSet), + unitCube_volume] + simp [extrusionCell_volume, add_comm] + +theorem volume_Icc_add_segment_one (d : ℕ) (hd : 0 < d) : + volume (Icc (0 : Fin d → ℝ) 1 + segment ℝ (0 : Fin d → ℝ) 1) = d + 1 := by + let : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ + simpa [unitCube] using (volume_cube_add_diagonal (ι := Fin d)) + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetAreas.lean b/lean/OAI/Geometry/ProjectionVolume/FacetAreas.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c66de36373737409329621875557bd936e649a8 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetAreas.lean @@ -0,0 +1,166 @@ +import OAI.Geometry.ProjectionVolume.ProductVolume +import OAI.Geometry.ProjectionVolume.SimplexProjection +import Mathlib.Analysis.InnerProductSpace.NormDet +import Mathlib.LinearAlgebra.Matrix.SchurComplement + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace ENNReal + +namespace Paper092 + +def facetEmbedding (n : ℕ) (i : Fin (n + 1)) (c : ℝ) : + Euclidean n →ₗ[ℝ] Euclidean (n + 1) where + toFun x := WithLp.toLp 2 (i.insertNth (c * ∑ j, x j) x) + map_add' x y := by + ext j + induction j using i.succAboveCases <;> + simp [PiLp.add_apply, Finset.sum_add_distrib, mul_add] + map_smul' a x := by + ext j + induction j using i.succAboveCases <;> + simp [PiLp.smul_apply, smul_eq_mul, Finset.mul_sum, mul_left_comm] + +theorem facetEmbedding_apply_same (n : ℕ) (i : Fin (n + 1)) (c : ℝ) (x : Euclidean n) : + facetEmbedding n i c x i = c * ∑ j, x j := by + simp [facetEmbedding] + +theorem facetEmbedding_apply_succAbove (n : ℕ) (i : Fin (n + 1)) (c : ℝ) + (x : Euclidean n) (j : Fin n) : + facetEmbedding n i c x (i.succAbove j) = x j := by + simp [facetEmbedding] + +theorem facetEmbedding_inner (n : ℕ) (i : Fin (n + 1)) (c : ℝ) (x y : Euclidean n) : + ⟪facetEmbedding n i c x, facetEmbedding n i c y⟫ = + ⟪x, y⟫ + c ^ 2 * (∑ j, x j) * (∑ j, y j) := by + rw [PiLp.inner_apply, Fin.sum_univ_succAbove _ i] + simp only [facetEmbedding_apply_same, facetEmbedding_apply_succAbove, Real.inner_apply, + PiLp.inner_apply] + ring + +theorem facetEmbedding_normDet_sq (n : ℕ) (i : Fin (n + 1)) (c : ℝ) : + (facetEmbedding n i c).normDet ^ 2 = 1 + (n : ℝ) * c ^ 2 := by + have hsq := (facetEmbedding n i c).normDet_sq_eq_det_gram (EuclideanSpace.basisFun (Fin n) ℝ) + simp only [RCLike.ofReal_real_eq_id, id_eq] at hsq + have hgram : Matrix.gram ℝ + (fun j => facetEmbedding n i c (EuclideanSpace.basisFun (Fin n) ℝ j)) = + 1 + Matrix.replicateCol (Fin 1) (fun _ : Fin n => c) * + Matrix.replicateRow (Fin 1) (fun _ : Fin n => c) := by + ext j k + simp only [Matrix.gram_apply, facetEmbedding_inner, + (EuclideanSpace.basisFun (Fin n) ℝ).inner_eq_ite] + simp [EuclideanSpace.basisFun_apply, PiLp.single_apply, Matrix.one_apply, + Matrix.mul_apply, pow_two] + rw [hgram] at hsq + have hd := Matrix.det_one_add_replicateCol_mul_replicateRow (ι := Fin 1) + (fun _ : Fin n => c) (fun _ : Fin n => c) + simpa [dotProduct, pow_two, mul_assoc] using hsq.trans hd + +theorem facetEmbedding_normDet_zero (n : ℕ) (i : Fin (n + 1)) : + (facetEmbedding n i 0).normDet = 1 := by + have h := facetEmbedding_normDet_sq n i 0 + have hp := (facetEmbedding n i 0).normDet_nonneg + nlinarith + +theorem facetEmbedding_normDet_neg_one (n : ℕ) (i : Fin (n + 1)) : + (facetEmbedding n i (-1)).normDet = Real.sqrt (n + 1) := by + have h := facetEmbedding_normDet_sq n i (-1) + have hp := (facetEmbedding n i (-1)).normDet_nonneg + have hs := Real.sq_sqrt (by positivity : (0 : ℝ) ≤ n + 1) + have hsp := Real.sqrt_nonneg ((n : ℝ) + 1) + nlinarith + +theorem facetEmbedding_zero_image (n : ℕ) (i : Fin (n + 1)) : + facetEmbedding n i 0 '' standardSimplex n = simplexFacet (n + 1) (some i) := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + change facetEmbedding n i 0 x ∈ standardSimplex (n + 1) ∧ + facetEmbedding n i 0 x i = 0 + rw [mem_standardSimplex_iff] at hx ⊢ + simp [facetEmbedding, Fin.forall_iff_succAbove i, hx] + · rintro ⟨hy, hi⟩ + change y i = 0 at hi + refine ⟨WithLp.toLp 2 (i.removeNth y), ?_, ?_⟩ + · rw [mem_standardSimplex_iff] at hy ⊢ + refine ⟨fun j => hy.1 (i.succAbove j), ?_⟩ + have hsum := Fin.add_sum_removeNth i (fun j => y j) + simpa [hi, Fin.removeNth] using hsum.trans_le hy.2 + · ext j + induction j using i.succAboveCases <;> simp [facetEmbedding, hi] + +theorem simplexFacet_coordinate_area (n : ℕ) (i : Fin (n + 1)) : + Measure.euclideanHausdorffMeasure n (simplexFacet (n + 1) (some i)) = + ENNReal.ofReal (1 / (Nat.factorial n : ℝ)) := by + rw [← facetEmbedding_zero_image n i] + have h := (facetEmbedding n i 0).euclideanHausdorffMeasure_image_eq_normDet_mul_volume + (standardSimplex n) + simpa only [finrank_euclideanSpace_fin, facetEmbedding_normDet_zero, ENNReal.ofReal_one, + one_mul, standardSimplex_volume] using h + +def diagonalFacetChart (n : ℕ) (i : Fin (n + 1)) (x : Euclidean n) : Euclidean (n + 1) := + WithLp.toLp 2 (i.insertNth (1 - ∑ j, x j) x) + +theorem diagonalFacetChart_eq (n : ℕ) (i : Fin (n + 1)) (x : Euclidean n) : + diagonalFacetChart n i x = facetEmbedding n i (-1) x + EuclideanSpace.single i 1 := by + ext j + induction j using i.succAboveCases <;> + simp [diagonalFacetChart, facetEmbedding, sub_eq_add_neg, add_comm] + +theorem diagonalFacetChart_image (n : ℕ) (i : Fin (n + 1)) : + diagonalFacetChart n i '' standardSimplex n = simplexFacet (n + 1) none := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + rw [mem_standardSimplex_iff] at hx + change diagonalFacetChart n i x ∈ standardSimplex (n + 1) ∧ + 1 - ∑ j, diagonalFacetChart n i x j = 0 + rw [mem_standardSimplex_iff] + simp [diagonalFacetChart, Fin.forall_iff_succAbove i] + exact ⟨hx.2, hx.1⟩ + · rintro ⟨hy, hi⟩ + change 1 - ∑ j, y j = 0 at hi + have htotal : ∑ j, y j = 1 := by linarith + rw [mem_standardSimplex_iff] at hy + have hsum := Fin.add_sum_removeNth i (fun j => y j) + refine ⟨WithLp.toLp 2 (i.removeNth y), ?_, ?_⟩ + · rw [mem_standardSimplex_iff] + refine ⟨fun j => hy.1 (i.succAbove j), ?_⟩ + change ∑ j, i.removeNth (fun k => y k) j ≤ 1 + linarith [hy.1 i] + · ext j + induction j using i.succAboveCases + · simp only [diagonalFacetChart, PiLp.toLp_apply, Fin.insertNth_apply_same] + change 1 - ∑ j, i.removeNth (fun k => y k) j = y i + linarith + · simp [diagonalFacetChart] + +theorem simplexFacet_diagonal_area (n : ℕ) : + Measure.euclideanHausdorffMeasure n (simplexFacet (n + 1) none) = + ENNReal.ofReal (Real.sqrt (n + 1) / (Nat.factorial n : ℝ)) := by + let i : Fin (n + 1) := Fin.last n + rw [← diagonalFacetChart_image n i] + have hset : diagonalFacetChart n i '' standardSimplex n = + (IsometryEquiv.vaddConst (EuclideanSpace.single i (1 : ℝ))) '' + (facetEmbedding n i (-1) '' standardSimplex n) := by + rw [image_image] + congr 1 + funext x + exact diagonalFacetChart_eq n i x + rw [hset, (IsometryEquiv.vaddConst (EuclideanSpace.single i (1 : ℝ))).isometry.euclideanHausdorffMeasure_image] + have h := (facetEmbedding n i (-1)).euclideanHausdorffMeasure_image_eq_normDet_mul_volume + (standardSimplex n) + simp only [finrank_euclideanSpace_fin, facetEmbedding_normDet_neg_one, + standardSimplex_volume] at h + rw [h, ← ENNReal.ofReal_mul (Real.sqrt_nonneg _)] + congr 1 + ring + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetBijection.lean b/lean/OAI/Geometry/ProjectionVolume/FacetBijection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4520735f2ce273123ee79516ec73d489c3bf4b0 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetBijection.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.ProjectionVolume.FacetExhaustiveness +import OAI.Geometry.ProjectionVolume.FacetUniqueness +import OAI.Geometry.ProjectionVolume.ProductFacetFamilies + +namespace OAI + +universe uι + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem face_eq_exposedFace (i : ι) (hne : (P.face i).Nonempty) : + P.face i = exposedFace P.body (P.normal i) := by + ext x + constructor + · rintro ⟨hx, hxi⟩ + refine ⟨hx, ?_⟩ + intro y hy + change ⟪P.normal i, y⟫ ≤ ⟪P.normal i, x⟫ + rw [hxi] + exact hy i + · intro hx + obtain ⟨y, hy⟩ := hne + refine ⟨hx.1, le_antisymm (hx.1 i) ?_⟩ + have h := hx.2 y hy.1 + change ⟪P.normal i, y⟫ ≤ ⟪P.normal i, x⟫ at h + rwa [hy.2] at h + +theorem face_isExposed (i : ι) : IsExposed ℝ P.body (P.face i) := by + intro hne + refine ⟨innerSL ℝ (P.normal i), ?_⟩ + exact P.face_eq_exposedFace i hne + +theorem exposed_facet_eq_unique_face (hd : 0 < d) (F : Set (Euclidean d)) + (hF : IsExposed ℝ P.body F) (hne : F.Nonempty) + (hdim : Module.finrank ℝ (vectorSpan ℝ F) = d - 1) : + ∃! i, F = P.face i := by + obtain ⟨u, rfl⟩ := eq_exposedFace_of_isExposed hF hne + have hu : u ≠ 0 := by + intro hzero + rw [hzero, exposedFace_zero, + vectorSpan_finrank_of_interior_nonempty P.body P.body_interior_nonempty] at hdim + omega + obtain ⟨i, hi⟩ := P.exposedFace_eq_face hu hdim + refine ⟨i, hi, ?_⟩ + intro j hj + apply P.face_index_unique_of_finrank j i + · rwa [← hj] + · rwa [← hj] + · exact hj.symm.trans hi + +theorem finite_exposed_facets (hd : 0 < d) : + {F : Set (Euclidean d) | IsExposed ℝ P.body F ∧ F.Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ F) = d - 1}.Finite := by + apply (Set.finite_range P.face).subset + rintro F ⟨hF, hne, hdim⟩ + obtain ⟨i, hi, _⟩ := P.exposed_facet_eq_unique_face hd F hF hne hdim + exact ⟨i, hi.symm⟩ + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetDimension.lean b/lean/OAI/Geometry/ProjectionVolume/FacetDimension.lean new file mode 100644 index 0000000000000000000000000000000000000000..170641920a2386c3f3a8ea0a921933224e09c5ac --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetDimension.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.ProjectionVolume.FacetUniqueness +import OAI.Geometry.ProjectionVolume.ProjectionNullity + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace Classical Pointwise + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem face_finrank_le (i : ι) : + Module.finrank ℝ (vectorSpan ℝ (P.face i)) ≤ d - 1 := by + have hn : P.normal i ≠ 0 := by + intro h + have := P.normal_unit i + simp only [h, norm_zero] at this + norm_num at this + have h := Submodule.finrank_mono (P.face_vectorSpan_le_normalHyperplane i) + rwa [normalHyperplane_finrank (P.normal i) hn] at h + +theorem face_surface_zero_of_finrank_lt (i : ι) + (h : Module.finrank ℝ (vectorSpan ℝ (P.face i)) < d - 1) : + μHE[d - 1] (P.face i) = 0 := by + have hn : P.normal i ≠ 0 := by + intro h + have := P.normal_unit i + simp only [h, norm_zero] at this + norm_num at this + have hz := projectionVolume_eq_zero_of_finrank_lt (P.face i) hn h + rw [projectionVolume_of_subset_affine_hyperplane (P.normal i) (P.normal i) + (P.normal_unit i) (P.normal_unit i) (P.offset i) (P.face i) (fun _ hx => hx.2)] at hz + simpa only [real_inner_self_eq_norm_sq, P.normal_unit, one_pow, abs_one, + ENNReal.ofReal_one, one_mul] using hz + +theorem faceArea_zero_of_not_facet (i : ι) + (h : ¬ ((P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1)) : P.faceArea i = 0 := by + by_cases hne : (P.face i).Nonempty + · have hdim : Module.finrank ℝ (vectorSpan ℝ (P.face i)) ≠ d - 1 := + fun heq => h ⟨hne, heq⟩ + rw [faceArea, P.face_surface_zero_of_finrank_lt i (lt_of_le_of_ne (P.face_finrank_le i) hdim), + ENNReal.toReal_zero] + · have he : P.face i = ∅ := by + ext x + constructor + · intro hx + exact (hne ⟨x, hx⟩).elim + · intro hx + exact hx.elim + simp only [faceArea, he, measure_empty, ENNReal.toReal_zero] + +theorem brightness_eq_facet_sum (u : Euclidean d) : + brightness P.body u = (1 / 2 : ℝ) * + ∑ i ∈ Finset.univ.filter (fun i => (P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1), + P.faceArea i * |⟪P.normal i, u⟫| := by + have hsum : (∑ i, P.faceArea i * |⟪u, P.normal i⟫|) = + ∑ i ∈ Finset.univ.filter (fun i => (P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1), + P.faceArea i * |⟪u, P.normal i⟫| := by + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro i hi hni + have hn : ¬ ((P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1) := + fun hf => hni (Finset.mem_filter.mpr ⟨hi, hf⟩) + rw [P.faceArea_zero_of_not_facet i hn, zero_mul] + rw [P.brightness_eq_sum, hsum] + simp_rw [real_inner_comm u] + ring + +theorem projectionBody_eq_facet_sum : + projectionBody P.body = + ∑ i ∈ Finset.univ.filter (fun i => (P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1), + segment ℝ (-(P.faceArea i / 2) • P.normal i) ((P.faceArea i / 2) • P.normal i) := by + rw [P.projectionBody_eq_facetZonotope] + unfold facetZonotope + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro i hi hni + have hn : ¬ ((P.face i).Nonempty ∧ + Module.finrank ℝ (vectorSpan ℝ (P.face i)) = d - 1) := + fun hf => hni (Finset.mem_filter.mpr ⟨hi, hf⟩) + simp only [P.faceArea_zero_of_not_facet i hn, zero_div, neg_zero, zero_smul, + segment_same, Set.singleton_zero] + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetExhaustiveness.lean b/lean/OAI/Geometry/ProjectionVolume/FacetExhaustiveness.lean new file mode 100644 index 0000000000000000000000000000000000000000..c927814058eda5c574531f28ba9eb53abf724c2b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetExhaustiveness.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.ProjectionVolume.PolytopeFront +import OAI.Geometry.ProjectionVolume.ExposedBounds +import Mathlib.Analysis.Convex.Intrinsic + +namespace OAI + +universe uι + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem inner_eq_of_mem_intrinsicInterior {d : ℕ} {S : Set (Euclidean d)} + {x : Euclidean d} (hx : x ∈ intrinsicInterior ℝ S) (v : Euclidean d) + (hmax : ∀ z ∈ S, ⟪v, z⟫ ≤ ⟪v, x⟫) : + ∀ z ∈ S, ⟪v, z⟫ = ⟪v, x⟫ := by + obtain ⟨xQ, hxQ, rfl⟩ := mem_intrinsicInterior.mp hx + obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp hxQ) + intro z hz + by_cases hzx : z = xQ.val + · simp only [hzx] + let t : ℝ := ε / (2 * ‖xQ.val - z‖) + have hnorm : 0 < ‖xQ.val - z‖ := norm_pos_iff.mpr (sub_ne_zero.mpr (Ne.symm hzx)) + have ht : 0 < t := div_pos hε (mul_pos (by norm_num) hnorm) + let y : affineSpan ℝ S := ⟨xQ.val + t • (xQ.val - z), by + simpa only [vsub_eq_sub, vadd_eq_add, add_comm] using + (affineSpan ℝ S).smul_vsub_vadd_mem t xQ.property + (subset_affineSpan ℝ S hz) xQ.property⟩ + have hyball : y ∈ Metric.ball xQ ε := by + change dist (xQ.val + t • (xQ.val - z)) xQ.val < ε + rw [dist_eq_norm, add_sub_cancel_left, norm_smul, Real.norm_eq_abs, abs_of_pos ht] + have heq : t * ‖xQ.val - z‖ = ε / 2 := by + dsimp [t] + field_simp + rw [heq] + linarith + have hy : y.val ∈ S := hball hyball + have hle := hmax y.val hy + change ⟪v, xQ.val + t • (xQ.val - z)⟫ ≤ ⟪v, xQ.val⟫ at hle + rw [inner_add_right, real_inner_smul_right, inner_sub_right] at hle + exact le_antisymm (hmax z hz) (by nlinarith) + +namespace HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem exists_active_of_mem_exposedFace {u x : Euclidean d} (hu : u ≠ 0) + (hx : x ∈ exposedFace P.body u) : ∃ i, x ∈ P.face i := by + obtain ⟨t, ht, hxt, i, _, hi⟩ := P.exists_front_point x u hu hx.1 + have hmax := hx.2 (x + t • u) hxt + change ⟪u, x + t • u⟫ ≤ ⟪u, x⟫ at hmax + rw [inner_add_right, real_inner_smul_right] at hmax + have hpos := real_inner_self_pos.mpr hu + have ht0 : t = 0 := by nlinarith + refine ⟨i, hx.1, ?_⟩ + change P.offset i - ⟪P.normal i, x + t • u⟫ = 0 at hi + simp only [ht0, zero_smul, add_zero] at hi + exact (sub_eq_zero.mp hi).symm + +theorem exposedFace_eq_face {u : Euclidean d} (hu : u ≠ 0) + (hdim : Module.finrank ℝ (vectorSpan ℝ (exposedFace P.body u)) = d - 1) : + ∃ i, exposedFace P.body u = P.face i := by + have hconv : Convex ℝ (exposedFace P.body u) := + (show IsExposed ℝ P.body (exposedFace P.body u) from + ContinuousLinearMap.toExposed.isExposed).convex P.body_convex + have hne := exposedFace_nonempty P.body P.compact P.body_nonempty u + obtain ⟨x, hx⟩ := (intrinsicInterior_nonempty hconv).mpr hne + have hxF : x ∈ exposedFace P.body u := intrinsicInterior_subset hx + obtain ⟨i, hxi⟩ := P.exists_active_of_mem_exposedFace hu hxF + have hinner : ∀ z ∈ exposedFace P.body u, ⟪P.normal i, z⟫ = P.offset i := by + intro z hz + apply Eq.trans (inner_eq_of_mem_intrinsicInterior hx (P.normal i) ?_ z hz) hxi.2 + intro y hy + rw [hxi.2] + exact hy.1 i + have hle : vectorSpan ℝ (exposedFace P.body u) ≤ normalHyperplane (P.normal i) := by + rw [vectorSpan_def] + apply Submodule.span_le.mpr + rintro _ ⟨a, ha, b, hb, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪P.normal i, a - b⟫ = 0 + rw [inner_sub_right, hinner a ha, hinner b hb, sub_self] + have hn : P.normal i ≠ 0 := by + intro h + have hnorm := P.normal_unit i + rw [h, norm_zero] at hnorm + norm_num at hnorm + have hspan_i : vectorSpan ℝ (exposedFace P.body u) = normalHyperplane (P.normal i) := + Submodule.eq_of_le_of_finrank_eq hle (hdim.trans (normalHyperplane_finrank _ hn).symm) + have hspan_u : vectorSpan ℝ (exposedFace P.body u) = normalHyperplane u := + Submodule.eq_of_le_of_finrank_eq (exposedFace_vectorSpan_le_normalHyperplane P.body u) + (hdim.trans (normalHyperplane_finrank u hu).symm) + refine ⟨i, Subset.antisymm (fun z hz => ⟨hz.1, hinner z hz⟩) ?_⟩ + intro y hy + have hyi : y - x ∈ normalHyperplane (P.normal i) := by + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + rw [inner_sub_right, hy.2, hxi.2, sub_self] + have hyu : y - x ∈ normalHyperplane u := by + rwa [← hspan_u, hspan_i] + have heq : ⟪u, y⟫ = ⟪u, x⟫ := by + have h := Submodule.mem_orthogonal_singleton_iff_inner_right.mp hyu + simpa only [inner_sub_right, sub_eq_zero] using h + refine ⟨hy.1, ?_⟩ + intro z hz + change ⟪u, z⟫ ≤ ⟪u, y⟫ + rw [heq] + exact hxF.2 z hz + +end HPolytope +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetLinearImage.lean b/lean/OAI/Geometry/ProjectionVolume/FacetLinearImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee326330273d3dcc317d2b7b35efe7e850dc9c72 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetLinearImage.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.ProjectionVolume.AffineBrightness +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +def linearImageNormal {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) : Euclidean n := + ‖L.symm.toLinearMap.adjoint v‖⁻¹ • L.symm.toLinearMap.adjoint v + +theorem inverseAdjoint_ne_zero {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) : L.symm.toLinearMap.adjoint v ≠ 0 := by + intro h + have hh := L.symm.toLinearMap.adjoint_inner_left (L v) v + rw [h, inner_zero_left] at hh + change 0 = ⟪v, L.symm (L v)⟫ at hh + rw [L.symm_apply_apply, real_inner_self_eq_norm_sq, hv, one_pow] at hh + norm_num at hh + +theorem linearImageNormal_norm {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) : ‖linearImageNormal L v‖ = 1 := by + simp [linearImageNormal, norm_smul, inverseAdjoint_ne_zero L v hv] + +theorem linearImageNormal_inner {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v x : Euclidean n) : + ⟪linearImageNormal L v, L x⟫ = ⟪v, x⟫ / ‖L.symm.toLinearMap.adjoint v‖ := by + rw [linearImageNormal, real_inner_smul_left, LinearMap.adjoint_inner_left] + change ‖L.symm.toLinearMap.adjoint v‖⁻¹ * ⟪v, L.symm (L x)⟫ = _ + rw [L.symm_apply_apply] + ring + +theorem linearImageNormal_support_iff {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v x : Euclidean n) (hv : ‖v‖ = 1) (c : ℝ) : + ⟪linearImageNormal L v, L x⟫ ≤ c / ‖L.symm.toLinearMap.adjoint v‖ ↔ ⟪v, x⟫ ≤ c := by + rw [linearImageNormal_inner, div_le_div_iff_of_pos_right + (norm_pos_iff.mpr (inverseAdjoint_ne_zero L v hv))] + +theorem linearImageNormal_plane {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (c : ℝ) (F : Set (Euclidean n)) + (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + ∀ y ∈ L '' F, ⟪linearImageNormal L v, y⟫ = c / ‖L.symm.toLinearMap.adjoint v‖ := by + rintro y ⟨x, hx, rfl⟩ + rw [linearImageNormal_inner, hplane x hx] + +theorem affineHyperplane_area_lt_top {n : ℕ} (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hF : IsCompact F) + (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : μHE[n - 1] F < ⊤ := by + have h := projectionVolume_of_subset_affine_hyperplane v v hv hv c F hplane + simp only [real_inner_self_eq_norm_sq, hv, one_pow, abs_one, ENNReal.ofReal_one, + one_mul] at h + rw [← h] + exact (hF.image (normalHyperplane v).orthogonalProjectionOnto.continuous).measure_lt_top + +theorem affineHyperplane_linearImage_area_real {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + (μHE[n - 1] (L '' F)).toReal = + |L.toLinearMap.det| * ‖L.symm.toLinearMap.adjoint v‖ * (μHE[n - 1] F).toReal := by + let w := linearImageNormal L v + have hw : ‖w‖ = 1 := linearImageNormal_norm L v hv + have hi := brightness_of_subset_affine_hyperplane w w hw + (c / ‖L.symm.toLinearMap.adjoint v‖) (L '' F) (linearImageNormal_plane L v c F hplane) + simp only [real_inner_self_eq_norm_sq, hw, one_pow, abs_one, one_mul] at hi + rw [← hi, brightness_linearEquiv_image, + brightness_of_subset_affine_hyperplane (L.symm w) v hv c F hplane] + have hin : ⟪L.symm w, v⟫ = ‖L.symm.toLinearMap.adjoint v‖ := by + change ⟪L.symm.toLinearMap w, v⟫ = _ + rw [← LinearMap.adjoint_inner_right] + change ⟪linearImageNormal L v, L.symm.toLinearMap.adjoint v⟫ = _ + rw [linearImageNormal, real_inner_smul_left, real_inner_self_eq_norm_sq] + field_simp [norm_ne_zero_iff.mpr (inverseAdjoint_ne_zero L v hv)] + rw [hin, abs_of_nonneg (norm_nonneg _)] + ring + +theorem affineHyperplane_linearImage_area {n : ℕ} + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hF : IsCompact F) + (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + μHE[n - 1] (L '' F) = ENNReal.ofReal + (|L.toLinearMap.det| * ‖L.symm.toLinearMap.adjoint v‖) * μHE[n - 1] F := by + have hfinite := affineHyperplane_area_lt_top v hv c F hF hplane + have hfinite' := affineHyperplane_area_lt_top (linearImageNormal L v) + (linearImageNormal_norm L v hv) (c / ‖L.symm.toLinearMap.adjoint v‖) + (L '' F) (hF.image L.toContinuousLinearEquiv.continuous) + (linearImageNormal_plane L v c F hplane) + apply (ENNReal.toReal_eq_toReal_iff' hfinite'.ne (ENNReal.mul_ne_top ENNReal.ofReal_ne_top hfinite.ne)).mp + rw [ENNReal.toReal_mul, ENNReal.toReal_ofReal (mul_nonneg (abs_nonneg _) (norm_nonneg _))] + exact affineHyperplane_linearImage_area_real L v hv c F hplane + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetPrism.lean b/lean/OAI/Geometry/ProjectionVolume/FacetPrism.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fbd04da2f8530daa5ff4f6028763d04681bce02 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetPrism.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.ProjectionVolume.PrismVolume + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem vadd_add_set {n : ℕ} (a : Euclidean n) (A B : Set (Euclidean n)) : + (a +ᵥ A) + B = a +ᵥ (A + B) := by + ext z + constructor + · rintro ⟨x, ⟨x₀, hx, rfl⟩, y, hy, rfl⟩ + exact ⟨x₀ + y, ⟨x₀, hx, y, hy, rfl⟩, (add_assoc a x₀ y).symm⟩ + · rintro ⟨z, ⟨x, hx, y, hy, rfl⟩, rfl⟩ + exact ⟨a + x, ⟨x, hx, rfl⟩, y, hy, add_assoc a x y⟩ + +theorem affineHyperplane_unitPrism_volume {n : ℕ} (hn : 0 < n) + (v : Euclidean n) (hv : ‖v‖ = 1) (c : ℝ) (F : Set (Euclidean n)) + (hF : IsCompact F) (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + volume (F + segment ℝ 0 v) = μHE[n - 1] F := by + have hv0 : v ≠ 0 := by intro h; simp [h] at hv + let H := normalHyperplane v + let T : Set (Euclidean n) := (-c) • v +ᵥ F + have hT : T ⊆ (H : Set (Euclidean n)) := by + rintro x ⟨y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪v, (-c) • v + y⟫ = 0 + simp [inner_add_right, inner_smul_right, hv, hplane y hy] + let b := stdOrthonormalBasis ℝ H + let f : Euclidean (Module.finrank ℝ H) →ₗᵢ[ℝ] Euclidean n := + H.subtypeₗᵢ.comp b.repr.symm.toLinearIsometry + let A : Set (Euclidean (Module.finrank ℝ H)) := f ⁻¹' T + have hTcompact : IsCompact T := hF.image (continuous_const.add continuous_id) + have hA : MeasurableSet A := hTcompact.measurableSet.preimage f.continuous.measurable + have hfimage : f '' A = T := by + apply image_preimage_eq_of_subset + intro y hy + refine ⟨b.repr ⟨y, hT hy⟩, ?_⟩ + change ((b.repr.symm (b.repr ⟨y, hT hy⟩) : H) : Euclidean n) = y + rw [LinearIsometryEquiv.symm_apply_apply] + have hrank : Module.finrank ℝ H = n - 1 := normalHyperplane_finrank v hv0 + have hvolA : volume A = μHE[n - 1] F := by + have h := f.toLinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume A + simp only [finrank_euclideanSpace_fin, LinearIsometry.normDet_eq_one, + ENNReal.ofReal_one, one_mul] at h + change μHE[Module.finrank ℝ H] (f '' A) = volume A at h + rw [hfimage] at h + conv_lhs at h => rw [hrank] + change μHE[n - 1] ((-c) • v +ᵥ F) = volume A at h + rw [measure_vadd] at h + exact h.symm + have hfperp (x : Euclidean (Module.finrank ℝ H)) : ⟪v, f x⟫ = 0 := + Submodule.mem_orthogonal_singleton_iff_inner_right.mp (b.repr.symm x).property + have h := orthogonalPrism_volume f v hv hfperp (by omega) A hA + rw [hfimage, hvolA] at h + change volume (((-c) • v +ᵥ F) + segment ℝ 0 v) = _ at h + rw [vadd_add_set, measure_vadd] at h + exact h + +theorem linearImage_unitPrism {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (F : Set (Euclidean n)) : + L '' (F + segment ℝ 0 v) = L '' F + segment ℝ 0 (L v) := by + rw [Set.image_add] + congr 1 + simpa using (image_segment ℝ (L.toLinearMap.toAffineMap) (0 : Euclidean n) v) + +theorem linearImage_unitPrism_volume {n : ℕ} (hn : 0 < n) + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hF : IsCompact F) + (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + volume (L '' F + segment ℝ 0 (L v)) = ENNReal.ofReal |L.toLinearMap.det| * μHE[n - 1] F := by + rw [← linearImage_unitPrism] + change volume (L.toLinearMap '' (F + segment ℝ 0 v)) = _ + rw [volume.addHaar_image_linearMap, affineHyperplane_unitPrism_volume hn v hv c F hF hplane] + +theorem linearImage_unitPrism_height {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) : + ⟪linearImageNormal L v, L v⟫ = 1 / ‖L.symm.toLinearMap.adjoint v‖ := by + rw [linearImageNormal_inner, real_inner_self_eq_norm_sq, hv, one_pow] + +theorem linearImage_unitPrism_offset {n : ℕ} (L : Euclidean n ≃ₗ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) (c : ℝ) (x : Euclidean n) + (hx : ⟪v, x⟫ = c) (t : ℝ) : + ⟪linearImageNormal L v, L (x + t • v)⟫ = + c / ‖L.symm.toLinearMap.adjoint v‖ + t / ‖L.symm.toLinearMap.adjoint v‖ := by + rw [linearImageNormal_inner, inner_add_right, real_inner_smul_right, + real_inner_self_eq_norm_sq, hv, one_pow, mul_one, hx, add_div] + +theorem linearImage_unitPrism_volume_eq_area_mul_height {n : ℕ} (hn : 0 < n) + (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n) (hv : ‖v‖ = 1) + (c : ℝ) (F : Set (Euclidean n)) (hF : IsCompact F) + (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) : + (volume (L '' F + segment ℝ 0 (L v))).toReal = + (μHE[n - 1] (L '' F)).toReal * (1 / ‖L.symm.toLinearMap.adjoint v‖) := by + rw [linearImage_unitPrism_volume hn L v hv c F hF hplane, ENNReal.toReal_mul, + ENNReal.toReal_ofReal (abs_nonneg _), affineHyperplane_linearImage_area_real L v hv c F hplane] + field_simp [norm_ne_zero_iff.mpr (inverseAdjoint_ne_zero L v hv)] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FacetUniqueness.lean b/lean/OAI/Geometry/ProjectionVolume/FacetUniqueness.lean new file mode 100644 index 0000000000000000000000000000000000000000..e45233d19e9a86fa1f300b8b28ba937842feadb9 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FacetUniqueness.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.ProjectionVolume.PolytopeFacets + +namespace OAI + +universe uι + +open Set +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem face_vectorSpan_le_normalHyperplane (a : ι) : + vectorSpan ℝ (P.face a) ≤ normalHyperplane (P.normal a) := by + rw [vectorSpan_def] + apply Submodule.span_le.mpr + rintro _ ⟨x, hx, y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪P.normal a, x - y⟫ = 0 + rw [inner_sub_right, hx.2, hy.2, sub_self] + +theorem face_index_unique_of_finrank (a b : ι) (hne : (P.face a).Nonempty) + (hdim : Module.finrank ℝ (vectorSpan ℝ (P.face a)) = d - 1) + (heq : P.face a = P.face b) : a = b := by + have han : P.normal a ≠ 0 := by + intro h + have := P.normal_unit a + simp only [h, norm_zero] at this + norm_num at this + have hbn : P.normal b ≠ 0 := by + intro h + have := P.normal_unit b + simp only [h, norm_zero] at this + norm_num at this + have hWa : vectorSpan ℝ (P.face a) = normalHyperplane (P.normal a) := + Submodule.eq_of_le_of_finrank_eq (P.face_vectorSpan_le_normalHyperplane a) + (hdim.trans (normalHyperplane_finrank (P.normal a) han).symm) + have hWb : vectorSpan ℝ (P.face b) = normalHyperplane (P.normal b) := + Submodule.eq_of_le_of_finrank_eq (P.face_vectorSpan_le_normalHyperplane b) + ((heq ▸ hdim).trans (normalHyperplane_finrank (P.normal b) hbn).symm) + have hH : normalHyperplane (P.normal a) = normalHyperplane (P.normal b) := by + rw [← hWa, ← hWb, heq] + have hspan : Submodule.span ℝ {P.normal a} = Submodule.span ℝ {P.normal b} := by + have h := congrArg Submodule.orthogonal hH + simpa only [normalHyperplane, Submodule.orthogonal_orthogonal] using h + have hbspan : P.normal b ∈ Submodule.span ℝ {P.normal a} := by + rw [hspan] + exact Submodule.subset_span (mem_singleton _) + obtain ⟨c, hc⟩ := Submodule.mem_span_singleton.mp hbspan + have hnorm : |c| = 1 := by + have h := congrArg norm hc + simpa only [norm_smul, Real.norm_eq_abs, P.normal_unit, mul_one] using h + obtain ⟨x, hxa⟩ := hne + have hxb : x ∈ P.face b := heq ▸ hxa + have hoff : P.offset b = c * P.offset a := by + rw [← hxb.2, ← hc, real_inner_smul_left, hxa.2] + obtain ⟨p, hp⟩ := P.strict_feasible + have haPos : 0 < P.offset a - ⟪P.normal a, p⟫ := sub_pos.mpr (hp a) + have hbPos : 0 < c * (P.offset a - ⟪P.normal a, p⟫) := by + have h := sub_pos.mpr (hp b) + rwa [hoff, ← hc, real_inner_smul_left, ← mul_sub] at h + have hcPos : 0 < c := by + by_contra h + exact (not_lt_of_ge (mul_nonpos_of_nonpos_of_nonneg (le_of_not_gt h) haPos.le)) hbPos + have hcOne : c = 1 := by rwa [abs_of_pos hcPos] at hnorm + have hn : P.normal a = P.normal b := by simpa only [hcOne, one_smul] using hc + have ho : P.offset a = P.offset b := by simpa only [hcOne, one_mul] using hoff.symm + exact P.distinct (Prod.ext hn ho) + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FiniteApproximation.lean b/lean/OAI/Geometry/ProjectionVolume/FiniteApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc73d614f2c9c05cee29a9be9efe3a24025795e0 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FiniteApproximation.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.ProjectionVolume.Basic +import OAI.Geometry.ProjectionVolume.SupportGeometry +import OAI.Geometry.ProjectionVolume.Brightness +import Mathlib.Analysis.Normed.Affine.Convex + +namespace OAI + +open Set Metric Filter +open scoped Pointwise Topology RealInnerProductSpace + +namespace Paper092 + +theorem convex_smul_subset_interior {n : ℕ} {K : Set (Euclidean n)} + (hK : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) + {r : ℝ} (hr : 0 ≤ r) (hr1 : r < 1) : r • K ⊆ interior K := by + rintro _ ⟨x, hx, rfl⟩ + simpa only [smul_zero, add_zero] using + hK.combo_self_interior_mem_interior hx h0 hr (sub_pos.mpr hr1) (add_sub_cancel _ _) + +theorem exists_inscribed_finset_sandwich {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (hv : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) + {r : ℝ} (hr : 0 ≤ r) (hr1 : r < 1) : + ∃ t : Finset (Euclidean n), + r • K ⊆ interior (convexHull ℝ (t : Set (Euclidean n))) ∧ + convexHull ℝ (t : Set (Euclidean n)) ⊆ K ∧ + (0 : Euclidean n) ∈ interior (convexHull ℝ (t : Set (Euclidean n))) := by + obtain ⟨t, ht, htK⟩ := (hv.smul r).exists_subset_interior_convexHull_finset_of_isCompact + (hc.smul r) (mem_nhdsSet_iff_exists.mpr + ⟨interior K, isOpen_interior, convex_smul_subset_interior hv h0 hr hr1, interior_subset⟩) + refine ⟨t, ht, htK, ht ?_⟩ + exact ⟨0, interior_subset h0, smul_zero r⟩ + +theorem support_mono {n : ℕ} {A B : Set (Euclidean n)} + (hne : A.Nonempty) (hc : IsCompact B) (h : A ⊆ B) (u : Euclidean n) : + SupportGeometry.support A (innerSL ℝ u) ≤ + SupportGeometry.support B (innerSL ℝ u) := + SupportGeometry.support_le hne _ fun _ hx => SupportGeometry.le_support hc _ (h hx) + +theorem projectionBody_support_le {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : + SupportGeometry.support (projectionBody K) (innerSL ℝ u) ≤ brightness K u := + SupportGeometry.support_le ⟨0, zero_mem_projectionBody K⟩ _ fun _ hx => hx u + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/FiniteVertices.lean b/lean/OAI/Geometry/ProjectionVolume/FiniteVertices.lean new file mode 100644 index 0000000000000000000000000000000000000000..07719248b32042c8768c9eec8d43734c2426f021 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/FiniteVertices.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.ProjectionVolume.PolytopeDefinitions +import Mathlib.Analysis.Convex.KreinMilman +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.Linarith + +namespace OAI + +universe uι + +open Set Filter Topology +open scoped RealInnerProductSpace + +namespace Paper092 +namespace HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem extreme_active_unique {x y : Euclidean d} + (hx : x ∈ P.body.extremePoints ℝ) + (ha : ∀ i, ⟪P.normal i, x⟫ = P.offset i → ⟪P.normal i, y⟫ = P.offset i) : + y = x := by + have hnear : ∀ᶠ t : ℝ in 𝓝 0, ∀ i, + ⟪P.normal i, x⟫ < P.offset i → + ⟪P.normal i, x + t • (y - x)⟫ < P.offset i := by + apply Filter.eventually_all.mpr + intro i + by_cases hi : ⟪P.normal i, x⟫ < P.offset i + · have h : ∀ᶠ t : ℝ in 𝓝 0, + ⟪P.normal i, x + t • (y - x)⟫ < P.offset i := + (isOpen_lt (by fun_prop) continuous_const).mem_nhds (by simpa using hi) + filter_upwards [h] with t ht + exact fun _ => ht + · exact Filter.Eventually.of_forall fun _ h => (hi h).elim + obtain ⟨ε, hε, hsmall⟩ := Metric.eventually_nhds_iff.mp hnear + have hpert (t : ℝ) (ht : dist t 0 < ε) : x + t • (y - x) ∈ P.body := by + intro i + rcases (hx.1 i).lt_or_eq with hi | hi + · exact (hsmall ht i hi).le + · simp [inner_add_right, inner_smul_right, inner_sub_right, hi, ha i hi] + have hp : dist (ε / 2) 0 < ε := by + rw [Real.dist_eq, sub_zero, abs_of_pos (half_pos hε)] + linarith + have hm : dist (-(ε / 2)) 0 < ε := by simpa using hp + have hxplus := hx.2 (hpert (ε / 2) hp) + (show x - (ε / 2) • (y - x) ∈ P.body by simpa only [neg_smul, ← sub_eq_add_neg] using hpert (-(ε / 2)) hm) + (mem_openSegment_add_sub (𝕜 := ℝ) x ((ε / 2) • (y - x))) + have hz : (ε / 2) • (y - x) = 0 := add_left_cancel (hxplus.trans (add_zero x).symm) + exact sub_eq_zero.mp ((smul_eq_zero.mp hz).resolve_left (ne_of_gt (half_pos hε))) + +theorem finite_extremePoints : (P.body.extremePoints ℝ).Finite := by + classical + let active (x : Euclidean d) : Finset ι := + Finset.univ.filter (fun i => ⟪P.normal i, x⟫ = P.offset i) + have hi : Set.InjOn active (P.body.extremePoints ℝ) := by + intro x hx y _ hxy + apply (P.extreme_active_unique hx ?_).symm + intro i hix + have hm : i ∈ active x := by simp [active, hix] + rw [hxy] at hm + exact (Finset.mem_filter.mp hm).2 + exact (Set.toFinite (Set.univ : Set (Finset ι))).of_injOn + (fun _ _ => Set.mem_univ _) hi + +theorem eq_convexHull_extremePoints : P.body = convexHull ℝ (P.body.extremePoints ℝ) := by + have hc : Convex ℝ P.body := by + change Convex ℝ {x : Euclidean d | ∀ i, ⟪P.normal i, x⟫ ≤ P.offset i} + simp only [Set.ofPred_forall] + exact convex_iInter fun i => (convex_Iic (P.offset i)).linear_preimage + (innerSL ℝ (P.normal i)).toLinearMap + have h := closure_convexHull_extremePoints P.compact hc + change closure (convexHull ℝ (P.body.extremePoints ℝ)) = P.body at h + rw [P.finite_extremePoints.isClosed_convexHull ℝ |>.closure_eq] at h + exact h.symm + +end HPolytope + +theorem halfspaces_are_finite_convex_hull {d : ℕ} {ι : Type uι} [Fintype ι] + (P : HPolytope d ι) : + ∃ S : Finset (Euclidean d), P.body = convexHull ℝ (S : Set (Euclidean d)) := by + classical + exact ⟨P.finite_extremePoints.toFinset, by simpa using P.eq_convexHull_extremePoints⟩ +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/GeneralProduct.lean b/lean/OAI/Geometry/ProjectionVolume/GeneralProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..117f81e551605c8692da722311b60c6d3bc52ffb --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/GeneralProduct.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.ProjectionVolume.ProductArea +import OAI.Geometry.ProjectionVolume.ProductReconstruction +import OAI.Geometry.ProjectionVolume.PolytopeCauchy + +namespace OAI + +universe uι uκ + +noncomputable section +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace Pointwise + +namespace Paper092 + +namespace HPolytope + +variable {r s : ℕ} {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] + +theorem product_faceArea_inl (hr : 0 < r) (A : HPolytope r ι) (B : HPolytope s κ) + (i : ι) : (A.product B).faceArea (.inl i) = + A.faceArea i * (volume B.body).toReal := by + unfold faceArea + rw [product_face_inl, cartesianBody_eq_preimage, + affineHyperplane_product_area_left hr (A.normal i) (A.normal_unit i) (A.offset i) + (A.face i) (A.face_isCompact i) (fun _ hx => hx.2) B.body B.compact.measurableSet, + ENNReal.toReal_mul] + +theorem product_faceArea_inr (hs : 0 < s) (A : HPolytope r ι) (B : HPolytope s κ) + (i : κ) : (A.product B).faceArea (.inr i) = + (volume A.body).toReal * B.faceArea i := by + unfold faceArea + rw [product_face_inr, cartesianBody_eq_preimage, + affineHyperplane_product_area_right hs (B.normal i) (B.normal_unit i) (B.offset i) + (B.face i) (B.face_isCompact i) (fun _ hx => hx.2) A.body A.compact.measurableSet, + ENNReal.toReal_mul] + +theorem brightness_product (hr : 0 < r) (hs : 0 < s) + (A : HPolytope r ι) (B : HPolytope s κ) (w : Euclidean (r + s)) : + brightness (cartesianBody A.body B.body) w = + (volume B.body).toReal * brightness A.body (splitEuclideanProduct r s w).1 + + (volume A.body).toReal * brightness B.body (splitEuclideanProduct r s w).2 := by + classical + rw [← product_body A B, (A.product B).brightness_eq_sum, + A.brightness_eq_sum, B.brightness_eq_sum, Fintype.sum_sum_type] + have hleft (i : ι) : ⟪w, (A.product B).normal (.inl i)⟫ = + ⟪(splitEuclideanProduct r s w).1, A.normal i⟫ := by + change ⟪w, productLiftLeft r s (A.normal i)⟫ = _ + rw [real_inner_comm, inner_productLiftLeft, real_inner_comm] + have hright (i : κ) : ⟪w, (A.product B).normal (.inr i)⟫ = + ⟪(splitEuclideanProduct r s w).2, B.normal i⟫ := by + change ⟪w, productLiftRight r s (B.normal i)⟫ = _ + rw [real_inner_comm, inner_productLiftRight, real_inner_comm] + simp_rw [product_faceArea_inl hr, product_faceArea_inr hs, hleft, hright] + simp_rw [mul_assoc] + rw [← Finset.mul_sum] + have heq : (∑ i, A.faceArea i * ((volume B.body).toReal * + |⟪(splitEuclideanProduct r s w).1, A.normal i⟫|)) = + (volume B.body).toReal * ∑ i, A.faceArea i * + |⟪(splitEuclideanProduct r s w).1, A.normal i⟫| := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + ring + rw [heq] + ring + +end HPolytope + +theorem projectionBody_product {r s : ℕ} (hr : 2 ≤ r) (hs : 2 ≤ s) + {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] (A : HPolytope r ι) (B : HPolytope s κ) : + projectionBody (cartesianBody A.body B.body) = + cartesianBody ((volume B.body).toReal • projectionBody A.body) + ((volume A.body).toReal • projectionBody B.body) := + projectionBody_cartesian_of_brightness A.body B.body A.volume_pos B.volume_pos + (A.brightness_product (by omega) (by omega) B) + +theorem normalizedProjectionVolume_product {r s : ℕ} (hr : 2 ≤ r) (hs : 2 ≤ s) + {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] (A : HPolytope r ι) (B : HPolytope s κ) : + normalizedProjectionVolume (cartesianBody A.body B.body) = + normalizedProjectionVolume A.body * normalizedProjectionVolume B.body := + normalized_cartesian_of_projectionBody_eq (by omega) (by omega) A.body B.body + A.compact B.compact A.volume_pos B.volume_pos (projectionBody_product hr hs A B) + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/InnerSequence.lean b/lean/OAI/Geometry/ProjectionVolume/InnerSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7a854fbd1910c27bb8d30416042f4650825ca74 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/InnerSequence.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.ProjectionVolume.FiniteApproximation +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Analysis.Normed.Module.Ball.Pointwise + +namespace OAI + +open Set Metric Filter +open scoped Pointwise Topology + +namespace Paper092 + +noncomputable def inscribedScale (m : ℕ) : ℝ := 1 - 1 / ((m : ℝ) + 2) + +theorem inscribedScale_nonneg (m : ℕ) : 0 ≤ inscribedScale m := by + unfold inscribedScale + apply sub_nonneg.mpr + apply (div_le_one (by positivity : 0 < (m : ℝ) + 2)).mpr + linarith [Nat.cast_nonneg (α := ℝ) m] + +theorem inscribedScale_lt_one (m : ℕ) : inscribedScale m < 1 := by + unfold inscribedScale + exact sub_lt_self _ (by positivity) + +theorem exists_increasing_inscribed_finsets {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (hv : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) : + ∃ V : ℕ → Finset (Euclidean n), + Monotone (fun m => convexHull ℝ (V m : Set (Euclidean n))) ∧ + (∀ m, convexHull ℝ (V m : Set (Euclidean n)) ⊆ K) ∧ + (∀ m, inscribedScale m • K ⊆ interior (convexHull ℝ (V m : Set (Euclidean n)))) ∧ + (∀ m, (0 : Euclidean n) ∈ interior (convexHull ℝ (V m : Set (Euclidean n)))) := by + classical + have hex := fun m => exists_inscribed_finset_sandwich hc hv h0 + (inscribedScale_nonneg m) (inscribedScale_lt_one m) + choose t ht htK ht0 using hex + let V : ℕ → Finset (Euclidean n) := fun m => (Finset.range (m + 1)).biUnion t + have htV (i m : ℕ) (hi : i ≤ m) : (t i : Set (Euclidean n)) ⊆ V m := by + intro x hx + exact Finset.mem_biUnion.mpr ⟨i, Finset.mem_range.mpr (by omega), hx⟩ + refine ⟨V, ?_, ?_, ?_, ?_⟩ + · intro i j hij + apply convexHull_mono + intro x hx + obtain ⟨k, hk, hx⟩ := Finset.mem_biUnion.mp hx + exact Finset.mem_biUnion.mpr ⟨k, Finset.mem_range.mpr + ((Finset.mem_range.mp hk).trans_le (by omega)), hx⟩ + · intro m + apply convexHull_min _ hv + intro x hx + obtain ⟨i, _, hx⟩ := Finset.mem_biUnion.mp hx + exact htK i (subset_convexHull ℝ (t i : Set (Euclidean n)) hx) + · intro m + exact (ht m).trans (interior_mono (convexHull_mono (htV m m le_rfl))) + · intro m + exact interior_mono (convexHull_mono (htV m m le_rfl)) (ht0 m) + +theorem add_closedBall_subset_dilate {n : ℕ} {P : Set (Euclidean n)} + (hv : Convex ℝ P) {a ε : ℝ} (ha : 0 < a) (he : 0 ≤ ε) + (hball : closedBall (0 : Euclidean n) a ⊆ P) : + P + closedBall (0 : Euclidean n) ε ⊆ (1 + ε / a) • P := by + have heq : (ε / a) • closedBall (0 : Euclidean n) a = closedBall 0 ε := by + rw [smul_closedBall _ _ ha.le, smul_zero, Real.norm_eq_abs, + abs_of_nonneg (div_nonneg he ha.le), div_mul_cancel₀ _ ha.ne'] + rw [← heq, hv.add_smul zero_le_one (div_nonneg he ha.le), one_smul] + exact add_subset_add subset_rfl (image_mono hball) + +theorem inscribed_thickening {n : ℕ} {K P : Set (Euclidean n)} {R : ℝ} + (hR : ∀ x ∈ K, ‖x‖ ≤ R) (m : ℕ) (hP : inscribedScale m • K ⊆ P) : + K ⊆ P + closedBall (0 : Euclidean n) (R / ((m : ℝ) + 2)) := by + intro x hx + refine ⟨inscribedScale m • x, hP ⟨x, hx, rfl⟩, + (1 / ((m : ℝ) + 2)) • x, ?_, ?_⟩ + · simp only [mem_closedBall, dist_zero_right, norm_smul, Real.norm_eq_abs, + abs_of_nonneg (by positivity : 0 ≤ 1 / ((m : ℝ) + 2))] + calc + 1 / ((m : ℝ) + 2) * ‖x‖ ≤ 1 / ((m : ℝ) + 2) * R := + mul_le_mul_of_nonneg_left (hR x hx) (by positivity) + _ = R / ((m : ℝ) + 2) := by ring + · change inscribedScale m • x + (1 / ((m : ℝ) + 2)) • x = x + rw [← add_smul] + simp [inscribedScale] + +theorem tendsto_approximation_error (R : ℝ) : + Tendsto (fun m : ℕ => R / ((m : ℝ) + 2)) atTop (𝓝 0) := by + simpa only [Function.comp_def, Nat.cast_add, Nat.cast_ofNat] using + (tendsto_const_div_atTop_nhds_zero_nat R).comp (tendsto_add_atTop_nat 2) + +theorem exists_inscribed_polytope_sequence {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (hv : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) : + ∃ (V : ℕ → Finset (Euclidean n)) (a R : ℝ), + 0 < a ∧ 0 < R ∧ K ⊆ closedBall 0 R ∧ + Monotone (fun m => convexHull ℝ (V m : Set (Euclidean n))) ∧ + (∀ m, closedBall (0 : Euclidean n) a ⊆ convexHull ℝ (V m : Set (Euclidean n))) ∧ + (∀ m, convexHull ℝ (V m : Set (Euclidean n)) ⊆ K ∧ + K ⊆ convexHull ℝ (V m : Set (Euclidean n)) + closedBall 0 (R / ((m : ℝ) + 2)) ∧ + convexHull ℝ (V m : Set (Euclidean n)) + closedBall 0 (R / ((m : ℝ) + 2)) ⊆ + (1 + (R / ((m : ℝ) + 2)) / a) • convexHull ℝ (V m : Set (Euclidean n))) ∧ + Tendsto (fun m : ℕ => R / ((m : ℝ) + 2)) atTop (𝓝 0) := by + obtain ⟨V, hmono, hVK, hscale, hzero⟩ := exists_increasing_inscribed_finsets hc hv h0 + obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp (hzero 0)) + obtain ⟨R, hRpos, hR⟩ := hc.isBounded.exists_pos_norm_le + have hball0 : closedBall (0 : Euclidean n) (r / 2) ⊆ convexHull ℝ (V 0 : Set (Euclidean n)) := + (closedBall_subset_ball (by linarith)).trans hball + have hballm : ∀ m, closedBall (0 : Euclidean n) (r / 2) ⊆ + convexHull ℝ (V m : Set (Euclidean n)) := + fun m => hball0.trans (hmono (Nat.zero_le m)) + refine ⟨V, r / 2, R, half_pos hr, hRpos, ?_, hmono, hballm, ?_, + tendsto_approximation_error R⟩ + · intro x hx + simpa only [mem_closedBall, dist_zero_right] using hR x hx + · intro m + exact ⟨hVK m, inscribed_thickening hR m ((hscale m).trans interior_subset), + add_closedBall_subset_dilate (convex_convexHull ℝ _) (half_pos hr) (by positivity) (hballm m)⟩ + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/LinearApproximation.lean b/lean/OAI/Geometry/ProjectionVolume/LinearApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0581090a88881c875ee80fb7aa050c27dd9d24f0 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/LinearApproximation.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.ProjectionVolume.SequenceLimits + +namespace OAI + +open Set Metric Filter +open scoped Pointwise Topology RealInnerProductSpace + +namespace Paper092 + +theorem approximation_linear_image_brightness_uniform {d : ℕ} (hd : 2 ≤ d) + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 1 ≤ scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) + (L : Euclidean d ≃ₗ[ℝ] Euclidean d) : + TendstoUniformlyOn (fun m u => brightness (L '' P m) u) (brightness (L '' K)) + atTop (sphere 0 1) := by + have hLK : IsCompact (L '' K) := hK.image L.toLinearMap.continuous_of_finiteDimensional + obtain ⟨R, hR, hbound⟩ := hLK.isBounded.exists_pos_norm_le + have hball : L '' K ⊆ closedBall 0 R := by + intro x hx + simpa only [mem_closedBall, dist_zero_right] using hbound x hx + apply approximation_brightness_uniform hd + (fun m => (hP m).image L.toLinearMap.continuous_of_finiteDimensional) + hLK hscale hscalelim hR.le hball + · exact fun m => image_mono (hPK m) + · intro m + rw [← image_smul_comm L.toLinearMap (scale m) (P m) + (fun x => L.toLinearMap.map_smul (scale m) x)] + exact image_mono (hKP m) + +theorem approximation_linear_image_support_uniform {d : ℕ} (hd : 2 ≤ d) + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hv : ∀ m, Convex ℝ (P m)) + (hi : ∀ m, (interior (P m)).Nonempty) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 1 ≤ scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) + (L : Euclidean d ≃ₗ[ℝ] Euclidean d) : + TendstoUniformlyOn + (fun m u => SupportGeometry.support (projectionBody (L '' P m)) (innerSL ℝ u)) + (brightness (L '' K)) atTop (sphere 0 1) := by + have hint : ∀ m, (interior (L '' P m)).Nonempty := by + intro m + change (interior (L.toContinuousLinearEquiv.toHomeomorph '' P m)).Nonempty + rw [← Homeomorph.image_interior] + exact (hi m).image _ + have heq : + (fun m u => SupportGeometry.support (projectionBody (L '' P m)) (innerSL ℝ u)) = + (fun m u => brightness (L '' P m) u) := by + funext m u + exact projectionBody_support hd (L '' P m) + ((hP m).image L.toLinearMap.continuous_of_finiteDimensional) + ((hv m).linear_image L.toLinearMap) (hint m) u + rw [heq] + exact approximation_linear_image_brightness_uniform hd hP hK hscale hscalelim hPK hKP L + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Main.lean b/lean/OAI/Geometry/ProjectionVolume/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..8850e61539d099940caa181900a9bb60d02da3df --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Main.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.ProjectionVolume.SimplexCounterexample +import OAI.Geometry.ProjectionVolume.CounterexampleComparison +import OAI.Geometry.ProjectionVolume.PolytopeTheorems +import OAI.Geometry.ProjectionVolume.SupportLimit +import OAI.Geometry.ProjectionVolume.ProjectionInterior +import OAI.Geometry.ProjectionVolume.SimplexProduct +import OAI.Geometry.ProjectionVolume.PolarRepresentation +import OAI.Geometry.ProjectionVolume.CubeBrightness +import OAI.Geometry.ProjectionVolume.PolytopeFaceGeometry +import OAI.Geometry.ProjectionVolume.InnerSequence + +import OAI.Geometry.ProjectionVolume.SequenceLimits +import OAI.Geometry.ProjectionVolume.LinearApproximation +import OAI.Geometry.ProjectionVolume.FacetLinearImage +import OAI.Geometry.ProjectionVolume.PolytopeFacets +import OAI.Geometry.ProjectionVolume.SeparationIdentities +import OAI.Geometry.ProjectionVolume.ProductFacetFamilies +import OAI.Geometry.ProjectionVolume.CubeFibers +import OAI.Geometry.ProjectionVolume.CoordinateDrop +import OAI.Geometry.ProjectionVolume.AreaNormalVectors +import OAI.Geometry.ProjectionVolume.FacetPrism +import OAI.Geometry.ProjectionVolume.AugmentedDeterminant +import OAI.Geometry.ProjectionVolume.ProjectionNullity +import OAI.Geometry.ProjectionVolume.PolytopeIncidence +import OAI.Geometry.ProjectionVolume.FacetBijection +import OAI.Geometry.ProjectionVolume.FacetDimension diff --git a/lean/OAI/Geometry/ProjectionVolume/Model.lean b/lean/OAI/Geometry/ProjectionVolume/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..89078d486b83bfdf754a99bd09937e7a18ede50d --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Model.lean @@ -0,0 +1,49 @@ +import Mathlib + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +noncomputable def simplexConstant (d : ℕ) : ℝ := + (d + 1) * (d : ℝ) ^ d / d.factorial + +abbrev Euclidean (n : ℕ) := EuclideanSpace ℝ (Fin n) + +def normalHyperplane {n : ℕ} (u : Euclidean n) : Submodule ℝ (Euclidean n) := + (Submodule.span ℝ ({u} : Set (Euclidean n)))ᗮ + +def projectionVolume {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : ENNReal := + (volume : Measure (normalHyperplane u)) + ((normalHyperplane u).orthogonalProjectionOnto '' K) + +def brightness {n : ℕ} (K : Set (Euclidean n)) (u : Euclidean n) : ℝ := + ‖u‖ * (projectionVolume K u).toReal + +def projectionBody {n : ℕ} (K : Set (Euclidean n)) : Set (Euclidean n) := + {y | ∀ u, ⟪u, y⟫ ≤ brightness K u} + +def normalizedProjectionVolume {n : ℕ} (K : Set (Euclidean n)) : ℝ := + (volume (projectionBody K)).toReal / (volume K).toReal ^ (n - 1) + +def standardSimplex (n : ℕ) : Set (Euclidean n) := + convexHull ℝ (insert 0 (Set.range fun i : Fin n => EuclideanSpace.single i (1 : ℝ))) + +def firstBlock (x : Euclidean 20) : Euclidean 10 := + WithLp.toLp 2 (fun i : Fin 10 => x (Fin.castAdd 10 i)) + +def secondBlock (x : Euclidean 20) : Euclidean 10 := + WithLp.toLp 2 (fun i : Fin 10 => x (Fin.natAdd 10 i)) + +def productWitness : Set (Euclidean 20) := + {x | firstBlock x ∈ standardSimplex 10 ∧ secondBlock x ∈ standardSimplex 10} + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/OuterApproximation.lean b/lean/OAI/Geometry/ProjectionVolume/OuterApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9de8bd7a9584f83ba439fbada0134a0f8996e548 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/OuterApproximation.lean @@ -0,0 +1,156 @@ +import OAI.Geometry.ProjectionVolume.FiniteApproximation +import OAI.Geometry.ProjectionVolume.PolytopeDefinitions + +namespace OAI + +open Set Metric +open scoped Pointwise RealInnerProductSpace + +namespace Paper092 + +theorem exists_unit_separating_support {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (hne : K.Nonempty) (hv : Convex ℝ K) + {x : Euclidean n} (hx : x ∉ K) : + ∃ u : Euclidean n, ‖u‖ = 1 ∧ + SupportGeometry.support K (innerSL ℝ u) < ⟪u, x⟫ := by + have hx' := (SupportGeometry.mem_iff_inner_le_support hc hne hv).not.mp hx + push Not at hx' + obtain ⟨u, hu⟩ := hx' + have hu0 : u ≠ 0 := by + intro h + have hh := (SupportGeometry.le_support hc (innerSL ℝ u) hne.choose_spec).trans_lt hu + simp [h] at hh + let v := ‖u‖⁻¹ • u + have hv1 : ‖v‖ = 1 := by simp [v, norm_smul, hu0] + obtain ⟨y, hy, hys⟩ := SupportGeometry.exists_support hc hne (innerSL ℝ v) + refine ⟨v, hv1, ?_⟩ + rw [← hys] + change ⟪v, y⟫ < ⟪v, x⟫ + simp only [v, real_inner_smul_left] + exact mul_lt_mul_of_pos_left ((SupportGeometry.le_support hc (innerSL ℝ u) hy).trans_lt hu) + (inv_pos.mpr (norm_pos_iff.mpr hu0)) + +theorem unit_support_pos_of_zero_mem_interior {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (h0 : (0 : Euclidean n) ∈ interior K) + (u : Euclidean n) (hu : ‖u‖ = 1) : + 0 < SupportGeometry.support K (innerSL ℝ u) := by + obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp h0) + have hz : (r / 2) • u ∈ K := by + apply hball + simp only [mem_ball, dist_zero_right, norm_smul, Real.norm_eq_abs, hu, mul_one] + rw [abs_of_pos (half_pos hr)] + linarith + have hh := SupportGeometry.le_support hc (innerSL ℝ u) hz + simp only [innerSL_apply_apply, inner_smul_right, real_inner_self_eq_norm_sq, hu, + one_pow, mul_one] at hh + exact (half_pos hr).trans_le hh + +theorem unit_support_le_of_norm_le {n : ℕ} {K : Set (Euclidean n)} + (hne : K.Nonempty) {R : ℝ} (hR : ∀ x ∈ K, ‖x‖ ≤ R) + (u : Euclidean n) (hu : ‖u‖ = 1) : + SupportGeometry.support K (innerSL ℝ u) ≤ R := by + apply SupportGeometry.support_le hne + intro x hx + exact (real_inner_le_norm u x).trans (by simpa [hu] using hR x hx) + +theorem norm_le_of_basis_inner_le {n : ℕ} {x : Euclidean n} {R : ℝ} + (h : ∀ i : Fin n, |⟪EuclideanSpace.basisFun (Fin n) ℝ i, x⟫| ≤ R) : + ‖x‖ ≤ n * R := by + let b := EuclideanSpace.basisFun (Fin n) ℝ + calc + ‖x‖ = ‖∑ i : Fin n, ⟪b i, x⟫ • b i‖ := by rw [b.sum_repr'] + _ ≤ ∑ i : Fin n, ‖⟪b i, x⟫ • b i‖ := norm_sum_le _ _ + _ = ∑ i : Fin n, |⟪b i, x⟫| := by simp [norm_smul, Real.norm_eq_abs] + _ ≤ ∑ i : Fin n, R := Finset.sum_le_sum (fun i _ => h i) + _ = n * R := by simp + +theorem subset_interior_smul_of_one_lt {n : ℕ} {K : Set (Euclidean n)} + (hv : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) + {r : ℝ} (hr : 1 < r) : K ⊆ interior (r • K) := by + have heq : (AffineMap.homothety (0 : Euclidean n) r : Euclidean n → Euclidean n) = + (fun x => r • x) := by + funext x + simp [AffineMap.homothety_apply, vsub_eq_sub, vadd_eq_add] + change K ⊆ interior ((fun x : Euclidean n => r • x) '' K) + rw [← heq] + exact hv.subset_interior_image_homothety_of_one_lt h0 r hr + +theorem exists_outer_hpolytope_sandwich {n : ℕ} {K : Set (Euclidean n)} + (hc : IsCompact K) (hv : Convex ℝ K) (h0 : (0 : Euclidean n) ∈ interior K) + {r : ℝ} (hr : 1 < r) : + ∃ (F : Finset (Euclidean n)) (P : HPolytope n {u // u ∈ F}), + K ⊆ P.body ∧ P.body ⊆ r • K := by + classical + have hne : K.Nonempty := ⟨0, interior_subset h0⟩ + obtain ⟨R, hRp, hR⟩ := hc.isBounded.exists_pos_norm_le + let b := EuclideanSpace.basisFun (Fin n) ℝ + let U := {u : Euclidean n // ‖u‖ = 1} + let V : U → Set (Euclidean n) := fun u => + {x | SupportGeometry.support K (innerSL ℝ u.val) < ⟪u.val, x⟫} + have hKin := subset_interior_smul_of_one_lt hv h0 hr + have hcover : closedBall (0 : Euclidean n) (n * R) \ interior (r • K) ⊆ ⋃ u : U, V u := by + intro x hx + obtain ⟨u, hu, hsep⟩ := exists_unit_separating_support hc hne hv + (fun hxK => hx.2 (hKin hxK)) + exact mem_iUnion.mpr ⟨⟨u, hu⟩, hsep⟩ + obtain ⟨t, ht⟩ := ((isCompact_closedBall (0 : Euclidean n) (n * R)).diff + isOpen_interior).elim_finite_subcover V + (fun u => isOpen_lt continuous_const (innerSL ℝ u.val).continuous) hcover + let F := t.image Subtype.val ∪ + (Finset.univ.image b ∪ Finset.univ.image (fun i : Fin n => -b i)) + have htF (u : U) (hu : u ∈ t) : u.val ∈ F := + Finset.mem_union_left _ (Finset.mem_image.mpr ⟨u, hu, rfl⟩) + have hpF (i : Fin n) : b i ∈ F := Finset.mem_union_right _ + (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩)) + have hnF (i : Fin n) : -b i ∈ F := Finset.mem_union_right _ + (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨i, Finset.mem_univ i, rfl⟩)) + have hFunit : ∀ u ∈ F, ‖u‖ = 1 := by + intro u hu + rcases Finset.mem_union.mp hu with hu | hu + · obtain ⟨v, _, rfl⟩ := Finset.mem_image.mp hu + exact v.property + · rcases Finset.mem_union.mp hu with hu | hu + · obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hu + exact b.norm_eq_one i + · obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hu + simp + let H : Set (Euclidean n) := {x | ∀ u : {u // u ∈ F}, + ⟪u.val, x⟫ ≤ SupportGeometry.support K (innerSL ℝ u.val)} + have hKH : K ⊆ H := fun x hx u => SupportGeometry.le_support hc (innerSL ℝ u.val) hx + have hHbound : ∀ x ∈ H, ‖x‖ ≤ n * R := by + intro x hx + apply norm_le_of_basis_inner_le + intro i + have hp := (hx ⟨b i, hpF i⟩).trans + (unit_support_le_of_norm_le hne hR (b i) (b.norm_eq_one i)) + have hn := (hx ⟨-b i, hnF i⟩).trans + (unit_support_le_of_norm_le hne hR (-b i) (by simp)) + apply abs_le.mpr + refine ⟨?_, hp⟩ + simpa only [inner_neg_left, neg_le] using hn + have hHr : H ⊆ r • K := by + intro x hx + by_contra hxout + have hxC : x ∈ closedBall (0 : Euclidean n) (n * R) \ interior (r • K) := + ⟨by simpa only [mem_closedBall, dist_zero_right] using hHbound x hx, + fun h => hxout (interior_subset h)⟩ + obtain ⟨u, hut, hux⟩ := mem_iUnion₂.mp (ht hxC) + exact (not_lt_of_ge (hx ⟨u.val, htF u hut⟩)) hux + have hHclosed : IsClosed H := by + dsimp [H] + rw [ofPred_forall] + exact isClosed_iInter fun u => isClosed_le (innerSL ℝ u.val).continuous continuous_const + let P : HPolytope n {u // u ∈ F} := { + normal := Subtype.val + offset := fun u => SupportGeometry.support K (innerSL ℝ u.val) + normal_unit := fun u => hFunit u.val u.property + compact := (hc.smul r).of_isClosed_subset hHclosed hHr + strict_feasible := ⟨0, fun u => by + simpa only [inner_zero_right] using + unit_support_pos_of_zero_mem_interior hc h0 u.val (hFunit u.val u.property)⟩ + distinct := fun i j hij => Subtype.ext (congrArg Prod.fst hij) } + exact ⟨F, P, hKH, hHr⟩ + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolarRepresentation.lean b/lean/OAI/Geometry/ProjectionVolume/PolarRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..61fca2ece76fe4bf873175ad99a72e55e63e085a --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolarRepresentation.lean @@ -0,0 +1,181 @@ +import OAI.Geometry.ProjectionVolume.FiniteVertices +import OAI.Geometry.ProjectionVolume.PolytopeOperations +import OAI.Geometry.ProjectionVolume.SupportGeometry +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.FunProp +import Mathlib.Tactic.Linarith + +namespace OAI + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section +namespace Paper092 + +def halfspacePolar {d : ℕ} (K : Set (Euclidean d)) : Set (Euclidean d) := + {u | ∀ x ∈ K, ⟪u, x⟫ ≤ 1} + +theorem halfspacePolar_convexHull {d : ℕ} (S : Set (Euclidean d)) : + halfspacePolar (convexHull ℝ S) = halfspacePolar S := by + ext u + constructor + · intro h x hx + exact h x (subset_convexHull ℝ S hx) + · intro h x hx + have hc : Convex ℝ {y : Euclidean d | ⟪u, y⟫ ≤ 1} := + (convex_Iic (1 : ℝ)).linear_preimage (innerSL ℝ u).toLinearMap + exact convexHull_min h hc hx + +theorem halfspacePolar_isClosed {d : ℕ} (K : Set (Euclidean d)) : + IsClosed (halfspacePolar K) := by + unfold halfspacePolar + simp only [Set.ofPred_forall] + exact isClosed_iInter fun x => isClosed_iInter fun _ => + isClosed_le (by fun_prop) continuous_const + +theorem halfspacePolar_bipolar {d : ℕ} {K : Set (Euclidean d)} + (hK : IsClosed K) (hc : Convex ℝ K) (h0 : (0 : Euclidean d) ∈ K) : + halfspacePolar (halfspacePolar K) = K := by + ext x + constructor + · intro hx + by_contra hnot + obtain ⟨f, r, hr, hxgt⟩ := geometric_hahn_banach_closed_point hc hK hnot + have hr0 : 0 < r := by simpa using hr 0 h0 + obtain ⟨u, hu⟩ := (InnerProductSpace.toDual ℝ (Euclidean d)).surjective f + have hf (z : Euclidean d) : ⟪u, z⟫ = f z := by + exact congrArg (fun g : StrongDual ℝ (Euclidean d) => g z) hu + have hp : r⁻¹ • u ∈ halfspacePolar K := by + intro z hz + rw [real_inner_smul_left, hf] + have := mul_le_mul_of_nonneg_left (hr z hz).le (inv_nonneg.mpr hr0.le) + simpa [hr0.ne'] using this + have h := hx (r⁻¹ • u) hp + rw [real_inner_smul_right, real_inner_comm u x, hf] at h + have hh := mul_le_mul_of_nonneg_left h hr0.le + have hle : f x ≤ r := by simpa [← mul_assoc, hr0.ne'] using hh + exact (not_le_of_gt hxgt) hle + · intro hx u hu + simpa only [real_inner_comm] using hu x hx + +theorem halfspacePolar_isCompact {d : ℕ} {K : Set (Euclidean d)} + (h0 : (0 : Euclidean d) ∈ interior K) : IsCompact (halfspacePolar K) := by + obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp (mem_interior_iff_mem_nhds.mp h0) + apply Metric.isCompact_iff_isClosed_bounded.mpr + refine ⟨halfspacePolar_isClosed K, isBounded_iff_forall_norm_le.mpr ⟨2 / r, ?_⟩⟩ + intro y hy + by_cases hz : y = 0 + · subst y + simp only [norm_zero] + positivity + have hn : 0 < ‖y‖ := norm_pos_iff.mpr hz + have hx : ((r / 2) / ‖y‖) • y ∈ K := by + apply hball + simp only [Metric.mem_ball, dist_zero_right, norm_smul, Real.norm_eq_abs] + rw [abs_of_pos (div_pos (half_pos hr) hn), div_mul_cancel₀ _ hn.ne'] + linarith + have h := hy _ hx + rw [real_inner_smul_right, real_inner_self_eq_norm_sq] at h + have heq : (r / 2 / ‖y‖) * ‖y‖ ^ 2 = (r / 2) * ‖y‖ := by field_simp + rw [heq] at h + apply (le_div_iff₀ hr).mpr + nlinarith + +theorem finite_polar_has_halfspaces {d : ℕ} (S : Finset (Euclidean d)) + (hc : IsCompact (halfspacePolar (S : Set (Euclidean d)))) : + ∃ (m : ℕ) (P : HPolytope d (Fin m)), P.body = halfspacePolar (S : Set (Euclidean d)) := by + classical + let T := S.filter (fun x => x ≠ 0) + let J := {x // x ∈ T} + have hn (i : J) : 0 < ‖(i : Euclidean d)‖ := + norm_pos_iff.mpr (Finset.mem_filter.mp i.property).2 + have heq : {x : Euclidean d | ∀ i : J, + ⟪‖(i : Euclidean d)‖⁻¹ • (i : Euclidean d), x⟫ ≤ ‖(i : Euclidean d)‖⁻¹} = + halfspacePolar (S : Set (Euclidean d)) := by + ext x + constructor + · intro hx y hy + by_cases hy0 : y = 0 + · simp [hy0] + let i : J := ⟨y, Finset.mem_filter.mpr ⟨hy, hy0⟩⟩ + have h := mul_le_mul_of_nonneg_left (hx i) (hn i).le + rw [real_inner_smul_left] at h + dsimp only [i] at h + simpa only [← mul_assoc, mul_inv_cancel₀ (norm_ne_zero_iff.mpr hy0), one_mul, real_inner_comm] using h + · intro hx i + have h := mul_le_mul_of_nonneg_left (hx i (Finset.mem_filter.mp i.property).1) + (inv_nonneg.mpr (hn i).le) + rw [real_inner_smul_left] + simpa only [mul_one, real_inner_comm] using h + let P : HPolytope d J := { + normal := fun i => ‖(i : Euclidean d)‖⁻¹ • (i : Euclidean d) + offset := fun i => ‖(i : Euclidean d)‖⁻¹ + normal_unit := fun i => by simp [norm_smul, (hn i).ne'] + compact := by rw [heq]; exact hc + strict_feasible := ⟨0, fun i => by simpa using inv_pos.mpr (hn i)⟩ + distinct := by + intro i j h + have hnorm : ‖(i : Euclidean d)‖ = ‖(j : Euclidean d)‖ := + inv_inj.mp (congrArg Prod.snd h) + have hv := congrArg Prod.fst h + apply Subtype.ext + have hs := congrArg (fun v : Euclidean d => ‖(i : Euclidean d)‖ • v) hv + simpa only [smul_smul, ← hnorm, mul_inv_cancel₀ (hn i).ne', one_smul] using hs } + refine ⟨Fintype.card J, P.reindex (Fintype.equivFin J).symm, ?_⟩ + rw [HPolytope.reindex_body] + exact heq + +theorem finite_convex_hull_has_halfspaces_centered {d : ℕ} (S : Finset (Euclidean d)) + (h0 : (0 : Euclidean d) ∈ interior (convexHull ℝ (S : Set (Euclidean d)))) : + ∃ (m : ℕ) (P : HPolytope d (Fin m)), P.body = convexHull ℝ (S : Set (Euclidean d)) := by + have hc : IsCompact (halfspacePolar (S : Set (Euclidean d))) := by + rw [← halfspacePolar_convexHull] + exact halfspacePolar_isCompact h0 + obtain ⟨m, P, hP⟩ := finite_polar_has_halfspaces S hc + obtain ⟨T, hT⟩ := halfspaces_are_finite_convex_hull P + have heq : halfspacePolar (T : Set (Euclidean d)) = convexHull ℝ (S : Set (Euclidean d)) := by + calc + halfspacePolar (T : Set (Euclidean d)) = + halfspacePolar (convexHull ℝ (T : Set (Euclidean d))) := (halfspacePolar_convexHull _).symm + _ = halfspacePolar P.body := by rw [hT] + _ = halfspacePolar (halfspacePolar (S : Set (Euclidean d))) := by rw [hP] + _ = halfspacePolar (halfspacePolar (convexHull ℝ (S : Set (Euclidean d)))) := by + rw [halfspacePolar_convexHull] + _ = convexHull ℝ (S : Set (Euclidean d)) := halfspacePolar_bipolar + (S.finite_toSet.isClosed_convexHull ℝ) (convex_convexHull ℝ _) (interior_subset h0) + obtain ⟨n, Q, hQ⟩ := finite_polar_has_halfspaces T + (by rw [heq]; exact S.finite_toSet.isCompact_convexHull ℝ) + exact ⟨n, Q, hQ.trans heq⟩ + +theorem finite_convex_hull_has_halfspaces {d : ℕ} (S : Finset (Euclidean d)) + (hint : (interior (convexHull ℝ (S : Set (Euclidean d)))).Nonempty) : + ∃ (m : ℕ) (P : HPolytope d (Fin m)), P.body = convexHull ℝ (S : Set (Euclidean d)) := by + classical + obtain ⟨v, hv⟩ := hint + let S₀ : Finset (Euclidean d) := S.image (fun x => x - v) + have hS₀ : convexHull ℝ (S₀ : Set (Euclidean d)) = + (-v) +ᵥ convexHull ℝ (S : Set (Euclidean d)) := by + dsimp [S₀] + rw [Finset.coe_image] + have himage : (fun x : Euclidean d => x - v) '' (S : Set (Euclidean d)) = + (-v) +ᵥ (S : Set (Euclidean d)) := by + change (fun x : Euclidean d => x - v) '' (S : Set (Euclidean d)) = + (fun x => -v + x) '' (S : Set (Euclidean d)) + congr 1 + funext x + abel + rw [himage, convexHull_vadd] + have h0 : (0 : Euclidean d) ∈ interior (convexHull ℝ (S₀ : Set (Euclidean d))) := by + rw [hS₀, interior_vadd] + exact ⟨v, hv, by simp⟩ + obtain ⟨m, P, hP⟩ := finite_convex_hull_has_halfspaces_centered S₀ h0 + refine ⟨m, P.translate v, ?_⟩ + rw [HPolytope.translate_body, hP, hS₀] + simp + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeCauchy.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeCauchy.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b51db9f95b4fd2566c389c04760ea32355563a6 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeCauchy.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.ProjectionVolume.PolytopeFront +import OAI.Geometry.ProjectionVolume.Brightness +import OAI.Geometry.ProjectionVolume.ProjectionReconstruction + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem velocity_neg (u : Euclidean d) (i : ι) : + P.velocity (-u) i = -P.velocity u i := by simp [velocity] + +private theorem brightness_eq_filtered_sum (u : Euclidean d) (hu : u ≠ 0) : + brightness P.body u = + ∑ i, if P.velocity u i < 0 then P.faceArea i * |⟪u, P.normal i⟫| else 0 := by + classical + rw [P.brightness_eq_front_sum u hu] + simp only [face_brightness] + rw [← Finset.sum_filter] + exact (Finset.sum_subtype (Finset.univ.filter (fun i => P.velocity u i < 0)) + (by simp) (fun i => P.faceArea i * |⟪u, P.normal i⟫|)).symm + +theorem brightness_eq_sum (u : Euclidean d) : + brightness P.body u = (∑ i, P.faceArea i * |⟪u, P.normal i⟫|) / 2 := by + classical + by_cases hu : u = 0 + · simp [hu, brightness] + have hplus := P.brightness_eq_filtered_sum u hu + have hminus := P.brightness_eq_filtered_sum (-u) (neg_ne_zero.mpr hu) + simp only [brightness_neg, velocity_neg, neg_lt_zero, inner_neg_left, abs_neg] at hminus + have hpoint (i : ι) : + (if P.velocity u i < 0 then P.faceArea i * |⟪u, P.normal i⟫| else 0) + + (if 0 < P.velocity u i then P.faceArea i * |⟪u, P.normal i⟫| else 0) = + P.faceArea i * |⟪u, P.normal i⟫| := by + rcases lt_trichotomy (P.velocity u i) 0 with hi | hi | hi + · simp [hi, not_lt_of_gt hi] + · have hinner : ⟪u, P.normal i⟫ = 0 := by + simpa only [velocity, neg_eq_zero, real_inner_comm] using hi + simp [hi, hinner] + · simp [hi, not_lt_of_gt hi] + have hsum := congrArg (fun f : ι → ℝ => ∑ i, f i) (funext hpoint) + simp only [Finset.sum_add_distrib] at hsum + rw [← hplus, ← hminus] at hsum + linarith + +theorem faceArea_nonneg (i : ι) : 0 ≤ P.faceArea i := ENNReal.toReal_nonneg + +theorem facetZonotope_isCompact : IsCompact P.facetZonotope := by + classical + exact Finset.sum_induction _ IsCompact (fun _ _ ha hb => ha.add hb) + isCompact_singleton (fun _ _ => SupportGeometry.isCompact_segment _ _) + +theorem facetZonotope_nonempty : P.facetZonotope.Nonempty := by + classical + exact Finset.sum_induction _ Set.Nonempty (fun _ _ ha hb => ha.add hb) + (singleton_nonempty 0) (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩) + +theorem facetZonotope_convex : Convex ℝ P.facetZonotope := by + classical + exact Finset.sum_induction _ (Convex ℝ) (fun _ _ ha hb => ha.add hb) + (convex_singleton 0) (fun _ _ => convex_segment _ _) + +theorem facetZonotope_support (u : Euclidean d) : + SupportGeometry.support P.facetZonotope (innerSL ℝ u) = + (∑ i, P.faceArea i * |⟪u, P.normal i⟫|) / 2 := by + classical + unfold facetZonotope + rw [SupportGeometry.support_sum _ _ + (fun _ _ => SupportGeometry.isCompact_segment _ _) + (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩)] + have hseg (i : ι) : SupportGeometry.support + (segment ℝ (-(P.faceArea i / 2) • P.normal i) + ((P.faceArea i / 2) • P.normal i)) (innerSL ℝ u) = + P.faceArea i * |⟪u, P.normal i⟫| / 2 := by + have heq : segment ℝ (-(P.faceArea i / 2) • P.normal i) + ((P.faceArea i / 2) • P.normal i) = + segment ℝ (-(1 / 2 : ℝ) • (P.faceArea i • P.normal i)) + ((1 / 2 : ℝ) • (P.faceArea i • P.normal i)) := by + congr 1 <;> simp only [smul_smul] <;> congr 1 <;> ring + rw [heq, SupportGeometry.support_centered_segment] + change |⟪u, P.faceArea i • P.normal i⟫| / 2 = _ + simp only [real_inner_smul_right, abs_mul, + abs_of_nonneg (P.faceArea_nonneg i)] + simp only [hseg] + exact (Finset.sum_div _ _ _).symm + +theorem projectionBody_eq_facetZonotope : projectionBody P.body = P.facetZonotope := + Paper092.projectionBody_eq_of_brightness_eq_support P.facetZonotope_isCompact + P.facetZonotope_nonempty P.facetZonotope_convex + (fun u => (P.brightness_eq_sum u).trans (P.facetZonotope_support u).symm) + +theorem projectionBody_support (u : Euclidean d) : + SupportGeometry.support (projectionBody P.body) (innerSL ℝ u) = brightness P.body u := by + rw [P.projectionBody_eq_facetZonotope, P.facetZonotope_support, P.brightness_eq_sum] + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeDefinitions.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeDefinitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6d71e1ce3ccd612f7a2f654fc09b301f3261607 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeDefinitions.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.ProjectionVolume.Basic + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section + +namespace Paper092 + +structure HPolytope (d : ℕ) (ι : Type uι) [Fintype ι] where + normal : ι → Euclidean d + offset : ι → ℝ + normal_unit : ∀ i, ‖normal i‖ = 1 + compact : IsCompact {x : Euclidean d | ∀ i, ⟪normal i, x⟫ ≤ offset i} + strict_feasible : ∃ x : Euclidean d, ∀ i, ⟪normal i, x⟫ < offset i + distinct : Function.Injective (fun i => (normal i, offset i)) + +namespace HPolytope + +def body {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) : Set (Euclidean d) := + {x | ∀ i, ⟪P.normal i, x⟫ ≤ P.offset i} + +def face {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) (i : ι) : + Set (Euclidean d) := + {x | x ∈ P.body ∧ ⟪P.normal i, x⟫ = P.offset i} + +def faceArea {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) (i : ι) : ℝ := + (μHE[d - 1] (P.face i)).toReal + +def facetZonotope {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) : + Set (Euclidean d) := + ∑ i, segment ℝ (-(P.faceArea i / 2) • P.normal i) ((P.faceArea i / 2) • P.normal i) + +end HPolytope +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeFaceGeometry.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeFaceGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fe9bf793f054c7750e033b552e2c7aa188e3a80 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeFaceGeometry.lean @@ -0,0 +1,155 @@ +import OAI.Geometry.ProjectionVolume.PolytopeCauchy + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem projected_seam_null_left (u : Euclidean d) (a b : ι) (hab : a ≠ b) + (ha : P.velocity u a < 0) : + volume {y : normalHyperplane u | + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0} = 0 := by + by_cases hb : P.velocity u b < 0 + · exact P.projected_seam_null u a b hab ha hb + let f : normalHyperplane u →ᵃ[ℝ] ℝ := + P.velocity u b • ((P.slackAffine a).comp (normalHyperplane u).subtype.toAffineMap) - + P.velocity u a • ((P.slackAffine b).comp (normalHyperplane u).subtype.toAffineMap) + let S : AffineSubspace ℝ (normalHyperplane u) := + (affineSpan ℝ ({0} : Set ℝ)).comap f + have hmem (y : normalHyperplane u) : y ∈ S ↔ + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0 := by + simp [S, f, slackAffine_apply, smul_eq_mul] + have hproper : S ≠ ⊤ := by + intro htop + obtain ⟨x, hx⟩ := P.strict_feasible + have hq : ∀ i, 0 < P.slack x i := fun i => sub_pos.mpr (hx i) + have hy : (normalHyperplane u).orthogonalProjectionOnto x ∈ S := by + rw [htop] + exact AffineSubspace.mem_top ℝ _ _ + have hz := (hmem _).mp hy + rw [seam_projection_invariant] at hz + have hpos := mul_nonneg (le_of_not_gt hb) (hq a).le + have hneg := mul_neg_of_neg_of_pos ha (hq b) + linarith + have hset : {y : normalHyperplane u | + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0} = S := by + ext y + exact (hmem y).symm + rw [hset] + exact Measure.addHaar_affineSubspace volume S hproper + +theorem face_inter_surface_null (a b : ι) (hab : a ≠ b) : + μHE[d - 1] (P.face a ∩ P.face b) = 0 := by + have ha : P.velocity (P.normal a) a < 0 := by + simp [velocity, P.normal_unit] + have hp : projectionVolume (P.face a ∩ P.face b) (P.normal a) = 0 := by + unfold projectionVolume + apply measure_mono_null _ (P.projected_seam_null_left (P.normal a) a b hab ha) + rintro y ⟨x, hx, rfl⟩ + change P.velocity (P.normal a) b * + P.slack ((normalHyperplane (P.normal a)).orthogonalProjectionOnto x) a - + P.velocity (P.normal a) a * + P.slack ((normalHyperplane (P.normal a)).orthogonalProjectionOnto x) b = 0 + rw [seam_projection_invariant, ((P.mem_face_iff_slack a x).mp hx.1).2, + ((P.mem_face_iff_slack b x).mp hx.2).2] + simp + have hv := Paper092.projectionVolume_of_subset_affine_hyperplane + (P.normal a) (P.normal a) (P.normal_unit a) (P.normal_unit a) + (P.offset a) (P.face a ∩ P.face b) (fun _ hx => hx.1.2) + simp only [real_inner_self_eq_norm_sq, P.normal_unit, one_pow, abs_one, + ENNReal.ofReal_one, one_mul] at hv + exact hv.symm.trans hp + +theorem exists_other_active_of_redundant (i : ι) + (hred : ∀ x : Euclidean d, + (∀ j, j ≠ i → ⟪P.normal j, x⟫ ≤ P.offset j) → ⟪P.normal i, x⟫ ≤ P.offset i) + (x : Euclidean d) (hx : x ∈ P.face i) : + ∃ j, j ≠ i ∧ ⟪P.normal j, x⟫ = P.offset j := by + classical + by_contra! hn + let S : Set (Euclidean d) := ⋂ j : {j : ι // j ≠ i}, + {y | ⟪P.normal j.val, y⟫ < P.offset j.val} + have hopen : IsOpen S := isOpen_iInter_of_finite fun j => + isOpen_lt (innerSL ℝ (P.normal j.val)).continuous continuous_const + have hxS : x ∈ S := by + apply mem_iInter.mpr + intro j + exact lt_of_le_of_ne (hx.1 j.val) (hn j.val j.property) + obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.mp hopen x hxS + have hyball : x + (ε / 2) • P.normal i ∈ Metric.ball x ε := by + rw [Metric.mem_ball, dist_eq_norm] + simp only [add_sub_cancel_left, norm_smul, Real.norm_eq_abs, P.normal_unit, + mul_one, abs_of_pos (div_pos hε (by norm_num : (0 : ℝ) < 2))] + linarith + have hyS := hball hyball + have hy := hred (x + (ε / 2) • P.normal i) (fun j hji => + (mem_iInter.mp hyS ⟨j, hji⟩).le) + rw [inner_add_right, real_inner_smul_right, real_inner_self_eq_norm_sq, + P.normal_unit, one_pow, mul_one, hx.2] at hy + linarith + +theorem redundant_face_surface_null (i : ι) + (hred : ∀ x : Euclidean d, + (∀ j, j ≠ i → ⟪P.normal j, x⟫ ≤ P.offset j) → ⟪P.normal i, x⟫ ≤ P.offset i) : + μHE[d - 1] (P.face i) = 0 := by + classical + apply measure_mono_null (t := ⋃ j : {j : ι // j ≠ i}, P.face i ∩ P.face j.val) + · intro x hx + obtain ⟨j, hji, hj⟩ := P.exists_other_active_of_redundant i hred x hx + exact mem_iUnion.mpr ⟨⟨j, hji⟩, hx, hx.1, hj⟩ + · apply measure_iUnion_null + intro j + exact P.face_inter_surface_null i j.val (Ne.symm j.property) + +theorem redundant_faceArea_zero (i : ι) + (hred : ∀ x : Euclidean d, + (∀ j, j ≠ i → ⟪P.normal j, x⟫ ≤ P.offset j) → ⟪P.normal i, x⟫ ≤ P.offset i) : + P.faceArea i = 0 := by + rw [faceArea, P.redundant_face_surface_null i hred, ENNReal.toReal_zero] + +theorem exists_strict_face_point_of_essential (i : ι) + (hessential : ¬ ∀ x : Euclidean d, + (∀ j, j ≠ i → ⟪P.normal j, x⟫ ≤ P.offset j) → ⟪P.normal i, x⟫ ≤ P.offset i) : + ∃ x ∈ P.face i, ∀ j, j ≠ i → ⟪P.normal j, x⟫ < P.offset j := by + classical + push Not at hessential + obtain ⟨y, hy, hyi⟩ := hessential + obtain ⟨z, hz⟩ := P.strict_feasible + have hden : 0 < ⟪P.normal i, y⟫ - ⟪P.normal i, z⟫ := by linarith [hz i] + let t : ℝ := (P.offset i - ⟪P.normal i, z⟫) / + (⟪P.normal i, y⟫ - ⟪P.normal i, z⟫) + have ht0 : 0 < t := div_pos (sub_pos.mpr (hz i)) hden + have ht1 : t < 1 := (div_lt_one hden).mpr (by linarith) + have htmul : t * (⟪P.normal i, y⟫ - ⟪P.normal i, z⟫) = + P.offset i - ⟪P.normal i, z⟫ := div_mul_cancel₀ _ hden.ne' + let x := (1 - t) • z + t • y + have hxi : ⟪P.normal i, x⟫ = P.offset i := by + dsimp [x] + simp only [inner_add_right, real_inner_smul_right] + nlinarith + have hxj : ∀ j, j ≠ i → ⟪P.normal j, x⟫ < P.offset j := by + intro j hji + have hleft := mul_lt_mul_of_pos_left (hz j) (sub_pos.mpr ht1) + have hright := mul_le_mul_of_nonneg_left (hy j hji) ht0.le + dsimp [x] + simp only [inner_add_right, real_inner_smul_right] + nlinarith + refine ⟨x, ⟨?_, hxi⟩, hxj⟩ + intro j + by_cases hji : j = i + · simpa only [hji, hxi] using le_refl (P.offset i) + · exact (hxj j hji).le + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeFacets.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeFacets.lean new file mode 100644 index 0000000000000000000000000000000000000000..d879ee9ee66b21680f3e63cc49e08ad170767651 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeFacets.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.ProjectionVolume.PolytopeFaceGeometry + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem affineSpan_face_of_essential (i : ι) + (hessential : ¬ ∀ x : Euclidean d, + (∀ j, j ≠ i → ⟪P.normal j, x⟫ ≤ P.offset j) → ⟪P.normal i, x⟫ ≤ P.offset i) : + (affineSpan ℝ (P.face i) : Set (Euclidean d)) = + {y | ⟪P.normal i, y⟫ = P.offset i} := by + classical + let Q : AffineSubspace ℝ (Euclidean d) := + (affineSpan ℝ ({P.offset i} : Set ℝ)).comap (innerₛₗ ℝ (P.normal i)).toAffineMap + have hQ (y : Euclidean d) : y ∈ Q ↔ ⟪P.normal i, y⟫ = P.offset i := by + simp [Q] + have hle : affineSpan ℝ (P.face i) ≤ Q := by + apply affineSpan_le.mpr + intro y hy + exact (hQ y).mpr hy.2 + ext y + constructor + · exact fun hy => (hQ y).mp (hle hy) + · intro hy + change ⟪P.normal i, y⟫ = P.offset i at hy + change y ∈ affineSpan ℝ (P.face i) + obtain ⟨x, hx, hxstrict⟩ := P.exists_strict_face_point_of_essential i hessential + have hxspan : x ∈ affineSpan ℝ (P.face i) := subset_affineSpan ℝ _ hx + by_cases hxy : y = x + · simpa only [hxy] using hxspan + let S : Set (Euclidean d) := ⋂ j : {j : ι // j ≠ i}, + {z | ⟪P.normal j.val, z⟫ < P.offset j.val} + have hopen : IsOpen S := isOpen_iInter_of_finite fun j => + isOpen_lt (innerSL ℝ (P.normal j.val)).continuous continuous_const + have hxS : x ∈ S := mem_iInter.mpr (fun j => hxstrict j.val j.property) + obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.mp hopen x hxS + have hnorm : 0 < ‖y - x‖ := norm_pos_iff.mpr (sub_ne_zero.mpr hxy) + let t : ℝ := ε / (2 * ‖y - x‖) + have ht : 0 < t := div_pos hε (mul_pos (by norm_num) hnorm) + let z := x + t • (y - x) + have hzball : z ∈ Metric.ball x ε := by + rw [Metric.mem_ball, dist_eq_norm] + change ‖x + t • (y - x) - x‖ < ε + rw [add_sub_cancel_left, norm_smul, Real.norm_eq_abs, abs_of_pos ht] + dsimp [t] + have heq : ε / (2 * ‖y - x‖) * ‖y - x‖ = ε / 2 := by field_simp + rw [heq] + linarith + have hzS := hball hzball + have hzi : ⟪P.normal i, z⟫ = P.offset i := by + dsimp [z] + simp only [inner_add_right, real_inner_smul_right, inner_sub_right, hy, hx.2, + sub_self, mul_zero, add_zero] + have hzface : z ∈ P.face i := by + refine ⟨?_, hzi⟩ + intro j + by_cases hji : j = i + · simpa only [hji, hzi] using le_refl (P.offset i) + · exact (mem_iInter.mp hzS ⟨j, hji⟩).le + have hzspan := subset_affineSpan ℝ (P.face i) hzface + have hmem := (affineSpan ℝ (P.face i)).smul_vsub_vadd_mem t⁻¹ hzspan hxspan hxspan + have heq : t⁻¹ • (z - x) + x = y := by + dsimp [z] + rw [add_sub_cancel_left, smul_smul, inv_mul_cancel₀ ht.ne', one_smul, sub_add_cancel] + simpa only [vsub_eq_sub, vadd_eq_add, heq] using hmem + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeFront.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeFront.lean new file mode 100644 index 0000000000000000000000000000000000000000..f4c76aa37fc82014da3978748e8348ac87c8f68c --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeFront.lean @@ -0,0 +1,263 @@ +import OAI.Geometry.ProjectionVolume.PolytopeDefinitions +import OAI.Geometry.ProjectionVolume.SimplexProjection +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +def slack (x : Euclidean d) (i : ι) : ℝ := P.offset i - ⟪P.normal i, x⟫ + +def velocity (u : Euclidean d) (i : ι) : ℝ := -⟪P.normal i, u⟫ + +theorem slack_add_smul (x u : Euclidean d) (t : ℝ) (i : ι) : + P.slack (x + t • u) i = P.slack x i + t * P.velocity u i := by + simp only [slack, velocity, inner_add_right, real_inner_smul_right] + ring + +theorem mem_body_iff_slack (x : Euclidean d) : + x ∈ P.body ↔ ∀ i, 0 ≤ P.slack x i := by + simp only [body, mem_ofPred_eq, slack, sub_nonneg] + +theorem mem_face_iff_slack (i : ι) (x : Euclidean d) : + x ∈ P.face i ↔ x ∈ P.body ∧ P.slack x i = 0 := by + change (x ∈ P.body ∧ ⟪P.normal i, x⟫ = P.offset i) ↔ _ + constructor + · rintro ⟨hx, hi⟩ + exact ⟨hx, by simp [slack, hi]⟩ + · rintro ⟨hx, hi⟩ + exact ⟨hx, (sub_eq_zero.mp hi).symm⟩ + +theorem body_nonempty : P.body.Nonempty := by + obtain ⟨x, hx⟩ := P.strict_feasible + exact ⟨x, fun i => (hx i).le⟩ + +theorem body_convex : Convex ℝ P.body := by + intro x hx y hy a b ha hb hab i + simp only [inner_add_right, real_inner_smul_right] + calc + a * ⟪P.normal i, x⟫ + b * ⟪P.normal i, y⟫ ≤ + a * P.offset i + b * P.offset i := + add_le_add (mul_le_mul_of_nonneg_left (hx i) ha) + (mul_le_mul_of_nonneg_left (hy i) hb) + _ = (a + b) * P.offset i := by ring + _ = P.offset i := by rw [hab, one_mul] + +theorem velocity_neg_exists (u : Euclidean d) (hu : u ≠ 0) : + ∃ i, P.velocity u i < 0 := by + by_contra! h + obtain ⟨x, hx, hmax⟩ := P.compact.exists_isMaxOn P.body_nonempty + (innerSL ℝ u).continuous.continuousOn + have hx' : x + u ∈ P.body := by + intro i + have hi := h i + dsimp only [velocity] at hi + simp only [inner_add_right] + linarith [hx i] + have hle := hmax hx' + change ⟪u, x + u⟫ ≤ ⟪u, x⟫ at hle + rw [inner_add_right] at hle + have hpos := real_inner_self_pos.mpr hu + linarith + +theorem exists_front_point (x u : Euclidean d) (hu : u ≠ 0) + (hx : x ∈ P.body) : + ∃ t : ℝ, 0 ≤ t ∧ x + t • u ∈ P.body ∧ + ∃ i, P.velocity u i < 0 ∧ P.slack (x + t • u) i = 0 := by + obtain ⟨t, ht, hq, i, hi, hqi⟩ := Paper092.exists_step_to_boundary + (P.slack x) (P.velocity u) ((P.mem_body_iff_slack x).mp hx) + (P.velocity_neg_exists u hu) + refine ⟨t, ht, ?_, i, hi, ?_⟩ + · exact (P.mem_body_iff_slack _).mpr (fun j => by simpa only [slack_add_smul] using hq j) + · simpa only [slack_add_smul] using hqi + +theorem projection_injective_on_front (u x z : Euclidean d) + (hx : x ∈ P.body) (hz : z ∈ P.body) + (hxf : ∃ i, P.velocity u i < 0 ∧ P.slack x i = 0) + (hzf : ∃ i, P.velocity u i < 0 ∧ P.slack z i = 0) + (hp : (normalHyperplane u).orthogonalProjectionOnto x = + (normalHyperplane u).orthogonalProjectionOnto z) : x = z := by + obtain ⟨t, rfl⟩ := (Paper092.projection_eq_iff_parallel u x z).mp hp + obtain ⟨a, ha, hxa⟩ := hxf + obtain ⟨b, hb, hzb⟩ := hzf + rw [slack_add_smul] at hxa + have ht0 : 0 ≤ t := by + by_contra ht + have hprod := mul_pos_of_neg_of_neg (lt_of_not_ge ht) ha + have hz' := (P.mem_body_iff_slack z).mp hz a + linarith + have ht1 : t ≤ 0 := by + by_contra ht + have hprod := mul_neg_of_pos_of_neg (lt_of_not_ge ht) hb + have hxb := (P.mem_body_iff_slack _).mp hx b + rw [slack_add_smul, hzb] at hxb + linarith + simp [le_antisymm ht1 ht0] + +theorem projection_eq_front_cover (u : Euclidean d) (hu : u ≠ 0) : + (normalHyperplane u).orthogonalProjectionOnto '' P.body = + ⋃ i : {i : ι // P.velocity u i < 0}, + (normalHyperplane u).orthogonalProjectionOnto '' P.face i.val := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + obtain ⟨t, _, hq, i, hi, hqi⟩ := P.exists_front_point x u hu hx + refine mem_iUnion.mpr ⟨⟨i, hi⟩, x + t • u, ?_, ?_⟩ + · exact (P.mem_face_iff_slack _ _).mpr ⟨hq, hqi⟩ + · exact (Paper092.projection_eq_iff_parallel u (x + t • u) x).mpr ⟨t, rfl⟩ + · intro hy + obtain ⟨i, x, hx, hpx⟩ := mem_iUnion.mp hy + exact ⟨x, hx.1, hpx⟩ + +theorem front_faces_projection_inter_eq (u : Euclidean d) (a b : ι) + (ha : P.velocity u a < 0) (hb : P.velocity u b < 0) : + ((normalHyperplane u).orthogonalProjectionOnto '' P.face a) ∩ + ((normalHyperplane u).orthogonalProjectionOnto '' P.face b) = + (normalHyperplane u).orthogonalProjectionOnto '' (P.face a ∩ P.face b) := by + apply le_antisymm + · rintro y ⟨⟨x, hx, hpx⟩, ⟨z, hz, hpz⟩⟩ + have hxa := (P.mem_face_iff_slack _ _).mp hx + have hzb := (P.mem_face_iff_slack _ _).mp hz + have heq : x = z := P.projection_injective_on_front u x z hxa.1 hzb.1 + ⟨a, ha, hxa.2⟩ ⟨b, hb, hzb.2⟩ (hpx.trans hpz.symm) + subst z + exact ⟨x, ⟨hx, hz⟩, hpx⟩ + · exact image_inter_subset _ _ _ + +def slackAffine (i : ι) : Euclidean d →ᵃ[ℝ] ℝ := + AffineMap.const ℝ (Euclidean d) (P.offset i) - (innerₛₗ ℝ (P.normal i)).toAffineMap + +theorem slackAffine_apply (i : ι) (x : Euclidean d) : P.slackAffine i x = P.slack x i := rfl + +theorem seam_projection_invariant (u x : Euclidean d) (a b : ι) : + P.velocity u b * P.slack ((normalHyperplane u).orthogonalProjectionOnto x) a - + P.velocity u a * P.slack ((normalHyperplane u).orthogonalProjectionOnto x) b = + P.velocity u b * P.slack x a - P.velocity u a * P.slack x b := by + obtain ⟨t, ht⟩ := (Paper092.projection_eq_iff_parallel u x + ((normalHyperplane u).orthogonalProjectionOnto x)).mp + ((normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self + ((normalHyperplane u).orthogonalProjectionOnto x)).symm + conv_rhs => rw [ht, slack_add_smul, slack_add_smul] + ring + +private theorem index_eq_of_weighted_slack_zero (a b : ι) (r s : ℝ) + (hr : r < 0) (hs : s < 0) + (h : ∀ x, r * P.slack x a - s * P.slack x b = 0) : a = b := by + have h0 := h 0 + simp only [slack, inner_zero_right, sub_zero] at h0 + have hn : r • P.normal a = s • P.normal b := by + apply ext_inner_right ℝ + intro x + simp only [real_inner_smul_left] + have hx := h x + dsimp only [slack] at hx + nlinarith + have hnorm := congrArg norm hn + simp only [norm_smul, Real.norm_eq_abs, P.normal_unit, mul_one, + abs_of_neg hr, abs_of_neg hs] at hnorm + have hrs : r = s := by linarith + rw [hrs] at hn h0 + have hn' : P.normal a = P.normal b := + smul_right_injective (Euclidean d) (ne_of_lt hs) hn + have hc : P.offset a = P.offset b := + mul_left_cancel₀ (ne_of_lt hs) (sub_eq_zero.mp h0) + exact P.distinct (Prod.ext hn' hc) + +theorem projected_seam_null (u : Euclidean d) (a b : ι) (hab : a ≠ b) + (ha : P.velocity u a < 0) (hb : P.velocity u b < 0) : + volume {y : normalHyperplane u | + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0} = 0 := by + let f : normalHyperplane u →ᵃ[ℝ] ℝ := + P.velocity u b • ((P.slackAffine a).comp (normalHyperplane u).subtype.toAffineMap) - + P.velocity u a • ((P.slackAffine b).comp (normalHyperplane u).subtype.toAffineMap) + let S : AffineSubspace ℝ (normalHyperplane u) := + (affineSpan ℝ ({0} : Set ℝ)).comap f + have hmem (y : normalHyperplane u) : y ∈ S ↔ + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0 := by + simp [S, f, slackAffine_apply, smul_eq_mul] + have hproper : S ≠ ⊤ := by + intro htop + apply hab + apply P.index_eq_of_weighted_slack_zero a b (P.velocity u b) (P.velocity u a) hb ha + intro x + have hy : (normalHyperplane u).orthogonalProjectionOnto x ∈ S := by + rw [htop] + exact AffineSubspace.mem_top ℝ _ _ + have hz := (hmem _).mp hy + rwa [seam_projection_invariant] at hz + have hset : {y : normalHyperplane u | + P.velocity u b * P.slack y.val a - P.velocity u a * P.slack y.val b = 0} = S := by + ext y + exact (hmem y).symm + rw [hset] + exact Measure.addHaar_affineSubspace volume S hproper + +theorem projected_front_faces_aedisjoint (u : Euclidean d) (a b : ι) (hab : a ≠ b) + (ha : P.velocity u a < 0) (hb : P.velocity u b < 0) : + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' P.face a) + ((normalHyperplane u).orthogonalProjectionOnto '' P.face b) := by + rw [AEDisjoint, P.front_faces_projection_inter_eq u a b ha hb] + apply measure_mono_null _ (P.projected_seam_null u a b hab ha hb) + rintro y ⟨x, hx, rfl⟩ + change P.velocity u b * P.slack ((normalHyperplane u).orthogonalProjectionOnto x) a - + P.velocity u a * P.slack ((normalHyperplane u).orthogonalProjectionOnto x) b = 0 + rw [seam_projection_invariant, + ((P.mem_face_iff_slack a x).mp hx.1).2, ((P.mem_face_iff_slack b x).mp hx.2).2] + simp + +theorem face_isCompact (i : ι) : IsCompact (P.face i) := + P.compact.inter_right (isClosed_eq (innerSL ℝ (P.normal i)).continuous continuous_const) + +theorem projected_face_isCompact (u : Euclidean d) (i : ι) : + IsCompact ((normalHyperplane u).orthogonalProjectionOnto '' P.face i) := + (P.face_isCompact i).image (normalHyperplane u).orthogonalProjectionOnto.continuous + +theorem projectionVolume_eq_front_sum (u : Euclidean d) (hu : u ≠ 0) : + projectionVolume P.body u = + ∑ i : {i : ι // P.velocity u i < 0}, + volume ((normalHyperplane u).orthogonalProjectionOnto '' P.face i.val) := by + classical + unfold projectionVolume + rw [P.projection_eq_front_cover u hu] + have hd : Pairwise (fun a b : {i : ι // P.velocity u i < 0} => + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' P.face a.val) + ((normalHyperplane u).orthogonalProjectionOnto '' P.face b.val)) := by + intro a b hab + exact P.projected_front_faces_aedisjoint u a.val b.val (Subtype.coe_injective.ne hab) + a.property b.property + rw [measure_iUnion₀ hd (fun i => + (P.projected_face_isCompact u i.val).measurableSet.nullMeasurableSet)] + exact tsum_fintype _ + +theorem brightness_eq_front_sum (u : Euclidean d) (hu : u ≠ 0) : + brightness P.body u = + ∑ i : {i : ι // P.velocity u i < 0}, brightness (P.face i.val) u := by + classical + simp only [brightness] + rw [P.projectionVolume_eq_front_sum u hu, ENNReal.toReal_sum] + · exact Finset.mul_sum _ _ _ + · intro i _ + exact (P.projected_face_isCompact u i.val).measure_lt_top.ne + +theorem face_brightness (i : ι) (u : Euclidean d) : + brightness (P.face i) u = P.faceArea i * |⟪u, P.normal i⟫| := by + have h := Paper092.brightness_of_subset_affine_hyperplane u (P.normal i) + (P.normal_unit i) (P.offset i) (P.face i) (fun _ hx => hx.2) + simpa only [faceArea, mul_comm] using h + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeIncidence.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeIncidence.lean new file mode 100644 index 0000000000000000000000000000000000000000..935b3563223dfc5661a6f7413b87feddc4e11425 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeIncidence.lean @@ -0,0 +1,238 @@ +import OAI.Geometry.ProjectionVolume.PolytopeFacets +import OAI.Geometry.ProjectionVolume.CubeFibers +import Mathlib.Analysis.Convex.Intrinsic +import Mathlib.Analysis.Convex.Measure + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} [Fintype ι] (P : HPolytope d ι) + +theorem projectionVolume_le_surface (S : Set (Euclidean d)) (u : Euclidean d) (hu : u ≠ 0) : + projectionVolume S u ≤ μHE[d - 1] S := by + unfold projectionVolume + rw [← InnerProductSpace.euclideanHausdorffMeasure_eq_volume, + normalHyperplane_finrank u hu] + simp only [Measure.euclideanHausdorffMeasure_def, Measure.smul_apply] + simp only [ENNReal.smul_def, smul_eq_mul] + exact mul_le_mul_right + (hausdorffMeasure_orthogonalProjectionOnto_le (normalHyperplane u) + ((d - 1 : ℕ) : ℝ) S (by positivity)) _ + +theorem projected_face_inter_null (u : Euclidean d) (hu : u ≠ 0) (a b : ι) (hab : a ≠ b) : + volume ((normalHyperplane u).orthogonalProjectionOnto '' (P.face a ∩ P.face b)) = 0 := by + apply le_antisymm _ bot_le + exact (projectionVolume_le_surface (P.face a ∩ P.face b) u hu).trans_eq + (P.face_inter_surface_null a b hab) + +theorem strict_face_point_mem_intrinsicInterior (a : ι) (x : Euclidean d) + (hx : x ∈ P.face a) (hstrict : ∀ b, b ≠ a → ⟪P.normal b, x⟫ < P.offset b) : + x ∈ intrinsicInterior ℝ (P.face a) := by + classical + let Q := affineSpan ℝ (P.face a) + let T : AffineSubspace ℝ (Euclidean d) := + (affineSpan ℝ ({P.offset a} : Set ℝ)).comap (innerₛₗ ℝ (P.normal a)).toAffineMap + have hQle : Q ≤ T := by + apply affineSpan_le.mpr + intro y hy + simpa [T] using hy.2 + have hplane (y : Q) : ⟪P.normal a, (y : Euclidean d)⟫ = P.offset a := by + have h := hQle y.property + simpa [T] using h + let S : Set Q := ⋂ b : {b : ι // b ≠ a}, + {y | ⟪P.normal b.val, (y : Euclidean d)⟫ < P.offset b.val} + have hopen : IsOpen S := isOpen_iInter_of_finite fun b => + isOpen_lt ((innerSL ℝ (P.normal b.val)).continuous.comp continuous_subtype_val) continuous_const + let xQ : Q := ⟨x, subset_affineSpan ℝ _ hx⟩ + have hxS : xQ ∈ S := mem_iInter.mpr (fun b => hstrict b.val b.property) + have hsub : S ⊆ (Subtype.val ⁻¹' P.face a : Set Q) := by + intro y hy + refine ⟨?_, hplane y⟩ + intro b + by_cases hba : b = a + · simpa only [hba, hplane y] using le_refl (P.offset a) + · exact (mem_iInter.mp hy ⟨b, hba⟩).le + apply mem_intrinsicInterior.mpr + refine ⟨xQ, interior_mono hsub ?_, rfl⟩ + simpa only [hopen.interior_eq] using hxS + +def badProjection (u : Euclidean d) : Set (normalHyperplane u) := + ⋃ a : ι, ⋃ b : {b : ι // b ≠ a}, + (normalHyperplane u).orthogonalProjectionOnto '' (P.face a ∩ P.face b.val) + +theorem badProjection_null (u : Euclidean d) (hu : u ≠ 0) : volume (P.badProjection u) = 0 := by + apply measure_iUnion_null + intro a + apply measure_iUnion_null + intro b + exact P.projected_face_inter_null u hu a b.val (Ne.symm b.property) + +theorem strict_of_not_badProjection (u : Euclidean d) (y : normalHyperplane u) + (hy : y ∉ P.badProjection u) (a : ι) (x : Euclidean d) (hx : x ∈ P.face a) + (hproj : (normalHyperplane u).orthogonalProjectionOnto x = y) : + ∀ b, b ≠ a → ⟪P.normal b, x⟫ < P.offset b := by + intro b hba + apply lt_of_le_of_ne (hx.1 b) + intro hbx + apply hy + exact mem_iUnion.mpr ⟨a, mem_iUnion.mpr ⟨⟨b, hba⟩, x, ⟨hx, hx.1, hbx⟩, hproj⟩⟩ + +theorem affineSpan_face_of_not_badProjection (u : Euclidean d) + (y : normalHyperplane u) (hy : y ∉ P.badProjection u) (a : ι) + (ha : y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face a) : + (affineSpan ℝ (P.face a) : Set (Euclidean d)) = + {x | ⟪P.normal a, x⟫ = P.offset a} := by + obtain ⟨x, hx, hxy⟩ := ha + apply P.affineSpan_face_of_essential a + intro hred + obtain ⟨b, hba, hb⟩ := P.exists_other_active_of_redundant a hred x hx + exact (ne_of_lt (P.strict_of_not_badProjection u y hy a x hx hxy b hba)) hb + +theorem parameter_of_projection_eq (u : Euclidean d) (y : normalHyperplane u) + (x : Euclidean d) (hx : (normalHyperplane u).orthogonalProjectionOnto x = y) : + ∃ t : ℝ, x = (y : Euclidean d) + t • u := by + apply (Paper092.projection_eq_iff_parallel u x y).mp + exact hx.trans ((normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self y).symm + +theorem interval_of_opposite_faces (u y : Euclidean d) (a b : ι) (l r : ℝ) + (hla : y + l • u ∈ P.face a) (hrb : y + r • u ∈ P.face b) + (ha : 0 < P.velocity u a) (hb : P.velocity u b < 0) : + lineFiber P.body y u = Icc l r := by + have hl := (P.mem_face_iff_slack a _).mp hla + have hr := (P.mem_face_iff_slack b _).mp hrb + rw [P.slack_add_smul] at hl hr + ext t + change y + t • u ∈ P.body ↔ l ≤ t ∧ t ≤ r + constructor + · intro ht + have hta := (P.mem_body_iff_slack _).mp ht a + have htb := (P.mem_body_iff_slack _).mp ht b + rw [P.slack_add_smul] at hta htb + constructor <;> nlinarith + · rintro ⟨hlt, htr⟩ + apply (P.mem_body_iff_slack _).mpr + intro i + rw [P.slack_add_smul] + by_cases hi : 0 ≤ P.velocity u i + · have hli := (P.mem_body_iff_slack _).mp hl.1 i + rw [P.slack_add_smul] at hli + nlinarith [mul_nonneg (sub_nonneg.mpr hlt) hi] + · have hri := (P.mem_body_iff_slack _).mp hr.1 i + rw [P.slack_add_smul] at hri + nlinarith [mul_nonpos_of_nonneg_of_nonpos (sub_nonneg.mpr htr) (le_of_not_ge hi)] + +theorem two_facet_interiors_outside_bad (u : Euclidean d) (hu : u ≠ 0) + (y : normalHyperplane u) (hy : y ∉ P.badProjection u) + (hyP : y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.body) : + ∃ (a b : ι) (l r : ℝ), a ≠ b ∧ l < r ∧ + lineFiber P.body (y : Euclidean d) u = Icc l r ∧ + (y : Euclidean d) + l • u ∈ intrinsicInterior ℝ (P.face a) ∧ + (y : Euclidean d) + r • u ∈ intrinsicInterior ℝ (P.face b) ∧ + {i | y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face i} = {a, b} ∧ + {i | y ∈ (normalHyperplane u).orthogonalProjectionOnto '' + intrinsicInterior ℝ (P.face i)} = {a, b} := by + classical + obtain ⟨p, hp, hpy⟩ := hyP + obtain ⟨tf, _, hpf, b, hb, hqf⟩ := P.exists_front_point p u hu hp + have hf : p + tf • u ∈ P.face b := (P.mem_face_iff_slack _ _).mpr ⟨hpf, hqf⟩ + have hfp : (normalHyperplane u).orthogonalProjectionOnto (p + tf • u) = y := + ((Paper092.projection_eq_iff_parallel u (p + tf • u) p).mpr ⟨tf, rfl⟩).trans hpy + obtain ⟨r, hrf⟩ := parameter_of_projection_eq u y (p + tf • u) hfp + have hrb : (y : Euclidean d) + r • u ∈ P.face b := by rwa [hrf] at hf + have hrp : (normalHyperplane u).orthogonalProjectionOnto ((y : Euclidean d) + r • u) = y := by + rwa [hrf] at hfp + obtain ⟨tb, _, hpb, a, ha', hqb⟩ := P.exists_front_point p (-u) (neg_ne_zero.mpr hu) hp + have ha : 0 < P.velocity u a := by simpa only [velocity_neg, neg_lt_zero] using ha' + have hback : p + tb • (-u) ∈ P.face a := (P.mem_face_iff_slack _ _).mpr ⟨hpb, hqb⟩ + have hbp : (normalHyperplane u).orthogonalProjectionOnto (p + tb • (-u)) = y := by + have heq : p + tb • (-u) = p + (-tb) • u := by simp + rw [heq] + exact ((Paper092.projection_eq_iff_parallel u (p + (-tb) • u) p).mpr ⟨-tb, rfl⟩).trans hpy + obtain ⟨l, hlb⟩ := parameter_of_projection_eq u y (p + tb • (-u)) hbp + have hla : (y : Euclidean d) + l • u ∈ P.face a := by rwa [hlb] at hback + have hlp : (normalHyperplane u).orthogonalProjectionOnto ((y : Euclidean d) + l • u) = y := by + rwa [hlb] at hbp + have hab : a ≠ b := by intro h; subst b; linarith + have hls := P.strict_of_not_badProjection u y hy a _ hla hlp + have hrs := P.strict_of_not_badProjection u y hy b _ hrb hrp + have hlr : l < r := by + have hpos : 0 < P.slack ((y : Euclidean d) + l • u) b := sub_pos.mpr (hls b hab.symm) + have hzero := ((P.mem_face_iff_slack b _).mp hrb).2 + rw [P.slack_add_smul] at hpos hzero + by_contra h + have hprod := mul_nonneg_of_nonpos_of_nonpos (sub_nonpos.mpr (le_of_not_gt h)) hb.le + nlinarith + have hint := P.interval_of_opposite_faces u y a b l r hla hrb ha hb + have hli := P.strict_face_point_mem_intrinsicInterior a _ hla hls + have hri := P.strict_face_point_mem_intrinsicInterior b _ hrb hrs + have hfaces : {i | y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face i} = {a, b} := by + ext i + change (y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face i) ↔ i = a ∨ i = b + constructor + · rintro ⟨z, hz, hzy⟩ + by_cases hia : i = a + · exact Or.inl hia + by_cases hib : i = b + · exact Or.inr hib + exfalso + obtain ⟨t, hzt⟩ := parameter_of_projection_eq u y z hzy + have ht : t ∈ Icc l r := by + rw [← hint] + change (y : Euclidean d) + t • u ∈ P.body + rw [← hzt] + exact hz.1 + have hzero : P.slack ((y : Euclidean d) + t • u) i = 0 := by + rw [← hzt] + exact ((P.mem_face_iff_slack i z).mp hz).2 + have hlpos : 0 < P.slack ((y : Euclidean d) + l • u) i := sub_pos.mpr (hls i hia) + have hrpos : 0 < P.slack ((y : Euclidean d) + r • u) i := sub_pos.mpr (hrs i hib) + rw [P.slack_add_smul] at hzero hlpos hrpos + by_cases hi : 0 ≤ P.velocity u i + · nlinarith [mul_nonneg (sub_nonneg.mpr ht.1) hi] + · nlinarith [mul_nonpos_of_nonneg_of_nonpos (sub_nonneg.mpr ht.2) (le_of_not_ge hi)] + · rintro (rfl | rfl) + · exact ⟨_, hla, hlp⟩ + · exact ⟨_, hrb, hrp⟩ + refine ⟨a, b, l, r, hab, hlr, hint, hli, hri, hfaces, ?_⟩ + ext i + change (y ∈ (normalHyperplane u).orthogonalProjectionOnto '' intrinsicInterior ℝ (P.face i)) ↔ + i = a ∨ i = b + constructor + · intro hi + have hiface : y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face i := + Set.image_mono intrinsicInterior_subset hi + have hm : i ∈ ({a, b} : Set ι) := hfaces ▸ hiface + simpa only [mem_insert_iff, mem_singleton_iff] using hm + · rintro (rfl | rfl) + · exact ⟨_, hli, hlp⟩ + · exact ⟨_, hri, hrp⟩ + +theorem ae_two_facet_interiors (u : Euclidean d) (hu : u ≠ 0) : + ∀ᵐ y : normalHyperplane u ∂volume, + y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.body → + ∃ (a b : ι) (l r : ℝ), a ≠ b ∧ l < r ∧ + lineFiber P.body (y : Euclidean d) u = Icc l r ∧ + (y : Euclidean d) + l • u ∈ intrinsicInterior ℝ (P.face a) ∧ + (y : Euclidean d) + r • u ∈ intrinsicInterior ℝ (P.face b) ∧ + {i | y ∈ (normalHyperplane u).orthogonalProjectionOnto '' P.face i} = {a, b} ∧ + {i | y ∈ (normalHyperplane u).orthogonalProjectionOnto '' + intrinsicInterior ℝ (P.face i)} = {a, b} := by + have hgood : ∀ᵐ y : normalHyperplane u ∂volume, y ∉ P.badProjection u := by + rw [ae_iff] + simpa only [not_not, Set.ofPred_mem_eq] using P.badProjection_null u hu + filter_upwards [hgood] with y hy + exact P.two_facet_interiors_outside_bad u hu y hy + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeOperations.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeOperations.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef660ba503231f2b5be78ef964620c3e96550ee1 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeOperations.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.ProjectionVolume.PolytopeDefinitions + +namespace OAI + +universe uι uκ + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +noncomputable section +namespace Paper092.HPolytope + +variable {d : ℕ} {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] + +def reindex (P : HPolytope d ι) (e : κ ≃ ι) : HPolytope d κ where + normal i := P.normal (e i) + offset i := P.offset (e i) + normal_unit i := P.normal_unit (e i) + compact := by + convert P.compact using 1 + ext x + constructor + · intro h i + obtain ⟨j, rfl⟩ := e.surjective i + exact h j + · intro h j + exact h (e j) + strict_feasible := by + obtain ⟨x, hx⟩ := P.strict_feasible + exact ⟨x, fun i => hx (e i)⟩ + distinct := fun i j h => e.injective (P.distinct h) + +theorem reindex_body (P : HPolytope d ι) (e : κ ≃ ι) : + (P.reindex e).body = P.body := by + ext x + constructor + · intro h i + obtain ⟨j, rfl⟩ := e.surjective i + exact h j + · intro h j + exact h (e j) + +def translate (P : HPolytope d ι) (v : Euclidean d) : HPolytope d ι where + normal := P.normal + offset i := P.offset i + ⟪P.normal i, v⟫ + normal_unit := P.normal_unit + compact := by + have heq : {x : Euclidean d | ∀ i, ⟪P.normal i, x⟫ ≤ P.offset i + ⟪P.normal i, v⟫} = + (fun x => v + x) '' P.body := by + ext x + constructor + · intro hx + refine ⟨x - v, ?_, by abel_nf⟩ + intro i + have := hx i + simpa only [inner_sub_right, sub_le_iff_le_add] using this + · rintro ⟨x, hx, rfl⟩ i + simpa only [inner_add_right, add_comm] using add_le_add_right (hx i) ⟪P.normal i, v⟫ + rw [heq] + exact P.compact.image (continuous_const.add continuous_id) + strict_feasible := by + obtain ⟨x, hx⟩ := P.strict_feasible + refine ⟨v + x, fun i => ?_⟩ + simpa only [inner_add_right, add_comm] using add_lt_add_right (hx i) ⟪P.normal i, v⟫ + distinct := by + intro i j h + apply P.distinct + have hn := congrArg Prod.fst h + have ho := congrArg Prod.snd h + dsimp at hn ho + exact Prod.ext hn (by simpa only [hn, add_left_inj] using ho) + +theorem translate_body (P : HPolytope d ι) (v : Euclidean d) : + (P.translate v).body = v +ᵥ P.body := by + ext x + constructor + · intro hx + refine ⟨x - v, ?_, by dsimp; abel_nf⟩ + intro i + have h := hx i + change ⟪P.normal i, x⟫ ≤ P.offset i + ⟪P.normal i, v⟫ at h + simpa only [inner_sub_right, sub_le_iff_le_add] using h + · rintro ⟨x, hx, rfl⟩ i + change ⟪P.normal i, v + x⟫ ≤ P.offset i + ⟪P.normal i, v⟫ + simpa only [inner_add_right, add_comm] using add_le_add_right (hx i) ⟪P.normal i, v⟫ + +end Paper092.HPolytope + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PolytopeTheorems.lean b/lean/OAI/Geometry/ProjectionVolume/PolytopeTheorems.lean new file mode 100644 index 0000000000000000000000000000000000000000..b880162bc36de62003eafef1ac8ed98822bb62c2 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PolytopeTheorems.lean @@ -0,0 +1,22 @@ +import OAI.Geometry.ProjectionVolume.PolytopeCauchy + +namespace OAI + +universe uι + +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem polytope_brightness {d : ℕ} (_hd : 2 ≤ d) {ι : Type uι} [Fintype ι] + (P : HPolytope d ι) (u : Euclidean d) : + brightness P.body u = (1 / 2 : ℝ) * ∑ i, P.faceArea i * |⟪P.normal i, u⟫| := by + simpa only [real_inner_comm, div_eq_mul_inv, one_mul, mul_comm] using P.brightness_eq_sum u + +theorem polytope_projectionBody {d : ℕ} (_hd : 2 ≤ d) {ι : Type uι} [Fintype ι] + (P : HPolytope d ι) : projectionBody P.body = P.facetZonotope := + P.projectionBody_eq_facetZonotope + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/PrismVolume.lean b/lean/OAI/Geometry/ProjectionVolume/PrismVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..953e977ab4b05066a491e9937ff0297fbf4ee97a --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/PrismVolume.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.ProjectionVolume.ProductReconstruction +import OAI.Geometry.ProjectionVolume.FacetLinearImage +import OAI.Geometry.ProjectionVolume.SimplexCoordinates +import OAI.Geometry.ProjectionVolume.SimplexVolume + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace Pointwise + +namespace Paper092 + +def orthogonalPrismMap {m n : ℕ} (f : Euclidean m →ₗᵢ[ℝ] Euclidean n) + (v : Euclidean n) : Euclidean (m + 1) →ₗ[ℝ] Euclidean n where + toFun x := f (splitEuclideanProduct m 1 x).1 + ((splitEuclideanProduct m 1 x).2 0) • v + map_add' x y := by simp only [map_add, Prod.fst_add, Prod.snd_add, PiLp.add_apply, add_smul]; abel + map_smul' t x := by + simp only [map_smul, Prod.smul_fst, Prod.smul_snd, PiLp.smul_apply, smul_eq_mul, smul_add, + smul_smul, RingHom.id_apply] + +theorem orthogonalPrismMap_inner {m n : ℕ} (f : Euclidean m →ₗᵢ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) (hf : ∀ x, ⟪v, f x⟫ = 0) + (x y : Euclidean (m + 1)) : + ⟪orthogonalPrismMap f v x, orthogonalPrismMap f v y⟫ = ⟪x, y⟫ := by + have hfv (a : Euclidean m) : ⟪f a, v⟫ = 0 := by rw [real_inner_comm, hf] + have hone (a b : Euclidean 1) : ⟪a, b⟫ = a 0 * b 0 := by + simp [EuclideanSpace.inner_eq_star_dotProduct, dotProduct, mul_comm] + rw [splitEuclideanProduct_inner m 1 x y] + change ⟪f (splitEuclideanProduct m 1 x).1 + ((splitEuclideanProduct m 1 x).2 0) • v, + f (splitEuclideanProduct m 1 y).1 + ((splitEuclideanProduct m 1 y).2 0) • v⟫ = _ + simp only [inner_add_left, inner_add_right, real_inner_smul_left, real_inner_smul_right, + f.inner_map_map, hf, hfv, real_inner_self_eq_norm_sq, hv, one_pow, mul_zero, zero_add, + add_zero, mul_one, hone] + ring + +def orthogonalPrismEmbedding {m n : ℕ} (f : Euclidean m →ₗᵢ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) (hf : ∀ x, ⟪v, f x⟫ = 0) : + Euclidean (m + 1) →ₗᵢ[ℝ] Euclidean n where + toLinearMap := orthogonalPrismMap f v + norm_map' x := by + apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + rw [← real_inner_self_eq_norm_sq, ← real_inner_self_eq_norm_sq] + exact orthogonalPrismMap_inner f v hv hf x x + +theorem mem_standardSimplex_one (x : Euclidean 1) : + x ∈ standardSimplex 1 ↔ 0 ≤ x 0 ∧ x 0 ≤ 1 := by + simp [mem_standardSimplex_iff, Fin.forall_fin_one] + +theorem orthogonalPrismMap_image {m n : ℕ} (f : Euclidean m →ₗᵢ[ℝ] Euclidean n) + (v : Euclidean n) (A : Set (Euclidean m)) : + orthogonalPrismMap f v '' cartesianBody A (standardSimplex 1) = + f '' A + segment ℝ 0 v := by + ext z + constructor + · rintro ⟨x, hx, rfl⟩ + refine ⟨f (splitEuclideanProduct m 1 x).1, ⟨_, hx.1, rfl⟩, + ((splitEuclideanProduct m 1 x).2 0) • v, ?_, rfl⟩ + rw [segment_eq_image] + refine ⟨(splitEuclideanProduct m 1 x).2 0, (mem_standardSimplex_one _).mp hx.2, ?_⟩ + simp + · rintro ⟨a, ⟨x, hx, rfl⟩, b, hb, rfl⟩ + rw [segment_eq_image] at hb + obtain ⟨t, ht, rfl⟩ := hb + let y : Euclidean 1 := WithLp.toLp 2 (fun _ => t) + refine ⟨(splitEuclideanProduct m 1).symm (x, y), ?_, ?_⟩ + · rw [cartesianBody_eq_preimage, Set.mem_preimage, ContinuousLinearEquiv.apply_symm_apply] + exact ⟨hx, (mem_standardSimplex_one y).mpr ht⟩ + · change f (splitEuclideanProduct m 1 ((splitEuclideanProduct m 1).symm (x, y))).1 + + ((splitEuclideanProduct m 1 ((splitEuclideanProduct m 1).symm (x, y))).2 0) • v = _ + simp [y] + +theorem orthogonalPrism_volume {m n : ℕ} (f : Euclidean m →ₗᵢ[ℝ] Euclidean n) + (v : Euclidean n) (hv : ‖v‖ = 1) (hf : ∀ x, ⟪v, f x⟫ = 0) (hdim : m + 1 = n) + (A : Set (Euclidean m)) (hA : MeasurableSet A) : + volume (f '' A + segment ℝ 0 v) = volume A := by + let g := orthogonalPrismEmbedding f v hv hf + have h := g.toLinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume + (cartesianBody A (standardSimplex 1)) + simp only [finrank_euclideanSpace_fin, LinearIsometry.normDet_eq_one, + ENNReal.ofReal_one, one_mul] at h + change μHE[m + 1] (orthogonalPrismMap f v '' cartesianBody A (standardSimplex 1)) = _ at h + rw [orthogonalPrismMap_image, cartesianBody_volume _ _ hA + (standardSimplex_isCompact 1).measurableSet, standardSimplex_volume] at h + norm_num at h + rw [hdim, EuclideanSpace.euclideanHausdorffMeasure_eq_volume] at h + exact h + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductArea.lean b/lean/OAI/Geometry/ProjectionVolume/ProductArea.lean new file mode 100644 index 0000000000000000000000000000000000000000..7de0695decd6ce4a8b18669abddfe666d3eb0d98 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductArea.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.ProjectionVolume.ProductFacetAreas +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace ENNReal Pointwise + +namespace Paper092 + +theorem affineHyperplane_product_area_left {r s : ℕ} (hr : 0 < r) + (v : Euclidean r) (hv : ‖v‖ = 1) (c : ℝ) (F : Set (Euclidean r)) + (hF : IsCompact F) (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) + (B : Set (Euclidean s)) (hB : MeasurableSet B) : + μHE[(r + s - 1 : ℕ)] (splitEuclideanProduct r s ⁻¹' (F ×ˢ B)) = + μHE[(r - 1 : ℕ)] F * volume B := by + have hv0 : v ≠ 0 := by intro h; simp [h] at hv + let H := normalHyperplane v + let T : Set (Euclidean r) := (-c) • v +ᵥ F + have hT : T ⊆ (H : Set (Euclidean r)) := by + rintro x ⟨y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪v, (-c) • v + y⟫ = 0 + simp [inner_add_right, inner_smul_right, hv, hplane y hy] + let b := stdOrthonormalBasis ℝ H + let f : Euclidean (Module.finrank ℝ H) →ₗᵢ[ℝ] Euclidean r := + H.subtypeₗᵢ.comp b.repr.symm.toLinearIsometry + let A : Set (Euclidean (Module.finrank ℝ H)) := f ⁻¹' T + have hTcompact : IsCompact T := hF.image (continuous_const.add continuous_id) + have hA : MeasurableSet A := hTcompact.measurableSet.preimage f.continuous.measurable + have hfimage : f '' A = T := by + apply image_preimage_eq_of_subset + intro y hy + refine ⟨b.repr ⟨y, hT hy⟩, ?_⟩ + change ((b.repr.symm (b.repr ⟨y, hT hy⟩) : H) : Euclidean r) = y + rw [LinearIsometryEquiv.symm_apply_apply] + have hrank : Module.finrank ℝ H = r - 1 := normalHyperplane_finrank v hv0 + have hvolA : volume A = μHE[(r - 1 : ℕ)] F := by + have h := f.toLinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume A + simp only [finrank_euclideanSpace_fin, LinearIsometry.normDet_eq_one, + ENNReal.ofReal_one, one_mul] at h + change μHE[Module.finrank ℝ H] (f '' A) = volume A at h + rw [hfimage] at h + conv_lhs at h => rw [hrank] + change μHE[(r - 1 : ℕ)] ((-c) • v +ᵥ F) = volume A at h + rw [measure_vadd] at h + exact h.symm + have hp := euclideanProductMap_image_area f.toLinearMap + (LinearMap.id : Euclidean s →ₗ[ℝ] Euclidean s) A B hA hB + simp only [LinearMap.id_coe, Set.image_id, LinearIsometry.normDet_eq_one, + LinearMap.normDet_id, one_mul, ENNReal.ofReal_one] at hp + change μHE[Module.finrank ℝ H + s] + (splitEuclideanProduct r s ⁻¹' ((f '' A) ×ˢ B)) = volume A * volume B at hp + rw [hfimage, hvolA] at hp + change μHE[Module.finrank ℝ H + s] + (splitEuclideanProduct r s ⁻¹' (((-c) • v +ᵥ F) ×ˢ B)) = _ at hp + rw [← zero_vadd (Euclidean s) B, splitEuclideanProduct_preimage_vadd, measure_vadd] at hp + have hdim : Module.finrank ℝ H + s = r + s - 1 := by omega + simpa only [hdim, zero_vadd] using hp + +theorem affineHyperplane_product_area_right {r s : ℕ} (hr : 0 < r) + (v : Euclidean r) (hv : ‖v‖ = 1) (c : ℝ) (F : Set (Euclidean r)) + (hF : IsCompact F) (hplane : ∀ x ∈ F, ⟪v, x⟫ = c) + (B : Set (Euclidean s)) (hB : MeasurableSet B) : + μHE[(s + r - 1 : ℕ)] (splitEuclideanProduct s r ⁻¹' (B ×ˢ F)) = + volume B * μHE[(r - 1 : ℕ)] F := by + have hv0 : v ≠ 0 := by intro h; simp [h] at hv + let H := normalHyperplane v + let T : Set (Euclidean r) := (-c) • v +ᵥ F + have hT : T ⊆ (H : Set (Euclidean r)) := by + rintro x ⟨y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪v, (-c) • v + y⟫ = 0 + simp [inner_add_right, inner_smul_right, hv, hplane y hy] + let b := stdOrthonormalBasis ℝ H + let f : Euclidean (Module.finrank ℝ H) →ₗᵢ[ℝ] Euclidean r := + H.subtypeₗᵢ.comp b.repr.symm.toLinearIsometry + let A : Set (Euclidean (Module.finrank ℝ H)) := f ⁻¹' T + have hTcompact : IsCompact T := hF.image (continuous_const.add continuous_id) + have hA : MeasurableSet A := hTcompact.measurableSet.preimage f.continuous.measurable + have hfimage : f '' A = T := by + apply image_preimage_eq_of_subset + intro y hy + refine ⟨b.repr ⟨y, hT hy⟩, ?_⟩ + change ((b.repr.symm (b.repr ⟨y, hT hy⟩) : H) : Euclidean r) = y + rw [LinearIsometryEquiv.symm_apply_apply] + have hrank : Module.finrank ℝ H = r - 1 := normalHyperplane_finrank v hv0 + have hvolA : volume A = μHE[(r - 1 : ℕ)] F := by + have h := f.toLinearMap.euclideanHausdorffMeasure_image_eq_normDet_mul_volume A + simp only [finrank_euclideanSpace_fin, LinearIsometry.normDet_eq_one, + ENNReal.ofReal_one, one_mul] at h + change μHE[Module.finrank ℝ H] (f '' A) = volume A at h + rw [hfimage] at h + conv_lhs at h => rw [hrank] + change μHE[(r - 1 : ℕ)] ((-c) • v +ᵥ F) = volume A at h + rw [measure_vadd] at h + exact h.symm + have hp := euclideanProductMap_image_area + (LinearMap.id : Euclidean s →ₗ[ℝ] Euclidean s) f.toLinearMap B A hB hA + simp only [LinearMap.id_coe, Set.image_id, LinearIsometry.normDet_eq_one, + LinearMap.normDet_id, one_mul, ENNReal.ofReal_one] at hp + change μHE[s + Module.finrank ℝ H] + (splitEuclideanProduct s r ⁻¹' (B ×ˢ (f '' A))) = volume B * volume A at hp + rw [hfimage, hvolA] at hp + change μHE[s + Module.finrank ℝ H] + (splitEuclideanProduct s r ⁻¹' (B ×ˢ ((-c) • v +ᵥ F))) = _ at hp + rw [← zero_vadd (Euclidean s) B, splitEuclideanProduct_preimage_vadd, measure_vadd] at hp + have hdim : s + Module.finrank ℝ H = s + r - 1 := by omega + simpa only [hdim, zero_vadd] using hp + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductBrightness.lean b/lean/OAI/Geometry/ProjectionVolume/ProductBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a6d29f8cc2f13642778083e855efd2b3b948fe2 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductBrightness.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.ProjectionVolume.ProductNormals +import OAI.Geometry.ProjectionVolume.ProductCoefficients +import OAI.Geometry.ProjectionVolume.ProductFacetAreaValues +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem productFacet_brightness (a : ProductFacetIndex) (u : Euclidean 20) : + brightness (productFacet a) u = + |productVelocity u a| / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + have hsqrt : 0 < Real.sqrt (10 : ℝ) := Real.sqrt_pos.mpr (by norm_num) + cases a with + | inl a => + cases a with + | none => + have hn : ‖liftFirst (diagonalUnitNormal 10)‖ = 1 := by + rw [liftFirst_norm] + exact diagonalUnitNormal_norm 10 (by norm_num) + rw [brightness_of_subset_affine_hyperplane u (liftFirst (diagonalUnitNormal 10)) + hn (Real.sqrt 10)⁻¹ _ productFacet_left_diagonal_plane] + rw [show 20 - 1 = 19 by rfl, productFacet_inl_none_area, + ENNReal.toReal_ofReal (by positivity), inner_liftFirst, inner_diagonalUnitNormal] + simp only [productVelocity, simplexVelocity, abs_neg, abs_div, Nat.cast_ofNat, + abs_of_pos hsqrt] + field_simp + | some i => + have hn : ‖liftFirst (EuclideanSpace.single i (1 : ℝ))‖ = 1 := by + rw [liftFirst_norm, coordinate_normal_norm] + rw [brightness_of_subset_affine_hyperplane u (liftFirst (EuclideanSpace.single i 1)) + hn 0 _ (productFacet_left_coordinate_plane i)] + rw [show 20 - 1 = 19 by rfl, productFacet_inl_some_area, + ENNReal.toReal_ofReal (by positivity)] + simp [inner_liftFirst, EuclideanSpace.inner_single_right, productVelocity, + simplexVelocity, div_eq_mul_inv] + | inr a => + cases a with + | none => + have hn : ‖liftSecond (diagonalUnitNormal 10)‖ = 1 := by + rw [liftSecond_norm] + exact diagonalUnitNormal_norm 10 (by norm_num) + rw [brightness_of_subset_affine_hyperplane u (liftSecond (diagonalUnitNormal 10)) + hn (Real.sqrt 10)⁻¹ _ productFacet_right_diagonal_plane] + rw [show 20 - 1 = 19 by rfl, productFacet_inr_none_area, + ENNReal.toReal_ofReal (by positivity), inner_liftSecond, inner_diagonalUnitNormal] + simp only [productVelocity, simplexVelocity, abs_neg, abs_div, Nat.cast_ofNat, + abs_of_pos hsqrt] + field_simp + | some i => + have hn : ‖liftSecond (EuclideanSpace.single i (1 : ℝ))‖ = 1 := by + rw [liftSecond_norm, coordinate_normal_norm] + rw [brightness_of_subset_affine_hyperplane u (liftSecond (EuclideanSpace.single i 1)) + hn 0 _ (productFacet_right_coordinate_plane i)] + rw [show 20 - 1 = 19 by rfl, productFacet_inr_some_area, + ENNReal.toReal_ofReal (by positivity)] + simp [inner_liftSecond, EuclideanSpace.inner_single_right, productVelocity, + simplexVelocity, div_eq_mul_inv] + +theorem productWitness_brightness (u : Euclidean 20) : + brightness productWitness u = + ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i| + + (∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) / + (2 * (Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + by_cases hu : u = 0 + · simp [hu, brightness, firstBlock, secondBlock] + calc + brightness productWitness u = + ∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, + brightness (productFacet a.val) u := by + rw [brightness_product_eq_front_sum u hu, Finset.mul_sum] + rfl + _ = ∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, + -productVelocity u a.val / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + apply Finset.sum_congr rfl + intro a _ + rw [productFacet_brightness, abs_of_neg a.property] + _ = (∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, + -productVelocity u a.val) / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + rw [Finset.sum_div] + _ = ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i| + + (∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) / + (2 * (Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + rw [product_front_coefficient] + ring + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductCoefficients.lean b/lean/OAI/Geometry/ProjectionVolume/ProductCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..859df255f8011d142552e10f4be516b62fdd4b51 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductCoefficients.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.ProjectionVolume.ProductProjection +import OAI.Geometry.ProjectionVolume.ProjectionCoefficients + +namespace OAI + +open scoped BigOperators + +namespace Paper092 + +theorem productVelocity_sum (u : Euclidean 20) : + ∑ a, productVelocity u a = 0 := by + simp only [Fintype.sum_sum_type, productVelocity, simplexVelocity_sum, add_zero] + +theorem product_front_coefficient (u : Euclidean 20) : + (∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, -productVelocity u a.val) = + ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i| + + (∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) / 2 := by + have h := twice_sum_negative_eq_sum_abs (productVelocity u) (productVelocity_sum u) + have habs : (∑ a, |productVelocity u a|) = + (|∑ i, firstBlock u i| + ∑ i, |firstBlock u i|) + + (|∑ i, secondBlock u i| + ∑ i, |secondBlock u i|) := by + simp only [Fintype.sum_sum_type, productVelocity, Fintype.sum_option, simplexVelocity, abs_neg] + rw [habs] at h + linarith + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductCounterexample.lean b/lean/OAI/Geometry/ProjectionVolume/ProductCounterexample.lean new file mode 100644 index 0000000000000000000000000000000000000000..5baf0d43bec69c53a305185b88be6e5ebe305f48 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductCounterexample.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.ProjectionVolume.Arithmetic +import OAI.Geometry.ProjectionVolume.ProductBrightness +import OAI.Geometry.ProjectionVolume.ProductZonotope +import OAI.Geometry.ProjectionVolume.ProjectionReconstruction + +namespace OAI + +open MeasureTheory + +namespace Paper092 + +theorem productWitness_projectionBody : + projectionBody productWitness = productZonotope := by + apply projectionBody_eq_of_brightness_eq_support productZonotope_isCompact + productZonotope_nonempty productZonotope_convex + intro u + rw [productWitness_brightness, productZonotope_support] + +theorem productZonotope_normalized_volume : + (volume productZonotope).toReal / (volume productWitness).toReal ^ 19 = + simplexConstant 10 * simplexConstant 10 := by + rw [productZonotope_volume_real, productWitness_volume_real] + norm_num [simplexConstant, Nat.factorial] + +theorem productWitness_normalizedProjectionVolume : + normalizedProjectionVolume productWitness = simplexConstant 10 * simplexConstant 10 := by + unfold normalizedProjectionVolume + rw [productWitness_projectionBody] + exact productZonotope_normalized_volume + +theorem product_counterexample : + (IsCompact productWitness ∧ Convex ℝ productWitness ∧ + (interior productWitness).Nonempty) ∧ + normalizedProjectionVolume productWitness / simplexConstant 20 = + (121 * (Nat.choose 20 10 : ℝ)) / (21 * (2 : ℝ) ^ 20) ∧ + normalizedProjectionVolume productWitness / simplexConstant 20 = + (22355476 : ℝ) / 22020096 ∧ + 1 < normalizedProjectionVolume productWitness / simplexConstant 20 ∧ + (volume (projectionBody productWitness)).toReal > + simplexConstant 20 * (volume productWitness).toReal ^ 19 := by + have hratio : normalizedProjectionVolume productWitness / simplexConstant 20 = + (22355476 : ℝ) / 22020096 := by + rw [productWitness_normalizedProjectionVolume] + exact dimension_twenty_ratio + have hchoose : normalizedProjectionVolume productWitness / simplexConstant 20 = + (121 * (Nat.choose 20 10 : ℝ)) / (21 * (2 : ℝ) ^ 20) := by + rw [hratio, Nat.choose_eq_factorial_div_factorial (by norm_num : 10 ≤ 20)] + norm_num [Nat.factorial] + have hgt : 1 < normalizedProjectionVolume productWitness / simplexConstant 20 := by + rw [hratio] + norm_num + have hnorm : simplexConstant 20 < normalizedProjectionVolume productWitness := by + rw [productWitness_normalizedProjectionVolume] + exact dimension_twenty_strict + change simplexConstant 20 < + (volume (projectionBody productWitness)).toReal / (volume productWitness).toReal ^ 19 at hnorm + have hvol := (lt_div_iff₀ (pow_pos productWitness_volume_pos 19)).mp hnorm + exact ⟨productWitness_is_convex_body, hchoose, hratio, hgt, hvol⟩ + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductDefinition.lean b/lean/OAI/Geometry/ProjectionVolume/ProductDefinition.lean new file mode 100644 index 0000000000000000000000000000000000000000..d84708ff652ef8127661ec74f2bc1ca2a9e7084a --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductDefinition.lean @@ -0,0 +1,18 @@ +import OAI.Geometry.ProjectionVolume.Basic + +namespace OAI + +noncomputable section + +namespace Paper092 + +def cartesianBody {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) : + Set (Euclidean (r + s)) := + {x | WithLp.toLp 2 (fun i : Fin r => x (Fin.castAdd s i)) ∈ A ∧ + WithLp.toLp 2 (fun i : Fin s => x (Fin.natAdd r i)) ∈ B} + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreaValues.lean b/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreaValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..37b37d6885c2cced8d0c68fe773ea186edb1b8d6 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreaValues.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.ProjectionVolume.ProductFacetAreas +import OAI.Geometry.ProjectionVolume.ProductFacetGeometry + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped ENNReal + +namespace Paper092 + +theorem splitEuclideanProduct_ten_ten : splitEuclideanProduct 10 10 = splitBlocks := rfl + +theorem productFacet_inl_some_area (i : Fin 10) : + μHE[19] (productFacet (.inl (some i))) = + ENNReal.ofReal (1 / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ))) := by + rw [productFacet_inl_eq_preimage, ← splitEuclideanProduct_ten_ten] + rw [simplexProduct_coordinate_facet_area_left 9 10 i] + congr 1 + simp only [one_div, mul_inv_rev] + ring + +theorem productFacet_inr_some_area (i : Fin 10) : + μHE[19] (productFacet (.inr (some i))) = + ENNReal.ofReal (1 / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ))) := by + rw [productFacet_inr_eq_preimage, ← splitEuclideanProduct_ten_ten] + rw [simplexProduct_coordinate_facet_area_right 10 9 i] + congr 1 + simp only [one_div, mul_inv_rev] + +theorem productFacet_inl_none_area : + μHE[19] (productFacet (.inl none)) = + ENNReal.ofReal (Real.sqrt 10 / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ))) := by + rw [productFacet_inl_eq_preimage, ← splitEuclideanProduct_ten_ten] + rw [simplexProduct_diagonal_facet_area_left 9 10] + congr 1 + norm_num only [Nat.cast_ofNat] + simp only [div_eq_mul_inv] + ring + +theorem productFacet_inr_none_area : + μHE[19] (productFacet (.inr none)) = + ENNReal.ofReal (Real.sqrt 10 / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ))) := by + rw [productFacet_inr_eq_preimage, ← splitEuclideanProduct_ten_ten] + rw [simplexProduct_diagonal_facet_area_right 10 9] + congr 1 + norm_num only [Nat.cast_ofNat] + simp only [div_eq_mul_inv] + ring + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreas.lean b/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreas.lean new file mode 100644 index 0000000000000000000000000000000000000000..6213466e27f1d8568837142857919ee8dd52b7f3 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductFacetAreas.lean @@ -0,0 +1,221 @@ +import OAI.Geometry.ProjectionVolume.FacetAreas +import OAI.Geometry.ProjectionVolume.ProductVolumeGeneral +import OAI.Geometry.ProjectionVolume.ProductProjection +import Mathlib.Analysis.InnerProductSpace.ProdL2 + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace ENNReal Pointwise + +namespace Paper092 + +def splitEuclideanProductL2 (r s : ℕ) : + Euclidean (r + s) ≃ₗᵢ[ℝ] WithLp 2 (Euclidean r × Euclidean s) := + (LinearIsometryEquiv.piLpCongrLeft 2 ℝ ℝ + (finSumFinEquiv : Fin r ⊕ Fin s ≃ Fin (r + s)).symm).trans + (PiLp.sumPiLpEquivProdLpPiLp 2 (fun _ : Fin r ⊕ Fin s => ℝ)) + +theorem splitEuclideanProductL2_apply (r s : ℕ) (x : Euclidean (r + s)) : + splitEuclideanProductL2 r s x = WithLp.toLp 2 (splitEuclideanProduct r s x) := rfl + +def euclideanProductMap {r s t u : ℕ} (f : Euclidean r →ₗ[ℝ] Euclidean t) + (g : Euclidean s →ₗ[ℝ] Euclidean u) : + Euclidean (r + s) →ₗ[ℝ] Euclidean (t + u) := + (splitEuclideanProduct t u).symm.toLinearMap.comp + ((f.prodMap g).comp (splitEuclideanProduct r s).toLinearMap) + +theorem euclideanProductMap_apply {r s t u : ℕ} (f : Euclidean r →ₗ[ℝ] Euclidean t) + (g : Euclidean s →ₗ[ℝ] Euclidean u) (x : Euclidean (r + s)) : + euclideanProductMap f g x = (splitEuclideanProduct t u).symm + (f (splitEuclideanProduct r s x).1, g (splitEuclideanProduct r s x).2) := rfl + +theorem splitEuclideanProduct_inner (r s : ℕ) (x y : Euclidean (r + s)) : + ⟪x, y⟫ = ⟪(splitEuclideanProduct r s x).1, (splitEuclideanProduct r s y).1⟫ + + ⟪(splitEuclideanProduct r s x).2, (splitEuclideanProduct r s y).2⟫ := by + symm + exact (splitEuclideanProductL2 r s).inner_map_map x y + +theorem euclideanProductMap_inner {r s t u : ℕ} (f : Euclidean r →ₗ[ℝ] Euclidean t) + (g : Euclidean s →ₗ[ℝ] Euclidean u) (x y : Euclidean (r + s)) : + ⟪euclideanProductMap f g x, euclideanProductMap f g y⟫ = + ⟪f (splitEuclideanProduct r s x).1, f (splitEuclideanProduct r s y).1⟫ + + ⟪g (splitEuclideanProduct r s x).2, g (splitEuclideanProduct r s y).2⟫ := by + rw [splitEuclideanProduct_inner t u] + simp only [euclideanProductMap_apply, ContinuousLinearEquiv.apply_symm_apply] + +def productOrthonormalBasis (r s : ℕ) : + OrthonormalBasis (Fin r ⊕ Fin s) ℝ (Euclidean (r + s)) := + ((EuclideanSpace.basisFun (Fin r) ℝ).prod (EuclideanSpace.basisFun (Fin s) ℝ)).map + (splitEuclideanProductL2 r s).symm + +theorem split_productOrthonormalBasis_inl (r s : ℕ) (i : Fin r) : + splitEuclideanProduct r s (productOrthonormalBasis r s (.inl i)) = + (EuclideanSpace.basisFun (Fin r) ℝ i, 0) := by + have h := (splitEuclideanProductL2 r s).apply_symm_apply + (((EuclideanSpace.basisFun (Fin r) ℝ).prod (EuclideanSpace.basisFun (Fin s) ℝ)) (.inl i)) + simpa only [productOrthonormalBasis, OrthonormalBasis.map_apply, + OrthonormalBasis.prod_apply, Sum.elim_inl, Function.comp_apply, + LinearMap.inl_apply, splitEuclideanProductL2_apply] using congrArg WithLp.ofLp h + +theorem split_productOrthonormalBasis_inr (r s : ℕ) (i : Fin s) : + splitEuclideanProduct r s (productOrthonormalBasis r s (.inr i)) = + (0, EuclideanSpace.basisFun (Fin s) ℝ i) := by + have h := (splitEuclideanProductL2 r s).apply_symm_apply + (((EuclideanSpace.basisFun (Fin r) ℝ).prod (EuclideanSpace.basisFun (Fin s) ℝ)) (.inr i)) + simpa only [productOrthonormalBasis, OrthonormalBasis.map_apply, + OrthonormalBasis.prod_apply, Sum.elim_inr, Function.comp_apply, + LinearMap.inr_apply, splitEuclideanProductL2_apply] using congrArg WithLp.ofLp h + +theorem euclideanProductMap_normDet {r s t u : ℕ} (f : Euclidean r →ₗ[ℝ] Euclidean t) + (g : Euclidean s →ₗ[ℝ] Euclidean u) : + (euclideanProductMap f g).normDet = f.normDet * g.normDet := by + have hgram : Matrix.gram ℝ (fun i => euclideanProductMap f g (productOrthonormalBasis r s i)) = + Matrix.fromBlocks + (Matrix.gram ℝ (fun i => f (EuclideanSpace.basisFun (Fin r) ℝ i))) 0 0 + (Matrix.gram ℝ (fun i => g (EuclideanSpace.basisFun (Fin s) ℝ i))) := by + ext i j + cases i <;> cases j <;> + simp [Matrix.gram_apply, euclideanProductMap_inner, + split_productOrthonormalBasis_inl, split_productOrthonormalBasis_inr] + have h := (euclideanProductMap f g).normDet_sq_eq_det_gram (productOrthonormalBasis r s) + have hf := f.normDet_sq_eq_det_gram (EuclideanSpace.basisFun (Fin r) ℝ) + have hg := g.normDet_sq_eq_det_gram (EuclideanSpace.basisFun (Fin s) ℝ) + simp only [RCLike.ofReal_real_eq_id, id_eq] at h hf hg + rw [hgram, Matrix.det_fromBlocks_zero₂₁, ← hf, ← hg] at h + have hn := (euclideanProductMap f g).normDet_nonneg + have hp := mul_nonneg f.normDet_nonneg g.normDet_nonneg + nlinarith + +theorem euclideanProductMap_image {r s t u : ℕ} (f : Euclidean r →ₗ[ℝ] Euclidean t) + (g : Euclidean s →ₗ[ℝ] Euclidean u) (A : Set (Euclidean r)) (B : Set (Euclidean s)) : + euclideanProductMap f g '' (splitEuclideanProduct r s ⁻¹' (A ×ˢ B)) = + splitEuclideanProduct t u ⁻¹' ((f '' A) ×ˢ (g '' B)) := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + change (splitEuclideanProduct t u (euclideanProductMap f g x)).1 ∈ f '' A ∧ + (splitEuclideanProduct t u (euclideanProductMap f g x)).2 ∈ g '' B + rw [euclideanProductMap_apply, ContinuousLinearEquiv.apply_symm_apply] + exact ⟨⟨_, hx.1, rfl⟩, ⟨_, hx.2, rfl⟩⟩ + · rintro ⟨⟨a, ha, hea⟩, ⟨b, hb, heb⟩⟩ + refine ⟨(splitEuclideanProduct r s).symm (a, b), ?_, ?_⟩ + · simpa only [Set.mem_preimage, ContinuousLinearEquiv.apply_symm_apply, + Set.mem_prod] using And.intro ha hb + · apply (splitEuclideanProduct t u).injective + simp only [euclideanProductMap_apply, ContinuousLinearEquiv.apply_symm_apply, + hea, heb, Prod.mk.eta] + +theorem euclideanProductMap_image_area {r s t u : ℕ} + (f : Euclidean r →ₗ[ℝ] Euclidean t) (g : Euclidean s →ₗ[ℝ] Euclidean u) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (hA : MeasurableSet A) (hB : MeasurableSet B) : + μHE[r + s] (splitEuclideanProduct t u ⁻¹' ((f '' A) ×ˢ (g '' B))) = + ENNReal.ofReal (f.normDet * g.normDet) * (volume A * volume B) := by + have h := (euclideanProductMap f g).euclideanHausdorffMeasure_image_eq_normDet_mul_volume + (splitEuclideanProduct r s ⁻¹' (A ×ˢ B)) + simpa only [finrank_euclideanSpace_fin, euclideanProductMap_image, + euclideanProductMap_normDet, splitEuclideanProduct_volume r s A B hA hB] using h + +theorem splitEuclideanProduct_preimage_vadd {r s : ℕ} + (a : Euclidean r) (b : Euclidean s) (A : Set (Euclidean r)) (B : Set (Euclidean s)) : + splitEuclideanProduct r s ⁻¹' ((a +ᵥ A) ×ˢ (b +ᵥ B)) = + (splitEuclideanProduct r s).symm (a, b) +ᵥ + (splitEuclideanProduct r s ⁻¹' (A ×ˢ B)) := by + ext x + constructor + · rintro ⟨⟨a', ha, hea⟩, ⟨b', hb, heb⟩⟩ + refine ⟨(splitEuclideanProduct r s).symm (a', b'), ?_, ?_⟩ + · simpa only [Set.mem_preimage, ContinuousLinearEquiv.apply_symm_apply, + Set.mem_prod] using And.intro ha hb + · apply (splitEuclideanProduct r s).injective + simp only [vadd_eq_add, map_add, ContinuousLinearEquiv.apply_symm_apply] + exact Prod.ext hea heb + · rintro ⟨y, hy, rfl⟩ + change (splitEuclideanProduct r s ((splitEuclideanProduct r s).symm (a, b) + y)).1 ∈ + a +ᵥ A ∧ + (splitEuclideanProduct r s ((splitEuclideanProduct r s).symm (a, b) + y)).2 ∈ b +ᵥ B + simp only [map_add, ContinuousLinearEquiv.apply_symm_apply, Prod.fst_add, Prod.snd_add] + exact ⟨⟨_, hy.1, rfl⟩, ⟨_, hy.2, rfl⟩⟩ + +theorem simplexFacet_diagonal_eq_vadd (n : ℕ) (i : Fin (n + 1)) : + simplexFacet (n + 1) none = EuclideanSpace.single i (1 : ℝ) +ᵥ + (facetEmbedding n i (-1) '' standardSimplex n) := by + rw [← diagonalFacetChart_image n i] + change diagonalFacetChart n i '' standardSimplex n = + (fun x => EuclideanSpace.single i (1 : ℝ) + x) '' + (facetEmbedding n i (-1) '' standardSimplex n) + rw [image_image] + congr 1 + funext x + exact (diagonalFacetChart_eq n i x).trans (add_comm _ _) + +theorem simplexProduct_coordinate_facet_area_left (r s : ℕ) (i : Fin (r + 1)) : + μHE[r + s] (splitEuclideanProduct (r + 1) s ⁻¹' + (simplexFacet (r + 1) (some i) ×ˢ standardSimplex s)) = + ENNReal.ofReal ((1 / (Nat.factorial r : ℝ)) * (1 / (Nat.factorial s : ℝ))) := by + have h := euclideanProductMap_image_area (facetEmbedding r i 0) + (LinearMap.id : Euclidean s →ₗ[ℝ] Euclidean s) + (standardSimplex r) (standardSimplex s) + (standardSimplex_isCompact r).measurableSet (standardSimplex_isCompact s).measurableSet + simpa only [facetEmbedding_zero_image, LinearMap.id_coe, Set.image_id, + facetEmbedding_normDet_zero, LinearMap.normDet_id, one_mul, ENNReal.ofReal_one, + standardSimplex_volume, ← ENNReal.ofReal_mul (by positivity : 0 ≤ 1 / (Nat.factorial r : ℝ))] + using h + +theorem simplexProduct_coordinate_facet_area_right (r s : ℕ) (i : Fin (s + 1)) : + μHE[r + s] (splitEuclideanProduct r (s + 1) ⁻¹' + (standardSimplex r ×ˢ simplexFacet (s + 1) (some i))) = + ENNReal.ofReal ((1 / (Nat.factorial r : ℝ)) * (1 / (Nat.factorial s : ℝ))) := by + have h := euclideanProductMap_image_area + (LinearMap.id : Euclidean r →ₗ[ℝ] Euclidean r) (facetEmbedding s i 0) + (standardSimplex r) (standardSimplex s) + (standardSimplex_isCompact r).measurableSet (standardSimplex_isCompact s).measurableSet + simpa only [facetEmbedding_zero_image, LinearMap.id_coe, Set.image_id, + facetEmbedding_normDet_zero, LinearMap.normDet_id, one_mul, ENNReal.ofReal_one, + standardSimplex_volume, ← ENNReal.ofReal_mul (by positivity : 0 ≤ 1 / (Nat.factorial r : ℝ))] + using h + +theorem simplexProduct_diagonal_facet_area_left (r s : ℕ) : + μHE[r + s] (splitEuclideanProduct (r + 1) s ⁻¹' + (simplexFacet (r + 1) none ×ˢ standardSimplex s)) = + ENNReal.ofReal (Real.sqrt (r + 1) * + ((1 / (Nat.factorial r : ℝ)) * (1 / (Nat.factorial s : ℝ)))) := by + let i : Fin (r + 1) := Fin.last r + rw [simplexFacet_diagonal_eq_vadd r i] + rw [← zero_vadd (Euclidean s) (standardSimplex s)] + rw [splitEuclideanProduct_preimage_vadd, measure_vadd] + have h := euclideanProductMap_image_area (facetEmbedding r i (-1)) + (LinearMap.id : Euclidean s →ₗ[ℝ] Euclidean s) + (standardSimplex r) (standardSimplex s) + (standardSimplex_isCompact r).measurableSet (standardSimplex_isCompact s).measurableSet + simpa only [LinearMap.id_coe, Set.image_id, facetEmbedding_normDet_neg_one, + LinearMap.normDet_id, mul_one, standardSimplex_volume, + ← ENNReal.ofReal_mul (by positivity : 0 ≤ 1 / (Nat.factorial r : ℝ)), + ← ENNReal.ofReal_mul (Real.sqrt_nonneg _)] using h + +theorem simplexProduct_diagonal_facet_area_right (r s : ℕ) : + μHE[r + s] (splitEuclideanProduct r (s + 1) ⁻¹' + (standardSimplex r ×ˢ simplexFacet (s + 1) none)) = + ENNReal.ofReal (Real.sqrt (s + 1) * + ((1 / (Nat.factorial r : ℝ)) * (1 / (Nat.factorial s : ℝ)))) := by + let i : Fin (s + 1) := Fin.last s + rw [simplexFacet_diagonal_eq_vadd s i] + rw [← zero_vadd (Euclidean r) (standardSimplex r)] + rw [splitEuclideanProduct_preimage_vadd, measure_vadd] + have h := euclideanProductMap_image_area + (LinearMap.id : Euclidean r →ₗ[ℝ] Euclidean r) (facetEmbedding s i (-1)) + (standardSimplex r) (standardSimplex s) + (standardSimplex_isCompact r).measurableSet (standardSimplex_isCompact s).measurableSet + simpa only [LinearMap.id_coe, Set.image_id, facetEmbedding_normDet_neg_one, + LinearMap.normDet_id, one_mul, standardSimplex_volume, + ← ENNReal.ofReal_mul (by positivity : 0 ≤ 1 / (Nat.factorial r : ℝ)), + ← ENNReal.ofReal_mul (Real.sqrt_nonneg _)] using h + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductFacetFamilies.lean b/lean/OAI/Geometry/ProjectionVolume/ProductFacetFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bca88a6a65fe406ecd185d1771bbf48ce65e0d4 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductFacetFamilies.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.ProjectionVolume.ProductFacets +import Mathlib.Analysis.InnerProductSpace.Dual + +namespace OAI + +noncomputable section +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem eq_exposedFace_of_isExposed {n : ℕ} {K F : Set (Euclidean n)} + (hF : IsExposed ℝ K F) (hne : F.Nonempty) : ∃ u, F = exposedFace K u := by + obtain ⟨l, hl⟩ := hF hne + let u := (InnerProductSpace.toDual ℝ (Euclidean n)).symm l + refine ⟨u, ?_⟩ + have hu : innerSL ℝ u = l := by + ext x + change ⟪(InnerProductSpace.toDual ℝ (Euclidean n)).symm l, x⟫ = l x + exact InnerProductSpace.toDual_symm_apply + change F = (innerSL ℝ u).toExposed K + rw [hu] + exact hl + +theorem product_facet_families {r s : ℕ} (hr : 0 < r) (hs : 0 < s) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hA : IsCompact A) (hB : IsCompact B) + (hiA : (interior A).Nonempty) (hiB : (interior B).Nonempty) + (F : Set (Euclidean (r + s))) (hF : IsExposed ℝ (cartesianBody A B) F) + (hne : F.Nonempty) (hdim : Module.finrank ℝ (vectorSpan ℝ F) = r + s - 1) : + (∃ u : Euclidean r, u ≠ 0 ∧ + Module.finrank ℝ (vectorSpan ℝ (exposedFace A u)) = r - 1 ∧ + F = cartesianBody (exposedFace A u) B) ∨ + (∃ v : Euclidean s, v ≠ 0 ∧ + Module.finrank ℝ (vectorSpan ℝ (exposedFace B v)) = s - 1 ∧ + F = cartesianBody A (exposedFace B v)) := by + obtain ⟨w, rfl⟩ := eq_exposedFace_of_isExposed hF hne + rcases exposedFace_product_facet_classification hr hs A B hA hB hiA hiB w hdim with h | h + · exact Or.inl ⟨(splitEuclideanProduct r s w).1, h.1, h.2.2⟩ + · exact Or.inr ⟨(splitEuclideanProduct r s w).2, h.2.1, h.2.2⟩ + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductFacetGeometry.lean b/lean/OAI/Geometry/ProjectionVolume/ProductFacetGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d8a9eccfb5782deb46b3a9559e7da3abe9ac81b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductFacetGeometry.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.ProjectionVolume.ProductProjection + +namespace OAI + +open Set + +namespace Paper092 + +theorem productFacet_inl_eq_preimage (a : Option (Fin 10)) : + productFacet (.inl a) = splitBlocks ⁻¹' (simplexFacet 10 a ×ˢ standardSimplex 10) := by + ext x + change ((firstBlock x ∈ standardSimplex 10 ∧ secondBlock x ∈ standardSimplex 10) ∧ + simplexCoordinates (firstBlock x) a = 0) ↔ + ((firstBlock x ∈ standardSimplex 10 ∧ simplexCoordinates (firstBlock x) a = 0) ∧ + secondBlock x ∈ standardSimplex 10) + exact ⟨fun ⟨⟨hx, hy⟩, ha⟩ => ⟨⟨hx, ha⟩, hy⟩, + fun ⟨⟨hx, ha⟩, hy⟩ => ⟨⟨hx, hy⟩, ha⟩⟩ + +theorem productFacet_inr_eq_preimage (a : Option (Fin 10)) : + productFacet (.inr a) = splitBlocks ⁻¹' (standardSimplex 10 ×ˢ simplexFacet 10 a) := by + ext x + change ((firstBlock x ∈ standardSimplex 10 ∧ secondBlock x ∈ standardSimplex 10) ∧ + simplexCoordinates (secondBlock x) a = 0) ↔ + (firstBlock x ∈ standardSimplex 10 ∧ + (secondBlock x ∈ standardSimplex 10 ∧ simplexCoordinates (secondBlock x) a = 0)) + exact and_assoc + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductFacets.lean b/lean/OAI/Geometry/ProjectionVolume/ProductFacets.lean new file mode 100644 index 0000000000000000000000000000000000000000..17e614dd0a8e3e90d0dfa902569252ed0f6a340b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductFacets.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.ProjectionVolume.ExposedProduct +import OAI.Geometry.ProjectionVolume.ExposedBounds + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem vectorSpan_finrank_of_interior_nonempty {n : ℕ} (K : Set (Euclidean n)) + (hint : (interior K).Nonempty) : Module.finrank ℝ (vectorSpan ℝ K) = n := by + have hspan : affineSpan ℝ K = ⊤ := by + have h := affineSpan_mono ℝ (interior_subset (s := K)) + rw [isOpen_interior.affineSpan_eq_top hint] at h + exact top_unique h + rw [← direction_affineSpan, hspan, AffineSubspace.direction_top, + finrank_top, finrank_euclideanSpace_fin] + +theorem exposedFace_product_codimension_two {r s : ℕ} (hr : 0 < r) (hs : 0 < s) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hA : IsCompact A) (hB : IsCompact B) + (hAn : A.Nonempty) (hBn : B.Nonempty) (w : Euclidean (r + s)) + (hu : (splitEuclideanProduct r s w).1 ≠ 0) (hv : (splitEuclideanProduct r s w).2 ≠ 0) : + Module.finrank ℝ (vectorSpan ℝ (exposedFace (cartesianBody A B) w)) ≤ r + s - 2 := by + rw [exposedFace_product, cartesianBody_affine_dimension _ _ + (exposedFace_nonempty A hA hAn _) (exposedFace_nonempty B hB hBn _)] + have ha := exposedFace_finrank_le A hu + have hb := exposedFace_finrank_le B hv + omega + +theorem exposedFace_productLiftLeft {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (u : Euclidean r) : + exposedFace (cartesianBody A B) (productLiftLeft r s u) = cartesianBody (exposedFace A u) B := by + rw [exposedFace_product, split_productLiftLeft, exposedFace_zero] + +theorem exposedFace_productLiftRight {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (v : Euclidean s) : + exposedFace (cartesianBody A B) (productLiftRight r s v) = cartesianBody A (exposedFace B v) := by + rw [exposedFace_product, split_productLiftRight, exposedFace_zero] + +theorem exposedFace_product_facet_classification {r s : ℕ} (hr : 0 < r) (hs : 0 < s) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hA : IsCompact A) (hB : IsCompact B) + (hiA : (interior A).Nonempty) (hiB : (interior B).Nonempty) (w : Euclidean (r + s)) + (hdim : Module.finrank ℝ (vectorSpan ℝ (exposedFace (cartesianBody A B) w)) = r + s - 1) : + ((splitEuclideanProduct r s w).1 ≠ 0 ∧ (splitEuclideanProduct r s w).2 = 0 ∧ + Module.finrank ℝ (vectorSpan ℝ (exposedFace A (splitEuclideanProduct r s w).1)) = r - 1 ∧ + exposedFace (cartesianBody A B) w = cartesianBody + (exposedFace A (splitEuclideanProduct r s w).1) B) ∨ + ((splitEuclideanProduct r s w).1 = 0 ∧ (splitEuclideanProduct r s w).2 ≠ 0 ∧ + Module.finrank ℝ (vectorSpan ℝ (exposedFace B (splitEuclideanProduct r s w).2)) = s - 1 ∧ + exposedFace (cartesianBody A B) w = cartesianBody A + (exposedFace B (splitEuclideanProduct r s w).2)) := by + have hnA : A.Nonempty := hiA.mono interior_subset + have hnB : B.Nonempty := hiB.mono interior_subset + have heq := cartesianBody_affine_dimension + (exposedFace A (splitEuclideanProduct r s w).1) + (exposedFace B (splitEuclideanProduct r s w).2) + (exposedFace_nonempty A hA hnA _) (exposedFace_nonempty B hB hnB _) + rw [← exposedFace_product] at heq + have hArank := vectorSpan_finrank_of_interior_nonempty A hiA + have hBrank := vectorSpan_finrank_of_interior_nonempty B hiB + by_cases hu : (splitEuclideanProduct r s w).1 = 0 + · by_cases hv : (splitEuclideanProduct r s w).2 = 0 + · rw [hu, hv, exposedFace_zero, exposedFace_zero, hArank, hBrank] at heq + omega + · right + refine ⟨hu, hv, ?_, ?_⟩ + · rw [hu, exposedFace_zero, hArank] at heq + omega + · rw [exposedFace_product, hu, exposedFace_zero] + · by_cases hv : (splitEuclideanProduct r s w).2 = 0 + · left + refine ⟨hu, hv, ?_, ?_⟩ + · rw [hv, exposedFace_zero, hBrank] at heq + omega + · rw [exposedFace_product, hv, exposedFace_zero] + · have hcodim := exposedFace_product_codimension_two hr hs A B hA hB hnA hnB w hu hv + omega + +theorem exposedFace_product_facet_left {r s : ℕ} (hr : 0 < r) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hA : IsCompact A) + (hnA : A.Nonempty) (hiB : (interior B).Nonempty) (u : Euclidean r) + (hdim : Module.finrank ℝ (vectorSpan ℝ (exposedFace A u)) = r - 1) : + Module.finrank ℝ (vectorSpan ℝ + (exposedFace (cartesianBody A B) (productLiftLeft r s u))) = r + s - 1 := by + rw [exposedFace_productLiftLeft, cartesianBody_affine_dimension _ _ + (exposedFace_nonempty A hA hnA _) (hiB.mono interior_subset), + hdim, vectorSpan_finrank_of_interior_nonempty B hiB] + omega + +theorem exposedFace_product_facet_right {r s : ℕ} (hs : 0 < s) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hB : IsCompact B) + (hiA : (interior A).Nonempty) (hnB : B.Nonempty) (v : Euclidean s) + (hdim : Module.finrank ℝ (vectorSpan ℝ (exposedFace B v)) = s - 1) : + Module.finrank ℝ (vectorSpan ℝ + (exposedFace (cartesianBody A B) (productLiftRight r s v))) = r + s - 1 := by + rw [exposedFace_productLiftRight, cartesianBody_affine_dimension _ _ + (hiA.mono interior_subset) (exposedFace_nonempty B hB hnB _), + vectorSpan_finrank_of_interior_nonempty A hiA, hdim] + omega + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductNormals.lean b/lean/OAI/Geometry/ProjectionVolume/ProductNormals.lean new file mode 100644 index 0000000000000000000000000000000000000000..c5f3c071e73ebc1fa6d8603cea0cda193be84eed --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductNormals.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.ProjectionVolume.ProductProjection +import OAI.Geometry.ProjectionVolume.SimplexNormals + +namespace OAI + +noncomputable section + +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem inner_splitBlocks (x y : Euclidean 20) : + ⟪x, y⟫ = ⟪firstBlock x, firstBlock y⟫ + ⟪secondBlock x, secondBlock y⟫ := by + simp only [EuclideanSpace.inner_eq_star_dotProduct, dotProduct] + exact Fin.sum_univ_add (fun i : Fin (10 + 10) => y i * star (x i)) + +def liftFirst (x : Euclidean 10) : Euclidean 20 := splitBlocks.symm (x, 0) +def liftSecond (x : Euclidean 10) : Euclidean 20 := splitBlocks.symm (0, x) + +theorem firstBlock_liftFirst (x : Euclidean 10) : firstBlock (liftFirst x) = x := by + change (splitBlocks (splitBlocks.symm (x, 0))).1 = x + simp + +theorem secondBlock_liftFirst (x : Euclidean 10) : secondBlock (liftFirst x) = 0 := by + change (splitBlocks (splitBlocks.symm (x, 0))).2 = 0 + simp + +theorem firstBlock_liftSecond (x : Euclidean 10) : firstBlock (liftSecond x) = 0 := by + change (splitBlocks (splitBlocks.symm (0, x))).1 = 0 + simp + +theorem secondBlock_liftSecond (x : Euclidean 10) : secondBlock (liftSecond x) = x := by + change (splitBlocks (splitBlocks.symm (0, x))).2 = x + simp + +theorem inner_liftFirst (x : Euclidean 20) (y : Euclidean 10) : + ⟪x, liftFirst y⟫ = ⟪firstBlock x, y⟫ := by + rw [inner_splitBlocks, firstBlock_liftFirst, secondBlock_liftFirst, inner_zero_right, add_zero] + +theorem inner_liftSecond (x : Euclidean 20) (y : Euclidean 10) : + ⟪x, liftSecond y⟫ = ⟪secondBlock x, y⟫ := by + rw [inner_splitBlocks, firstBlock_liftSecond, secondBlock_liftSecond, inner_zero_right, zero_add] + +theorem liftFirst_norm (x : Euclidean 10) : ‖liftFirst x‖ = ‖x‖ := by + apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + rw [← real_inner_self_eq_norm_sq, inner_liftFirst, firstBlock_liftFirst, + real_inner_self_eq_norm_sq] + +theorem liftSecond_norm (x : Euclidean 10) : ‖liftSecond x‖ = ‖x‖ := by + apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + rw [← real_inner_self_eq_norm_sq, inner_liftSecond, secondBlock_liftSecond, + real_inner_self_eq_norm_sq] + +theorem productFacet_left_coordinate_plane (i : Fin 10) (x : Euclidean 20) + (hx : x ∈ productFacet (.inl (some i))) : + ⟪liftFirst (EuclideanSpace.single i (1 : ℝ)), x⟫ = 0 := by + rw [real_inner_comm, inner_liftFirst, real_inner_comm] + exact simplexFacet_coordinate_plane i (firstBlock x) ⟨hx.1.1, hx.2⟩ + +theorem productFacet_right_coordinate_plane (i : Fin 10) (x : Euclidean 20) + (hx : x ∈ productFacet (.inr (some i))) : + ⟪liftSecond (EuclideanSpace.single i (1 : ℝ)), x⟫ = 0 := by + rw [real_inner_comm, inner_liftSecond, real_inner_comm] + exact simplexFacet_coordinate_plane i (secondBlock x) ⟨hx.1.2, hx.2⟩ + +theorem productFacet_left_diagonal_plane (x : Euclidean 20) + (hx : x ∈ productFacet (.inl none)) : + ⟪liftFirst (diagonalUnitNormal 10), x⟫ = (Real.sqrt 10)⁻¹ := by + rw [real_inner_comm, inner_liftFirst, real_inner_comm] + exact simplexFacet_diagonal_plane (firstBlock x) ⟨hx.1.1, hx.2⟩ + +theorem productFacet_right_diagonal_plane (x : Euclidean 20) + (hx : x ∈ productFacet (.inr none)) : + ⟪liftSecond (diagonalUnitNormal 10), x⟫ = (Real.sqrt 10)⁻¹ := by + rw [real_inner_comm, inner_liftSecond, real_inner_comm] + exact simplexFacet_diagonal_plane (secondBlock x) ⟨hx.1.2, hx.2⟩ + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductPolytope.lean b/lean/OAI/Geometry/ProjectionVolume/ProductPolytope.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ad94693967c57e990b040cf79ce7092b4824043 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductPolytope.lean @@ -0,0 +1,187 @@ +import OAI.Geometry.ProjectionVolume.PolytopeDefinitions +import OAI.Geometry.ProjectionVolume.ProductDefinition +import OAI.Geometry.ProjectionVolume.ProductFacetAreas +import OAI.Geometry.ProjectionVolume.Brightness + +namespace OAI + +universe uι uκ uα + +noncomputable section +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem cartesianBody_eq_preimage {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) : + cartesianBody A B = splitEuclideanProduct r s ⁻¹' (A ×ˢ B) := rfl + +def productLiftLeft (r s : ℕ) (x : Euclidean r) : Euclidean (r + s) := + (splitEuclideanProduct r s).symm (x, 0) + +def productLiftRight (r s : ℕ) (x : Euclidean s) : Euclidean (r + s) := + (splitEuclideanProduct r s).symm (0, x) + +@[simp] theorem split_productLiftLeft (r s : ℕ) (x : Euclidean r) : + splitEuclideanProduct r s (productLiftLeft r s x) = (x, 0) := + (splitEuclideanProduct r s).apply_symm_apply _ + +@[simp] theorem split_productLiftRight (r s : ℕ) (x : Euclidean s) : + splitEuclideanProduct r s (productLiftRight r s x) = (0, x) := + (splitEuclideanProduct r s).apply_symm_apply _ + +theorem inner_productLiftLeft (r s : ℕ) (x : Euclidean r) (y : Euclidean (r + s)) : + ⟪productLiftLeft r s x, y⟫ = ⟪x, (splitEuclideanProduct r s y).1⟫ := by + rw [splitEuclideanProduct_inner r s, split_productLiftLeft] + simp + +theorem inner_productLiftRight (r s : ℕ) (x : Euclidean s) (y : Euclidean (r + s)) : + ⟪productLiftRight r s x, y⟫ = ⟪x, (splitEuclideanProduct r s y).2⟫ := by + rw [splitEuclideanProduct_inner r s, split_productLiftRight] + simp + +@[simp] theorem productLiftLeft_norm (r s : ℕ) (x : Euclidean r) : + ‖productLiftLeft r s x‖ = ‖x‖ := by + apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + rw [← real_inner_self_eq_norm_sq, inner_productLiftLeft, split_productLiftLeft] + exact real_inner_self_eq_norm_sq _ + +@[simp] theorem productLiftRight_norm (r s : ℕ) (x : Euclidean s) : + ‖productLiftRight r s x‖ = ‖x‖ := by + apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + rw [← real_inner_self_eq_norm_sq, inner_productLiftRight, split_productLiftRight] + exact real_inner_self_eq_norm_sq _ + +theorem cartesianBody_isCompact {r s : ℕ} {A : Set (Euclidean r)} {B : Set (Euclidean s)} + (hA : IsCompact A) (hB : IsCompact B) : IsCompact (cartesianBody A B) := by + rw [cartesianBody_eq_preimage] + exact (splitEuclideanProduct r s).toHomeomorph.isCompact_preimage.mpr (hA.prod hB) + +theorem cartesianBody_convex {r s : ℕ} {A : Set (Euclidean r)} {B : Set (Euclidean s)} + (hA : Convex ℝ A) (hB : Convex ℝ B) : Convex ℝ (cartesianBody A B) := by + rw [cartesianBody_eq_preimage] + exact (hA.prod hB).linear_preimage (splitEuclideanProduct r s).toLinearMap + +theorem cartesianBody_interior_nonempty {r s : ℕ} {A : Set (Euclidean r)} + {B : Set (Euclidean s)} (hA : (interior A).Nonempty) (hB : (interior B).Nonempty) : + (interior (cartesianBody A B)).Nonempty := by + rw [cartesianBody_eq_preimage] + change (interior ((splitEuclideanProduct r s).toHomeomorph ⁻¹' (A ×ˢ B))).Nonempty + rw [← Homeomorph.preimage_interior, interior_prod_eq] + exact (hA.prod hB).preimage (splitEuclideanProduct r s).surjective + +namespace HPolytope + +variable {r s : ℕ} {ι : Type uι} {κ : Type uκ} [Fintype ι] [Fintype κ] + +theorem body_interior_nonempty {d : ℕ} {α : Type uα} [Fintype α] (P : HPolytope d α) : + (interior P.body).Nonempty := by + obtain ⟨x, hx⟩ := P.strict_feasible + let U : Set (Euclidean d) := {y | ∀ i, ⟪P.normal i, y⟫ < P.offset i} + have hU : IsOpen U := by + dsimp [U] + rw [ofPred_forall] + exact isOpen_iInter_of_finite fun i => + isOpen_lt (innerSL ℝ (P.normal i)).continuous continuous_const + have hsub : U ⊆ P.body := fun y hy i => (hy i).le + exact ⟨x, interior_maximal hsub hU hx⟩ + +theorem volume_pos {d : ℕ} {α : Type uα} [Fintype α] (P : HPolytope d α) : + 0 < (volume P.body).toReal := + ENNReal.toReal_pos (ne_of_gt (Measure.measure_pos_of_nonempty_interior volume + P.body_interior_nonempty)) P.compact.measure_lt_top.ne + +def productNormal (A : HPolytope r ι) (B : HPolytope s κ) : ι ⊕ κ → Euclidean (r + s) := + Sum.elim (fun i => productLiftLeft r s (A.normal i)) + (fun i => productLiftRight r s (B.normal i)) + +def productOffset (A : HPolytope r ι) (B : HPolytope s κ) : ι ⊕ κ → ℝ := + Sum.elim A.offset B.offset + +theorem product_halfspaces_eq (A : HPolytope r ι) (B : HPolytope s κ) : + {x | ∀ i, ⟪productNormal A B i, x⟫ ≤ productOffset A B i} = + cartesianBody A.body B.body := by + ext x + simp only [Set.mem_ofPred_eq, Sum.forall, productNormal, productOffset, + Sum.elim_inl, Sum.elim_inr, inner_productLiftLeft, inner_productLiftRight, + cartesianBody_eq_preimage, Set.mem_preimage, Set.mem_prod, body] + +def product (A : HPolytope r ι) (B : HPolytope s κ) : HPolytope (r + s) (ι ⊕ κ) where + normal := productNormal A B + offset := productOffset A B + normal_unit i := by cases i <;> simp [productNormal, A.normal_unit, B.normal_unit] + compact := by + rw [product_halfspaces_eq] + exact cartesianBody_isCompact A.compact B.compact + strict_feasible := by + obtain ⟨a, ha⟩ := A.strict_feasible + obtain ⟨b, hb⟩ := B.strict_feasible + refine ⟨(splitEuclideanProduct r s).symm (a, b), ?_⟩ + intro i + cases i <;> + simp only [productNormal, productOffset, Sum.elim_inl, Sum.elim_inr, + inner_productLiftLeft, inner_productLiftRight, ContinuousLinearEquiv.apply_symm_apply] + · exact ha _ + · exact hb _ + distinct := by + intro i j h + cases i with + | inl i => + cases j with + | inl j => + apply congrArg Sum.inl + apply A.distinct + apply Prod.ext + · have hh := congrArg (fun q => (splitEuclideanProduct r s q.1).1) h + simpa only [productNormal, Sum.elim_inl, split_productLiftLeft] using hh + · simpa only [productOffset, Sum.elim_inl, Sum.elim_inr] using + congrArg (fun q : Euclidean (r + s) × ℝ => q.2) h + | inr j => + have hh := congrArg (fun q => (splitEuclideanProduct r s q.1).1) h + simp only [productNormal, Sum.elim_inl, Sum.elim_inr, + split_productLiftLeft, split_productLiftRight] at hh + have hn := A.normal_unit i + rw [hh, norm_zero] at hn + norm_num at hn + | inr i => + cases j with + | inl j => + have hh := congrArg (fun q => (splitEuclideanProduct r s q.1).2) h + simp only [productNormal, Sum.elim_inl, Sum.elim_inr, + split_productLiftLeft, split_productLiftRight] at hh + have hn := B.normal_unit i + rw [hh, norm_zero] at hn + norm_num at hn + | inr j => + apply congrArg Sum.inr + apply B.distinct + apply Prod.ext + · have hh := congrArg (fun q => (splitEuclideanProduct r s q.1).2) h + simpa only [productNormal, Sum.elim_inr, split_productLiftRight] using hh + · simpa only [productOffset, Sum.elim_inl, Sum.elim_inr] using + congrArg (fun q : Euclidean (r + s) × ℝ => q.2) h + +@[simp] theorem product_body (A : HPolytope r ι) (B : HPolytope s κ) : + (A.product B).body = cartesianBody A.body B.body := product_halfspaces_eq A B + +theorem product_face_inl (A : HPolytope r ι) (B : HPolytope s κ) (i : ι) : + (A.product B).face (.inl i) = cartesianBody (A.face i) B.body := by + ext x + change ((x ∈ (A.product B).body) ∧ ⟪productLiftLeft r s (A.normal i), x⟫ = A.offset i) ↔ _ + rw [product_body, cartesianBody_eq_preimage, inner_productLiftLeft, cartesianBody_eq_preimage] + exact ⟨fun ⟨⟨ha, hb⟩, he⟩ => ⟨⟨ha, he⟩, hb⟩, + fun ⟨⟨ha, he⟩, hb⟩ => ⟨⟨ha, hb⟩, he⟩⟩ + +theorem product_face_inr (A : HPolytope r ι) (B : HPolytope s κ) (i : κ) : + (A.product B).face (.inr i) = cartesianBody A.body (B.face i) := by + ext x + change ((x ∈ (A.product B).body) ∧ ⟪productLiftRight r s (B.normal i), x⟫ = B.offset i) ↔ _ + rw [product_body, cartesianBody_eq_preimage, inner_productLiftRight, cartesianBody_eq_preimage] + exact and_assoc + +end HPolytope +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductProjection.lean b/lean/OAI/Geometry/ProjectionVolume/ProductProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..9365fb798a6fc3ccb398c65c78241a11a1e990d5 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductProjection.lean @@ -0,0 +1,279 @@ +import OAI.Geometry.ProjectionVolume.SimplexProjection + +namespace OAI + +noncomputable section + +open Set MeasureTheory + +namespace Paper092 + +abbrev ProductFacetIndex := Option (Fin 10) ⊕ Option (Fin 10) + +def productCoordinates (x : Euclidean 20) : ProductFacetIndex → ℝ + | .inl a => simplexCoordinates (firstBlock x) a + | .inr a => simplexCoordinates (secondBlock x) a + +def productVelocity (u : Euclidean 20) : ProductFacetIndex → ℝ + | .inl a => simplexVelocity (firstBlock u) a + | .inr a => simplexVelocity (secondBlock u) a + +theorem productCoordinates_add_smul (x u : Euclidean 20) (t : ℝ) (a : ProductFacetIndex) : + productCoordinates (x + t • u) a = productCoordinates x a + t * productVelocity u a := by + cases a with + | inl a => exact simplexCoordinates_add_smul (firstBlock x) (firstBlock u) t a + | inr a => exact simplexCoordinates_add_smul (secondBlock x) (secondBlock u) t a + +theorem mem_productWitness_iff_coordinates (x : Euclidean 20) : + x ∈ productWitness ↔ ∀ a, 0 ≤ productCoordinates x a := by + change (firstBlock x ∈ standardSimplex 10 ∧ secondBlock x ∈ standardSimplex 10) ↔ _ + rw [mem_standardSimplex_iff_coordinates, mem_standardSimplex_iff_coordinates] + constructor + · rintro ⟨h1, h2⟩ a + cases a with + | inl a => exact h1 a + | inr a => exact h2 a + · intro h + exact ⟨fun a => h (.inl a), fun a => h (.inr a)⟩ + +theorem productVelocity_neg_exists (u : Euclidean 20) (hu : u ≠ 0) : + ∃ a, productVelocity u a < 0 := by + by_cases h1 : firstBlock u = 0 + · have h2 : secondBlock u ≠ 0 := by + intro h2 + apply hu + apply splitBlocks.injective + change (firstBlock u, secondBlock u) = (firstBlock 0, secondBlock 0) + rw [h1, h2] + rfl + obtain ⟨a, ha⟩ := simplexVelocity_neg_exists (secondBlock u) h2 + exact ⟨.inr a, ha⟩ + · obtain ⟨a, ha⟩ := simplexVelocity_neg_exists (firstBlock u) h1 + exact ⟨.inl a, ha⟩ + +theorem exists_product_front_point (x u : Euclidean 20) (hu : u ≠ 0) + (hx : ∀ a, 0 ≤ productCoordinates x a) : + ∃ t : ℝ, 0 ≤ t ∧ (∀ a, 0 ≤ productCoordinates (x + t • u) a) ∧ + ∃ a, productVelocity u a < 0 ∧ productCoordinates (x + t • u) a = 0 := by + obtain ⟨t, ht, hq, a, ha, hqa⟩ := + exists_step_to_boundary (productCoordinates x) (productVelocity u) hx + (productVelocity_neg_exists u hu) + refine ⟨t, ht, ?_, a, ha, ?_⟩ + · simpa only [productCoordinates_add_smul] using hq + · simpa only [productCoordinates_add_smul] using hqa + +theorem projection_injective_on_product_front (u x z : Euclidean 20) + (hx : ∀ a, 0 ≤ productCoordinates x a) (hz : ∀ a, 0 ≤ productCoordinates z a) + (hxf : ∃ a, productVelocity u a < 0 ∧ productCoordinates x a = 0) + (hzf : ∃ a, productVelocity u a < 0 ∧ productCoordinates z a = 0) + (hp : (normalHyperplane u).orthogonalProjectionOnto x = + (normalHyperplane u).orthogonalProjectionOnto z) : x = z := by + obtain ⟨t, rfl⟩ := (projection_eq_iff_parallel u x z).mp hp + obtain ⟨a, ha, hxa⟩ := hxf + obtain ⟨b, hb, hzb⟩ := hzf + rw [productCoordinates_add_smul] at hxa + have ht0 : 0 ≤ t := by + by_contra ht + have hprod := mul_pos_of_neg_of_neg (lt_of_not_ge ht) ha + linarith [hz a] + have ht1 : t ≤ 0 := by + by_contra ht + have hprod := mul_neg_of_pos_of_neg (lt_of_not_ge ht) hb + have hxb := hx b + rw [productCoordinates_add_smul, hzb] at hxb + linarith + simp [le_antisymm ht1 ht0] + +def productFacet (a : ProductFacetIndex) : Set (Euclidean 20) := + {x | x ∈ productWitness ∧ productCoordinates x a = 0} + +theorem product_projection_eq_front_cover (u : Euclidean 20) (hu : u ≠ 0) : + (normalHyperplane u).orthogonalProjectionOnto '' productWitness = + ⋃ a : {a : ProductFacetIndex // productVelocity u a < 0}, + (normalHyperplane u).orthogonalProjectionOnto '' productFacet a.val := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + obtain ⟨t, _, hq, a, ha, hqa⟩ := + exists_product_front_point x u hu ((mem_productWitness_iff_coordinates x).mp hx) + refine mem_iUnion.mpr ⟨⟨a, ha⟩, x + t • u, ?_, ?_⟩ + · exact ⟨(mem_productWitness_iff_coordinates _).mpr hq, hqa⟩ + · exact (projection_eq_iff_parallel u (x + t • u) x).mpr ⟨t, rfl⟩ + · intro hy + obtain ⟨a, x, hx, hpx⟩ := mem_iUnion.mp hy + exact ⟨x, hx.1, hpx⟩ + +theorem product_front_facets_projection_inter_eq (u : Euclidean 20) + (a b : ProductFacetIndex) (ha : productVelocity u a < 0) + (hb : productVelocity u b < 0) : + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a) ∩ + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet b) = + (normalHyperplane u).orthogonalProjectionOnto '' (productFacet a ∩ productFacet b) := by + apply le_antisymm + · rintro y ⟨⟨x, hx, hpx⟩, ⟨z, hz, hpz⟩⟩ + have heq : x = z := projection_injective_on_product_front u x z + ((mem_productWitness_iff_coordinates x).mp hx.1) + ((mem_productWitness_iff_coordinates z).mp hz.1) + ⟨a, ha, hx.2⟩ ⟨b, hb, hz.2⟩ (hpx.trans hpz.symm) + subst z + exact ⟨x, ⟨hx, hz⟩, hpx⟩ + · exact image_inter_subset _ _ _ + +def productCoordinateAffine : ProductFacetIndex → Euclidean 20 →ᵃ[ℝ] ℝ + | .inl a => (simplexCoordinateAffine a).comp + (((LinearMap.fst ℝ (Euclidean 10) (Euclidean 10)).comp splitBlocks.toLinearMap).toAffineMap) + | .inr a => (simplexCoordinateAffine a).comp + (((LinearMap.snd ℝ (Euclidean 10) (Euclidean 10)).comp splitBlocks.toLinearMap).toAffineMap) + +theorem productCoordinateAffine_apply (a : ProductFacetIndex) (x : Euclidean 20) : + productCoordinateAffine a x = productCoordinates x a := by + cases a with + | inl a => exact simplexCoordinateAffine_apply a (firstBlock x) + | inr a => exact simplexCoordinateAffine_apply a (secondBlock x) + +def productVertex (a b : Option (Fin 10)) : Euclidean 20 := + splitBlocks.symm (simplexVertex a, simplexVertex b) + +theorem firstBlock_productVertex (a b : Option (Fin 10)) : + firstBlock (productVertex a b) = simplexVertex a := by + change (splitBlocks (splitBlocks.symm _)).1 = _ + simp + +theorem secondBlock_productVertex (a b : Option (Fin 10)) : + secondBlock (productVertex a b) = simplexVertex b := by + change (splitBlocks (splitBlocks.symm _)).2 = _ + simp + +theorem exists_product_coordinate_separator (a b : ProductFacetIndex) (hab : a ≠ b) : + ∃ x : Euclidean 20, productCoordinates x a = 1 ∧ productCoordinates x b = 0 := by + cases a with + | inl a => + cases b with + | inl b => + refine ⟨productVertex a none, ?_⟩ + simp_all [productCoordinates, firstBlock_productVertex, simplexCoordinates_vertex] + | inr b => + obtain ⟨c, hc⟩ := exists_ne b + refine ⟨productVertex a c, ?_⟩ + simp [productCoordinates, firstBlock_productVertex, secondBlock_productVertex, + simplexCoordinates_vertex, hc] + | inr a => + cases b with + | inl b => + obtain ⟨c, hc⟩ := exists_ne b + refine ⟨productVertex c a, ?_⟩ + simp [productCoordinates, firstBlock_productVertex, secondBlock_productVertex, + simplexCoordinates_vertex, hc] + | inr b => + refine ⟨productVertex none a, ?_⟩ + simp_all [productCoordinates, secondBlock_productVertex, simplexCoordinates_vertex] + +theorem product_facet_seam_projection_invariant (u x : Euclidean 20) + (a b : ProductFacetIndex) : + productVelocity u b * productCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean 20) a - + productVelocity u a * productCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean 20) b = + productVelocity u b * productCoordinates x a - + productVelocity u a * productCoordinates x b := by + obtain ⟨t, ht⟩ := (projection_eq_iff_parallel u x + ((normalHyperplane u).orthogonalProjectionOnto x)).mp + ((normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self + ((normalHyperplane u).orthogonalProjectionOnto x)).symm + conv_rhs => rw [ht, productCoordinates_add_smul, productCoordinates_add_smul] + ring + +theorem projected_product_facet_seam_null (u : Euclidean 20) (a b : ProductFacetIndex) + (hab : a ≠ b) (hb : productVelocity u b ≠ 0) : + volume {y : normalHyperplane u | + productVelocity u b * productCoordinates y.val a - + productVelocity u a * productCoordinates y.val b = 0} = 0 := by + let f : normalHyperplane u →ᵃ[ℝ] ℝ := + productVelocity u b • ((productCoordinateAffine a).comp + (normalHyperplane u).subtype.toAffineMap) - + productVelocity u a • ((productCoordinateAffine b).comp + (normalHyperplane u).subtype.toAffineMap) + let S : AffineSubspace ℝ (normalHyperplane u) := + (affineSpan ℝ ({0} : Set ℝ)).comap f + have hmem (y : normalHyperplane u) : y ∈ S ↔ + productVelocity u b * productCoordinates y.val a - + productVelocity u a * productCoordinates y.val b = 0 := by + simp [S, f, productCoordinateAffine_apply, smul_eq_mul] + have hproper : S ≠ ⊤ := by + intro htop + obtain ⟨x, hxa, hxb⟩ := exists_product_coordinate_separator a b hab + have hy : (normalHyperplane u).orthogonalProjectionOnto x ∈ S := by + rw [htop] + exact AffineSubspace.mem_top ℝ _ _ + have hz := (hmem _).mp hy + rw [product_facet_seam_projection_invariant, hxa, hxb] at hz + simp only [mul_one, mul_zero, sub_zero] at hz + exact hb hz + have hset : {y : normalHyperplane u | + productVelocity u b * productCoordinates y.val a - + productVelocity u a * productCoordinates y.val b = 0} = S := by + ext y + exact (hmem y).symm + rw [hset] + exact Measure.addHaar_affineSubspace volume S hproper + +theorem projected_product_front_facets_aedisjoint (u : Euclidean 20) + (a b : ProductFacetIndex) (hab : a ≠ b) + (ha : productVelocity u a < 0) (hb : productVelocity u b < 0) : + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a) + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet b) := by + rw [AEDisjoint, product_front_facets_projection_inter_eq u a b ha hb] + apply measure_mono_null _ (projected_product_facet_seam_null u a b hab (ne_of_lt hb)) + rintro y ⟨x, hx, rfl⟩ + change productVelocity u b * productCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean 20) a - + productVelocity u a * productCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean 20) b = 0 + rw [product_facet_seam_projection_invariant, hx.1.2, hx.2.2] + simp + +theorem productFacet_isCompact (a : ProductFacetIndex) : IsCompact (productFacet a) := by + have hfun : (fun x : Euclidean 20 => productCoordinates x a) = productCoordinateAffine a := by + funext x + exact (productCoordinateAffine_apply a x).symm + have hc : Continuous (fun x : Euclidean 20 => productCoordinates x a) := by + rw [hfun] + exact (productCoordinateAffine a).continuous_of_finiteDimensional + exact productWitness_isCompact.inter_right (isClosed_eq hc continuous_const) + +theorem projected_productFacet_isCompact (u : Euclidean 20) (a : ProductFacetIndex) : + IsCompact ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a) := + (productFacet_isCompact a).image (normalHyperplane u).orthogonalProjectionOnto.continuous + +theorem projectionVolume_product_eq_front_sum (u : Euclidean 20) (hu : u ≠ 0) : + projectionVolume productWitness u = + ∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, + volume ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a.val) := by + unfold projectionVolume + rw [product_projection_eq_front_cover u hu] + have hd : Pairwise (fun a b : {a : ProductFacetIndex // productVelocity u a < 0} => + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a.val) + ((normalHyperplane u).orthogonalProjectionOnto '' productFacet b.val)) := by + intro a b hab + exact projected_product_front_facets_aedisjoint u a.val b.val (Subtype.coe_injective.ne hab) + a.property b.property + rw [measure_iUnion₀ hd (fun a => + (projected_productFacet_isCompact u a.val).measurableSet.nullMeasurableSet)] + exact tsum_fintype _ + +theorem brightness_product_eq_front_sum (u : Euclidean 20) (hu : u ≠ 0) : + brightness productWitness u = ‖u‖ * + ∑ a : {a : ProductFacetIndex // productVelocity u a < 0}, + (volume ((normalHyperplane u).orthogonalProjectionOnto '' productFacet a.val)).toReal := by + unfold brightness + rw [projectionVolume_product_eq_front_sum u hu, ENNReal.toReal_sum] + intro a _ + exact (projected_productFacet_isCompact u a.val).measure_lt_top.ne + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductReconstruction.lean b/lean/OAI/Geometry/ProjectionVolume/ProductReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..081ae117de5b1274e96849683783c06ef91e5487 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductReconstruction.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.ProjectionVolume.ProductPolytope + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem cartesianBody_volume {r s : ℕ} (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (hA : MeasurableSet A) (hB : MeasurableSet B) : + volume (cartesianBody A B) = volume A * volume B := by + rw [cartesianBody_eq_preimage, splitEuclideanProduct_volume r s A B hA hB] + +theorem volume_smul_toReal {d : ℕ} (S : Set (Euclidean d)) (c : ℝ) : + (volume (c • S)).toReal = |c| ^ d * (volume S).toReal := by + rw [Measure.addHaar_smul, finrank_euclideanSpace_fin, ENNReal.toReal_mul, abs_pow, + ENNReal.toReal_ofReal (pow_nonneg (abs_nonneg c) d)] + +theorem projectionBody_cartesian_of_brightness {r s : ℕ} + (A : Set (Euclidean r)) (B : Set (Euclidean s)) + (ha : 0 < (volume A).toReal) (hb : 0 < (volume B).toReal) + (h : ∀ w, brightness (cartesianBody A B) w = + (volume B).toReal * brightness A (splitEuclideanProduct r s w).1 + + (volume A).toReal * brightness B (splitEuclideanProduct r s w).2) : + projectionBody (cartesianBody A B) = + cartesianBody ((volume B).toReal • projectionBody A) + ((volume A).toReal • projectionBody B) := by + have hAz : brightness A 0 = 0 := by simp [brightness] + have hBz : brightness B 0 = 0 := by simp [brightness] + ext z + change (∀ w, ⟪w, z⟫ ≤ brightness (cartesianBody A B) w) ↔ + ((splitEuclideanProduct r s z).1 ∈ (volume B).toReal • projectionBody A ∧ + (splitEuclideanProduct r s z).2 ∈ (volume A).toReal • projectionBody B) + constructor + · intro hz + constructor + · rw [mem_smul_set_iff_inv_smul_mem₀ hb.ne'] + intro u + have hu := hz (productLiftLeft r s u) + rw [h, inner_productLiftLeft, split_productLiftLeft] at hu + simp only [hBz, mul_zero, add_zero] at hu + have hh := mul_le_mul_of_nonneg_left hu (inv_nonneg.mpr hb.le) + simpa only [inner_smul_right, ← mul_assoc, inv_mul_cancel₀ hb.ne', one_mul] using hh + · rw [mem_smul_set_iff_inv_smul_mem₀ ha.ne'] + intro u + have hu := hz (productLiftRight r s u) + rw [h, inner_productLiftRight, split_productLiftRight] at hu + simp only [hAz, mul_zero, zero_add] at hu + have hh := mul_le_mul_of_nonneg_left hu (inv_nonneg.mpr ha.le) + simpa only [inner_smul_right, ← mul_assoc, inv_mul_cancel₀ ha.ne', one_mul] using hh + · rintro ⟨⟨x, hx, hxe⟩, ⟨y, hy, hye⟩⟩ w + rw [h, splitEuclideanProduct_inner r s, ← hxe, ← hye, inner_smul_right, + inner_smul_right] + exact add_le_add (mul_le_mul_of_nonneg_left (hx _) hb.le) + (mul_le_mul_of_nonneg_left (hy _) ha.le) + +theorem normalized_cartesian_of_projectionBody_eq {r s : ℕ} (hr : 0 < r) (hs : 0 < s) + (A : Set (Euclidean r)) (B : Set (Euclidean s)) (hA : IsCompact A) (hB : IsCompact B) + (ha : 0 < (volume A).toReal) (hb : 0 < (volume B).toReal) + (h : projectionBody (cartesianBody A B) = + cartesianBody ((volume B).toReal • projectionBody A) + ((volume A).toReal • projectionBody B)) : + normalizedProjectionVolume (cartesianBody A B) = + normalizedProjectionVolume A * normalizedProjectionVolume B := by + unfold normalizedProjectionVolume + rw [h, cartesianBody_volume _ _ + (IsCompact.smul _ (projectionBody_isCompact A)).measurableSet + (IsCompact.smul _ (projectionBody_isCompact B)).measurableSet, + cartesianBody_volume A B hA.measurableSet hB.measurableSet, + ENNReal.toReal_mul, ENNReal.toReal_mul, volume_smul_toReal, volume_smul_toReal, + abs_of_pos hb, abs_of_pos ha, mul_pow] + have hpa : (volume A).toReal ^ (r + s - 1) = + (volume A).toReal ^ (r - 1) * (volume A).toReal ^ s := by + rw [← pow_add] + congr 1 + omega + have hpb : (volume B).toReal ^ (r + s - 1) = + (volume B).toReal ^ (s - 1) * (volume B).toReal ^ r := by + rw [← pow_add] + congr 1 + omega + rw [hpa, hpb] + field_simp [ha.ne', hb.ne'] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductVolume.lean b/lean/OAI/Geometry/ProjectionVolume/ProductVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..0363350a83b86efa31a1115256bd2acbe1c62d4a --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductVolume.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.ProjectionVolume.SimplexVolume + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped ENNReal + +namespace Paper092 + +theorem splitBlocks_measurePreserving : MeasurePreserving splitBlocks volume volume := by + have h₁ := PiLp.volume_preserving_ofLp (Fin 20) + have h₂ := (volume_measurePreserving_piCongrLeft (fun _ : Fin 20 => ℝ) + (finSumFinEquiv : Fin 10 ⊕ Fin 10 ≃ Fin 20)).symm + have h₃ := volume_measurePreserving_sumPiEquivProdPi + (fun _ : Fin 10 ⊕ Fin 10 => ℝ) + have h₄ := (PiLp.volume_preserving_toLp (Fin 10)).prod + (PiLp.volume_preserving_toLp (Fin 10)) + convert h₄.comp (h₃.comp (h₂.comp h₁)) using 1 + all_goals rfl + +theorem productWitness_volume_product : + volume productWitness = volume (standardSimplex 10) * volume (standardSimplex 10) := by + rw [productWitness_eq_preimage, + splitBlocks_measurePreserving.measure_preimage + (((standardSimplex_isCompact 10).prod (standardSimplex_isCompact 10)).measurableSet.nullMeasurableSet)] + exact Measure.prod_prod _ _ + +theorem productWitness_volume : + volume productWitness = ENNReal.ofReal ((1 / (Nat.factorial 10 : ℝ)) ^ 2) := by + rw [productWitness_volume_product, standardSimplex_volume, + ← ENNReal.ofReal_mul (by positivity)] + congr 1 + ring + +theorem standardSimplex_volume_real (n : ℕ) : + (volume (standardSimplex n)).toReal = 1 / (Nat.factorial n : ℝ) := by + rw [standardSimplex_volume, ENNReal.toReal_ofReal (by positivity)] + +theorem productWitness_volume_real : + (volume productWitness).toReal = (1 / (Nat.factorial 10 : ℝ)) ^ 2 := by + rw [productWitness_volume, ENNReal.toReal_ofReal (by positivity)] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductVolumeGeneral.lean b/lean/OAI/Geometry/ProjectionVolume/ProductVolumeGeneral.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f3cbe1016cd816d5ec53469594508440f9f0167 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductVolumeGeneral.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.ProjectionVolume.ProductVolume + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped ENNReal + +namespace Paper092 + +def splitEuclideanProduct (r s : ℕ) : Euclidean (r + s) ≃L[ℝ] Euclidean r × Euclidean s := + letI : ContinuousSMul ℝ (Euclidean r × Euclidean s) := Prod.continuousSMul + let equiv : Euclidean (r + s) ≃ₗ[ℝ] Euclidean r × Euclidean s := + (((WithLp.linearEquiv 2 ℝ (Fin (r + s) → ℝ)).trans + (LinearEquiv.piCongrLeft ℝ (fun _ : Fin (r + s) => ℝ) + (finSumFinEquiv : Fin r ⊕ Fin s ≃ Fin (r + s))).symm).trans + (LinearEquiv.sumArrowLequivProdArrow (Fin r) (Fin s) ℝ ℝ) |>.trans + (LinearEquiv.prodCongr (WithLp.linearEquiv 2 ℝ (Fin r → ℝ)).symm + (WithLp.linearEquiv 2 ℝ (Fin s → ℝ)).symm)) + equiv.toContinuousLinearEquiv + +theorem splitEuclideanProduct_measurePreserving (r s : ℕ) : + MeasurePreserving (splitEuclideanProduct r s) volume volume := by + have h₁ := PiLp.volume_preserving_ofLp (Fin (r + s)) + have h₂ := (volume_measurePreserving_piCongrLeft (fun _ : Fin (r + s) => ℝ) + (finSumFinEquiv : Fin r ⊕ Fin s ≃ Fin (r + s))).symm + have h₃ := volume_measurePreserving_sumPiEquivProdPi (fun _ : Fin r ⊕ Fin s => ℝ) + have h₄ := (PiLp.volume_preserving_toLp (Fin r)).prod + (PiLp.volume_preserving_toLp (Fin s)) + convert h₄.comp (h₃.comp (h₂.comp h₁)) using 1 + all_goals rfl + +theorem splitEuclideanProduct_volume (r s : ℕ) (A : Set (Euclidean r)) + (B : Set (Euclidean s)) (hA : MeasurableSet A) (hB : MeasurableSet B) : + volume (splitEuclideanProduct r s ⁻¹' (A ×ˢ B)) = volume A * volume B := by + rw [(splitEuclideanProduct_measurePreserving r s).measure_preimage + (hA.prod hB).nullMeasurableSet] + exact Measure.prod_prod _ _ + +def simplexProduct (r s : ℕ) : Set (Euclidean (r + s)) := + splitEuclideanProduct r s ⁻¹' (standardSimplex r ×ˢ standardSimplex s) + +theorem simplexProduct_volume (r s : ℕ) : + volume (simplexProduct r s) = + ENNReal.ofReal ((1 / (Nat.factorial r : ℝ)) * (1 / (Nat.factorial s : ℝ))) := by + rw [simplexProduct, splitEuclideanProduct_volume r s _ _ + (standardSimplex_isCompact r).measurableSet (standardSimplex_isCompact s).measurableSet, + standardSimplex_volume, standardSimplex_volume, ← ENNReal.ofReal_mul (by positivity)] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProductZonotope.lean b/lean/OAI/Geometry/ProjectionVolume/ProductZonotope.lean new file mode 100644 index 0000000000000000000000000000000000000000..296db33b5804aebcd735cda301ee7b46fee81bcc --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProductZonotope.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.ProjectionVolume.SimplexZonotope +import OAI.Geometry.ProjectionVolume.ProductVolume + +namespace OAI + +universe uE uF + +open Set MeasureTheory +open scoped Pointwise RealInnerProductSpace + +namespace Paper092 + +noncomputable def productZonotope : Set (Euclidean 20) := + splitBlocks ⁻¹' + (((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) ×ˢ + ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10)) + +theorem productZonotope_isCompact : IsCompact productZonotope := by + unfold productZonotope + have h : IsCompact ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) := + IsCompact.smul _ (simplexZonotope_isCompact 10) + exact splitBlocks.toHomeomorph.isCompact_preimage.mpr (h.prod h) + +theorem productZonotope_nonempty : productZonotope.Nonempty := by + unfold productZonotope + have h : ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10).Nonempty := + (simplexZonotope_nonempty 10).smul_set + exact (h.prod h).preimage splitBlocks.surjective + +theorem productZonotope_convex : Convex ℝ productZonotope := by + unfold productZonotope + have h : Convex ℝ ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) := + (simplexZonotope_convex 10).smul _ + exact (h.prod h).linear_preimage splitBlocks.toLinearMap + +theorem inner_splitBlocks_sum (u v : Euclidean 20) : + inner ℝ u v = inner ℝ (firstBlock u) (firstBlock v) + + inner ℝ (secondBlock u) (secondBlock v) := by + exact Fin.sum_univ_add (fun i : Fin (10 + 10) => inner ℝ (u i) (v i)) + +theorem support_preimage_equiv {E : Type uE} {F : Type uF} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] (e : E ≃L[ℝ] F) (K : Set F) + (f : F →L[ℝ] ℝ) : + SupportGeometry.support (e ⁻¹' K) (f.comp e.toContinuousLinearMap) = + SupportGeometry.support K f := by + unfold SupportGeometry.support + change sSup ((f ∘ e) '' (e ⁻¹' K)) = _ + rw [image_comp f e, image_preimage_eq K e.surjective] + +theorem productZonotope_support_factor (u : Euclidean 20) : + SupportGeometry.support productZonotope (innerSL ℝ u) = + (1 / (Nat.factorial 10 : ℝ)) * + (SupportGeometry.support (simplexZonotope 10) (innerSL ℝ (firstBlock u)) + + SupportGeometry.support (simplexZonotope 10) (innerSL ℝ (secondBlock u))) := by + have hlin : innerSL ℝ u = + ((innerSL ℝ (firstBlock u)).coprod (innerSL ℝ (secondBlock u))).comp + splitBlocks.toContinuousLinearMap := by + ext y + exact inner_splitBlocks_sum u y + have hc : IsCompact ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) := + IsCompact.smul _ (simplexZonotope_isCompact 10) + have hn : ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10).Nonempty := + (simplexZonotope_nonempty 10).smul_set + rw [hlin, productZonotope, support_preimage_equiv, + SupportGeometry.support_prod hc hn hc hn, + SupportGeometry.support_smul _ _ (by positivity), + SupportGeometry.support_smul _ _ (by positivity), mul_add] + +theorem productZonotope_support (u : Euclidean 20) : + SupportGeometry.support productZonotope (innerSL ℝ u) = + ((∑ i : Fin 10, |firstBlock u i|) + |∑ i : Fin 10, firstBlock u i| + + (∑ i : Fin 10, |secondBlock u i|) + |∑ i : Fin 10, secondBlock u i|) / + (2 * (Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by + rw [productZonotope_support_factor, simplexZonotope_support, simplexZonotope_support] + change (1 / (Nat.factorial 10 : ℝ)) * + (((∑ i : Fin 10, |firstBlock u i|) + |∑ i : Fin 10, firstBlock u i|) / + (2 * (Nat.factorial 9 : ℝ)) + + ((∑ i : Fin 10, |secondBlock u i|) + |∑ i : Fin 10, secondBlock u i|) / + (2 * (Nat.factorial 9 : ℝ))) = _ + ring + +theorem productZonotope_volume_product : + volume productZonotope = + volume ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) * + volume ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) := by + have hc : IsCompact ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10) := + IsCompact.smul _ (simplexZonotope_isCompact 10) + rw [productZonotope, splitBlocks_measurePreserving.measure_preimage + (hc.prod hc).measurableSet.nullMeasurableSet] + exact Measure.prod_prod _ _ + +theorem productZonotope_volume_real : + (volume productZonotope).toReal = + (121 : ℝ) / ((Nat.factorial 9 : ℝ) ^ 20 * (Nat.factorial 10 : ℝ) ^ 20) := by + have hscaled : + (volume ((1 / (Nat.factorial 10 : ℝ)) • simplexZonotope 10)).toReal = + (1 / (Nat.factorial 10 : ℝ)) ^ 10 * (11 / (Nat.factorial 9 : ℝ) ^ 10) := by + rw [Measure.addHaar_smul, finrank_euclideanSpace_fin, ENNReal.toReal_mul, + ENNReal.toReal_ofReal (abs_nonneg _), abs_pow, abs_of_nonneg (by positivity), + simplexZonotope_volume 10 (by norm_num)] + norm_num only [Nat.reduceSub, Nat.cast_ofNat] + rw [productZonotope_volume_product, ENNReal.toReal_mul, hscaled] + simp only [div_eq_mul_inv, mul_inv_rev] + ring + +theorem productZonotope_volume : + volume productZonotope = ENNReal.ofReal + ((121 : ℝ) / ((Nat.factorial 9 : ℝ) ^ 20 * (Nat.factorial 10 : ℝ) ^ 20)) := by + rw [← productZonotope_volume_real, ENNReal.ofReal_toReal productZonotope_isCompact.measure_lt_top.ne] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProjectionCoefficients.lean b/lean/OAI/Geometry/ProjectionVolume/ProjectionCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..76a1c5253f4c0d5b5266647c9685effec03aa1d6 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProjectionCoefficients.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.ProjectionVolume.SimplexProjection + +namespace OAI + +universe uι + +open scoped BigOperators + +namespace Paper092 + +theorem twice_sum_negative_eq_sum_abs {ι : Type uι} [Fintype ι] (v : ι → ℝ) + (hv : ∑ i, v i = 0) : + 2 * (∑ i : {i // v i < 0}, -v i.val) = ∑ i, |v i| := by + classical + have hpoint (i : ι) : 2 * (if v i < 0 then -v i else 0) = |v i| - v i := by + by_cases hi : v i < 0 + · simp [hi, abs_of_neg hi] + ring + · simp [hi, abs_of_nonneg (le_of_not_gt hi)] + have hsum := congrArg (fun f : ι → ℝ => ∑ i, f i) (funext hpoint) + simp only [← Finset.mul_sum, Finset.sum_sub_distrib, hv, sub_zero] at hsum + convert hsum using 1 + congr 1 + rw [← Finset.sum_filter] + exact (Finset.sum_subtype (Finset.univ.filter (fun i => v i < 0)) (by simp) + (fun i => -v i)).symm + +theorem simplexVelocity_sum {d : ℕ} (u : Euclidean d) : + ∑ a, simplexVelocity u a = 0 := by + simp [simplexVelocity, Fintype.sum_option] + +theorem simplex_front_coefficient {d : ℕ} (u : Euclidean d) : + (∑ a : {a : Option (Fin d) // simplexVelocity u a < 0}, -simplexVelocity u a.val) = + ((∑ i, |u i|) + |∑ i, u i|) / 2 := by + have h := twice_sum_negative_eq_sum_abs (simplexVelocity u) (simplexVelocity_sum u) + have habs : (∑ a, |simplexVelocity u a|) = |∑ i, u i| + ∑ i, |u i| := by + simp only [Fintype.sum_option, simplexVelocity, abs_neg] + rw [habs] at h + linarith + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProjectionInterior.lean b/lean/OAI/Geometry/ProjectionVolume/ProjectionInterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea115eff2e8c71f24d1426fbd34d2cb08f866bec --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProjectionInterior.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.ProjectionVolume.FiniteApproximation +import OAI.Geometry.ProjectionVolume.SimplexAffine +import Mathlib.Analysis.Convex.Measure + +namespace OAI + +open Set Metric MeasureTheory +open scoped Pointwise RealInnerProductSpace + +namespace Paper092 + +theorem convex_interior_nonempty_of_volume_pos {n : ℕ} {C : Set (Euclidean n)} + (hc : IsClosed C) (hv : Convex ℝ C) (hpos : 0 < (volume C).toReal) : + (interior C).Nonempty := by + by_contra h + have hi : interior C = ∅ := not_nonempty_iff_eq_empty.mp h + have hm := hv.addHaar_frontier volume + rw [frontier, hc.closure_eq, hi, sdiff_empty] at hm + simp [hm] at hpos + +theorem projectionBody_interior_nonempty {n : ℕ} (hn : 0 < n) + (K : Set (Euclidean n)) (hK : IsCompact K) (hint : (interior K).Nonempty) : + (interior (projectionBody K)).Nonempty := by + obtain ⟨x, hx⟩ := hint + have hnhood : K ∈ nhds x := mem_interior_iff_mem_nhds.mp hx + obtain ⟨b, _, hbK⟩ := exists_mem_interior_convexHull_affineBasis hnhood + let s : Affine.Simplex ℝ (Euclidean n) n := + ⟨b ∘ (finCongr (by simp : n + 1 = Module.finrank ℝ (Euclidean n) + 1)), + b.ind.comp_embedding (finCongr (by simp : n + 1 = Module.finrank ℝ (Euclidean n) + 1)).toEmbedding⟩ + have hsRange : range s.points = range b := by + exact (finCongr (by simp : n + 1 = Module.finrank ℝ (Euclidean n) + 1)).surjective.range_comp b + have hsK : convexHull ℝ (range s.points) ⊆ K := by rwa [hsRange] + have hsbody := simplex_is_convex_body s + have hvol : 0 < (volume (convexHull ℝ (range s.points))).toReal := + ENNReal.toReal_pos (ne_of_gt (Measure.measure_pos_of_nonempty_interior volume hsbody.2.2)) + hsbody.1.measure_lt_top.ne + have hnorm : 0 < normalizedProjectionVolume (convexHull ℝ (range s.points)) := by + rw [simplex_normalizedProjectionVolume hn] + unfold simplexConstant + positivity + have hpi : 0 < (volume (projectionBody (convexHull ℝ (range s.points)))).toReal := by + change 0 < _ / _ at hnorm + exact (div_pos_iff_of_pos_right (pow_pos hvol _)).mp hnorm + exact (convex_interior_nonempty_of_volume_pos (projectionBody_isClosed _) + (projectionBody_convex _) hpi).mono (interior_mono (projectionBody_mono hsK hK)) + +theorem projectionBody_is_convex_body {d : ℕ} (hd : 2 ≤ d) (K : Set (Euclidean d)) + (hK : IsCompact K) (_hconv : Convex ℝ K) (hint : (interior K).Nonempty) : + IsCompact (projectionBody K) ∧ Convex ℝ (projectionBody K) ∧ + (interior (projectionBody K)).Nonempty := + ⟨projectionBody_isCompact K, projectionBody_convex K, + projectionBody_interior_nonempty (by omega) K hK hint⟩ + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProjectionJacobian.lean b/lean/OAI/Geometry/ProjectionVolume/ProjectionJacobian.lean new file mode 100644 index 0000000000000000000000000000000000000000..d23151057fb81074e9b0cbf00f270e3211d1630b --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProjectionJacobian.lean @@ -0,0 +1,161 @@ +import OAI.Geometry.ProjectionVolume.Basic +import OAI.Geometry.ProjectionVolume.Translation +import OAI.Geometry.ProjectionVolume.Brightness +import Mathlib.Analysis.InnerProductSpace.NormDet +import Mathlib.LinearAlgebra.Matrix.SchurComplement +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +noncomputable def hyperplaneProjection {n : ℕ} (u v : Euclidean n) : + normalHyperplane v →ₗ[ℝ] Euclidean n := + (normalHyperplane u).starProjection.toLinearMap.comp (normalHyperplane v).subtype + +lemma normal_starProjection_unit {n : ℕ} (u x : Euclidean n) (hu : ‖u‖ = 1) : + (normalHyperplane u).starProjection x = x - ⟪u, x⟫ • u := by + simp only [normalHyperplane, Submodule.starProjection_orthogonal_val, + Submodule.starProjection_unit_singleton ℝ hu] + +lemma det_one_sub_outer {ι : Type uι} [Fintype ι] [DecidableEq ι] (a : ι → ℝ) : + (1 - Matrix.vecMulVec a a).det = 1 - ∑ i, a i ^ 2 := by + rw [Matrix.vecMulVec_eq Unit, + Matrix.det_one_sub_mul_comm, Matrix.det_unique] + simp [Matrix.replicateRow_mul_replicateCol_apply, dotProduct, pow_two] +theorem hyperplaneProjection_normDet {n : ℕ} (u v : Euclidean n) + (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) : + (hyperplaneProjection u v).normDet = |⟪u, v⟫| := by + let b := stdOrthonormalBasis ℝ (normalHyperplane v) + let a := fun i => ⟪u, (b i : Euclidean n)⟫ + have hgram : Matrix.gram ℝ (fun i => hyperplaneProjection u v (b i)) = + 1 - Matrix.vecMulVec a a := by + ext i j + change ⟪(normalHyperplane u).starProjection (b i), + (normalHyperplane u).starProjection (b j)⟫ = _ + rw [normal_starProjection_unit _ _ hu, normal_starProjection_unit _ _ hu] + simp only [inner_sub_left, inner_sub_right, real_inner_smul_left, real_inner_smul_right, + real_inner_self_eq_norm_sq, hu, one_pow, Matrix.sub_apply, Matrix.one_apply, + Matrix.vecMulVec_apply] + have hb : ⟪(b i : Euclidean n), (b j : Euclidean n)⟫ = if i = j then 1 else 0 := + b.inner_eq_ite i j + rw [hb] + dsimp [a] + simp only [real_inner_comm (b i : Euclidean n) u] + ring + have hsum : (∑ i, a i ^ 2) = 1 - ⟪u, v⟫ ^ 2 := by + have h := b.sum_sq_inner_left ((normalHyperplane v).orthogonalProjectionOnto u) + simp only [Submodule.inner_orthogonalProjectionOnto_eq_of_mem_right] at h + change (∑ i, a i ^ 2) = ‖(normalHyperplane v).orthogonalProjectionOnto u‖ ^ 2 at h + rw [h] + change ‖(normalHyperplane v).starProjection u‖ ^ 2 = _ + rw [normal_starProjection_unit _ _ hv, ← real_inner_self_eq_norm_sq] + simp only [inner_sub_left, inner_sub_right, real_inner_smul_left, real_inner_smul_right, + real_inner_self_eq_norm_sq, hu, one_pow] + simp only [norm_smul, Real.norm_eq_abs, hv, mul_one, sq_abs] + rw [real_inner_comm v u] + ring + have hsq := (hyperplaneProjection u v).normDet_sq_eq_det_gram b + rw [hgram, det_one_sub_outer, hsum] at hsq + simp only [RCLike.ofReal_real_eq_id, id_eq] at hsq + have hn := (hyperplaneProjection u v).normDet_nonneg + have ha := abs_nonneg ⟪u, v⟫ + nlinarith [sq_abs ⟪u, v⟫] + +theorem volume_project_hyperplane {n : ℕ} (u v : Euclidean n) + (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (S : Set (normalHyperplane v)) : + (volume : Measure (normalHyperplane u)) + ((normalHyperplane u).orthogonalProjectionOnto '' + ((fun x : normalHyperplane v => (x : Euclidean n)) '' S)) = + ENNReal.ofReal |⟪u, v⟫| * (volume : Measure (normalHyperplane v)) S := by + let f : normalHyperplane v →ₗ[ℝ] normalHyperplane u := + (normalHyperplane u).orthogonalProjectionOnto.toLinearMap.comp + (normalHyperplane v).subtype + have hf : f.normDet = (hyperplaneProjection u v).normDet := by + have hp : ∀ x, hyperplaneProjection u v x ∈ normalHyperplane u := by + intro x + exact ((normalHyperplane u).orthogonalProjectionOnto (x : Euclidean n)).property + have he : f = (hyperplaneProjection u v).codRestrict (normalHyperplane u) hp := by + ext x + rfl + rw [he] + exact LinearMap.normDet_codRestrict hp + have hu0 : u ≠ 0 := by intro h; simp [h] at hu + have hv0 : v ≠ 0 := by intro h; simp [h] at hv + have hrank : Module.finrank ℝ (normalHyperplane v) = + Module.finrank ℝ (normalHyperplane u) := by + rw [normalHyperplane_finrank v hv0, normalHyperplane_finrank u hu0] + have h := f.euclideanHausdorffMeasure_image_eq_normDet_mul_volume S + rw [hrank, InnerProductSpace.euclideanHausdorffMeasure_eq_volume, + hf, hyperplaneProjection_normDet u v hu hv] at h + have himage : f '' S = (normalHyperplane u).orthogonalProjectionOnto '' + ((fun x : normalHyperplane v => (x : Euclidean n)) '' S) := by + rw [Set.image_image] + rfl + rw [himage] at h + exact h + +theorem projectionVolume_of_subset_affine_hyperplane {n : ℕ} (u v : Euclidean n) + (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (c : ℝ) (S : Set (Euclidean n)) + (hS : ∀ x ∈ S, ⟪v, x⟫ = c) : + projectionVolume S u = ENNReal.ofReal |⟪u, v⟫| * μHE[n - 1] S := by + let T : Set (Euclidean n) := ((-c) • v) +ᵥ S + have hT : T ⊆ (normalHyperplane v : Set (Euclidean n)) := by + rintro x ⟨y, hy, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪v, (-c) • v + y⟫ = 0 + simp [inner_add_right, inner_smul_right, hv, hS y hy] + let Q : Set (normalHyperplane v) := {x | (x : Euclidean n) ∈ T} + have hQ : (fun x : normalHyperplane v => (x : Euclidean n)) '' Q = T := by + ext x + constructor + · rintro ⟨y, hy, rfl⟩ + exact hy + · intro hx + exact ⟨⟨x, hT hx⟩, hx, rfl⟩ + have hv0 : v ≠ 0 := by intro h; simp [h] at hv + have hQV : (volume : Measure (normalHyperplane v)) Q = μHE[n - 1] S := by + rw [← InnerProductSpace.euclideanHausdorffMeasure_eq_volume, + normalHyperplane_finrank v hv0] + have h := (isometry_subtype_coe : Isometry + (fun x : normalHyperplane v => (x : Euclidean n))).euclideanHausdorffMeasure_image + (d := n - 1) Q + have hQ' : (Subtype.val : normalHyperplane v → Euclidean n) '' Q = T := hQ + calc + (μHE[n - 1] : Measure (normalHyperplane v)) Q = + (μHE[n - 1] : Measure (Euclidean n)) (Subtype.val '' Q) := h.symm + _ = (μHE[n - 1] : Measure (Euclidean n)) T := + congrArg (fun A : Set (Euclidean n) => (μHE[n - 1] : Measure (Euclidean n)) A) hQ' + _ = (μHE[n - 1] : Measure (Euclidean n)) S := + measure_vadd (μHE[n - 1] : Measure (Euclidean n)) ((-c) • v) S + have h := volume_project_hyperplane u v hu hv Q + rw [hQ, hQV] at h + change projectionVolume T u = _ at h + simpa only [T, projectionVolume_vadd] using h + +theorem brightness_of_subset_affine_hyperplane {n : ℕ} (u v : Euclidean n) + (hv : ‖v‖ = 1) (c : ℝ) (S : Set (Euclidean n)) + (hS : ∀ x ∈ S, ⟪v, x⟫ = c) : + brightness S u = |⟪u, v⟫| * (μHE[n - 1] S).toReal := by + by_cases hu : u = 0 + · simp [hu, brightness] + have hn : 0 < ‖u‖ := norm_pos_iff.mpr hu + have hunit : ‖‖u‖⁻¹ • u‖ = 1 := by + simp [norm_smul, hn.ne'] + have h := projectionVolume_of_subset_affine_hyperplane + (‖u‖⁻¹ • u) v hunit hv c S hS + rw [projectionVolume_smul S u (inv_ne_zero hn.ne')] at h + rw [brightness, h, ENNReal.toReal_mul, ENNReal.toReal_ofReal (abs_nonneg _)] + simp only [real_inner_smul_left, abs_mul, abs_inv, abs_of_pos hn] + field_simp + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProjectionNullity.lean b/lean/OAI/Geometry/ProjectionVolume/ProjectionNullity.lean new file mode 100644 index 0000000000000000000000000000000000000000..66027a1af50343ecfda90aad7fe22e09b2f4a094 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProjectionNullity.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.ProjectionVolume.Basic +import Mathlib.Analysis.Convex.Measure +import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional + +namespace OAI + +universe uE + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace Pointwise + +namespace Paper092 + +theorem projection_finrank_le {d : ℕ} (S : Set (Euclidean d)) (u : Euclidean d) : + Module.finrank ℝ (vectorSpan ℝ ((normalHyperplane u).orthogonalProjectionOnto '' S)) ≤ + Module.finrank ℝ (vectorSpan ℝ S) := by + let p := (normalHyperplane u).orthogonalProjectionOnto.toLinearMap + have h := Submodule.finrank_map_le p (vectorSpan ℝ S) + have hmap : (vectorSpan ℝ S).map p = + vectorSpan ℝ ((normalHyperplane u).orthogonalProjectionOnto '' S) := + p.toAffineMap.map_vectorSpan + rwa [hmap] at h + +theorem volume_eq_zero_of_finrank_vectorSpan_lt + {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] (S : Set E) + (hS : Module.finrank ℝ (vectorSpan ℝ S) < Module.finrank ℝ E) : + volume S = 0 := by + have hspan : affineSpan ℝ S ≠ ⊤ := by + intro h + have htop := AffineSubspace.vectorSpan_eq_top_of_affineSpan_eq_top ℝ E E h + rw [htop, finrank_top] at hS + exact lt_irrefl _ hS + exact measure_mono_null (subset_affineSpan ℝ S) + (Measure.addHaar_affineSubspace volume (affineSpan ℝ S) hspan) + +theorem projectionVolume_eq_zero_of_finrank_lt {d : ℕ} (S : Set (Euclidean d)) + {u : Euclidean d} (hu : u ≠ 0) + (hS : Module.finrank ℝ (vectorSpan ℝ S) < d - 1) : + projectionVolume S u = 0 := by + apply volume_eq_zero_of_finrank_vectorSpan_lt + rw [normalHyperplane_finrank u hu] + exact lt_of_le_of_lt (projection_finrank_le S u) hS + +theorem projection_finrank_le_of_parallel {d : ℕ} (S : Set (Euclidean d)) + {u ν : Euclidean d} (hu : u ≠ 0) (hν : ν ≠ 0) (hperp : ⟪u, ν⟫ = 0) + (c : ℝ) (hS : ∀ x ∈ S, ⟪ν, x⟫ = c) : + Module.finrank ℝ (vectorSpan ℝ ((normalHyperplane u).orthogonalProjectionOnto '' S)) ≤ + d - 2 := by + let v : normalHyperplane u := + ⟨ν, Submodule.mem_orthogonal_singleton_iff_inner_right.mpr hperp⟩ + have hv : v ≠ 0 := by + intro h + exact hν (congrArg Subtype.val h) + let H := (Submodule.span ℝ ({v} : Set (normalHyperplane u)))ᗮ + have hle : vectorSpan ℝ ((normalHyperplane u).orthogonalProjectionOnto '' S) ≤ H := by + rw [vectorSpan_def] + apply Submodule.span_le.mpr + rintro _ ⟨_, ⟨x, hx, rfl⟩, _, ⟨y, hy, rfl⟩, rfl⟩ + apply Submodule.mem_orthogonal_singleton_iff_inner_right.mpr + change ⟪v, (normalHyperplane u).orthogonalProjectionOnto x - + (normalHyperplane u).orthogonalProjectionOnto y⟫ = 0 + rw [inner_sub_right, + Submodule.inner_orthogonalProjectionOnto_eq_of_mem_left, + Submodule.inner_orthogonalProjectionOnto_eq_of_mem_left] + exact sub_eq_zero.mpr ((hS x hx).trans (hS y hy).symm) + have hrank := (Submodule.span ℝ ({v} : Set (normalHyperplane u))).finrank_add_finrank_orthogonal + rw [finrank_span_singleton hv, normalHyperplane_finrank u hu] at hrank + have hdim : Module.finrank ℝ H = d - 2 := by + dsimp [H] + omega + exact hdim ▸ Submodule.finrank_mono hle + +theorem projectionVolume_eq_zero_of_parallel {d : ℕ} (hd : 2 ≤ d) + (S : Set (Euclidean d)) {u ν : Euclidean d} (hu : u ≠ 0) (hν : ν ≠ 0) + (hperp : ⟪u, ν⟫ = 0) (c : ℝ) (hS : ∀ x ∈ S, ⟪ν, x⟫ = c) : + projectionVolume S u = 0 := by + apply volume_eq_zero_of_finrank_vectorSpan_lt + rw [normalHyperplane_finrank u hu] + exact lt_of_le_of_lt (projection_finrank_le_of_parallel S hu hν hperp c hS) (by omega) + +theorem projection_boundary_volume_eq_zero {d : ℕ} (K : Set (Euclidean d)) + (hK : Convex ℝ K) (u : Euclidean d) : + (volume : Measure (normalHyperplane u)) + (frontier ((normalHyperplane u).orthogonalProjectionOnto '' K)) = 0 := by + exact (hK.linear_image (normalHyperplane u).orthogonalProjectionOnto.toLinearMap).addHaar_frontier + volume + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/ProjectionReconstruction.lean b/lean/OAI/Geometry/ProjectionVolume/ProjectionReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d27c8d9e6b1192ce29f5c8269776fa9dea02860 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/ProjectionReconstruction.lean @@ -0,0 +1,17 @@ +import OAI.Geometry.ProjectionVolume.Basic +import OAI.Geometry.ProjectionVolume.SupportGeometry + +namespace OAI + +namespace Paper092 + +theorem projectionBody_eq_of_brightness_eq_support {n : ℕ} + {K C : Set (Euclidean n)} (hC : IsCompact C) (hne : C.Nonempty) + (hconv : Convex ℝ C) + (h : ∀ u, brightness K u = SupportGeometry.support C (innerSL ℝ u)) : + projectionBody K = C := + SupportGeometry.halfSpaces_eq_of_eq_support hC hne hconv (brightness K) h + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SeparationIdentities.lean b/lean/OAI/Geometry/ProjectionVolume/SeparationIdentities.lean new file mode 100644 index 0000000000000000000000000000000000000000..c58c964eddaea196edd2bcac8bb96a30e4d746f5 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SeparationIdentities.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.ProjectionVolume.Arithmetic +import OAI.Geometry.ProjectionVolume.Basic +import Mathlib.Analysis.InnerProductSpace.Projection.Minimal + +namespace OAI + +universe uE + +open Set +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem centered_segment_neg {E : Type uE} [AddCommGroup E] [Module ℝ E] (v : E) : + segment ℝ (-(1 / 2 : ℝ) • (-v)) ((1 / 2 : ℝ) • (-v)) = + segment ℝ (-(1 / 2 : ℝ) • v) ((1 / 2 : ℝ) • v) := by + simpa only [smul_neg, neg_smul, neg_neg] using + (segment_symm ℝ ((1 / 2 : ℝ) • v) (-((1 / 2 : ℝ) • v))) + +theorem nearest_point_separates {n : ℕ} (K : Set (Euclidean n)) + (hK : IsCompact K) (hne : K.Nonempty) (hconv : Convex ℝ K) + {x : Euclidean n} (hx : x ∉ K) : + ∃ y ∈ K, (∀ z ∈ K, ⟪x - y, z - y⟫ ≤ 0) ∧ + (∀ z ∈ K, ⟪x - y, z⟫ ≤ ⟪x - y, y⟫) ∧ + ⟪x - y, y⟫ < ⟪x - y, x⟫ := by + obtain ⟨y, hy, hmin⟩ := + exists_norm_eq_iInf_of_complete_convex hne hK.isComplete hconv x + have hi := (norm_eq_iInf_iff_real_inner_le_zero hconv hy).mp hmin + refine ⟨y, hy, hi, ?_, ?_⟩ + · intro z hz + have h := hi z hz + rwa [inner_sub_right, sub_nonpos] at h + · have hxy : x - y ≠ 0 := sub_ne_zero.mpr (fun h => hx (h ▸ hy)) + have hpos : 0 < ⟪x - y, x - y⟫ := by + rw [real_inner_self_eq_norm_sq] + exact sq_pos_of_pos (norm_pos_iff.mpr hxy) + rwa [inner_sub_right, sub_pos] at hpos + +theorem binomial_twenty_ten : Nat.choose 20 10 = 184756 := by + rw [Nat.choose_eq_factorial_div_factorial (by norm_num : 10 ≤ 20)] + norm_num [Nat.factorial] + +theorem exact_integer_certificate : + (121 : ℤ) * 184756 - 21 * 1048576 = 335380 ∧ (0 : ℤ) < 335380 := by norm_num + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SequenceLimits.lean b/lean/OAI/Geometry/ProjectionVolume/SequenceLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ba0360fe38c264f0e92ab10467e2f7ff5979a6c --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SequenceLimits.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.ProjectionVolume.ApproximationBounds +import OAI.Geometry.ProjectionVolume.ProjectionInterior + +namespace OAI + +open Set Metric Filter MeasureTheory +open scoped Pointwise Topology RealInnerProductSpace + +namespace Paper092 + +theorem euclideanUnitBallVolume_pos (d : ℕ) : 0 < euclideanUnitBallVolume d := + ENNReal.toReal_pos + (ne_of_gt (Metric.measure_closedBall_pos volume (0 : Euclidean d) zero_lt_one)) + (isCompact_closedBall (0 : Euclidean d) 1).measure_lt_top.ne + +theorem brightness_unit {d : ℕ} (K : Set (Euclidean d)) + (u : Euclidean d) (hu : ‖u‖ = 1) : brightness K u = (projectionVolume K u).toReal := by + simp only [brightness, hu, one_mul] + +theorem projectionBody_monotone_sequence {d : ℕ} {P : ℕ → Set (Euclidean d)} + (hc : ∀ m, IsCompact (P m)) (hm : Monotone P) : + Monotone (fun m => projectionBody (P m)) := + fun _ j hij => projectionBody_mono (hm hij) (hc j) + +theorem approximation_projectionBody_union_closure {d : ℕ} + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 0 < scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) : + closure (⋃ m, projectionBody (P m)) = projectionBody K := by + apply Subset.antisymm + · apply closure_minimal _ (projectionBody_isClosed K) + exact iUnion_subset fun m => projectionBody_mono (hPK m) hK + · intro x hx + have hq : Tendsto (fun m => scale m ^ (d - 1)) atTop (𝓝 1) := by + have hcont : Continuous (fun x : ℝ => x ^ (d - 1)) := by fun_prop + simpa only [Function.comp_def, one_pow] using (hcont.tendsto 1).comp hscalelim + have hzlim : Tendsto (fun m => (scale m ^ (d - 1))⁻¹ • x) atTop (𝓝 x) := by + have hcont : ContinuousAt (fun r : ℝ => r⁻¹ • x) 1 := by fun_prop (disch := norm_num) + simpa only [Function.comp_def, inv_one, one_smul] using hcont.tendsto.comp hq + apply mem_closure_of_tendsto hzlim + apply Eventually.of_forall + intro m + apply mem_iUnion.mpr + refine ⟨m, ?_⟩ + apply (mem_smul_set_iff_inv_smul_mem₀ (pow_ne_zero (d - 1) (hscale m).ne') + (projectionBody (P m)) x).mp + exact (approximation_projectionBody_sandwich (hP m) hK (hscale m) (hPK m) (hKP m)).2 hx + +theorem approximation_support_uniform {d : ℕ} (hd : 2 ≤ d) + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hv : ∀ m, Convex ℝ (P m)) + (hi : ∀ m, (interior (P m)).Nonempty) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 1 ≤ scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + {R : ℝ} (hR : 0 ≤ R) (hKR : K ⊆ closedBall 0 R) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) : + TendstoUniformlyOn + (fun m u => SupportGeometry.support (projectionBody (P m)) (innerSL ℝ u)) + (brightness K) atTop (sphere 0 1) := by + have heq : (fun m u => SupportGeometry.support (projectionBody (P m)) (innerSL ℝ u)) = + (fun m u => brightness (P m) u) := by + funext m u + exact projectionBody_support hd (P m) (hP m) (hv m) (hi m) u + rw [heq] + exact approximation_brightness_uniform hd hP hK hscale hscalelim hR hKR hPK hKP + +theorem approximation_normalized_tendsto {d : ℕ} + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) (hi : (interior K).Nonempty) + {scale : ℕ → ℝ} (hscale : ∀ m, 0 < scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) : + Tendsto (fun m => normalizedProjectionVolume (P m)) atTop + (𝓝 (normalizedProjectionVolume K)) := by + obtain ⟨hv, hp⟩ := approximation_volume_tendsto hP hK hscale hscalelim hPK hKP + have hKpos : 0 < (volume K).toReal := + ENNReal.toReal_pos (ne_of_gt (Measure.measure_pos_of_nonempty_interior volume hi)) + hK.measure_lt_top.ne + exact hp.div (hv.pow (d - 1)) (pow_ne_zero _ hKpos.ne') + +theorem approximation_linear_image_volume_tendsto {d : ℕ} + {P : ℕ → Set (Euclidean d)} {K : Set (Euclidean d)} + (hP : ∀ m, IsCompact (P m)) (hK : IsCompact K) + {scale : ℕ → ℝ} (hscale : ∀ m, 0 < scale m) (hscalelim : Tendsto scale atTop (𝓝 1)) + (hPK : ∀ m, P m ⊆ K) (hKP : ∀ m, K ⊆ scale m • P m) + (L : Euclidean d ≃ₗ[ℝ] Euclidean d) : + Tendsto (fun m => (volume (L '' P m)).toReal) atTop (𝓝 (volume (L '' K)).toReal) ∧ + Tendsto (fun m => (volume (projectionBody (L '' P m))).toReal) atTop + (𝓝 (volume (projectionBody (L '' K))).toReal) := by + apply approximation_volume_tendsto + (fun m => (hP m).image L.toLinearMap.continuous_of_finiteDimensional) + (hK.image L.toLinearMap.continuous_of_finiteDimensional) hscale hscalelim + · exact fun m => image_mono (hPK m) + · intro m + rw [← image_smul_comm L.toLinearMap (scale m) (P m) + (fun x => L.toLinearMap.map_smul (scale m) x)] + exact image_mono (hKP m) + +theorem exists_projectionBody_approximating_sequence {d : ℕ} (hd : 2 ≤ d) + {K : Set (Euclidean d)} (hK : IsCompact K) (hv : Convex ℝ K) + (h0 : (0 : Euclidean d) ∈ interior K) : + ∃ (V : ℕ → Finset (Euclidean d)) (a R : ℝ), + let P := fun m => convexHull ℝ (V m : Set (Euclidean d)) + let ε := fun m : ℕ => R / ((m : ℝ) + 2) + let scale := fun m => 1 + ε m / a + 0 < a ∧ 0 < R ∧ K ⊆ closedBall 0 R ∧ Monotone P ∧ + (∀ m, closedBall (0 : Euclidean d) a ⊆ P m ∧ P m ⊆ K ∧ + K ⊆ P m + closedBall 0 (ε m) ∧ P m + closedBall 0 (ε m) ⊆ scale m • P m) ∧ + Tendsto ε atTop (𝓝 0) ∧ + TendstoUniformlyOn + (fun m u => SupportGeometry.support (projectionBody (P m)) (innerSL ℝ u)) + (brightness K) atTop (sphere 0 1) ∧ + (∀ m, closedBall (0 : Euclidean d) + (euclideanUnitBallVolume (d - 1) * a ^ (d - 1)) ⊆ projectionBody (P m) ∧ + projectionBody (P m) ⊆ closedBall 0 + (euclideanUnitBallVolume (d - 1) * R ^ (d - 1))) ∧ + closure (⋃ m, projectionBody (P m)) = projectionBody K ∧ + (∀ m, (volume (P m)).toReal ≤ (volume K).toReal ∧ + (volume K).toReal ≤ scale m ^ d * (volume (P m)).toReal ∧ + (volume (projectionBody (P m))).toReal ≤ (volume (projectionBody K)).toReal ∧ + (volume (projectionBody K)).toReal ≤ + scale m ^ (d * (d - 1)) * (volume (projectionBody (P m))).toReal) ∧ + Tendsto (fun m => (volume (P m)).toReal) atTop (𝓝 (volume K).toReal) ∧ + Tendsto (fun m => (volume (projectionBody (P m))).toReal) atTop + (𝓝 (volume (projectionBody K)).toReal) := by + obtain ⟨V, a, R, ha, hR, hKR, hmono, hball, hsand, heps⟩ := + exists_inscribed_polytope_sequence hK hv h0 + let P := fun m => convexHull ℝ (V m : Set (Euclidean d)) + let ε := fun m : ℕ => R / ((m : ℝ) + 2) + let scale := fun m => 1 + ε m / a + have hc : ∀ m, IsCompact (P m) := fun m => (V m).finite_toSet.isCompact_convexHull ℝ + have hvP : ∀ m, Convex ℝ (P m) := fun _ => convex_convexHull ℝ _ + have hiP : ∀ m, (interior (P m)).Nonempty := fun m => + ⟨0, interior_mono (hball m) (ball_subset_interior_closedBall (mem_ball_self ha))⟩ + have hPK : ∀ m, P m ⊆ K := fun m => (hsand m).1 + have hKP : ∀ m, K ⊆ scale m • P m := fun m => (hsand m).2.1.trans (hsand m).2.2 + have hscale : ∀ m, 1 ≤ scale m := by + intro m + dsimp [scale, ε] + exact le_add_of_nonneg_right (by positivity) + have hscalepos : ∀ m, 0 < scale m := fun m => zero_lt_one.trans_le (hscale m) + have hscalelim : Tendsto scale atTop (𝓝 1) := by + have hcont : Continuous (fun x : ℝ => 1 + x / a) := by fun_prop + simpa only [Function.comp_def, zero_div, add_zero] using (hcont.tendsto 0).comp heps + obtain ⟨hvol, hpivol⟩ := approximation_volume_tendsto hc hK hscalepos hscalelim hPK hKP + refine ⟨V, a, R, ha, hR, hKR, hmono, ?_, heps, ?_, ?_, ?_, ?_, hvol, hpivol⟩ + · exact fun m => ⟨hball m, (hsand m).1, (hsand m).2⟩ + · exact approximation_support_uniform hd hc hvP hiP hK hscale hscalelim hR.le hKR hPK hKP + · intro m + exact ⟨ball_subset_projectionBody hd (hc m) ha.le (hball m), + projectionBody_subset_ball hd hR.le ((hPK m).trans hKR)⟩ + · exact approximation_projectionBody_union_closure hc hK hscalepos hscalelim hPK hKP + · intro m + have hbody := approximation_volume_sandwich (hc m) hK (hscalepos m).le (hPK m) (hKP m) + have hpi := approximation_projectionBody_volume_sandwich (hc m) hK (hscalepos m) (hPK m) (hKP m) + exact ⟨hbody.1, hbody.2, hpi⟩ + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexAffine.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexAffine.lean new file mode 100644 index 0000000000000000000000000000000000000000..c5fe489161aebe5017ec24d95edd4da6571fc266 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexAffine.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.ProjectionVolume.SimplexValue +import OAI.Geometry.ProjectionVolume.AffineCovariance +import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional + +namespace OAI + +open Set Module +open scoped Pointwise + +namespace Paper092 + +theorem simplex_eq_vadd_linearEquiv_image {n : ℕ} + (s : Affine.Simplex ℝ (Euclidean n) n) : + ∃ (L : Euclidean n ≃ₗ[ℝ] Euclidean n) (v : Euclidean n), + convexHull ℝ (range s.points) = v +ᵥ (L '' standardSimplex n) := by + let b : AffineBasis (Fin (n + 1)) ℝ (Euclidean n) := + ⟨s.points, s.independent, s.affineSpan_eq_top (by simp)⟩ + let edgeBasis : Basis (Fin n) ℝ (Euclidean n) := + (b.basisOf 0).reindex (finSuccAboveEquiv 0).symm + let L : Euclidean n ≃ₗ[ℝ] Euclidean n := + (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.equiv edgeBasis (Equiv.refl _) + have hL (i : Fin n) : L (EuclideanSpace.single i 1) = + s.points i.succ - s.points 0 := by + change (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.equiv edgeBasis (Equiv.refl _) + (EuclideanSpace.single i 1) = _ + rw [← EuclideanSpace.basisFun_apply] + change (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.equiv edgeBasis (Equiv.refl _) + ((EuclideanSpace.basisFun (Fin n) ℝ).toBasis i) = _ + rw [Basis.equiv_apply] + simp [edgeBasis, b, finSuccAboveEquiv_apply, vsub_eq_sub] + rfl + let f : Euclidean n ≃ᵃ[ℝ] Euclidean n := + AffineEquiv.ofLinearEquiv L 0 (s.points 0) + have hf0 : f 0 = s.points 0 := by simp [f] + have hfi (i : Fin n) : f (EuclideanSpace.single i 1) = s.points i.succ := by + simp [f, hL, vsub_eq_sub, vadd_eq_add] + have hf : f '' standardSimplex n = convexHull ℝ (range s.points) := by + change f.toAffineMap '' convexHull ℝ _ = _ + rw [f.toAffineMap.image_convexHull] + congr 1 + change f '' insert (0 : Euclidean n) (range (fun i : Fin n => + EuclideanSpace.single i (1 : ℝ))) = _ + rw [image_insert_eq, ← range_comp, hf0] + have hfun : f ∘ (fun i : Fin n => EuclideanSpace.single i (1 : ℝ)) = + Fin.tail s.points := funext hfi + rw [hfun] + exact (Fin.range_fin_succ s.points).symm + refine ⟨L, s.points 0, hf.symm.trans ?_⟩ + rw [← image_vadd, image_image] + congr 1 + funext x + simp [f, vsub_eq_sub, vadd_eq_add, add_comm] + +theorem simplex_is_convex_body {n : ℕ} (s : Affine.Simplex ℝ (Euclidean n) n) : + IsCompact (convexHull ℝ (range s.points)) ∧ + Convex ℝ (convexHull ℝ (range s.points)) ∧ + (interior (convexHull ℝ (range s.points))).Nonempty := by + exact ⟨(finite_range s.points).isCompact_convexHull ℝ, convex_convexHull ℝ _, + interior_convexHull_nonempty_iff_affineSpan_eq_top.mpr (s.affineSpan_eq_top (by simp))⟩ + +theorem simplex_normalizedProjectionVolume {n : ℕ} (hn : 0 < n) + (s : Affine.Simplex ℝ (Euclidean n) n) : + normalizedProjectionVolume (convexHull ℝ (range s.points)) = simplexConstant n := by + obtain ⟨L, v, hs⟩ := simplex_eq_vadd_linearEquiv_image s + rw [hs] + exact standardSimplex_affine_image_normalizedProjectionVolume hn L v + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexBrightness.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexBrightness.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7c57f70d86fd2f2aece8e1597f93d3d94247aa4 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexBrightness.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.ProjectionVolume.SimplexNormals +import OAI.Geometry.ProjectionVolume.FacetAreas +import OAI.Geometry.ProjectionVolume.ProjectionJacobian + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +theorem simplexFacet_brightness (n : ℕ) (a : Option (Fin (n + 1))) + (u : Euclidean (n + 1)) : + brightness (simplexFacet (n + 1) a) u = + |simplexVelocity u a| / (Nat.factorial n : ℝ) := by + have hfac : (0 : ℝ) < Nat.factorial n := by exact_mod_cast Nat.factorial_pos n + cases a with + | some i => + rw [brightness_of_subset_affine_hyperplane u (EuclideanSpace.single i 1) + (coordinate_normal_norm i) 0 _ (simplexFacet_coordinate_plane i)] + rw [Nat.add_sub_cancel, simplexFacet_coordinate_area, + ENNReal.toReal_ofReal (by positivity)] + simp [EuclideanSpace.inner_single_right, simplexVelocity, div_eq_mul_inv] + | none => + have hsqrt : 0 < Real.sqrt (n + 1 : ℝ) := Real.sqrt_pos.mpr (by positivity) + rw [brightness_of_subset_affine_hyperplane u (diagonalUnitNormal (n + 1)) + (diagonalUnitNormal_norm _ (Nat.succ_pos n)) (Real.sqrt ((n + 1 : ℕ) : ℝ))⁻¹ _ + simplexFacet_diagonal_plane] + rw [Nat.add_sub_cancel, simplexFacet_diagonal_area, + ENNReal.toReal_ofReal (by positivity), inner_diagonalUnitNormal] + simp only [simplexVelocity, abs_neg, abs_div, Nat.cast_add, Nat.cast_one, + abs_of_pos hsqrt] + field_simp + +theorem standardSimplex_brightness_succ (n : ℕ) (u : Euclidean (n + 1)) : + brightness (standardSimplex (n + 1)) u = + ((∑ i, |u i|) + |∑ i, u i|) / (2 * (Nat.factorial n : ℝ)) := by + by_cases hu : u = 0 + · simp [hu, brightness] + calc + brightness (standardSimplex (n + 1)) u = + ∑ a : {a : Option (Fin (n + 1)) // simplexVelocity u a < 0}, + brightness (simplexFacet (n + 1) a.val) u := by + rw [brightness_simplex_eq_front_sum u hu, Finset.mul_sum] + rfl + _ = ∑ a : {a : Option (Fin (n + 1)) // simplexVelocity u a < 0}, + -simplexVelocity u a.val / (Nat.factorial n : ℝ) := by + apply Finset.sum_congr rfl + intro a _ + rw [simplexFacet_brightness, abs_of_neg a.property] + _ = (∑ a : {a : Option (Fin (n + 1)) // simplexVelocity u a < 0}, + -simplexVelocity u a.val) / (Nat.factorial n : ℝ) := by rw [Finset.sum_div] + _ = ((∑ i, |u i|) + |∑ i, u i|) / (2 * (Nat.factorial n : ℝ)) := by + rw [simplex_front_coefficient] + ring + +theorem standardSimplex_brightness (d : ℕ) (hd : 0 < d) (u : Euclidean d) : + brightness (standardSimplex d) u = + ((∑ i, |u i|) + |∑ i, u i|) / (2 * (Nat.factorial (d - 1) : ℝ)) := by + cases d with + | zero => omega + | succ n => simpa using standardSimplex_brightness_succ n u + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexCoordinates.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0164dfa0b977eba874a27d226f76909581535a51 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexCoordinates.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.ProjectionVolume.SimplexGeometry +import Mathlib.Analysis.Convex.Combination + +namespace OAI + +noncomputable section + +open Set +open scoped BigOperators + +namespace Paper092 + +theorem mem_standardSimplex_iff {n : ℕ} (x : Euclidean n) : + x ∈ standardSimplex n ↔ (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1 := by + constructor + · intro hx + have hsubset : standardSimplex n ⊆ + {y : Euclidean n | (∀ i, 0 ≤ y i) ∧ ∑ i, y i ≤ 1} := by + apply convexHull_min + · rintro y (rfl | ⟨i, rfl⟩) + · simp + · constructor + · intro j + simp only [PiLp.single_apply] + split_ifs <;> norm_num + · simp [PiLp.single_apply] + · intro u hu v hv a b ha hb hab + constructor + · intro i + change 0 ≤ a * u i + b * v i + exact add_nonneg (mul_nonneg ha (hu.1 i)) (mul_nonneg hb (hv.1 i)) + · change ∑ i, (a * u i + b * v i) ≤ 1 + rw [Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum] + calc + a * ∑ i, u i + b * ∑ i, v i ≤ a * 1 + b * 1 := + add_le_add (mul_le_mul_of_nonneg_left hu.2 ha) + (mul_le_mul_of_nonneg_left hv.2 hb) + _ = 1 := by simpa using hab + exact hsubset hx + · rintro ⟨hpos, hsum⟩ + let w : Option (Fin n) → ℝ + | none => 1 - ∑ i, x i + | some i => x i + let v : Option (Fin n) → Euclidean n + | none => 0 + | some i => EuclideanSpace.single i 1 + refine mem_convexHull_of_exists_fintype w v ?_ ?_ ?_ ?_ + · intro i + cases i with + | none => exact sub_nonneg.mpr hsum + | some i => exact hpos i + · simp [w, Fintype.sum_option] + · intro i + cases i with + | none => exact mem_insert 0 _ + | some i => exact mem_insert_of_mem 0 (mem_range_self i) + · ext j + simp [w, v, Fintype.sum_option, Pi.single_apply] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexCounterexample.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexCounterexample.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c4e7198d975b5a109922189ad2ff9f5e6440688 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexCounterexample.lean @@ -0,0 +1,18 @@ +import OAI.Geometry.ProjectionVolume.ProductCounterexample +import OAI.Geometry.ProjectionVolume.SimplexAffine + +namespace OAI + +namespace Paper092 + +theorem simplex_normalizedProjectionVolume_lt_productWitness + (s : Affine.Simplex ℝ (Euclidean 20) 20) : + normalizedProjectionVolume (convexHull ℝ (Set.range s.points)) < + normalizedProjectionVolume productWitness := by + rw [simplex_normalizedProjectionVolume (by norm_num), + productWitness_normalizedProjectionVolume] + exact dimension_twenty_strict + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexGeometry.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e555521e93008a34c92638ae294983072d96011 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexGeometry.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.ProjectionVolume.Basic +import Mathlib.Analysis.Normed.Affine.AddTorsorBases +import Mathlib.Analysis.Convex.Topology +import Mathlib.MeasureTheory.Measure.OpenPos + +namespace OAI + +noncomputable section + +open Set MeasureTheory + +namespace Paper092 + +theorem standardSimplex_isCompact (n : ℕ) : IsCompact (standardSimplex n) := + ((Set.finite_range _).insert 0).isCompact_convexHull ℝ + +theorem standardSimplex_convex (n : ℕ) : Convex ℝ (standardSimplex n) := + convex_convexHull ℝ _ + +theorem standardSimplex_interior_nonempty (n : ℕ) : + (interior (standardSimplex n)).Nonempty := by + apply interior_convexHull_nonempty_iff_affineSpan_eq_top.mpr + have hspan : Submodule.span ℝ + (range fun i : Fin n => EuclideanSpace.single i (1 : ℝ)) = ⊤ := by + have hfun : (fun i : Fin n => EuclideanSpace.single i (1 : ℝ)) = + (EuclideanSpace.basisFun (Fin n) ℝ).toBasis := by + funext i + simp + rw [hfun] + exact (EuclideanSpace.basisFun (Fin n) ℝ).toBasis.span_eq + apply SetLike.coe_injective + rw [affineSpan_insert_zero, hspan] + rfl + +def splitBlocks : Euclidean 20 ≃L[ℝ] Euclidean 10 × Euclidean 10 := + (((WithLp.linearEquiv 2 ℝ (Fin 20 → ℝ)).trans + (LinearEquiv.piCongrLeft ℝ (fun _ : Fin 20 => ℝ) + (finSumFinEquiv : Fin 10 ⊕ Fin 10 ≃ Fin 20)).symm).trans + (LinearEquiv.sumArrowLequivProdArrow (Fin 10) (Fin 10) ℝ ℝ) |>.trans + (LinearEquiv.prodCongr (WithLp.linearEquiv 2 ℝ (Fin 10 → ℝ)).symm + (WithLp.linearEquiv 2 ℝ (Fin 10 → ℝ)).symm)).toContinuousLinearEquiv + +theorem splitBlocks_apply (x : Euclidean 20) : + splitBlocks x = (firstBlock x, secondBlock x) := rfl + +theorem productWitness_eq_preimage : + productWitness = splitBlocks ⁻¹' (standardSimplex 10 ×ˢ standardSimplex 10) := rfl + +theorem productWitness_isCompact : IsCompact productWitness := by + rw [productWitness_eq_preimage] + exact splitBlocks.toHomeomorph.isCompact_preimage.mpr + ((standardSimplex_isCompact 10).prod (standardSimplex_isCompact 10)) + +theorem productWitness_convex : Convex ℝ productWitness := by + rw [productWitness_eq_preimage] + exact ((standardSimplex_convex 10).prod (standardSimplex_convex 10)).linear_preimage + splitBlocks.toLinearMap + +theorem productWitness_interior_nonempty : (interior productWitness).Nonempty := by + rw [productWitness_eq_preimage] + change (interior (splitBlocks.toHomeomorph ⁻¹' + (standardSimplex 10 ×ˢ standardSimplex 10))).Nonempty + rw [← splitBlocks.toHomeomorph.preimage_interior, interior_prod_eq] + exact ((standardSimplex_interior_nonempty 10).prod + (standardSimplex_interior_nonempty 10)).preimage splitBlocks.surjective + +theorem productWitness_is_convex_body : + IsCompact productWitness ∧ Convex ℝ productWitness ∧ (interior productWitness).Nonempty := + ⟨productWitness_isCompact, productWitness_convex, productWitness_interior_nonempty⟩ + +theorem productWitness_volume_pos : 0 < (volume productWitness).toReal := + ENNReal.toReal_pos (ne_of_gt (Measure.measure_pos_of_nonempty_interior volume + productWitness_interior_nonempty)) productWitness_isCompact.measure_lt_top.ne + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexNormals.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexNormals.lean new file mode 100644 index 0000000000000000000000000000000000000000..30c65998348ea8f18242931602d7d7c5222ed2e5 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexNormals.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.ProjectionVolume.SimplexProjection +import OAI.Geometry.ProjectionVolume.ProjectionCoefficients + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped RealInnerProductSpace + +namespace Paper092 + +def diagonalVector (d : ℕ) : Euclidean d := WithLp.toLp 2 (1 : Fin d → ℝ) + +def diagonalUnitNormal (d : ℕ) : Euclidean d := + (Real.sqrt d)⁻¹ • diagonalVector d + +theorem diagonalVector_inner {d : ℕ} (u : Euclidean d) : + ⟪diagonalVector d, u⟫ = ∑ i, u i := by + simp [diagonalVector, EuclideanSpace.inner_eq_star_dotProduct, dotProduct] + +theorem inner_diagonalVector {d : ℕ} (u : Euclidean d) : + ⟪u, diagonalVector d⟫ = ∑ i, u i := by + rw [real_inner_comm, diagonalVector_inner] + +theorem diagonalVector_norm (d : ℕ) : ‖diagonalVector d‖ = Real.sqrt d := by + rw [← Real.sqrt_sq (norm_nonneg _), ← real_inner_self_eq_norm_sq, diagonalVector_inner] + simp [diagonalVector] + +theorem diagonalUnitNormal_norm (d : ℕ) (hd : 0 < d) : ‖diagonalUnitNormal d‖ = 1 := by + rw [diagonalUnitNormal, norm_smul, Real.norm_eq_abs, abs_inv, + abs_of_nonneg (Real.sqrt_nonneg _), diagonalVector_norm] + exact inv_mul_cancel₀ (ne_of_gt (Real.sqrt_pos.mpr (by exact_mod_cast hd))) + +theorem diagonalUnitNormal_inner {d : ℕ} (x : Euclidean d) : + ⟪diagonalUnitNormal d, x⟫ = (∑ i, x i) / Real.sqrt d := by + rw [diagonalUnitNormal, real_inner_smul_left, diagonalVector_inner] + ring + +theorem inner_diagonalUnitNormal {d : ℕ} (u : Euclidean d) : + ⟪u, diagonalUnitNormal d⟫ = (∑ i, u i) / Real.sqrt d := by + rw [real_inner_comm, diagonalUnitNormal_inner] + +theorem coordinate_normal_norm {d : ℕ} (i : Fin d) : + ‖EuclideanSpace.single i (1 : ℝ)‖ = 1 := by simp + +theorem simplexFacet_coordinate_plane {d : ℕ} (i : Fin d) (x : Euclidean d) + (hx : x ∈ simplexFacet d (some i)) : + ⟪EuclideanSpace.single i (1 : ℝ), x⟫ = 0 := by + simpa [EuclideanSpace.inner_single_left, simplexCoordinates] using hx.2 + +theorem simplexFacet_diagonal_plane {d : ℕ} (x : Euclidean d) + (hx : x ∈ simplexFacet d none) : + ⟪diagonalUnitNormal d, x⟫ = (Real.sqrt d)⁻¹ := by + have hsum : ∑ i, x i = 1 := by + have h := hx.2 + change 1 - ∑ i, x i = 0 at h + linarith + rw [diagonalUnitNormal_inner, hsum, one_div] + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexPolytope.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexPolytope.lean new file mode 100644 index 0000000000000000000000000000000000000000..a97280b7adb7d91d252f8253f0f272e7b54386fe --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexPolytope.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.ProjectionVolume.ProductPolytope +import OAI.Geometry.ProjectionVolume.SimplexNormals + +namespace OAI + +noncomputable section +open Set MeasureTheory +open scoped BigOperators RealInnerProductSpace + +namespace Paper092 + +def standardSimplexNormal (d : ℕ) : Option (Fin d) → Euclidean d + | none => diagonalUnitNormal d + | some i => -EuclideanSpace.single i (1 : ℝ) + +def standardSimplexOffset (d : ℕ) : Option (Fin d) → ℝ + | none => (Real.sqrt d)⁻¹ + | some _ => 0 + +theorem standardSimplex_halfspaces (d : ℕ) (hd : 0 < d) : + {x | ∀ i, ⟪standardSimplexNormal d i, x⟫ ≤ standardSimplexOffset d i} = + standardSimplex d := by + have hs : 0 < Real.sqrt d := Real.sqrt_pos.mpr (by exact_mod_cast hd) + ext x + rw [mem_standardSimplex_iff] + simp [Option.forall, standardSimplexNormal, standardSimplexOffset, diagonalUnitNormal_inner, + EuclideanSpace.inner_single_left, ← one_div, + div_le_div_iff_of_pos_right hs, and_comm] + +def standardSimplexPolytope (d : ℕ) (hd : 0 < d) : HPolytope d (Option (Fin d)) where + normal := standardSimplexNormal d + offset := standardSimplexOffset d + normal_unit i := by + cases i with + | none => exact diagonalUnitNormal_norm d hd + | some i => simp [standardSimplexNormal] + compact := by + rw [standardSimplex_halfspaces d hd] + exact standardSimplex_isCompact d + strict_feasible := by + have hs : 0 < Real.sqrt d := Real.sqrt_pos.mpr (by exact_mod_cast hd) + have hc : (0 : ℝ) < (d : ℝ) + 1 := by positivity + refine ⟨((d : ℝ) + 1)⁻¹ • diagonalVector d, ?_⟩ + intro i + cases i with + | none => + change ⟪diagonalUnitNormal d, _⟫ < (Real.sqrt d)⁻¹ + rw [diagonalUnitNormal_inner] + have hsum : (∑ i : Fin d, (((d : ℝ) + 1)⁻¹ • diagonalVector d) i) = + (d : ℝ) / (d + 1) := by + simp [diagonalVector, div_eq_mul_inv] + rw [hsum] + calc + _ < 1 / Real.sqrt d := (div_lt_div_iff_of_pos_right hs).mpr + ((div_lt_one hc).mpr (by linarith)) + _ = _ := one_div _ + | some i => + change ⟪-EuclideanSpace.single i (1 : ℝ), _⟫ < 0 + rw [inner_neg_left, EuclideanSpace.inner_single_left] + simpa [diagonalVector] using neg_neg_of_pos (inv_pos.mpr hc) + distinct := by + intro i j h + cases i with + | none => + cases j with + | none => rfl + | some j => + have hh := congrArg (fun q : Euclidean d × ℝ => q.2) h + change (Real.sqrt d)⁻¹ = 0 at hh + have hs : Real.sqrt d ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by exact_mod_cast hd)) + exact False.elim ((inv_ne_zero hs) hh) + | some i => + cases j with + | none => + have hh := congrArg (fun q : Euclidean d × ℝ => q.2) h + change 0 = (Real.sqrt d)⁻¹ at hh + have hs : Real.sqrt d ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by exact_mod_cast hd)) + exact False.elim ((inv_ne_zero hs) hh.symm) + | some j => + apply congrArg some + by_contra hij + have hh := congrArg (fun q : Euclidean d × ℝ => q.1 i) h + simp [standardSimplexNormal, hij] at hh + +@[simp] theorem standardSimplexPolytope_body (d : ℕ) (hd : 0 < d) : + (standardSimplexPolytope d hd).body = standardSimplex d := + standardSimplex_halfspaces d hd + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexProduct.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..b05788f6a2218adf2f2b0d310cd8ccd73ffc2d1d --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexProduct.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.ProjectionVolume.GeneralProduct +import OAI.Geometry.ProjectionVolume.SimplexPolytope +import OAI.Geometry.ProjectionVolume.SimplexValue +import OAI.Geometry.ProjectionVolume.Arithmetic + +namespace OAI + +noncomputable section +open Set MeasureTheory + +namespace Paper092 + +theorem standardSimplex_product_normalizedProjectionVolume {r s : ℕ} + (hr : 2 ≤ r) (hs : 2 ≤ s) : + normalizedProjectionVolume (cartesianBody (standardSimplex r) (standardSimplex s)) = + simplexConstant r * simplexConstant s := by + have hr0 : 0 < r := by omega + have hs0 : 0 < s := by omega + have h := normalizedProjectionVolume_product hr hs + (standardSimplexPolytope r hr0) (standardSimplexPolytope s hs0) + simpa only [standardSimplexPolytope_body, + standardSimplex_normalizedProjectionVolume r hr0, + standardSimplex_normalizedProjectionVolume s hs0] using h + +theorem simplex_product_ratio {r s : ℕ} (hr : 2 ≤ r) (hs : 2 ≤ s) : + normalizedProjectionVolume (cartesianBody (standardSimplex r) (standardSimplex s)) / + simplexConstant (r + s) = + ((r + 1 : ℝ) * (s + 1) / (r + s + 1)) * (Nat.choose (r + s) r : ℝ) * + ((r : ℝ)^r * (s : ℝ)^s / ((r+s : ℕ) : ℝ)^(r+s)) := by + rw [standardSimplex_product_normalizedProjectionVolume hr hs] + exact simplex_constant_product_ratio r s (by omega) (by omega) + +theorem universal_upper_constant_ge_product {r s : ℕ} (hr : 2 ≤ r) (hs : 2 ≤ s) + (C : ℝ) (hC : ∀ K : Set (Euclidean (r+s)), IsCompact K → Convex ℝ K → + (interior K).Nonempty → normalizedProjectionVolume K ≤ C) : + simplexConstant r * simplexConstant s ≤ C := by + rw [← standardSimplex_product_normalizedProjectionVolume hr hs] + exact hC _ (cartesianBody_isCompact (standardSimplex_isCompact r) (standardSimplex_isCompact s)) + (cartesianBody_convex (standardSimplex_convex r) (standardSimplex_convex s)) + (cartesianBody_interior_nonempty (standardSimplex_interior_nonempty r) + (standardSimplex_interior_nonempty s)) + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexProjection.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd2313012b7fba03908f71452423858b7686e8db --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexProjection.lean @@ -0,0 +1,321 @@ +import OAI.Geometry.ProjectionVolume.SimplexGeometry +import OAI.Geometry.ProjectionVolume.SimplexCoordinates +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Abel +import Mathlib.Tactic.Ring + +namespace OAI + +universe uι + +open Set MeasureTheory +open scoped RealInnerProductSpace + +noncomputable section + +namespace Paper092 + +theorem projection_eq_iff_parallel {d : ℕ} (u x z : Euclidean d) : + (normalHyperplane u).orthogonalProjectionOnto x = + (normalHyperplane u).orthogonalProjectionOnto z ↔ + ∃ t : ℝ, x = z + t • u := by + rw [← sub_eq_zero, ← map_sub, Submodule.orthogonalProjectionOnto_eq_zero_iff] + rw [normalHyperplane, Submodule.orthogonal_orthogonal, Submodule.mem_span_singleton] + constructor + · rintro ⟨t, ht⟩ + refine ⟨t, ?_⟩ + rw [ht] + abel + · rintro ⟨t, rfl⟩ + exact ⟨t, by abel⟩ + +theorem mem_projection_iff_line_meets {d : ℕ} (u : Euclidean d) + (K : Set (Euclidean d)) (y : normalHyperplane u) : + y ∈ (normalHyperplane u).orthogonalProjectionOnto '' K ↔ + ∃ t : ℝ, (y : Euclidean d) + t • u ∈ K := by + constructor + · rintro ⟨x, hx, hxy⟩ + have hp : (normalHyperplane u).orthogonalProjectionOnto x = + (normalHyperplane u).orthogonalProjectionOnto (y : Euclidean d) := by + simpa using hxy + obtain ⟨t, rfl⟩ := (projection_eq_iff_parallel u x y).mp hp + exact ⟨t, hx⟩ + · rintro ⟨t, ht⟩ + refine ⟨(y : Euclidean d) + t • u, ht, ?_⟩ + have hp := (projection_eq_iff_parallel u ((y : Euclidean d) + t • u) y).mpr ⟨t, rfl⟩ + simpa using hp + +theorem exists_step_to_boundary {ι : Type uι} [Fintype ι] (q v : ι → ℝ) + (hq : ∀ i, 0 ≤ q i) (hv : ∃ i, v i < 0) : + ∃ t : ℝ, 0 ≤ t ∧ (∀ i, 0 ≤ q i + t * v i) ∧ + ∃ i, v i < 0 ∧ q i + t * v i = 0 := by + classical + let s := Finset.univ.filter (fun i => v i < 0) + have hs : s.Nonempty := by + obtain ⟨i, hi⟩ := hv + exact ⟨i, Finset.mem_filter.mpr ⟨Finset.mem_univ i, hi⟩⟩ + obtain ⟨i, hi, hmin⟩ := Finset.exists_min_image s (fun j => q j / (-v j)) hs + have hi0 : v i < 0 := (Finset.mem_filter.mp hi).2 + have hneg : 0 < -v i := neg_pos.mpr hi0 + have ht : 0 ≤ q i / (-v i) := div_nonneg (hq i) hneg.le + have heq : q i + q i / (-v i) * v i = 0 := by + have hmul := div_mul_cancel₀ (q i) (ne_of_gt hneg) + linarith + refine ⟨q i / (-v i), ht, ?_, i, hi0, heq⟩ + intro j + by_cases hj : v j < 0 + · have hjmem : j ∈ s := Finset.mem_filter.mpr ⟨Finset.mem_univ j, hj⟩ + have hle := (le_div_iff₀ (neg_pos.mpr hj)).mp (hmin j hjmem) + linarith + · exact add_nonneg (hq j) (mul_nonneg ht (le_of_not_gt hj)) + +def simplexCoordinates {d : ℕ} (x : Euclidean d) : Option (Fin d) → ℝ + | none => 1 - ∑ i, x i + | some i => x i + +def simplexVelocity {d : ℕ} (u : Euclidean d) : Option (Fin d) → ℝ + | none => -∑ i, u i + | some i => u i + +theorem simplexCoordinates_nonneg_iff {d : ℕ} (x : Euclidean d) : + (∀ a, 0 ≤ simplexCoordinates x a) ↔ + (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1 := by + constructor + · intro h + exact ⟨fun i => h (some i), sub_nonneg.mp (h none)⟩ + · rintro ⟨h0, h1⟩ a + cases a with + | none => exact sub_nonneg.mpr h1 + | some i => exact h0 i + +theorem simplexCoordinates_add_smul {d : ℕ} (x u : Euclidean d) (t : ℝ) + (a : Option (Fin d)) : + simplexCoordinates (x + t • u) a = + simplexCoordinates x a + t * simplexVelocity u a := by + cases a with + | none => + simp only [simplexCoordinates, simplexVelocity, PiLp.add_apply, PiLp.smul_apply, + smul_eq_mul, Finset.sum_add_distrib, ← Finset.mul_sum] + ring + | some i => rfl + +theorem simplexVelocity_neg_exists {d : ℕ} (u : Euclidean d) (hu : u ≠ 0) : + ∃ a, simplexVelocity u a < 0 := by + by_contra h + push Not at h + have h0 : ∀ i, 0 ≤ u i := fun i => h (some i) + have hsum : ∑ i, u i ≤ 0 := by + simpa only [simplexVelocity, neg_nonneg] using h none + apply hu + ext i + apply le_antisymm + · exact (Finset.single_le_sum (fun j _ => h0 j) (Finset.mem_univ i)).trans hsum + · exact h0 i + +theorem exists_simplex_front_point {d : ℕ} (x u : Euclidean d) (hu : u ≠ 0) + (hx : ∀ a, 0 ≤ simplexCoordinates x a) : + ∃ t : ℝ, 0 ≤ t ∧ (∀ a, 0 ≤ simplexCoordinates (x + t • u) a) ∧ + ∃ a, simplexVelocity u a < 0 ∧ simplexCoordinates (x + t • u) a = 0 := by + obtain ⟨t, ht, hq, a, ha, hqa⟩ := + exists_step_to_boundary (simplexCoordinates x) (simplexVelocity u) hx + (simplexVelocity_neg_exists u hu) + refine ⟨t, ht, ?_, a, ha, ?_⟩ + · simpa only [simplexCoordinates_add_smul] using hq + · simpa only [simplexCoordinates_add_smul] using hqa + +theorem projection_injective_on_simplex_front {d : ℕ} (u x z : Euclidean d) + (hx : ∀ a, 0 ≤ simplexCoordinates x a) (hz : ∀ a, 0 ≤ simplexCoordinates z a) + (hxf : ∃ a, simplexVelocity u a < 0 ∧ simplexCoordinates x a = 0) + (hzf : ∃ a, simplexVelocity u a < 0 ∧ simplexCoordinates z a = 0) + (hp : (normalHyperplane u).orthogonalProjectionOnto x = + (normalHyperplane u).orthogonalProjectionOnto z) : x = z := by + obtain ⟨t, rfl⟩ := (projection_eq_iff_parallel u x z).mp hp + obtain ⟨a, ha, hxa⟩ := hxf + obtain ⟨b, hb, hzb⟩ := hzf + rw [simplexCoordinates_add_smul] at hxa + have ht0 : 0 ≤ t := by + by_contra ht + have hprod := mul_pos_of_neg_of_neg (lt_of_not_ge ht) ha + linarith [hz a] + have ht1 : t ≤ 0 := by + by_contra ht + have hprod := mul_neg_of_pos_of_neg (lt_of_not_ge ht) hb + have hxb := hx b + rw [simplexCoordinates_add_smul, hzb] at hxb + linarith + simp [le_antisymm ht1 ht0] + +theorem mem_standardSimplex_iff_coordinates {d : ℕ} (x : Euclidean d) : + x ∈ standardSimplex d ↔ ∀ a, 0 ≤ simplexCoordinates x a := + (mem_standardSimplex_iff x).trans (simplexCoordinates_nonneg_iff x).symm + +theorem mem_simplex_projection_iff {d : ℕ} (u : Euclidean d) (y : normalHyperplane u) : + y ∈ (normalHyperplane u).orthogonalProjectionOnto '' standardSimplex d ↔ + ∃ t : ℝ, (∀ i, 0 ≤ y.val i + t * u i) ∧ + (∑ i, y.val i) + t * (∑ i, u i) ≤ 1 := by + rw [mem_projection_iff_line_meets] + simp only [mem_standardSimplex_iff, PiLp.add_apply, PiLp.smul_apply, smul_eq_mul, + Finset.sum_add_distrib, ← Finset.mul_sum] + +def simplexFacet (d : ℕ) (a : Option (Fin d)) : Set (Euclidean d) := + {x | x ∈ standardSimplex d ∧ simplexCoordinates x a = 0} + +theorem simplex_projection_eq_front_cover {d : ℕ} (u : Euclidean d) (hu : u ≠ 0) : + (normalHyperplane u).orthogonalProjectionOnto '' standardSimplex d = + ⋃ a : {a : Option (Fin d) // simplexVelocity u a < 0}, + (normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a.val := by + ext y + constructor + · rintro ⟨x, hx, rfl⟩ + obtain ⟨t, _, hq, a, ha, hqa⟩ := + exists_simplex_front_point x u hu ((mem_standardSimplex_iff_coordinates x).mp hx) + refine mem_iUnion.mpr ⟨⟨a, ha⟩, x + t • u, ?_, ?_⟩ + · exact ⟨(mem_standardSimplex_iff_coordinates _).mpr hq, hqa⟩ + · exact (projection_eq_iff_parallel u (x + t • u) x).mpr ⟨t, rfl⟩ + · intro hy + obtain ⟨a, x, hx, hpx⟩ := mem_iUnion.mp hy + exact ⟨x, hx.1, hpx⟩ + +theorem front_facets_projection_inter_eq {d : ℕ} (u : Euclidean d) + (a b : Option (Fin d)) (ha : simplexVelocity u a < 0) + (hb : simplexVelocity u b < 0) : + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a) ∩ + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d b) = + (normalHyperplane u).orthogonalProjectionOnto '' (simplexFacet d a ∩ simplexFacet d b) := by + apply le_antisymm + · rintro y ⟨⟨x, hx, hpx⟩, ⟨z, hz, hpz⟩⟩ + have heq : x = z := projection_injective_on_simplex_front u x z + ((mem_standardSimplex_iff_coordinates x).mp hx.1) + ((mem_standardSimplex_iff_coordinates z).mp hz.1) + ⟨a, ha, hx.2⟩ ⟨b, hb, hz.2⟩ (hpx.trans hpz.symm) + subst z + exact ⟨x, ⟨hx, hz⟩, hpx⟩ + · exact image_inter_subset _ _ _ + +def simplexCoordinateAffine {d : ℕ} : Option (Fin d) → Euclidean d →ᵃ[ℝ] ℝ + | none => AffineMap.const ℝ (Euclidean d) 1 - + (∑ i : Fin d, (PiLp.projₗ 2 (fun _ : Fin d => ℝ) i : Euclidean d →ₗ[ℝ] ℝ)).toAffineMap + | some i => (PiLp.projₗ 2 (fun _ : Fin d => ℝ) i : Euclidean d →ₗ[ℝ] ℝ).toAffineMap + +theorem simplexCoordinateAffine_apply {d : ℕ} (a : Option (Fin d)) (x : Euclidean d) : + simplexCoordinateAffine a x = simplexCoordinates x a := by + cases a <;> simp [simplexCoordinateAffine, simplexCoordinates] + +def simplexVertex {d : ℕ} : Option (Fin d) → Euclidean d + | none => 0 + | some i => EuclideanSpace.single i 1 + +theorem simplexCoordinates_vertex {d : ℕ} (a b : Option (Fin d)) : + simplexCoordinates (simplexVertex a) b = if a = b then 1 else 0 := by + cases a <;> cases b <;> simp [simplexVertex, simplexCoordinates, PiLp.single_apply, eq_comm] + +theorem facet_seam_projection_invariant {d : ℕ} (u x : Euclidean d) + (a b : Option (Fin d)) : + simplexVelocity u b * simplexCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean d) a - + simplexVelocity u a * simplexCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean d) b = + simplexVelocity u b * simplexCoordinates x a - + simplexVelocity u a * simplexCoordinates x b := by + obtain ⟨t, ht⟩ := (projection_eq_iff_parallel u x + ((normalHyperplane u).orthogonalProjectionOnto x)).mp + ((normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self + ((normalHyperplane u).orthogonalProjectionOnto x)).symm + conv_rhs => rw [ht, simplexCoordinates_add_smul, simplexCoordinates_add_smul] + ring + +theorem projected_facet_seam_null {d : ℕ} (u : Euclidean d) (a b : Option (Fin d)) + (hab : a ≠ b) (hb : simplexVelocity u b ≠ 0) : + volume {y : normalHyperplane u | + simplexVelocity u b * simplexCoordinates y.val a - + simplexVelocity u a * simplexCoordinates y.val b = 0} = 0 := by + let f : normalHyperplane u →ᵃ[ℝ] ℝ := + simplexVelocity u b • ((simplexCoordinateAffine a).comp + (normalHyperplane u).subtype.toAffineMap) - + simplexVelocity u a • ((simplexCoordinateAffine b).comp + (normalHyperplane u).subtype.toAffineMap) + let S : AffineSubspace ℝ (normalHyperplane u) := + (affineSpan ℝ ({0} : Set ℝ)).comap f + have hmem (y : normalHyperplane u) : y ∈ S ↔ + simplexVelocity u b * simplexCoordinates y.val a - + simplexVelocity u a * simplexCoordinates y.val b = 0 := by + simp [S, f, simplexCoordinateAffine_apply, smul_eq_mul] + have hproper : S ≠ ⊤ := by + intro htop + have hy : (normalHyperplane u).orthogonalProjectionOnto (simplexVertex a) ∈ S := by + rw [htop] + exact AffineSubspace.mem_top ℝ _ _ + have hz := (hmem _).mp hy + rw [facet_seam_projection_invariant] at hz + simp only [simplexCoordinates_vertex, ite_true, ite_eq_right hab, mul_one, mul_zero, + sub_zero] at hz + exact hb hz + have hset : {y : normalHyperplane u | + simplexVelocity u b * simplexCoordinates y.val a - + simplexVelocity u a * simplexCoordinates y.val b = 0} = S := by + ext y + exact (hmem y).symm + rw [hset] + exact Measure.addHaar_affineSubspace volume S hproper + +theorem projected_front_facets_aedisjoint {d : ℕ} (u : Euclidean d) + (a b : Option (Fin d)) (hab : a ≠ b) + (ha : simplexVelocity u a < 0) (hb : simplexVelocity u b < 0) : + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a) + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d b) := by + rw [AEDisjoint, front_facets_projection_inter_eq u a b ha hb] + apply measure_mono_null _ (projected_facet_seam_null u a b hab (ne_of_lt hb)) + rintro y ⟨x, hx, rfl⟩ + change simplexVelocity u b * simplexCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean d) a - + simplexVelocity u a * simplexCoordinates + ((normalHyperplane u).orthogonalProjectionOnto x : Euclidean d) b = 0 + rw [facet_seam_projection_invariant, hx.1.2, hx.2.2] + simp + +theorem simplexFacet_isCompact (d : ℕ) (a : Option (Fin d)) : + IsCompact (simplexFacet d a) := by + have hfun : (fun x : Euclidean d => simplexCoordinates x a) = simplexCoordinateAffine a := by + funext x + exact (simplexCoordinateAffine_apply a x).symm + have hc : Continuous (fun x : Euclidean d => simplexCoordinates x a) := by + rw [hfun] + exact (simplexCoordinateAffine a).continuous_of_finiteDimensional + exact (standardSimplex_isCompact d).inter_right (isClosed_eq hc continuous_const) + +theorem projected_simplexFacet_isCompact {d : ℕ} (u : Euclidean d) (a : Option (Fin d)) : + IsCompact ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a) := + (simplexFacet_isCompact d a).image (normalHyperplane u).orthogonalProjectionOnto.continuous + +theorem projectionVolume_simplex_eq_front_sum {d : ℕ} (u : Euclidean d) (hu : u ≠ 0) : + projectionVolume (standardSimplex d) u = + ∑ a : {a : Option (Fin d) // simplexVelocity u a < 0}, + volume ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a.val) := by + unfold projectionVolume + rw [simplex_projection_eq_front_cover u hu] + have hd : Pairwise (fun a b : {a : Option (Fin d) // simplexVelocity u a < 0} => + AEDisjoint volume + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a.val) + ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d b.val)) := by + intro a b hab + exact projected_front_facets_aedisjoint u a.val b.val (Subtype.coe_injective.ne hab) + a.property b.property + rw [measure_iUnion₀ hd (fun a => + (projected_simplexFacet_isCompact u a.val).measurableSet.nullMeasurableSet)] + exact tsum_fintype _ + +theorem brightness_simplex_eq_front_sum {d : ℕ} (u : Euclidean d) (hu : u ≠ 0) : + brightness (standardSimplex d) u = ‖u‖ * + ∑ a : {a : Option (Fin d) // simplexVelocity u a < 0}, + (volume ((normalHyperplane u).orthogonalProjectionOnto '' simplexFacet d a.val)).toReal := by + unfold brightness + rw [projectionVolume_simplex_eq_front_sum u hu, ENNReal.toReal_sum] + intro a _ + exact (projected_simplexFacet_isCompact u a.val).measure_lt_top.ne + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexValue.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexValue.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9714c73f0df0318306f25dd3c17efbfdbcccb05 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexValue.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.ProjectionVolume.SimplexBrightness +import OAI.Geometry.ProjectionVolume.SimplexZonotope +import OAI.Geometry.ProjectionVolume.ProjectionReconstruction +import OAI.Geometry.ProjectionVolume.ProductVolume + +namespace OAI + +open MeasureTheory + +namespace Paper092 + +theorem standardSimplex_projectionBody (d : ℕ) (hd : 0 < d) : + projectionBody (standardSimplex d) = simplexZonotope d := by + apply projectionBody_eq_of_brightness_eq_support (simplexZonotope_isCompact d) + (simplexZonotope_nonempty d) (simplexZonotope_convex d) + intro u + rw [standardSimplex_brightness d hd, simplexZonotope_support] + +theorem standardSimplex_projectionBody_volume (d : ℕ) (hd : 0 < d) : + (volume (projectionBody (standardSimplex d))).toReal = + ((d : ℝ) + 1) / (((d - 1).factorial : ℝ) ^ d) := by + rw [standardSimplex_projectionBody d hd, simplexZonotope_volume d hd] + +theorem standardSimplex_normalizedProjectionVolume (d : ℕ) (hd : 0 < d) : + normalizedProjectionVolume (standardSimplex d) = simplexConstant d := by + obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hd) + unfold normalizedProjectionVolume simplexConstant + rw [standardSimplex_projectionBody_volume (n + 1) hd, standardSimplex_volume_real] + simp only [Nat.succ_sub_one, Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ, + div_pow, one_pow, pow_succ, mul_pow] + have hn : (n : ℝ) + 1 ≠ 0 := by positivity + have hf : (n.factorial : ℝ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero n + field_simp + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexVolume.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..5eb8629fe5df2841318101338a20b8be74321718 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexVolume.lean @@ -0,0 +1,153 @@ +import OAI.Geometry.ProjectionVolume.SimplexCoordinates +import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls +import Mathlib.MeasureTheory.Constructions.Pi + +namespace OAI + +noncomputable section + +open Set MeasureTheory +open scoped BigOperators ENNReal + +namespace Paper092 + +def coordinateSimplex (n : ℕ) : Set (Fin n → ℝ) := + {x | (∀ i, 0 ≤ x i) ∧ ∑ i, x i ≤ 1} + +theorem measurableSet_coordinateSimplex (n : ℕ) : MeasurableSet (coordinateSimplex n) := by + change MeasurableSet ({x : Fin n → ℝ | ∀ i, 0 ≤ x i} ∩ {x | ∑ i, x i ≤ 1}) + refine MeasurableSet.inter ?_ ?_ + · rw [show {x : Fin n → ℝ | ∀ i, 0 ≤ x i} = + ⋂ i : Fin n, {x : Fin n → ℝ | 0 ≤ x i} by ext; simp] + exact MeasurableSet.iInter fun i => measurableSet_le measurable_const (measurable_pi_apply i) + · exact measurableSet_le (by fun_prop) measurable_const + +theorem coordinateSimplex_volume_eq (n : ℕ) : + volume (coordinateSimplex n) = volume (standardSimplex n) := by + have hset : coordinateSimplex n = + (WithLp.toLp 2) ⁻¹' standardSimplex n := by + ext x + exact (mem_standardSimplex_iff (WithLp.toLp 2 x)).symm + rw [hset] + exact (PiLp.volume_preserving_toLp (Fin n)).measure_preimage + (standardSimplex_isCompact n).measurableSet.nullMeasurableSet + +def signChange {n : ℕ} (s : Fin n → Bool) (x : Fin n → ℝ) : Fin n → ℝ := + fun i => if s i then x i else -x i + +theorem signChange_abs {n : ℕ} (s : Fin n → Bool) (x : Fin n → ℝ) (i : Fin n) : + |signChange s x i| = |x i| := by + cases hs : s i <;> simp [signChange, hs] + +theorem signChange_measurePreserving {n : ℕ} (s : Fin n → Bool) : + MeasurePreserving (signChange s) volume volume := by + change MeasurePreserving (fun (x : Fin n → ℝ) i => if s i then x i else -x i) volume volume + apply volume_preserving_pi (f := fun i (x : ℝ) => if s i then x else -x) + intro i + cases hs : s i + · simpa only [hs, Bool.false_eq_true, ↓reduceIte] using + (Measure.measurePreserving_neg (volume : Measure ℝ)) + · simp only [↓reduceIte] + constructor + · fun_prop + · ext a ha + rw [Measure.map_apply (by fun_prop) ha] + rfl + +def signedSimplex {n : ℕ} (s : Fin n → Bool) : Set (Fin n → ℝ) := + signChange s ⁻¹' coordinateSimplex n + +theorem measurableSet_signedSimplex {n : ℕ} (s : Fin n → Bool) : + MeasurableSet (signedSimplex s) := + (measurableSet_coordinateSimplex n).preimage (signChange_measurePreserving s).measurable + +theorem signedSimplex_volume {n : ℕ} (s : Fin n → Bool) : + volume (signedSimplex s) = volume (coordinateSimplex n) := + (signChange_measurePreserving s).measure_preimage + (measurableSet_coordinateSimplex n).nullMeasurableSet + +theorem signedSimplex_union (n : ℕ) : + (⋃ s : Fin n → Bool, signedSimplex s) = {x : Fin n → ℝ | ∑ i, |x i| ≤ 1} := by + ext x + constructor + · intro hx + obtain ⟨s, hs⟩ := mem_iUnion.mp hx + change (∀ i, 0 ≤ signChange s x i) ∧ ∑ i, signChange s x i ≤ 1 at hs + change ∑ i, |x i| ≤ 1 + calc + ∑ i, |x i| = ∑ i, signChange s x i := by + apply Finset.sum_congr rfl + intro i hi + rw [← signChange_abs s x i, abs_of_nonneg (hs.1 i)] + _ ≤ 1 := hs.2 + · intro hx + let s : Fin n → Bool := fun i => decide (0 ≤ x i) + have hs (i : Fin n) : signChange s x i = |x i| := by + by_cases h : 0 ≤ x i + · simp [signChange, s, h, abs_of_nonneg h] + · simp [signChange, s, h, abs_of_neg (lt_of_not_ge h)] + apply mem_iUnion.mpr + refine ⟨s, ?_⟩ + change (∀ i, 0 ≤ signChange s x i) ∧ ∑ i, signChange s x i ≤ 1 + simp_rw [hs] + exact ⟨fun i => abs_nonneg _, hx⟩ + +theorem signedSimplex_pairwise_aedisjoint (n : ℕ) : + Pairwise (fun s t : Fin n → Bool => AEDisjoint volume (signedSimplex s) (signedSimplex t)) := by + intro s t hst + obtain ⟨i, hi⟩ : ∃ i, s i ≠ t i := Function.ne_iff.mp hst + change volume (signedSimplex s ∩ signedSimplex t) = 0 + apply measure_mono_null (t := {x : Fin n → ℝ | x i = 0}) + · intro x hx + have hs : 0 ≤ signChange s x i := hx.1.1 i + have ht : 0 ≤ signChange t x i := hx.2.1 i + change x i = 0 + cases hsi : s i <;> cases hti : t i <;> + simp only [hsi, hti] at hi <;> + simp only [signChange, hsi, hti, Bool.false_eq_true, ↓reduceIte] at hs ht <;> + first | contradiction | linarith + · exact Measure.pi_eval_preimage_null (fun _ : Fin n => (volume : Measure ℝ)) + (measure_singleton 0) + +theorem signedSimplex_volume_sum (n : ℕ) : + volume {x : Fin n → ℝ | ∑ i, |x i| ≤ 1} = + (2 : ENNReal) ^ n * volume (coordinateSimplex n) := by + rw [← signedSimplex_union, measure_iUnion₀ (signedSimplex_pairwise_aedisjoint n) + (fun s => (measurableSet_signedSimplex s).nullMeasurableSet)] + simp [signedSimplex_volume, tsum_fintype] + +theorem l1Ball_volume (n : ℕ) : + volume {x : Fin n → ℝ | ∑ i, |x i| ≤ 1} = + ENNReal.ofReal ((2 : ℝ) ^ n / (Nat.factorial n : ℝ)) := by + cases n with + | zero => + have hzero : volume (univ : Set (Fin 0 → ℝ)) = 1 := + Measure.pi_empty_univ (fun _ : Fin 0 => (volume : Measure ℝ)) + simpa using hzero + | succ n => + have h := MeasureTheory.volume_sum_rpow_le (Fin (n + 1)) (p := 1) (by norm_num) 1 + have hg : Real.Gamma (1 + 1 : ℝ) = 1 := by + simpa using Real.Gamma_nat_eq_factorial 1 + simpa only [Fintype.card_fin, div_one, Real.rpow_one, ENNReal.ofReal_one, + one_pow, one_mul, hg, mul_one, Real.Gamma_nat_eq_factorial] using h + +theorem standardSimplex_volume (n : ℕ) : + volume (standardSimplex n) = ENNReal.ofReal (1 / (Nat.factorial n : ℝ)) := by + have h := (signedSimplex_volume_sum n).symm.trans (l1Ball_volume n) + rw [coordinateSimplex_volume_eq] at h + have htwo : (2 : ENNReal) ^ n ≠ 0 := by positivity + have htop : (2 : ENNReal) ^ n ≠ ⊤ := by finiteness + have hpow : (2 : ENNReal) ^ n = ENNReal.ofReal ((2 : ℝ) ^ n) := by + rw [ENNReal.ofReal_pow (by norm_num : (0 : ℝ) ≤ 2)] + norm_num + apply (ENNReal.mul_right_inj htwo htop).mp + rw [h, hpow, + ← ENNReal.ofReal_mul (by positivity : 0 ≤ (2 : ℝ) ^ n)] + congr 1 + ring + +end Paper092 + +end + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SimplexZonotope.lean b/lean/OAI/Geometry/ProjectionVolume/SimplexZonotope.lean new file mode 100644 index 0000000000000000000000000000000000000000..d86e26472d5804b8373ee933f28c5784e2407ad0 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SimplexZonotope.lean @@ -0,0 +1,149 @@ +import OAI.Geometry.ProjectionVolume.Basic +import OAI.Geometry.ProjectionVolume.SupportGeometry +import OAI.Geometry.ProjectionVolume.EuclideanVolume + +namespace OAI + +universe uE uι + +open Set MeasureTheory +open scoped Pointwise RealInnerProductSpace + +namespace Paper092 + +noncomputable def simplexZonotope (d : ℕ) : Set (Euclidean d) := + (∑ i : Fin d, segment ℝ + (-(1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ))) + ((1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ)))) + + segment ℝ + (-(1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • WithLp.toLp 2 (1 : Fin d → ℝ))) + ((1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • WithLp.toLp 2 (1 : Fin d → ℝ))) + +theorem simplexZonotope_isCompact (d : ℕ) : IsCompact (simplexZonotope d) := by + unfold simplexZonotope + exact (Finset.sum_induction _ IsCompact (fun _ _ ha hb => ha.add hb) + isCompact_singleton (fun _ _ => SupportGeometry.isCompact_segment _ _)).add + (SupportGeometry.isCompact_segment _ _) + +theorem simplexZonotope_nonempty (d : ℕ) : (simplexZonotope d).Nonempty := by + unfold simplexZonotope + exact (Finset.sum_induction _ Set.Nonempty (fun _ _ ha hb => ha.add hb) + (singleton_nonempty 0) (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩)).add + ⟨_, left_mem_segment ℝ _ _⟩ + +theorem simplexZonotope_convex (d : ℕ) : Convex ℝ (simplexZonotope d) := by + unfold simplexZonotope + exact (convex_sum _ (fun _ _ => convex_segment _ _)).add (convex_segment _ _) + +theorem simplexZonotope_support (d : ℕ) (u : Euclidean d) : + SupportGeometry.support (simplexZonotope d) (innerSL ℝ u) = + ((∑ i : Fin d, |u i|) + |∑ i : Fin d, u i|) / (2 * ((d - 1).factorial : ℝ)) := by + have hfac : (0 : ℝ) < (d - 1).factorial := by exact_mod_cast Nat.factorial_pos (d - 1) + have hcompact : IsCompact (∑ i : Fin d, segment ℝ + (-(1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ))) + ((1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ)))) := + Finset.sum_induction _ IsCompact (fun _ _ ha hb => ha.add hb) + isCompact_singleton (fun _ _ => SupportGeometry.isCompact_segment _ _) + have hne : (∑ i : Fin d, segment ℝ + (-(1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ))) + ((1 / 2 : ℝ) • (((d - 1).factorial : ℝ)⁻¹ • EuclideanSpace.single i (1 : ℝ)))).Nonempty := + Finset.sum_induction _ Set.Nonempty (fun _ _ ha hb => ha.add hb) + (singleton_nonempty 0) (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩) + rw [simplexZonotope, SupportGeometry.support_add hcompact hne + (SupportGeometry.isCompact_segment _ _) ⟨_, left_mem_segment ℝ _ _⟩, + SupportGeometry.support_sum_centered_segments, SupportGeometry.support_centered_segment] + simp only [innerSL_apply_apply, inner_smul_right, EuclideanSpace.inner_single_right, + one_mul, starRingEnd_apply, star_trivial, abs_mul, abs_inv, abs_of_pos hfac] + have hw : inner ℝ u (WithLp.toLp 2 (1 : Fin d → ℝ)) = ∑ i : Fin d, u i := by + simp [PiLp.inner_apply] + rw [hw, ← Finset.mul_sum] + field_simp + +theorem centered_segment_eq_vadd {E : Type uE} [AddCommGroup E] [Module ℝ E] (v : E) : + segment ℝ (-(1 / 2 : ℝ) • v) ((1 / 2 : ℝ) • v) = + (-(1 / 2 : ℝ) • v) +ᵥ segment ℝ 0 v := by + rw [vadd_segment] + simp only [vadd_eq_add, add_zero] + congr 1 + symm + simpa only [add_smul, one_smul] using + congrArg (fun a : ℝ => a • v) (by norm_num : -(1 / 2 : ℝ) + 1 = 1 / 2) + +theorem sum_centered_segments_eq_vadd {ι : Type uι} {E : Type uE} [Fintype ι] [AddCommGroup E] + [Module ℝ E] (v : ι → E) : + (∑ i, segment ℝ (-(1 / 2 : ℝ) • v i) ((1 / 2 : ℝ) • v i)) = + (-(1 / 2 : ℝ) • ∑ i, v i) +ᵥ parallelepiped v := by + simp_rw [centered_segment_eq_vadd, ← image_vadd, vadd_eq_add, ← singleton_add] + rw [Finset.sum_add_distrib, Set.finsetSum_singleton, ← Finset.smul_sum, + ← parallelepiped_eq_sum_segment] + +theorem coordinate_segments_eq_cube (d : ℕ) : + (∑ i : Fin d, segment ℝ (0 : Euclidean d) (EuclideanSpace.single i (1 : ℝ))) = + WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1 := by + rw [← parallelepiped_eq_sum_segment, parallelepiped] + congr 1 + funext t + ext j + simp [WithLp.ofLp_sum, Pi.single_apply] + +theorem smul_segment_image {E : Type uE} [AddCommGroup E] [Module ℝ E] + (r : ℝ) (x y : E) : r • segment ℝ x y = segment ℝ (r • x) (r • y) := + image_segment ℝ (r • (LinearMap.id : E →ₗ[ℝ] E)).toAffineMap x y + +theorem simplexZonotope_eq_vadd_smul (d : ℕ) : + simplexZonotope d = + -(((d - 1).factorial : ℝ)⁻¹ • WithLp.toLp 2 (1 : Fin d → ℝ)) +ᵥ + (((d - 1).factorial : ℝ)⁻¹ • + ((WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1) + + segment ℝ (0 : Euclidean d) (WithLp.toLp 2 (1 : Fin d → ℝ)))) := by + let r : ℝ := ((d - 1).factorial : ℝ)⁻¹ + let w : Euclidean d := WithLp.toLp 2 (1 : Fin d → ℝ) + have hsum : (∑ i : Fin d, EuclideanSpace.single i (1 : ℝ)) = w := by + ext j + simp [w, WithLp.ofLp_sum, Pi.single_apply] + have hpara : parallelepiped (fun i : Fin d => r • EuclideanSpace.single i (1 : ℝ)) = + r • (WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1) := by + rw [parallelepiped_eq_sum_segment, ← coordinate_segments_eq_cube, + Finset.smul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [smul_segment_image, smul_zero] + change (∑ i : Fin d, segment ℝ (-(1 / 2 : ℝ) • (r • EuclideanSpace.single i (1 : ℝ))) + ((1 / 2 : ℝ) • (r • EuclideanSpace.single i (1 : ℝ)))) + + segment ℝ (-(1 / 2 : ℝ) • (r • w)) ((1 / 2 : ℝ) • (r • w)) = _ + rw [sum_centered_segments_eq_vadd, ← Finset.smul_sum, hsum, + centered_segment_eq_vadd, hpara] + have hseg : segment ℝ (0 : Euclidean d) (r • w) = r • segment ℝ 0 w := by + rw [smul_segment_image, smul_zero] + rw [hseg] + simp_rw [← image_vadd, vadd_eq_add, ← singleton_add] + rw [add_add_add_comm, singleton_add_singleton, + ← smul_add r (WithLp.toLp 2 '' Icc (0 : Fin d → ℝ) 1) + (segment ℝ (0 : Euclidean d) w)] + congr 2 + calc + -(1 / 2 : ℝ) • (r • w) + -(1 / 2 : ℝ) • (r • w) = + (-1 : ℝ) • (r • w) := by rw [← add_smul]; norm_num + _ = -(r • w) := neg_one_smul ℝ _ + +theorem volume_simplexZonotope (d : ℕ) (hd : 0 < d) : + volume (simplexZonotope d) = + ENNReal.ofReal (((d : ℝ) + 1) / (((d - 1).factorial : ℝ) ^ d)) := by + have hfac : (0 : ℝ) < (d - 1).factorial := by exact_mod_cast Nat.factorial_pos (d - 1) + rw [simplexZonotope_eq_vadd_smul, measure_vadd, Measure.addHaar_smul, + finrank_euclideanSpace_fin, volume_euclidean_cube_add_diagonal d hd] + rw [abs_pow, abs_inv, abs_of_pos hfac] + rw [ENNReal.ofReal_div_of_pos (pow_pos hfac d)] + simp [inv_pow, div_eq_mul_inv, mul_comm, + ENNReal.ofReal_add (Nat.cast_nonneg d) zero_le_one, + ENNReal.ofReal_pow hfac.le, ENNReal.ofReal_inv_of_pos (pow_pos hfac d)] + +theorem simplexZonotope_volume (d : ℕ) (hd : 0 < d) : + (volume (simplexZonotope d)).toReal = + ((d : ℝ) + 1) / (((d - 1).factorial : ℝ) ^ d) := by + rw [volume_simplexZonotope d hd, ENNReal.toReal_ofReal] + positivity + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SupportGeometry.lean b/lean/OAI/Geometry/ProjectionVolume/SupportGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c21b63bc4ab3149bd0739a43b2a0f0b2fc9f972 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SupportGeometry.lean @@ -0,0 +1,169 @@ +import Mathlib.Analysis.InnerProductSpace.Dual +import Mathlib.Analysis.LocallyConvex.Separation + +namespace OAI + +universe uE uF uι uH + +open Set +open scoped Pointwise + +namespace Paper092.SupportGeometry + +variable {E : Type uE} {F : Type uF} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +noncomputable def support (K : Set E) (f : E →L[ℝ] ℝ) : ℝ := sSup (f '' K) + +theorem le_support {K : Set E} (hK : IsCompact K) (f : E →L[ℝ] ℝ) + {x : E} (hx : x ∈ K) : f x ≤ support K f := + le_csSup (hK.image f.continuous).bddAbove (mem_image_of_mem f hx) + +theorem support_le {K : Set E} (hK : K.Nonempty) (f : E →L[ℝ] ℝ) + {a : ℝ} (ha : ∀ x ∈ K, f x ≤ a) : support K f ≤ a := + csSup_le (hK.image f) (by rintro _ ⟨x, hx, rfl⟩; exact ha x hx) + +theorem exists_support {K : Set E} (hK : IsCompact K) (hne : K.Nonempty) + (f : E →L[ℝ] ℝ) : ∃ x ∈ K, f x = support K f := + (hK.image f.continuous).sSup_mem (hne.image f) + +theorem support_add {A B : Set E} (hA : IsCompact A) (hneA : A.Nonempty) + (hB : IsCompact B) (hneB : B.Nonempty) (f : E →L[ℝ] ℝ) : + support (A + B) f = support A f + support B f := by + unfold support + rw [image_add] + exact csSup_add (hneA.image f) (hA.image f.continuous).bddAbove + (hneB.image f) (hB.image f.continuous).bddAbove + +theorem support_smul (K : Set E) (f : E →L[ℝ] ℝ) {c : ℝ} (hc : 0 ≤ c) : + support (c • K) f = c * support K f := by + unfold support + rw [image_smul_comm f c K (fun x => f.map_smul c x), Real.sSup_smul_of_nonneg hc] + rfl + +theorem support_prod {A : Set E} {B : Set F} (hA : IsCompact A) (hneA : A.Nonempty) + (hB : IsCompact B) (hneB : B.Nonempty) (f : E →L[ℝ] ℝ) (g : F →L[ℝ] ℝ) : + support (A ×ˢ B) (f.coprod g) = support A f + support B g := by + unfold support + have himage : f.coprod g '' (A ×ˢ B) = f '' A + g '' B := by + change (fun x : E × F => f x.1 + g x.2) '' (A ×ˢ B) = _ + rw [image_prod (fun x y => f x + g y), ← image2_add, + image2_image_left, image2_image_right] + rw [himage] + exact csSup_add (hneA.image f) (hA.image f.continuous).bddAbove + (hneB.image g) (hB.image g.continuous).bddAbove + +theorem support_sum {ι : Type uι} (s : Finset ι) (K : ι → Set E) + (hK : ∀ i ∈ s, IsCompact (K i)) (hne : ∀ i ∈ s, (K i).Nonempty) + (f : E →L[ℝ] ℝ) : support (∑ i ∈ s, K i) f = ∑ i ∈ s, support (K i) f := by + classical + induction s using Finset.induction_on with + | empty => simp [support] + | @insert i s hi ih => + have hKs : ∀ j ∈ s, IsCompact (K j) := fun j hj => hK j (Finset.mem_insert_of_mem hj) + have hnes : ∀ j ∈ s, (K j).Nonempty := fun j hj => hne j (Finset.mem_insert_of_mem hj) + have hcompact : IsCompact (∑ j ∈ s, K j) := + Finset.sum_induction K IsCompact (fun _ _ ha hb => ha.add hb) + isCompact_singleton hKs + have hnonempty : (∑ j ∈ s, K j).Nonempty := + Finset.sum_induction K Set.Nonempty (fun _ _ ha hb => ha.add hb) + (singleton_nonempty 0) hnes + rw [Finset.sum_insert hi, + support_add (hK i (Finset.mem_insert_self i s)) (hne i (Finset.mem_insert_self i s)) + hcompact hnonempty, ih hKs hnes, Finset.sum_insert hi] + +theorem mem_iff_le_support {K : Set E} (hK : IsCompact K) (hne : K.Nonempty) + (hconv : Convex ℝ K) {x : E} : + x ∈ K ↔ ∀ f : E →L[ℝ] ℝ, f x ≤ support K f := by + refine ⟨fun hx f => le_support hK f hx, fun h => ?_⟩ + by_contra hx + obtain ⟨f, u, hu, hux⟩ := geometric_hahn_banach_closed_point hconv hK.isClosed hx + exact (hux.trans_le ((h f).trans (support_le hne f fun y hy => (hu y hy).le))).false + +theorem eq_of_support_eq {A B : Set E} (hA : IsCompact A) (hneA : A.Nonempty) + (hconvA : Convex ℝ A) (hB : IsCompact B) (hneB : B.Nonempty) + (hconvB : Convex ℝ B) (h : ∀ f : E →L[ℝ] ℝ, support A f = support B f) : A = B := by + ext x + simp only [mem_iff_le_support hA hneA hconvA, mem_iff_le_support hB hneB hconvB, h] + +theorem isCompact_segment (x y : E) : IsCompact (segment ℝ x y) := by + rw [segment_eq_image] + exact isCompact_Icc.image (by fun_prop) + +theorem support_segment (x y : E) (f : E →L[ℝ] ℝ) : + support (segment ℝ x y) f = max (f x) (f y) := by + unfold support + rw [show f '' segment ℝ x y = segment ℝ (f x) (f y) from + image_segment ℝ f.toLinearMap.toAffineMap x y] + rw [segment_eq_Icc', csSup_Icc (min_le_max)] + +theorem support_centered_segment (v : E) (f : E →L[ℝ] ℝ) : + support (segment ℝ (-(1 / 2 : ℝ) • v) ((1 / 2 : ℝ) • v)) f = |f v| / 2 := by + simp only [support_segment, map_smul, smul_eq_mul, neg_mul] + rw [max_comm, ← abs_eq_max_neg, abs_mul] + norm_num + ring + +theorem support_sum_centered_segments {ι : Type uι} (s : Finset ι) (v : ι → E) + (f : E →L[ℝ] ℝ) : + support (∑ i ∈ s, segment ℝ (-(1 / 2 : ℝ) • v i) ((1 / 2 : ℝ) • v i)) f = + (1 / 2 : ℝ) * ∑ i ∈ s, |f (v i)| := by + rw [support_sum s _ (fun _ _ => isCompact_segment _ _) + (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩)] + simp_rw [support_centered_segment, div_eq_mul_inv] + rw [← Finset.sum_mul] + ring + +theorem eq_sum_centered_segments_iff {ι : Type uι} {K : Set E} (hK : IsCompact K) + (hne : K.Nonempty) (hconv : Convex ℝ K) (s : Finset ι) (v : ι → E) : + K = ∑ i ∈ s, segment ℝ (-(1 / 2 : ℝ) • v i) ((1 / 2 : ℝ) • v i) ↔ + ∀ f : E →L[ℝ] ℝ, support K f = (1 / 2 : ℝ) * ∑ i ∈ s, |f (v i)| := by + constructor + · intro h f + rw [h, support_sum_centered_segments] + · intro h + apply eq_of_support_eq hK hne hconv + · exact Finset.sum_induction _ IsCompact (fun _ _ ha hb => ha.add hb) + isCompact_singleton (fun _ _ => isCompact_segment _ _) + · exact Finset.sum_induction _ Set.Nonempty (fun _ _ ha hb => ha.add hb) + (singleton_nonempty 0) (fun _ _ => ⟨_, left_mem_segment ℝ _ _⟩) + · exact Finset.sum_induction _ (Convex ℝ) (fun _ _ ha hb => ha.add hb) + (convex_singleton 0) (fun _ _ => convex_segment _ _) + · intro f + rw [h f, support_sum_centered_segments] + +section InnerProduct + +variable {H : Type uH} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] + +theorem mem_iff_inner_le_support {K : Set H} (hK : IsCompact K) (hne : K.Nonempty) + (hconv : Convex ℝ K) {x : H} : + x ∈ K ↔ ∀ u : H, inner ℝ u x ≤ support K (innerSL ℝ u) := by + rw [mem_iff_le_support hK hne hconv] + constructor + · intro h u + exact h (innerSL ℝ u) + · intro h f + obtain ⟨u, rfl⟩ := (InnerProductSpace.toDual ℝ H).surjective f + exact h u + +theorem halfSpaces_eq_of_eq_support {K : Set H} (hK : IsCompact K) (hne : K.Nonempty) + (hconv : Convex ℝ K) (p : H → ℝ) (hp : ∀ u, p u = support K (innerSL ℝ u)) : + {x | ∀ u : H, inner ℝ u x ≤ p u} = K := by + ext x + simp_rw [mem_ofPred_eq, hp] + exact (mem_iff_inner_le_support hK hne hconv).symm + +theorem eq_of_inner_support_eq {A B : Set H} (hA : IsCompact A) (hneA : A.Nonempty) + (hconvA : Convex ℝ A) (hB : IsCompact B) (hneB : B.Nonempty) + (hconvB : Convex ℝ B) + (h : ∀ u : H, support A (innerSL ℝ u) = support B (innerSL ℝ u)) : A = B := by + ext x + simp only [mem_iff_inner_le_support hA hneA hconvA, + mem_iff_inner_le_support hB hneB hconvB, h] + +end InnerProduct + +end Paper092.SupportGeometry + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/SupportLimit.lean b/lean/OAI/Geometry/ProjectionVolume/SupportLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffb8e072955fcd04c22fce7a06185543dffec649 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/SupportLimit.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.ProjectionVolume.OuterApproximation +import OAI.Geometry.ProjectionVolume.Translation +import OAI.Geometry.ProjectionVolume.PolytopeCauchy + +namespace OAI + +open Set Filter +open scoped Pointwise Topology RealInnerProductSpace + +namespace Paper092 + +theorem projectionBody_support_centered_of_polytope_support {n : ℕ} + (hpoly : ∀ {ι : Type} [Fintype ι] (P : HPolytope n ι) (u : Euclidean n), + SupportGeometry.support (projectionBody P.body) (innerSL ℝ u) = brightness P.body u) + (K : Set (Euclidean n)) (hc : IsCompact K) (hv : Convex ℝ K) + (h0 : (0 : Euclidean n) ∈ interior K) (u : Euclidean n) : + SupportGeometry.support (projectionBody K) (innerSL ℝ u) = brightness K u := by + apply le_antisymm (projectionBody_support_le K u) + have hbound : ∀ r : ℝ, 1 < r → brightness K u ≤ + r ^ (n - 1) * SupportGeometry.support (projectionBody K) (innerSL ℝ u) := by + intro r hr + obtain ⟨F, P, hKP, hPr⟩ := exists_outer_hpolytope_sandwich hc hv h0 hr + calc + brightness K u ≤ brightness P.body u := brightness_mono hKP P.compact u + _ = SupportGeometry.support (projectionBody P.body) (innerSL ℝ u) := (hpoly P u).symm + _ ≤ SupportGeometry.support (projectionBody (r • K)) (innerSL ℝ u) := + support_mono ⟨0, zero_mem_projectionBody P.body⟩ (projectionBody_isCompact _) + (projectionBody_mono hPr (hc.smul r)) u + _ = r ^ (n - 1) * SupportGeometry.support (projectionBody K) (innerSL ℝ u) := by + rw [projectionBody_body_smul K r (by linarith), + SupportGeometry.support_smul _ _ (by positivity), abs_of_pos (by linarith)] + have ht : Tendsto (fun r : ℝ => + r ^ (n - 1) * SupportGeometry.support (projectionBody K) (innerSL ℝ u)) + (𝓝[>] 1) (𝓝 (SupportGeometry.support (projectionBody K) (innerSL ℝ u))) := by + have hcont : Continuous (fun r : ℝ => + r ^ (n - 1) * SupportGeometry.support (projectionBody K) (innerSL ℝ u)) := by + fun_prop + simpa only [one_pow, one_mul] using (hcont.tendsto (1 : ℝ)).mono_left nhdsWithin_le_nhds + apply ge_of_tendsto ht + filter_upwards [self_mem_nhdsWithin] with r hr + exact hbound r hr + +theorem projectionBody_support_of_polytope_support {n : ℕ} + (hpoly : ∀ {ι : Type} [Fintype ι] (P : HPolytope n ι) (u : Euclidean n), + SupportGeometry.support (projectionBody P.body) (innerSL ℝ u) = brightness P.body u) + (K : Set (Euclidean n)) (hc : IsCompact K) (hv : Convex ℝ K) + (hint : (interior K).Nonempty) (u : Euclidean n) : + SupportGeometry.support (projectionBody K) (innerSL ℝ u) = brightness K u := by + obtain ⟨x, hx⟩ := hint + let K0 := -x +ᵥ K + have h0 : (0 : Euclidean n) ∈ interior K0 := by + simpa [K0, interior_vadd, mem_vadd_set_iff_neg_vadd_mem] using hx + have hs := projectionBody_support_centered_of_polytope_support hpoly K0 + (hc.vadd (-x)) (hv.vadd (-x)) h0 u + simpa only [K0, projectionBody_vadd, brightness_vadd] using hs + +theorem projectionBody_support {d : ℕ} (_hd : 2 ≤ d) (K : Set (Euclidean d)) + (hK : IsCompact K) (hconv : Convex ℝ K) (hint : (interior K).Nonempty) + (u : Euclidean d) : + SupportGeometry.support (projectionBody K) (innerSL ℝ u) = brightness K u := + projectionBody_support_of_polytope_support + (fun P v => P.projectionBody_support v) K hK hconv hint u + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/ProjectionVolume/Translation.lean b/lean/OAI/Geometry/ProjectionVolume/Translation.lean new file mode 100644 index 0000000000000000000000000000000000000000..47588820f72586e9c86a06e60e45122e88d47ad5 --- /dev/null +++ b/lean/OAI/Geometry/ProjectionVolume/Translation.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.ProjectionVolume.Basic +import Mathlib.MeasureTheory.Group.Action + +namespace OAI + +open Set MeasureTheory +open scoped Pointwise + +namespace Paper092 + +theorem projectionVolume_vadd {n : ℕ} (K : Set (Euclidean n)) (v u : Euclidean n) : + projectionVolume (v +ᵥ K) u = projectionVolume K u := by + unfold projectionVolume + let p := (normalHyperplane u).orthogonalProjectionOnto + have himage : p '' (v +ᵥ K) = p v +ᵥ (p '' K) := by + change p '' ((fun x => v + x) '' K) = (fun y => p v + y) '' (p '' K) + simp only [image_image, map_add] + rw [himage, measure_vadd] + +theorem brightness_vadd {n : ℕ} (K : Set (Euclidean n)) (v u : Euclidean n) : + brightness (v +ᵥ K) u = brightness K u := by + simp only [brightness, projectionVolume_vadd] + +theorem projectionBody_vadd {n : ℕ} (K : Set (Euclidean n)) (v : Euclidean n) : + projectionBody (v +ᵥ K) = projectionBody K := by + ext y + simp only [projectionBody, mem_ofPred_eq, brightness_vadd] + +theorem normalizedProjectionVolume_vadd {n : ℕ} (K : Set (Euclidean n)) + (v : Euclidean n) : + normalizedProjectionVolume (v +ᵥ K) = normalizedProjectionVolume K := by + simp only [normalizedProjectionVolume, projectionBody_vadd, measure_vadd] + +end Paper092 + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Ampleness.lean b/lean/OAI/Geometry/QuadricBundles/Ampleness.lean new file mode 100644 index 0000000000000000000000000000000000000000..7054bb139511300c891c651581028c6d586fc7d7 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Ampleness.lean @@ -0,0 +1,25 @@ +import OAI.Geometry.QuadricBundles.Embedding + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +noncomputable section + +theorem EqualizerData.powerTwist_ample (D : EqualizerData) (m : ℕ) (hm : 0 < m) : + IsAmple (powerPullbackTwist D.bundle m hm) := by + let t := 3*m+1 + let e := 2*t-1 + have he : 3*m≤e := by dsimp [e,t]; omega + have hen : e+1=2*t := by dsimp [e,t]; omega + have hn : 0<2*t := by dsimp [t]; omega + let S := D.ampleSystem m hm e t he hen + exact ⟨2*t,hn,_,S.sections,S.closedEmbedding hn⟩ + +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/BallAverage.lean b/lean/OAI/Geometry/QuadricBundles/BallAverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fddc731e70238a7c8e8492e3a27c651870122fd --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/BallAverage.lean @@ -0,0 +1,151 @@ +import OAI.Geometry.QuadricBundles.RootTrace + +namespace OAI + +universe u1 u2 u3 + +noncomputable section + +namespace QuadricCounterexample +open Set Metric MeasureTheory Topology Filter +open scoped ENNReal + +section BallAverage +variable {E : Type u1} {F : Type u2} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem continuous_ball_integral {f : E → F} (hf : Integrable f μ) (r : ℝ) : + Continuous (fun x ↦ ∫ y in ball x r, f y ∂μ) := by + classical + apply continuous_iff_continuousAt.mpr + intro x₀ + have hx₀ : ∀ᵐ y ∂μ, y ∉ sphere x₀ r := by + rw [ae_iff] + simpa only [not_not, ofPred_mem_eq] using μ.addHaar_sphere x₀ r + have hbound (x y : E) : ‖(ball x r).indicator f y‖ ≤ ‖f y‖ := by + by_cases hy : y ∈ ball x r + · simp only [indicator_of_mem hy] + exact le_rfl + · simp only [indicator_of_notMem hy, norm_zero] + exact norm_nonneg _ + have hcont : ∀ᵐ y ∂μ, ContinuousAt (fun x ↦ (ball x r).indicator f y) x₀ := by + filter_upwards [hx₀] with y hy + have hdist : dist y x₀ ≠ r := hy + rcases lt_or_gt_of_ne hdist with hlt | hgt + · have hn : ∀ᶠ x in 𝓝 x₀, dist y x < r := + (continuous_const.dist continuous_id).continuousAt.eventually_lt_const hlt + apply (show ContinuousAt (fun _ : E ↦ f y) x₀ from continuousAt_const).congr_of_eventuallyEq + filter_upwards [hn] with x hx + simp only [indicator_of_mem (show y ∈ ball x r from hx)] + · have hn : ∀ᶠ x in 𝓝 x₀, r < dist y x := + (continuous_const.dist continuous_id).continuousAt.eventually_const_lt hgt + apply (show ContinuousAt (fun _ : E ↦ (0 : F)) x₀ from continuousAt_const).congr_of_eventuallyEq + filter_upwards [hn] with x hx + simp only [indicator_of_notMem (show y ∉ ball x r from not_lt_of_ge hx.le)] + have hh : ContinuousAt (fun x ↦ ∫ y, (ball x r).indicator f y ∂μ) x₀ := + continuousAt_of_dominated + (Eventually.of_forall fun x ↦ hf.aestronglyMeasurable.indicator measurableSet_ball) + (Eventually.of_forall fun x ↦ Eventually.of_forall (hbound x)) hf.norm hcont + simpa only [integral_indicator measurableSet_ball] using hh + +theorem continuous_ball_average {f : E → F} (hf : Integrable f μ) (r : ℝ) : + Continuous (fun x ↦ ⨍ y in ball x r, f y ∂μ) := by + simp_rw [setAverage_eq, measureReal_def, μ.addHaar_ball_center] + exact continuous_const.smul (continuous_ball_integral hf r) + +end BallAverage + +section Representative +variable {E : Type u3} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + +omit [NormedSpace ℝ E] [FiniteDimensional ℝ E] [BorelSpace E] + [μ.IsAddHaarMeasure] [Nontrivial E] in +lemma ball_average_nonneg {u : E → ℝ} (hu : 0 ≤ᵐ[μ] u) (x : E) (r : ℝ) : + 0 ≤ ⨍ y in ball x r, u y ∂μ := by + rw [setAverage_eq, smul_eq_mul] + exact mul_nonneg (inv_nonneg.mpr ENNReal.toReal_nonneg) + (integral_nonneg_of_ae (ae_restrict_of_ae hu)) + +omit [BorelSpace E] [Nontrivial E] in +lemma ball_average_le_const {u : E → ℝ} {x : E} {r c : ℝ} + (hr : 0 < r) (hu : IntegrableOn u (ball x r) μ) + (hle : u ≤ᵐ[μ.restrict (ball x r)] fun _ ↦ c) : + (⨍ y in ball x r, u y ∂μ) ≤ c := by + have hfin : μ (ball x r) ≠ ∞ := measure_ne_top_of_subset ball_subset_closedBall + (isCompact_closedBall x r).measure_ne_top + have hc : IntegrableOn (fun _ : E ↦ c) (ball x r) μ := integrableOn_const hfin + calc + (⨍ y in ball x r, u y ∂μ) ≤ ⨍ _y in ball x r, c ∂μ := by + simp_rw [setAverage_eq, smul_eq_mul] + exact mul_le_mul_of_nonneg_left (integral_mono_ae hu hc hle) + (inv_nonneg.mpr ENNReal.toReal_nonneg) + _ = c := setAverage_const (ne_of_gt (Metric.measure_ball_pos μ x hr)) hfin c + +theorem ball_infimum_representative_limit {u : E → ℝ} (hu : Integrable u μ) + (hpos : 0 ≤ᵐ[μ] u) {Ω : Set E} (hΩ : IsOpen Ω) + {r : ℕ → ℝ} (hr : ∀ n, 0 < r n) (hr0 : Tendsto r atTop (𝓝 0)) + (hmean : ∀ n, ∀ᵐ x ∂μ.restrict Ω, u x ≤ ⨍ y in ball x (r n), u y ∂μ) : + let q := fun x ↦ ⨅ n, ⨍ y in ball x (r n), u y ∂μ + UpperSemicontinuous q ∧ (∀ x, 0 ≤ q x) ∧ + (∀ᵐ x ∂μ.restrict Ω, u x ≤ q x) ∧ + ∀ x ∈ Ω, Tendsto (fun n ↦ ⨍ y in ball x (r n), u y ∂μ) atTop (𝓝 (q x)) := by + let A := fun n x ↦ ⨍ y in ball x (r n), u y ∂μ + have hApos (x : E) (n : ℕ) : 0 ≤ A n x := ball_average_nonneg hpos x (r n) + have hb (x : E) : BddBelow (range fun n ↦ A n x) := + ⟨0, by rintro _ ⟨n, rfl⟩; exact hApos x n⟩ + have hq : UpperSemicontinuous (fun x ↦ ⨅ n, A n x) := + upperSemicontinuous_ciInf hb (fun n ↦ (continuous_ball_average hu (r n)).upperSemicontinuous) + have hle : ∀ᵐ x ∂μ.restrict Ω, u x ≤ ⨅ n, A n x := by + filter_upwards [ae_all_iff.mpr hmean] with x hx + exact le_ciInf hx + refine ⟨hq, fun x ↦ le_ciInf (hApos x), hle, ?_⟩ + intro x hx + apply tendsto_order.mpr + constructor + · intro a ha + exact Eventually.of_forall fun n ↦ ha.trans_le (ciInf_le (hb x) n) + · intro b hqb + obtain ⟨c, hqc, hcb⟩ := exists_between hqb + have hn := inter_mem (hΩ.mem_nhds hx) (hq x c hqc) + obtain ⟨δ, hδ, hball⟩ := Metric.mem_nhds_iff.mp hn + have hnδ : ∀ᶠ n in atTop, r n < δ := hr0.eventually (gt_mem_nhds hδ) + filter_upwards [hnδ] with n hn + have hsub : ball x (r n) ⊆ Ω := fun y hy ↦ (hball (ball_subset_ball hn.le hy)).1 + have huc : u ≤ᵐ[μ.restrict (ball x (r n))] fun _ ↦ c := by + have hh := ae_mono (Measure.restrict_mono hsub le_rfl) hle + filter_upwards [hh, ae_restrict_mem measurableSet_ball] with y hy hyb + exact hy.trans (hball (ball_subset_ball hn.le hyb)).2.le + exact (ball_average_le_const (hr n) hu.integrableOn huc).trans_lt hcb + +lemma ball_average_eq_closedBall_average (u : E → ℝ) (x : E) (r : ℝ) : + (⨍ y in ball x r, u y ∂μ) = ⨍ y in closedBall x r, u y ∂μ := by + apply setAverage_congr + exact ae_eq_of_subset_of_measure_ge ball_subset_closedBall + (μ.addHaar_closedBall_eq_addHaar_ball x r).le measurableSet_ball.nullMeasurableSet + (isCompact_closedBall x r).measure_ne_top + +theorem ball_infimum_representative_ae {u : E → ℝ} (hu : Integrable u μ) + (hpos : 0 ≤ᵐ[μ] u) {Ω : Set E} (hΩ : IsOpen Ω) + {r : ℕ → ℝ} (hr : ∀ n, 0 < r n) (hr0 : Tendsto r atTop (𝓝 0)) + (hmean : ∀ n, ∀ᵐ x ∂μ.restrict Ω, u x ≤ ⨍ y in ball x (r n), u y ∂μ) : + (fun x ↦ ⨅ n, ⨍ y in ball x (r n), u y ∂μ) =ᵐ[μ.restrict Ω] u := by + have hdiff := IsUnifLocDoublingMeasure.ae_tendsto_average μ hu.locallyIntegrable 1 + have hlim := (ball_infimum_representative_limit hu hpos hΩ hr hr0 hmean).2.2.2 + have hr' : Tendsto r atTop (𝓝[>] (0 : ℝ)) := + tendsto_nhdsWithin_iff.mpr ⟨hr0, Eventually.of_forall hr⟩ + filter_upwards [ae_restrict_of_ae hdiff, ae_restrict_mem hΩ.measurableSet] with x hx hxΩ + have hd := hx (fun _ : ℕ ↦ x) r hr' (Eventually.of_forall fun n ↦ by + simpa only [one_mul] using (mem_closedBall_self (hr n).le)) + simp_rw [← ball_average_eq_closedBall_average] at hd + exact tendsto_nhds_unique (hlim x hxΩ) hd + +end Representative +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/BinaryForms.lean b/lean/OAI/Geometry/QuadricBundles/BinaryForms.lean new file mode 100644 index 0000000000000000000000000000000000000000..272bf07394bf9c802599d5b209e7a2a3c7e8b736 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/BinaryForms.lean @@ -0,0 +1,615 @@ +import OAI.Geometry.QuadricBundles.Noncollapse + +namespace OAI + +universe u1 u2 u3 u4 + +noncomputable section + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Finsupp +open scoped BigOperators +noncomputable section +variable {R : Type u1} [CommRing R] + +abbrev Form (n : ℕ) := Fin (n+1) → R +abbrev Poly := MvPolynomial (Fin 2) R + +def exponent (n : ℕ) (k : Fin (n+1)) : Fin 2 →₀ ℕ := + Finsupp.single 0 k.val+Finsupp.single 1 (n-k.val) +@[simp] lemma exponent_zero (n : ℕ) (k : Fin (n+1)) : exponent n k 0=k.val := by + simp [exponent] +@[simp] lemma exponent_one (n : ℕ) (k : Fin (n+1)) : exponent n k 1=n-k.val := by + simp [exponent] +lemma exponent_injective (n : ℕ) : Function.Injective (exponent n) := by + intro a b h + apply Fin.ext + simpa using congrArg (fun e ↦ e 0) h +lemma degree_binary (e : Fin 2 →₀ ℕ) : e.degree=e 0+e 1 := by + simp [Finsupp.degree_eq_sum,Fin.sum_univ_two] +lemma exponent_degree (n : ℕ) (k : Fin (n+1)) : (exponent n k).degree=n := by + rw [degree_binary,exponent_zero,exponent_one] + omega +lemma exponent_of_degree (e : Fin 2 →₀ ℕ) {n : ℕ} (he : e.degree=n) : + ∃ k : Fin (n+1),exponent n k=e := by + rw [degree_binary] at he + refine ⟨⟨e 0,by omega⟩,?_⟩ + ext i + fin_cases i + · simp + · simp + omega + +def polynomial (n : ℕ) (a : Form (R := R) n) : Poly (R := R) := + ∑ k : Fin (n+1), monomial (exponent n k) (a k) +def coefficients (n : ℕ) (p : Poly (R := R)) : Form (R := R) n := + fun k ↦ p.coeff (exponent n k) + +lemma polynomial_homogeneous (n : ℕ) (a : Form (R := R) n) : + (polynomial n a).IsHomogeneous n := by + apply IsHomogeneous.sum + intro k _ + exact isHomogeneous_monomial _ (exponent_degree n k) +@[simp] lemma coefficients_polynomial (n : ℕ) (a : Form (R := R) n) : + coefficients n (polynomial n a)=a := by + ext k + simp only [coefficients,polynomial,coeff_sum,coeff_monomial] + rw [Finset.sum_eq_single k] + · simp + · intro j _ hj + simp [show exponent n j≠exponent n k from fun h ↦ hj (exponent_injective n h)] + · simp +lemma polynomial_coefficients {n : ℕ} {p : Poly (R := R)} (hp : p.IsHomogeneous n) : + polynomial n (coefficients n p)=p := by + ext e + by_cases he : e.degree=n + · obtain ⟨k,rfl⟩ := exponent_of_degree e he + exact congrFun (coefficients_polynomial n (coefficients n p)) k + · rw [IsHomogeneous.coeff_eq_zero (polynomial_homogeneous n _) he,hp.coeff_eq_zero he] +lemma polynomial_injective (n : ℕ) : Function.Injective (polynomial (R := R) n) := by + intro a b h + simpa using congrArg (coefficients n) h +lemma polynomial_add (n : ℕ) (a b : Form (R := R) n) : + polynomial n (a+b)=polynomial n a+polynomial n b := by + simp [polynomial,Finset.sum_add_distrib] +lemma polynomial_smul (n : ℕ) (c : R) (a : Form (R := R) n) : + polynomial n (c • a)=c • polynomial n a := by + simp [polynomial,Finset.smul_sum,smul_monomial] +@[simp] lemma polynomial_zero (n : ℕ) : polynomial (R := R) n 0=0 := by simp [polynomial] +lemma coefficients_add (n : ℕ) (p q : Poly (R := R)) : + coefficients n (p+q)=coefficients n p+coefficients n q := by ext; simp [coefficients] +lemma coefficients_smul (n : ℕ) (c : R) (p : Poly (R := R)) : + coefficients n (c • p)=c • coefficients n p := by ext; simp [coefficients] + +def equivHomogeneous (n : ℕ) : Form (R := R) n ≃ₗ[R] homogeneousSubmodule (Fin 2) R n where + toFun a := ⟨polynomial n a,polynomial_homogeneous n a⟩ + invFun p := coefficients n p + left_inv := coefficients_polynomial n + right_inv p := Subtype.ext (polynomial_coefficients p.property) + map_add' a b := Subtype.ext (polynomial_add n a b) + map_smul' c a := Subtype.ext (polynomial_smul n c a) + +lemma eval_polynomial (n : ℕ) (a : Form (R := R) n) (v : Fin 2 → R) : + MvPolynomial.eval v (polynomial n a)=∑ k : Fin (n+1), a k*v 0^k.val*v 1^(n-k.val) := by + simp only [polynomial,eval_sum,eval_monomial] + apply Finset.sum_congr rfl + intro k _ + rw [Finsupp.prod_fintype] + · simp [Fin.prod_univ_two]; ring + · simp + +lemma coefficients_monomial_diff {n : ℕ} {p : Poly (R := R)} + (hp : p.IsHomogeneous (n+1)) (i : Fin 2) : + (p.divMonomial (Finsupp.single i 1)).IsHomogeneous n := by + intro e he + have h := hp (show p.coeff (Finsupp.single i 1+e)≠0 from he) + simp only [map_add,Finsupp.weight_single,Pi.one_apply,smul_eq_mul,mul_one] at h + omega + +lemma homogeneous_projection {n : ℕ} {p : Poly (R := R)} (hp : p.IsHomogeneous n) : + MvPolynomial.eval₂ MvPolynomial.C ![0,X 1] p= + C (MvPolynomial.eval ![0,1] p)*X 1^n := by + rw [← polynomial_coefficients hp] + simp only [polynomial,eval₂_sum,eval₂_monomial,eval_sum,eval_monomial] + have hexp (k : Fin (n+1)) (x y : Poly (R := R)) : + (exponent n k).prod (fun i v ↦ (![x,y] : Fin 2 → Poly (R := R)) i^v)=x^k.val*y^(n-k.val) := by + rw [Finsupp.prod_fintype] + · simp [Fin.prod_univ_two] + · simp + have hexp' (k : Fin (n+1)) : + (exponent n k).prod (fun i v ↦ (![0,1] : Fin 2 → R) i^v)=(0 : R)^k.val := by + rw [Finsupp.prod_fintype] + · simp [Fin.prod_univ_two] + · simp + simp only [hexp',map_sum,map_mul,map_pow,map_zero,Finset.sum_mul] + apply Finset.sum_congr rfl + intro k _ + by_cases hk : k.val=0 + · simp [hk] + · simp [zero_pow hk] + +end +end QuadricCounterexample.BinaryForms + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Matrix +open scoped BigOperators +noncomputable section + +def kernelForm (h d : ℂ) : Poly (R := ℂ) := C d*X 0-C h*X 1 +def liftForm (u v : ℂ) : Poly (R := ℂ) := C u*X 0+C v*X 1 +lemma kernelForm_homogeneous (h d : ℂ) : (kernelForm h d).IsHomogeneous 1 := + (isHomogeneous_C_mul_X d 0).sub (isHomogeneous_C_mul_X h 1) +lemma liftForm_homogeneous (u v : ℂ) : (liftForm u v).IsHomogeneous 1 := + (isHomogeneous_C_mul_X u 0).add (isHomogeneous_C_mul_X v 1) +@[simp] lemma eval_kernelForm (h d : ℂ) (x : Fin 2 → ℂ) : + MvPolynomial.eval x (kernelForm h d)=d*x 0-h*x 1 := by simp [kernelForm] +@[simp] lemma eval_liftForm (u v : ℂ) (x : Fin 2 → ℂ) : + MvPolynomial.eval x (liftForm u v)=u*x 0+v*x 1 := by simp [liftForm] +lemma kernelForm_ne_zero (h d u v : ℂ) (hu : u*h+v*d=1) : kernelForm h d≠0 := by + intro hh + have h1 := congrArg (MvPolynomial.eval ![1,0]) hh + have h2 := congrArg (MvPolynomial.eval ![0,1]) hh + simp only [eval_kernelForm,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one, + mul_one,mul_zero,sub_zero,zero_sub] at h1 h2 + have h3 : h=0 := neg_eq_zero.mp h2 + simp [h1,h3] at hu + +def adaptedPolynomials (h d u v : ℂ) : (t : ℕ) → Fin (2*t+1) → Poly (R := ℂ) + | 0 => fun _ ↦ 1 + | t+1 => Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) + (fun k ↦ kernelForm h d*X 1*adaptedPolynomials h d u v t k) + (kernelForm h d*X 0^(2*t+1))) (liftForm u v^(2*(t+1))) +lemma adaptedPolynomials_homogeneous (h d u v : ℂ) (t : ℕ) (k : Fin (2*t+1)) : + (adaptedPolynomials h d u v t k).IsHomogeneous (2*t) := by + induction t with + | zero => exact isHomogeneous_one (Fin 2) ℂ + | succ t ih => + refine Fin.lastCases (n:=2*t+2) ?_ (fun k ↦ ?_) k + · simpa only [adaptedPolynomials,Fin.snoc_last,one_mul] using (liftForm_homogeneous u v).pow (2*(t+1)) + · refine Fin.lastCases (n:=2*t+1) ?_ (fun k ↦ ?_) k + · simpa only [adaptedPolynomials,Fin.snoc_castSucc,Fin.snoc_last,show 1+(2*t+1)=2*(t+1) by omega] using + (kernelForm_homogeneous h d).mul (isHomogeneous_X_pow 0 (2*t+1)) + · simpa only [adaptedPolynomials,Fin.snoc_castSucc,show 1+1+2*t=2*(t+1) by omega] using + ((kernelForm_homogeneous h d).mul (isHomogeneous_X ℂ 1)).mul (ih k) + +lemma sum_snoc_two {n : ℕ} (a : Fin (n+2) → ℂ) (f : Fin n → Poly (R := ℂ)) + (p q : Poly (R := ℂ)) : + (∑ k, a k • Fin.snoc (Fin.snoc f p) q k)= + (∑ k : Fin n, a k.castSucc.castSucc • f k)+ + a (Fin.last n).castSucc • p+a (Fin.last (n+1)) • q := by + rw [Fin.sum_univ_castSucc,Fin.sum_univ_castSucc] + simp only [Fin.snoc_castSucc,Fin.snoc_last] + +lemma polynomial_sum_smul {ι : Type u2} [Fintype ι] (a : ι → ℂ) + (p : Poly (R := ℂ)) (f : ι → Poly (R := ℂ)) : + (∑ i,a i • (p*f i))=p*(∑ i,a i • f i) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + simp only [MvPolynomial.smul_eq_C_mul] + ring +lemma eval_sum_smul {ι : Type u3} [Fintype ι] (a : ι → ℂ) (f : ι → Poly (R := ℂ)) + (x : Fin 2 → ℂ) : MvPolynomial.eval x (∑ i,a i • f i)=∑ i,a i*MvPolynomial.eval x (f i) := by + simp [MvPolynomial.smul_eq_C_mul] + +lemma adaptedPolynomials_independent (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) : + LinearIndependent ℂ (adaptedPolynomials h d u v t) := by + rw [Fintype.linearIndependent_iff] + induction t with + | zero => + intro c hc k + have hk : k=0 := Fin.ext (by omega) + subst k + have hx := congrArg (MvPolynomial.eval ![0,0]) hc + simpa [adaptedPolynomials,Fin.sum_univ_one] using hx + | succ t ih => + intro c hc k + simp only [adaptedPolynomials] at hc + have hs := sum_snoc_two (n:=2*t+1) c + (fun k ↦ kernelForm h d*X 1*adaptedPolynomials h d u v t k) + (kernelForm h d*X 0^(2*t+1)) (liftForm u v^(2*(t+1))) + have hc2 := hs.symm.trans hc + let c₀ : Fin (2*t+1) → ℂ := fun k ↦ c k.castSucc.castSucc + let p : Poly (R := ℂ) := ∑ k,c₀ k • adaptedPolynomials h d u v t k + have hc' : kernelForm h d*X 1*p+ + c (Fin.last (2*t+1)).castSucc • (kernelForm h d*X 0^(2*t+1))+ + c (Fin.last (2*t+2)) • liftForm u v^(2*(t+1))=0 := by + simpa only [polynomial_sum_smul,c₀,p] using hc2 + have hlast : c (Fin.last (2*t+2))=0 := by + have he := congrArg (MvPolynomial.eval ![h,d]) hc' + simpa [MvPolynomial.smul_eq_C_mul,hu,mul_comm d h] using he + have hrem : kernelForm h d*(X 1*p+C (c (Fin.last (2*t+1)).castSucc)*X 0^(2*t+1))=0 := by + rw [hlast,zero_smul,add_zero] at hc' + simp only [MvPolynomial.smul_eq_C_mul] at hc' + linear_combination hc' + have hrem' : X (R := ℂ) 1*p+C (c (Fin.last (2*t+1)).castSucc)*X 0^(2*t+1)=0 := + (mul_eq_zero.mp hrem).resolve_left (kernelForm_ne_zero h d u v hu) + have hpen : c (Fin.last (2*t+1)).castSucc=0 := by + have he := congrArg (MvPolynomial.eval ![1,0]) hrem' + simpa using he + have hp : p=0 := by + rw [hpen,map_zero,zero_mul,add_zero] at hrem' + exact (mul_eq_zero.mp hrem').resolve_left (X_ne_zero 1) + have hold : ∀ k,c₀ k=0 := ih c₀ hp + refine Fin.lastCases hlast (fun j ↦ ?_) k + exact Fin.lastCases hpen (fun l ↦ hold l) j + +def adaptedMatrix (h d u v : ℂ) (t : ℕ) : Matrix (Fin (2*t+1)) (Fin (2*t+1)) ℂ := + fun a b ↦ coefficients (2*t) (adaptedPolynomials h d u v t b) a +lemma adaptedMatrix_columns (h d u v : ℂ) (t : ℕ) (k : Fin (2*t+1)) : + polynomial (2*t) ((adaptedMatrix h d u v t).col k)=adaptedPolynomials h d u v t k := + polynomial_coefficients (adaptedPolynomials_homogeneous h d u v t k) +lemma adaptedMatrix_independent (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) : + LinearIndependent ℂ (adaptedMatrix h d u v t).col := by + let f : Form (R := ℂ) (2*t) →ₗ[ℂ] Poly (R := ℂ) := + (homogeneousSubmodule (Fin 2) ℂ (2*t)).subtype.comp (equivHomogeneous (R := ℂ) (2*t)).toLinearMap + have he : (fun k ↦ f ((adaptedMatrix h d u v t).col k))=adaptedPolynomials h d u v t := + funext (adaptedMatrix_columns h d u v t) + apply LinearIndependent.of_comp f + change LinearIndependent ℂ (fun k ↦ f ((adaptedMatrix h d u v t).col k)) + rw [he] + exact adaptedPolynomials_independent h d u v hu t +lemma adaptedMatrix_isUnit (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) : + IsUnit (adaptedMatrix h d u v t) := by + rw [← Matrix.mulVec_injective_iff_isUnit,Matrix.mulVec_injective_iff] + exact adaptedMatrix_independent h d u v hu t + +end +end QuadricCounterexample.BinaryForms + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Matrix +open scoped BigOperators +noncomputable section + +def substitute (T : Matrix (Fin 2) (Fin 2) ℂ) : Poly (R := ℂ) →ₐ[ℂ] Poly (R := ℂ) := + MvPolynomial.aeval (fun b ↦ ∑ a : Fin 2,C (T a b)*X a) +@[simp] lemma substitute_X (T : Matrix (Fin 2) (Fin 2) ℂ) (b : Fin 2) : + substitute T (X b)=∑ a : Fin 2,C (T a b)*X a := by simp [substitute] +@[simp] lemma substitute_C (T : Matrix (Fin 2) (Fin 2) ℂ) (c : ℂ) : + substitute T (C c)=C c := by simp [substitute] +lemma substitute_comp (T U : Matrix (Fin 2) (Fin 2) ℂ) (p : Poly (R := ℂ)) : + substitute T (substitute U p)=substitute (T*U) p := by + have he : (substitute T).comp (substitute U)=substitute (T*U) := by + apply MvPolynomial.algHom_ext + intro b + simp only [AlgHom.comp_apply,substitute_X,map_sum,map_mul,substitute_C, + Matrix.mul_apply,map_sum,Finset.sum_mul,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a _ + apply Finset.sum_congr rfl + intro c _ + ring + exact DFunLike.congr_fun he p +@[simp] lemma substitute_one (p : Poly (R := ℂ)) : substitute 1 p=p := by + have he : substitute 1=AlgHom.id ℂ (Poly (R := ℂ)) := by + apply MvPolynomial.algHom_ext + intro b + simp [Matrix.one_apply] + exact DFunLike.congr_fun he p +lemma substitute_homogeneous (T : Matrix (Fin 2) (Fin 2) ℂ) {n : ℕ} + {p : Poly (R := ℂ)} (hp : p.IsHomogeneous n) : (substitute T p).IsHomogeneous n := by + rw [← polynomial_coefficients hp] + unfold polynomial + rw [map_sum] + apply IsHomogeneous.sum + intro k _ + have hh : ∀ b : Fin 2,(substitute T (X b)).IsHomogeneous 1 := by + intro b + rw [substitute_X] + apply IsHomogeneous.sum + intro a _ + exact isHomogeneous_C_mul_X (T a b) a + have hm : monomial (exponent n k) (coefficients n p k)= + C (coefficients n p k)*X 0^k.val*X 1^(n-k.val) := by + unfold exponent + rw [monomial_add_single,← C_mul_X_pow_eq_monomial] + rw [hm,map_mul,map_mul,map_pow,map_pow,substitute_C] + convert ((isHomogeneous_C _ _).mul ((hh 0).pow k.val)).mul ((hh 1).pow (n-k.val)) using 1; + simp only [one_mul,zero_add,Nat.add_sub_of_le (Nat.le_of_lt_succ k.isLt)] + +lemma polynomial_linearCombination {ι : Type u4} [Fintype ι] (n : ℕ) + (c : ι → ℂ) (a : ι → Form (R := ℂ) n) : + polynomial n (∑ i,c i • a i)=∑ i,c i • polynomial n (a i) := by + change ((equivHomogeneous (R := ℂ) n) (∑ i,c i • a i)).val=_ + rw [map_sum] + simp only [AddSubmonoidClass.coe_finsetSum,map_smul,SetLike.val_smul] + rfl + +lemma polynomial_mulVec (n : ℕ) (T : Matrix (Fin (n+1)) (Fin (n+1)) ℂ) + (a : Form (R := ℂ) n) : + polynomial n (T.mulVec a)=∑ k,a k • polynomial n (T.col k) := by + rw [← polynomial_linearCombination] + congr 1 + ext j + simp only [mulVec,dotProduct,Finset.sum_apply,Pi.smul_apply,smul_eq_mul,col,transpose_apply] + apply Finset.sum_congr rfl + intro k _ + ring + +def symmetricMatrix (n : ℕ) (T : Matrix (Fin 2) (Fin 2) ℂ) : Matrix (Fin (n+1)) (Fin (n+1)) ℂ := + fun a b ↦ coefficients n (substitute T (monomial (exponent n b) 1)) a +lemma polynomial_symmetricMatrix_col (n : ℕ) (T : Matrix (Fin 2) (Fin 2) ℂ) (b : Fin (n+1)) : + polynomial n ((symmetricMatrix n T).col b)=substitute T (monomial (exponent n b) 1) := by + exact polynomial_coefficients (substitute_homogeneous T (isHomogeneous_monomial _ (exponent_degree n b))) +lemma polynomial_symmetricMatrix (n : ℕ) (T : Matrix (Fin 2) (Fin 2) ℂ) (a : Form (R := ℂ) n) : + polynomial n ((symmetricMatrix n T).mulVec a)=substitute T (polynomial n a) := by + rw [polynomial_mulVec] + simp_rw [polynomial_symmetricMatrix_col] + unfold polynomial + rw [map_sum] + apply Finset.sum_congr rfl + intro k _ + rw [← map_smul] + simp only [smul_monomial,smul_eq_mul,mul_one] +lemma symmetricMatrix_mul (n : ℕ) (T U : Matrix (Fin 2) (Fin 2) ℂ) : + symmetricMatrix n (T*U)=symmetricMatrix n T*symmetricMatrix n U := by + apply Matrix.ext_of_mulVec_single + intro b + apply polynomial_injective n + rw [← mulVec_mulVec,polynomial_symmetricMatrix,polynomial_symmetricMatrix,polynomial_symmetricMatrix, + substitute_comp] +@[simp] lemma symmetricMatrix_one (n : ℕ) : symmetricMatrix n (1 : Matrix (Fin 2) (Fin 2) ℂ)=1 := by + apply Matrix.ext_of_mulVec_single + intro b + apply polynomial_injective n + simp only [polynomial_symmetricMatrix,substitute_one,one_mulVec] +lemma eval_substitute (T : Matrix (Fin 2) (Fin 2) ℂ) (p : Poly (R := ℂ)) (v : Fin 2 → ℂ) : + MvPolynomial.eval v (substitute T p)=MvPolynomial.eval (T.transpose.mulVec v) p := by + change (MvPolynomial.eval v).comp (substitute T).toRingHom p=_ + congr 1 + apply MvPolynomial.ringHom_ext + · intro c; simp + · intro b; fin_cases b <;> simp +end +end QuadricCounterexample.BinaryForms + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Matrix +open scoped BigOperators +noncomputable section + +lemma adaptedMatrix_det_unit (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) : + IsUnit (adaptedMatrix h d u v t).det := + (Matrix.isUnit_iff_isUnit_det _).mp (adaptedMatrix_isUnit h d u v hu t) + +lemma polynomial_adapted_mulVec (h d u v : ℂ) (t : ℕ) (c : Form (R := ℂ) (2*t)) : + polynomial (2*t) ((adaptedMatrix h d u v t).mulVec c)= + ∑ k,c k • adaptedPolynomials h d u v t k := by + rw [polynomial_mulVec] + simp_rw [adaptedMatrix_columns] + +lemma adapted_combination_succ (h d u v : ℂ) (t : ℕ) (c : Form (R := ℂ) (2*(t+1))) : + polynomial (2*(t+1)) ((adaptedMatrix h d u v (t+1)).mulVec c)= + kernelForm h d*X 1*polynomial (2*t) ((adaptedMatrix h d u v t).mulVec + (fun k ↦ c k.castSucc.castSucc))+ + c (Fin.last (2*t+1)).castSucc • (kernelForm h d*X 0^(2*t+1))+ + c (Fin.last (2*t+2)) • liftForm u v^(2*(t+1)) := by + rw [polynomial_adapted_mulVec,polynomial_adapted_mulVec] + simp only [adaptedPolynomials] + exact (sum_snoc_two (n:=2*t+1) c _ _ _).trans (by rw [polynomial_sum_smul]) + +lemma eval_adapted_combination (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + (c : Form (R := ℂ) (2*(t+1))) : + MvPolynomial.eval ![h,d] (polynomial (2*(t+1)) ((adaptedMatrix h d u v (t+1)).mulVec c))= + c (Fin.last (2*t+2)) := by + rw [adapted_combination_succ] + simp [MvPolynomial.smul_eq_C_mul,hu,mul_comm d h] + +def adaptedCoordinates (h d u v : ℂ) (t : ℕ) (p : Poly (R := ℂ)) : Form (R := ℂ) (2*t) := + (adaptedMatrix h d u v t)⁻¹.mulVec (coefficients (2*t) p) +lemma adaptedCoordinates_smul (h d u v : ℂ) (t : ℕ) (c : ℂ) (p : Poly (R := ℂ)) : + adaptedCoordinates h d u v t (c • p)=c • adaptedCoordinates h d u v t p := by + unfold adaptedCoordinates + rw [coefficients_smul,Matrix.mulVec_smul] + +lemma polynomial_adaptedCoordinates (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + {p : Poly (R := ℂ)} (hp : p.IsHomogeneous (2*t)) : + polynomial (2*t) ((adaptedMatrix h d u v t).mulVec (adaptedCoordinates h d u v t p))=p := by + rw [adaptedCoordinates,mulVec_mulVec,Matrix.mul_nonsing_inv _ (adaptedMatrix_det_unit h d u v hu t),one_mulVec] + exact polynomial_coefficients hp +lemma adaptedCoordinates_combination (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + (c : Form (R := ℂ) (2*t)) : + adaptedCoordinates h d u v t (polynomial (2*t) ((adaptedMatrix h d u v t).mulVec c))=c := by + rw [adaptedCoordinates,coefficients_polynomial,mulVec_mulVec, + Matrix.nonsing_inv_mul _ (adaptedMatrix_det_unit h d u v hu t),one_mulVec] +lemma adaptedCoordinates_last (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + {p : Poly (R := ℂ)} (hp : p.IsHomogeneous (2*(t+1))) : + adaptedCoordinates h d u v (t+1) p (Fin.last (2*t+2))=MvPolynomial.eval ![h,d] p := by + rw [← polynomial_adaptedCoordinates h d u v hu (t+1) hp, + eval_adapted_combination h d u v hu t,adaptedCoordinates_combination h d u v hu] + +lemma adaptedCoordinates_residual (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + {p : Poly (R := ℂ)} (hp : p.IsHomogeneous (2*t)) : + adaptedCoordinates h d u v (t+1) (kernelForm h d*X 1*p)= + Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) (adaptedCoordinates h d u v t p) 0) 0 := by + let c : Form (R := ℂ) (2*(t+1)) := Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) (adaptedCoordinates h d u v t p) 0) (0 : ℂ) + have he : polynomial (2*(t+1)) ((adaptedMatrix h d u v (t+1)).mulVec c)=kernelForm h d*X 1*p := by + rw [adapted_combination_succ] + simp only [c,Fin.snoc_last,Fin.snoc_castSucc,zero_smul,add_zero] + rw [polynomial_adaptedCoordinates h d u v hu t hp] + rw [← he,adaptedCoordinates_combination h d u v hu] + +lemma adaptedCoordinates_penultimate (h d u v : ℂ) (hu : u*h+v*d=1) (t : ℕ) + {p : Poly (R := ℂ)} (hp : p.IsHomogeneous (2*t+1)) : + adaptedCoordinates h d u v (t+1) (kernelForm h d*p) (Fin.last (2*t+1)).castSucc= + MvPolynomial.eval ![1,0] p := by + have hhp : (kernelForm h d*p).IsHomogeneous (2*(t+1)) := by + convert (kernelForm_homogeneous h d).mul hp using 1; omega + let c := adaptedCoordinates h d u v (t+1) (kernelForm h d*p) + have hc0 : c (Fin.last (2*t+2))=0 := by + change adaptedCoordinates h d u v (t+1) (kernelForm h d*p) (Fin.last (2*t+2))=0 + rw [adaptedCoordinates_last h d u v hu t hhp] + simp [mul_comm d h] + have he := polynomial_adaptedCoordinates h d u v hu (t+1) hhp + change polynomial (2*(t+1)) ((adaptedMatrix h d u v (t+1)).mulVec c)=kernelForm h d*p at he + rw [adapted_combination_succ,hc0,zero_smul,add_zero,MvPolynomial.smul_eq_C_mul] at he + have he' : kernelForm h d*(X 1*polynomial (2*t) ((adaptedMatrix h d u v t).mulVec + (fun k ↦ c k.castSucc.castSucc))+C (c (Fin.last (2*t+1)).castSucc)*X 0^(2*t+1))= + kernelForm h d*p := by linear_combination he + have he'' := mul_left_cancel₀ (kernelForm_ne_zero h d u v hu) he' + have hev := congrArg (MvPolynomial.eval ![1,0]) he'' + simpa using hev +end +end QuadricCounterexample.BinaryForms + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Matrix +open scoped BigOperators +noncomputable section +structure FlagFrame where + h : ℂ + d : ℂ + u : ℂ + v : ℂ + bezout : u*h+v*d=1 +namespace FlagFrame +def matrix (F : FlagFrame) (t : ℕ) := adaptedMatrix F.h F.d F.u F.v t +def column (F : FlagFrame) (t : ℕ) := adaptedPolynomials F.h F.d F.u F.v t +def coords (F : FlagFrame) (t : ℕ) := adaptedCoordinates F.h F.d F.u F.v t +lemma det_unit (F : FlagFrame) (t : ℕ) : IsUnit (F.matrix t).det := + adaptedMatrix_det_unit F.h F.d F.u F.v F.bezout t +end FlagFrame + +structure FlagChange (F G : FlagFrame) where + T : Matrix (Fin 2) (Fin 2) ℂ + kernel : ℂ + bottom : ℂ + top : ℂ + quotient : ℂ + kernel_change : substitute T (kernelForm G.h G.d)=C kernel*kernelForm F.h F.d + bottom_change : substitute T (X 1)=C bottom*X 1 + top_projection : MvPolynomial.eval ![1,0] (substitute T (X 0))=top + lift_quotient : MvPolynomial.eval ![F.h,F.d] (substitute T (liftForm G.u G.v))=quotient +namespace FlagChange +variable {F G : FlagFrame} (H : FlagChange F G) +def matrix (t : ℕ) : Matrix (Fin (2*t+1)) (Fin (2*t+1)) ℂ := + (F.matrix t)⁻¹*symmetricMatrix (2*t) H.T*G.matrix t +lemma matrix_col (t : ℕ) (b : Fin (2*t+1)) : + (H.matrix t).col b=F.coords t (substitute H.T (G.column t b)) := by + have hcol {n : ℕ} (A B : Matrix (Fin n) (Fin n) ℂ) (b : Fin n) : + (A*B).col b=A.mulVec (B.col b) := rfl + unfold matrix FlagFrame.coords adaptedCoordinates + rw [hcol,← mulVec_mulVec] + congr 1 + have hh := congrArg (coefficients (2*t)) + (polynomial_symmetricMatrix (2*t) H.T ((G.matrix t).col b)) + rw [coefficients_polynomial] at hh + exact hh.trans (congrArg (coefficients (2*t) ∘ substitute H.T) + (adaptedMatrix_columns G.h G.d G.u G.v t b)) +lemma matrix_entry (t : ℕ) (a b : Fin (2*t+1)) : + H.matrix t a b=F.coords t (substitute H.T (G.column t b)) a := + congrFun (H.matrix_col t b) a +lemma matrix_column_residual (t : ℕ) (b : Fin (2*t+1)) : + (H.matrix (t+1)).col b.castSucc.castSucc= + (H.kernel*H.bottom) • Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) ((H.matrix t).col b) 0) 0 := by + rw [H.matrix_col] + simp only [FlagFrame.column,adaptedPolynomials,Fin.snoc_castSucc] + rw [map_mul,map_mul,H.kernel_change,H.bottom_change] + have he : C H.kernel*kernelForm F.h F.d*(C H.bottom*X 1)*substitute H.T (G.column t b)= + (H.kernel*H.bottom) • (kernelForm F.h F.d*X 1*substitute H.T (G.column t b)) := by + rw [MvPolynomial.smul_eq_C_mul,map_mul]; ring + dsimp only [FlagFrame.column] at he + rw [he,FlagFrame.coords,adaptedCoordinates_smul, + adaptedCoordinates_residual F.h F.d F.u F.v F.bezout t + (substitute_homogeneous H.T (adaptedPolynomials_homogeneous G.h G.d G.u G.v t b))] + rw [H.matrix_col] + rfl + +lemma matrix_pen_last (t : ℕ) : + H.matrix (t+1) (Fin.last (2*t+2)) (Fin.last (2*t+1)).castSucc=0 := by + rw [H.matrix_entry] + simp only [FlagFrame.column,adaptedPolynomials,Fin.snoc_castSucc,Fin.snoc_last] + change adaptedCoordinates F.h F.d F.u F.v (t+1) + (substitute H.T (kernelForm G.h G.d*X 0^(2*t+1))) _=0 + have hp : (kernelForm G.h G.d*X 0^(2*t+1)).IsHomogeneous (2*(t+1)) := by + convert (kernelForm_homogeneous G.h G.d).mul (isHomogeneous_X_pow (R:=ℂ) 0 (2*t+1)) using 1; omega + rw [adaptedCoordinates_last F.h F.d F.u F.v F.bezout t (substitute_homogeneous H.T hp)] + rw [map_mul,H.kernel_change] + simp [mul_comm F.d F.h] +lemma matrix_pen_diag (t : ℕ) : + H.matrix (t+1) (Fin.last (2*t+1)).castSucc (Fin.last (2*t+1)).castSucc= + H.kernel*H.top^(2*t+1) := by + rw [H.matrix_entry] + simp only [FlagFrame.column,adaptedPolynomials,Fin.snoc_castSucc,Fin.snoc_last] + rw [map_mul,H.kernel_change,map_pow] + have he : C H.kernel*kernelForm F.h F.d*(substitute H.T (X 0))^(2*t+1)= + kernelForm F.h F.d*(C H.kernel*(substitute H.T (X 0))^(2*t+1)) := by ring + rw [he,FlagFrame.coords,adaptedCoordinates_penultimate F.h F.d F.u F.v F.bezout t] + · simp only [map_mul,eval_C,map_pow,H.top_projection] + · have hh := substitute_homogeneous H.T (isHomogeneous_X_pow (R:=ℂ) 0 (2*t+1)) + simpa only [map_pow] using hh.C_mul H.kernel +lemma matrix_last_diag (t : ℕ) : + H.matrix (t+1) (Fin.last (2*t+2)) (Fin.last (2*t+2))=H.quotient^(2*(t+1)) := by + rw [H.matrix_entry] + simp only [FlagFrame.column,adaptedPolynomials,Fin.snoc_last] + rw [FlagFrame.coords,adaptedCoordinates_last F.h F.d F.u F.v F.bezout t + (substitute_homogeneous H.T (by simpa only [one_mul] using + (liftForm_homogeneous G.u G.v).pow (2*(t+1))))] + rw [map_pow,map_pow,H.lift_quotient] + +def graded : (t : ℕ) → Fin (2*t+1) → ℂ + | 0 => fun _ ↦ 1 + | t+1 => Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) + (fun k ↦ (H.kernel*H.bottom)*graded t k) (H.kernel*H.top^(2*t+1))) (H.quotient^(2*(t+1))) +lemma matrix_zero : H.matrix 0=1 := by + ext a b + have ha : a=0 := Fin.ext (by omega) + have hb : b=0 := Fin.ext (by omega) + subst a; subst b + rw [H.matrix_entry] + change adaptedCoordinates F.h F.d F.u F.v 0 (substitute H.T 1) 0=1 + simp only [map_one] + have he : (1 : Poly (R := ℂ))=polynomial 0 ((adaptedMatrix F.h F.d F.u F.v 0).mulVec (fun _ ↦ 1)) := by + rw [polynomial_adapted_mulVec F.h F.d F.u F.v 0 (fun _ ↦ 1)] + simp [adaptedPolynomials] + rw [he,adaptedCoordinates_combination F.h F.d F.u F.v F.bezout] +lemma triangular_diagonal (t : ℕ) : + (∀ a b : Fin (2*t+1),b + constructor + · intro a b h; have := a.isLt; have := b.isLt; omega + · intro a; rw [H.matrix_zero]; simp [graded] + | succ t ih => + have he (a : Fin (2*(t+1)+1)) (b : Fin (2*t+1)) := congrFun (H.matrix_column_residual t b) a + constructor + · intro a b hb + revert hb + refine Fin.lastCases (n:=2*t+2) (fun hb ↦ ?_) (fun b hb ↦ ?_) b + · exact False.elim (by have := a.isLt; simp only [Fin.lt_def,Fin.val_last] at hb; omega) + · revert hb + refine Fin.lastCases (n:=2*t+1) (fun hb ↦ ?_) (fun b hb ↦ ?_) b + · have ha : a=Fin.last (2*t+2) := Fin.ext (by + have := a.isLt + simp only [Fin.lt_def,Fin.val_castSucc,Fin.val_last] at hb ⊢ + omega) + subst a + exact H.matrix_pen_last t + · revert hb + refine Fin.lastCases (n:=2*t+2) (fun _ ↦ ?_) (fun a hb ↦ ?_) a + · simpa only [Matrix.col_apply,Pi.smul_apply,smul_eq_mul,Fin.snoc_last,mul_zero] using he (Fin.last (2*t+2)) b + · revert hb + refine Fin.lastCases (n:=2*t+1) (fun _ ↦ ?_) (fun a hb ↦ ?_) a + · simpa only [Matrix.col_apply,Pi.smul_apply,smul_eq_mul,Fin.snoc_castSucc,Fin.snoc_last,mul_zero] + using he (Fin.last (2*t+1)).castSucc b + · have hab : b simp + | coe z => + by_cases hz : z = 0 + · subst z; simp + · rw [reciprocalP1_coe hz, reciprocalP1_coe (inv_ne_zero hz), inv_inv] + +lemma reciprocalP1_coe_continuousAt_zero : + ContinuousAt (fun z : ℂ ↦ reciprocalP1 z) 0 := by + rw [continuousAt_iff_punctured_nhds, reciprocalP1_zero] + have he : (fun z : ℂ ↦ reciprocalP1 z) =ᶠ[𝓝[≠] (0 : ℂ)] + (fun z : ℂ ↦ ((z⁻¹ : ℂ) : ProjectiveLine)) := by + filter_upwards [self_mem_nhdsWithin] with z hz + exact reciprocalP1_coe hz + apply Tendsto.congr' he.symm + have ht : Tendsto Inv.inv (𝓝[≠] (0 : ℂ)) (coclosedCompact ℂ) := by + simpa only [coclosedCompact_eq_cocompact, ← Metric.cobounded_eq_cocompact] using + (tendsto_inv₀_nhdsNE_zero (α := ℂ)) + exact (show Tendsto ((↑) : ℂ → ProjectiveLine) (coclosedCompact ℂ) (𝓝 ∞) from + (by rw [← OnePoint.comap_coe_nhds_infty]; exact tendsto_comap)).comp ht + +lemma continuous_reciprocalP1 : Continuous reciprocalP1 := by + rw [OnePoint.continuous_iff] + constructor + · have he : (fun z : ℂ ↦ reciprocalP1 z) =ᶠ[coclosedCompact ℂ] + (fun z : ℂ ↦ ((z⁻¹ : ℂ) : ProjectiveLine)) := by + have hn : ∀ᶠ z : ℂ in coclosedCompact ℂ, z ≠ 0 := by + rw [coclosedCompact_eq_cocompact] + exact isCompact_singleton.compl_mem_cocompact + filter_upwards [hn] with z hz + exact reciprocalP1_coe hz + apply Tendsto.congr' he.symm + apply OnePoint.continuous_coe.continuousAt.tendsto.comp + simpa only [coclosedCompact_eq_cocompact, ← Metric.cobounded_eq_cocompact] using + (tendsto_inv₀_cobounded (α := ℂ)) + · apply continuous_iff_continuousAt.mpr + intro z + by_cases hz : z = 0 + · subst z; exact reciprocalP1_coe_continuousAt_zero + · have he : (fun w : ℂ ↦ reciprocalP1 w) =ᶠ[𝓝 z] + (fun w : ℂ ↦ ((w⁻¹ : ℂ) : ProjectiveLine)) := by + filter_upwards [eventually_ne_nhds hz] with w hw + exact reciprocalP1_coe hw + exact (OnePoint.continuous_coe.continuousAt.comp + (continuousAt_id.inv₀ hz)).congr_of_eventuallyEq he + +def reciprocalP1Homeomorph : ProjectiveLine ≃ₜ ProjectiveLine where + toFun := reciprocalP1 + invFun := reciprocalP1 + left_inv := reciprocalP1_involutive + right_inv := reciprocalP1_involutive + continuous_toFun := continuous_reciprocalP1 + continuous_invFun := continuous_reciprocalP1 + +lemma affineP1_continuous (i : Fin 2) : Continuous (affineP1 i) := by + fin_cases i + · exact continuous_reciprocalP1.comp OnePoint.continuous_coe + · exact OnePoint.continuous_coe + +lemma affineP1_isOpenEmbedding (i : Fin 2) : IsOpenEmbedding (affineP1 i) := by + fin_cases i + · exact reciprocalP1Homeomorph.isOpenEmbedding.comp OnePoint.isOpenEmbedding_coe + · exact OnePoint.isOpenEmbedding_coe + +lemma affineP1_cover (x : ProjectiveLine) : ∃ i : Fin 2, ∃ z : ℂ, affineP1 i z = x := by + induction x using OnePoint.rec with + | infty => exact ⟨0,0,by simp [affineP1]⟩ + | coe z => exact ⟨1,z,rfl⟩ + +lemma affineQuadric_isOpenEmbedding (i : Fin 2 × Fin 2) : + IsOpenEmbedding (affineQuadric i) := + (affineP1_isOpenEmbedding i.1).prodMap (affineP1_isOpenEmbedding i.2) + +lemma affineQuadric_cover (x : QuadricSurface) : + ∃ i : Fin 2 × Fin 2, ∃ z : ℂ × ℂ, affineQuadric i z = x := by + obtain ⟨i,z,hz⟩ := affineP1_cover x.1 + obtain ⟨j,w,hw⟩ := affineP1_cover x.2 + exact ⟨(i,j),(z,w),Prod.ext hz hw⟩ + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set OnePoint MvPolynomial +noncomputable section + +@[simp] lemma coordP1_affine (i : Fin 2) (z : ℂ) : coordP1 i (affineP1 i z) = z := by + fin_cases i <;> simp [coordP1, affineP1] + +@[simp] lemma coordQuadric_affine (i : Fin 2 × Fin 2) (z : BaseCoordinates) : + coordQuadric i (affineQuadric i z) = z := by + ext <;> simp [coordQuadric, affineQuadric] + +lemma affineP1_coord {i : Fin 2} {x : ProjectiveLine} (hx : x ∈ range (affineP1 i)) : + affineP1 i (coordP1 i x) = x := by + obtain ⟨z,rfl⟩ := hx + rw [coordP1_affine] + +lemma affineQuadric_coord {i : Fin 2 × Fin 2} {x : QuadricSurface} + (hx : x ∈ range (affineQuadric i)) : affineQuadric i (coordQuadric i x) = x := by + obtain ⟨z,rfl⟩ := hx + rw [coordQuadric_affine] + +lemma mem_range_affineP1 (i : Fin 2) (x : ProjectiveLine) : + x ∈ range (affineP1 i) ↔ if i = 0 then x ≠ (0 : ℂ) else x ≠ ∞ := by + fin_cases i + · simp only [Fin.zero_eta, Fin.isValue, ↓reduceIte] + constructor + · rintro ⟨z,rfl⟩ h + have hh := congrArg reciprocalP1 h + simp [affineP1] at hh + · intro hx + refine ⟨coordP1 0 x, ?_⟩ + induction x using OnePoint.rec with + | infty => simp [coordP1,affineP1] + | coe z => + have hz : z ≠ 0 := by simpa using hx + simp [coordP1,affineP1,reciprocalP1_coe hz, reciprocalP1_coe (inv_ne_zero hz)] + · constructor + · rintro ⟨z,rfl⟩; simp [affineP1] + · intro hx + induction x using OnePoint.rec with + | infty => exact False.elim (hx rfl) + | coe z => exact ⟨z,rfl⟩ + +lemma powerP1_affine {m : ℕ} (hm : 0 < m) (i : Fin 2) (z : ℂ) : + powerP1 m (affineP1 i z) = affineP1 i (z^m) := by + fin_cases i + · by_cases hz : z = 0 + · subst z; simp [affineP1,powerP1,hm.ne'] + · simp [affineP1,reciprocalP1_coe hz, reciprocalP1_coe (pow_ne_zero m hz), + powerP1,inv_pow] + · rfl + +lemma powerQuadric_affine {m : ℕ} (hm : 0 < m) (i : Fin 2 × Fin 2) (z : BaseCoordinates) : + powerQuadric m (affineQuadric i z) = affineQuadric i (z.1^m,z.2^m) := by + simp [powerQuadric,affineQuadric,powerP1_affine hm] + +lemma powerP1_mem_range_iff {m : ℕ} (hm : 0 < m) (i : Fin 2) (x : ProjectiveLine) : + powerP1 m x ∈ range (affineP1 i) ↔ x ∈ range (affineP1 i) := by + rw [mem_range_affineP1,mem_range_affineP1] + induction x using OnePoint.rec with + | infty => simp [powerP1] + | coe z => + by_cases hi : i = 0 + · simp [powerP1,hi,pow_eq_zero_iff hm.ne'] + · simp [powerP1,hi] + +lemma mem_range_affineQuadric (i : Fin 2 × Fin 2) (x : QuadricSurface) : + x ∈ range (affineQuadric i) ↔ x.1 ∈ range (affineP1 i.1) ∧ x.2 ∈ range (affineP1 i.2) := by + constructor + · rintro ⟨z,rfl⟩; exact ⟨⟨z.1,rfl⟩,⟨z.2,rfl⟩⟩ + · rintro ⟨⟨z,hz⟩,⟨w,hw⟩⟩; exact ⟨(z,w),Prod.ext hz hw⟩ + +lemma powerQuadric_mem_range_iff {m : ℕ} (hm : 0 < m) (i : Fin 2 × Fin 2) (x : QuadricSurface) : + powerQuadric m x ∈ range (affineQuadric i) ↔ x ∈ range (affineQuadric i) := by + rw [mem_range_affineQuadric,mem_range_affineQuadric] + exact and_congr (powerP1_mem_range_iff hm i.1 x.1) (powerP1_mem_range_iff hm i.2 x.2) + +def pullbackPolynomial (m : ℕ) (p : BasePolynomial) : BasePolynomial := + (MvPolynomial.bind₁ fun j ↦ MvPolynomial.X j ^ m) p + +lemma baseEval_pullback (m : ℕ) (p : BasePolynomial) (z : BaseCoordinates) : + baseEval (pullbackPolynomial m p) z = baseEval p (z.1^m,z.2^m) := by + change MvPolynomial.eval₂Hom (RingHom.id ℂ) _ ((MvPolynomial.bind₁ _) p) = _ + rw [MvPolynomial.eval₂Hom_bind₁] + change MvPolynomial.eval _ p = MvPolynomial.eval _ p + apply congrArg (fun f : Fin 2 → ℂ ↦ MvPolynomial.eval f p) + funext j; fin_cases j <;> simp + +lemma power_principalChart {m : ℕ} (hm : 0 < m) (i : Fin 2 × Fin 2) + (p : BasePolynomial) (x : QuadricSurface) : + x ∈ principalChart i (pullbackPolynomial m p) ↔ powerQuadric m x ∈ principalChart i p := by + constructor + · rintro ⟨hx,hp⟩ + obtain ⟨z,rfl⟩ := hx + rw [powerQuadric_affine hm] + constructor + · exact ⟨_,rfl⟩ + · simpa only [coordQuadric_affine,baseEval_pullback] using hp + · rintro ⟨hx,hp⟩ + have hx' := (powerQuadric_mem_range_iff hm i x).mp hx + obtain ⟨z,rfl⟩ := hx' + constructor + · exact ⟨_,rfl⟩ + · simpa only [powerQuadric_affine hm,coordQuadric_affine,baseEval_pullback] using hp + +lemma coordP1_overlap {i j : Fin 2} {x : ProjectiveLine} + (hi : x ∈ range (affineP1 i)) (hj : x ∈ range (affineP1 j)) (hij : i ≠ j) : + coordP1 i x * coordP1 j x = 1 := by + obtain ⟨z,rfl⟩ := hi + fin_cases i <;> fin_cases j <;> simp_all only [ne_eq,not_true_eq_false] + · have hz : z ≠ 0 := by + intro h; subst z + simp [affineP1] at hj + rw [coordP1_affine] + simp [coordP1,affineP1,reciprocalP1_coe hz, mul_inv_cancel₀ hz] + · have hz : z ≠ 0 := by + rw [mem_range_affineP1] at hj + simpa [affineP1] using hj + simp [coordP1,affineP1,reciprocalP1_coe hz,mul_inv_cancel₀ hz] + +lemma hyperplaneTransition_mul (i j k : Fin 2) (x : ProjectiveLine) + (hi : x ∈ range (affineP1 i)) (hj : x ∈ range (affineP1 j)) + (hk : x ∈ range (affineP1 k)) : + hyperplaneTransition i j x * hyperplaneTransition j k x = hyperplaneTransition i k x := by + by_cases hij : i = j + · subst j; simp [hyperplaneTransition] + by_cases hjk : j = k + · subst k; simp [hyperplaneTransition] + have hik : i = k := by omega + subst k + simp only [hyperplaneTransition,hij,hjk,↓reduceIte] + exact coordP1_overlap hi hj hij + +lemma polarizationTransition_mul (i j k : Fin 2 × Fin 2) (x : QuadricSurface) + (hi : x ∈ range (affineQuadric i)) (hj : x ∈ range (affineQuadric j)) + (hk : x ∈ range (affineQuadric k)) : + polarizationTransition i j x * polarizationTransition j k x = polarizationTransition i k x := by + rw [mem_range_affineQuadric] at hi hj hk + unfold polarizationTransition + calc + _ = (hyperplaneTransition i.1 j.1 x.1 * hyperplaneTransition j.1 k.1 x.1) * + (hyperplaneTransition i.2 j.2 x.2 * hyperplaneTransition j.2 k.2 x.2) := by ring + _ = _ := by rw [hyperplaneTransition_mul _ _ _ _ hi.1 hj.1 hk.1, + hyperplaneTransition_mul _ _ _ _ hi.2 hj.2 hk.2] + +@[simp] lemma baseEval_one (z : BaseCoordinates) : baseEval 1 z = 1 := by simp [baseEval] +@[simp] lemma baseEval_zero (z : BaseCoordinates) : baseEval 0 z = 0 := by simp [baseEval] +@[simp] lemma baseEval_mul (p q : BasePolynomial) (z : BaseCoordinates) : + baseEval (p*q) z = baseEval p z * baseEval q z := by simp [baseEval] + +lemma algebraicallyRegular_polynomial (U : Set BaseCoordinates) (p : BasePolynomial) : + AlgebraicallyRegularOn U (baseEval p) := by + intro z _ + exact ⟨p,1,by simp,fun w _ _ ↦ by simp⟩ + +lemma AlgebraicallyRegularOn.mono {U W : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hU : W ⊆ U) : AlgebraicallyRegularOn W f := by + intro z hz + obtain ⟨p,q,hq,he⟩ := hf z (hU hz) + exact ⟨p,q,hq,fun w hw hqw ↦ he w (hU hw) hqw⟩ + +lemma AlgebraicallyRegularOn.congr {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (he : ∀ z ∈ U, f z = g z) : AlgebraicallyRegularOn U g := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + exact ⟨p,q,hq,fun w hw hqw ↦ (he w hw).symm.trans (h w hw hqw)⟩ + +lemma AlgebraicallyRegularOn.mul {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hg : AlgebraicallyRegularOn U g) : + AlgebraicallyRegularOn U (fun z ↦ f z * g z) := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + obtain ⟨r,s,hs,k⟩ := hg z hz + refine ⟨p*r,q*s,by simpa using mul_ne_zero hq hs,?_⟩ + intro w hw hqw + have hh : baseEval q w ≠ 0 ∧ baseEval s w ≠ 0 := by simpa using hqw + dsimp only + rw [h w hw hh.1,k w hw hh.2,baseEval_mul,baseEval_mul,div_mul_div_comm] + +lemma AlgebraicallyRegularOn.comp_power {U W : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (m : ℕ) + (hU : ∀ z ∈ W, (z.1^m,z.2^m) ∈ U) : + AlgebraicallyRegularOn W (fun z ↦ f (z.1^m,z.2^m)) := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf (z.1^m,z.2^m) (hU z hz) + refine ⟨pullbackPolynomial m p,pullbackPolynomial m q,by simpa [baseEval_pullback] using hq,?_⟩ + intro w hw hqw + simp only [baseEval_pullback] at hqw ⊢ + exact h _ (hU w hw) hqw + +lemma polarizationTransition_polynomial (i j : Fin 2 × Fin 2) (z : BaseCoordinates) : + polarizationTransition i j (affineQuadric i z) = + baseEval ((if i.1=j.1 then 1 else MvPolynomial.X 0) * + (if i.2=j.2 then 1 else MvPolynomial.X 1)) z := by + simp only [polarizationTransition,hyperplaneTransition,affineQuadric,coordP1_affine] + split_ifs <;> simp [baseEval] + +lemma polarizationTransition_regular (i j : Fin 2 × Fin 2) (U : Set BaseCoordinates) : + AlgebraicallyRegularOn U (fun z ↦ polarizationTransition i j (affineQuadric i z)) := by + exact (algebraicallyRegular_polynomial U _).congr (fun z _ ↦ (polarizationTransition_polynomial i j z).symm) + +def powerPullbackTwist (G : AlgebraicRankTwoBundle) (m : ℕ) (hm : 0 < m) : + AlgebraicRankTwoBundle where + numberOfCharts := G.numberOfCharts + chart := G.chart + equation i := pullbackPolynomial m (G.equation i) + finiteCover i hi := by + unfold pullbackPolynomial + rw [G.finiteCover i hi] + exact map_zero _ + covers x := by + obtain ⟨i,hi⟩ := G.covers (powerQuadric m x) + exact ⟨i,(power_principalChart hm _ _ _).mpr hi⟩ + transition i j x := polarizationTransition (G.chart i) (G.chart j) x • + G.transition i j (powerQuadric m x) + transition_self i x hx := by + rw [G.transition_self i _ ((power_principalChart hm _ _ _).mp hx)] + simp [polarizationTransition,hyperplaneTransition] + transition_mul i j k x hi hj hk := by + rw [Matrix.smul_mul, Matrix.mul_smul, smul_smul] + rw [polarizationTransition_mul _ _ _ _ hi.1 hj.1 hk.1] + rw [G.transition_mul i j k _ ((power_principalChart hm _ _ _).mp hi) + ((power_principalChart hm _ _ _).mp hj) ((power_principalChart hm _ _ _).mp hk)] + transition_regular i j a b := by + have hreg := (G.transition_regular i j a b).comp_power m + (W := {z | baseEval (pullbackPolynomial m (G.equation i)) z ≠ 0 ∧ + affineQuadric (G.chart i) z ∈ principalChart (G.chart j) (pullbackPolynomial m (G.equation j))}) + (fun z hz ↦ show baseEval (G.equation i) (z.1^m,z.2^m) ≠ 0 ∧ + affineQuadric (G.chart i) (z.1^m,z.2^m) ∈ principalChart (G.chart j) (G.equation j) from + ⟨by simpa only [baseEval_pullback] using hz.1, + by rw [← powerQuadric_affine hm]; exact (power_principalChart hm _ _ _).mp hz.2⟩) + apply ((polarizationTransition_regular (G.chart i) (G.chart j) _).mul hreg).congr + intro z _ + simp only [powerQuadric_affine hm,Matrix.smul_apply,smul_eq_mul] + +lemma powerPullbackTwist_spec (G : AlgebraicRankTwoBundle) (m : ℕ) (hm : 0 < m) : + IsPowerPullbackTwist G m (powerPullbackTwist G m hm) := + ⟨rfl,rfl,fun _ ↦ rfl,fun _ _ _ _ _ ↦ rfl⟩ + +lemma exists_powerPullbackTwist (G : AlgebraicRankTwoBundle) : + ∃ E : ℕ → AlgebraicRankTwoBundle, ∀ m, 0 < m → IsPowerPullbackTwist G m (E m) := by + refine ⟨fun m ↦ if hm : 0 < m then powerPullbackTwist G m hm else G, ?_⟩ + intro m hm + simp only [dite_eq_left hm] + exact powerPullbackTwist_spec G m hm + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Compactness.lean b/lean/OAI/Geometry/QuadricBundles/Compactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..fdd24fdc39b0f0a17e95cd8e6235b43d55a2a14e --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Compactness.lean @@ -0,0 +1,466 @@ +import OAI.Geometry.QuadricBundles.WeakLimits + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +theorem bounded_hilbert_weak_subsequence + {E : Type u1} [NormedAddCommGroup E] [InnerProductSpace ℂ E] + [CompleteSpace E] [TopologicalSpace.SeparableSpace E] + {u : ℕ → E} {R : ℝ} (hu : ∀ k, ‖u k‖ ≤ R) : + ∃ w : E, ‖w‖ ≤ R ∧ ∃ φ : ℕ → ℕ, StrictMono φ ∧ + ∀ v : E, Tendsto (fun k ↦ inner ℂ (u (φ k)) v) atTop (𝓝 (inner ℂ w v)) := by + let d : ℕ → WeakDual ℂ E := fun k ↦ + StrongDual.toWeakDual ((InnerProductSpace.toDual ℂ E) (u k)) + have hd (k : ℕ) : d k ∈ WeakDual.toStrongDual ⁻¹' + Metric.closedBall (0 : StrongDual ℂ E) R := by + simpa [d, Metric.mem_closedBall, dist_zero_right] using hu k + obtain ⟨w', hw', φ, hφ, hlim⟩ := + (WeakDual.isSeqCompact_closedBall ℂ E (0 : StrongDual ℂ E) R).subseq_of_frequently_in + (Filter.Frequently.of_forall hd) + let w := (InnerProductSpace.toDual ℂ E).symm (WeakDual.toStrongDual w') + refine ⟨w, ?_, φ, hφ, ?_⟩ + · change ‖(InnerProductSpace.toDual ℂ E).symm (WeakDual.toStrongDual w')‖ ≤ R + simpa only [LinearIsometryEquiv.norm_map, mem_preimage, Metric.mem_closedBall, + dist_zero_right] using hw' + · intro v + have hv := (WeakDual.eval_continuous (𝕜 := ℂ) v).continuousAt.tendsto.comp hlim + simpa [d, w, Function.comp_def] using hv + +lemma isClosed_bounded_positive_coefficients {n : Type u2} [Fintype n] [DecidableEq n] + (R : ℝ) : IsClosed {v : EuclideanSpace ℂ (n × n) | + (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R} := by + exact (isClosed_matrix_positive_semidefinite.preimage continuous_coefficientsToMatrix).inter + (isClosed_le continuous_norm continuous_const) + +lemma convex_bounded_positive_coefficients {n : Type u3} [Fintype n] [DecidableEq n] + (R : ℝ) : Convex ℝ {v : EuclideanSpace ℂ (n × n) | + (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R} := by + have hc : Convex ℝ {v : EuclideanSpace ℂ (n × n) | + (coefficientsToMatrix v).PosSemidef} := + convex_matrix_positive_semidefinite.linear_preimage + (coefficientsToMatrix.restrictScalars ℝ) + refine hc.inter ?_ + intro x hx y hy a b ha hb hab + change ‖a • x + b • y‖ ≤ R + calc + ‖a • x + b • y‖ ≤ ‖a • x‖ + ‖b • y‖ := norm_add_le _ _ + _ = a * ‖x‖ + b * ‖y‖ := by + rw [norm_smul, norm_smul, Real.norm_eq_abs, Real.norm_eq_abs, + abs_of_nonneg ha, abs_of_nonneg hb] + _ ≤ a * R + b * R := add_le_add (mul_le_mul_of_nonneg_left hx ha) + (mul_le_mul_of_nonneg_left hy hb) + _ = R := by rw [← add_mul, hab, one_mul] + +lemma bounded_hilbert_weak_subsequence_in + {E : Type u4} [NormedAddCommGroup E] [InnerProductSpace ℂ E] + [CompleteSpace E] [TopologicalSpace.SeparableSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {C : Set E} (hc : IsClosed C) (hv : Convex ℝ C) + {u : ℕ → E} {R : ℝ} (hu : ∀ k, ‖u k‖ ≤ R) (hmem : ∀ k, u k ∈ C) : + ∃ w ∈ C, ∃ φ : ℕ → ℕ, StrictMono φ ∧ + ∀ v : E, Tendsto (fun k ↦ inner ℂ (u (φ k)) v) atTop (𝓝 (inner ℂ w v)) := by + obtain ⟨w, _, φ, hφ, hlim⟩ := bounded_hilbert_weak_subsequence hu + exact ⟨w, mem_closed_convex_of_weak_limit hc hv (fun k ↦ hmem (φ k)) hlim, + φ, hφ, hlim⟩ + +lemma isClosed_ae_variable_mem_Lp {α : Type u5} {E : Type u6} [MeasurableSpace α] + [NormedAddCommGroup E] {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + {C : α → Set E} (hC : ∀ x, IsClosed (C x)) : + IsClosed {f : Lp E p μ | ∀ᵐ x ∂μ, f x ∈ C x} := by + apply IsSeqClosed.isClosed + intro f g hf hfg + obtain ⟨φ, _, hφ⟩ := (tendstoInMeasure_of_tendsto_Lp hfg).exists_seq_tendsto_ae + have hall : ∀ᵐ x ∂μ, ∀ n, f n x ∈ C x := ae_all_iff.mpr hf + filter_upwards [hall, hφ] with x hx hlim + exact (hC x).mem_of_tendsto hlim (Eventually.of_forall fun n ↦ hx (φ n)) + +lemma convex_ae_variable_mem_Lp {α : Type u7} {E : Type u8} [MeasurableSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] + {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + {C : α → Set E} (hC : ∀ x, Convex ℝ (C x)) : + Convex ℝ {f : Lp E p μ | ∀ᵐ x ∂μ, f x ∈ C x} := by + intro f hf g hg a b ha hb hab + filter_upwards [hf, hg, Lp.coeFn_add (a • f) (b • g), + Lp.coeFn_smul a f, Lp.coeFn_smul b g] with x hx hy hadd hsmul₁ hsmul₂ + change (a • f + b • g) x ∈ C x + rw [hadd, Pi.add_apply, hsmul₁, hsmul₂] + exact hC x hx hy ha hb hab + +lemma L2_integrable_of_finite_support {α : Type u9} {E : Type u10} [MeasurableSpace α] + [NormedAddCommGroup E] {μ : Measure α} {s : Set α} + (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (f : Lp E 2 μ) + (hf : ∀ᵐ x ∂μ, x ∉ s → f x = 0) : Integrable (fun x ↦ f x) μ := by + have hi : Integrable (s.indicator (fun x ↦ f x)) μ := + (integrable_indicator_iff hs).mpr (integrableOn_Lp_of_measure_ne_top f (by norm_num) hμs) + apply hi.congr + filter_upwards [hf] with x hx + by_cases hxs : x ∈ s + · simp only [indicator_of_mem hxs] + · simp only [indicator_of_notMem hxs, hx hxs] + +theorem supported_positive_coefficients_weak_subsequence + {α : Type u11} {n : Type u12} [MeasurableSpace α] [Fintype n] [DecidableEq n] + {μ : Measure α} [IsSeparable μ] + {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) + {u : ℕ → Lp (EuclideanSpace ℂ (n × n)) 2 μ} {R : ℝ} + (hR : 0 ≤ R) + (hu : ∀ k, ∀ᵐ x ∂μ, (coefficientsToMatrix (u k x)).PosSemidef ∧ + ‖u k x‖ ≤ R ∧ (x ∉ s → u k x = 0)) : + ∃ w : Lp (EuclideanSpace ℂ (n × n)) 2 μ, + (∀ᵐ x ∂μ, (coefficientsToMatrix (w x)).PosSemidef ∧ + ‖w x‖ ≤ R ∧ (x ∉ s → w x = 0)) ∧ + Integrable (fun x ↦ w x) μ ∧ ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ v, + Tendsto (fun k ↦ inner ℂ (u (φ k)) v) atTop (𝓝 (inner ℂ w v)) := by + let : Fact ((2 : ℝ≥0∞) ≠ ∞) := ⟨by norm_num⟩ + let C : α → Set (EuclideanSpace ℂ (n × n)) := fun x ↦ + {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R ∧ (x ∉ s → v = 0)} + have hclosed (x : α) : IsClosed (C x) := by + have he : C x = {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R} ∩ + {v | x ∉ s → v = 0} := by ext v; simp only [C, mem_ofPred_eq, mem_inter_iff, and_assoc] + rw [he] + apply (isClosed_bounded_positive_coefficients R).inter + by_cases hx : x ∈ s + · simpa only [hx, not_true_eq_false, IsEmpty.forall_iff, ofPred_true] using + (isClosed_univ : IsClosed (univ : Set (EuclideanSpace ℂ (n × n)))) + · simpa only [hx, not_false_eq_true, forall_true_left, ofPred_eq_eq_singleton] using + (isClosed_singleton : IsClosed ({0} : Set (EuclideanSpace ℂ (n × n)))) + have hconvex (x : α) : Convex ℝ (C x) := by + have he : C x = {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R} ∩ + {v | x ∉ s → v = 0} := by ext v; simp only [C, mem_ofPred_eq, mem_inter_iff, and_assoc] + rw [he] + apply (convex_bounded_positive_coefficients R).inter + by_cases hx : x ∈ s + · simpa only [hx, not_true_eq_false, IsEmpty.forall_iff, ofPred_true] using + (convex_univ : Convex ℝ (univ : Set (EuclideanSpace ℂ (n × n)))) + · simpa only [hx, not_false_eq_true, forall_true_left, ofPred_eq_eq_singleton] using + (convex_singleton (0 : EuclideanSpace ℂ (n × n)) : Convex ℝ ({0} : Set (EuclideanSpace ℂ (n × n)))) + let g : Lp ℝ 2 μ := indicatorConstLp 2 hs hμs R + have hn (k : ℕ) : ‖u k‖ ≤ ‖g‖ := by + apply Lp.norm_le_norm_of_ae_le + filter_upwards [hu k, (indicatorConstLp_coeFn (p := 2) (hs := hs) (hμs := hμs) (c := R))] with x hx hg + change ‖u k x‖ ≤ ‖(indicatorConstLp 2 hs hμs R) x‖ + rw [hg] + by_cases hxs : x ∈ s + · simpa only [indicator_of_mem hxs, Real.norm_eq_abs, abs_of_nonneg hR] using hx.2.1 + · simp only [indicator_of_notMem hxs, hx.2.2 hxs, norm_zero, le_refl] + obtain ⟨w, hw, φ, hφ, hlim⟩ := bounded_hilbert_weak_subsequence_in + (isClosed_ae_variable_mem_Lp hclosed) (convex_ae_variable_mem_Lp hconvex) hn hu + change (∀ᵐ x ∂μ, (coefficientsToMatrix (w x)).PosSemidef ∧ ‖w x‖ ≤ R ∧ (x ∉ s → w x = 0)) at hw + exact ⟨w, hw, L2_integrable_of_finite_support hs hμs w (hw.mono fun _ h ↦ h.2.2), + φ, hφ, hlim⟩ + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise + +local instance {n : Type u13} [Fintype n] : ContinuousENorm (Matrix n n ℂ) := + inferInstanceAs (ContinuousENorm (n → n → ℂ)) + +noncomputable def matrixToCoefficients {n : Type u14} [Fintype n] : + Matrix n n ℂ →ₗ[ℂ] EuclideanSpace ℂ (n × n) where + toFun H := WithLp.toLp 2 (fun ij ↦ H ij.1 ij.2) + map_add' := by intros; rfl + map_smul' := by intros; rfl + +lemma coefficients_matrix_inverse {n : Type u15} [Fintype n] (H : Matrix n n ℂ) : + coefficientsToMatrix (matrixToCoefficients H) = H := rfl + +lemma matrix_coefficients_memLp {α : Type u16} {n : Type u17} [MeasurableSpace α] + [Fintype n] {μ : Measure α} {H : α → Matrix n n ℂ} {s : Set α} + (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (hH : AEStronglyMeasurable H μ) + {R : ℝ} (_hR : 0 ≤ R) + (hb : ∀ᵐ x ∂μ, ‖matrixToCoefficients (H x)‖ ≤ R ∧ (x ∉ s → H x = 0)) : + MemLp (fun x ↦ matrixToCoefficients (H x)) 2 μ := by + apply (memLp_indicator_const 2 hs R (Or.inr hμs)).mono' + ((LinearMap.continuous_of_finiteDimensional matrixToCoefficients).comp_aestronglyMeasurable hH) + filter_upwards [hb] with x hx + by_cases hxs : x ∈ s + · simpa only [indicator_of_mem hxs] using hx.1 + · simp only [indicator_of_notMem hxs, hx.2 hxs, map_zero, norm_zero, le_refl] + +local instance : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + +theorem local_quadratic_compactness {n : Type u18} [Fintype n] [DecidableEq n] + {Hm : ℕ → (ℂ × ℂ) → Matrix n n ℂ} {Ω U s : Set (ℂ × ℂ)} + (hΩ : IsOpen Ω) (hU : IsOpen U) (hs : MeasurableSet s) (hμs : volume s ≠ ∞) + (hmeas : ∀ m, AEStronglyMeasurable (Hm m)) + (hposm : ∀ m, ∀ᵐ x ∂volume, (Hm m x).PosSemidef) + (hc : ∀ m, ContinuousOn (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2) + (Ω ×ˢ univ)) + (hp : ∀ m, DiskPshOn (Ω ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2)) + {R C : ℝ} (hR : 0 ≤ R) + (hcoef : ∀ m, ∀ᵐ x ∂volume, ‖matrixToCoefficients (Hm m x)‖ ≤ R ∧ + (x ∉ s → Hm m x = 0)) + {r : ℕ → ℝ} (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hb : ∀ k, ∀ x ∈ U, closedBall x (r k) ⊆ Ω) + (hbound : ∀ m, ∀ x ∈ Ω, ∀ v, quadraticValue (Hm m x) v ≤ C * ‖v‖ ^ 2) : + ∃ (M : (ℂ × ℂ) → Matrix n n ℂ) (φ : ℕ → ℕ), StrictMono φ ∧ + (∀ x ∈ U, (M x).PosSemidef) ∧ + DiskPshOn (U ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (M p.1) p.2) ∧ + ∀ x ρ v, ball x ρ ⊆ U → + Tendsto (fun m ↦ ⨍ y in ball x ρ, quadraticValue (Hm (φ m) y) v) atTop + (𝓝 (⨍ y in ball x ρ, quadraticValue (M y) v)) := by + have hLp (m : ℕ) := matrix_coefficients_memLp hs hμs (hmeas m) hR (hcoef m) + let f (m : ℕ) := (hLp m).toLp (fun x ↦ matrixToCoefficients (Hm m x)) + have hf (m : ℕ) : (fun x ↦ coefficientsToMatrix (f m x)) =ᵐ[volume] Hm m := by + filter_upwards [(hLp m).coeFn_toLp] with x hx + exact congrArg coefficientsToMatrix hx + have hfb (m : ℕ) : ∀ᵐ x ∂volume, (coefficientsToMatrix (f m x)).PosSemidef ∧ + ‖f m x‖ ≤ R ∧ (x ∉ s → f m x = 0) := by + filter_upwards [(hLp m).coeFn_toLp, hposm m, hcoef m] with x hx hp hb + rw [hx] + exact ⟨hp, hb.1, fun hxs ↦ by rw [hb.2 hxs, map_zero]⟩ + obtain ⟨w, hw, hwL1, φ, hφ, hlim⟩ := + supported_positive_coefficients_weak_subsequence hs hμs hR hfb + have hHm (m : ℕ) : Integrable (Hm m) := by + have hf1 := L2_integrable_of_finite_support hs hμs (f m) ((hfb m).mono fun _ h ↦ h.2.2) + exact (coefficientsToMatrix.toContinuousLinearMap.integrable_comp hf1).congr (hf m) + obtain ⟨M, hM, hae, hpsh⟩ := weak_quadratic_psh_representative hΩ hU + (fun m ↦ hf (φ m)) hlim hwL1 (fun m ↦ hHm (φ m)) + (fun m ↦ hposm (φ m)) (fun m ↦ hc (φ m)) (fun m ↦ hp (φ m)) hr hr0 hb + (fun m ↦ hbound (φ m)) + refine ⟨M, φ, hφ, hM, hpsh, ?_⟩ + intro x ρ v hball + have hh := weak_quadratic_averages (fun m ↦ hf (φ m)) hlim x ρ v + convert hh using 1 + congr 1 + apply average_congr + filter_upwards [ae_restrict_of_ae_restrict_of_subset hball hae] with y hy + exact congrArg (fun H ↦ quadraticValue H v) hy + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +local instance : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + +lemma DiskPshOn.moving_base_mass {Ω : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) + {q : (ℂ × ℂ) → ℝ} (hq : DiskPshOn Ω q) {x y : ℂ × ℂ} {r a : ℝ} + (hr : 0 < r) (hxy : dist y x < r) (hb : closedBall x (3*r) ⊆ Ω) + (hpos : ∀ z ∈ ball x (2*r), 0 ≤ q z) + (hi : IntegrableOn q (ball x (2*r))) (ha : a ≤ q y) : + (volume (ball (0 : ℂ × ℂ) r)).toReal * a ≤ ∫ z in ball x (2*r), q z := by + have hsub : ball y r ⊆ ball x (2*r) := + ball_subset_ball' (by linarith) + have hcb : closedBall y r ⊆ Ω := by + apply Subset.trans _ hb + exact closedBall_subset_closedBall' (by linarith) + have hy : y ∈ Ω := hcb (mem_closedBall_self hr.le) + have hs := hq.base_submean hΩ hy hr hcb (hi.mono_set hsub) + calc + (volume (ball (0 : ℂ × ℂ) r)).toReal * a = (volume (ball y r)).toReal * a := by + rw [Measure.addHaar_ball_center _ y, Measure.addHaar_ball_center _ (0 : ℂ × ℂ)] + _ ≤ (volume (ball y r)).toReal * q y := + mul_le_mul_of_nonneg_left ha ENNReal.toReal_nonneg + _ ≤ ∫ z in ball y r, q z := hs + _ ≤ ∫ z in ball x (2*r), q z := + setIntegral_mono_set hi ((ae_restrict_mem measurableSet_ball).mono fun z hz ↦ hpos z hz) (Eventually.of_forall hsub) + +lemma nonzero_of_average_limit {α : Type u19} [MeasurableSpace α] {μ : Measure α} + {f : ℕ → α → ℝ} {q : α → ℝ} {s : Set α} (hs : MeasurableSet s) {a : ℝ} (ha : 0 < a) + (hlim : Tendsto (fun m ↦ ⨍ x in s, f m x ∂μ) atTop (𝓝 (⨍ x in s, q x ∂μ))) + (hmass : ∀ᶠ m in atTop, a ≤ ⨍ x in s, f m x ∂μ) : + ∃ x ∈ s, q x ≠ 0 := by + have h := ge_of_tendsto hlim hmass + by_contra hn + push Not at hn + have hz : (⨍ x in s, q x ∂μ) = 0 := by + rw [setAverage_eq] + have hi : (∫ x in s, q x ∂μ) = 0 := integral_eq_zero_of_ae + ((ae_restrict_mem hs).mono fun x hx ↦ hn x hx) + rw [hi, smul_zero] + rw [hz] at h + exact (not_le_of_gt ha) h + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +theorem bounded_hilbert_countable_weak_subsequence + {ι : Type u20} [Countable ι] {E : ι → Type u27} + [∀ i, NormedAddCommGroup (E i)] [∀ i, InnerProductSpace ℂ (E i)] + [∀ i, CompleteSpace (E i)] [∀ i, TopologicalSpace.SeparableSpace (E i)] + {u : ℕ → ∀ i, E i} {R : ι → ℝ} (hu : ∀ k i, ‖u k i‖ ≤ R i) : + ∃ (w : ∀ i, E i) (φ : ℕ → ℕ), StrictMono φ ∧ + (∀ i, ‖w i‖ ≤ R i) ∧ + ∀ i (v : E i), Tendsto (fun k ↦ inner ℂ (u (φ k) i) v) atTop + (𝓝 (inner ℂ (w i) v)) := by + let K (i : ι) : Set (WeakDual ℂ (E i)) := + WeakDual.toStrongDual ⁻¹' Metric.closedBall (0 : StrongDual ℂ (E i)) (R i) + have hc (i : ι) : IsCompact (K i) := WeakDual.isCompact_closedBall (0 : StrongDual ℂ (E i)) (R i) + let (i : ι) : CompactSpace (K i) := isCompact_iff_compactSpace.mp (hc i) + let (i : ι) : TopologicalSpace.MetrizableSpace (K i) := + WeakDual.metrizable_of_isCompact ℂ (E i) (K i) (hc i) + let d (k : ℕ) (i : ι) : K i := + ⟨StrongDual.toWeakDual ((InnerProductSpace.toDual ℂ (E i)) (u k i)), by + simpa [K, Metric.mem_closedBall, dist_zero_right] using hu k i⟩ + obtain ⟨w', _, φ, hφ, hlim⟩ := + (isCompact_univ (X := ∀ i, K i)).isSeqCompact.subseq_of_frequently_in + (Filter.Frequently.of_forall (fun k ↦ mem_univ (d k))) + let w (i : ι) : E i := (InnerProductSpace.toDual ℂ (E i)).symm + (WeakDual.toStrongDual (w' i)) + refine ⟨w, φ, hφ, ?_, ?_⟩ + · intro i + change ‖(InnerProductSpace.toDual ℂ (E i)).symm (WeakDual.toStrongDual (w' i))‖ ≤ R i + simpa only [LinearIsometryEquiv.norm_map, K, mem_preimage, Metric.mem_closedBall, + dist_zero_right] using (w' i).property + · intro i v + have hi := ((continuous_apply i).continuousAt.tendsto.comp hlim) + have hv := (WeakDual.eval_continuous (𝕜 := ℂ) v).continuousAt.tendsto.comp + (continuous_subtype_val.continuousAt.tendsto.comp hi) + simpa [d, w, Function.comp_def] using hv + +theorem countable_supported_positive_weak_subsequence + {ι : Type u21} {α : Type u22} {n : Type u23} [Countable ι] [MeasurableSpace α] [Fintype n] [DecidableEq n] + {μ : Measure α} [IsSeparable μ] + {s : ι → Set α} (hs : ∀ i, MeasurableSet (s i)) (hμs : ∀ i, μ (s i) ≠ ∞) + {u : ℕ → ι → Lp (EuclideanSpace ℂ (n × n)) 2 μ} {R : ι → ℝ} + (hR : ∀ i, 0 ≤ R i) + (hu : ∀ k i, ∀ᵐ x ∂μ, (coefficientsToMatrix (u k i x)).PosSemidef ∧ + ‖u k i x‖ ≤ R i ∧ (x ∉ s i → u k i x = 0)) : + ∃ (w : ι → Lp (EuclideanSpace ℂ (n × n)) 2 μ) (φ : ℕ → ℕ), StrictMono φ ∧ + ∀ i, (∀ᵐ x ∂μ, (coefficientsToMatrix (w i x)).PosSemidef ∧ + ‖w i x‖ ≤ R i ∧ (x ∉ s i → w i x = 0)) ∧ + Integrable (fun x ↦ w i x) μ ∧ ∀ v, + Tendsto (fun k ↦ inner ℂ (u (φ k) i) v) atTop (𝓝 (inner ℂ (w i) v)) := by + let : Fact ((2 : ℝ≥0∞) ≠ ∞) := ⟨by norm_num⟩ + let g (i : ι) : Lp ℝ 2 μ := indicatorConstLp 2 (hs i) (hμs i) (R i) + have hn (k : ℕ) (i : ι) : ‖u k i‖ ≤ ‖g i‖ := by + apply Lp.norm_le_norm_of_ae_le + filter_upwards [hu k i, (indicatorConstLp_coeFn (p := 2) (hs := hs i) + (hμs := hμs i) (c := R i))] with x hx hg + change ‖u k i x‖ ≤ ‖(indicatorConstLp 2 (hs i) (hμs i) (R i)) x‖ + rw [hg] + by_cases hxs : x ∈ s i + · simpa only [indicator_of_mem hxs, Real.norm_eq_abs, abs_of_nonneg (hR i)] using hx.2.1 + · simp only [indicator_of_notMem hxs, hx.2.2 hxs, norm_zero, le_refl] + obtain ⟨w,φ,hφ,_,hlim⟩ := bounded_hilbert_countable_weak_subsequence hn + refine ⟨w,φ,hφ,?_⟩ + intro i + let C : α → Set (EuclideanSpace ℂ (n × n)) := fun x ↦ + {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R i ∧ (x ∉ s i → v = 0)} + have hclosed (x : α) : IsClosed (C x) := by + have he : C x = {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R i} ∩ + {v | x ∉ s i → v = 0} := by ext v; simp only [C, mem_ofPred_eq, mem_inter_iff, and_assoc] + rw [he] + apply (isClosed_bounded_positive_coefficients (R i)).inter + by_cases hx : x ∈ s i + · simpa only [hx, not_true_eq_false, IsEmpty.forall_iff, ofPred_true] using + (isClosed_univ : IsClosed (univ : Set (EuclideanSpace ℂ (n × n)))) + · simpa only [hx, not_false_eq_true, forall_true_left, ofPred_eq_eq_singleton] using + (isClosed_singleton : IsClosed ({0} : Set (EuclideanSpace ℂ (n × n)))) + have hconvex (x : α) : Convex ℝ (C x) := by + have he : C x = {v | (coefficientsToMatrix v).PosSemidef ∧ ‖v‖ ≤ R i} ∩ + {v | x ∉ s i → v = 0} := by ext v; simp only [C, mem_ofPred_eq, mem_inter_iff, and_assoc] + rw [he] + apply (convex_bounded_positive_coefficients (R i)).inter + by_cases hx : x ∈ s i + · simpa only [hx, not_true_eq_false, IsEmpty.forall_iff, ofPred_true] using + (convex_univ : Convex ℝ (univ : Set (EuclideanSpace ℂ (n × n)))) + · simpa only [hx, not_false_eq_true, forall_true_left, ofPred_eq_eq_singleton] using + (convex_singleton (0 : EuclideanSpace ℂ (n × n)) : Convex ℝ ({0} : Set (EuclideanSpace ℂ (n × n)))) + have hw := mem_closed_convex_of_weak_limit + (isClosed_ae_variable_mem_Lp hclosed) (convex_ae_variable_mem_Lp hconvex) + (fun k ↦ hu (φ k) i) (hlim i) + change (∀ᵐ x ∂μ, (coefficientsToMatrix (w i x)).PosSemidef ∧ + ‖w i x‖ ≤ R i ∧ (x ∉ s i → w i x = 0)) at hw + exact ⟨hw,L2_integrable_of_finite_support (hs i) (hμs i) (w i) + (hw.mono fun _ h ↦ h.2.2), hlim i⟩ + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +local instance : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + +local instance {n : Type u24} [Fintype n] : ContinuousENorm (Matrix n n ℂ) := + inferInstanceAs (ContinuousENorm (n → n → ℂ)) + +theorem countable_local_quadratic_compactness_with_weak + {ι : Type u25} {n : Type u26} [Countable ι] [Fintype n] [DecidableEq n] + {Hm : ℕ → ι → (ℂ × ℂ) → Matrix n n ℂ} + {Ω U s : ι → Set (ℂ × ℂ)} + (hΩ : ∀ i, IsOpen (Ω i)) (hU : ∀ i, IsOpen (U i)) + (hs : ∀ i, MeasurableSet (s i)) (hμs : ∀ i, volume (s i) ≠ ∞) + (hmeas : ∀ m i, AEStronglyMeasurable (Hm m i)) + (hposm : ∀ m i, ∀ᵐ x ∂volume, (Hm m i x).PosSemidef) + (hc : ∀ m i, ContinuousOn + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m i p.1) p.2) (Ω i ×ˢ univ)) + (hp : ∀ m i, DiskPshOn (Ω i ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m i p.1) p.2)) + {R C : ι → ℝ} (hR : ∀ i, 0 ≤ R i) + (hcoef : ∀ m i, ∀ᵐ x ∂volume, ‖matrixToCoefficients (Hm m i x)‖ ≤ R i ∧ + (x ∉ s i → Hm m i x = 0)) + {r : ι → ℕ → ℝ} (hr : ∀ i k, 0 < r i k) + (hr0 : ∀ i, Tendsto (r i) atTop (𝓝 0)) + (hb : ∀ i k, ∀ x ∈ U i, closedBall x (r i k) ⊆ Ω i) + (hbound : ∀ m i, ∀ x ∈ Ω i, ∀ v, + quadraticValue (Hm m i x) v ≤ C i * ‖v‖ ^ 2) : + ∃ (M : ι → (ℂ × ℂ) → Matrix n n ℂ) + (f : ℕ → ι → Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))) + (w : ι → Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))) + (φ : ℕ → ℕ), StrictMono φ ∧ + (∀ m i, (fun x ↦ coefficientsToMatrix (f m i x)) =ᵐ[volume] Hm m i) ∧ + (∀ m i, ∀ᵐ x ∂volume, ‖f m i x‖ ≤ R i ∧ (x ∉ s i → f m i x = 0)) ∧ + ∀ i, (M i =ᵐ[volume.restrict (U i)] fun x ↦ coefficientsToMatrix (w i x)) ∧ + (∀ v, Tendsto (fun m ↦ inner ℂ (f (φ m) i) v) atTop (𝓝 (inner ℂ (w i) v))) ∧ + (∀ x ∈ U i, (M i x).PosSemidef) ∧ + DiskPshOn (U i ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (M i p.1) p.2) ∧ + ∀ x ρ v, ball x ρ ⊆ U i → + Tendsto (fun m ↦ ⨍ y in ball x ρ, quadraticValue (Hm (φ m) i y) v) atTop + (𝓝 (⨍ y in ball x ρ, quadraticValue (M i y) v)) := by + have hLp (m : ℕ) (i : ι) := matrix_coefficients_memLp + (hs i) (hμs i) (hmeas m i) (hR i) (hcoef m i) + let f (m : ℕ) (i : ι) := (hLp m i).toLp (fun x ↦ matrixToCoefficients (Hm m i x)) + have hf (m : ℕ) (i : ι) : + (fun x ↦ coefficientsToMatrix (f m i x)) =ᵐ[volume] Hm m i := by + filter_upwards [(hLp m i).coeFn_toLp] with x hx + exact congrArg coefficientsToMatrix hx + have hfb (m : ℕ) (i : ι) : ∀ᵐ x ∂volume, + (coefficientsToMatrix (f m i x)).PosSemidef ∧ ‖f m i x‖ ≤ R i ∧ + (x ∉ s i → f m i x = 0) := by + filter_upwards [(hLp m i).coeFn_toLp, hposm m i, hcoef m i] with x hx hp hb + rw [hx] + exact ⟨hp, hb.1, fun hxs ↦ by rw [hb.2 hxs, map_zero]⟩ + obtain ⟨w,φ,hφ,hw⟩ := countable_supported_positive_weak_subsequence hs hμs hR hfb + have hHm (m : ℕ) (i : ι) : Integrable (Hm m i) := by + have hf1 := L2_integrable_of_finite_support (hs i) (hμs i) (f m i) + ((hfb m i).mono fun _ h ↦ h.2.2) + exact (coefficientsToMatrix.toContinuousLinearMap.integrable_comp hf1).congr (hf m i) + have hex (i : ι) := weak_quadratic_psh_representative (hΩ i) (hU i) + (fun m ↦ hf (φ m) i) (hw i).2.2 (hw i).2.1 (fun m ↦ hHm (φ m) i) + (fun m ↦ hposm (φ m) i) (fun m ↦ hc (φ m) i) (fun m ↦ hp (φ m) i) + (hr i) (hr0 i) (hb i) (fun m ↦ hbound (φ m) i) + choose M hM hae hpsh using hex + refine ⟨M,f,w,φ,hφ,hf,fun m i ↦ (hfb m i).mono (fun _ h ↦ h.2), + fun i ↦ ⟨hae i,(hw i).2.2,hM i,hpsh i,?_⟩⟩ + intro x ρ v hball + have hh := weak_quadratic_averages (fun m ↦ hf (φ m) i) (hw i).2.2 x ρ v + convert hh using 1 + congr 1 + apply average_congr + filter_upwards [ae_restrict_of_ae_restrict_of_subset hball (hae i)] with y hy + exact congrArg (fun H ↦ quadraticValue H v) hy + +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Curvature.lean b/lean/OAI/Geometry/QuadricBundles/Curvature.lean new file mode 100644 index 0000000000000000000000000000000000000000..e75109c72e5a333b50582a74616b027bc6bbf3ee --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Curvature.lean @@ -0,0 +1,440 @@ +import OAI.Geometry.QuadricBundles.Plurisubharmonic + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 u28 u29 + +namespace QuadricCounterexample +open Set Filter Topology +open scoped Matrix.Norms.Elementwise +noncomputable section + +lemma fderiv_apply_const {X : Type u1} {Y : Type u2} {Z : Type u3} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {F : X → Y →L[ℝ] Z} {x : X} (hF : DifferentiableAt ℝ F x) (v : Y) : + fderiv ℝ (fun y ↦ F y v) x = + (ContinuousLinearMap.apply ℝ Z v).comp (fderiv ℝ F x) := by + exact ((ContinuousLinearMap.apply ℝ Z v).hasFDerivAt.comp x hF.hasFDerivAt).fderiv + +lemma hessian_mul {X : Type u4} [NormedAddCommGroup X] [NormedSpace ℝ X] + {f g : X → ℂ} {x : X} (hf : ContDiffAt ℝ 2 f x) (hg : ContDiffAt ℝ 2 g x) + (v w : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ f y*g y)) x v w = + fderiv ℝ (fderiv ℝ f) x v w*g x + fderiv ℝ f x w*fderiv ℝ g x v + + fderiv ℝ f x v*fderiv ℝ g x w + f x*fderiv ℝ (fderiv ℝ g) x v w := by + have hf1 := hf.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0) + have hg1 := hg.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0) + have hf2 := (hf.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have hg2 := (hg.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have hf' := hf2.hasFDerivAt.clm_apply (hasFDerivAt_const w x) + have hg' := hg2.hasFDerivAt.clm_apply (hasFDerivAt_const w x) + have hfg2 := ((hf.mul hg).fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have he : (fun y ↦ fderiv ℝ (fun z ↦ f z*g z) y w) =ᶠ[𝓝 x] + fun y ↦ f y * fderiv ℝ g y w + g y * fderiv ℝ f y w := by + filter_upwards [hf.eventually (by norm_num),hg.eventually (by norm_num)] with y hy hy' + change (fderiv ℝ (f*g) y) w = _ + rw [fderiv_mul (hy.differentiableAt (by norm_num)) (hy'.differentiableAt (by norm_num))] + simp + have hh := (hf1.hasFDerivAt.mul hg').add (hg1.hasFDerivAt.mul hf') + have hx := congrArg (fun T : X →L[ℝ] ℂ ↦ T v) (he.fderiv_eq.trans hh.fderiv) + rw [fderiv_apply_const hfg2] at hx + simp only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.apply_apply, + add_apply,smul_apply, + ContinuousLinearMap.comp_zero,zero_add,smul_eq_mul, + ContinuousLinearMap.flip_apply] at hx + convert hx using 1; ring + +lemma hessian_re {X : Type u5} [NormedAddCommGroup X] [NormedSpace ℝ X] + {f : X → ℂ} {x : X} (hf : ContDiffAt ℝ 2 f x) (v w : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ (f y).re)) x v w = + (fderiv ℝ (fderiv ℝ f) x v w).re := by + have hf1 := hf.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0) + have hf2 := (hf.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have he : (fun y ↦ fderiv ℝ (fun z ↦ (f z).re) y w) =ᶠ[𝓝 x] + fun y ↦ (fderiv ℝ f y w).re := by + filter_upwards [hf.eventually (by norm_num)] with y hy + exact congrArg (fun T : X →L[ℝ] ℝ ↦ T w) + (Complex.reCLM.hasFDerivAt.comp y + (hy.differentiableAt (by norm_num)).hasFDerivAt).fderiv + have hh := Complex.reCLM.hasFDerivAt.comp x + (hf2.hasFDerivAt.clm_apply (hasFDerivAt_const w x)) + have hx := congrArg (fun T : X →L[ℝ] ℝ ↦ T v) (he.fderiv_eq.trans hh.fderiv) + have hq2 : DifferentiableAt ℝ (fderiv ℝ (fun y ↦ (f y).re)) x := ((Complex.reCLM.contDiff.contDiffAt.comp x hf).fderiv_right + (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + rw [fderiv_apply_const hq2] at hx + simpa using hx + +lemma hessian_clm {X : Type u6} {Y : Type u7} {Z : Type u8} + [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : X → Y} {x : X} (hf : ContDiffAt ℝ 2 f x) (L : Y →L[ℝ] Z) (v w : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ L (f y))) x v w = + L (fderiv ℝ (fderiv ℝ f) x v w) := by + have hf2 := (hf.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have he : (fun y ↦ fderiv ℝ (fun z ↦ L (f z)) y w) =ᶠ[𝓝 x] + fun y ↦ L (fderiv ℝ f y w) := by + filter_upwards [hf.eventually (by norm_num)] with y hy + exact congrArg (fun T : X →L[ℝ] Z ↦ T w) + (L.hasFDerivAt.comp y (hy.differentiableAt (by norm_num)).hasFDerivAt).fderiv + have hh := L.hasFDerivAt.comp x + (hf2.hasFDerivAt.clm_apply (hasFDerivAt_const w x)) + have hx := congrArg (fun T : X →L[ℝ] Z ↦ T v) (he.fderiv_eq.trans hh.fderiv) + have hq2 : DifferentiableAt ℝ (fderiv ℝ (fun y ↦ L (f y))) x := + ((L.contDiff.contDiffAt.comp x hf).fderiv_right + (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + rw [fderiv_apply_const hq2] at hx + simpa using hx + +lemma hessian_sum {X : Type u9} {Y : Type u10} {ι : Type u11} + [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + {f : ι → X → Y} {x : X} {s : Finset ι} + (hf : ∀ i∈s, ContDiffAt ℝ 2 (f i) x) (v w : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ ∑ i∈s, f i y)) x v w = + ∑ i∈s, fderiv ℝ (fderiv ℝ (f i)) x v w := by + have hf1 i hi := (hf i hi).differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0) + have hf2 i hi := ((hf i hi).fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have he : fderiv ℝ (fun y ↦ ∑ i∈s, f i y) =ᶠ[𝓝 x] + fun y ↦ ∑ i∈s, fderiv ℝ (f i) y := by + have hen : ∀ᶠ y in 𝓝 x, ∀ i∈s, ContDiffAt ℝ 2 (f i) y := by + simpa only [Filter.eventually_all_finset] using + (show ∀ i∈s, ∀ᶠ y in 𝓝 x, ContDiffAt ℝ 2 (f i) y from + fun i hi ↦ (hf i hi).eventually (by norm_num)) + filter_upwards [hen] with y hy + exact fderiv_fun_sum fun i hi ↦ (hy i hi).differentiableAt (by norm_num) + have hh := fderiv_fun_sum hf2 + rw [he.fderiv_eq, hh] + simp + +lemma hessian_pullback_clm {X : Type u12} {Y : Type u13} {Z : Type u14} + [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : Y → Z} (L : X →L[ℝ] Y) {x : X} (hf : ContDiffAt ℝ 2 f (L x)) (v w : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ f (L y))) x v w = + fderiv ℝ (fderiv ℝ f) (L x) (L v) (L w) := by + change fderiv ℝ (fderiv ℝ (f ∘ L)) x v w = _ + rw [hessian_comp_apply L.contDiff.contDiffAt hf] + have he : fderiv ℝ L = fun _ ↦ L := funext fun y ↦ L.fderiv + simp [he] + +lemma hessian_linear_zero {X : Type u15} {Y : Type u16} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] (L : X →L[ℝ] Y) (x v w : X) : + fderiv ℝ (fderiv ℝ L) x v w = 0 := by + have he : fderiv ℝ L = fun _ ↦ L := funext fun y ↦ L.fderiv + simp [he] + +lemma hessian_linear_mul_linear {X : Type u17} [NormedAddCommGroup X] [NormedSpace ℝ X] + {f : X → ℂ} {x : X} (hf : ContDiffAt ℝ 2 f x) + (L M : X →L[ℝ] ℂ) (v : X) : + fderiv ℝ (fderiv ℝ (fun y ↦ L y * f y * M y)) x v v = + L x * (fderiv ℝ (fderiv ℝ f) x v v) * M x + + 2 * L v * fderiv ℝ f x v * M x + + 2 * L x * fderiv ℝ f x v * M v + 2 * L v * f x * M v := by + rw [hessian_mul (L.contDiff.contDiffAt.mul hf) M.contDiff.contDiffAt, + hessian_mul L.contDiff.contDiffAt hf,hessian_linear_zero,hessian_linear_zero] + have hd := fderiv_fun_mul L.differentiableAt + (hf.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0)) + have hd' : fderiv ℝ (fun y ↦ L y * f y) x = + L x • fderiv ℝ f x + f x • L := by simpa only [L.fderiv] using hd + rw [hd'] + simp only [L.fderiv,M.fderiv,add_apply,smul_apply,smul_eq_mul] + ring + +section Quadratic +variable {X : Type u18} {ι : Type u19} [NormedAddCommGroup X] [NormedSpace ℝ X] [Fintype ι] + +def entryCLM (i j : ι) : Matrix ι ι ℂ →L[ℝ] ℂ := + (ContinuousLinearMap.proj j : (ι → ℂ) →L[ℝ] ℂ).comp + (ContinuousLinearMap.proj i : Matrix ι ι ℂ →L[ℝ] (ι → ℂ)) + +def fiberEntryCLM (i : ι) : (X × (ι → ℂ)) →L[ℝ] ℂ := + (ContinuousLinearMap.proj i).comp (ContinuousLinearMap.snd ℝ X (ι → ℂ)) + +def starFiberEntryCLM (i : ι) : (X × (ι → ℂ)) →L[ℝ] ℂ := + Complex.conjCLE.toContinuousLinearMap.comp (fiberEntryCLM i) + +lemma base_entry_C2 {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) (i j : ι) : + ContDiffAt ℝ 2 (fun p : X × (ι → ℂ) ↦ H p.1 i j) (z,v) := + (entryCLM i j).contDiff.contDiffAt.comp (z,v) (hH.comp (z,v) contDiff_fst.contDiffAt) + +lemma base_entry_fderiv {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) (i j : ι) (u : X) (w : ι → ℂ) : + fderiv ℝ (fun p : X × (ι → ℂ) ↦ H p.1 i j) (z,v) (u,w) = + fderiv ℝ H z u i j := by + have hh := (entryCLM i j).hasFDerivAt.comp (z,v) + ((hH.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0)).hasFDerivAt.comp (z,v) + (ContinuousLinearMap.fst ℝ X (ι → ℂ)).hasFDerivAt) + convert congrArg (fun T ↦ T (u,w)) hh.fderiv using 1 <;> rfl + +lemma base_entry_hessian {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) (i j : ι) (u : X) (w : ι → ℂ) : + fderiv ℝ (fderiv ℝ (fun p : X × (ι → ℂ) ↦ H p.1 i j)) (z,v) (u,w) (u,w) = + fderiv ℝ (fderiv ℝ H) z u u i j := by + have he := hessian_pullback_clm (f := fun y ↦ H y i j) + (x := (z,v)) (ContinuousLinearMap.fst ℝ X (ι → ℂ)) + ((entryCLM i j).contDiff.contDiffAt.comp z hH) (u,w) (u,w) + have hh := hessian_clm hH (entryCLM i j) u u + exact he.trans hh + +def complexQuadratic (H : X → Matrix ι ι ℂ) (p : X × (ι → ℂ)) : ℂ := + star p.2 ⬝ᵥ ((H p.1).mulVec p.2) + +def hermitianQuadratic (H : X → Matrix ι ι ℂ) (p : X × (ι → ℂ)) : ℝ := + (complexQuadratic H p).re + +omit [NormedAddCommGroup X] [NormedSpace ℝ X] in +lemma complexQuadratic_eq_sum (H : X → Matrix ι ι ℂ) : + complexQuadratic H = fun p ↦ ∑ i, ∑ j, star (p.2 i)*H p.1 i j*p.2 j := by + funext p + simp only [complexQuadratic,dotProduct,Matrix.mulVec,Pi.star_apply, + Finset.mul_sum,mul_assoc] + +lemma complexQuadratic_C2 {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) : + ContDiffAt ℝ 2 (complexQuadratic H) (z,v) := by + rw [complexQuadratic_eq_sum] + apply ContDiffAt.sum + intro i _ + apply ContDiffAt.sum + intro j _ + exact ((starFiberEntryCLM i).contDiff.contDiffAt.mul + (base_entry_C2 hH v i j)).mul (fiberEntryCLM j).contDiff.contDiffAt + +lemma complexQuadratic_hessian {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) (u : X) (w : ι → ℂ) : + fderiv ℝ (fderiv ℝ (complexQuadratic H)) (z,v) (u,w) (u,w) = + star v ⬝ᵥ ((fderiv ℝ (fderiv ℝ H) z u u).mulVec v) + + 2 * (star w ⬝ᵥ ((fderiv ℝ H z u).mulVec v)) + + 2 * (star v ⬝ᵥ ((fderiv ℝ H z u).mulVec w)) + + 2 * (star w ⬝ᵥ ((H z).mulVec w)) := by + have ht i j : ContDiffAt ℝ 2 + (fun p : X × (ι → ℂ) ↦ star (p.2 i)*H p.1 i j*p.2 j) (z,v) := + ((starFiberEntryCLM i).contDiff.contDiffAt.mul + (base_entry_C2 hH v i j)).mul (fiberEntryCLM j).contDiff.contDiffAt + have hh (i j : ι) := hessian_linear_mul_linear (base_entry_C2 hH v i j) + (starFiberEntryCLM i) (fiberEntryCLM j) (u,w) + simp only [base_entry_hessian hH,base_entry_fderiv hH] at hh + rw [complexQuadratic_eq_sum,hessian_sum (fun i _ ↦ ContDiffAt.sum (fun j _ ↦ ht i j))] + simp_rw [hessian_sum (fun j _ ↦ ht _ j)] + change (∑ i, ∑ j, _) = _ + calc + _ = ∑ i, ∑ j, + (star (v i)*(fderiv ℝ (fderiv ℝ H) z u u i j)*v j + + 2*star (w i)*(fderiv ℝ H z u i j)*v j + + 2*star (v i)*(fderiv ℝ H z u i j)*w j + 2*star (w i)*H z i j*w j) := by + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + exact hh i j + _ = _ := by + simp only [dotProduct,Matrix.mulVec,Pi.star_apply,Finset.sum_add_distrib, + Finset.mul_sum,mul_assoc] + +end Quadratic + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology +open scoped Matrix.Norms.Elementwise ComplexOrder +noncomputable section + +def matrixAdjointCLM {ι : Type u20} [Fintype ι] : + Matrix ι ι ℂ →L[ℝ] Matrix ι ι ℂ where + toFun := Matrix.conjTranspose + map_add' := Matrix.conjTranspose_add + map_smul' r M := by ext i j; simp [Matrix.conjTranspose_apply] + cont := continuous_id.matrix_conjTranspose + +lemma hermitian_fderiv {X : Type u21} {ι : Type u22} [NormedAddCommGroup X] [NormedSpace ℝ X] + [Fintype ι] {H : X → Matrix ι ι ℂ} {z : X} + (hH : DifferentiableAt ℝ H z) (hh : ∀ᶠ y in 𝓝 z, (H y).IsHermitian) (u : X) : + (fderiv ℝ H z u).IsHermitian := by + have he : (fun y ↦ matrixAdjointCLM (H y)) =ᶠ[𝓝 z] H := hh + have hd := matrixAdjointCLM.hasFDerivAt.comp z hH.hasFDerivAt + have heq := hd.fderiv.symm.trans he.fderiv_eq + exact congrArg (fun T ↦ T u) heq + +lemma hermitian_hessian {X : Type u23} {ι : Type u24} [NormedAddCommGroup X] [NormedSpace ℝ X] + [Fintype ι] {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (hh : ∀ᶠ y in 𝓝 z, (H y).IsHermitian) (u v : X) : + (fderiv ℝ (fderiv ℝ H) z u v).IsHermitian := by + have hf2 := (hH.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have hd := hf2.hasFDerivAt.clm_apply (hasFDerivAt_const v z) + have he : (fderiv ℝ (fun y ↦ fderiv ℝ H y v) z) u = + fderiv ℝ (fderiv ℝ H) z u v := by + convert congrArg (fun L : X →L[ℝ] Matrix ι ι ℂ ↦ L u) hd.fderiv using 1 <;> try rfl + simp only [ContinuousLinearMap.comp_zero,zero_add] + rfl + rw [← he] + apply hermitian_fderiv hd.differentiableAt + filter_upwards [hH.eventually (by norm_num),hh.eventually_nhds] with y hy hy' + exact hermitian_fderiv (hy.differentiableAt (by norm_num)) hy' v + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix +open scoped ComplexOrder +noncomputable section + +lemma matrix_completed_square {n : Type u25} [Fintype n] [DecidableEq n] + {H : Matrix n n ℂ} (hH : H.PosDef) (A T : Matrix n n ℂ) (v w : n → ℂ) : + star v ⬝ᵥ (T.mulVec v) + star w ⬝ᵥ (A.mulVec v) + + star v ⬝ᵥ (A.conjTranspose.mulVec w) + star w ⬝ᵥ (H.mulVec w) = + star v ⬝ᵥ ((T-A.conjTranspose*H⁻¹*A).mulVec v) + + star (w+H⁻¹.mulVec (A.mulVec v)) ⬝ᵥ (H.mulVec (w+H⁻¹.mulVec (A.mulVec v))) := by + have hi : H*H⁻¹=1 := H.mul_nonsing_inv (H.isUnit_iff_isUnit_det.mp hH.isUnit) + have hi' : H⁻¹*H=1 := H.nonsing_inv_mul (H.isUnit_iff_isUnit_det.mp hH.isUnit) + have hs : H⁻¹.conjTranspose = H⁻¹ := hH.inv.isHermitian + have hb : H.mulVec (H⁻¹.mulVec (A.mulVec v)) = A.mulVec v := by + rw [mulVec_mulVec,hi,one_mulVec] + have hc (y : n → ℂ) : star (H⁻¹.mulVec (A.mulVec v)) ⬝ᵥ (H.mulVec y) = + star v ⬝ᵥ (A.conjTranspose.mulVec y) := by + simp only [star_mulVec,hs,dotProduct_mulVec,vecMul_vecMul,mul_assoc,hi',mul_one] + simp only [mulVec_add,star_add,dotProduct_add,add_dotProduct,hb,hc, + sub_mulVec,dotProduct_sub] + have hh := hc (H⁻¹.mulVec (A.mulVec v)) + rw [hb] at hh + rw [hh] + simp only [mulVec_mulVec,mul_assoc] + ring + +lemma matrix_completed_square_nonneg {n : Type u26} [Fintype n] [DecidableEq n] + {H A T : Matrix n n ℂ} (hH : H.PosDef) + (hT : (T-A.conjTranspose*H⁻¹*A).PosSemidef) (v w : n → ℂ) : + 0 ≤ (star v ⬝ᵥ (T.mulVec v) + star w ⬝ᵥ (A.mulVec v) + + star v ⬝ᵥ (A.conjTranspose.mulVec w) + star w ⬝ᵥ (H.mulVec w)).re := by + rw [matrix_completed_square hH] + exact (Complex.nonneg_iff.mp (add_nonneg + (hT.dotProduct_mulVec_nonneg v) + (hH.posSemidef.dotProduct_mulVec_nonneg _))).1 + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix +noncomputable section + +lemma quadratic_levi_expansion {ι : Type u27} [Fintype ι] + (H D E U V : Matrix ι ι ℂ) (hD : D.IsHermitian) (hE : E.IsHermitian) + (v w : ι → ℂ) : + (star v ⬝ᵥ U.mulVec v + 2 * (star w ⬝ᵥ D.mulVec v) + + 2 * (star v ⬝ᵥ D.mulVec w) + 2 * (star w ⬝ᵥ H.mulVec w)) + + (star v ⬝ᵥ V.mulVec v + 2 * (star (Complex.I • w) ⬝ᵥ E.mulVec v) + + 2 * (star v ⬝ᵥ E.mulVec (Complex.I • w)) + + 2 * (star (Complex.I • w) ⬝ᵥ H.mulVec (Complex.I • w))) = + 4 * (star v ⬝ᵥ ((1/4 : ℂ) • (U+V)).mulVec v + + star w ⬝ᵥ ((1/2 : ℂ) • (D-Complex.I • E)).mulVec v + + star v ⬝ᵥ (((1/2 : ℂ) • (D-Complex.I • E)).conjTranspose).mulVec w + + star w ⬝ᵥ H.mulVec w) := by + have hs : ((1/2 : ℂ) • (D-Complex.I • E)).conjTranspose = + (1/2 : ℂ) • (D+Complex.I • E) := by + simp only [conjTranspose_smul,conjTranspose_sub, hD.eq,hE.eq] + simp + rw [hs] + simp only [star_smul,Complex.star_def,Complex.conj_I, + mulVec_smul,smul_mulVec,smul_dotProduct,dotProduct_smul,smul_eq_mul, + add_mulVec,sub_mulVec,dotProduct_add,dotProduct_sub] + ring_nf + simp only [Complex.I_sq, mul_neg, mul_one] + ring + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Matrix +open scoped Matrix.Norms.Elementwise ComplexOrder +noncomputable section +variable {X : Type u28} {ι : Type u29} [NormedAddCommGroup X] [NormedSpace ℂ X] [Fintype ι] + +def wirtingerDerivative (H : X → Matrix ι ι ℂ) (z u : X) : Matrix ι ι ℂ := + (1/2 : ℂ) • (fderiv ℝ H z u - Complex.I • fderiv ℝ H z (Complex.I • u)) + +def mixedHessian (H : X → Matrix ι ι ℂ) (z u : X) : Matrix ι ι ℂ := + (1/4 : ℂ) • (fderiv ℝ (fderiv ℝ H) z u u + + fderiv ℝ (fderiv ℝ H) z (Complex.I • u) (Complex.I • u)) + +lemma hermitianQuadratic_C2 {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (v : ι → ℂ) : + ContDiffAt ℝ 2 (hermitianQuadratic H) (z,v) := + Complex.reCLM.contDiff.contDiffAt.comp (z,v) (complexQuadratic_C2 hH v) + +lemma hermitianQuadratic_levi {H : X → Matrix ι ι ℂ} {z : X} + (hH : ContDiffAt ℝ 2 H z) (hh : ∀ᶠ y in 𝓝 z, (H y).IsHermitian) + (v : ι → ℂ) (u : X) (w : ι → ℂ) : + leviTrace (hermitianQuadratic H) (z,v) (u,w) = + 4 * (star v ⬝ᵥ (mixedHessian H z u).mulVec v + + star w ⬝ᵥ (wirtingerDerivative H z u).mulVec v + + star v ⬝ᵥ (wirtingerDerivative H z u).conjTranspose.mulVec w + + star w ⬝ᵥ (H z).mulVec w).re := by + have hd := hH.differentiableAt (by norm_num : (2 : WithTop ℕ∞) ≠ 0) + have ha := quadratic_levi_expansion (H z) (fderiv ℝ H z u) + (fderiv ℝ H z (Complex.I • u)) (fderiv ℝ (fderiv ℝ H) z u u) + (fderiv ℝ (fderiv ℝ H) z (Complex.I • u) (Complex.I • u)) + (hermitian_fderiv hd hh u) (hermitian_fderiv hd hh (Complex.I • u)) v w + unfold leviTrace hermitianQuadratic + rw [hessian_re (complexQuadratic_C2 hH v),hessian_re (complexQuadratic_C2 hH v)] + change (fderiv ℝ (fderiv ℝ (complexQuadratic H)) (z,v) (u,w) (u,w)).re + + (fderiv ℝ (fderiv ℝ (complexQuadratic H)) (z,v) + (Complex.I • u,Complex.I • w) (Complex.I • u,Complex.I • w)).re = _ + rw [← Complex.add_re,complexQuadratic_hessian hH,complexQuadratic_hessian hH,ha] + norm_num [Complex.mul_re,wirtingerDerivative,mixedHessian] + +lemma hermitianQuadratic_levi_nonneg [DecidableEq ι] + {H : X → Matrix ι ι ℂ} {z : X} (hH : ContDiffAt ℝ 2 H z) + (hh : ∀ᶠ y in 𝓝 z, (H y).IsHermitian) (hpos : (H z).PosDef) + (hcurv : ∀ u : X, (mixedHessian H z u - + (wirtingerDerivative H z u).conjTranspose*(H z)⁻¹*wirtingerDerivative H z u).PosSemidef) + (v : ι → ℂ) (u : X) (w : ι → ℂ) : + 0 ≤ leviTrace (hermitianQuadratic H) (z,v) (u,w) := by + rw [hermitianQuadratic_levi hH hh] + exact mul_nonneg (by norm_num) (matrix_completed_square_nonneg hpos (hcurv u) v w) + +lemma curvature_nonneg_of_strict [DecidableEq ι] + {H : X → Matrix ι ι ℂ} {z : X} + (hcurv : ∀ u : X, u ≠ 0 → (mixedHessian H z u - + (wirtingerDerivative H z u).conjTranspose*(H z)⁻¹*wirtingerDerivative H z u).PosDef) + (u : X) : (mixedHessian H z u - + (wirtingerDerivative H z u).conjTranspose*(H z)⁻¹*wirtingerDerivative H z u).PosSemidef := by + by_cases hu : u=0 + · subst u + simpa [mixedHessian,wirtingerDerivative] using (Matrix.PosSemidef.zero : (0 : Matrix ι ι ℂ).PosSemidef) + · exact (hcurv u hu).posSemidef + +theorem chern_positive_dual_norm_psh [DecidableEq ι] [CompleteSpace X] + {Ω : Set X} (hΩ : IsOpen Ω) {H : X → Matrix ι ι ℂ} + (hH : ContDiffOn ℝ 2 H Ω) (hpos : ∀ z∈Ω, (H z).PosDef) + (hcurv : ∀ z∈Ω, ∀ u : X, u ≠ 0 → (mixedHessian H z u - + (wirtingerDerivative H z u).conjTranspose*(H z)⁻¹*wirtingerDerivative H z u).PosDef) : + DiskPshOn (Ω ×ˢ Set.univ) (hermitianQuadratic H) := by + apply DiskPshOn.of_C2_leviTrace_nonneg (hΩ.prod isOpen_univ) + · intro p hp + exact (hermitianQuadratic_C2 (hH.contDiffAt (hΩ.mem_nhds hp.1)) p.2).contDiffWithinAt + · rintro ⟨z,v⟩ hz ⟨u,w⟩ + apply hermitianQuadratic_levi_nonneg (hH.contDiffAt (hΩ.mem_nhds hz.1)) _ (hpos z hz.1) + (curvature_nonneg_of_strict (hcurv z hz.1)) + filter_upwards [hΩ.mem_nhds hz.1] with y hy + exact (hpos y hy).isHermitian + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/DiskHessian.lean b/lean/OAI/Geometry/QuadricBundles/DiskHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa48342dcbf1cd710b567852054698858ef678cf --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/DiskHessian.lean @@ -0,0 +1,304 @@ +import OAI.Geometry.QuadricBundles.Graphs + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory Laplacian InnerProductSpace +noncomputable section + +lemma _root_.OAI.IsLocalMax.second_deriv_nonpos {f : ℝ → ℝ} {x : ℝ} + (hm : IsLocalMax f x) (hc : ContinuousAt f x) : deriv (deriv f) x ≤ 0 := by + by_contra hn + have hp : 0 < deriv (deriv f) x := lt_of_not_ge hn + have hmin := isLocalMin_of_deriv_deriv_pos hp hm.deriv_eq_zero hc + have he : f =ᶠ[𝓝 x] fun _ ↦ f x := by + filter_upwards [hm,hmin] with y hy hy' + exact le_antisymm hy hy' + have hd : deriv f =ᶠ[𝓝 x] fun _ ↦ (0 : ℝ) := by + filter_upwards [he.eventuallyEq_nhds] with y hy + rw [hy.deriv_eq,deriv_const] + have hz : deriv (deriv f) x=0 := by rw [hd.deriv_eq,deriv_const] + exact hp.ne' hz + +lemma deriv_affine_eventually {X : Type u1} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u : X → ℝ} {x v : X} (hu : ContDiffAt ℝ 2 u x) : + deriv (fun t : ℝ ↦ u (x+t • v)) =ᶠ[𝓝 (0 : ℝ)] + (fun t ↦ fderiv ℝ u (x+t • v) v) := by + have hd : ∀ᶠ y in 𝓝 x, DifferentiableAt ℝ u y := + hu.eventually (by norm_num) |>.mono fun _ h ↦ + h.differentiableAt (by norm_num) + have htend : Tendsto (fun t : ℝ ↦ x+t • v) (𝓝 0) (𝓝 x) := by + have hc : ContinuousAt (fun t : ℝ ↦ x+t • v) 0 := by fun_prop + simpa only [zero_smul,add_zero] using hc.tendsto + filter_upwards [htend hd] with t ht + have hl : HasDerivAt (fun t : ℝ ↦ x+t • v) v t := by + simpa using (hasDerivAt_id t).smul_const v |>.const_add x + exact (ht.hasFDerivAt.comp_hasDerivAt t hl).deriv + +lemma hasDerivAt_fderiv_affine {X : Type u2} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u : X → ℝ} {x v : X} (hu : ContDiffAt ℝ 2 u x) : + HasDerivAt (fun t : ℝ ↦ fderiv ℝ u (x+t • v) v) + ((fderiv ℝ (fderiv ℝ u) x v) v) 0 := by + have hfd : DifferentiableAt ℝ (fderiv ℝ u) x := + (hu.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt + (by norm_num : (1 : WithTop ℕ∞) ≠ 0) + have hline : HasDerivAt (fun t : ℝ ↦ x+t • v) v 0 := by + simpa using (hasDerivAt_id (0 : ℝ)).smul_const v |>.const_add x + have hfd' : HasFDerivAt (fderiv ℝ u) (fderiv ℝ (fderiv ℝ u) x) (x+(0 : ℝ) • v) := by + simpa only [zero_smul,add_zero] using hfd.hasFDerivAt + have hh : HasDerivAt (fun t : ℝ ↦ fderiv ℝ u (x+t • v)) + (fderiv ℝ (fderiv ℝ u) x v) 0 := hfd'.comp_hasDerivAt 0 hline + have hv : HasDerivAt (fun _ : ℝ ↦ v) 0 0 := hasDerivAt_const 0 v + simpa only [map_zero,add_zero] using hh.clm_apply hv + +lemma second_deriv_affine {X : Type u3} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u : X → ℝ} {x v : X} (hu : ContDiffAt ℝ 2 u x) : + deriv (deriv (fun t : ℝ ↦ u (x+t • v))) 0 = + (fderiv ℝ (fderiv ℝ u) x v) v := by + rw [(deriv_affine_eventually hu).deriv_eq] + exact (hasDerivAt_fderiv_affine hu).deriv + +lemma _root_.OAI.IsLocalMax.hessian_nonpos {X : Type u4} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u : X → ℝ} {x : X} (hm : IsLocalMax u x) (hu : ContDiffAt ℝ 2 u x) (v : X) : + (fderiv ℝ (fderiv ℝ u) x v) v ≤ 0 := by + rw [← second_deriv_affine hu] + have hc : ContinuousAt (fun t : ℝ ↦ x+t • v) 0 := by fun_prop + have hm' : IsLocalMax (fun t : ℝ ↦ u (x+t • v)) 0 := by + have ht : Tendsto (fun t : ℝ ↦ x+t • v) (𝓝 0) (𝓝 x) := by + simpa only [zero_smul,add_zero] using hc.tendsto + change ∀ᶠ t in 𝓝 (0 : ℝ), u (x+t • v) ≤ u (x+0 • v) + simpa only [zero_smul,add_zero] using ht.eventually hm + apply _root_.OAI.IsLocalMax.second_deriv_nonpos hm' + apply ContinuousAt.comp _ hc + simpa only [zero_smul,add_zero] using hu.continuousAt + +def complexLaplacian (u : ℂ → ℝ) (z : ℂ) : ℝ := + (fderiv ℝ (fderiv ℝ u) z 1) 1 + + (fderiv ℝ (fderiv ℝ u) z Complex.I) Complex.I + +lemma _root_.OAI.IsLocalMax.complexLaplacian_nonpos {u : ℂ → ℝ} {z : ℂ} + (hm : IsLocalMax u z) (hu : ContDiffAt ℝ 2 u z) : complexLaplacian u z ≤ 0 := + add_nonpos (_root_.OAI.IsLocalMax.hessian_nonpos hm hu 1) (_root_.OAI.IsLocalMax.hessian_nonpos hm hu Complex.I) + +lemma rotated_hessian_trace (B : ℂ →L[ℝ] ℂ →L[ℝ] ℝ) (a : ℂ) : + (B a) a + (B (Complex.I*a)) (Complex.I*a) = + Complex.normSq a * ((B 1) 1 + (B Complex.I) Complex.I) := by + have ha : a=a.re • (1 : ℂ) + a.im • Complex.I := by + apply Complex.ext <;> simp + have hi : Complex.I*a = (-a.im) • (1 : ℂ) + a.re • Complex.I := by + apply Complex.ext <;> simp [Complex.mul_re,Complex.mul_im] + rw [hi] + conv_lhs => lhs; rw [ha] + simp only [map_add,map_smul, add_apply, smul_apply, smul_eq_mul] + rw [Complex.normSq_apply] + ring + +lemma complexLaplacian_norm_sq (z : ℂ) : + complexLaplacian (fun x : ℂ ↦ ‖x‖^2) z=4 := by + unfold complexLaplacian + rw [fderiv_norm_sq] + have hh : fderiv ℝ (fun x : ℂ ↦ ((2 : ℝ) • (innerSL ℝ (E := ℂ))) x) z = + (2 : ℝ) • (innerSL ℝ (E := ℂ)) := ((2 : ℝ) • (innerSL ℝ (E := ℂ))).fderiv + have he : (2 • ⇑(innerSL ℝ (E := ℂ)) : ℂ → ℂ →L[ℝ] ℝ) = + (fun x : ℂ ↦ ((2 : ℝ) • innerSL ℝ (E := ℂ)) x) := by + ext x y + simp [two_smul] + rw [he,hh] + change 2 * @inner ℝ ℂ _ 1 1 + 2 * @inner ℝ ℂ _ Complex.I Complex.I = 4 + norm_num + +lemma hessian_add {X : Type u5} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u v : X → ℝ} {x : X} (hu : ContDiffAt ℝ 2 u x) (hv : ContDiffAt ℝ 2 v x) : + fderiv ℝ (fderiv ℝ (u+v)) x = + fderiv ℝ (fderiv ℝ u) x + fderiv ℝ (fderiv ℝ v) x := by + have he : fderiv ℝ (u+v) =ᶠ[𝓝 x] (fun y ↦ fderiv ℝ u y + fderiv ℝ v y) := by + filter_upwards [hu.eventually (by norm_num),hv.eventually (by norm_num)] with y hy hy' + exact fderiv_add (hy.differentiableAt (by norm_num)) (hy'.differentiableAt (by norm_num)) + rw [he.fderiv_eq] + exact fderiv_add + ((hu.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt (by norm_num)) + ((hv.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt (by norm_num)) + +lemma complexLaplacian_add {u v : ℂ → ℝ} {z : ℂ} + (hu : ContDiffAt ℝ 2 u z) (hv : ContDiffAt ℝ 2 v z) : + complexLaplacian (u+v) z=complexLaplacian u z+complexLaplacian v z := by + simp only [complexLaplacian,hessian_add hu hv,add_apply] + ring + +lemma hessian_smul {X : Type u6} [NormedAddCommGroup X] [NormedSpace ℝ X] + {u : X → ℝ} {x : X} (hu : ContDiffAt ℝ 2 u x) (a : ℝ) : + fderiv ℝ (fderiv ℝ (a • u)) x = a • fderiv ℝ (fderiv ℝ u) x := by + have he : fderiv ℝ (a • u) =ᶠ[𝓝 x] (fun y ↦ a • fderiv ℝ u y) := by + filter_upwards [hu.eventually (by norm_num)] with y hy + exact fderiv_const_smul (hy.differentiableAt (by norm_num)) a + rw [he.fderiv_eq] + exact fderiv_const_smul + ((hu.fderiv_right (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).differentiableAt (by norm_num)) a + +lemma complexLaplacian_smul {u : ℂ → ℝ} {z : ℂ} + (hu : ContDiffAt ℝ 2 u z) (a : ℝ) : + complexLaplacian (a • u) z=a*complexLaplacian u z := by + simp only [complexLaplacian,hessian_smul hu,smul_apply,smul_eq_mul] + ring + +lemma C2_le_boundary {u : ℂ → ℝ} {c : ℂ} {R M : ℝ} + (hR : 0 < R) (hc : ContinuousOn u (closedBall c R)) + (hu : ContDiffOn ℝ 2 u (ball c R)) + (hΔ : ∀ z ∈ ball c R, 0 ≤ complexLaplacian u z) + (hb : ∀ z ∈ sphere c R, u z ≤ M) : ∀ z ∈ closedBall c R, u z ≤ M := by + have heps (ε : ℝ) (hε : 0 < ε) (z : ℂ) (hz : z∈closedBall c R) : + u z ≤ M+ε*(‖c‖+R)^2 := by + let v : ℂ → ℝ := u+ε • (fun x : ℂ ↦ ‖x‖^2) + have hvc : ContinuousOn v (closedBall c R) := hc.add (continuousOn_const.mul (by fun_prop)) + obtain ⟨x,hx,hmax⟩ := (isCompact_closedBall c R).exists_isMaxOn + ⟨c,mem_closedBall_self hR.le⟩ hvc + have hxb : x∈sphere c R := by + by_contra hn + have hxi : x∈ball c R := by + rw [mem_ball,mem_closedBall] at * + exact lt_of_le_of_ne hx (by simpa only [mem_sphere] using hn) + have hux : ContDiffAt ℝ 2 u x := (hu x hxi).contDiffAt (isOpen_ball.mem_nhds hxi) + have hnx : ContDiffAt ℝ 2 (fun y : ℂ ↦ ‖y‖^2) x := (contDiff_norm_sq ℝ).contDiffAt + have hmx : IsLocalMax v x := by + filter_upwards [closedBall_mem_nhds_of_mem hxi] with y hy + exact hmax hy + have hnΔ := _root_.OAI.IsLocalMax.complexLaplacian_nonpos hmx (hux.add (ContDiffAt.const_smul ε hnx)) + have hpΔ : complexLaplacian v x=complexLaplacian u x+4*ε := by + change complexLaplacian (u+ε • (fun y : ℂ ↦ ‖y‖^2)) x = _ + rw [complexLaplacian_add (v := ε • (fun y : ℂ ↦ ‖y‖^2)) hux + (ContDiffAt.const_smul ε hnx),complexLaplacian_smul hnx, + complexLaplacian_norm_sq] + ring + rw [hpΔ] at hnΔ + linarith [hΔ x hxi] + have hnorm : ‖x‖ ≤ ‖c‖+R := by + have hd : ‖x-c‖=R := by simpa [mem_sphere,dist_eq_norm] using hxb + calc ‖x‖ = ‖(x-c)+c‖ := by congr 1; abel + _ ≤ ‖x-c‖+‖c‖ := norm_add_le _ _ + _ = ‖c‖+R := by rw [hd]; ring + have hsq : ‖x‖^2 ≤ (‖c‖+R)^2 := sq_le_sq₀ (norm_nonneg _) (by positivity) |>.mpr hnorm + have hvz := hmax hz + have hub := hb x hxb + change u z+ε*‖z‖^2 ≤ u x+ε*‖x‖^2 at hvz + nlinarith [mul_le_mul_of_nonneg_left hsq hε.le, mul_nonneg hε.le (sq_nonneg ‖z‖)] + intro z hz + apply le_of_forall_pos_le_add + intro δ hδ + let ε := δ/((‖c‖+R)^2+1) + have hden : 0 < (‖c‖+R)^2+1 := by positivity + have hp : 0 < ε := div_pos hδ hden + have heq : ε*((‖c‖+R)^2+1)=δ := by dsimp [ε]; exact div_mul_cancel₀ _ hden.ne' + have hh := heps ε hp z hz + linarith + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory +noncomputable section + +section +variable {α : Type u7} {X : Type u8} {Y : Type u9} [TopologicalSpace α] [CompactSpace α] [T2Space α] + [MeasurableSpace α] [OpensMeasurableSpace α] {μ : Measure α} [IsFiniteMeasure μ] + [NormedAddCommGroup X] [NormedSpace ℝ X] [ProperSpace X] + [NormedAddCommGroup Y] [NormedSpace ℝ Y] + {D : Set X} {F : α → X → Y} {F' : α → X → X →L[ℝ] Y} + +omit [NormedSpace ℝ X] [ProperSpace X] [NormedSpace ℝ Y] in +lemma compactParameter_integrable {z : X} (hz : z∈D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) : + Integrable (fun a ↦ F a z) μ := by + have h : Continuous (fun a ↦ F a z) := + hc.comp_continuous (f := fun a ↦ (a,z)) (by fun_prop) (fun a ↦ ⟨mem_univ a,hz⟩) + exact integrableOn_univ.mp (h.continuousOn.integrableOn_compact isCompact_univ) + +omit [NormedSpace ℝ X] in +lemma compactParameter_continuousAtIntegral (hD : IsOpen D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) {z : X} (hz : z∈D) : + ContinuousAt (fun x ↦ ∫ a, F a x ∂μ) z := by + obtain ⟨r,hr,hball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp (hD.mem_nhds hz) + obtain ⟨C,hC⟩ := (isCompact_univ.prod (isCompact_closedBall z r)).exists_bound_of_continuousOn + (hc.mono (prod_mono (Subset.refl univ) hball)) + apply continuousAt_of_dominated (F := fun x a ↦ F a x) (bound := fun _ ↦ C) + · filter_upwards [hD.mem_nhds hz] with x hx + exact (compactParameter_integrable hx hc).aestronglyMeasurable + · filter_upwards [closedBall_mem_nhds z hr] with x hx + exact Eventually.of_forall fun a ↦ hC (a,x) ⟨mem_univ a,hx⟩ + · exact integrable_const C + · exact Eventually.of_forall fun a ↦ + (hc (a,z) ⟨mem_univ a,hz⟩).continuousAt + ((isOpen_univ.prod hD).mem_nhds ⟨mem_univ a,hz⟩) |>.comp + (continuousAt_const.prodMk continuousAt_id) + +lemma compactParameter_hasFDerivAtIntegral (hD : IsOpen D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) + (hc' : ContinuousOn (Function.uncurry F') (univ ×ˢ D)) + (hd : ∀ a z, z∈D → HasFDerivAt (F a) (F' a z) z) {z : X} (hz : z∈D) : + HasFDerivAt (fun x ↦ ∫ a, F a x ∂μ) (∫ a, F' a z ∂μ) z := by + obtain ⟨r,hr,hball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp (hD.mem_nhds hz) + obtain ⟨C,hC⟩ := (isCompact_univ.prod (isCompact_closedBall z r)).exists_bound_of_continuousOn + (hc'.mono (prod_mono (Subset.refl univ) hball)) + apply hasFDerivAt_integral_of_dominated_of_fderiv_le + (F := fun x a ↦ F a x) (F' := fun x a ↦ F' a x) + (bound := fun _ ↦ C) (closedBall_mem_nhds z hr) + · filter_upwards [hD.mem_nhds hz] with x hx + exact (compactParameter_integrable hx hc).aestronglyMeasurable + · exact compactParameter_integrable hz hc + · exact (compactParameter_integrable hz hc').aestronglyMeasurable + · exact Eventually.of_forall fun a x hx ↦ hC (a,x) ⟨mem_univ a,hx⟩ + · exact integrable_const C + · exact Eventually.of_forall fun a x hx ↦ hd a x (hball hx) + +lemma compactParameter_secondFDerivIntegral (hD : IsOpen D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) + (hc' : ContinuousOn (Function.uncurry F') (univ ×ˢ D)) + {F'' : α → X → X →L[ℝ] X →L[ℝ] Y} + (hc'' : ContinuousOn (Function.uncurry F'') (univ ×ˢ D)) + (hd : ∀ a z, z∈D → HasFDerivAt (F a) (F' a z) z) + (hd' : ∀ a z, z∈D → HasFDerivAt (F' a) (F'' a z) z) + {z : X} (hz : z∈D) : + fderiv ℝ (fderiv ℝ (fun x ↦ ∫ a, F a x ∂μ)) z = ∫ a, F'' a z ∂μ := by + have he : fderiv ℝ (fun x ↦ ∫ a, F a x ∂μ) =ᶠ[𝓝 z] fun x ↦ ∫ a, F' a x ∂μ := by + filter_upwards [hD.mem_nhds hz] with x hx + exact (compactParameter_hasFDerivAtIntegral hD hc hc' hd hx).fderiv + rw [he.fderiv_eq] + exact (compactParameter_hasFDerivAtIntegral hD hc' hc'' hd' hz).fderiv +lemma compactParameter_contDiffOn_one_Integral (hD : IsOpen D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) + (hc' : ContinuousOn (Function.uncurry F') (univ ×ˢ D)) + (hd : ∀ a z, z∈D → HasFDerivAt (F a) (F' a z) z) : + ContDiffOn ℝ 1 (fun x ↦ ∫ a, F a x ∂μ) D := by + rw [show (1 : WithTop ℕ∞)=0+1 from rfl, contDiffOn_succ_iff_fderiv_of_isOpen hD] + refine ⟨fun z hz ↦ (compactParameter_hasFDerivAtIntegral hD hc hc' hd hz).differentiableAt.differentiableWithinAt, + fun h ↦ by simp at h, ?_⟩ + rw [contDiffOn_zero] + have hh : ContinuousOn (fun x ↦ ∫ a, F' a x ∂μ) D := + fun z hz ↦ (compactParameter_continuousAtIntegral hD hc' hz).continuousWithinAt + apply hh.congr + intro x hx + exact (compactParameter_hasFDerivAtIntegral hD hc hc' hd hx).fderiv + +lemma compactParameter_contDiffOn_two_Integral (hD : IsOpen D) + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ D)) + (hc' : ContinuousOn (Function.uncurry F') (univ ×ˢ D)) + {F'' : α → X → X →L[ℝ] X →L[ℝ] Y} + (hc'' : ContinuousOn (Function.uncurry F'') (univ ×ˢ D)) + (hd : ∀ a z, z∈D → HasFDerivAt (F a) (F' a z) z) + (hd' : ∀ a z, z∈D → HasFDerivAt (F' a) (F'' a z) z) : + ContDiffOn ℝ 2 (fun x ↦ ∫ a, F a x ∂μ) D := by + rw [show (2 : WithTop ℕ∞)=1+1 from rfl, contDiffOn_succ_iff_fderiv_of_isOpen hD] + refine ⟨fun z hz ↦ (compactParameter_hasFDerivAtIntegral hD hc hc' hd hz).differentiableAt.differentiableWithinAt, + fun h ↦ by simp at h, ?_⟩ + apply (compactParameter_contDiffOn_one_Integral (μ := μ) hD hc' hc'' hd').congr + intro x hx + exact (compactParameter_hasFDerivAtIntegral hD hc hc' hd hx).fderiv + +end + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/DualForms.lean b/lean/OAI/Geometry/QuadricBundles/DualForms.lean new file mode 100644 index 0000000000000000000000000000000000000000..6eff9e74439146297e61c61ce28b5dc2c839d01b --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/DualForms.lean @@ -0,0 +1,612 @@ +import OAI.Geometry.QuadricBundles.HomogeneousClassification + +namespace OAI + +universe u1 u2 + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology Metric +noncomputable section + +@[simp] lemma affineP1_one (i : Fin 2) : affineP1 i 1 = (1 : ℂ) := by + fin_cases i <;> simp [affineP1, reciprocalP1] + +lemma projective_usc_of_affine_usc {u : ProjectiveLine → ℝ} + (hu : ∀ i : Fin 2, UpperSemicontinuous (fun z ↦ u (affineP1 i z))) : + UpperSemicontinuous u := by + rw [upperSemicontinuous_iff_isOpen_preimage] + intro t + have he : u ⁻¹' Set.Iio t = ⋃ i : Fin 2, affineP1 i '' ((u ∘ affineP1 i) ⁻¹' Set.Iio t) := by + ext x + simp only [Set.mem_preimage,Set.mem_Iio,Set.mem_iUnion,Set.mem_image] + constructor + · intro hx + obtain ⟨i,z,rfl⟩ := affineP1_cover x + exact ⟨i,z,hx,rfl⟩ + · rintro ⟨i,z,hz,rfl⟩ + exact hz + rw [he] + exact isOpen_iUnion fun i ↦ (affineP1_isOpenEmbedding i).isOpenMap _ + ((hu i).isOpen_preimage _) + +theorem projective_subharmonic_const {u : ProjectiveLine → ℝ} + (hu : ∀ i : Fin 2, DiskSubharmonicOn Set.univ (fun z ↦ u (affineP1 i z))) : + ∀ x y, u x = u y := by + have husc : UpperSemicontinuous u := projective_usc_of_affine_usc + (fun i ↦ upperSemicontinuousOn_univ_iff.mp (hu i).1) + obtain ⟨p,_,hp⟩ := UpperSemicontinuousOn.exists_isMaxOn (Set.univ_nonempty : (Set.univ : Set ProjectiveLine).Nonempty) + isCompact_univ (husc.upperSemicontinuousOn Set.univ) + obtain ⟨i,z,hz⟩ := affineP1_cover p + have hmax (q : ProjectiveLine) : u q ≤ u p := hp (Set.mem_univ q) + have hi := (hu i).eq_const_of_max isOpen_univ isPreconnected_univ (Set.mem_univ z) + (fun y _ ↦ by rw [hz]; exact hmax (affineP1 i y)) + have hone : u (1 : ℂ) = u p := by simpa only [affineP1_one,hz] using hi 1 (Set.mem_univ 1) + have hall (j : Fin 2) (w : ℂ) : u (affineP1 j w) = u p := by + have hj := (hu j).eq_const_of_max isOpen_univ isPreconnected_univ (Set.mem_univ (1 : ℂ)) + (fun y _ ↦ by rw [affineP1_one,hone]; exact hmax (affineP1 j y)) + simpa only [affineP1_one,hone] using hj w (Set.mem_univ w) + intro x y + obtain ⟨i,z,rfl⟩ := affineP1_cover x + obtain ⟨j,w,rfl⟩ := affineP1_cover y + exact (hall i z).trans (hall j w).symm + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric Matrix +noncomputable section +open scoped ComplexOrder + +structure EqualizerData.PshDualForm (D : EqualizerData) where + value : StandardChart → BaseCoordinates × FiberCoordinates → ℝ + quadratic : ∀ i z, ∃ H : TwoMatrix, H.PosSemidef ∧ ∀ v, + value i (z,v)=(star v ⬝ᵥ H.mulVec v).re + psh : ∀ i, DiskPshOn Set.univ (value i) + compatible : ∀ i j z, z ∈ coordinateOverlap i j → ∀ v, + value i (z,v)=value j (coordinateChange i j z,(D.coordinateTransition i j z).transpose.mulVec v) + +lemma coordinateOverlap_of_affine_eq {i j : StandardChart} {z w : BaseCoordinates} + (h : affineQuadric i z=affineQuadric j w) : z ∈ coordinateOverlap i j := by + rw [← affineQuadric_mem_range,h] + exact ⟨w,rfl⟩ + +lemma coordinateChange_of_affine_eq {i j : StandardChart} {z w : BaseCoordinates} + (h : affineQuadric i z=affineQuadric j w) : coordinateChange i j z=w := by + rw [← coordinateChange_coord,h,coordQuadric_affine] + +lemma exists_projective_gluing (f : Fin 2 → ℂ → ℝ) + (h : ∀ i j z w, affineP1 i z=affineP1 j w → f i z=f j w) : + ∃ u : ProjectiveLine → ℝ, ∀ i z, u (affineP1 i z)=f i z := by + choose i z hz using affineP1_cover + refine ⟨fun x ↦ f (i x) (z x),fun j w ↦ ?_⟩ + exact h _ _ _ _ (hz (affineP1 j w)) + +namespace EqualizerData.PshDualForm +variable {D : EqualizerData} (Q : D.PshDualForm) + +def firstNorm (i : StandardChart) (p : BaseCoordinates × ℂ) : ℝ := + Q.value i (p.1,![p.2,0]) +def secondNorm (i : StandardChart) (p : BaseCoordinates × ℂ) : ℝ := + Q.value i (p.1,![baseEval (D.lift i) p.1*p.2,baseEval (D.divisor i) p.1*p.2]) + +lemma firstNorm_change (i j : StandardChart) {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) (c : ℂ) : + Q.firstNorm i (z,c)=Q.firstNorm j (coordinateChange i j z,topFactor i j z*c) := by + have h := Q.compatible i j z hz ![c,0] + simpa [firstNorm,EqualizerData.coordinateTransition,Matrix.transpose_apply, + Matrix.mulVec, dotProduct,Fin.sum_univ_two] using h + +lemma secondNorm_change (i j : StandardChart) {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) (c : ℂ) : + Q.secondNorm i (z,c)=Q.secondNorm j + (coordinateChange i j z,EqualizerData.quotientFactor i j z*c) := by + have h := Q.compatible i j z hz + ![baseEval (D.lift i) z*c,baseEval (D.divisor i) z*c] + unfold secondNorm + rw [h] + congr 2 + have h1 := D.low_spec i j hz + have h2 := D.divisor_factor i j hz + ext k + fin_cases k <;> norm_num [EqualizerData.coordinateTransition,Matrix.transpose_apply, + Matrix.mulVec, dotProduct,Fin.sum_univ_two] + · unfold EqualizerData.numerator at h1 + linear_combination c*h1 + · linear_combination c*h2 + +lemma firstNorm_same_ruling (i j k : Fin 2) (z y w c : ℂ) + (h : affineP1 j y=affineP1 k w) : + Q.firstNorm (i,j) ((z,y),c)=Q.firstNorm (i,k) ((z,w),c) := by + have he : affineQuadric (i,j) (z,y)=affineQuadric (i,k) (z,w) := Prod.ext rfl h + rw [Q.firstNorm_change (i,j) (i,k) (coordinateOverlap_of_affine_eq he), + coordinateChange_of_affine_eq he] + simp [EqualizerData.topFactor,firstFactor,scalarFactor] + +lemma secondNorm_same_ruling (i j k : Fin 2) (z y w c : ℂ) + (h : affineP1 j y=affineP1 k w) : + Q.secondNorm (j,i) ((y,z),c)=Q.secondNorm (k,i) ((w,z),c) := by + have he : affineQuadric (j,i) (y,z)=affineQuadric (k,i) (w,z) := Prod.ext h rfl + rw [Q.secondNorm_change (j,i) (k,i) (coordinateOverlap_of_affine_eq he), + coordinateChange_of_affine_eq he] + simp [EqualizerData.quotientFactor,secondFactor,scalarFactor] + +lemma nonneg (i : StandardChart) (z : BaseCoordinates) (v : FiberCoordinates) : + 0 ≤ Q.value i (z,v) := by + obtain ⟨H,hH,h⟩ := Q.quadratic i z + rw [h] + exact (hH.dotProduct_mulVec_nonneg v).1 + +lemma scalar (i : StandardChart) (z : BaseCoordinates) (c : ℂ) (v : FiberCoordinates) : + Q.value i (z,c • v)=‖c‖^2*Q.value i (z,v) := by + obtain ⟨H,_,h⟩ := Q.quadratic i z + rw [h,h] + simp only [star_smul,mulVec_smul,smul_dotProduct,dotProduct_smul,smul_eq_mul, + ← mul_assoc,Complex.star_def] + rw [Complex.mul_conj,Complex.normSq_eq_norm_sq] + simp only [Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,zero_mul,sub_zero] + +lemma firstNorm_psh (i : StandardChart) : DiskPshOn Set.univ (Q.firstNorm i) := by + apply (Q.psh i).comp _ (mapsTo_univ _ _) + apply DifferentiableOn.prodMk (by fun_prop) + apply differentiableOn_pi.mpr + intro k + fin_cases k <;> dsimp <;> fun_prop + +lemma secondNorm_psh (i : StandardChart) : DiskPshOn Set.univ (Q.secondNorm i) := by + have hh : Differentiable ℂ (baseEval (D.lift i)) := + fun z ↦ (analytic_baseEval _ z (mem_univ _)).differentiableAt + have hd : Differentiable ℂ (baseEval (D.divisor i)) := + fun z ↦ (analytic_baseEval _ z (mem_univ _)).differentiableAt + apply (Q.psh i).comp _ (mapsTo_univ _ _) + apply DifferentiableOn.prodMk (by fun_prop) + apply differentiableOn_pi.mpr + intro k + fin_cases k <;> dsimp <;> fun_prop + +lemma firstNorm_ruling_const (i j k : Fin 2) (z y w c : ℂ) : + Q.firstNorm (i,j) ((z,y),c)=Q.firstNorm (i,k) ((z,w),c) := by + obtain ⟨u,hu⟩ := exists_projective_gluing (fun j y ↦ Q.firstNorm (i,j) ((z,y),c)) + (fun j k y w h ↦ Q.firstNorm_same_ruling i j k z y w c h) + have hp : ∀ j : Fin 2, DiskSubharmonicOn Set.univ (fun y ↦ u (affineP1 j y)) := by + intro j + simpa only [hu,Function.comp_def] using + (Q.firstNorm_psh (i,j)).2 Set.univ isOpen_univ (fun y : ℂ ↦ ((z,y),c)) + (by fun_prop) (mapsTo_univ _ _) + simpa only [hu] using projective_subharmonic_const hp (affineP1 j y) (affineP1 k w) + +lemma secondNorm_ruling_const (i j k : Fin 2) (z y w c : ℂ) : + Q.secondNorm (j,i) ((y,z),c)=Q.secondNorm (k,i) ((w,z),c) := by + obtain ⟨u,hu⟩ := exists_projective_gluing (fun j y ↦ Q.secondNorm (j,i) ((y,z),c)) + (fun j k y w h ↦ Q.secondNorm_same_ruling i j k z y w c h) + have hp : ∀ j : Fin 2, DiskSubharmonicOn Set.univ (fun y ↦ u (affineP1 j y)) := by + intro j + simpa only [hu,Function.comp_def] using + (Q.secondNorm_psh (j,i)).2 Set.univ isOpen_univ (fun y : ℂ ↦ ((y,z),c)) + (by fun_prop) (mapsTo_univ _ _) + simpa only [hu] using projective_subharmonic_const hp (affineP1 j y) (affineP1 k w) + +end EqualizerData.PshDualForm + +structure PshLine24 where + value : Fin 2 → ℂ × ℂ → ℝ + nonneg : ∀ i z c, 0 ≤ value i (z,c) + scalar : ∀ i z c d, value i (z,c*d)=‖c‖^2*value i (z,d) + psh : ∀ i, DiskPshOn Set.univ (value i) + change : ∀ i j z, i=j ∨ z≠0 → ∀ c, + value i (z,c)=value j (scalarCoordinateChange i j z,scalarFactor i j z^24*c) + +def otherIndex (i : Fin 2) : Fin 2 := if i=0 then 1 else 0 + +def homogeneousCoordinate (i : Fin 2) (v : FiberCoordinates) : ℂ := + v (otherIndex i)/v i + +lemma homogeneousCoordinate_smul (i : Fin 2) {v : FiberCoordinates} (hv : v i≠0) + {c : ℂ} (hc : c≠0) : homogeneousCoordinate i (c • v)=homogeneousCoordinate i v := by + simp only [homogeneousCoordinate,Pi.smul_apply,smul_eq_mul] + field_simp + +lemma homogeneousRepresentative (i : Fin 2) {v : FiberCoordinates} (hv : v i≠0) : + v=v i • affineRepresentative i (homogeneousCoordinate i v) := by + fin_cases i <;> dsimp at hv <;> ext k <;> fin_cases k <;> + simp [affineRepresentative,homogeneousCoordinate,otherIndex,Pi.smul_apply,smul_eq_mul] <;> + field_simp + +lemma homogeneousCoordinate_overlap (i j : Fin 2) {v : FiberCoordinates} + (_hi : v i≠0) (hj : v j≠0) : i=j ∨ homogeneousCoordinate i v≠0 := by + fin_cases i <;> fin_cases j <;> + simp_all [homogeneousCoordinate,otherIndex] + +lemma homogeneousCoordinate_change (i j : Fin 2) {v : FiberCoordinates} + (_hi : v i≠0) (_hj : v j≠0) : + scalarCoordinateChange i j (homogeneousCoordinate i v)=homogeneousCoordinate j v := by + fin_cases i <;> fin_cases j <;> + simp [scalarCoordinateChange,homogeneousCoordinate,otherIndex] + +lemma homogeneousCoordinate_factor (i j : Fin 2) {v : FiberCoordinates} + (hi : v i≠0) (_hj : v j≠0) : + scalarFactor i j (homogeneousCoordinate i v)*v i=v j := by + fin_cases i <;> fin_cases j <;> dsimp at hi <;> + simp [scalarFactor,homogeneousCoordinate,otherIndex] <;> field_simp + +namespace PshLine24 +variable (L : PshLine24) + +lemma zero (i : Fin 2) (z : ℂ) : L.value i (z,0)=0 := by + simpa using L.scalar i z 0 0 + +lemma coordinate_independent (i j : Fin 2) {v : FiberCoordinates} + (hi : v i≠0) (hj : v j≠0) : + L.value i (homogeneousCoordinate i v,(v i)^24)= + L.value j (homogeneousCoordinate j v,(v j)^24) := by + rw [L.change _ _ _ (homogeneousCoordinate_overlap i j hi hj), + homogeneousCoordinate_change i j hi hj,← mul_pow,homogeneousCoordinate_factor i j hi hj] + +def homogeneousNorm (v : FiberCoordinates) : ℝ := + if v 0=0 then L.value 1 (homogeneousCoordinate 1 v,(v 1)^24) + else L.value 0 (homogeneousCoordinate 0 v,(v 0)^24) + +lemma homogeneousNorm_chart (i : Fin 2) {v : FiberCoordinates} (hi : v i≠0) : + L.homogeneousNorm v=L.value i (homogeneousCoordinate i v,(v i)^24) := by + fin_cases i + · change v 0≠0 at hi + simp [homogeneousNorm,hi] + · by_cases h : v 0=0 + · simp [homogeneousNorm,h] + · simp only [homogeneousNorm,h,↓reduceIte] + exact L.coordinate_independent 0 1 h hi + +@[simp] lemma homogeneousNorm_zero : L.homogeneousNorm 0=0 := by + simp [homogeneousNorm,L.zero] + +lemma homogeneousNorm_nonneg (v : FiberCoordinates) : 0 ≤ L.homogeneousNorm v := by + unfold homogeneousNorm + split_ifs <;> exact L.nonneg _ _ _ + +lemma homogeneousNorm_scalar (c : ℂ) (v : FiberCoordinates) : + L.homogeneousNorm (c • v)=‖c‖^48*L.homogeneousNorm v := by + by_cases hc : c=0 + · subst c; simp + by_cases hv : v=0 + · subst v; simp + obtain ⟨i,hi⟩ : ∃ i, v i≠0 := by simpa only [not_forall,Pi.zero_apply] using funext_iff.not.mp hv + have hci : (c • v) i≠0 := mul_ne_zero hc hi + rw [L.homogeneousNorm_chart i hci,L.homogeneousNorm_chart i hi, + homogeneousCoordinate_smul i hi hc] + simp only [Pi.smul_apply,smul_eq_mul,mul_pow,L.scalar,norm_pow,← pow_mul] + +lemma value_weighted_chart (i : Fin 2) {v : FiberCoordinates} (hi : v i≠0) (t : ℂ) : + L.value i (homogeneousCoordinate i v,t*(v i)^24)=‖t‖^2*L.homogeneousNorm v := by + rw [L.scalar,L.homogeneousNorm_chart i hi] + +lemma weightedChart_differentiableAt {E : Type u1} [NormedAddCommGroup E] [NormedSpace ℂ E] + {f : E → FiberCoordinates} {t : E → ℂ} {x : E} (i : Fin 2) + (hf : DifferentiableAt ℂ f x) (ht : DifferentiableAt ℂ t x) (hi : f x i≠0) : + DifferentiableAt ℂ (fun y ↦ (homogeneousCoordinate i (f y),t y*(f y i)^24)) x := by + change DifferentiableAt ℂ (fun y ↦ (f y (otherIndex i)/f y i,t y*(f y i)^24)) x + have hfi (j : Fin 2) : DifferentiableAt ℂ (fun y ↦ f y j) x := (differentiableAt_pi.mp hf) j + simpa only [div_eq_mul_inv,Pi.mul_apply,Pi.inv_apply,Pi.pow_apply] using + ((hfi (otherIndex i)).mul ((hfi i).inv hi)).prodMk (ht.mul ((hfi i).pow 24)) + +lemma weightedNorm_usc {E : Type u2} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {f : E → FiberCoordinates} {t : E → ℂ} + (hf : ∀ x ∈ U, DifferentiableAt ℂ f x) (ht : ∀ x ∈ U, DifferentiableAt ℂ t x) + (hn : ∀ x ∈ U, f x≠0) : + UpperSemicontinuousOn (fun x ↦ ‖t x‖^2*L.homogeneousNorm (f x)) U := by + intro x hx + obtain ⟨i,hi⟩ : ∃ i, f x i≠0 := by + simpa only [not_forall,Pi.zero_apply] using funext_iff.not.mp (hn x hx) + have hc := (weightedChart_differentiableAt i (hf x hx) (ht x hx) hi).continuousAt + have hu : UpperSemicontinuousAt (fun y ↦ L.value i + (homogeneousCoordinate i (f y),t y*(f y i)^24)) x := + UpperSemicontinuousAt.comp (upperSemicontinuousOn_univ_iff.mp (L.psh i).1 _) hc + apply (hu.upperSemicontinuousWithinAt U).congr_of_eventuallyEq hx + have he : ∀ᶠ y in 𝓝 x, f y i≠0 := ((continuous_apply i).continuousAt.comp (hf x hx).continuousAt).eventually_ne hi + filter_upwards [nhdsWithin_le_nhds he] with y hy + exact L.value_weighted_chart i hy (t y) + +lemma homogeneousNorm_usc : UpperSemicontinuousOn L.homogeneousNorm ({0}ᶜ : Set FiberCoordinates) := by + have h := L.weightedNorm_usc (E := FiberCoordinates) (U := ({0}ᶜ : Set FiberCoordinates)) + (f := id) (t := fun _ ↦ (1 : ℂ)) (fun _ _ ↦ differentiableAt_id) + (fun _ _ ↦ differentiableAt_const _) (fun _ hv ↦ hv) + simpa only [id_eq,norm_one,one_pow,one_mul] using h + +lemma homogeneousNorm_disk (U : Set ℂ) (hU : IsOpen U) + (f : ℂ → FiberCoordinates) (t : ℂ → ℂ) + (hf : AnalyticOnNhd ℂ f U) (ht : AnalyticOnNhd ℂ t U) + (hn : ∀ z ∈ U, f z≠0) : + LocalDiskSubmeanOn U (fun z ↦ ‖t z‖^2*L.homogeneousNorm (f z)) := by + refine ⟨L.weightedNorm_usc (fun z hz ↦ (hf z hz).differentiableAt) + (fun z hz ↦ (ht z hz).differentiableAt) hn,?_⟩ + intro x hx + obtain ⟨i,hi⟩ : ∃ i, f x i≠0 := by + simpa only [not_forall,Pi.zero_apply] using funext_iff.not.mp (hn x hx) + have he : ∀ᶠ y in 𝓝 x, f y i≠0 := ((continuous_apply i).continuousAt.comp (hf x hx).continuousAt).eventually_ne hi + obtain ⟨R,hR,hball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp + (inter_mem (hU.mem_nhds hx) he) + have hB : closedBall x (R/2) ⊆ ball x R := + closedBall_subset_ball (by linarith) + have hd : DifferentiableOn ℂ + (fun z ↦ (homogeneousCoordinate i (f z),t z*(f z i)^24)) (ball x R) := by + intro z hz + exact (weightedChart_differentiableAt i + (hf z (hball (ball_subset_closedBall hz)).1).differentiableAt + (ht z (hball (ball_subset_closedBall hz)).1).differentiableAt + (hball (ball_subset_closedBall hz)).2).differentiableWithinAt + have hs := (L.psh i).2 (ball x R) isOpen_ball _ hd (mapsTo_univ _ _) + obtain ⟨hint,hmean⟩ := hs.2 x (mem_ball_self hR) (R/2) (by linarith) hB + have hAE : (fun z ↦ L.value i (homogeneousCoordinate i (f z),t z*(f z i)^24)) + =ᵐ[MeasureTheory.volume.restrict (ball x (R/2))] + (fun z ↦ ‖t z‖^2*L.homogeneousNorm (f z)) := + (MeasureTheory.ae_restrict_mem measurableSet_ball).mono (fun z hz ↦ + L.value_weighted_chart i (hball (ball_subset_closedBall (hB (ball_subset_closedBall hz)))).2 (t z)) + refine ⟨R/2,by linarith,fun z hz ↦ (hball (ball_subset_closedBall (hB hz))).1, + hint.congr hAE,?_⟩ + change (MeasureTheory.volume (ball x (R/2))).toReal * + L.value i (homogeneousCoordinate i (f x),t x*(f x i)^24) ≤ + ∫ z in ball x (R/2), L.value i (homogeneousCoordinate i (f z),t z*(f z i)^24) at hmean + rwa [MeasureTheory.integral_congr_ae hAE,L.value_weighted_chart i hi] at hmean + +lemma homogeneousMetric : HomogeneousLocalPshMetric24 L.homogeneousNorm := + ⟨L.homogeneousNorm_nonneg,L.homogeneousNorm_scalar,L.homogeneousNorm_usc,L.homogeneousNorm_disk⟩ + +end PshLine24 + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric Matrix +noncomputable section +namespace EqualizerData.PshDualForm +variable {D : EqualizerData} (Q : D.PshDualForm) + +lemma firstNorm_scalar (i : StandardChart) (z : BaseCoordinates) (c d : ℂ) : + Q.firstNorm i (z,c*d)=‖c‖^2*Q.firstNorm i (z,d) := by + unfold firstNorm + rw [← Q.scalar] + congr 2 + ext k + fin_cases k <;> simp [Pi.smul_apply,smul_eq_mul] + +lemma secondNorm_scalar (i : StandardChart) (z : BaseCoordinates) (c d : ℂ) : + Q.secondNorm i (z,c*d)=‖c‖^2*Q.secondNorm i (z,d) := by + unfold secondNorm + rw [← Q.scalar] + congr 2 + ext k + fin_cases k <;> simp [Pi.smul_apply,smul_eq_mul,mul_left_comm] + +def firstLine : PshLine24 where + value i p := Q.firstNorm (i,0) ((p.1,0),p.2) + nonneg i z c := Q.nonneg _ _ _ + scalar i z c d := Q.firstNorm_scalar _ _ c d + psh i := (Q.firstNorm_psh (i,0)).comp (by fun_prop) (mapsTo_univ _ _) + change i j z hz c := by + have ho : (z,0) ∈ coordinateOverlap (i,0) (j,0) := + (coordinateOverlap_iff _ _ _).mpr ⟨hz,Or.inl rfl⟩ + simpa [EqualizerData.topFactor,firstFactor,coordinateChange,scalarCoordinateChange] using + Q.firstNorm_change (i,0) (j,0) ho c + +def secondLine : PshLine24 where + value i p := Q.secondNorm (0,i) ((0,p.1),p.2) + nonneg i z c := Q.nonneg _ _ _ + scalar i z c d := Q.secondNorm_scalar _ _ c d + psh i := (Q.secondNorm_psh (0,i)).comp (by fun_prop) (mapsTo_univ _ _) + change i j z hz c := by + have ho : (0,z) ∈ coordinateOverlap (0,i) (0,j) := + (coordinateOverlap_iff _ _ _).mpr ⟨Or.inl rfl,hz⟩ + simpa [EqualizerData.quotientFactor,secondFactor,coordinateChange,scalarCoordinateChange] using + Q.secondNorm_change (0,i) (0,j) ho c + +lemma firstLine_value (i j : Fin 2) (z w c : ℂ) : + Q.firstLine.value i (z,c)=Q.firstNorm (i,j) ((z,w),c) := + Q.firstNorm_ruling_const i 0 j z 0 w c + +lemma secondLine_value (i j : Fin 2) (z w c : ℂ) : + Q.secondLine.value j (w,c)=Q.secondNorm (i,j) ((z,w),c) := + Q.secondNorm_ruling_const j 0 i w 0 z c + +end EqualizerData.PshDualForm + +lemma matrixBranchDenominator_homogeneous (M : TwoMatrix) (i j : Fin 2) + {v : FiberCoordinates} (hi : v i≠0) : + matrixBranchDenominator M (i,j) + (homogeneousCoordinate i v,homogeneousCoordinate j (M*ᵥv))*v i=(M*ᵥv) j := by + have h := congrFun (congrArg (M.mulVec) (homogeneousRepresentative i hi)) j + simpa only [mulVec_smul,Pi.smul_apply,smul_eq_mul,matrixBranchDenominator, + mulVec,dotProduct,Fin.sum_univ_two,mul_comm,mul_left_comm,mul_assoc,mul_add] using h.symm + +lemma matrixGraphValue_homogeneous (M : TwoMatrix) (i j : Fin 2) + {v : FiberCoordinates} (hi : v i≠0) (hj : (M*ᵥv) j≠0) : + matrixGraphValue M (i,j) + (homogeneousCoordinate i v,homogeneousCoordinate j (M*ᵥv))=0 := by + apply (matrixGraphValue_zero_iff _ _ _).mpr + have h' := homogeneousRepresentative j hj + have hd := matrixBranchDenominator_homogeneous M i j hi + apply (smul_right_injective _ hi) + dsimp only + rw [← mulVec_smul,← homogeneousRepresentative i hi,smul_smul,mul_comm,hd,← h'] + +namespace EqualizerData.PshDualForm +variable {T : GraphScalars} (Q : T.equalizerData.PshDualForm) + +lemma graph_identifies_homogeneous (k : Fin 3) {v : FiberCoordinates} + (hv : v≠0) (hw : T.matrices k*ᵥv≠0) : + Q.firstLine.homogeneousNorm v=Q.secondLine.homogeneousNorm (T.matrices k*ᵥv) := by + obtain ⟨i,hi⟩ : ∃ i, v i≠0 := by simpa only [not_forall,Pi.zero_apply] using funext_iff.not.mp hv + obtain ⟨j,hj⟩ : ∃ j, (T.matrices k*ᵥv) j≠0 := by + simpa only [not_forall,Pi.zero_apply] using funext_iff.not.mp hw + let z : BaseCoordinates := (homogeneousCoordinate i v,homogeneousCoordinate j (T.matrices k*ᵥv)) + have hg : matrixGraphValue (T.matrices k) (i,j) z=0 := matrixGraphValue_homogeneous _ _ _ hi hj + have hd : baseEval (T.divisorPolynomial (i,j)) z=0 := by + simp only [GraphScalars.divisorPolynomial,baseEval_mul,baseEval_matrixGraphPolynomial] + fin_cases k + · exact mul_eq_zero_of_left (mul_eq_zero_of_left hg _) _ + · exact mul_eq_zero_of_left (mul_eq_zero_of_right _ hg) _ + · exact mul_eq_zero_of_right _ hg + have hb := T.chartLift_branch k (i,j) z hg + have hn := matrixBranchDenominator_homogeneous (T.matrices k) i j hi + have hcoef : baseEval (T.chartLift (i,j)) z*((T.matrices k*ᵥv) j)^24=(v i)^24 := by + rw [← hn,mul_pow,← mul_assoc,hb,one_mul] + rw [Q.firstLine.homogeneousNorm_chart i hi,Q.secondLine.homogeneousNorm_chart j hj, + Q.firstLine_value i j _ z.2,Q.secondLine_value i j z.1] + change Q.value (i,j) (z,![v i^24,0])= + Q.value (i,j) (z,![baseEval (T.chartLift (i,j)) z*((T.matrices k*ᵥv) j)^24, + baseEval (T.divisorPolynomial (i,j)) z*((T.matrices k*ᵥv) j)^24]) + rw [hcoef,hd,zero_mul] + +end EqualizerData.PshDualForm +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric Matrix MeasureTheory +open scoped ComplexOrder +noncomputable section + +@[simp] lemma source_matrices_zero : sourceGraphScalars.matrices 0=1 := rfl +@[simp] lemma source_matrices_one : sourceGraphScalars.matrices 1=source_A := rfl +@[simp] lemma source_matrices_two : sourceGraphScalars.matrices 2=source_B := rfl + +namespace EqualizerData.PshDualForm +variable (Q : sourceGraphScalars.equalizerData.PshDualForm) + +lemma source_lines_identical (v : FiberCoordinates) : + Q.firstLine.homogeneousNorm v=Q.secondLine.homogeneousNorm v := by + by_cases hv : v=0 + · simp [hv] + simpa using Q.graph_identifies_homogeneous 0 hv (by simpa using hv) + +lemma source_first_homogeneous_zero : ∀ v, Q.firstLine.homogeneousNorm v=0 := by + apply source_invariant_local_homogeneous_metric_zero Q.firstLine.homogeneousMetric + · intro v + by_cases hv : v=0 + · simp [hv] + have hw : sourceGraphScalars.matrices 1*ᵥv≠0 := + (smul_ne_zero_iff_ne source_A_gl).mpr hv + change Q.firstLine.homogeneousNorm (source_A*ᵥv)=Q.firstLine.homogeneousNorm v + rw [Q.source_lines_identical] + exact (Q.graph_identifies_homogeneous 1 hv hw).symm + · intro v + by_cases hv : v=0 + · simp [hv] + have hw : sourceGraphScalars.matrices 2*ᵥv≠0 := + (smul_ne_zero_iff_ne source_B_gl).mpr hv + change Q.firstLine.homogeneousNorm (source_B*ᵥv)=Q.firstLine.homogeneousNorm v + rw [Q.source_lines_identical] + exact (Q.graph_identifies_homogeneous 2 hv hw).symm + +lemma source_second_homogeneous_zero (v : FiberCoordinates) : + Q.secondLine.homogeneousNorm v=0 := by + rw [← Q.source_lines_identical,Q.source_first_homogeneous_zero] + +end EqualizerData.PshDualForm + +@[simp] lemma homogeneousCoordinate_affineRepresentative (i : Fin 2) (z : ℂ) : + homogeneousCoordinate i (affineRepresentative i z)=z := by + fin_cases i <;> simp [homogeneousCoordinate,affineRepresentative,otherIndex] + +lemma PshLine24.value_zero_of_homogeneous_zero (L : PshLine24) + (h : ∀ v, L.homogeneousNorm v=0) (i : Fin 2) (z c : ℂ) : L.value i (z,c)=0 := by + have hv : affineRepresentative i z i≠0 := by simp + have hval := h (affineRepresentative i z) + rw [L.homogeneousNorm_chart i hv] at hval + simp only [homogeneousCoordinate_affineRepresentative,affineRepresentative_index,one_pow] at hval + have hs := L.scalar i z c 1 + simpa only [mul_one,hval,mul_zero] using hs + +namespace EqualizerData.PshDualForm +variable (Q : sourceGraphScalars.equalizerData.PshDualForm) + +lemma source_firstNorm_zero (i : StandardChart) (z : BaseCoordinates) (c : ℂ) : + Q.firstNorm i (z,c)=0 := by + rw [← Q.firstLine_value i.1 i.2 z.1 z.2 c] + exact Q.firstLine.value_zero_of_homogeneous_zero Q.source_first_homogeneous_zero _ _ _ + +lemma source_secondNorm_zero (i : StandardChart) (z : BaseCoordinates) (c : ℂ) : + Q.secondNorm i (z,c)=0 := by + rw [← Q.secondLine_value i.1 i.2 z.1 z.2 c] + exact Q.secondLine.value_zero_of_homogeneous_zero Q.source_second_homogeneous_zero _ _ _ + +lemma source_value_zero_off_divisor (i : StandardChart) (z : BaseCoordinates) + (hd : baseEval (sourceGraphScalars.divisorPolynomial i) z≠0) (v : FiberCoordinates) : + Q.value i (z,v)=0 := by + obtain ⟨H,hH,h⟩ := Q.quadratic i z + have hker (u : FiberCoordinates) (hu : Q.value i (z,u)=0) : H*ᵥu=0 := by + apply hH.dotProduct_mulVec_zero_iff.mp + rw [h] at hu + exact Complex.ext hu (hH.dotProduct_mulVec_nonneg u).2.symm + let d := baseEval (sourceGraphScalars.divisorPolynomial i) z + let a := baseEval (sourceGraphScalars.chartLift i) z + have hk1 : H*ᵥ![1,0]=0 := hker _ (Q.source_firstNorm_zero i z 1) + have hk2 : H*ᵥ![a,d]=0 := hker _ (by + simpa [secondNorm,GraphScalars.equalizerData,a,d] + using Q.source_secondNorm_zero i z 1) + have hv : v=(v 0-a*v 1/d) • ![1,0]+(v 1/d) • ![a,d] := by + ext k + fin_cases k + · simp [smul_eq_mul,Pi.add_apply] + field_simp [d,hd] + ring + · simp [smul_eq_mul,Pi.add_apply] + field_simp [d,hd] + have hvH : H*ᵥv=0 := by + rw [hv,Matrix.mulVec_add,Matrix.mulVec_smul,Matrix.mulVec_smul,hk1,hk2,smul_zero,smul_zero,add_zero] + rw [h,hvH,dotProduct_zero,Complex.zero_re] + +end EqualizerData.PshDualForm + +lemma DiskPshOn.eq_zero_of_off_polynomial {q : BaseCoordinates → ℝ} + (hq : DiskPshOn Set.univ q) (hn : ∀ z, 0 ≤ q z) + {p : BasePolynomial} (hp : p≠0) (hz : ∀ z, baseEval p z≠0 → q z=0) : ∀ z, q z=0 := by + obtain ⟨w,hw⟩ := (dense_polynomial_nonzero hp).nonempty + intro z + let γ : ℂ → BaseCoordinates := fun t ↦ z+t • (w-z) + have hγ : AnalyticOnNhd ℂ γ Set.univ := by + intro t _ + dsimp [γ] + fun_prop + have hr : AnalyticOnNhd ℂ (baseEval p ∘ γ) Set.univ := + (analytic_baseEval p).comp hγ (mapsTo_univ _ _) + have he : ¬ Set.EqOn (baseEval p ∘ γ) 0 Set.univ := by + intro he + have h := he (x := (1 : ℂ)) (mem_univ _) + have hγ1 : γ 1=w := by simp [γ] + exact hw (by simpa only [Function.comp_apply,hγ1,Pi.zero_apply] using h) + have hne := (hr.eqOn_zero_or_eventually_ne_zero_of_preconnected isPreconnected_univ).resolve_left he + have hae : ∀ᵐ t ∂volume, (baseEval p ∘ γ) t≠0 := by + have h := ae_restrict_le_codiscreteWithin (μ := (volume : Measure ℂ)) MeasurableSet.univ hne + change ∀ᵐ t ∂volume.restrict (univ : Set ℂ), (baseEval p ∘ γ) t≠0 at h + simpa only [Measure.restrict_univ] using h + have hqae : (q ∘ γ)=ᵐ[volume] (fun _ ↦ 0) := hae.mono fun t ht ↦ hz (γ t) ht + have hs := hq.2 Set.univ isOpen_univ γ hγ.differentiableOn (mapsTo_univ _ _) + have hm := (hs.2 0 (mem_univ _) 1 (by norm_num) (subset_univ _)).2 + rw [integral_congr_ae (ae_restrict_of_ae hqae),integral_zero] at hm + have hvol : 0 < (volume (ball (0 : ℂ) 1)).toReal := + ENNReal.toReal_pos (ne_of_gt (measure_ball_pos volume (0 : ℂ) (by norm_num : (0 : ℝ) < 1))) + (measure_ne_top_of_subset ball_subset_closedBall (isCompact_closedBall (0 : ℂ) 1).measure_ne_top) + have hγ0 : γ 0=z := by simp [γ] + simp only [Function.comp_apply,hγ0] at hm + exact le_antisymm (by nlinarith [hn z]) (hn z) + +namespace EqualizerData.PshDualForm +variable (Q : sourceGraphScalars.equalizerData.PshDualForm) + +theorem source_value_zero (i : StandardChart) (z : BaseCoordinates) (v : FiberCoordinates) : + Q.value i (z,v)=0 := by + have hp : DiskPshOn Set.univ (fun w ↦ Q.value i (w,v)) := + (Q.psh i).comp (by fun_prop) (mapsTo_univ _ _) + exact hp.eq_zero_of_off_polynomial (fun w ↦ Q.nonneg i w v) + (sourceGraphScalars.divisorPolynomial_nonzero i) + (fun w hw ↦ Q.source_value_zero_off_divisor i w hw v) z + +end EqualizerData.PshDualForm +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Embedding.lean b/lean/OAI/Geometry/QuadricBundles/Embedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..18ad132257d981a1467f6a9c934bf4c319f6a967 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Embedding.lean @@ -0,0 +1,426 @@ +import OAI.Geometry.QuadricBundles.ProjectiveEquations + +namespace OAI + +universe u1 u2 u3 + +noncomputable section + +namespace QuadricCounterexample +open Set MvPolynomial Matrix LaurentCech BinaryForms PolynomialGeneration +open scoped BigOperators +noncomputable section + +namespace AlgebraicRankTwoBundle +variable (V : AlgebraicRankTwoBundle) +lemma dualTransition_self (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) : + V.dualTransition i i x=1 := by + unfold dualTransition + rw [V.transition_self i x hx,Matrix.transpose_one] +lemma dualTransition_mul (i j k : ℕ) (x : QuadricSurface) + (hi : x∈V.domain i) (hj : x∈V.domain j) (hk : x∈V.domain k) : + V.dualTransition i j x*V.dualTransition j k x=V.dualTransition i k x := by + unfold dualTransition + rw [← Matrix.transpose_mul,V.transition_mul k j i x hk hj hi] +lemma dualTransition_nonzero (i j : ℕ) (x : QuadricSurface) + (hi : x∈V.domain i) (hj : x∈V.domain j) {v : FiberCoordinates} (hv : v≠0) : + (V.dualTransition i j x).mulVec v≠0 := by + intro hz + have hh := congrArg (V.dualTransition j i x).mulVec hz + rw [Matrix.mulVec_mulVec,V.dualTransition_mul j i j x hj hi hj,V.dualTransition_self j x hj, + Matrix.one_mulVec,Matrix.mulVec_zero] at hh + exact hv hh +end AlgebraicRankTwoBundle +lemma sectionVector_compatible {V : AlgebraicRankTwoBundle} {n N : ℕ} + (s : Fin N → SymmetricSection V n) (i j : ℕ) (x : QuadricSurface) + (hi : x∈V.domain i) (hj : x∈V.domain j) (v : FiberCoordinates) : + sectionVector s i x ((V.dualTransition i j x).mulVec v)=sectionVector s j x v := by + ext a + exact (s a).compatible i j x hi hj v + +structure StandardBundleCover (V : AlgebraicRankTwoBundle) : Prop where + domain : ∀ i x,x∈V.domain i ↔ i<4 ∧ x∈range (affineQuadric (V.chart i)) + surj : ∀ a : StandardChart,∃ i : ℕ,i<4 ∧ V.chart i=a + +namespace StandardBundleCover +variable {V : AlgebraicRankTwoBundle} (H : StandardBundleCover V) +def chartIndex (a : StandardChart) : ℕ := (H.surj a).choose +lemma chartIndex_lt (a : StandardChart) : H.chartIndex a<4 := (H.surj a).choose_spec.1 +lemma chartIndex_chart (a : StandardChart) : V.chart (H.chartIndex a)=a := (H.surj a).choose_spec.2 +lemma chartIndex_mem (a : StandardChart) (z : BaseCoordinates) : affineQuadric a z∈V.domain (H.chartIndex a) := by + rw [H.domain,H.chartIndex_chart] + exact ⟨H.chartIndex_lt a,⟨z,rfl⟩⟩ +end StandardBundleCover + +structure SegreSectionSystem (V : AlgebraicRankTwoBundle) (n : ℕ) (ι : Type u1) [Fintype ι] where + cover : StandardBundleCover V + generation : PolynomialGeneration n ι + sections : ProjectiveIndex ι → SymmetricSection V n + value_eq : ∀ i x,x∈V.domain i → ∀ v : FiberCoordinates, + sectionVector sections i x v=generation.value (V.chart i) (coordQuadric (V.chart i) x) v + +namespace SegreSectionSystem +variable {V : AlgebraicRankTwoBundle} {n : ℕ} {ι : Type u2} [Fintype ι] (S : SegreSectionSystem V n ι) +lemma nonzero (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) {v : FiberCoordinates} (hv : v≠0) : + sectionVector S.sections i x v≠0 := by + rw [S.value_eq i x hx] + exact S.generation.value_nonzero _ _ hv +lemma pivot_domain (i : ℕ) (hi : i<4) (j : ℕ) (x : QuadricSurface) (hx : x∈V.domain j) + (v : FiberCoordinates) (q : ι) (hq : sectionVector S.sections j x v (index (V.chart i,q))≠0) : + x∈V.domain i := by + rw [S.value_eq j x hx] at hq + change S.generation.stencil (V.chart j) (coordQuadric (V.chart j) x) (veronese n v) _≠0 at hq + rw [S.generation.stencil_index] at hq + have ho := (segreFactor_ne_zero_iff (V.chart i) (V.chart j) (coordQuadric (V.chart j) x)).mp + (mul_ne_zero_iff.mp hq).1 + rw [S.cover.domain] + refine ⟨hi,?_⟩ + rw [← affineQuadric_mem_range] at ho + simpa only [affineQuadric_coord ((S.cover.domain j x).mp hx).2] using ho +lemma localize_pivot (j : ProjectiveIndex ι) (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) + (v : FiberCoordinates) (hv : v≠0) (hj : sectionVector S.sections i x v j≠0) : + ∃ z : BaseCoordinates,∃ w : FiberCoordinates,w≠0 ∧ + sectionVector S.sections i x v=S.generation.value (label j).1 z w := by + let a := (label j).1 + let k := S.cover.chartIndex a + have hk : x∈V.domain k := by + apply S.pivot_domain k (S.cover.chartIndex_lt a) i x hx v (label j).2 + simpa only [k,S.cover.chartIndex_chart,a,Prod.eta,index_label] using hj + refine ⟨coordQuadric a x,(V.dualTransition k i x).mulVec v, + V.dualTransition_nonzero k i x hk hx hv,?_⟩ + rw [← sectionVector_compatible S.sections k i x hk hx v,S.value_eq k x hk] + simp only [k,S.cover.chartIndex_chart,a] + +lemma pivot_coordinates (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) (v : FiberCoordinates) + (q : ι) (hq : sectionVector S.sections i x v (index (V.chart i,q))≠0) : + patchCoordinates (V.chart i) q (normalize (index (V.chart i,q)) (sectionVector S.sections i x v))= + coordQuadric (V.chart i) x := by + rw [S.value_eq i x hx] at hq ⊢ + exact S.generation.patchCoordinates_stencil _ _ _ _ hq +lemma pivot_recovery (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) (v : FiberCoordinates) + (q : ι) (hq : sectionVector S.sections i x v (index (V.chart i,q))≠0) : + S.generation.patchRecovery (V.chart i) q (normalize (index (V.chart i,q)) (sectionVector S.sections i x v))= + (sectionVector S.sections i x v (index (V.chart i,q)))⁻¹ • veronese n v := by + rw [S.value_eq i x hx] at hq ⊢ + exact S.generation.patchRecovery_stencil _ _ _ _ hq +lemma exists_pivot (i : ℕ) (x : QuadricSurface) (hx : x∈V.domain i) (v : FiberCoordinates) (hv : v≠0) : + ∃ q : ι,sectionVector S.sections i x v (index (V.chart i,q))≠0 := by + have hn := S.generation.matrix_nonzero (V.chart i) (coordQuadric (V.chart i) x) (veronese_nonzero n hv) + by_contra hh + apply hn + ext q + have he : sectionVector S.sections i x v (index (V.chart i,q))=0 := by + by_contra he; exact hh ⟨q,he⟩ + rw [S.value_eq i x hx] at he + simpa only [PolynomialGeneration.value,S.generation.stencil_self,Pi.zero_apply] using he + +lemma injective (hn : 0.2 + have he := affineQuadric_coord hr + conv_lhs => rw [← he] + simp only [powerPullbackTwist,bundle,globalTransition,powerQuadric_affine hm,coordQuadric_affine] + congr 1 + rw [firstFactor_transition,secondFactor_transition] + rfl + +def ampleSection (m : ℕ) (hm : 0 < m) (e t : ℕ) (he : 3*m≤e) (hen : e+1=2*t) + (a : StandardChart) (q : SymmetricGeneratorIndex t) : SymmetricSection (powerPullbackTwist D.bundle m hm) (2*t) where + coefficient := fun i k z ↦ baseEval (D.fullSymmetricCoefficient m e t he a (standardChartNat i) q k) z + regular := fun i k ↦ algebraicallyRegular_polynomial _ _ + compatible := by + intro i j x hi hj v + let E := powerPullbackTwist D.bundle m hm + let ci := standardChartNat i + let cj := standardChartNat j + let z := coordQuadric cj x + have hjr : x∈range (affineQuadric cj) := ((D.powerTwist_cover m hm).domain j x).mp hj |>.2 + have hir : x∈range (affineQuadric ci) := ((D.powerTwist_cover m hm).domain i x).mp hi |>.2 + have hz : z∈coordinateOverlap cj ci := coord_mem_overlap cj ci hjr hir + have hchange : coordinateChange cj ci z=coordQuadric ci x := by + rw [← coordinateChange_coord] + change coordQuadric ci (affineQuadric cj (coordQuadric cj x))=_ + rw [affineQuadric_coord hjr] + have hQ := D.fullSymmetricCoefficient_compatible m e t he a cj ci q hz + rw [hchange,hen] at hQ + let p : Form (R:=ℂ) (2*t) := fun k ↦ baseEval (D.fullSymmetricCoefficient m e t he a ci q k) (coordQuadric ci x) + let T := D.coordinateTransition cj ci (powerCoordinates m z) + let l := firstFactor cj ci z*secondFactor cj ci z + have hdual : E.dualTransition i j x=l • T.transpose := by + unfold AlgebraicRankTwoBundle.dualTransition + rw [D.powerTwist_transition m hm j i x hj,Matrix.transpose_smul] + change (∑ k : Fin (2*t+1),p k*((E.dualTransition i j x).mulVec v 0)^k.val* + ((E.dualTransition i j x).mulVec v 1)^(2*t-k.val))=_ + rw [← eval_polynomial,hdual,Matrix.smul_mulVec,eval_polynomial_smul_vector] + rw [← eval_polynomial] + change _=MvPolynomial.eval v (polynomial (2*t) (fun k ↦ baseEval (D.fullSymmetricCoefficient m e t he a cj q k) z)) + rw [hQ,lineFactor_diagonal,eval_polynomial_smul_coeff,polynomial_symmetricMatrix,eval_substitute] + +lemma ampleSection_value (m : ℕ) (hm : 0 < m) (e t : ℕ) (he : 3*m≤e) (hen : e+1=2*t) + (a : StandardChart) (q : SymmetricGeneratorIndex t) (i : ℕ) (x : QuadricSurface) (v : FiberCoordinates) : + (D.ampleSection m hm e t he hen a q).value i x v= + (D.symmetricGeneration m e t he).value (standardChartNat i) (coordQuadric (standardChartNat i) x) v (index (a,q)) := by + change (∑ k : Fin (2*t+1),baseEval (D.fullSymmetricCoefficient m e t he a (standardChartNat i) q k) + (coordQuadric (standardChartNat i) x)*v 0^k.val*v 1^(2*t-k.val))=_ + rw [← eval_polynomial,D.fullSymmetricCoefficient_value,eval_polynomial_smul_coeff,polynomial_eval_dot] + rw [PolynomialGeneration.value,PolynomialGeneration.stencil_index,D.symmetricGeneration_matrix] + rfl + +def ampleSystem (m : ℕ) (hm : 0 < m) (e t : ℕ) (he : 3*m≤e) (hen : e+1=2*t) : + SegreSectionSystem (powerPullbackTwist D.bundle m hm) (2*t) (SymmetricGeneratorIndex t) where + cover := D.powerTwist_cover m hm + generation := D.symmetricGeneration m e t he + sections := fun j ↦ D.ampleSection m hm e t he hen (label j).1 (label j).2 + value_eq := by + intro i x _ v + ext j + change (D.ampleSection m hm e t he hen (label j).1 (label j).2).value i x v=_ + rw [D.ampleSection_value,index_label] + rfl +end EqualizerData +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix LaurentCech BinaryForms PolynomialGeneration +open scoped BigOperators +noncomputable section +namespace SegreSectionSystem +variable {V : AlgebraicRankTwoBundle} {n : ℕ} {ι : Type u3} [Fintype ι] (S : SegreSectionSystem V n ι) + +lemma cone_algebraic (hn : 0 fin_cases b <;> simp [coordinateTransition,D.low_self] + +lemma coordinateTransition_mul (i j k : StandardChart) {z : BaseCoordinates} + (hj : z ∈ coordinateOverlap i j) (hk : z ∈ coordinateOverlap i k) : + D.coordinateTransition i j z*D.coordinateTransition j k (coordinateChange i j z)= + D.coordinateTransition i k z := by + ext a b; fin_cases a <;> fin_cases b + · simpa [coordinateTransition,Matrix.mul_apply,Fin.sum_univ_two] using topFactor_mul i j k hj hk + · simp [coordinateTransition,Matrix.mul_apply,Fin.sum_univ_two] + · simpa [coordinateTransition,Matrix.mul_apply,Fin.sum_univ_two] using D.low_mul i j k hj hk + · simpa [coordinateTransition,Matrix.mul_apply,Fin.sum_univ_two] using bottomFactor_mul i j k hj hk + +lemma coordinateTransition_regular (i j : StandardChart) (a b : Fin 2) : + UniformlyRegularOn (coordinateOverlap i j) (fun z ↦ D.coordinateTransition i j z a b) := by + fin_cases a <;> fin_cases b + · exact topFactor_regular i j _ + · exact uniformlyRegular_const _ 0 + · exact D.low_regular i j + · exact bottomFactor_regular i j + +end EqualizerData +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix +noncomputable section + +def standardChartNat (n : ℕ) : StandardChart := + if n=0 then (0,0) else if n=1 then (0,1) else if n=2 then (1,0) else (1,1) +def standardEquationNat (n : ℕ) : BasePolynomial := if n<4 then 1 else 0 + +lemma standardChartNat_surj (i : StandardChart) : ∃ n : ℕ, n<4 ∧ standardChartNat n=i := by + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j + · exact ⟨0,by norm_num,by simp [standardChartNat]⟩ + · exact ⟨1,by norm_num,by simp [standardChartNat]⟩ + · exact ⟨2,by norm_num,by simp [standardChartNat]⟩ + · exact ⟨3,by norm_num,by simp [standardChartNat]⟩ + +lemma principalChart_one (i : StandardChart) : principalChart i 1=range (affineQuadric i) := by + ext x; simp [principalChart] + +lemma standardCharts_cover (x : QuadricSurface) : + ∃ n, x ∈ principalChart (standardChartNat n) (standardEquationNat n) := by + obtain ⟨i,z,hz⟩ := affineQuadric_cover x + obtain ⟨n,hn,hi⟩ := standardChartNat_surj i + refine ⟨n,?_⟩ + rw [standardEquationNat,ite_eq_left hn,principalChart_one,hi] + exact ⟨z,hz⟩ + +namespace EqualizerData +variable (D : EqualizerData) + +def globalTransition (i j : StandardChart) (x : QuadricSurface) : TwoMatrix := + D.coordinateTransition i j (coordQuadric i x) + +lemma globalTransition_self (i : StandardChart) (x : QuadricSurface) : + D.globalTransition i i x=1 := D.coordinateTransition_self i (coordQuadric i x) + +lemma coord_mem_overlap (i j : StandardChart) {x : QuadricSurface} + (hi : x ∈ range (affineQuadric i)) (hj : x ∈ range (affineQuadric j)) : + coordQuadric i x ∈ coordinateOverlap i j := by + rw [← affineQuadric_mem_range,affineQuadric_coord hi] + exact hj + +lemma globalTransition_mul (i j k : StandardChart) {x : QuadricSurface} + (hi : x ∈ range (affineQuadric i)) (hj : x ∈ range (affineQuadric j)) + (hk : x ∈ range (affineQuadric k)) : + D.globalTransition i j x*D.globalTransition j k x=D.globalTransition i k x := by + have hc : coordinateChange i j (coordQuadric i x)=coordQuadric j x := by + rw [← coordinateChange_coord,affineQuadric_coord hi] + simpa only [globalTransition,hc] using + D.coordinateTransition_mul i j k (coord_mem_overlap i j hi hj) (coord_mem_overlap i k hi hk) + +def bundle : AlgebraicRankTwoBundle where + numberOfCharts := 4 + chart := standardChartNat + equation := standardEquationNat + finiteCover := fun i hi ↦ by simp [standardEquationNat,not_lt.mpr hi] + covers := standardCharts_cover + transition := fun i j ↦ D.globalTransition (standardChartNat i) (standardChartNat j) + transition_self := fun i x _ ↦ D.globalTransition_self _ x + transition_mul := fun i j k x hi hj hk ↦ D.globalTransition_mul _ _ _ hi.1 hj.1 hk.1 + transition_regular := by + intro i j a b + have hr := (D.coordinateTransition_regular (standardChartNat i) (standardChartNat j) a b).mono + (show {z | baseEval (standardEquationNat i) z ≠ 0 ∧ + affineQuadric (standardChartNat i) z ∈ principalChart (standardChartNat j) (standardEquationNat j)} + ⊆ coordinateOverlap (standardChartNat i) (standardChartNat j) from + fun z hz ↦ (affineQuadric_mem_range _ _ z).mp hz.2.1) + simpa only [globalTransition,coordQuadric_affine] using hr.regular + +def inclusionMatrix (i : StandardChart) (z : BaseCoordinates) : TwoMatrix := + !![1,0;baseEval (D.lift i) z,baseEval (D.divisor i) z] + +lemma inclusionMatrix_change (i j : StandardChart) {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) : + D.inclusionMatrix i z*D.coordinateTransition i j z= + !![topFactor i j z,0;0,quotientFactor i j z]* + D.inclusionMatrix j (coordinateChange i j z) := by + ext a b; fin_cases a <;> fin_cases b <;> + simp [inclusionMatrix,coordinateTransition,Matrix.mul_apply,Fin.sum_univ_two] + · have h := D.low_spec i j hz + unfold numerator at h + linear_combination h + · exact D.divisor_factor i j hz + +lemma second_projection_surjective (i : StandardChart) (z : BaseCoordinates) : + Function.Surjective (fun v : FiberCoordinates ↦ baseEval (D.lift i) z*v 0+ + baseEval (D.divisor i) z*v 1) := by + intro w + by_cases hd : baseEval (D.divisor i) z=0 + · have hh := D.lift_unit i z hd + refine ⟨![w/baseEval (D.lift i) z,0],?_⟩ + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_one] + field_simp; simp + · refine ⟨![0,w/baseEval (D.divisor i) z],?_⟩ + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_one] + field_simp; simp + +lemma inclusionMatrix_det (i : StandardChart) (z : BaseCoordinates) : + (D.inclusionMatrix i z).det=baseEval (D.divisor i) z := by + simp [inclusionMatrix,Matrix.det_fin_two] + +end EqualizerData +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Gluing.lean b/lean/OAI/Geometry/QuadricBundles/Gluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5ef16dad40163ede20610d42eef8440eab02754 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Gluing.lean @@ -0,0 +1,286 @@ +import OAI.Geometry.QuadricBundles.WeakBaseChange + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +lemma matrix_coefficients_inverse (c : MatrixCoefficients) : + matrixToCoefficients (coefficientsToMatrix c)=c := by ext p; rfl + +lemma traceScalar_tendsto {ex : ℕ → ℕ} (hex : Tendsto ex atTop atTop) + (i j : StandardChart) {z : BaseCoordinates} (hz : z∈coordinateOverlap i j) : + Tendsto (fun k ↦ traceScalar (ex k) i j z) atTop (𝓝 1) := by + have hn : ‖polarizationTransition i j (affineQuadric i z)‖≠0 := by + rw [norm_ne_zero_iff,polarizationTransition_affine] + exact mul_ne_zero (firstFactor_ne_zero hz) (secondFactor_ne_zero hz) + simpa only [traceScalar,Real.rpow_zero,Function.comp_def] using + (Real.continuousAt_const_rpow (b := 0) hn).tendsto.comp + ((tendsto_const_div_atTop_nhds_zero_nat (2:ℝ)).comp hex) + +def coefficientFrame (D : EqualizerData) (i j : StandardChart) (z : BaseCoordinates) : + CoefficientSpace →L[ℝ] CoefficientSpace := + (congruenceCoefficients (D.coordinateTransition i j z).transpose).restrictScalars ℝ + +lemma coefficientFrame_continuousOn (D : EqualizerData) (i j : StandardChart) : + ContinuousOn (coefficientFrame D i j) (coordinateOverlap i j) := + (ContinuousLinearMap.continuous_restrictScalars ℝ).comp_continuousOn + (continuous_congruenceCoefficients.comp_continuousOn + (by + apply continuousOn_pi.mpr; intro a + apply continuousOn_pi.mpr; intro b + exact continuousOn_pi.mp (continuousOn_pi.mp (D.coordinateTransition_continuousOn i j) b) a)) + +lemma coefficientFrame_bounded (D : EqualizerData) (i j : StandardChart) + {K : Set BaseCoordinates} (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap i j) : + ∃ C : ℝ, 0≤C ∧ ∀ z∈K, ‖coefficientFrame D i j z‖≤C := by + obtain ⟨C,hC⟩ := hK.bddAbove_image ((coefficientFrame_continuousOn D i j).mono hKU).norm + exact ⟨max C 0,le_max_right _ _,fun z hz ↦ (hC (mem_image_of_mem _ hz)).trans (le_max_left _ _)⟩ + +namespace ExtractedTrace +variable {D : EqualizerData} {ex : ℕ → ℕ} {P : ∀ k, TwistedPshForm D (ex k)} + (X : ExtractedTrace ex P) + +lemma coefficients_eq (k : ℕ) (a : TraceIndex) : + X.f k a =ᵐ[volume] fun x ↦ matrixToCoefficients (cutoffTrace (P k) a x) := by + filter_upwards [X.coefficients k a] with x hx + rw [← matrix_coefficients_inverse (X.f k a x),hx] + +lemma coefficients_change {a b : TraceIndex} {K : Set BaseCoordinates} + (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap a.1 b.1) + (hKa : K ⊆ traceSupport a) + (hKb : MapsTo (coordinateChange a.1 b.1) K (traceSupport b)) (k : ℕ) : + ∀ᵐ x ∂volume.restrict K, + X.f k a x=traceScalar (ex k) a.1 b.1 x • + coefficientFrame D a.1 b.1 x (X.f k b (coordinateChange a.1 b.1 x)) := by + obtain ⟨C,_,hC⟩ := coordinateChange_compact_bound a.1 b.1 hK hKU + have hq : Measure.QuasiMeasurePreserving (coordinateChange a.1 b.1) (volume.restrict K) volume := + ⟨coordinateChange_measurable _ _,Measure.absolutelyContinuous_of_le_smul hC⟩ + filter_upwards [ae_restrict_of_ae (X.coefficients_eq k a),hq.ae (X.coefficients_eq k b), + ae_restrict_mem hK.measurableSet] with x ha hb hx + rw [ha,hb,cutoffTrace_eq _ _ (hKa hx),cutoffTrace_eq _ _ (hKb hx), + (P k).matrix_compatible a.1 b.1 (hKU hx)] + change matrixToCoefficients (_ • _) = _ + rfl + +lemma weak_coefficients_change (hex : Tendsto ex atTop atTop) + {a b : TraceIndex} {K : Set BaseCoordinates} + (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap a.1 b.1) + (hKa : K ⊆ traceSupport a) + (hKb : MapsTo (coordinateChange a.1 b.1) K (traceSupport b)) : + ∀ᵐ x ∂volume.restrict K, + X.w a x=coefficientFrame D a.1 b.1 x (X.w b (coordinateChange a.1 b.1 x)) := by + let μ := volume.restrict K + let T := coordinateChange a.1 b.1 + let F := coefficientFrame D a.1 b.1 + have : IsFiniteMeasure μ := ⟨by + change volume.restrict K univ < ∞ + rw [Measure.restrict_apply_univ] + exact hK.measure_lt_top⟩ + obtain ⟨J,_,hJ⟩ := coordinateChange_compact_bound a.1 b.1 hK hKU + have hq : Measure.QuasiMeasurePreserving T μ volume := + ⟨coordinateChange_measurable _ _,Measure.absolutelyContinuous_of_le_smul hJ⟩ + obtain ⟨C,hC,hFC⟩ := coefficientFrame_bounded D a.1 b.1 hK hKU + have hFm : AEStronglyMeasurable F μ := + ((coefficientFrame_continuousOn D a.1 b.1).mono hKU).aestronglyMeasurable hK.measurableSet + have hFb : ∀ᵐ x ∂μ, ‖F x‖≤C := (ae_restrict_mem hK.measurableSet).mono hFC + let B : CoefficientL2 →L[ℝ] Lp CoefficientSpace 2 μ := + boundedCompositionLp measurable_id ENNReal.one_ne_top (by + simpa only [Measure.map_id,one_smul] using (Measure.restrict_le_self (μ := volume) (s := K))) + let A₀ : CoefficientL2 →L[ℝ] Lp CoefficientSpace 2 μ := + boundedCompositionLp (coordinateChange_measurable a.1 b.1) ENNReal.ofReal_ne_top hJ + let A : CoefficientL2 →L[ℝ] Lp CoefficientSpace 2 μ := + (boundedMultiplierLp hFm hC hFb).comp A₀ + have hB (f : CoefficientL2) : B f =ᵐ[μ] f := by + exact boundedCompositionLp_coe measurable_id ENNReal.one_ne_top _ f + have hA (f : CoefficientL2) : A f =ᵐ[μ] fun x ↦ F x (f (T x)) := by + filter_upwards [boundedMultiplierLp_coe hFm hC hFb (A₀ f), + boundedCompositionLp_coe (coordinateChange_measurable a.1 b.1) ENNReal.ofReal_ne_top hJ f] + with x hx hy + change boundedMultiplierLp hFm hC hFb (A₀ f) x = _ + rw [hx,hy] + let u (k : ℕ) := X.f (X.subsequence k) b + let v (k : ℕ) := X.f (X.subsequence k) a + let e (k : ℕ) := B (v k)-A (u k) + have hu (k : ℕ) : ∀ᵐ x ∂μ, ‖F x (u k (T x))‖≤C*(8*traceBound D b) := by + filter_upwards [hq.ae (X.bound (X.subsequence k) b),hFb] with x hx hy + exact (F x).le_opNorm _ |>.trans + (mul_le_mul hy hx.1 (norm_nonneg _) hC) + have he (k : ℕ) : e k =ᵐ[μ] fun x ↦ + (traceScalar (ex (X.subsequence k)) a.1 b.1 x-1) • F x (u k (T x)) := by + filter_upwards [Lp.coeFn_sub (B (v k)) (A (u k)),hB (v k),hA (u k), + X.coefficients_change hK hKU hKa hKb (X.subsequence k)] with x hsub hv hu hc + change (B (v k)-A (u k)) x = _ + rw [hsub,Pi.sub_apply,hv,hu] + change X.f (X.subsequence k) a x - _ = _ + rw [hc,sub_smul,one_smul] + have hb (k : ℕ) : ∀ᵐ x ∂μ, ‖e k x‖≤8*traceBound D a+C*(8*traceBound D b) := by + filter_upwards [Lp.coeFn_sub (B (v k)) (A (u k)),hB (v k),hA (u k), + ae_restrict_of_ae (X.bound (X.subsequence k) a),hu k] with x hsub hv hu hvb hub + change ‖(B (v k)-A (u k)) x‖≤_ + rw [hsub,Pi.sub_apply,hv,hu] + exact (norm_sub_le _ _).trans (add_le_add hvb.1 hub) + have hlim : ∀ᵐ x ∂μ, Tendsto (fun k ↦ e k x) atTop (𝓝 0) := by + filter_upwards [ae_all_iff.mpr he,ae_all_iff.mpr hu,ae_restrict_mem hK.measurableSet] + with x hx hb hxK + apply tendsto_zero_iff_norm_tendsto_zero.mpr + have hs := (traceScalar_tendsto (hex.comp X.strictMono.tendsto_atTop) a.1 b.1 (hKU hxK)).sub + (tendsto_const_nhds (x := (1:ℝ))) + have ht : Tendsto (fun k ↦ ‖traceScalar (ex (X.subsequence k)) a.1 b.1 x-1‖ * + (C*(8*traceBound D b))) atTop (𝓝 0) := by simpa using hs.norm.mul_const (C*(8*traceBound D b)) + apply squeeze_zero (fun _ ↦ norm_nonneg _) _ ht + intro k + rw [hx,norm_smul] + exact mul_le_mul_of_nonneg_left (hb k) (norm_nonneg _) + let : InnerProductSpace ℝ CoefficientSpace := InnerProductSpace.rclikeToReal ℂ CoefficientSpace + have herr : Tendsto (fun k ↦ ‖e k‖) atTop (𝓝 0) := + L2_norm_tendsto_zero_of_bounded_ae e + (add_nonneg (mul_nonneg (by positivity) (traceBound_nonneg D a)) + (mul_nonneg hC (mul_nonneg (by positivity) (traceBound_nonneg D b)))) hb hlim + have hw : B (X.w a)=A (X.w b) := + real_weakLimit_two_maps A B (X.weak b) (X.weak a) herr + filter_upwards [hB (X.w a),hA (X.w b)] with x hx hy + rw [← hx,hw,hy] + +end ExtractedTrace +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +lemma coordinateChange_differentiableOn (i j : StandardChart) : + DifferentiableOn ℂ (coordinateChange i j) (coordinateOverlap i j) := by + apply DifferentiableOn.prodMk + · by_cases h : i.1=j.1 + · simp only [scalarCoordinateChange,ite_eq_left h] + fun_prop + · simp only [scalarCoordinateChange,ite_eq_right h] + exact differentiableOn_fst.inv (fun z hz ↦ ((coordinateOverlap_iff i j z).mp hz).1.resolve_left h) + · by_cases h : i.2=j.2 + · simp only [scalarCoordinateChange,ite_eq_left h] + fun_prop + · simp only [scalarCoordinateChange,ite_eq_right h] + exact differentiableOn_snd.inv (fun z hz ↦ ((coordinateOverlap_iff i j z).mp hz).2.resolve_left h) + +lemma coordinateFiberChange_differentiableOn (D : EqualizerData) (i j : StandardChart) + (v : FiberCoordinates) : DifferentiableOn ℂ + (fun z ↦ (coordinateChange i j z,(D.coordinateTransition i j z).transpose.mulVec v)) + (coordinateOverlap i j) := by + apply (coordinateChange_differentiableOn i j).prodMk + apply differentiableOn_pi.mpr + intro a + change DifferentiableOn ℂ (fun z ↦ ∑ b : Fin 2, D.coordinateTransition i j z b a * v b) _ + apply DifferentiableOn.fun_sum + intro b _ + exact (((D.coordinateTransition_regular i j b a).regular.analyticOnNhd + (coordinateOverlap_open i j)).differentiableOn).mul_const (v b) + +namespace ExtractedTrace +variable {D : EqualizerData} {ex : ℕ → ℕ} {P : ∀ k, TwistedPshForm D (ex k)} + (X : ExtractedTrace ex P) + +lemma globalValue_representative_ae (i : StandardChart) (n : ℕ) + {K : Set BaseCoordinates} (hKn : K ⊆ traceInterior (i,n)) : + ∀ᵐ x ∂volume.restrict K, ∀ v : FiberCoordinates, + X.globalValue i (x,v)=quadraticValue (coefficientsToMatrix (X.w (i,n) x)) v := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hKn (X.representative (i,n)), + ae_restrict_mem (μ := volume) (s := traceInterior (i,n)) measurableSet_ball |> + ae_restrict_of_ae_restrict_of_subset hKn] with x hx hxU + intro v + rw [X.globalValue_eq_value i n hxU] + change quadraticValue (X.matrix (i,n) x) v = _ + rw [hx] + +lemma globalValue_composed_representative_ae (i j : StandardChart) (m : ℕ) + {K : Set BaseCoordinates} (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap i j) + (hmap : MapsTo (coordinateChange i j) K (traceInterior (j,m))) : + ∀ᵐ x ∂volume.restrict K, ∀ v : FiberCoordinates, + X.globalValue j (coordinateChange i j x,v)= + quadraticValue (coefficientsToMatrix (X.w (j,m) (coordinateChange i j x))) v := by + obtain ⟨C,_,hC⟩ := coordinateChange_compact_bound i j hK hKU + have hq : Measure.QuasiMeasurePreserving (coordinateChange i j) (volume.restrict K) volume := + ⟨coordinateChange_measurable _ _,Measure.absolutelyContinuous_of_le_smul hC⟩ + have hrb : ∀ᵐ x ∂volume, x∈traceInterior (j,m) → + X.matrix (j,m) x=coefficientsToMatrix (X.w (j,m) x) := + (ae_restrict_iff' measurableSet_ball).mp (X.representative (j,m)) + filter_upwards [hq.ae hrb,ae_restrict_mem hK.measurableSet] with x hb hx + intro v + rw [X.globalValue_eq_value j m (hmap hx)] + change quadraticValue (X.matrix (j,m) (coordinateChange i j x)) v = _ + rw [hb (hmap hx)] + +lemma coefficientFrame_quadraticValue (D : EqualizerData) (i j : StandardChart) + (x : BaseCoordinates) (c : CoefficientSpace) (v : FiberCoordinates) : + quadraticValue (coefficientsToMatrix (coefficientFrame D i j x c)) v = + quadraticValue (coefficientsToMatrix c) ((D.coordinateTransition i j x).transpose.mulVec v) := + quadraticValue_congruence _ _ _ + +lemma globalValue_change_ae_indices (hex : Tendsto ex atTop atTop) (i j : StandardChart) + (n m : ℕ) {K : Set BaseCoordinates} (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap i j) + (hn : K ⊆ traceInterior (i,n)) + (hm : MapsTo (coordinateChange i j) K (traceInterior (j,m))) : + ∀ᵐ x ∂volume.restrict K, ∀ v : FiberCoordinates, + X.globalValue i (x,v)=X.globalValue j + (coordinateChange i j x,(D.coordinateTransition i j x).transpose.mulVec v) := by + have hKa : K ⊆ traceSupport (i,n) := hn.trans ((traceInterior_subset_domain _).trans (traceDomain_subset_support _)) + have hKb : MapsTo (coordinateChange i j) K (traceSupport (j,m)) := + fun x hx ↦ traceDomain_subset_support _ (traceInterior_subset_domain _ (hm hx)) + have he := X.weak_coefficients_change hex (a := (i,n)) (b := (j,m)) hK hKU hKa hKb + filter_upwards [he,X.globalValue_representative_ae i n hn, + X.globalValue_composed_representative_ae i j m hK hKU hm] with x he ha hb + intro v + calc + X.globalValue i (x,v) = quadraticValue (coefficientsToMatrix (X.w (i,n) x)) v := ha v + _ = quadraticValue (coefficientsToMatrix (coefficientFrame D i j x + (X.w (j,m) (coordinateChange i j x)))) v := congrArg (fun c ↦ quadraticValue (coefficientsToMatrix c) v) he + _ = quadraticValue (coefficientsToMatrix (X.w (j,m) (coordinateChange i j x))) + ((D.coordinateTransition i j x).transpose.mulVec v) := coefficientFrame_quadraticValue D i j x _ v + _ = _ := (hb _).symm + +lemma globalValue_change_ae (hex : Tendsto ex atTop atTop) (i j : StandardChart) + {K : Set BaseCoordinates} (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap i j) : + ∀ᵐ x ∂volume.restrict K, ∀ v : FiberCoordinates, + X.globalValue i (x,v)=X.globalValue j + (coordinateChange i j x,(D.coordinateTransition i j x).transpose.mulVec v) := by + obtain ⟨n,hn⟩ := exists_traceInterior_of_compact i hK + have hTK := hK.image_of_continuousOn ((coordinateChange_differentiableOn i j).continuousOn.mono hKU) + obtain ⟨m,hm⟩ := exists_traceInterior_of_compact j hTK + exact X.globalValue_change_ae_indices hex i j n m hK hKU hn + (fun x hx ↦ hm (mem_image_of_mem _ hx)) + +lemma globalValue_change (hex : Tendsto ex atTop atTop) (i j : StandardChart) + {x : BaseCoordinates} (hx : x∈coordinateOverlap i j) (v : FiberCoordinates) : + X.globalValue i (x,v)=X.globalValue j + (coordinateChange i j x,(D.coordinateTransition i j x).transpose.mulVec v) := by + obtain ⟨r,hr,hball⟩ := Metric.isOpen_iff.mp (coordinateOverlap_open i j) x hx + let ρ := r/2 + have hρ : 0<ρ := by dsimp [ρ]; linarith + have hcb : closedBall x ρ ⊆ coordinateOverlap i j := by + intro y hy + exact hball (lt_of_le_of_lt hy (by change r/2 < r; linarith)) + have hb : ball x ρ ⊆ coordinateOverlap i j := ball_subset_closedBall.trans hcb + let q (z : BaseCoordinates) := X.globalValue i (z,v) + let s (z : BaseCoordinates) := X.globalValue j + (coordinateChange i j z,(D.coordinateTransition i j z).transpose.mulVec v) + have hq : DiskPshOn (ball x ρ) q := (X.globalValue_psh i).comp (by fun_prop) (mapsTo_univ _ _) + have hs : DiskPshOn (ball x ρ) s := (X.globalValue_psh j).comp + ((coordinateFiberChange_differentiableOn D i j v).mono hb) (mapsTo_univ _ _) + have he : q =ᵐ[volume.restrict (ball x ρ)] s := + (ae_restrict_of_ae_restrict_of_subset ball_subset_closedBall + (X.globalValue_change_ae hex i j (isCompact_closedBall x ρ) hcb)).mono fun z hz ↦ hz v + exact hq.eqOn_of_ae isOpen_ball hs + (fun z _ ↦ X.globalValue_nonneg i (z,v)) (fun z _ ↦ X.globalValue_nonneg j _) he (mem_ball_self hρ) +end ExtractedTrace +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Graphs.lean b/lean/OAI/Geometry/QuadricBundles/Graphs.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea9f2cc46d99c42b72241902cd6940078b06637c --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Graphs.lean @@ -0,0 +1,889 @@ +import OAI.Geometry.QuadricBundles.Equalizer + +namespace OAI + +universe u1 u2 + +namespace QuadricCounterexample +open Polynomial +noncomputable section + +structure GraphScalars where + a : ℂ + s : ℂ + b : ℂ + c : ℂ + a_cube : a^3 = -1 + determinant : s*(1-s) = 1+b*c + relative_trace : s+a^2*(1-s)+(Real.sqrt 2 : ℂ)*a=0 + b_ne_zero : b ≠ 0 + c_ne_zero : c ≠ 0 + +namespace GraphScalars +variable (T : GraphScalars) + +def N₁ : ℂ[X] := X^2-X+1 +def N₂ : ℂ[X] := X^2+C ((Real.sqrt 2 : ℂ)*T.a)*X+C (T.a^2) +def N₂other : ℂ[X] := X^2-C ((Real.sqrt 2 : ℂ)*T.a)*X+C (T.a^2) +def P₁ : ℂ[X] := C T.c*X^2+C (1-2*T.s)*X-C T.b +def P₂ : ℂ[X] := C T.c*X^2+C (T.a^2*(1-T.s)-T.s)*X-C (T.a^2*T.b) +def L : ℂ[X] := C T.s-C T.c*X +def J : ℂ[X] := C T.b-C (1-T.s)*X + +lemma a_twentyfour : T.a^24=1 := by + rw [show (24 : ℕ)=3*8 by norm_num,pow_mul,T.a_cube]; norm_num + +lemma sqrt_two_square : (Real.sqrt 2 : ℂ)^2=2 := by + norm_cast + exact Real.sq_sqrt (by norm_num) + +lemma N₁_dvd : N₁ ∣ (X : ℂ[X])^24-1 := by + have h : ((X : ℂ[X])^3+1) ∣ (X^3)^8-(-1)^8 := by + simpa using sub_dvd_pow_sub_pow (X^3 : ℂ[X]) (-1) 8 + have hd : N₁ ∣ (X : ℂ[X])^3+1 := ⟨X+1,by unfold N₁; ring⟩ + convert hd.trans h using 1; ring + +lemma N₂_factor : T.N₂*T.N₂other = (X : ℂ[X])^4+C (T.a^4) := by + unfold N₂ N₂other + have hs : (C (Real.sqrt 2 : ℂ) : ℂ[X])^2=2 := by + rw [← map_pow,sqrt_two_square]; norm_num [map_ofNat] + simp only [map_mul,map_pow] + linear_combination -(C T.a*X)^2*hs + +lemma N₂_dvd : T.N₂ ∣ (X : ℂ[X])^24-1 := by + have h : ((X : ℂ[X])^4+C (T.a^4)) ∣ (X^4)^6-(-C (T.a^4))^6 := by + simpa only [sub_neg_eq_add] using sub_dvd_pow_sub_pow (X^4 : ℂ[X]) (-C (T.a^4)) 6 + have hh : (-C (T.a^4) : ℂ[X])^6=1 := by + rw [Even.neg_pow (by decide : Even (6 : ℕ))] + rw [← map_pow,← pow_mul,show (4*6 : ℕ)=24 by norm_num,T.a_twentyfour,map_one] + have hd : T.N₂ ∣ (X : ℂ[X])^4+C (T.a^4) := ⟨T.N₂other,T.N₂_factor.symm⟩ + convert hd.trans h using 1 + rw [hh,← pow_mul] + +lemma N_coprime : IsCoprime N₁ T.N₂ := by + apply (Polynomial.isCoprime_iff_aeval_ne_zero_of_isAlgClosed ℂ ℂ _ _).mpr + intro z + by_contra! hz + have h1 : z^2-z+1=0 := by simpa [N₁] using hz.1 + have h2 : z^2+(Real.sqrt 2 : ℂ)*T.a*z+T.a^2=0 := by simpa [N₂] using hz.2 + have hz3 : z^3=-1 := by linear_combination (z+1)*h1 + have hz4 : z^4+T.a^4=0 := by + linear_combination (z^2-(Real.sqrt 2 : ℂ)*T.a*z+T.a^2)*h2 + + (T.a*z)^2*sqrt_two_square + have ha := T.a_cube + have hza : z = -T.a := by + linear_combination -hz4+z*(hz3)+T.a*ha + rw [hza,neg_pow,ha] at hz3 + norm_num at hz3 + +lemma exists_N_quotient : ∃ Q : ℂ[X], X^24-1=N₁*T.N₂*Q := + T.N_coprime.mul_dvd N₁_dvd T.N₂_dvd + +def Nquotient : ℂ[X] := T.exists_N_quotient.choose +lemma Nquotient_spec : (X : ℂ[X])^24-1=N₁*T.N₂*T.Nquotient := T.exists_N_quotient.choose_spec + +lemma N₁_comp_L : N₁.comp T.L=C T.c*T.P₁ := by + unfold N₁ L P₁ + simp only [sub_comp,pow_comp,X_comp,add_comp,one_comp] + have hd := congrArg (C : ℂ →+* ℂ[X]) T.determinant + simp only [map_mul,map_sub,map_one,map_add] at hd + simp only [map_sub,map_mul,map_one,map_ofNat] + linear_combination -hd + +lemma N₂_comp_L : T.N₂.comp T.L=C T.c*T.P₂ := by + unfold N₂ L P₂ + simp only [add_comp,pow_comp,X_comp,mul_comp,C_comp] + have hd := congrArg (C : ℂ →+* ℂ[X]) T.determinant + have ht := congrArg (C : ℂ →+* ℂ[X]) T.relative_trace + simp only [map_mul,map_sub,map_one,map_add,map_pow,map_zero] at hd ht + simp only [map_sub,map_mul,map_one,map_pow] + linear_combination (C T.s-C T.c*X)*ht-(C T.a)^2*hd + +lemma P_coprime : IsCoprime T.P₁ T.P₂ := by + have h := T.N_coprime.map (Polynomial.aeval T.L).toRingHom + have h1 : Polynomial.aeval T.L N₁ = N₁.comp T.L := by simp [aeval_def,comp] + have h2 : Polynomial.aeval T.L T.N₂ = T.N₂.comp T.L := by simp [aeval_def,comp] + change IsCoprime (Polynomial.aeval T.L N₁) (Polynomial.aeval T.L T.N₂) at h + rw [h1,h2,T.N₁_comp_L,T.N₂_comp_L] at h + exact (h.of_isCoprime_of_dvd_left (dvd_mul_left _ _)).of_isCoprime_of_dvd_right (dvd_mul_left _ _) + +lemma P_product_dvd : T.P₁*T.P₂ ∣ T.L^24-1 := by + refine ⟨C (T.c^2)*(T.Nquotient.comp T.L),?_⟩ + have h := congrArg (fun p : ℂ[X] ↦ p.comp T.L) T.Nquotient_spec + simp only [sub_comp,pow_comp,X_comp,one_comp,mul_comp,T.N₁_comp_L,T.N₂_comp_L] at h + rw [h,map_pow] + ring + +lemma J_mod_P₁ : T.J+X*T.L = -T.P₁ := by + unfold J L P₁ + simp only [map_sub,map_mul,map_one,map_ofNat] + ring + +lemma J_mod_P₂ : C (T.a^2)*T.J+X*T.L = -T.P₂ := by + unfold J L P₂ + simp only [map_sub,map_mul,map_one,map_pow] + ring + +lemma P₁_dvd_mixed : T.P₁ ∣ T.J^24-X^24 := by + have hd : T.P₁ ∣ T.L^24-1 := dvd_mul_right _ _ |>.trans T.P_product_dvd + have hJ : T.P₁ ∣ T.J-(-X*T.L) := by + refine ⟨-1,?_⟩ + linear_combination T.J_mod_P₁ + have hp := hJ.trans (sub_dvd_pow_sub_pow T.J (-X*T.L) 24) + have hm := dvd_mul_of_dvd_right hd (X^24) + convert dvd_add hp hm using 1; ring + +lemma P₂_dvd_mixed : T.P₂ ∣ T.J^24-X^24 := by + have hd : T.P₂ ∣ T.L^24-1 := dvd_mul_left _ _ |>.trans T.P_product_dvd + have hJ : T.P₂ ∣ C (T.a^2)*T.J-(-X*T.L) := by + refine ⟨-1,?_⟩ + linear_combination T.J_mod_P₂ + have hp := hJ.trans (sub_dvd_pow_sub_pow (C (T.a^2)*T.J) (-X*T.L) 24) + have hm := dvd_mul_of_dvd_right hd (X^24) + have ha : (C (T.a^2) : ℂ[X])^24=1 := by + rw [← map_pow,← pow_mul,mul_comm 2 24,pow_mul,T.a_twentyfour,one_pow,map_one] + rw [mul_pow,ha,one_mul] at hp + convert dvd_add hp hm using 1; ring + +lemma exists_graph_quotients : ∃ R R' : ℂ[X], + T.L^24-1=T.P₁*T.P₂*R ∧ T.J^24-X^24=T.P₁*T.P₂*R' := by + obtain ⟨R,hR⟩ := T.P_product_dvd + obtain ⟨R',hR'⟩ := T.P_coprime.mul_dvd T.P₁_dvd_mixed T.P₂_dvd_mixed + exact ⟨R,R',hR,hR'⟩ + +def sameQuotient : ℂ[X] := T.exists_graph_quotients.choose +def mixedQuotient : ℂ[X] := T.exists_graph_quotients.choose_spec.choose +lemma sameQuotient_spec : T.L^24-1=T.P₁*T.P₂*T.sameQuotient := + T.exists_graph_quotients.choose_spec.choose_spec.1 +lemma mixedQuotient_spec : T.J^24-X^24=T.P₁*T.P₂*T.mixedQuotient := + T.exists_graph_quotients.choose_spec.choose_spec.2 + +def graphOne (mixed : Bool) (x y : ℂ) : ℂ := if mixed then x*y-1 else y-x +def graphTwo (mixed : Bool) (x y : ℂ) : ℂ := if mixed then x*y-T.a^2 else y-T.a^2*x +def graphThree (mixed : Bool) (x y : ℂ) : ℂ := + if mixed then y*((1-T.s)*x+T.c)-(T.b*x+T.s) else y*(T.c*x+1-T.s)-(T.s*x+T.b) +def betaPolynomial (mixed : Bool) : ℂ[X] := if mixed then T.J else T.L + +def liftBeta (mixed : Bool) (x y : ℂ) : ℂ := + (if mixed then y^24 else 1)+graphOne mixed x y*T.graphTwo mixed x y* + ((T.betaPolynomial mixed).eval y)^2* + ((if mixed then T.mixedQuotient else T.sameQuotient).eval y) + +lemma liftBeta_one {mixed : Bool} {x y : ℂ} (h : graphOne mixed x y=0) : + T.liftBeta mixed x y = if mixed then y^24 else 1 := by + simp [liftBeta,h] +lemma liftBeta_two {mixed : Bool} {x y : ℂ} (h : T.graphTwo mixed x y=0) : + T.liftBeta mixed x y = if mixed then y^24 else 1 := by + simp [liftBeta,h] + +lemma eval_P₁_same {x y : ℂ} (h : T.graphThree false x y=0) : + T.P₁.eval y = -graphOne false x y*T.L.eval y := by + simp only [graphThree,Bool.false_eq_true,↓reduceIte] at h + simp only [P₁,L,eval_sub,eval_add,eval_mul,eval_C,eval_X,eval_pow,graphOne, + Bool.false_eq_true,↓reduceIte] + linear_combination h + +lemma eval_P₂_same {x y : ℂ} (h : T.graphThree false x y=0) : + T.P₂.eval y = -T.graphTwo false x y*T.L.eval y := by + simp only [graphThree,Bool.false_eq_true,↓reduceIte] at h + simp only [P₂,L,eval_sub,eval_add,eval_mul,eval_C,eval_X,eval_pow,graphTwo, + Bool.false_eq_true,↓reduceIte] + linear_combination T.a^2*h + +lemma eval_P₁_mixed {x y : ℂ} (h : T.graphThree true x y=0) : + T.P₁.eval y = graphOne true x y*T.J.eval y := by + simp only [graphThree,↓reduceIte] at h + simp only [P₁,J,eval_sub,eval_add,eval_mul,eval_C,eval_X,eval_pow,graphOne,↓reduceIte] + linear_combination y*h + +lemma eval_P₂_mixed {x y : ℂ} (h : T.graphThree true x y=0) : + T.P₂.eval y = T.graphTwo true x y*T.J.eval y := by + simp only [graphThree,↓reduceIte] at h + simp only [P₂,J,eval_sub,eval_add,eval_mul,eval_C,eval_X,eval_pow,graphTwo,↓reduceIte] + linear_combination y*h + +lemma liftBeta_three {mixed : Bool} {x y : ℂ} (h : T.graphThree mixed x y=0) : + T.liftBeta mixed x y=((T.betaPolynomial mixed).eval y)^24 := by + cases mixed + · have he := congrArg (Polynomial.eval y) T.sameQuotient_spec + simp only [eval_sub,eval_pow,eval_one,eval_mul,T.eval_P₁_same h,T.eval_P₂_same h] at he + simp only [liftBeta,betaPolynomial,Bool.false_eq_true,↓reduceIte] + linear_combination -he + · have he := congrArg (Polynomial.eval y) T.mixedQuotient_spec + simp only [eval_sub,eval_pow,eval_X,eval_mul,T.eval_P₁_mixed h,T.eval_P₂_mixed h] at he + simp only [liftBeta,betaPolynomial,↓reduceIte] + linear_combination -he + +lemma betaPolynomial_ne_zero {mixed : Bool} {x y : ℂ} (h : T.graphThree mixed x y=0) : + (T.betaPolynomial mixed).eval y ≠ 0 := by + have hd := T.determinant + cases mixed + · have hh : (T.L.eval y)*(T.c*x+1-T.s)=1 := by + simp only [graphThree,Bool.false_eq_true,↓reduceIte] at h + simp only [L,eval_sub,eval_C,eval_mul,eval_X] + linear_combination -T.c*h+hd + intro hf + change T.L.eval y=0 at hf + rw [hf,zero_mul] at hh + norm_num at hh + · have hh : (T.J.eval y)*((1-T.s)*x+T.c)= -1 := by + simp only [graphThree,↓reduceIte] at h + simp only [J,eval_sub,eval_C,eval_mul,eval_X] + linear_combination -(1-T.s)*h-hd + intro hf + change T.J.eval y=0 at hf + rw [hf,zero_mul] at hh + norm_num at hh + +lemma a_ne_zero : T.a ≠ 0 := by + intro h + have hc := T.a_cube + rw [h] at hc + norm_num at hc + +lemma liftBeta_ne_zero {mixed : Bool} {x y : ℂ} + (h : graphOne mixed x y*T.graphTwo mixed x y*T.graphThree mixed x y=0) : + T.liftBeta mixed x y ≠ 0 := by + rcases mul_eq_zero.mp h with h | h + · rcases mul_eq_zero.mp h with h | h + · rw [T.liftBeta_one h] + cases mixed + · norm_num + · apply pow_ne_zero + intro hy + simp [graphOne,hy] at h + · rw [T.liftBeta_two h] + cases mixed + · norm_num + · apply pow_ne_zero + intro hy + simp only [graphTwo,↓reduceIte,hy,mul_zero,zero_sub,neg_eq_zero] at h + exact (pow_ne_zero 2 T.a_ne_zero) h + · rw [T.liftBeta_three h] + exact pow_ne_zero _ (T.betaPolynomial_ne_zero h) + +end GraphScalars +end +end QuadricCounterexample + +namespace QuadricCounterexample +open MvPolynomial +noncomputable section +abbrev BPoly := MvPolynomial (Fin 2) ℂ + +def affineLinear (a b : ℂ) : BPoly := C a*X 0+C b + +lemma affineLinear_regular_variable (a b : ℂ) : (1 : Fin 2) ∉ (affineLinear a b).vars := by + intro h + have hf := vars_add_subset (C a*X (0 : Fin 2)) (C b) + have hg := vars_mul (C a : BPoly) (X 0) + simp only [vars_C,vars_X,Finset.empty_union] at hg + simp only [vars_C,Finset.union_empty] at hf + have : (1 : Fin 2) ∈ ({0} : Finset (Fin 2)) := hg (hf h) + norm_num at this + +lemma affineLinear_ne_zero_of_left {a b : ℂ} (ha : a ≠ 0) : affineLinear a b ≠ 0 := by + intro he + have h0 := congrArg (MvPolynomial.eval (fun _ : Fin 2 ↦ (0 : ℂ))) he + have h1 := congrArg (MvPolynomial.eval (fun _ : Fin 2 ↦ (1 : ℂ))) he + simp only [affineLinear,map_add,map_mul,eval_C,eval_X,map_zero,mul_zero,zero_add] at h0 + simp only [affineLinear,map_mul,eval_C,eval_X,map_zero,mul_one,h0,add_zero] at h1 + exact ha h1 + +lemma affineLinear_ne_zero_of_right {a b : ℂ} (hb : b ≠ 0) : affineLinear a b ≠ 0 := by + intro he + have h := congrArg (MvPolynomial.eval (fun _ : Fin 2 ↦ (0 : ℂ))) he + exact hb (by simpa [affineLinear] using h) + +lemma determinant_graph_irreducible (p q r s : ℂ) (hd : p*s-q*r ≠ 0) + (hn : p ≠ 0 ∨ q ≠ 0) : + Irreducible ((C p*X 0+C q)*X 1+(C r*X 0+C s) : BPoly) := by + apply MvPolynomial.irreducible_mul_X_add + · rcases hn with h | h + · exact affineLinear_ne_zero_of_left h + · exact affineLinear_ne_zero_of_right h + · exact affineLinear_regular_variable p q + · exact affineLinear_regular_variable r s + · apply IsCoprime.isRelPrime + refine ⟨C (-r/(p*s-q*r)),C (p/(p*s-q*r)),?_⟩ + have h : (-r/(p*s-q*r))*p+(p/(p*s-q*r))*r=0 := by ring + have h' : (-r/(p*s-q*r))*q+(p/(p*s-q*r))*s=1 := by + calc + _ = (p*s-q*r)/(p*s-q*r) := by ring + _ = 1 := div_self hd + calc + (C (-r/(p*s-q*r)) : BPoly)*(C p*X 0+C q)+C (p/(p*s-q*r))*(C r*X 0+C s) + = C ((-r/(p*s-q*r))*p+(p/(p*s-q*r))*r)*X 0+ + C ((-r/(p*s-q*r))*q+(p/(p*s-q*r))*s) := by + simp only [map_add,map_mul]; ring + _ = 1 := by rw [h,h']; simp + +namespace GraphScalars +variable (T : GraphScalars) +def G1 (mixed : Bool) : BPoly := if mixed then X 0*X 1-1 else X 1-X 0 +def G2 (mixed : Bool) : BPoly := if mixed then X 0*X 1-C (T.a^2) else X 1-C (T.a^2)*X 0 +def G3 (mixed : Bool) : BPoly := + if mixed then X 1*(C (1-T.s)*X 0+C T.c)-(C T.b*X 0+C T.s) + else X 1*(C T.c*X 0+C (1-T.s))-(C T.s*X 0+C T.b) + +@[simp] lemma eval_G1 (mixed : Bool) (x y : ℂ) : + MvPolynomial.eval ![x,y] (G1 mixed)=graphOne mixed x y := by + cases mixed <;> simp [G1,graphOne] +@[simp] lemma eval_G2 (mixed : Bool) (x y : ℂ) : + MvPolynomial.eval ![x,y] (T.G2 mixed)=T.graphTwo mixed x y := by + cases mixed <;> simp [G2,graphTwo] +@[simp] lemma eval_G3 (mixed : Bool) (x y : ℂ) : + MvPolynomial.eval ![x,y] (T.G3 mixed)=T.graphThree mixed x y := by + cases mixed <;> simp only [G3,graphThree,Bool.false_eq_true,↓reduceIte,map_sub,map_mul,eval_X,eval_C,map_add,Matrix.cons_val_zero,Matrix.cons_val_one]; ring + +lemma G1_irreducible (mixed : Bool) : Irreducible (G1 mixed) := by + cases mixed + · convert determinant_graph_irreducible 0 1 (-1) 0 (by norm_num) (by norm_num) using 1; + simp [G1]; ring + · convert determinant_graph_irreducible 1 0 0 (-1) (by norm_num) (by norm_num) using 1; + simp [G1]; ring + +lemma G2_irreducible (mixed : Bool) : Irreducible (T.G2 mixed) := by + cases mixed + · convert determinant_graph_irreducible 0 1 (-T.a^2) 0 + (by simpa using pow_ne_zero 2 T.a_ne_zero) (by norm_num) using 1; + simp [G2]; ring + · convert determinant_graph_irreducible 1 0 0 (-T.a^2) + (by simpa using pow_ne_zero 2 T.a_ne_zero) (by norm_num) using 1; + simp [G2]; ring + +lemma G3_irreducible (mixed : Bool) : Irreducible (T.G3 mixed) := by + have hd := T.determinant + cases mixed + · have hh : T.c*(-T.b)-(1-T.s)*(-T.s) ≠ 0 := by + have : T.c*(-T.b)-(1-T.s)*(-T.s)=1 := by linear_combination hd + rw [this]; norm_num + convert determinant_graph_irreducible T.c (1-T.s) (-T.s) (-T.b) hh + (Or.inl T.c_ne_zero) using 1; simp only [G3,Bool.false_eq_true,↓reduceIte,map_neg]; ring + · have hh : (1-T.s)*(-T.s)-T.c*(-T.b) ≠ 0 := by + have : (1-T.s)*(-T.s)-T.c*(-T.b)= -1 := by linear_combination -hd + rw [this]; norm_num + convert determinant_graph_irreducible (1-T.s) T.c (-T.b) (-T.s) hh + (Or.inr T.c_ne_zero) using 1; simp only [G3,↓reduceIte,map_neg]; ring + +lemma a_square_ne_one : T.a^2 ≠ 1 := by + intro ha + have ht := T.relative_trace + rw [ha] at ht + have hh : (Real.sqrt 2 : ℂ)*T.a= -1 := by linear_combination ht + have hs := congrArg (fun z : ℂ ↦ z^2) hh + rw [mul_pow,sqrt_two_square,ha] at hs + norm_num at hs + +lemma G1_G2_relPrime (mixed : Bool) : IsRelPrime (G1 mixed) (T.G2 mixed) := by + apply (G1_irreducible mixed).isRelPrime_iff_not_dvd.mpr + rintro ⟨p,hp⟩ + have he := congrArg (MvPolynomial.eval ![(1:ℂ),1]) hp + simp only [map_mul,eval_G1,eval_G2] at he + have hz : graphOne mixed 1 1=0 := by cases mixed <;> norm_num [graphOne] + have hj : T.graphTwo mixed 1 1=1-T.a^2 := by cases mixed <;> norm_num [graphTwo] + rw [hz,hj,zero_mul] at he + exact T.a_square_ne_one (sub_eq_zero.mp he).symm + +lemma G1_G3_relPrime (mixed : Bool) : IsRelPrime (G1 mixed) (T.G3 mixed) := by + cases mixed + · apply (G1_irreducible false).isRelPrime_iff_not_dvd.mpr + rintro ⟨p,hp⟩ + have he := congrArg (MvPolynomial.eval ![(0:ℂ),0]) hp + simp [graphOne,graphThree] at he + exact T.b_ne_zero he + · apply IsRelPrime.symm + apply (T.G3_irreducible true).isRelPrime_iff_not_dvd.mpr + rintro ⟨p,hp⟩ + have he := congrArg (MvPolynomial.eval ![(0:ℂ),T.s/T.c]) hp + simp [graphOne,graphThree,T.c_ne_zero] at he + +lemma G2_G3_relPrime (mixed : Bool) : IsRelPrime (T.G2 mixed) (T.G3 mixed) := by + cases mixed + · apply (T.G2_irreducible false).isRelPrime_iff_not_dvd.mpr + rintro ⟨p,hp⟩ + have he := congrArg (MvPolynomial.eval ![(0:ℂ),0]) hp + simp [graphTwo,graphThree] at he + exact T.b_ne_zero he + · apply IsRelPrime.symm + apply (T.G3_irreducible true).isRelPrime_iff_not_dvd.mpr + rintro ⟨p,hp⟩ + have he := congrArg (MvPolynomial.eval ![(0:ℂ),T.s/T.c]) hp + simp [graphTwo,graphThree,T.c_ne_zero] at he + exact T.a_ne_zero he + +lemma graphProduct_squarefree (mixed : Bool) : Squarefree (G1 mixed*T.G2 mixed*T.G3 mixed) := by + apply squarefree_mul_iff.mpr + refine ⟨?_,squarefree_mul_iff.mpr ⟨T.G1_G2_relPrime mixed, + (G1_irreducible mixed).squarefree,(T.G2_irreducible mixed).squarefree⟩, + (T.G3_irreducible mixed).squarefree⟩ + exact (T.G1_G3_relPrime mixed).mul_left (T.G2_G3_relPrime mixed) + +lemma graphProduct_dvd_of_eval_zero (mixed : Bool) (p : BPoly) + (h : ∀ x y : ℂ, graphOne mixed x y*T.graphTwo mixed x y*T.graphThree mixed x y=0 → + MvPolynomial.eval ![x,y] p=0) : G1 mixed*T.G2 mixed*T.G3 mixed ∣ p := by + let J : Ideal BPoly := Ideal.span {G1 mixed*T.G2 mixed*T.G3 mixed} + have hJ : J.IsRadical := isRadical_iff_span_singleton.mp + (T.graphProduct_squarefree mixed).isRadical + apply Ideal.mem_span_singleton.mp + change p ∈ J + rw [← hJ.radical,← MvPolynomial.vanishingIdeal_zeroLocus_eq_radical (K := ℂ)] + rw [MvPolynomial.mem_vanishingIdeal_iff] + intro z hz + rw [MvPolynomial.zeroLocus_span] at hz + have he := hz _ (Set.mem_singleton _) + have hz' : z=![z 0,z 1] := by ext i; fin_cases i <;> rfl + rw [hz'] at he ⊢ + simpa only [aeval_eq_eval] using h (z 0) (z 1) (by simpa only [map_mul,aeval_eq_eval, + eval_G1,eval_G2,eval_G3] using he) +end GraphScalars +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix + +noncomputable def source_a : ℂ := Complex.exp (Complex.I * (Real.pi : ℂ) / 3) +noncomputable def source_s : ℂ := + 1 / 2 - Complex.I * (1 + 2 * (Real.sqrt 2 : ℂ)) / (2 * (Real.sqrt 3 : ℂ)) +noncomputable def source_A : Matrix (Fin 2) (Fin 2) ℂ := !![source_a, 0; 0, source_a⁻¹] +noncomputable def source_B : Matrix (Fin 2) (Fin 2) ℂ := + !![source_s, 1; (Real.sqrt 2 : ℂ) / 3, 1 - source_s] + +lemma source_a_eq : source_a = 1 / 2 + (Real.sqrt 3 : ℂ) / 2 * Complex.I := by + unfold source_a + rw [show Complex.I * (Real.pi : ℂ) / 3 = ((Real.pi / 3 : ℝ) : ℂ) * Complex.I by + push_cast; ring, Complex.exp_mul_I] + rw [← Complex.ofReal_cos, ← Complex.ofReal_sin, Real.cos_pi_div_three, + Real.sin_pi_div_three] + push_cast + ring + +lemma sqrt_two_sq_complex : (Real.sqrt 2 : ℂ) ^ 2 = 2 := by + norm_cast + exact Real.sq_sqrt (by norm_num) + +lemma sqrt_three_sq_complex : (Real.sqrt 3 : ℂ) ^ 2 = 3 := by + norm_cast + exact Real.sq_sqrt (by norm_num) + +lemma sqrt_three_ne_zero_complex : (Real.sqrt 3 : ℂ) ≠ 0 := by + exact_mod_cast (Real.sqrt_ne_zero'.mpr (by norm_num : (0 : ℝ) < 3)) + +lemma source_a_inv_eq : source_a⁻¹ = 1 / 2 - (Real.sqrt 3 : ℂ) / 2 * Complex.I := by + apply inv_eq_of_mul_eq_one_right + rw [source_a_eq] + calc + (1 / 2 + (Real.sqrt 3 : ℂ) / 2 * Complex.I) * + (1 / 2 - (Real.sqrt 3 : ℂ) / 2 * Complex.I) = + 1 / 4 - (Real.sqrt 3 : ℂ) ^ 2 * Complex.I ^ 2 / 4 := by ring + _ = 1 := by rw [sqrt_three_sq_complex, Complex.I_sq]; norm_num + +lemma source_a_add_inv : source_a + source_a⁻¹ = 1 := by + rw [source_a_inv_eq, source_a_eq] + ring + +lemma source_a_ne_zero : source_a ≠ 0 := Complex.exp_ne_zero _ + +lemma source_a_mul_inv : source_a * source_a⁻¹ = 1 := mul_inv_cancel₀ source_a_ne_zero + +lemma source_s_mul_complement : source_s * (1 - source_s) = + 1 + (Real.sqrt 2 : ℂ) / 3 := by + unfold source_s + field_simp + ring_nf + rw [sqrt_three_sq_complex, sqrt_two_sq_complex, Complex.I_sq] + ring + +open Polynomial +noncomputable section + +lemma source_a_square : source_a ^ 2 - source_a + 1 = 0 := by + have h := congrArg (fun z : ℂ ↦ source_a * z) source_a_add_inv + rw [mul_add, source_a_mul_inv] at h + linear_combination h + +lemma source_a_cube : source_a ^ 3 = -1 := by + linear_combination (source_a + 1) * source_a_square + +lemma source_a_twentyfour : source_a ^ 24 = 1 := by + rw [show (24 : ℕ) = 3 * 8 by norm_num, pow_mul, source_a_cube] + norm_num + +end +end QuadricCounterexample + +namespace QuadricCounterexample +noncomputable section + +lemma source_graph_trace : source_s+source_a^2*(1-source_s)+ + (Real.sqrt 2 : ℂ)*source_a=0 := by + have hh : source_a⁻¹*source_s+source_a*(1-source_s)= -(Real.sqrt 2 : ℂ) := by + rw [source_a_inv_eq,source_a_eq] + unfold source_s + field_simp + ring_nf + rw [Complex.I_sq] + ring + have ha := source_a_mul_inv + linear_combination source_a*hh-source_s*ha + +def sourceGraphScalars : GraphScalars where + a := source_a + s := source_s + b := 1 + c := (Real.sqrt 2 : ℂ)/3 + a_cube := source_a_cube + determinant := by simpa only [one_mul] using source_s_mul_complement + relative_trace := source_graph_trace + b_ne_zero := one_ne_zero + c_ne_zero := div_ne_zero (by exact_mod_cast Real.sqrt_ne_zero'.mpr (by norm_num : (0:ℝ)<2)) + (by norm_num) + +namespace GraphScalars +variable (T : GraphScalars) + +def swapped : GraphScalars where + a := T.a⁻¹ + s := 1-T.s + b := T.c + c := T.b + a_cube := by rw [inv_pow,T.a_cube]; norm_num + determinant := by have h:=T.determinant; linear_combination h + relative_trace := by + have h:=T.relative_trace + field_simp [T.a_ne_zero] + linear_combination h + b_ne_zero := T.c_ne_zero + c_ne_zero := T.b_ne_zero + +@[simp] lemma swapped_swapped : T.swapped.swapped=T := by + cases T + simp [swapped] + +end GraphScalars +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix MvPolynomial +noncomputable section + +def affineRepresentative {R : Type u1} [Zero R] [One R] (i : Fin 2) (z : R) : Fin 2 → R := + if i=0 then ![1,z] else ![z,1] + +@[simp] lemma affineRepresentative_index {R : Type u2} [Zero R] [One R] + (i : Fin 2) (z : R) : affineRepresentative i z i=1 := by + fin_cases i <;> simp [affineRepresentative] + +lemma affineRepresentative_change (i j : Fin 2) {z : ℂ} (h : i=j ∨ z ≠ 0) : + affineRepresentative i z = scalarFactor i j z • + affineRepresentative j (scalarCoordinateChange i j z) := by + rcases h with rfl | hz + · simp [scalarFactor,scalarCoordinateChange] + · fin_cases i <;> fin_cases j <;> ext k <;> fin_cases k <;> + simp [affineRepresentative,scalarFactor,scalarCoordinateChange,hz] + +def matrixGraphValue (M : TwoMatrix) (i : StandardChart) (z : BaseCoordinates) : ℂ := + let X := affineRepresentative i.1 z.1 + let Y := affineRepresentative i.2 z.2 + Y 0*(M 1 0*X 0+M 1 1*X 1)-Y 1*(M 0 0*X 0+M 0 1*X 1) + +def matrixGraphPolynomial (M : TwoMatrix) (i : StandardChart) : BasePolynomial := + let x := affineRepresentative i.1 (X 0 : BasePolynomial) + let y := affineRepresentative i.2 (X 1 : BasePolynomial) + y 0*(C (M 1 0)*x 0+C (M 1 1)*x 1)-y 1*(C (M 0 0)*x 0+C (M 0 1)*x 1) + +@[simp] lemma baseEval_matrixGraphPolynomial (M : TwoMatrix) (i : StandardChart) + (z : BaseCoordinates) : baseEval (matrixGraphPolynomial M i) z=matrixGraphValue M i z := by + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j <;> + simp [baseEval,matrixGraphPolynomial,matrixGraphValue,affineRepresentative] + +lemma matrixGraphValue_change (M : TwoMatrix) (i j : StandardChart) (z : BaseCoordinates) + (hz : z ∈ coordinateOverlap i j) : + matrixGraphValue M i z=firstFactor i j z*secondFactor i j z* + matrixGraphValue M j (coordinateChange i j z) := by + have hi := ((coordinateOverlap_iff i j z).mp hz).1 + have hj := ((coordinateOverlap_iff i j z).mp hz).2 + have hx := affineRepresentative_change i.1 j.1 hi + have hy := affineRepresentative_change i.2 j.2 hj + unfold matrixGraphValue + rw [hx,hy] + simp only [Pi.smul_apply,smul_eq_mul,firstFactor,secondFactor,coordinateChange] + ring + +def matrixBranchDenominator (M : TwoMatrix) (i : StandardChart) (z : BaseCoordinates) : ℂ := + M i.2 0*affineRepresentative i.1 z.1 0+M i.2 1*affineRepresentative i.1 z.1 1 + +lemma matrixGraphValue_zero_iff (M : TwoMatrix) (i : StandardChart) (z : BaseCoordinates) : + matrixGraphValue M i z=0 ↔ M *ᵥ affineRepresentative i.1 z.1= + matrixBranchDenominator M i z • affineRepresentative i.2 z.2 := by + constructor + · intro h + ext k + fin_cases k <;> rcases i with ⟨i,j⟩ <;> fin_cases j <;> + simp only [matrixGraphValue,affineRepresentative,↓reduceIte,Fin.isValue,Fin.zero_eta, + Fin.mk_one,one_ne_zero,mulVec,Fin.sum_univ_two,dotProduct, + Pi.smul_apply,smul_eq_mul,Matrix.cons_val_zero,Matrix.cons_val_one, + one_mul,matrixBranchDenominator,mul_one] at h ⊢ <;> first | linear_combination h | linear_combination -h + · intro h + have h0 := congrFun h 0 + have h1 := congrFun h 1 + simp only [mulVec,Fin.sum_univ_two,dotProduct,Pi.smul_apply,smul_eq_mul] at h0 h1 + dsimp only [matrixGraphValue] + rw [h0,h1] + ring + +lemma matrixBranchDenominator_change (M : TwoMatrix) (i j : StandardChart) + (z : BaseCoordinates) (hz : z ∈ coordinateOverlap i j) (h : matrixGraphValue M i z=0) : + matrixBranchDenominator M i z*secondFactor i j z= + firstFactor i j z*matrixBranchDenominator M j (coordinateChange i j z) := by + have hv := (matrixGraphValue_zero_iff M i z).mp h + have hx := affineRepresentative_change i.1 j.1 (((coordinateOverlap_iff i j z).mp hz).1) + have hy := affineRepresentative_change i.2 j.2 (((coordinateOverlap_iff i j z).mp hz).2) + rw [hx,hy,mulVec_smul] at hv + have hj := congrFun hv j.2 + simp only [Pi.smul_apply,smul_eq_mul,affineRepresentative_index,mul_one, + mulVec,dotProduct,Fin.sum_univ_two] at hj + exact hj.symm + +namespace GraphScalars +variable (T : GraphScalars) + +def matrices (k : Fin 3) : TwoMatrix := + ![(1 : TwoMatrix),!![T.a,0;0,T.a⁻¹],!![T.s,T.b;T.c,1-T.s]] k + +def chartScalars (i : StandardChart) : GraphScalars := if i.2=0 then T.swapped else T + +def mixedChart (i : StandardChart) : Bool := decide (i.1 ≠ i.2) + +def chartProduct (i : StandardChart) : BasePolynomial := + G1 (mixedChart i)*(T.chartScalars i).G2 (mixedChart i)*(T.chartScalars i).G3 (mixedChart i) + +def divisorPolynomial (i : StandardChart) : BasePolynomial := + matrixGraphPolynomial (T.matrices 0) i*matrixGraphPolynomial (T.matrices 1) i* + matrixGraphPolynomial (T.matrices 2) i + +def chartUnit (i : StandardChart) : ℂ := if i.2=0 then -T.a else T.a⁻¹ + +lemma chartUnit_ne_zero (i : StandardChart) : T.chartUnit i ≠ 0 := by + unfold chartUnit + split_ifs <;> simpa using T.a_ne_zero + +lemma divisorPolynomial_eq (i : StandardChart) : + T.divisorPolynomial i=C (T.chartUnit i)*T.chartProduct i := by + apply MvPolynomial.funext + intro z + have hz : z=![z 0,z 1] := by ext k; fin_cases k <;> rfl + rw [hz] + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j <;> + simp [divisorPolynomial,matrixGraphPolynomial,affineRepresentative,matrices, + chartUnit,chartProduct,chartScalars,mixedChart,swapped,G1,G2,G3] <;> + field_simp [T.a_ne_zero] <;> ring + +lemma divisorPolynomial_reduced (i : StandardChart) : Squarefree (T.divisorPolynomial i) := by + have hu : IsUnit (C (T.chartUnit i) : BasePolynomial) := + (isUnit_iff_ne_zero.mpr (T.chartUnit_ne_zero i)).map C + rw [T.divisorPolynomial_eq] + apply Squarefree.squarefree_of_dvd ?_ ((T.chartScalars i).graphProduct_squarefree (mixedChart i)) + change C (T.chartUnit i)*T.chartProduct i ∣ T.chartProduct i + exact hu.mul_left_dvd.mpr (dvd_refl _) + +lemma divisorPolynomial_nonzero (i : StandardChart) : T.divisorPolynomial i ≠ 0 := + (T.divisorPolynomial_reduced i).ne_zero + +lemma divisorPolynomial_change (i j : StandardChart) (z : BaseCoordinates) + (hz : z ∈ coordinateOverlap i j) : + baseEval (T.divisorPolynomial i) z = (firstFactor i j z*secondFactor i j z)^3* + baseEval (T.divisorPolynomial j) (coordinateChange i j z) := by + simp only [divisorPolynomial,baseEval_mul,baseEval_matrixGraphPolynomial] + rw [matrixGraphValue_change _ i j z hz,matrixGraphValue_change (T.matrices 1) i j z hz, + matrixGraphValue_change (T.matrices 2) i j z hz] + ring + +end GraphScalars +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix MvPolynomial +noncomputable section +namespace GraphScalars +variable (T : GraphScalars) + +def branchGraph (k : Fin 3) (mixed : Bool) (x y : ℂ) : ℂ := + ![graphOne mixed x y,T.graphTwo mixed x y,T.graphThree mixed x y] k + +def branchDenominator (k : Fin 3) (mixed : Bool) (x : ℂ) : ℂ := + ![if mixed then x else 1, + if mixed then T.a⁻¹*x else T.a⁻¹, + if mixed then (1-T.s)*x+T.c else T.c*x+1-T.s] k + +lemma liftBeta_branch_one (mixed : Bool) (x y : ℂ) + (h : graphOne mixed x y=0) : + T.liftBeta mixed x y*(T.branchDenominator 0 mixed x)^24=1 := by + rw [T.liftBeta_one h] + cases mixed + · simp [branchDenominator] + · have he : x*y=1 := sub_eq_zero.mp h + change y^24*x^24=1 + rw [← mul_pow,mul_comm y x,he,one_pow] + +lemma liftBeta_branch_two (mixed : Bool) (x y : ℂ) + (h : T.graphTwo mixed x y=0) : + T.liftBeta mixed x y*(T.branchDenominator 1 mixed x)^24=1 := by + rw [T.liftBeta_two h] + cases mixed + · simp [branchDenominator,inv_pow,T.a_twentyfour] + · have he : x*y=T.a^2 := sub_eq_zero.mp h + change y^24*(T.a⁻¹*x)^24=1 + calc + y^24*(T.a⁻¹*x)^24 = (T.a⁻¹)^24*(x*y)^24 := by ring + _ = 1 := by + rw [he,inv_pow,← pow_mul,mul_comm 2 24,pow_mul,T.a_twentyfour] + norm_num + +lemma liftBeta_branch_three (mixed : Bool) (x y : ℂ) + (h : T.graphThree mixed x y=0) : + T.liftBeta mixed x y*(T.branchDenominator 2 mixed x)^24=1 := by + rw [T.liftBeta_three h,← mul_pow] + cases mixed + · have he : T.L.eval y*(T.c*x+1-T.s)=1 := by + simp only [graphThree,Bool.false_eq_true,↓reduceIte] at h + simp only [L,Polynomial.eval_sub,Polynomial.eval_C,Polynomial.eval_mul,Polynomial.eval_X] + linear_combination -T.c*h+T.determinant + change (T.L.eval y*(T.c*x+1-T.s))^24=1 + rw [he,one_pow] + · have he : T.J.eval y*((1-T.s)*x+T.c)= -1 := by + simp only [graphThree,↓reduceIte] at h + simp only [J,Polynomial.eval_sub,Polynomial.eval_C,Polynomial.eval_mul,Polynomial.eval_X] + linear_combination -(1-T.s)*h-T.determinant + change (T.J.eval y*((1-T.s)*x+T.c))^24=1 + rw [he] + norm_num + +lemma liftBeta_branch (k : Fin 3) (mixed : Bool) (x y : ℂ) + (h : T.branchGraph k mixed x y=0) : + T.liftBeta mixed x y*(T.branchDenominator k mixed x)^24=1 := by + fin_cases k + · exact T.liftBeta_branch_one mixed x y h + · exact T.liftBeta_branch_two mixed x y h + · exact T.liftBeta_branch_three mixed x y h + +@[simp] lemma baseEval_pow (p : BasePolynomial) (n : ℕ) (z : BaseCoordinates) : + baseEval (p^n) z=baseEval p z^n := map_pow (MvPolynomial.eval _) _ _ + +def liftPolynomial (mixed : Bool) : BasePolynomial := + (if mixed then X 1^24 else 1)+G1 mixed*T.G2 mixed* + (Polynomial.aeval (X 1) (T.betaPolynomial mixed))^2* + (Polynomial.aeval (X 1) (if mixed then T.mixedQuotient else T.sameQuotient)) + +lemma eval_aeval_snd (p : Polynomial ℂ) (z : BaseCoordinates) : + baseEval (Polynomial.aeval (X 1 : BasePolynomial) p) z=p.eval z.2 := by + induction p using Polynomial.induction_on' with + | add p q hp hq => simp only [map_add,baseEval,Polynomial.eval_add] at hp hq ⊢; rw [hp,hq] + | monomial n a => simp [Polynomial.aeval_monomial,baseEval] + +lemma eval_liftPolynomial (mixed : Bool) (z : BaseCoordinates) : + baseEval (T.liftPolynomial mixed) z=T.liftBeta mixed z.1 z.2 := by + cases mixed <;> + simp only [liftPolynomial,liftBeta,Bool.false_eq_true,↓reduceIte,baseEval_add,baseEval_mul, + baseEval_pow,eval_aeval_snd] <;> simp [baseEval] + +def chartLift (i : StandardChart) : BasePolynomial := + (T.chartScalars i).liftPolynomial (mixedChart i) + +lemma eval_chartLift (i : StandardChart) (z : BaseCoordinates) : + baseEval (T.chartLift i) z=(T.chartScalars i).liftBeta (mixedChart i) z.1 z.2 := + (T.chartScalars i).eval_liftPolynomial _ _ + +lemma matrixGraphValue_eq_branch (k : Fin 3) (i : StandardChart) (z : BaseCoordinates) : + matrixGraphValue (T.matrices k) i z = + (if i.2=0 then -1 else 1)* + (if k=1 then (T.chartScalars i).a⁻¹ else 1)* + (T.chartScalars i).branchGraph k (mixedChart i) z.1 z.2 := by + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j <;> fin_cases k <;> + simp [matrixGraphValue,affineRepresentative,matrices,chartScalars,swapped, + mixedChart,branchGraph,graphOne,graphTwo,graphThree] <;> + field_simp [T.a_ne_zero] <;> first | (solve | ring) | (left; ring) + +lemma matrixBranchDenominator_eq (k : Fin 3) (i : StandardChart) (z : BaseCoordinates) : + matrixBranchDenominator (T.matrices k) i z= + (T.chartScalars i).branchDenominator k (mixedChart i) z.1 := by + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j <;> fin_cases k <;> + simp [matrixBranchDenominator,affineRepresentative,matrices,chartScalars, + swapped,mixedChart,branchDenominator] <;> ring + +lemma chartLift_branch (k : Fin 3) (i : StandardChart) (z : BaseCoordinates) + (h : matrixGraphValue (T.matrices k) i z=0) : + baseEval (T.chartLift i) z*(matrixBranchDenominator (T.matrices k) i z)^24=1 := by + rw [T.matrixGraphValue_eq_branch] at h + have hn : (if i.2=0 then (-1 : ℂ) else 1)≠0 := by split_ifs <;> norm_num + have hn' : (if k=1 then (T.chartScalars i).a⁻¹ else 1)≠0 := by + split_ifs + · exact inv_ne_zero (T.chartScalars i).a_ne_zero + · exact one_ne_zero + have hh := (mul_eq_zero.mp h).resolve_left (mul_ne_zero hn hn') + rw [T.eval_chartLift,T.matrixBranchDenominator_eq] + exact (T.chartScalars i).liftBeta_branch _ _ _ _ hh + +lemma divisor_zero_branch (i : StandardChart) (z : BaseCoordinates) + (h : baseEval (T.divisorPolynomial i) z=0) : + ∃ k : Fin 3, matrixGraphValue (T.matrices k) i z=0 := by + simp only [divisorPolynomial,baseEval_mul,baseEval_matrixGraphPolynomial,mul_eq_zero] at h + rcases h with (h|h)|h + · exact ⟨0,h⟩ + · exact ⟨1,h⟩ + · exact ⟨2,h⟩ + +lemma chartLift_unit (i : StandardChart) (z : BaseCoordinates) + (h : baseEval (T.divisorPolynomial i) z=0) : baseEval (T.chartLift i) z ≠ 0 := by + obtain ⟨k,hk⟩ := T.divisor_zero_branch i z h + exact left_ne_zero_of_mul_eq_one (T.chartLift_branch k i z hk) + +lemma chartLift_change (i j : StandardChart) (z : BaseCoordinates) + (hz : z ∈ coordinateOverlap i j) (h : baseEval (T.divisorPolynomial i) z=0) : + secondFactor i j z^24*baseEval (T.chartLift j) (coordinateChange i j z)= + baseEval (T.chartLift i) z*firstFactor i j z^24 := by + obtain ⟨k,hk⟩ := T.divisor_zero_branch i z h + have hg := matrixGraphValue_change (T.matrices k) i j z hz + have hs := firstFactor_ne_zero hz + have ht := secondFactor_ne_zero hz + have hkj : matrixGraphValue (T.matrices k) j (coordinateChange i j z)=0 := by + rw [hk] at hg + exact (mul_eq_zero.mp hg.symm).resolve_left (mul_ne_zero hs ht) + have hi := T.chartLift_branch k i z hk + have hj := T.chartLift_branch k j (coordinateChange i j z) hkj + have hd := matrixBranchDenominator_change (T.matrices k) i j z hz hk + have hd' : matrixBranchDenominator (T.matrices k) i z ≠ 0 := by + exact fun he ↦ by simp [he] at hi + have hdp := congrArg (fun a : ℂ ↦ a^24) hd + simp only [mul_pow] at hdp + apply mul_right_cancel₀ (pow_ne_zero 24 hd') + calc + _ = baseEval (T.chartLift j) (coordinateChange i j z)* + (matrixBranchDenominator (T.matrices k) i z^24*secondFactor i j z^24) := by ring + _ = firstFactor i j z^24 := by rw [hdp]; linear_combination firstFactor i j z^24*hj + _ = _ := by linear_combination -firstFactor i j z^24*hi + +def equalizerData : EqualizerData where + divisor := T.divisorPolynomial + lift := T.chartLift + reduced := T.divisorPolynomial_reduced + nonzero := T.divisorPolynomial_nonzero + divisor_change := T.divisorPolynomial_change + lift_change := T.chartLift_change + lift_unit := T.chartLift_unit + +end GraphScalars + +def sourceBundle : AlgebraicRankTwoBundle := sourceGraphScalars.equalizerData.bundle + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/HomogeneousClassification.lean b/lean/OAI/Geometry/QuadricBundles/HomogeneousClassification.lean new file mode 100644 index 0000000000000000000000000000000000000000..120108d879c6ea807d25d7381057335db4feeff2 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/HomogeneousClassification.lean @@ -0,0 +1,368 @@ +import OAI.Geometry.QuadricBundles.MatrixDynamics + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric + +lemma invariant_mul_zpow {u : ℂ → ℝ} {a : ℂ} (ha : a ≠ 0) + (hu : ∀ z : ℂ, z ≠ 0 → u (a * z) = u z) (n : ℤ) (z : ℂ) (hz : z ≠ 0) : + u (a ^ n * z) = u z := by + induction n using Int.induction_on with + | zero => simp + | succ k ih => + rw [zpow_add₀ ha, zpow_one, mul_comm (a ^ (k : ℤ)) a, mul_assoc, + hu _ (mul_ne_zero (zpow_ne_zero _ ha) hz), ih] + | pred k ih => + have hh := hu (a ^ (-(k : ℤ) - 1) * z) (mul_ne_zero (zpow_ne_zero _ ha) hz) + have he : a * (a ^ (-(k : ℤ) - 1) * z) = a ^ (-(k : ℤ)) * z := by + calc + a * (a ^ (-(k : ℤ) - 1) * z) = + (a ^ (1 : ℤ) * a ^ (-(k : ℤ) - 1)) * z := by rw [zpow_one, mul_assoc] + _ = a ^ (1 + (-(k : ℤ) - 1)) * z := by rw [zpow_add₀ ha] + _ = a ^ (-(k : ℤ)) * z := by congr 2; omega + rw [he, ih] at hh + exact hh.symm + +lemma exists_rescale_mem_annulus {a : ℝ} (ha : 1 < a) {z : ℂ} (hz : z ≠ 0) : + ∃ n : ℤ, 1 ≤ ‖(a : ℂ) ^ n * z‖ ∧ ‖(a : ℂ) ^ n * z‖ ≤ a := by + have ha0 : 0 < a := lt_trans zero_lt_one ha + obtain ⟨k, hk1, hk2⟩ := exists_mem_Ico_zpow (norm_pos_iff.mpr hz) ha + refine ⟨-k, ?_, ?_⟩ + all_goals rw [norm_mul, norm_zpow, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos ha0, zpow_neg, inv_mul_eq_div] + · exact (le_div_iff₀ (zpow_pos ha0 k)).mpr (by simpa using hk1) + · apply (div_le_iff₀ (zpow_pos ha0 k)).mpr + exact hk2.le.trans_eq (by rw [zpow_add₀ ha0.ne', zpow_one, mul_comm]) + +lemma complex_punctured_preconnected : IsPreconnected ({0}ᶜ : Set ℂ) := by + apply (isConnected_compl_singleton_of_one_lt_rank (E := ℂ) ?_ 0).isPreconnected + rw [← Module.finrank_eq_rank ℝ ℂ, Complex.finrank_real_complex] + norm_num + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric + +open MeasureTheory + +theorem LocalDiskSubmeanOn.eq_const_of_dilation {u : ℂ → ℝ} {a : ℝ} + (ha : 1 < a) (hu : LocalDiskSubmeanOn ({0}ᶜ : Set ℂ) u) + (hinv : ∀ z : ℂ, z ≠ 0 → u ((a : ℂ) * z) = u z) : + ∃ c : ℝ, ∀ z : ℂ, z ≠ 0 → u z = c := by + let K : Set ℂ := {z | 1 ≤ ‖z‖ ∧ ‖z‖ ≤ a} + have hkclosed : IsClosed K := + (isClosed_le continuous_const continuous_norm).inter + (isClosed_le continuous_norm continuous_const) + have hkcompact : IsCompact K := (isCompact_closedBall (0 : ℂ) a).of_isClosed_subset + hkclosed (fun z hz ↦ by simpa [mem_closedBall, dist_zero_right] using hz.2) + have hk0 : K ⊆ ({0}ᶜ : Set ℂ) := by + intro z hz + simp only [mem_compl_iff, mem_singleton_iff] + intro he + simp only [K, he, norm_zero, Set.mem_ofPred_eq] at hz + linarith [hz.1] + have hkne : K.Nonempty := ⟨1, by simpa [K] using ha.le⟩ + obtain ⟨x, hx, hmax⟩ := (hu.1.mono hk0).exists_isMaxOn hkne hkcompact + have hnonzero : (a : ℂ) ≠ 0 := by exact_mod_cast (lt_trans zero_lt_one ha).ne' + have hmaxall : ∀ z ∈ ({0}ᶜ : Set ℂ), u z ≤ u x := by + intro z hz + have hz0 : z ≠ 0 := hz + obtain ⟨k, hk⟩ := exists_rescale_mem_annulus ha hz0 + have hk' : (a : ℂ)^k * z ∈ K := hk + rw [← invariant_mul_zpow hnonzero hinv k z hz0] + exact hmax hk' + exact ⟨u x, fun z hz ↦ hu.eq_const_of_max complex_punctured_preconnected (hk0 hx) hmaxall z hz⟩ + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Matrix + +structure HomogeneousLocalPshMetric24 (ψ : (Fin 2 → ℂ) → ℝ) : Prop where + nonneg : ∀ v, 0 ≤ ψ v + homogeneity : ∀ (c : ℂ) v, ψ (c • v) = ‖c‖ ^ 48 * ψ v + upperSemicontinuous : UpperSemicontinuousOn ψ ({0}ᶜ : Set (Fin 2 → ℂ)) + disk : ∀ (U : Set ℂ), IsOpen U → ∀ (f : ℂ → Fin 2 → ℂ) (t : ℂ → ℂ), + AnalyticOnNhd ℂ f U → AnalyticOnNhd ℂ t U → (∀ z ∈ U, f z ≠ 0) → + LocalDiskSubmeanOn U (fun z ↦ ‖t z‖ ^ 2 * ψ (f z)) + +lemma HomogeneousLocalPshMetric24.zero {ψ : (Fin 2 → ℂ) → ℝ} + (hψ : HomogeneousLocalPshMetric24 ψ) : ψ 0 = 0 := by + simpa using hψ.homogeneity 0 0 + +lemma HomogeneousLocalPshMetric24.normalized_subharmonic {ψ : (Fin 2 → ℂ) → ℝ} + (hψ : HomogeneousLocalPshMetric24 ψ) : + LocalDiskSubmeanOn ({0}ᶜ : Set ℂ) (fun z ↦ ψ ![z,1] / ‖z‖ ^ 24) := by + have hf : AnalyticOnNhd ℂ (fun z : ℂ ↦ ![z,1]) ({0}ᶜ : Set ℂ) := by + apply analyticOnNhd_pi_iff.mpr + intro i + fin_cases i + · exact analyticOnNhd_id + · exact analyticOnNhd_const + have ht : AnalyticOnNhd ℂ (fun z : ℂ ↦ z ^ (-12 : ℤ)) ({0}ᶜ : Set ℂ) := + analyticOnNhd_id.zpow (fun z hz ↦ hz) + have hn : ∀ z ∈ ({0}ᶜ : Set ℂ), (![z,1] : Fin 2 → ℂ) ≠ 0 := by + intro z _ he + have hh := congrFun he 1 + norm_num at hh + have hh := hψ.disk _ isOpen_compl_singleton _ _ hf ht hn + convert hh using 1 + funext z + simp only [_root_.zpow_neg] + norm_num + ring + +theorem HomogeneousLocalPshMetric24.hyperbolic_classification + {ψ : (Fin 2 → ℂ) → ℝ} (hψ : HomogeneousLocalPshMetric24 ψ) + {a : ℝ} (ha : 1 < a) + (hinv : ∀ v, ψ ![(a : ℂ) * v 0, (a : ℂ)⁻¹ * v 1] = ψ v) : + ∃ c : ℝ, 0 ≤ c ∧ ∀ v, ψ v = c * (‖v 0‖ * ‖v 1‖) ^ 24 := by + have ha0 : 0 < a := lt_trans zero_lt_one ha + have haC : (a : ℂ) ≠ 0 := by exact_mod_cast ha0.ne' + have hanorm : ‖(a : ℂ)‖ = a := by + rw [Complex.norm_real, Real.norm_eq_abs, abs_of_pos ha0] + have hpa : 1 < a ^ 48 := one_lt_pow₀ ha (by norm_num) + have he1 : ψ ![1,0] = 0 := by + have hs : ψ ![(a : ℂ),0] = a ^ 48 * ψ ![1,0] := by + have hv : (a : ℂ) • (![1,0] : Fin 2 → ℂ) = ![(a : ℂ),0] := by + ext i + fin_cases i <;> simp + rw [← hv, hψ.homogeneity, hanorm] + have hi := hinv ![1,0] + simp only [Matrix.cons_val_zero, Matrix.cons_val_one, mul_one, + mul_zero] at hi + rw [hs] at hi + nlinarith + have he2 : ψ ![0,1] = 0 := by + have hs : ψ ![0,(a : ℂ)] = a ^ 48 * ψ ![0,1] := by + have hv : (a : ℂ) • (![0,1] : Fin 2 → ℂ) = ![0,(a : ℂ)] := by + ext i + fin_cases i <;> simp + rw [← hv, hψ.homogeneity, hanorm] + have hi := hinv ![0,(a : ℂ)] + simp only [Matrix.cons_val_zero, Matrix.cons_val_one, mul_zero, + inv_mul_cancel₀ haC] at hi + rw [hs] at hi + nlinarith + have hscale (z : ℂ) : ψ ![(a : ℂ)^2*z,1] = a^48 * ψ ![z,1] := by + have hv : (a : ℂ) • ![(a : ℂ)*z,(a : ℂ)⁻¹*1] = ![(a : ℂ)^2*z,1] := by + ext i + fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, pow_two, mul_assoc, haC] + rw [← hv, hψ.homogeneity, hanorm] + exact congrArg (fun r : ℝ ↦ a ^ 48 * r) (hinv ![z,1]) + have hu : ∀ z : ℂ, z ≠ 0 → + ψ ![((a^2 : ℝ) : ℂ)*z,1] / ‖((a^2 : ℝ) : ℂ)*z‖^24 = + ψ ![z,1] / ‖z‖^24 := by + intro z hz + rw [Complex.ofReal_pow, hscale, norm_mul, norm_pow, hanorm, mul_pow, ← pow_mul] + norm_num + field_simp + obtain ⟨c, hc⟩ := hψ.normalized_subharmonic.eq_const_of_dilation + (show 1 < a^2 by nlinarith) hu + have hc0 : 0 ≤ c := by + rw [← hc 1 one_ne_zero] + exact div_nonneg (hψ.nonneg _) (pow_nonneg (norm_nonneg _) _) + refine ⟨c, hc0, ?_⟩ + intro v + by_cases hv1 : v 1 = 0 + · have he : v = v 0 • ![1,0] := by + ext i + fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, hv1] + rw [he, hψ.homogeneity, he1] + simp + by_cases hv0 : v 0 = 0 + · have he : v = v 1 • ![0,1] := by + ext i + fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, hv0] + rw [he, hψ.homogeneity, he2] + simp + have he : v = v 1 • ![v 0 / v 1,1] := by + ext i + fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, hv1, mul_div_cancel₀] + have hh := (div_eq_iff (pow_ne_zero 24 (norm_ne_zero_iff.mpr (div_ne_zero hv0 hv1)))).mp + (hc (v 0 / v 1) (div_ne_zero hv0 hv1)) + calc + ψ v = ‖v 1‖^48 * ψ ![v 0/v 1,1] := by calc + ψ v = ψ (v 1 • ![v 0/v 1,1]) := congrArg ψ he + _ = _ := hψ.homogeneity _ _ + _ = c * (‖v 0‖ * ‖v 1‖)^24 := by + rw [hh, norm_div, div_pow, mul_pow] + field_simp + +lemma HomogeneousLocalPshMetric24.pullback {ψ : (Fin 2 → ℂ) → ℝ} + (hψ : HomogeneousLocalPshMetric24 ψ) (g : GL (Fin 2) ℂ) : + HomogeneousLocalPshMetric24 (fun v ↦ ψ (g • v)) := by + let L : (Fin 2 → ℂ) →L[ℂ] (Fin 2 → ℂ) := + (Matrix.mulVecLin (g : Matrix (Fin 2) (Fin 2) ℂ)).toContinuousLinearMap + have hL (v : Fin 2 → ℂ) : L v = g • v := rfl + have hn (v : Fin 2 → ℂ) (hv : v ≠ 0) : g • v ≠ 0 := by + intro he + have hh := congrArg (fun w : Fin 2 → ℂ ↦ g⁻¹ • w) he + rw [inv_smul_smul, smul_zero] at hh + exact hv hh + refine ⟨fun v ↦ hψ.nonneg _, ?_, ?_, ?_⟩ + · intro c v + rw [smul_comm g c v, hψ.homogeneity] + · exact hψ.upperSemicontinuous.comp L.continuous.continuousOn (fun v hv ↦ hn v hv) + · intro U hU f t hf ht hfn + exact hψ.disk U hU (fun z ↦ g • f z) t + (((L.analyticOnNhd univ).comp hf (mapsTo_univ _ _))) ht + (fun z hz ↦ hn _ (hfn z hz)) + +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix OnePoint + +lemma metric_zero_pair_preserved {φ : (Fin 2 → ℂ) → ℝ} + (hz : ∀ v, φ v = 0 ↔ v 0 = 0 ∨ v 1 = 0) + (g : GL (Fin 2) ℂ) (hinv : ∀ v, φ (g • v) = φ v) : + ∀ x : OnePoint ℂ, x = ∞ ∨ x = (0 : ℂ) → + g • x = ∞ ∨ g • x = (0 : ℂ) := by + intro x hx + rcases hx with rfl | rfl + · have hzero : φ (g • (![1,0] : Fin 2 → ℂ)) = 0 := by + rw [hinv] + exact (hz _).mpr (Or.inr rfl) + have hh := (hz _).mp hzero + simp only [Matrix.GeneralLinearGroup.fin_two_smul, Matrix.cons_val_zero, + Matrix.cons_val_one, mul_one, mul_zero, add_zero] at hh + by_cases h10 : g 1 0 = 0 + · exact Or.inl (by simp [OnePoint.smul_infty_eq_ite, h10]) + · have h00 := hh.resolve_right h10 + exact Or.inr (by simp [OnePoint.smul_infty_eq_ite, h10, h00]) + · have hzero : φ (g • (![0,1] : Fin 2 → ℂ)) = 0 := by + rw [hinv] + exact (hz _).mpr (Or.inl rfl) + have hh := (hz _).mp hzero + simp only [Matrix.GeneralLinearGroup.fin_two_smul, Matrix.cons_val_zero, + Matrix.cons_val_one, mul_one, mul_zero, zero_add] at hh + by_cases h11 : g 1 1 = 0 + · exact Or.inl (by simp [OnePoint.smul_some_eq_ite, h11]) + · have h01 := hh.resolve_right h11 + exact Or.inr (by simp [OnePoint.smul_some_eq_ite, h11, h01]) + +lemma conjugate_pair_contradiction {φ : (Fin 2 → ℂ) → ℝ} + (hz : ∀ v, φ v = 0 ↔ v 0 = 0 ∨ v 1 = 0) + (P g h : GL (Fin 2) ℂ) + (hgi : ∀ v, φ ((P⁻¹ * g * P) • v) = φ v) + (hhi : ∀ v, φ ((P⁻¹ * h * P) • v) = φ v) + (hg3 : ∀ x : OnePoint ℂ, g • (g • (g • x)) = x) + (hh3 : ∀ x : OnePoint ℂ, h • (h • (h • x)) = x) + (hnofix : ∀ x : OnePoint ℂ, ¬ (g • x = x ∧ h • x = x)) : False := by + let g' := P⁻¹ * g * P + let h' := P⁻¹ * h * P + have hgp := metric_zero_pair_preserved hz g' hgi + have hhp := metric_zero_pair_preserved hz h' hhi + have hgcube (x : OnePoint ℂ) : g' • (g' • (g' • x)) = x := by + simp only [g', mul_smul, smul_inv_smul] + rw [hg3, inv_smul_smul] + have hhcube (x : OnePoint ℂ) : h' • (h' • (h' • x)) = x := by + simp only [h', mul_smul, smul_inv_smul] + rw [hh3, inv_smul_smul] + have hgp0 := hgp ∞ (Or.inl rfl) + have hhp0 := hhp ∞ (Or.inl rfl) + have hgf : g' • (∞ : OnePoint ℂ) = ∞ := + fixed_of_period_three_in_pair (hgcube ∞) (Or.inl rfl) hgp0 (hgp _ hgp0) + have hhf : h' • (∞ : OnePoint ℂ) = ∞ := + fixed_of_period_three_in_pair (hhcube ∞) (Or.inl rfl) hhp0 (hhp _ hhp0) + apply hnofix (P • (∞ : OnePoint ℂ)) + constructor + · have he := congrArg (fun x : OnePoint ℂ ↦ P • x) hgf + simpa only [g', mul_smul, smul_inv_smul] using he + · have he := congrArg (fun x : OnePoint ℂ ↦ P • x) hhf + simpa only [h', mul_smul, smul_inv_smul] using he + +lemma local_homogeneous_metric_zero_of_diagonal_product + {ψ : (Fin 2 → ℂ) → ℝ} (hψ : HomogeneousLocalPshMetric24 ψ) + (P g h : GL (Fin 2) ℂ) {a : ℝ} (ha : 1 < a) + (hdiag : ∀ v, P • ![(a : ℂ)*v 0,(a : ℂ)⁻¹*v 1] = g • (h • (P • v))) + (hgi : ∀ v, ψ (g • v) = ψ v) (hhi : ∀ v, ψ (h • v) = ψ v) + (hg3 : ∀ x : OnePoint ℂ, g • (g • (g • x)) = x) + (hh3 : ∀ x : OnePoint ℂ, h • (h • (h • x)) = x) + (hnofix : ∀ x : OnePoint ℂ, ¬ (g • x = x ∧ h • x = x)) : + ∀ v, ψ v = 0 := by + let φ : (Fin 2 → ℂ) → ℝ := fun v ↦ ψ (P • v) + have hφ := hψ.pullback P + obtain ⟨c, _, hc⟩ := hφ.hyperbolic_classification ha (fun v ↦ by + rw [hdiag, hgi, hhi]) + by_cases hcZ : c = 0 + · intro v + have he := hc (P⁻¹ • v) + simpa only [smul_inv_smul, hcZ, zero_mul] using he + have hz : ∀ v, φ v = 0 ↔ v 0 = 0 ∨ v 1 = 0 := by + intro v + change ψ (P • v) = 0 ↔ _ + rw [hc] + simp [hcZ, mul_eq_zero] + apply (conjugate_pair_contradiction hz P g h ?_ ?_ hg3 hh3 hnofix).elim + · intro v + simp only [φ, mul_smul, smul_inv_smul, hgi] + · intro v + simp only [φ, mul_smul, smul_inv_smul, hhi] + +lemma source_expanding_gt_one : 1 < expandingRoot (1 + Real.sqrt 2) := by + apply (hyperbolic_roots ?_).1 + have hn := Real.sqrt_nonneg (2 : ℝ) + have hs := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) + nlinarith + +lemma source_eigenbasis_diagonalizes_inv : + (source_A * source_B) * (source_eigenbasis : Matrix (Fin 2) (Fin 2) ℂ) = + (source_eigenbasis : Matrix (Fin 2) (Fin 2) ℂ) * + diagonal ![(expandingRoot (1 + Real.sqrt 2) : ℂ), + (expandingRoot (1 + Real.sqrt 2) : ℂ)⁻¹] := by + have ht : 2 < 1 + Real.sqrt 2 := by + have hn := Real.sqrt_nonneg (2 : ℝ) + have hs := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) + nlinarith + have hcontract : (contractingRoot (1 + Real.sqrt 2) : ℂ) = + (expandingRoot (1 + Real.sqrt 2) : ℂ)⁻¹ := by + have hh : (expandingRoot (1 + Real.sqrt 2) : ℂ) * + (contractingRoot (1 + Real.sqrt 2) : ℂ) = 1 := by + exact_mod_cast (hyperbolic_roots ht).2.2.2.2 + exact eq_inv_of_mul_eq_one_left (by rwa [mul_comm]) + have hd := hyperbolicBasis_diagonalizes ht + (show (source_A * source_B).trace = ((1 + Real.sqrt 2 : ℝ) : ℂ) by + simpa only [Complex.ofReal_add, Complex.ofReal_one] using source_product_trace) + (show (source_A * source_B).det = 1 by + rw [Matrix.det_mul, source_A_det, source_B_det, one_mul]) + rw [hcontract] at hd + exact hd + +lemma source_eigenbasis_diagonal_action (v : Fin 2 → ℂ) : + source_eigenbasis • ![(expandingRoot (1 + Real.sqrt 2) : ℂ)*v 0, + (expandingRoot (1 + Real.sqrt 2) : ℂ)⁻¹*v 1] = + source_A_gl • (source_B_gl • (source_eigenbasis • v)) := by + let a : ℂ := expandingRoot (1 + Real.sqrt 2) + have hv : ![a*v 0,a⁻¹*v 1] = diagonal ![a,a⁻¹] *ᵥ v := by + ext i + fin_cases i <;> simp [Matrix.mulVec_diagonal] + change (source_eigenbasis : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ ![a*v 0,a⁻¹*v 1] = + source_A *ᵥ (source_B *ᵥ ((source_eigenbasis : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ v)) + rw [hv, mulVec_mulVec, ← source_eigenbasis_diagonalizes_inv, + ← mulVec_mulVec, ← mulVec_mulVec] + +theorem source_invariant_local_homogeneous_metric_zero + {ψ : (Fin 2 → ℂ) → ℝ} (hψ : HomogeneousLocalPshMetric24 ψ) + (hA : ∀ v, ψ (source_A_gl • v) = ψ v) + (hB : ∀ v, ψ (source_B_gl • v) = ψ v) : ∀ v, ψ v = 0 := + local_homogeneous_metric_zero_of_diagonal_product hψ source_eigenbasis source_A_gl + source_B_gl source_expanding_gt_one source_eigenbasis_diagonal_action hA hB + (projective_cube_identity source_A_cube) (projective_cube_identity source_B_cube) + source_no_common_fixed_point + +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/LaurentCech.lean b/lean/OAI/Geometry/QuadricBundles/LaurentCech.lean new file mode 100644 index 0000000000000000000000000000000000000000..20ea3336285943efae509069dc398dea85c72d37 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/LaurentCech.lean @@ -0,0 +1,507 @@ +import OAI.Geometry.QuadricBundles.BinaryForms + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample.LaurentCech +open Finset +open scoped Classical +noncomputable section +abbrev Chart := Fin 2 × Fin 2 +abbrev Exponent := ℤ × ℤ +abbrev LaurentCoefficients := Exponent →₀ ℂ + +def ScalarAllows (d : ℕ) (i : Fin 2) (e : ℤ) : Prop := + if i=0 then e≤d else 0≤e + +def ChartAllows (d : ℕ × ℕ) (i : Chart) (e : Exponent) : Prop := + ScalarAllows d.1 i.1 e.1 ∧ ScalarAllows d.2 i.2 e.2 + +def OverlapAllows (d : ℕ × ℕ) (i j : Chart) (e : Exponent) : Prop := + (i.1=j.1 → ScalarAllows d.1 i.1 e.1) ∧ + (i.2=j.2 → ScalarAllows d.2 i.2 e.2) + +lemma scalar_bad_unique (d : ℕ) {i j : Fin 2} {e : ℤ} + (hi : ¬ScalarAllows d i e) (hj : ¬ScalarAllows d j e) : i=j := by + fin_cases i <;> fin_cases j <;> simp_all [ScalarAllows] <;> omega + +lemma forbidden_coefficient_zero (d : ℕ × ℕ) (p : Chart → Chart → LaurentCoefficients) + (hc : ∀ i j k, p i j+p j k=p i k) + (hs : ∀ i j e, ¬OverlapAllows d i j e → p i j e=0) + (i j : Chart) (e : Exponent) (hi : ¬ChartAllows d i e) (hj : ¬ChartAllows d j e) : + p i j e=0 := by + rcases not_and_or.mp hi with hi | hi <;> rcases not_and_or.mp hj with hj | hj + · have he := scalar_bad_unique d.1 hi hj + exact hs i j e (fun h ↦ hi (h.1 he)) + · let k : Chart := (i.1,j.2) + have h1 : p i k e=0 := hs i k e (fun h ↦ hi (h.1 rfl)) + have h2 : p k j e=0 := hs k j e (fun h ↦ hj (h.2 rfl)) + have he := congrArg (fun a : LaurentCoefficients ↦ a e) (hc i k j) + simpa only [Finsupp.add_apply,h1,h2,zero_add] using he.symm + · let k : Chart := (j.1,i.2) + have h1 : p i k e=0 := hs i k e (fun h ↦ hi (h.2 rfl)) + have h2 : p k j e=0 := hs k j e (fun h ↦ hj (h.1 rfl)) + have he := congrArg (fun a : LaurentCoefficients ↦ a e) (hc i k j) + simpa only [Finsupp.add_apply,h1,h2,zero_add] using he.symm + · have he := scalar_bad_unique d.2 hi hj + exact hs i j e (fun h ↦ hi (h.2 he)) + +def badChart (d : ℕ × ℕ) (e : Exponent) : Chart := + if h : ∃ i, ¬ChartAllows d i e then h.choose else (0,0) + +lemma badChart_bad (d : ℕ × ℕ) (e : Exponent) (h : ∃ i, ¬ChartAllows d i e) : + ¬ChartAllows d (badChart d e) e := by + simpa only [badChart,dite_eq_left h] using h.choose_spec + +def correction (d : ℕ × ℕ) (q : Chart → LaurentCoefficients) : LaurentCoefficients := + ∑ i : Chart, (q i).filter (fun e ↦ badChart d e=i) + +lemma correction_apply (d : ℕ × ℕ) (q : Chart → LaurentCoefficients) (e : Exponent) : + correction d q e=q (badChart d e) e := by + simp only [correction,Finsupp.coe_finsetSum,Finset.sum_apply,Finsupp.filter_apply] + rw [Finset.sum_eq_single (badChart d e)] + · simp + · intro i _ hi + simp [Ne.symm hi] + · simp + +theorem split_cocycle (d : ℕ × ℕ) (p : Chart → Chart → LaurentCoefficients) + (hc : ∀ i j k, p i j+p j k=p i k) + (hs : ∀ i j e, ¬OverlapAllows d i j e → p i j e=0) : + ∃ q : Chart → LaurentCoefficients, + (∀ i e, ¬ChartAllows d i e → q i e=0) ∧ + ∀ i j, p i j=q j-q i := by + let q₀ : Chart → LaurentCoefficients := fun i ↦ p (0,0) i + let c := correction d q₀ + refine ⟨fun i ↦ q₀ i-c,?_,?_⟩ + · intro i e hi + have hb := badChart_bad d e ⟨i,hi⟩ + have hij := forbidden_coefficient_zero d p hc hs (badChart d e) i e hb hi + have he := congrArg (fun a : LaurentCoefficients ↦ a e) (hc (0,0) (badChart d e) i) + simp only [Finsupp.add_apply,hij,add_zero] at he + simp only [Finsupp.sub_apply,c,correction_apply,q₀] + exact sub_eq_zero.mpr he.symm + · intro i j + have h := hc (0,0) i j + dsimp only [q₀] + rw [← h] + abel + +end +end QuadricCounterexample.LaurentCech + +namespace QuadricCounterexample.LaurentCech +open Set MvPolynomial Finsupp +open scoped BigOperators +noncomputable section + +def eval (p : LaurentCoefficients) (z : BaseCoordinates) : ℂ := + p.sum fun e c ↦ c * z.1^e.1 * z.2^e.2 +lemma eval_add (p q : LaurentCoefficients) (z : BaseCoordinates) : + eval (p+q) z=eval p z+eval q z := by + apply Finsupp.sum_add_index <;> intros <;> ring +lemma eval_zero (z : BaseCoordinates) : eval 0 z=0 := by simp [eval] +lemma eval_sub (p q : LaurentCoefficients) (z : BaseCoordinates) : + eval (p-q) z=eval p z-eval q z := by + have h := eval_add (p-q) q z + rw [sub_add_cancel] at h + exact eq_sub_of_add_eq h.symm +lemma eval_single (e : Exponent) (c : ℂ) (z : BaseCoordinates) : + eval (Finsupp.single e c) z=c*z.1^e.1*z.2^e.2 := by simp [eval] + +def exponent (d : Fin 2 →₀ ℕ) : Exponent := (d 0,d 1) +def ofPolynomial (p : BasePolynomial) : LaurentCoefficients := + Finsupp.mapDomain exponent (AddMonoidAlgebra.coeff p) +lemma ofPolynomial_add (p q : BasePolynomial) : ofPolynomial (p+q)=ofPolynomial p+ofPolynomial q := + by simp [ofPolynomial,AddMonoidAlgebra.coeff_add,Finsupp.mapDomain_add] +lemma ofPolynomial_monomial (d : Fin 2 →₀ ℕ) (c : ℂ) : + ofPolynomial (MvPolynomial.monomial d c)=Finsupp.single (exponent d) c := + by simp [ofPolynomial, MvPolynomial.monomial,AddMonoidAlgebra.lsingle_apply] +lemma eval_ofPolynomial (p : BasePolynomial) (z : BaseCoordinates) : + eval (ofPolynomial p) z=baseEval p z := by + induction p using MvPolynomial.induction_on' with + | add p q hp hq => rw [ofPolynomial_add,eval_add,baseEval_add,hp,hq] + | monomial d c => + rw [ofPolynomial_monomial,eval_single] + simp only [baseEval,MvPolynomial.eval_monomial,exponent,zpow_natCast] + rw [Finsupp.prod_fintype] + · simp [Fin.prod_univ_two]; ring + · intro i; simp + +lemma exponent_injective : Function.Injective exponent := by + intro a b h + have h0 : a 0=b 0 := by exact_mod_cast (show (a 0 : ℤ)=(b 0 : ℤ) from congrArg Prod.fst h) + have h1 : a 1=b 1 := by exact_mod_cast (show (a 1 : ℤ)=(b 1 : ℤ) from congrArg Prod.snd h) + ext i; fin_cases i <;> assumption +lemma ofPolynomial_injective : Function.Injective ofPolynomial := by + intro p q h + have he : AddMonoidAlgebra.coeff p=AddMonoidAlgebra.coeff q := Finsupp.mapDomain_injective exponent_injective h + exact AddMonoidAlgebra.coeff_injective he + +def shift (e : Exponent) (p : LaurentCoefficients) : LaurentCoefficients := + Finsupp.mapDomain (fun a ↦ e+a) p +lemma shift_injective (e : Exponent) : Function.Injective (shift e) := + Finsupp.mapDomain_injective (fun _ _ h ↦ add_left_cancel h) +lemma eval_shift (e : Exponent) (p : LaurentCoefficients) {z : BaseCoordinates} + (hz : z.1≠0 ∧ z.2≠0) : + eval (shift e p) z=z.1^e.1*z.2^e.2*eval p z := by + unfold eval shift + rw [Finsupp.sum_mapDomain_index (fun _ ↦ by simp) (fun _ _ _ ↦ by ring)] + rw [Finsupp.mul_sum] + apply Finsupp.sum_congr + intro a c + simp only [Prod.fst_add,Prod.snd_add,zpow_add₀ hz.1,zpow_add₀ hz.2] + ring + +lemma exists_shift_nonneg (p : LaurentCoefficients) : + ∃ e : Exponent, ∀ a∈(shift e p).support, 0≤a.1 ∧ 0≤a.2 := by + have h (a : Exponent) : ∃ n : ℕ, -a.1≤n ∧ -a.2≤n := by + obtain ⟨n,hn⟩ := exists_nat_ge (max (-a.1) (-a.2)) + exact ⟨n,le_trans (le_max_left _ _) hn,le_trans (le_max_right _ _) hn⟩ + choose n hn using h + let N : ℕ := ∑ a∈p.support, n a + refine ⟨(N,N),?_⟩ + intro a ha + have hs : a∈Finset.image (fun a : Exponent ↦ ((N : ℤ),(N : ℤ))+a) p.support := + Finsupp.mapDomain_support ha + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp hs + have hn' : (n b : ℤ)≤N := by exact_mod_cast Finset.single_le_sum (fun _ _ ↦ Nat.zero_le _) hb + simp only [Prod.fst_add,Prod.snd_add] + constructor <;> linarith [(hn b).1,(hn b).2] + +def naturalExponent (a : Exponent) : Fin 2 →₀ ℕ := + Finsupp.equivFunOnFinite.symm ![a.1.toNat,a.2.toNat] +def toPolynomial (p : LaurentCoefficients) : BasePolynomial := + p.sum fun a c ↦ MvPolynomial.monomial (naturalExponent a) c +lemma ofPolynomial_toPolynomial (p : LaurentCoefficients) + (hp : ∀ a∈p.support, 0≤a.1 ∧ 0≤a.2) : + ofPolynomial (toPolynomial p)=p := by + have hm : ofPolynomial (toPolynomial p)=p.sum (fun a c ↦ Finsupp.single (exponent (naturalExponent a)) c) := by + unfold toPolynomial + unfold Finsupp.sum + induction p.support using Finset.induction_on with + | empty => simp [ofPolynomial] + | @insert a t hat ih => simp only [Finset.sum_insert hat,ofPolynomial_add,ofPolynomial_monomial,ih] + rw [hm] + conv_rhs => rw [← Finsupp.sum_single p] + apply Finsupp.sum_congr + intro a ha + congr 1 + ext <;> simp [exponent,naturalExponent,Int.toNat_of_nonneg (hp a ha).1, + Int.toNat_of_nonneg (hp a ha).2] + +end +end QuadricCounterexample.LaurentCech + +namespace QuadricCounterexample.LaurentCech +open Set +noncomputable section +lemma baseEval_on_torus_injective {p q : BasePolynomial} + (he : ∀ z : BaseCoordinates, z.1≠0 ∧ z.2≠0 → baseEval p z=baseEval q z) : p=q := by + have hd : Dense ({(0 : ℂ)}ᶜ ×ˢ {(0 : ℂ)}ᶜ) := + (dense_compl_singleton (0 : ℂ)).prod (dense_compl_singleton (0 : ℂ)) + have hc (r : BasePolynomial) : Continuous (baseEval r) := + continuousOn_univ.mp (analytic_baseEval r).continuousOn + have hfun : baseEval p=baseEval q := Continuous.ext_on hd (hc p) (hc q) (fun z hz ↦ he z hz) + apply MvPolynomial.funext + intro x + have hx : x=![x 0,x 1] := by ext i; fin_cases i <;> rfl + rw [hx] + exact congrFun hfun (x 0,x 1) + +lemma eval_injective_on_torus {p q : LaurentCoefficients} + (he : ∀ z : BaseCoordinates, z.1≠0 ∧ z.2≠0 → eval p z=eval q z) : p=q := by + obtain ⟨e,hs⟩ := exists_shift_nonneg (p-q) + let r := toPolynomial (shift e (p-q)) + have hr : ofPolynomial r=shift e (p-q) := ofPolynomial_toPolynomial _ hs + have hr0 : r=0 := by + apply baseEval_on_torus_injective + intro z hz + rw [← eval_ofPolynomial,hr,eval_shift e (p-q) hz,eval_sub] + rw [he z hz] + simp + apply sub_eq_zero.mp + apply shift_injective e + rw [← hr,hr0] + simp [ofPolynomial,shift] +end +end QuadricCounterexample.LaurentCech + +namespace QuadricCounterexample.LaurentCech +open Set Finsupp +open scoped BigOperators +noncomputable section + +def transformExponent (d : ℕ × ℕ) (i : Chart) (a : Exponent) : Exponent := + (if i.1=0 then (d.1 : ℤ)-a.1 else a.1, + if i.2=0 then (d.2 : ℤ)-a.2 else a.2) +lemma transformExponent_involutive (d : ℕ × ℕ) (i : Chart) : + Function.Involutive (transformExponent d i) := by + intro a + ext <;> simp [transformExponent] <;> split_ifs <;> simp_all + +def transform (d : ℕ × ℕ) (i : Chart) (p : LaurentCoefficients) : LaurentCoefficients := + Finsupp.mapDomain (transformExponent d i) p +lemma transform_involutive (d : ℕ × ℕ) (i : Chart) : Function.Involutive (transform d i) := by + intro p + unfold transform + rw [← Finsupp.mapDomain_comp] + have h : transformExponent d i ∘ transformExponent d i=id := funext (transformExponent_involutive d i) + rw [h,Finsupp.mapDomain_id] + +lemma exponent_nonneg (a : Fin 2 →₀ ℕ) : 0≤(exponent a).1 ∧ 0≤(exponent a).2 := by + exact ⟨Nat.cast_nonneg _,Nat.cast_nonneg _⟩ +lemma ofPolynomial_nonneg (p : BasePolynomial) {a : Exponent} (ha : a∈(ofPolynomial p).support) : + 0≤a.1 ∧ 0≤a.2 := by + obtain ⟨b,_,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support ha) + exact exponent_nonneg b +lemma chartAllows_transform_iff (d : ℕ × ℕ) (i : Chart) (a : Exponent) : + ChartAllows d i (transformExponent d i a) ↔ 0≤a.1 ∧ 0≤a.2 := by + simp only [ChartAllows, ScalarAllows,transformExponent] + split_ifs <;> constructor <;> intro h <;> constructor <;> omega +lemma transform_nonneg_iff (d : ℕ × ℕ) (i : Chart) (a : Exponent) : + 0≤(transformExponent d i a).1 ∧ 0≤(transformExponent d i a).2 ↔ ChartAllows d i a := by + have h := (chartAllows_transform_iff d i (transformExponent d i a)).symm + rw [transformExponent_involutive d i a] at h + exact h +lemma transform_polynomial_support (d : ℕ × ℕ) (i : Chart) (p : BasePolynomial) + {a : Exponent} (ha : a∈(transform d i (ofPolynomial p)).support) : ChartAllows d i a := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support ha) + exact (chartAllows_transform_iff d i b).mpr (ofPolynomial_nonneg p hb) +lemma exists_polynomial_of_chartAllows (d : ℕ × ℕ) (i : Chart) (p : LaurentCoefficients) + (hp : ∀ a∈p.support, ChartAllows d i a) : + ∃ q : BasePolynomial, transform d i (ofPolynomial q)=p := by + have hnon : ∀ a∈(transform d i p).support, 0≤a.1 ∧ 0≤a.2 := by + intro a ha + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support ha) + exact (transform_nonneg_iff d i b).mpr (hp b hb) + refine ⟨toPolynomial (transform d i p),?_⟩ + rw [ofPolynomial_toPolynomial _ hnon] + exact transform_involutive d i p + +def masterCoordinates (i : Chart) (z : BaseCoordinates) : BaseCoordinates := + (if i.1=0 then z.1⁻¹ else z.1, if i.2=0 then z.2⁻¹ else z.2) +def masterFrame (d : ℕ × ℕ) (i : Chart) (z : BaseCoordinates) : ℂ := + (if i.1=0 then z.1^d.1 else 1) * (if i.2=0 then z.2^d.2 else 1) +lemma masterCoordinates_nonzero (i : Chart) {z : BaseCoordinates} (hz : z.1≠0 ∧ z.2≠0) : + (masterCoordinates i z).1≠0 ∧ (masterCoordinates i z).2≠0 := by + dsimp [masterCoordinates] + split_ifs <;> exact ⟨by simpa using hz.1,by simpa using hz.2⟩ +lemma masterCoordinates_involutive (i : Chart) : Function.Involutive (masterCoordinates i) := by + intro z + ext <;> simp [masterCoordinates] <;> split_ifs <;> simp_all + +lemma scalar_transform_eval (d : ℕ) (i : Fin 2) (a : ℤ) {z : ℂ} (hz : z≠0) : + z^(if i=0 then (d : ℤ)-a else a)= + (if i=0 then z^d else 1)*(if i=0 then z⁻¹ else z)^a := by + by_cases hi : i=0 + · simp only [hi,ite_true,zpow_sub₀ hz,zpow_natCast, inv_zpow,div_eq_mul_inv] + · simp [hi] +lemma eval_transform (d : ℕ × ℕ) (i : Chart) (p : LaurentCoefficients) + {z : BaseCoordinates} (hz : z.1≠0 ∧ z.2≠0) : + eval (transform d i p) z=masterFrame d i z*eval p (masterCoordinates i z) := by + unfold eval transform + rw [Finsupp.sum_mapDomain_index (fun _ ↦ by simp) (fun _ _ _ ↦ by ring)] + rw [Finsupp.mul_sum] + apply Finsupp.sum_congr + intro a ha + simp only [transformExponent,masterFrame,masterCoordinates, + scalar_transform_eval _ _ _ hz.1,scalar_transform_eval _ _ _ hz.2] + ring +lemma eval_transform_polynomial (d : ℕ × ℕ) (i : Chart) (p : BasePolynomial) + {z : BaseCoordinates} (hz : z.1≠0 ∧ z.2≠0) : + eval (transform d i (ofPolynomial p)) z=masterFrame d i z*baseEval p (masterCoordinates i z) := by + rw [eval_transform d i _ hz,eval_ofPolynomial] +end +end QuadricCounterexample.LaurentCech + +namespace QuadricCounterexample +open MvPolynomial Set +noncomputable section + +lemma denominator_dvd_power (q r : BasePolynomial) + (hq : ∀ z : BaseCoordinates, baseEval r z ≠ 0 → baseEval q z ≠ 0) : + ∃ n : ℕ, q ∣ r^n := by + let J : Ideal BasePolynomial := Ideal.span {q} + have hv : r ∈ MvPolynomial.vanishingIdeal ℂ (MvPolynomial.zeroLocus ℂ J) := by + rw [MvPolynomial.mem_vanishingIdeal_iff] + intro z hz + have he : z=![z 0,z 1] := by ext k; fin_cases k <;> rfl + have hqz : MvPolynomial.eval z q=0 := by + rw [MvPolynomial.zeroLocus_span] at hz + simpa only [aeval_eq_eval] using hz q (Set.mem_singleton q) + by_contra hr + apply hq (z 0,z 1) + · simpa only [baseEval,← he,aeval_eq_eval] using hr + · simpa only [baseEval,← he] using hqz + rw [MvPolynomial.vanishingIdeal_zeroLocus_eq_radical] at hv + obtain ⟨n,hn⟩ := hv + exact ⟨n,Ideal.mem_span_singleton.mp hn⟩ + +lemma UniformlyRegularOn.exists_power_denominator (r : BasePolynomial) + {f : BaseCoordinates → ℂ} (hf : UniformlyRegularOn {z | baseEval r z ≠ 0} f) : + ∃ n : ℕ, ∃ p : BasePolynomial, ∀ z, baseEval r z ≠ 0 → + f z=baseEval p z/(baseEval r z)^n := by + obtain ⟨p,q,hq,hf⟩ := hf + obtain ⟨n,t,ht⟩ := denominator_dvd_power q r hq + refine ⟨n,p*t,?_⟩ + intro z hz + have hqe := hq z hz + have he := congrArg (fun a : BasePolynomial ↦ baseEval a z) ht + change baseEval (r^n) z=baseEval (q*t) z at he + have hpw : baseEval (r^n) z=(baseEval r z)^n := by simp [baseEval] + rw [hpw,baseEval_mul] at he + rw [hf z hz,baseEval_mul] + field_simp + linear_combination baseEval p z * he + +lemma UniformlyRegularOn.exists_polynomial {f : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn Set.univ f) : ∃ p : BasePolynomial, f=baseEval p := by + have hr : {z : BaseCoordinates | baseEval (1 : BasePolynomial) z ≠ 0}=Set.univ := by ext; simp + obtain ⟨n,p,hp⟩ := UniformlyRegularOn.exists_power_denominator 1 (by simpa only [hr] using hf) + refine ⟨p,funext fun z ↦ ?_⟩ + simpa using hp z (by simp) + +end +end QuadricCounterexample + +namespace QuadricCounterexample.LaurentCech +open Set MvPolynomial Finsupp +open scoped BigOperators +noncomputable section + +def inverseExponent (n : ℕ) (i j : Chart) : Exponent := + (if i.1=j.1 then 0 else -(n : ℤ),if i.2=j.2 then 0 else -(n : ℤ)) +lemma eval_inverseExponent (n : ℕ) (i j : Chart) (z : BaseCoordinates) : + z.1^(inverseExponent n i j).1*z.2^(inverseExponent n i j).2= + ((baseEval (overlapPolynomial i j) z)^n)⁻¹ := by + simp only [inverseExponent,overlapPolynomial,baseEval_mul] + split_ifs <;> simp [baseEval,mul_pow,mul_comm] +lemma torus_mem_overlap (i j : Chart) {z : BaseCoordinates} (hz : z.1≠0 ∧ z.2≠0) : + z ∈ coordinateOverlap i j := (coordinateOverlap_iff i j z).mpr ⟨Or.inr hz.1,Or.inr hz.2⟩ + +lemma transform_overlap_support (d : ℕ × ℕ) (n : ℕ) (i j : Chart) (p : BasePolynomial) + {a : Exponent} (ha : a∈(transform d i (shift (inverseExponent n i j) (ofPolynomial p))).support) : + OverlapAllows d i j a := by + obtain ⟨b,hb,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support ha) + obtain ⟨c,hc,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support hb) + have hn := ofPolynomial_nonneg p hc + constructor + · intro hij + dsimp [ScalarAllows,transformExponent,inverseExponent] + simp only [hij,ite_true,zero_add] + split_ifs <;> omega + · intro hij + dsimp [ScalarAllows,transformExponent,inverseExponent] + simp only [hij,ite_true,zero_add] + split_ifs <;> omega + +lemma exists_overlap_laurent (d : ℕ × ℕ) (i j : Chart) (f : BaseCoordinates → ℂ) + (hf : UniformlyRegularOn (coordinateOverlap i j) f) : + ∃ p : LaurentCoefficients, (∀ a∈p.support,OverlapAllows d i j a) ∧ + ∀ z : BaseCoordinates, z.1≠0 ∧ z.2≠0 → + eval p z=masterFrame d i z*f (masterCoordinates i z) := by + obtain ⟨n,q,hq⟩ := UniformlyRegularOn.exists_power_denominator (overlapPolynomial i j) hf + refine ⟨transform d i (shift (inverseExponent n i j) (ofPolynomial q)), + fun _ ha ↦ transform_overlap_support d n i j q ha,?_⟩ + intro z hz + have hw := masterCoordinates_nonzero i hz + rw [eval_transform d i _ hz,eval_shift _ _ hw,eval_ofPolynomial, + hq _ (torus_mem_overlap i j hw),eval_inverseExponent] + ring + +def lineFactor (d : ℕ × ℕ) (i j : Chart) (z : BaseCoordinates) : ℂ := + firstFactor i j z^d.1*secondFactor i j z^d.2 +lemma lineFactor_regular (d : ℕ × ℕ) (i j : Chart) (U : Set BaseCoordinates) : + UniformlyRegularOn U (lineFactor d i j) := + ((firstFactor_regular i j U).pow d.1).mul ((secondFactor_regular i j U).pow d.2) +lemma masterFrame_ne_zero (d : ℕ × ℕ) (i : Chart) {z : BaseCoordinates} (hz : z.1≠0 ∧ z.2≠0) : + masterFrame d i z≠0 := by + dsimp [masterFrame] + split_ifs <;> simp_all +lemma masterCoordinates_change (i j : Chart) (z : BaseCoordinates) : + coordinateChange i j (masterCoordinates i z)=masterCoordinates j z := by + rcases i with ⟨i1,i2⟩; rcases j with ⟨j1,j2⟩ + ext <;> simp only [coordinateChange,scalarCoordinateChange,masterCoordinates] + · fin_cases i1 <;> fin_cases j1 <;> simp + · fin_cases i2 <;> fin_cases j2 <;> simp +lemma masterFrame_change (d : ℕ × ℕ) (i j : Chart) {z : BaseCoordinates} + (hz : z.1≠0 ∧ z.2≠0) : + masterFrame d i z*lineFactor d i j (masterCoordinates i z)=masterFrame d j z := by + have hs (n : ℕ) (a b : Fin 2) (w : ℂ) (hw : w≠0) : + (if a=0 then w^n else 1)* + (scalarFactor a b (if a=0 then w⁻¹ else w))^n=(if b=0 then w^n else 1) := by + fin_cases a <;> fin_cases b <;> simp [scalarFactor,hw] + dsimp only [masterFrame,lineFactor,firstFactor,secondFactor,masterCoordinates] + calc + _ = ((if i.1=0 then z.1^d.1 else 1)* + (scalarFactor i.1 j.1 (if i.1=0 then z.1⁻¹ else z.1))^d.1)* + ((if i.2=0 then z.2^d.2 else 1)* + (scalarFactor i.2 j.2 (if i.2=0 then z.2⁻¹ else z.2))^d.2) := by ring + _ = _ := by rw [hs d.1 i.1 j.1 z.1 hz.1,hs d.2 i.2 j.2 z.2 hz.2] + +lemma uniformlyRegular_eq_of_torus {i j : Chart} {f g : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn (coordinateOverlap i j) f) + (hg : UniformlyRegularOn (coordinateOverlap i j) g) + (he : ∀ z : BaseCoordinates,z.1≠0 ∧ z.2≠0 → f z=g z) : + EqOn f g (coordinateOverlap i j) := by + let r : BasePolynomial := X 0*X 1 + have hr : r≠0 := mul_ne_zero (X_ne_zero 0) (X_ne_zero 1) + apply continuous_cancel_polynomial (coordinateOverlap_open i j) + (hf.regular.analyticOnNhd (coordinateOverlap_open i j)).continuousOn + (hg.regular.analyticOnNhd (coordinateOverlap_open i j)).continuousOn hr + intro z _ + by_cases h : z.1≠0 ∧ z.2≠0 + · rw [he z h] + · have ht : baseEval r z=0 := by simpa [r,baseEval,mul_eq_zero,not_and_or] using not_and_or.mp h + simp [ht] + +theorem split_regular_line_cocycle (d : ℕ × ℕ) (f : Chart → Chart → BaseCoordinates → ℂ) + (hf : ∀ i j, UniformlyRegularOn (coordinateOverlap i j) (f i j)) + (hc : ∀ i j k z, z∈coordinateOverlap i j → z∈coordinateOverlap i k → + f i j z+lineFactor d i j z*f j k (coordinateChange i j z)=f i k z) : + ∃ q : Chart → BasePolynomial, ∀ i j z, z∈coordinateOverlap i j → + f i j z=lineFactor d i j z*baseEval (q j) (coordinateChange i j z)-baseEval (q i) z := by + choose p hp he using fun i j ↦ exists_overlap_laurent d i j (f i j) (hf i j) + have pc : ∀ i j k,p i j+p j k=p i k := by + intro i j k + apply eval_injective_on_torus + intro z hz + rw [eval_add,he i j z hz,he j k z hz,he i k z hz] + rw [← masterFrame_change d i j hz,mul_assoc,← mul_add] + rw [← masterCoordinates_change i j z,hc i j k _ + (torus_mem_overlap i j (masterCoordinates_nonzero i hz)) + (torus_mem_overlap i k (masterCoordinates_nonzero i hz))] + have ps : ∀ i j e, ¬OverlapAllows d i j e → p i j e=0 := by + intro i j e h + by_contra hn + exact h (hp i j e (Finsupp.mem_support_iff.mpr hn)) + obtain ⟨a,ha,hae⟩ := split_cocycle d p pc ps + have ha' : ∀ i e,e∈(a i).support → ChartAllows d i e := by + intro i e he + by_contra h + exact Finsupp.mem_support_iff.mp he (ha i e h) + choose q hq using fun i ↦ exists_polynomial_of_chartAllows d i (a i) (ha' i) + refine ⟨q,?_⟩ + intro i j + apply uniformlyRegular_eq_of_torus (hf i j) + · exact ((lineFactor_regular d i j _).mul ((uniformlyRegular_polynomial univ (q j)).comp + (coordinateChange_fst_regular i j) (coordinateChange_snd_regular i j) + (fun _ _ ↦ mem_univ _))).sub (uniformlyRegular_polynomial _ (q i)) + · intro z hz + let w := masterCoordinates i z + have hw := masterCoordinates_nonzero i hz + have hm : masterCoordinates i w=z := masterCoordinates_involutive i z + have ht := congrArg (fun s ↦ eval s w) (hae i j) + rw [eval_sub,he i j w hw,← hq i,← hq j, + eval_transform_polynomial d j _ hw,eval_transform_polynomial d i _ hw] at ht + rw [← masterFrame_change d i j hw,← masterCoordinates_change i j w,hm] at ht + apply (mul_left_cancel₀ (masterFrame_ne_zero d i hw)) + linear_combination ht +end +end QuadricCounterexample.LaurentCech + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/LineFactors.lean b/lean/OAI/Geometry/QuadricBundles/LineFactors.lean new file mode 100644 index 0000000000000000000000000000000000000000..f45fb89dd1a89ee5fc538acd658322be604d6148 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/LineFactors.lean @@ -0,0 +1,192 @@ +import OAI.Geometry.QuadricBundles.Regularity + +namespace OAI + +namespace QuadricCounterexample +open Set MvPolynomial +noncomputable section + +abbrev StandardChart := Fin 2 × Fin 2 + +def overlapPolynomial (i j : StandardChart) : BasePolynomial := + (if i.1=j.1 then 1 else X 0)*(if i.2=j.2 then 1 else X 1) +def coordinateOverlap (i j : StandardChart) : Set BaseCoordinates := + {z | baseEval (overlapPolynomial i j) z ≠ 0} +def scalarCoordinateChange (i j : Fin 2) (z : ℂ) : ℂ := if i=j then z else z⁻¹ +def coordinateChange (i j : StandardChart) (z : BaseCoordinates) : BaseCoordinates := + (scalarCoordinateChange i.1 j.1 z.1, scalarCoordinateChange i.2 j.2 z.2) +def scalarFactor (i j : Fin 2) (z : ℂ) : ℂ := if i=j then 1 else z + +def firstFactor (i j : StandardChart) (z : BaseCoordinates) : ℂ := scalarFactor i.1 j.1 z.1 +def secondFactor (i j : StandardChart) (z : BaseCoordinates) : ℂ := scalarFactor i.2 j.2 z.2 + +lemma coordinateOverlap_iff (i j : StandardChart) (z : BaseCoordinates) : + z ∈ coordinateOverlap i j ↔ (i.1=j.1 ∨ z.1 ≠ 0) ∧ (i.2=j.2 ∨ z.2 ≠ 0) := by + simp only [coordinateOverlap,mem_ofPred_eq,overlapPolynomial,baseEval_mul] + by_cases h1 : i.1=j.1 <;> by_cases h2 : i.2=j.2 <;> simp [h1,h2,baseEval] + +lemma scalarCoordinateChange_coord (i j : Fin 2) (z : ℂ) : + coordP1 j (affineP1 i z)=scalarCoordinateChange i j z := by + by_cases hij : i=j + · subst j; simp [scalarCoordinateChange] + · fin_cases i <;> fin_cases j <;> simp_all only [not_true_eq_false] + · by_cases hz : z=0 + · subst z; simp [coordP1,affineP1,scalarCoordinateChange] + · simp [coordP1,affineP1,scalarCoordinateChange,reciprocalP1_coe hz] + · by_cases hz : z=0 + · subst z; simp [coordP1,affineP1,scalarCoordinateChange] + · simp [coordP1,affineP1,scalarCoordinateChange,reciprocalP1_coe hz] + +lemma coordinateChange_coord (i j : StandardChart) (z : BaseCoordinates) : + coordQuadric j (affineQuadric i z)=coordinateChange i j z := by + ext <;> simp only [coordQuadric,affineQuadric,coordinateChange,scalarCoordinateChange_coord] + +@[simp] lemma scalarCoordinateChange_self (i : Fin 2) (z : ℂ) : + scalarCoordinateChange i i z=z := by simp [scalarCoordinateChange] +@[simp] lemma coordinateChange_self (i : StandardChart) (z : BaseCoordinates) : + coordinateChange i i z=z := by simp [coordinateChange] +lemma scalarCoordinateChange_inv (i j : Fin 2) (z : ℂ) : + scalarCoordinateChange j i (scalarCoordinateChange i j z)=z := by + by_cases h : i=j <;> simp [scalarCoordinateChange,h,eq_comm] +lemma coordinateChange_inv (i j : StandardChart) (z : BaseCoordinates) : + coordinateChange j i (coordinateChange i j z)=z := by + ext <;> simp [coordinateChange,scalarCoordinateChange_inv] + +lemma affineP1_mem_range (i j : Fin 2) (z : ℂ) : + affineP1 i z ∈ range (affineP1 j) ↔ i=j ∨ z ≠ 0 := by + by_cases hij : i=j + · subst j; exact iff_of_true ⟨z,rfl⟩ (Or.inl rfl) + · rw [mem_range_affineP1] + fin_cases i <;> fin_cases j <;> simp_all only [not_true_eq_false] + · by_cases hz : z=0 + · subst z; simp [affineP1] + · simp [affineP1,reciprocalP1_coe hz,hz] + · simp [affineP1] + +lemma affineQuadric_mem_range (i j : StandardChart) (z : BaseCoordinates) : + affineQuadric i z ∈ range (affineQuadric j) ↔ z ∈ coordinateOverlap i j := by + rw [mem_range_affineQuadric,coordinateOverlap_iff] + exact and_congr (affineP1_mem_range _ _ _) (affineP1_mem_range _ _ _) + +lemma affine_coordinateChange (i j : StandardChart) {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) : + affineQuadric j (coordinateChange i j z)=affineQuadric i z := by + rw [← coordinateChange_coord] + exact affineQuadric_coord ((affineQuadric_mem_range i j z).mpr hz) + +lemma coordinateOverlap_change (i j : StandardChart) {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) : coordinateChange i j z ∈ coordinateOverlap j i := by + rw [← affineQuadric_mem_range,affine_coordinateChange i j hz] + exact ⟨z,rfl⟩ + +lemma coordinateChange_comp (i j k : StandardChart) {z : BaseCoordinates} + (hij : z ∈ coordinateOverlap i j) : + coordinateChange j k (coordinateChange i j z)=coordinateChange i k z := by + rw [← coordinateChange_coord,affine_coordinateChange i j hij,coordinateChange_coord] + +lemma coordinateOverlap_third (i j k : StandardChart) {z : BaseCoordinates} + (hij : z ∈ coordinateOverlap i j) (hik : z ∈ coordinateOverlap i k) : + coordinateChange i j z ∈ coordinateOverlap j k := by + rw [← affineQuadric_mem_range,affine_coordinateChange i j hij] + exact (affineQuadric_mem_range i k z).mpr hik + +lemma coordinateOverlap_open (i j : StandardChart) : IsOpen (coordinateOverlap i j) := + isOpen_ne.preimage (analytic_baseEval (overlapPolynomial i j)).continuous + +lemma uniformlyRegular_fst (U : Set BaseCoordinates) : UniformlyRegularOn U Prod.fst := by + exact ⟨X 0,1,fun _ _ ↦ by simp,fun _ _ ↦ by simp [baseEval]⟩ +lemma uniformlyRegular_snd (U : Set BaseCoordinates) : UniformlyRegularOn U Prod.snd := by + exact ⟨X 1,1,fun _ _ ↦ by simp,fun _ _ ↦ by simp [baseEval]⟩ + +lemma UniformlyRegularOn.comp {U V : Set BaseCoordinates} + {f : BaseCoordinates → ℂ} {g : BaseCoordinates → BaseCoordinates} + (hf : UniformlyRegularOn U f) + (h0 : UniformlyRegularOn V (fun z ↦ (g z).1)) + (h1 : UniformlyRegularOn V (fun z ↦ (g z).2)) + (hg : MapsTo g V U) : UniformlyRegularOn V (fun z ↦ f (g z)) := by + have hadd (p : BasePolynomial) : UniformlyRegularOn V (fun z ↦ baseEval p (g z)) := by + have h : ∀ i : Fin 2, UniformlyRegularOn V (fun z ↦ (![ (g z).1,(g z).2 ] : Fin 2 → ℂ) i) := by + intro i; fin_cases i + · exact h0 + · exact h1 + exact UniformlyRegularOn.eval h p + obtain ⟨p,q,hq,h⟩ := hf + have hn : ∀ z ∈ V, baseEval q (g z) ≠ 0 := fun z hz ↦ hq (g z) (hg hz) + exact ((hadd p).mul ((hadd q).inv hn)).congr (fun z hz ↦ by + rw [h (g z) (hg hz),div_eq_mul_inv]) + +lemma firstFactor_regular (i j : StandardChart) (U : Set BaseCoordinates) : + UniformlyRegularOn U (firstFactor i j) := by + unfold firstFactor scalarFactor + by_cases h : i.1=j.1 + · simpa only [ite_eq_left h] using uniformlyRegular_const U 1 + · simpa only [ite_eq_right h] using uniformlyRegular_fst U +lemma secondFactor_regular (i j : StandardChart) (U : Set BaseCoordinates) : + UniformlyRegularOn U (secondFactor i j) := by + unfold secondFactor scalarFactor + by_cases h : i.2=j.2 + · simpa only [ite_eq_left h] using uniformlyRegular_const U 1 + · simpa only [ite_eq_right h] using uniformlyRegular_snd U + +lemma firstFactor_ne_zero {i j : StandardChart} {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) : firstFactor i j z ≠ 0 := by + have h := ((coordinateOverlap_iff i j z).mp hz).1 + unfold firstFactor scalarFactor + split_ifs with hi + · exact one_ne_zero + · exact h.resolve_left hi +lemma secondFactor_ne_zero {i j : StandardChart} {z : BaseCoordinates} + (hz : z ∈ coordinateOverlap i j) : secondFactor i j z ≠ 0 := by + have h := ((coordinateOverlap_iff i j z).mp hz).2 + unfold secondFactor scalarFactor + split_ifs with hi + · exact one_ne_zero + · exact h.resolve_left hi + +lemma coordinateChange_fst_regular (i j : StandardChart) : + UniformlyRegularOn (coordinateOverlap i j) (fun z ↦ (coordinateChange i j z).1) := by + by_cases h : i.1=j.1 + · simpa only [coordinateChange,scalarCoordinateChange,ite_eq_left h] using + uniformlyRegular_fst (coordinateOverlap i j) + · have hn : ∀ z ∈ coordinateOverlap i j, z.1 ≠ 0 := fun z hz ↦ + (((coordinateOverlap_iff i j z).mp hz).1).resolve_left h + simpa only [coordinateChange,scalarCoordinateChange,ite_eq_right h] using + (uniformlyRegular_fst (coordinateOverlap i j)).inv hn +lemma coordinateChange_snd_regular (i j : StandardChart) : + UniformlyRegularOn (coordinateOverlap i j) (fun z ↦ (coordinateChange i j z).2) := by + by_cases h : i.2=j.2 + · simpa only [coordinateChange,scalarCoordinateChange,ite_eq_left h] using + uniformlyRegular_snd (coordinateOverlap i j) + · have hn : ∀ z ∈ coordinateOverlap i j, z.2 ≠ 0 := fun z hz ↦ + (((coordinateOverlap_iff i j z).mp hz).2).resolve_left h + simpa only [coordinateChange,scalarCoordinateChange,ite_eq_right h] using + (uniformlyRegular_snd (coordinateOverlap i j)).inv hn + +lemma firstFactor_transition (i j : StandardChart) (z : BaseCoordinates) : + firstFactor i j z=hyperplaneTransition i.1 j.1 (affineQuadric i z).1 := by + simp [firstFactor,scalarFactor,hyperplaneTransition,affineQuadric] +lemma secondFactor_transition (i j : StandardChart) (z : BaseCoordinates) : + secondFactor i j z=hyperplaneTransition i.2 j.2 (affineQuadric i z).2 := by + simp [secondFactor,scalarFactor,hyperplaneTransition,affineQuadric] + +lemma firstFactor_mul (i j k : StandardChart) {z : BaseCoordinates} + (hj : z ∈ coordinateOverlap i j) (hk : z ∈ coordinateOverlap i k) : + firstFactor i j z*firstFactor j k (coordinateChange i j z)=firstFactor i k z := by + rw [firstFactor_transition,firstFactor_transition,firstFactor_transition,affine_coordinateChange i j hj] + apply hyperplaneTransition_mul + · exact ⟨z.1,rfl⟩ + · exact (mem_range_affineQuadric j _).mp ((affineQuadric_mem_range i j z).mpr hj) |>.1 + · exact (mem_range_affineQuadric k _).mp ((affineQuadric_mem_range i k z).mpr hk) |>.1 +lemma secondFactor_mul (i j k : StandardChart) {z : BaseCoordinates} + (hj : z ∈ coordinateOverlap i j) (hk : z ∈ coordinateOverlap i k) : + secondFactor i j z*secondFactor j k (coordinateChange i j z)=secondFactor i k z := by + rw [secondFactor_transition,secondFactor_transition,secondFactor_transition,affine_coordinateChange i j hj] + apply hyperplaneTransition_mul + · exact ⟨z.2,rfl⟩ + · exact (mem_range_affineQuadric j _).mp ((affineQuadric_mem_range i j z).mpr hj) |>.2 + · exact (mem_range_affineQuadric k _).mp ((affineQuadric_mem_range i k z).mpr hk) |>.2 + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Main.lean b/lean/OAI/Geometry/QuadricBundles/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8ca05a3ad6304a026ea95e1c75639489c3f3ced --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Main.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.QuadricBundles.Ampleness + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +noncomputable section + +theorem main_theorem : SourceMainTheorem := by + let G := sourceGraphScalars.equalizerData.bundle + let E : ℕ → AlgebraicRankTwoBundle := fun m ↦ + if hm : 0 < m then powerPullbackTwist G m hm else G + refine ⟨G,E,?_,?_,?_⟩ + · intro m hm + dsimp [E] + rw [dite_eq_left hm] + exact powerPullbackTwist_spec G m hm + · intro m hm + dsimp [E] + rw [dite_eq_left hm] + exact sourceGraphScalars.equalizerData.powerTwist_ample m hm + · obtain ⟨m₀,h₀,h⟩ := source_eventually_no_positive_metric + refine ⟨m₀,h₀,fun m hmi ↦ ?_⟩ + have hm : 0 < m := h₀.trans_le hmi + dsimp [E] + rw [dite_eq_left hm] + exact h m hm hmi + +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/MatrixDynamics.lean b/lean/OAI/Geometry/QuadricBundles/MatrixDynamics.lean new file mode 100644 index 0000000000000000000000000000000000000000..e010d630a197bffea8dd36c36ff1f3e2541946e1 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/MatrixDynamics.lean @@ -0,0 +1,456 @@ +import OAI.Geometry.QuadricBundles.Gluing + +namespace OAI + +universe u1 u2 u3 u4 + +noncomputable section + +namespace QuadricCounterexample +open Matrix +lemma source_A_det : source_A.det = 1 := by + simp [source_A, Matrix.det_fin_two, source_a_mul_inv] + +lemma source_B_det : source_B.det = 1 := by + simp [source_B, Matrix.det_fin_two, source_s_mul_complement] + +lemma source_A_trace : source_A.trace = 1 := by + simp [source_A, trace_fin_two, source_a_add_inv] + +lemma source_B_trace : source_B.trace = 1 := by + simp [source_B, trace_fin_two] + +lemma matrix_sq_of_det_trace_one + {M : Matrix (Fin 2) (Fin 2) ℂ} (hd : M.det = 1) (ht : M.trace = 1) : + M ^ 2 = M - 1 := by + have h := M.aeval_self_charpoly + rw [Matrix.charpoly_fin_two, ht, hd] at h + simp only [map_add, map_sub, map_pow, Polynomial.aeval_X, + map_one, one_mul] at h + apply eq_sub_iff_add_eq.mpr + apply sub_eq_zero.mp + simpa only [sub_add_eq_add_sub] using h + +lemma matrix_cube_of_det_trace_one + {M : Matrix (Fin 2) (Fin 2) ℂ} (hd : M.det = 1) (ht : M.trace = 1) : + M ^ 3 = -1 := by + have hs := matrix_sq_of_det_trace_one hd ht + calc + M ^ 3 = M * M ^ 2 := by noncomm_ring + _ = M * (M - 1) := by rw [hs] + _ = M ^ 2 - M := by noncomm_ring + _ = -1 := by rw [hs]; abel + +lemma source_A_cube : source_A ^ 3 = -1 := + matrix_cube_of_det_trace_one source_A_det source_A_trace +lemma source_B_cube : source_B ^ 3 = -1 := + matrix_cube_of_det_trace_one source_B_det source_B_trace + +lemma source_A_six : source_A ^ 6 = 1 := by + rw [show (6 : ℕ) = 3 * 2 by norm_num, pow_mul, source_A_cube] + simp +lemma source_B_six : source_B ^ 6 = 1 := by + rw [show (6 : ℕ) = 3 * 2 by norm_num, pow_mul, source_B_cube] + simp + +lemma source_A_inv : source_A⁻¹ = !![source_a⁻¹, 0; 0, source_a] := by + apply Matrix.inv_eq_right_inv + ext i j + fin_cases i <;> fin_cases j <;> + simp [source_A, Matrix.mul_apply, source_a_ne_zero] + +lemma source_relative_trace : (source_A⁻¹ * source_B).trace = -(Real.sqrt 2 : ℂ) := by + have htrace : (source_A⁻¹ * source_B).trace = + source_a⁻¹ * source_s + source_a * (1 - source_s) := by + simp [source_A_inv, source_B, trace_fin_two] + rw [htrace] + rw [source_a_inv_eq, source_a_eq] + unfold source_s + field_simp + ring_nf + rw [Complex.I_sq] + ring + +lemma source_product_trace : (source_A * source_B).trace = 1 + (Real.sqrt 2 : ℂ) := by + have hinv : source_A + source_A⁻¹ = 1 := by + rw [source_A_inv] + ext i j + fin_cases i <;> fin_cases j <;> simp [source_A, source_a_add_inv, add_comm] + have htrace := congrArg Matrix.trace (congrArg (fun M ↦ M * source_B) hinv) + rw [add_mul, trace_add, one_mul, source_relative_trace, source_B_trace] at htrace + linear_combination htrace + +lemma source_abs_product_trace_gt_two : 2 < (source_A * source_B).trace.re := by + rw [source_product_trace] + simp only [Complex.add_re, Complex.one_re, Complex.ofReal_re] + have hsq := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) + have hn := Real.sqrt_nonneg (2 : ℝ) + nlinarith + +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix Filter Topology OnePoint +open scoped LinearAlgebra.Projectivization + +noncomputable def projectiveCoord (v : Fin 2 → ℂ) : OnePoint ℂ := + if v 1 = 0 then ∞ else (v 0 / v 1 : ℂ) + +lemma projectiveCoord_eq (v : Fin 2 → ℂ) (hv : v ≠ 0) : + projectiveCoord v = (OnePoint.equivProjectivization ℂ).symm + (Projectivization.mk ℂ v hv) := by + simp [projectiveCoord, OnePoint.equivProjectivization_symm_apply_mk, + div_eq_mul_inv, mul_comm] + +lemma projectiveCoord_smul (c : ℂ) (hc : c ≠ 0) (v : Fin 2 → ℂ) : + projectiveCoord (c • v) = projectiveCoord v := by + by_cases hv : v 1 = 0 + · simp [projectiveCoord, hv] + · simp [projectiveCoord, hv, hc, mul_div_mul_left] + +lemma projectiveCoord_action (g : GL (Fin 2) ℂ) (v : Fin 2 → ℂ) (hv : v ≠ 0) : + projectiveCoord ((g : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ v) = g • projectiveCoord v := by + have hgv : g • v ≠ 0 := (smul_ne_zero_iff_ne g).mpr hv + change projectiveCoord (g • v) = g • projectiveCoord v + rw [projectiveCoord_eq _ hgv, projectiveCoord_eq _ hv] + apply (OnePoint.equivProjectivization ℂ).injective + simp only [OnePoint.equivProjectivization_smul, Equiv.apply_symm_apply, + Projectivization.smul_mk] + +lemma tendsto_projectiveCoord {α : Type u1} {l : Filter α} + {v : α → Fin 2 → ℂ} {w : Fin 2 → ℂ} + (hv : Tendsto v l (𝓝 w)) (hw : w 1 ≠ 0) : + Tendsto (fun k ↦ projectiveCoord (v k)) l (𝓝 (projectiveCoord w)) := by + have h0 := (tendsto_pi_nhds.mp hv) 0 + have h1 := (tendsto_pi_nhds.mp hv) 1 + have he : ∀ᶠ k in l, v k 1 ≠ 0 := h1.eventually (isOpen_ne.mem_nhds hw) + have hdiv := OnePoint.continuous_coe.continuousAt.tendsto.comp (h0.div h1 hw) + rw [projectiveCoord, ite_eq_right hw] + apply hdiv.congr' + filter_upwards [he] with k hk + simp [projectiveCoord, hk] + +theorem projective_orbit_converges_in_eigenbasis + (g p : GL (Fin 2) ℂ) (lam μ : ℂ) (hlam : lam ≠ 0) (hq : ‖μ / lam‖ < 1) + (hp : p 1 0 ≠ 0) + (hdiag : (g : Matrix (Fin 2) (Fin 2) ℂ) * (p : Matrix (Fin 2) (Fin 2) ℂ) = + (p : Matrix (Fin 2) (Fin 2) ℂ) * Matrix.diagonal ![lam, μ]) + (a b : ℂ) (ha : a ≠ 0) : + Tendsto (fun k : ℕ ↦ (fun x : OnePoint ℂ ↦ g • x)^[k] + (p • projectiveCoord ![a,b])) atTop (𝓝 (p • (∞ : OnePoint ℂ))) := by + let v : ℕ → Fin 2 → ℂ := fun k ↦ + (p : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ ![a, (μ / lam) ^ k * b] + have hnv (k : ℕ) : v k ≠ 0 := by + apply (smul_ne_zero_iff_ne p).mpr + intro h + have hc := congrFun h 0 + simpa using ha hc + have hrec (k : ℕ) : (g : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ v k = lam • v (k+1) := by + dsimp [v] + rw [Matrix.mulVec_mulVec, hdiag, ← Matrix.mulVec_mulVec, ← Matrix.mulVec_smul] + congr 1 + ext i + fin_cases i + · simp + · simp [pow_succ] + field_simp + have haction (k : ℕ) : g • projectiveCoord (v k) = projectiveCoord (v (k+1)) := by + rw [← projectiveCoord_action g _ (hnv k), hrec, projectiveCoord_smul _ hlam] + have hzero : projectiveCoord (v 0) = p • projectiveCoord ![a,b] := by + dsimp [v] + simp only [pow_zero, one_mul] + exact projectiveCoord_action p _ (by intro h; exact ha (congrFun h 0)) + have horbit (k : ℕ) : (fun x : OnePoint ℂ ↦ g • x)^[k] + (p • projectiveCoord ![a,b]) = projectiveCoord (v k) := by + induction k with + | zero => exact hzero.symm + | succ k ih => rw [Function.iterate_succ_apply', ih, haction] + have hlim0 : Tendsto (fun k : ℕ ↦ ![a, (μ / lam)^k * b]) atTop (𝓝 ![a,0]) := by + apply tendsto_pi_nhds.mpr + intro i + fin_cases i + · exact tendsto_const_nhds + · simpa using (tendsto_pow_atTop_nhds_zero_of_norm_lt_one hq).mul_const b + have hc : Continuous (fun w : Fin 2 → ℂ ↦ + (p : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ w) := by fun_prop + have hlim : Tendsto v atTop (𝓝 ((p : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ ![a,0])) := + hc.continuousAt.tendsto.comp hlim0 + have hlast : ((p : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ ![a,0]) 1 ≠ 0 := by + simpa using mul_ne_zero hp ha + have hfinal : projectiveCoord ((p : Matrix (Fin 2) (Fin 2) ℂ) *ᵥ ![a,0]) = + p • (∞ : OnePoint ℂ) := by + rw [projectiveCoord_action p _ (by intro h; exact ha (congrFun h 0))] + simp [projectiveCoord] + have h := tendsto_projectiveCoord hlim hlast + rw [hfinal] at h + simpa only [horbit] using h + +theorem projective_north_south_of_eigenbasis + (g p : GL (Fin 2) ℂ) (lam μ : ℂ) (hlam : lam ≠ 0) (hq : ‖μ / lam‖ < 1) + (hp : p 1 0 ≠ 0) + (hdiag : (g : Matrix (Fin 2) (Fin 2) ℂ) * (p : Matrix (Fin 2) (Fin 2) ℂ) = + (p : Matrix (Fin 2) (Fin 2) ℂ) * Matrix.diagonal ![lam, μ]) : + ∀ x : OnePoint ℂ, x ≠ p • (0 : ℂ) → + Tendsto (fun k : ℕ ↦ (fun x : OnePoint ℂ ↦ g • x)^[k] x) atTop + (𝓝 (p • (∞ : OnePoint ℂ))) := by + intro x hx + have hy : p⁻¹ • x ≠ ((0 : ℂ) : OnePoint ℂ) := by + intro h + apply hx + simpa using congrArg (fun y : OnePoint ℂ ↦ p • y) h + have h : ∀ y : OnePoint ℂ, y ≠ ((0 : ℂ) : OnePoint ℂ) → + Tendsto (fun k : ℕ ↦ (fun z : OnePoint ℂ ↦ g • z)^[k] (p • y)) atTop + (𝓝 (p • (∞ : OnePoint ℂ))) := by + intro y + induction y using OnePoint.rec with + | infty => + intro _ + simpa [projectiveCoord] using + projective_orbit_converges_in_eigenbasis g p lam μ hlam hq hp hdiag 1 0 one_ne_zero + | coe z => + intro hz + have hz0 : z ≠ 0 := fun h ↦ hz (by rw [h]) + simpa [projectiveCoord] using + projective_orbit_converges_in_eigenbasis g p lam μ hlam hq hp hdiag z 1 hz0 + simpa using h (p⁻¹ • x) hy + +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix + +noncomputable def expandingRoot (t : ℝ) : ℝ := (t + Real.sqrt (t^2 - 4)) / 2 +noncomputable def contractingRoot (t : ℝ) : ℝ := (t - Real.sqrt (t^2 - 4)) / 2 + +lemma hyperbolic_roots {t : ℝ} (ht : 2 < t) : + 1 < expandingRoot t ∧ 0 < contractingRoot t ∧ + contractingRoot t < 1 ∧ + expandingRoot t + contractingRoot t = t ∧ + expandingRoot t * contractingRoot t = 1 := by + have hs0 : 0 < t ^ 2 - 4 := by nlinarith + have hs := Real.sq_sqrt hs0.le + have hp := Real.sqrt_pos.mpr hs0 + dsimp [expandingRoot, contractingRoot] + constructor + · nlinarith + constructor + · nlinarith + constructor + · nlinarith + constructor + · ring + · nlinarith + +lemma hyperbolic_norm_ratio {t : ℝ} (ht : 2 < t) : + ‖(contractingRoot t : ℂ) / (expandingRoot t : ℂ)‖ < 1 := by + obtain ⟨hl, hm, hm1, _, _⟩ := hyperbolic_roots ht + rw [← Complex.ofReal_div, Complex.norm_real, Real.norm_eq_abs, + abs_of_pos (div_pos hm (by linarith)), div_lt_one (by linarith)] + linarith + +noncomputable def hyperbolicBasis (M : Matrix (Fin 2) (Fin 2) ℂ) (t : ℝ) : + Matrix (Fin 2) (Fin 2) ℂ := + !![(expandingRoot t : ℂ) - M 1 1, (contractingRoot t : ℂ) - M 1 1; + M 1 0, M 1 0] + +lemma hyperbolicBasis_det_ne_zero {M : Matrix (Fin 2) (Fin 2) ℂ} {t : ℝ} + (ht : 2 < t) (hc : M 1 0 ≠ 0) : (hyperbolicBasis M t).det ≠ 0 := by + have hd : expandingRoot t - contractingRoot t ≠ 0 := by + obtain ⟨hl, _, hm, _, _⟩ := hyperbolic_roots ht + linarith + have hdC : (expandingRoot t : ℂ) - (contractingRoot t : ℂ) ≠ 0 := by exact_mod_cast hd + have hdet : (hyperbolicBasis M t).det = + M 1 0 * ((expandingRoot t : ℂ) - (contractingRoot t : ℂ)) := by + simp [hyperbolicBasis, Matrix.det_fin_two] + ring + rw [hdet] + exact mul_ne_zero hc hdC + +lemma hyperbolicBasis_diagonalizes {M : Matrix (Fin 2) (Fin 2) ℂ} {t : ℝ} + (ht : 2 < t) (htr : M.trace = (t : ℂ)) (hdet : M.det = 1) : + M * hyperbolicBasis M t = hyperbolicBasis M t * + Matrix.diagonal ![(expandingRoot t : ℂ), (contractingRoot t : ℂ)] := by + obtain ⟨_, _, _, hs, hp⟩ := hyperbolic_roots ht + have hsC : (expandingRoot t : ℂ) + (contractingRoot t : ℂ) = (t : ℂ) := by + exact_mod_cast hs + have hpC : (expandingRoot t : ℂ) * (contractingRoot t : ℂ) = 1 := by + exact_mod_cast hp + rw [Matrix.trace_fin_two] at htr + rw [Matrix.det_fin_two] at hdet + ext i j + fin_cases i <;> fin_cases j <;> + simp [hyperbolicBasis, Matrix.mul_apply, Fin.sum_univ_two] + · linear_combination (expandingRoot t : ℂ) * (htr - hsC) - + hdet + hpC + · linear_combination (contractingRoot t : ℂ) * (htr - hsC) - + hdet + hpC + · ring + · ring + +end QuadricCounterexample + +namespace QuadricCounterexample +open Filter Topology Set MeasureTheory + +theorem invariant_measure_ae_endpoints + {X : Type u2} [TopologicalSpace X] [T2Space X] [SecondCountableTopology X] + [MeasurableSpace X] [OpensMeasurableSpace X] + {μ : Measure X} [IsFiniteMeasure μ] {T : X → X} {a b : X} + (hT : MeasurePreserving T μ μ) + (hconverge : ∀ x, x ≠ b → Tendsto (fun k : ℕ ↦ T^[k] x) atTop (𝓝 a)) : + ∀ᵐ x ∂μ, x = a ∨ x = b := by + filter_upwards [hT.conservative.ae_frequently_mem_of_mem_nhds] with x hx + by_cases hxb : x = b + · exact Or.inr hxb + · left + by_contra hxa + obtain ⟨U, V, hU, hV, hxU, haV, huv⟩ := t2_separation hxa + have hf := hx U (hU.mem_nhds hxU) + have he := (hconverge x hxb).eventually (hV.mem_nhds haV) + obtain ⟨k, hkU, hkV⟩ := (hf.and_eventually he).exists + exact Set.disjoint_left.mp huv hkU hkV + +lemma fixed_of_period_three_in_pair {X : Type u3} {f : X → X} {p q x : X} + (hcube : f (f (f x)) = x) (hx : x = p ∨ x = q) + (h1 : f x = p ∨ f x = q) (h2 : f (f x) = p ∨ f (f x) = q) : f x = x := by + have hcollision : x = f x ∨ x = f (f x) ∨ f x = f (f x) := by + rcases hx with hx | hx <;> rcases h1 with h1 | h1 <;> rcases h2 with h2 | h2 <;> + simp_all + rcases hcollision with h | h | h + · exact h.symm + · simpa only [hcube] using congrArg f h + · calc + f x = f (f x) := h + _ = f (f (f x)) := congrArg f h + _ = x := hcube + +theorem no_invariant_measure_of_period_three_north_south + {X : Type u4} [TopologicalSpace X] [T2Space X] [SecondCountableTopology X] + [MeasurableSpace X] [OpensMeasurableSpace X] + {μ : Measure X} [IsFiniteMeasure μ] {A B : X → X} {a b : X} + (hA : MeasurePreserving A μ μ) (hB : MeasurePreserving B μ μ) + (hA3 : ∀ x, A (A (A x)) = x) (hB3 : ∀ x, B (B (B x)) = x) + (hfix : ∀ x, ¬(A x = x ∧ B x = x)) + (hconverge : ∀ x, x ≠ b → + Tendsto (fun k : ℕ ↦ (A ∘ B)^[k] x) atTop (𝓝 a)) : μ = 0 := by + by_contra hμ + let : NeZero μ := ⟨hμ⟩ + have hs := invariant_measure_ae_endpoints (hA.comp hB) hconverge + have hA1 := hA.quasiMeasurePreserving.ae hs + have hA2 := hA.quasiMeasurePreserving.ae hA1 + have hB1 := hB.quasiMeasurePreserving.ae hs + have hB2 := hB.quasiMeasurePreserving.ae hB1 + have he : ∀ᵐ x ∂μ, A x = x ∧ B x = x := by + filter_upwards [hs, hA1, hA2, hB1, hB2] with x hx ha1 ha2 hb1 hb2 + exact ⟨fixed_of_period_three_in_pair (hA3 x) hx ha1 ha2, + fixed_of_period_three_in_pair (hB3 x) hx hb1 hb2⟩ + obtain ⟨x, hx⟩ := he.exists + exact hfix x hx + +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix OnePoint Filter Topology MeasureTheory + +noncomputable def source_A_gl : GL (Fin 2) ℂ := + Matrix.GeneralLinearGroup.mkOfDetNeZero source_A (by rw [source_A_det]; exact one_ne_zero) +noncomputable def source_B_gl : GL (Fin 2) ℂ := + Matrix.GeneralLinearGroup.mkOfDetNeZero source_B (by rw [source_B_det]; exact one_ne_zero) + +@[simp] lemma source_A_gl_val : (source_A_gl : Matrix (Fin 2) (Fin 2) ℂ) = source_A := rfl +@[simp] lemma source_B_gl_val : (source_B_gl : Matrix (Fin 2) (Fin 2) ℂ) = source_B := rfl + +lemma projective_cube_identity {g : GL (Fin 2) ℂ} + (hg : (g : Matrix (Fin 2) (Fin 2) ℂ) ^ 3 = -1) : + ∀ x : OnePoint ℂ, g • (g • (g • x)) = x := by + intro x + have hv : ((g ^ 3 : GL (Fin 2) ℂ) : Matrix (Fin 2) (Fin 2) ℂ) = -1 := by + simpa using hg + calc + g • (g • (g • x)) = (g^3) • x := by simp [pow_succ, mul_smul] + _ = x := by + cases x using OnePoint.rec with + | infty => simp [OnePoint.smul_infty_eq_ite, hv] + | coe z => simp [OnePoint.smul_some_eq_ite, hv] + +lemma source_no_common_fixed_point (x : OnePoint ℂ) : + ¬ (source_A_gl • x = x ∧ source_B_gl • x = x) := by + rintro ⟨hA, hB⟩ + cases x using OnePoint.rec with + | infty => + have hc := OnePoint.smul_infty_eq_self_iff.mp hB + have hn : (Real.sqrt 2 : ℂ) ≠ 0 := by + exact_mod_cast (Real.sqrt_ne_zero'.mpr (by norm_num : (0 : ℝ) < 2)) + simp [source_B_gl, source_B, hn] at hc + | coe z => + have hpoly := Matrix.GeneralLinearGroup.fixpointPolynomial_aeval_eq_zero_iff.mpr hA + have hdiff : source_a - source_a⁻¹ ≠ 0 := by + rw [source_a_inv_eq, source_a_eq] + intro h + have hi := congrArg Complex.im h + simp at hi + have haz : (source_a⁻¹ - source_a) * z = 0 := by + simpa [Matrix.GeneralLinearGroup.fixpointPolynomial, source_A_gl, source_A] using hpoly + have hz : z = 0 := (mul_eq_zero.mp haz).resolve_left (sub_ne_zero.mpr + (Ne.symm (sub_ne_zero.mp hdiff))) + subst z + have hb := Matrix.GeneralLinearGroup.fixpointPolynomial_aeval_eq_zero_iff.mpr hB + simp [Matrix.GeneralLinearGroup.fixpointPolynomial, source_B_gl, source_B] at hb + +lemma source_product_lower_left_ne_zero : (source_A * source_B) 1 0 ≠ 0 := by + have hn : (Real.sqrt 2 : ℂ) ≠ 0 := by + exact_mod_cast (Real.sqrt_ne_zero'.mpr (by norm_num : (0 : ℝ) < 2)) + simp [source_A, source_B, Matrix.mul_apply, source_a_ne_zero, hn] + +noncomputable def source_eigenbasis : GL (Fin 2) ℂ := + Matrix.GeneralLinearGroup.mkOfDetNeZero + (hyperbolicBasis (source_A * source_B) (1 + Real.sqrt 2)) + (hyperbolicBasis_det_ne_zero (by + have hn := Real.sqrt_nonneg (2 : ℝ) + have hs := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) + nlinarith) source_product_lower_left_ne_zero) + +lemma source_north_south : + ∀ x : OnePoint ℂ, x ≠ source_eigenbasis • (0 : ℂ) → + Tendsto (fun k : ℕ ↦ + (fun z : OnePoint ℂ ↦ (source_A_gl * source_B_gl) • z)^[k] x) atTop + (𝓝 (source_eigenbasis • (∞ : OnePoint ℂ))) := by + have ht : 2 < 1 + Real.sqrt 2 := by + have hn := Real.sqrt_nonneg (2 : ℝ) + have hs := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2) + nlinarith + apply projective_north_south_of_eigenbasis (source_A_gl * source_B_gl) + source_eigenbasis (expandingRoot (1 + Real.sqrt 2)) (contractingRoot (1 + Real.sqrt 2)) + · exact_mod_cast (ne_of_gt (lt_trans zero_lt_one (hyperbolic_roots ht).1)) + · exact hyperbolic_norm_ratio ht + · exact source_product_lower_left_ne_zero + · apply hyperbolicBasis_diagonalizes ht + · simpa using source_product_trace + · change (source_A * source_B).det = 1 + rw [Matrix.det_mul, source_A_det, source_B_det, one_mul] + +end QuadricCounterexample + +namespace QuadricCounterexample +open Matrix OnePoint MeasureTheory + +local instance projectiveLineSecondCountable : SecondCountableTopology (OnePoint ℂ) := + (onePointEquivSphereOfFinrankEq (ι := Fin 3) (V := ℂ) + (by simp [Complex.finrank_real_complex])).secondCountableTopology +noncomputable local instance projectiveLineMeasurable : MeasurableSpace (OnePoint ℂ) := borel _ +local instance projectiveLineBorel : BorelSpace (OnePoint ℂ) := ⟨rfl⟩ + +theorem source_no_invariant_finite_measure + (μ : Measure (OnePoint ℂ)) [IsFiniteMeasure μ] + (hA : MeasurePreserving (fun x : OnePoint ℂ ↦ source_A_gl • x) μ μ) + (hB : MeasurePreserving (fun x : OnePoint ℂ ↦ source_B_gl • x) μ μ) : μ = 0 := by + apply no_invariant_measure_of_period_three_north_south hA hB + (projective_cube_identity source_A_cube) (projective_cube_identity source_B_cube) + source_no_common_fixed_point + simpa only [Function.comp_def, mul_smul] using source_north_south + +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/MatrixRepresentative.lean b/lean/OAI/Geometry/QuadricBundles/MatrixRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d17402f6935c9906de118d161a68370794ba20e --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/MatrixRepresentative.lean @@ -0,0 +1,435 @@ +import OAI.Geometry.QuadricBundles.BallAverage + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 u28 u29 u30 u31 u32 u33 u34 u35 u36 u37 u38 + +noncomputable section + +namespace QuadricCounterexample +open Set Metric MeasureTheory Topology Filter Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +open Matrix +open scoped ComplexOrder + +noncomputable def quadraticValue {n : Type u1} [Fintype n] + (H : Matrix n n ℂ) (v : n → ℂ) : ℝ := + (star v ⬝ᵥ (H *ᵥ v)).re + +lemma star_basis {n : Type u2} [DecidableEq n] (i : n) : + star (Pi.single i (1 : ℂ) : n → ℂ) = Pi.single i (1 : ℂ) := by + ext k + by_cases h : k = i <;> simp [h] + +lemma basis_pair {n : Type u3} [Fintype n] [DecidableEq n] + (H : Matrix n n ℂ) (i j : n) : + star (Pi.single i (1 : ℂ)) ⬝ᵥ (H *ᵥ Pi.single j 1) = H i j := by + simp [single_dotProduct] + +lemma quadraticValue_basis {n : Type u4} [Fintype n] [DecidableEq n] + (H : Matrix n n ℂ) (i : n) : quadraticValue H (Pi.single i 1) = (H i i).re := by + rw [quadraticValue, basis_pair] + +lemma quadraticValue_add_basis {n : Type u5} [Fintype n] [DecidableEq n] + (H : Matrix n n ℂ) (i j : n) : + quadraticValue H (Pi.single i 1 + Pi.single j 1) = + (H i i).re + (H i j).re + (H j i).re + (H j j).re := by + simp only [quadraticValue, star_add, mulVec_add, add_dotProduct, dotProduct_add, + basis_pair, Complex.add_re] + ring + +lemma quadraticValue_add_I_basis {n : Type u6} [Fintype n] [DecidableEq n] + (H : Matrix n n ℂ) (i j : n) : + quadraticValue H (Pi.single i 1 + Complex.I • Pi.single j 1) = + (H i i).re - (H i j).im + (H j i).im + (H j j).re := by + simp only [quadraticValue, star_add, star_smul, mulVec_add, mulVec_smul, + add_dotProduct, dotProduct_add, dotProduct_smul, smul_dotProduct, basis_pair, + smul_eq_mul, Complex.star_def, Complex.conj_I, Complex.add_re, + Complex.mul_re, Complex.I_re, Complex.I_im, Complex.neg_re, + Complex.neg_im] + simp only [Complex.add_im, Complex.mul_im, Complex.neg_im, Complex.neg_re, + Complex.I_im, Complex.I_re] + ring + +noncomputable def matrixFromQuadratic {n : Type u7} [DecidableEq n] + (q : (n → ℂ) → ℝ) : Matrix n n ℂ := fun i j ↦ + ⟨(q (Pi.single i 1 + Pi.single j 1) - q (Pi.single i 1) - q (Pi.single j 1)) / 2, + (q (Pi.single i 1) + q (Pi.single j 1) - + q (Pi.single i 1 + Complex.I • Pi.single j 1)) / 2⟩ + +lemma matrixFromQuadratic_value {n : Type u8} [Fintype n] [DecidableEq n] + {H : Matrix n n ℂ} (hH : H.IsHermitian) : + matrixFromQuadratic (quadraticValue H) = H := by + funext i j + apply Complex.ext + all_goals + have hre := congrArg Complex.re (hH.apply i j) + have him := congrArg Complex.im (hH.apply i j) + simp only [Complex.star_def, Complex.conj_re, Complex.conj_im] at hre him + simp only [matrixFromQuadratic, quadraticValue_add_basis, quadraticValue_add_I_basis, + quadraticValue_basis] + linarith + +theorem quadraticValue_pointwise_limit + {n : Type u9} [Fintype n] [DecidableEq n] + {H : ℕ → Matrix n n ℂ} {q : (n → ℂ) → ℝ} + (hH : ∀ k, (H k).PosSemidef) + (hq : ∀ v, Tendsto (fun k ↦ quadraticValue (H k) v) atTop (𝓝 (q v))) : + ∃ M : Matrix n n ℂ, M.PosSemidef ∧ ∀ v, q v = quadraticValue M v := by + let M := matrixFromQuadratic q + have hm (i j : n) : Tendsto (fun k ↦ H k i j) atTop (𝓝 (M i j)) := by + change Tendsto (fun k ↦ H k i j) atTop (𝓝 (matrixFromQuadratic q i j)) + have hrec (k : ℕ) : matrixFromQuadratic (quadraticValue (H k)) i j = H k i j := + congrFun (congrFun (matrixFromQuadratic_value (hH k).1) i) j + simp_rw [← hrec, matrixFromQuadratic, Complex.mk_eq_add_mul_I] + exact (((hq _).sub (hq _)).sub (hq _)).div_const 2 |>.ofReal |>.add + ((((hq _).add (hq _)).sub (hq _)).div_const 2 |>.ofReal |>.mul_const Complex.I) + have hmat : Tendsto H atTop (𝓝 M) := + tendsto_pi_nhds.mpr fun i ↦ tendsto_pi_nhds.mpr fun j ↦ hm i j + have hherm : M.IsHermitian := by + ext i j + exact tendsto_nhds_unique ((hm j i).star) + ((hm i j).congr' (Filter.Eventually.of_forall fun k ↦ ((hH k).1.apply i j).symm)) + have hform (v : n → ℂ) : + Tendsto (fun k ↦ star v ⬝ᵥ ((H k) *ᵥ v)) atTop (𝓝 (star v ⬝ᵥ (M *ᵥ v))) := by + have hc : Continuous (fun N : Matrix n n ℂ ↦ star v ⬝ᵥ (N *ᵥ v)) := by fun_prop + exact hc.continuousAt.tendsto.comp hmat + refine ⟨M, Matrix.PosSemidef.of_dotProduct_mulVec_nonneg hherm (fun v ↦ ?_), fun v ↦ ?_⟩ + · exact ge_of_tendsto (hform v) + (Filter.Eventually.of_forall fun k ↦ (hH k).dotProduct_mulVec_nonneg v) + · exact tendsto_nhds_unique (hq v) (Complex.continuous_re.continuousAt.tendsto.comp (hform v)) + +lemma isClosed_matrix_positive_semidefinite {n : Type u10} [Fintype n] [DecidableEq n] : + IsClosed {M : Matrix n n ℂ | M.PosSemidef} := by + have heq : {M : Matrix n n ℂ | M.PosSemidef} = + {M | M.conjTranspose = M} ∩ ⋂ v : n → ℂ, {M | 0 ≤ star v ⬝ᵥ (M *ᵥ v)} := by + ext M + simp only [mem_ofPred_eq, mem_inter_iff, mem_iInter] + exact ⟨fun h ↦ ⟨h.1, h.dotProduct_mulVec_nonneg⟩, + fun h ↦ Matrix.PosSemidef.of_dotProduct_mulVec_nonneg h.1 h.2⟩ + rw [heq] + refine (isClosed_eq (by fun_prop) continuous_id).inter (isClosed_iInter fun v ↦ ?_) + exact isClosed_le continuous_const (by fun_prop) + +lemma convex_matrix_positive_semidefinite {n : Type u11} [Fintype n] [DecidableEq n] : + Convex ℝ {M : Matrix n n ℂ | M.PosSemidef} := by + intro M hM N hN a b ha hb _ + exact (hM.smul ha).add (hN.smul hb) + +local instance matrixContinuousENorm {n : Type u12} [Fintype n] : + ContinuousENorm (Matrix n n ℂ) := + inferInstanceAs (ContinuousENorm (n → n → ℂ)) + +noncomputable def quadraticValueCLM {n : Type u13} [Fintype n] + (v : n → ℂ) : Matrix n n ℂ →L[ℝ] ℝ where + toFun H := quadraticValue H v + map_add' H K := by + simp only [quadraticValue, add_mulVec, dotProduct_add, Complex.add_re] + map_smul' a H := by + simp [quadraticValue, smul_mulVec, dotProduct_smul, RCLike.real_smul_eq_coe_mul] + cont := by unfold quadraticValue; fun_prop + +lemma quadraticValue_average {α : Type u14} {n : Type u15} [MeasurableSpace α] + [Fintype n] {μ : Measure α} {H : α → Matrix n n ℂ} + (hH : Integrable H μ) (v : n → ℂ) : + quadraticValue (⨍ x, H x ∂μ) v = ⨍ x, quadraticValue (H x) v ∂μ := by + exact ((quadraticValueCLM v).integral_comp_comm hH.to_average).symm + +lemma positive_semidefinite_average {α : Type u16} {n : Type u17} [MeasurableSpace α] + [Fintype n] [DecidableEq n] {μ : Measure α} [IsFiniteMeasure μ] [NeZero μ] + {H : α → Matrix n n ℂ} (hH : Integrable H μ) + (hpos : ∀ᵐ x ∂μ, (H x).PosSemidef) : (⨍ x, H x ∂μ).PosSemidef := + convex_matrix_positive_semidefinite.average_mem isClosed_matrix_positive_semidefinite hpos hH + +lemma quadraticValue_nonneg {n : Type u18} [Fintype n] + {H : Matrix n n ℂ} (hH : H.PosSemidef) (v : n → ℂ) : 0 ≤ quadraticValue H v := + (hH.dotProduct_mulVec_nonneg v).1 + +theorem matrix_ball_infimum_representative + {E : Type u19} {n : Type u20} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + [Fintype n] [DecidableEq n] {H : E → Matrix n n ℂ} + (hH : Integrable H μ) (hpos : ∀ᵐ x ∂μ, (H x).PosSemidef) + {Ω : Set E} (hΩ : IsOpen Ω) {r : ℕ → ℝ} (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) + (hmean : ∀ v k, ∀ᵐ x ∂μ.restrict Ω, + quadraticValue (H x) v ≤ ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) : + ∀ x ∈ Ω, ∃ M : Matrix n n ℂ, M.PosSemidef ∧ ∀ v, + (⨅ k, ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) = quadraticValue M v := by + intro x hx + let Hbar : ℕ → Matrix n n ℂ := fun k ↦ ⨍ y in ball x (r k), H y ∂μ + have hbar (k : ℕ) : (Hbar k).PosSemidef := by + have : Fact (μ (ball x (r k)) < ∞) := ⟨measure_ball_lt_top⟩ + have : NeZero (μ (ball x (r k))) := + ⟨ne_of_gt (Metric.measure_ball_pos μ x (hr k))⟩ + exact positive_semidefinite_average hH.integrableOn (ae_restrict_of_ae hpos) + apply quadraticValue_pointwise_limit hbar + intro v + have hi : Integrable (fun y ↦ quadraticValue (H y) v) μ := + (quadraticValueCLM v).integrable_comp hH + have hp : 0 ≤ᵐ[μ] fun y ↦ quadraticValue (H y) v := + hpos.mono fun y hy ↦ quadraticValue_nonneg hy v + have hl := (ball_infimum_representative_limit hi hp hΩ hr hr0 (hmean v)).2.2.2 x hx + simpa only [Hbar, quadraticValue_average hH.integrableOn] using hl + +lemma continuous_joint_averaged_quadratic + {E : Type u21} {n : Type u22} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + [Fintype n] {H : E → Matrix n n ℂ} (hH : Integrable H μ) (r : ℝ) : + Continuous (fun p : E × (n → ℂ) ↦ quadraticValue (⨍ y in ball p.1 r, H y ∂μ) p.2) := by + have hc : Continuous (fun p : E × (n → ℂ) ↦ ⨍ y in ball p.1 r, H y ∂μ) := + (continuous_ball_average hH r).comp continuous_fst + unfold quadraticValue + fun_prop + +lemma joint_upperSemicontinuous_infimum + {E : Type u23} {n : Type u24} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + [Fintype n] {H : E → Matrix n n ℂ} (hH : Integrable H μ) + (hpos : ∀ᵐ x ∂μ, (H x).PosSemidef) (r : ℕ → ℝ) : + UpperSemicontinuous (fun p : E × (n → ℂ) ↦ + ⨅ k, ⨍ y in ball p.1 (r k), quadraticValue (H y) p.2 ∂μ) := by + apply upperSemicontinuous_ciInf + · intro p + refine ⟨0, ?_⟩ + rintro _ ⟨k, rfl⟩ + exact ball_average_nonneg (hpos.mono fun _ hy ↦ quadraticValue_nonneg hy p.2) _ _ + · intro k + simpa only [quadraticValue_average hH.integrableOn] using + (continuous_joint_averaged_quadratic hH (r k)).upperSemicontinuous + +lemma matrixFromQuadratic_ae_recovery {α : Type u25} {n : Type u26} [MeasurableSpace α] + [Fintype n] [DecidableEq n] {μ : Measure α} + {H : α → Matrix n n ℂ} {q : α → (n → ℂ) → ℝ} + (hH : ∀ᵐ x ∂μ, (H x).IsHermitian) + (hq : ∀ v, (fun x ↦ q x v) =ᵐ[μ] fun x ↦ quadraticValue (H x) v) : + (fun x ↦ matrixFromQuadratic (q x)) =ᵐ[μ] H := by + have hd := ae_all_iff.mpr (fun i : n ↦ hq (Pi.single i 1)) + have hs := ae_all_iff.mpr (fun i : n ↦ ae_all_iff.mpr + (fun j : n ↦ hq (Pi.single i 1 + Pi.single j 1))) + have hi := ae_all_iff.mpr (fun i : n ↦ ae_all_iff.mpr + (fun j : n ↦ hq (Pi.single i 1 + Complex.I • Pi.single j 1))) + filter_upwards [hH, hd, hs, hi] with x hx hdx hsx hix + rw [← matrixFromQuadratic_value hx] + ext i j + all_goals simp only [matrixFromQuadratic, hdx, hsx, hix] + +theorem matrix_regularized_representative + {E : Type u27} {n : Type u28} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + {μ : Measure E} [μ.IsAddHaarMeasure] [Nontrivial E] + [Fintype n] [DecidableEq n] {H : E → Matrix n n ℂ} + (hH : Integrable H μ) (hpos : ∀ᵐ x ∂μ, (H x).PosSemidef) + {Ω : Set E} (hΩ : IsOpen Ω) {r : ℕ → ℝ} (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) + (hmean : ∀ v k, ∀ᵐ x ∂μ.restrict Ω, + quadraticValue (H x) v ≤ ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) : + ∃ M : E → Matrix n n ℂ, + (∀ x ∈ Ω, (M x).PosSemidef) ∧ M =ᵐ[μ.restrict Ω] H ∧ + UpperSemicontinuousOn (fun p : E × (n → ℂ) ↦ quadraticValue (M p.1) p.2) + (Ω ×ˢ univ) ∧ + ∀ x ∈ Ω, ∀ v, Tendsto + (fun k ↦ ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) + atTop (𝓝 (quadraticValue (M x) v)) := by + let q := fun x v ↦ ⨅ k, ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ + let M := fun x ↦ matrixFromQuadratic (q x) + have hxM (x : E) (hx : x ∈ Ω) : (M x).PosSemidef ∧ ∀ v, q x v = quadraticValue (M x) v := by + obtain ⟨N, hN, hqN⟩ := matrix_ball_infimum_representative hH hpos hΩ hr hr0 hmean x hx + have he : M x = N := by + change matrixFromQuadratic (q x) = N + rw [show q x = quadraticValue N from funext hqN, matrixFromQuadratic_value hN.1] + simpa only [he] using And.intro hN hqN + have hqae (v : n → ℂ) : (fun x ↦ q x v) =ᵐ[μ.restrict Ω] + fun x ↦ quadraticValue (H x) v := + ball_infimum_representative_ae ((quadraticValueCLM v).integrable_comp hH) + (hpos.mono fun _ hy ↦ quadraticValue_nonneg hy v) hΩ hr hr0 (hmean v) + refine ⟨M, fun x hx ↦ (hxM x hx).1, + matrixFromQuadratic_ae_recovery (ae_restrict_of_ae (hpos.mono fun _ h ↦ h.1)) hqae, ?_, ?_⟩ + · intro p hp + apply UpperSemicontinuousWithinAt.congr_of_eventuallyEq + (((joint_upperSemicontinuous_infimum hH hpos r).upperSemicontinuousOn + (Ω ×ˢ (univ : Set (n → ℂ)))) p hp) hp + filter_upwards [self_mem_nhdsWithin] with z hz + exact (hxM z.1 hz.1).2 z.2 + · intro x hx v + have hl := (ball_infimum_representative_limit ((quadraticValueCLM v).integrable_comp hH) + (hpos.mono fun _ hy ↦ quadraticValue_nonneg hy v) hΩ hr hr0 (hmean v)).2.2.2 x hx + change Tendsto (fun k ↦ ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) + atTop (𝓝 (quadraticValue (M x) v)) + rw [← (hxM x hx).2 v] + exact hl + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped ENNReal + +lemma integral_ball_translate + {E : Type u29} {F : Type u30} [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + {μ : Measure E} [μ.IsAddHaarMeasure] (f : E → F) (x : E) (r : ℝ) : + (∫ a in ball (0 : E) r, f (x + a) ∂μ) = ∫ y in ball x r, f y ∂μ := by + have he : (fun a : E ↦ x + a) ⁻¹' ball x r = ball 0 r := by + ext a + simp only [mem_preimage, mem_ball, dist_self_add_left, dist_zero_right] + have hh := ((MeasurePreserving.id μ).add_left μ x).setIntegral_preimage_emb + (MeasurableEquiv.addLeft x).measurableEmbedding f (ball x r) + simpa only [id_eq, he] using hh + +theorem DiskPshOn.base_ball_average + {E : Type u31} {V : Type u32} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedSpace ℝ E] [FiniteDimensional ℝ E] + [MeasurableSpace E] [BorelSpace E] [Nontrivial E] + [NormedAddCommGroup V] [NormedSpace ℂ V] [LocallyCompactSpace V] + {μ : Measure E} [μ.IsAddHaarMeasure] + {Ω U : Set E} (hU : IsOpen U) {q : E × V → ℝ} + (hq : DiskPshOn (Ω ×ˢ univ) q) (hc : ContinuousOn q (Ω ×ˢ univ)) + {r : ℝ} (hr : 0 < r) + (hb : ∀ a ∈ closedBall (0 : E) r, ∀ x ∈ U, x + a ∈ Ω) : + DiskPshOn (U ×ˢ univ) (fun p ↦ ⨍ y in ball p.1 r, q (y,p.2) ∂μ) := by + let K := closedBall (0 : E) r + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall (0 : E) r) + let : Fact (μ (ball (0 : E) r) < ∞) := ⟨measure_ball_lt_top⟩ + have hm0 : μ (ball (0 : E) r) ≠ 0 := ne_of_gt (Metric.measure_ball_pos μ 0 hr) + let ν : Measure E := (μ (ball (0 : E) r))⁻¹ • μ.restrict (ball 0 r) + let : IsFiniteMeasure ν := Measure.smul_finite _ (ENNReal.inv_ne_top.mpr hm0) + let η : Measure K := Measure.comap Subtype.val ν + let F := fun a : K ↦ fun p : E × V ↦ q (p.1 + a, p.2) + have hFc : ContinuousOn (Function.uncurry F) (univ ×ˢ (U ×ˢ univ)) := by + exact hc.comp (by fun_prop) (fun p hp ↦ ⟨hb p.1 p.1.property p.2.1 hp.2.1, mem_univ _⟩) + have hFp (a : K) : DiskPshOn (U ×ˢ univ) (F a) := by + exact hq.comp (by fun_prop) (fun p hp ↦ ⟨hb a a.property p.1 hp.1, mem_univ _⟩) + have hi := DiskPshOn.integral_compact_parameter (μ := η) (hU.prod isOpen_univ) hFc hFp + have he (p : E × V) : (∫ a, F a p ∂η) = ⨍ y in ball p.1 r, q (y,p.2) ∂μ := by + change (∫ a : K, q (p.1 + a, p.2) ∂(Measure.comap Subtype.val ν)) = _ + rw [integral_subtype_comap (show MeasurableSet K from measurableSet_closedBall) (fun a : E ↦ q (p.1 + a, p.2))] + change (∫ a in K, q (p.1 + a, p.2) ∂((μ (ball (0 : E) r))⁻¹ • + μ.restrict (ball 0 r))) = _ + rw [Measure.restrict_smul, integral_smul_measure, Measure.restrict_restrict measurableSet_closedBall] + rw [show K ∩ ball (0 : E) r = ball 0 r from inter_eq_right.mpr ball_subset_closedBall] + rw [integral_ball_translate (fun y : E ↦ q (y,p.2)) p.1 r, setAverage_eq, measureReal_def, μ.addHaar_ball_center] + simp only [ENNReal.toReal_inv, μ.addHaar_ball_center] + simpa only [he] using hi + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric + +lemma DiskPshOn.pointwise_limit_of_continuous_bound {E : Type u33} [NormedAddCommGroup E] + [NormedSpace ℂ E] {Ω : Set E} {u : ℕ → E → ℝ} {q B : E → ℝ} + (hu : ∀ n, DiskPshOn Ω (u n)) (hq : UpperSemicontinuousOn q Ω) + (hlim : ∀ x ∈ Ω, Tendsto (fun n ↦ u n x) atTop (𝓝 (q x))) + (hB : Continuous B) (hbound : ∀ n, ∀ x ∈ Ω, ‖u n x‖ ≤ B x) : + DiskPshOn Ω q := by + apply DiskPshOn.pointwise_limit hu hq hlim + intro K hK hKΩ + obtain ⟨C, hC⟩ := hK.bddAbove_image hB.continuousOn + exact ⟨C, fun n x hx ↦ (hbound n x (hKΩ hx)).trans (hC (mem_image_of_mem B hx))⟩ + +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +local instance {n : Type u34} [Fintype n] : ContinuousENorm (Matrix n n ℂ) := + inferInstanceAs (ContinuousENorm (n → n → ℂ)) + +theorem averaged_matrix_limit_psh + {E : Type u35} {n : Type u36} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + [MeasurableSpace E] [BorelSpace E] [Nontrivial E] + [Fintype n] [DecidableEq n] + {μ : Measure E} [μ.IsAddHaarMeasure] + {H : E → Matrix n n ℂ} {Hm : ℕ → E → Matrix n n ℂ} + {Ω U : Set E} (hU : IsOpen U) + (hH : Integrable H μ) (hHm : ∀ m, Integrable (Hm m) μ) + (hpos : ∀ m, ∀ᵐ x ∂μ, (Hm m x).PosSemidef) + (hc : ∀ m, ContinuousOn (fun p : E × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2) + (Ω ×ˢ univ)) + (hp : ∀ m, DiskPshOn (Ω ×ˢ univ) + (fun p : E × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2)) + {C r : ℝ} (hr : 0 < r) + (hb : ∀ a ∈ closedBall (0 : E) r, ∀ x ∈ U, x + a ∈ Ω) + (hbound : ∀ m, ∀ x ∈ Ω, ∀ v, quadraticValue (Hm m x) v ≤ C * ‖v‖ ^ 2) + (hl : ∀ x ∈ U, ∀ v, Tendsto + (fun m ↦ ⨍ y in ball x r, quadraticValue (Hm m y) v ∂μ) + atTop (𝓝 (⨍ y in ball x r, quadraticValue (H y) v ∂μ))) : + DiskPshOn (U ×ˢ univ) + (fun p : E × (n → ℂ) ↦ ⨍ y in ball p.1 r, quadraticValue (H y) p.2 ∂μ) := by + let : FiniteDimensional ℝ E := FiniteDimensional.trans ℝ ℂ E + have hcq := continuous_joint_averaged_quadratic hH r + have huc : UpperSemicontinuousOn + (fun p : E × (n → ℂ) ↦ ⨍ y in ball p.1 r, quadraticValue (H y) p.2 ∂μ) + (U ×ˢ univ) := by + simpa only [quadraticValue_average hH.integrableOn] using hcq.upperSemicontinuous.upperSemicontinuousOn (U ×ˢ univ) + apply DiskPshOn.pointwise_limit_of_continuous_bound + (fun m ↦ (hp m).base_ball_average hU (hc m) hr hb) huc + (fun p hp ↦ hl p.1 hp.1 p.2) (B := fun p : E × (n → ℂ) ↦ C * ‖p.2‖ ^ 2) + (by fun_prop) + intro m p hp + rw [Real.norm_eq_abs, abs_of_nonneg (ball_average_nonneg + ((hpos m).mono fun _ hy ↦ quadraticValue_nonneg hy p.2) _ _)] + have hi : Integrable (fun y : E ↦ quadraticValue (Hm m y) p.2) μ := + (quadraticValueCLM p.2).integrable_comp (hHm m) + apply ball_average_le_const (μ := μ) (x := p.1) hr hi.integrableOn + filter_upwards [ae_restrict_mem measurableSet_ball] with y hy + apply hbound m y _ p.2 + have ha : y - p.1 ∈ closedBall (0 : E) r := by + simpa only [mem_closedBall, dist_zero_right, ← dist_eq_norm] using (mem_ball.mp hy).le + simpa only [add_sub_cancel] using hb (y-p.1) ha p.1 hp.1 + +theorem joint_matrix_regularized_representative + {E : Type u37} {n : Type u38} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + [MeasurableSpace E] [BorelSpace E] [Nontrivial E] + [Fintype n] [DecidableEq n] + {μ : Measure E} [μ.IsAddHaarMeasure] + {H : E → Matrix n n ℂ} {Hm : ℕ → E → Matrix n n ℂ} + {Ω U : Set E} (hU : IsOpen U) + (hH : Integrable H μ) (hHm : ∀ m, Integrable (Hm m) μ) + (hpos : ∀ᵐ x ∂μ, (H x).PosSemidef) + (hposm : ∀ m, ∀ᵐ x ∂μ, (Hm m x).PosSemidef) + (hc : ∀ m, ContinuousOn (fun p : E × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2) + (Ω ×ˢ univ)) + (hp : ∀ m, DiskPshOn (Ω ×ˢ univ) + (fun p : E × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2)) + {C : ℝ} {r : ℕ → ℝ} (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hb : ∀ k, ∀ a ∈ closedBall (0 : E) (r k), ∀ x ∈ U, x + a ∈ Ω) + (hbound : ∀ m, ∀ x ∈ Ω, ∀ v, quadraticValue (Hm m x) v ≤ C * ‖v‖ ^ 2) + (hl : ∀ k, ∀ x ∈ U, ∀ v, Tendsto + (fun m ↦ ⨍ y in ball x (r k), quadraticValue (Hm m y) v ∂μ) + atTop (𝓝 (⨍ y in ball x (r k), quadraticValue (H y) v ∂μ))) + (hmean : ∀ v k, ∀ᵐ x ∂μ.restrict U, + quadraticValue (H x) v ≤ ⨍ y in ball x (r k), quadraticValue (H y) v ∂μ) : + ∃ M : E → Matrix n n ℂ, + (∀ x ∈ U, (M x).PosSemidef) ∧ M =ᵐ[μ.restrict U] H ∧ + DiskPshOn (U ×ˢ univ) (fun p : E × (n → ℂ) ↦ quadraticValue (M p.1) p.2) := by + let : FiniteDimensional ℝ E := FiniteDimensional.trans ℝ ℂ E + obtain ⟨M, hM, hMae, hMusc, hMl⟩ := + matrix_regularized_representative hH hpos hU hr hr0 hmean + refine ⟨M, hM, hMae, ?_⟩ + apply DiskPshOn.pointwise_limit_of_continuous_bound + (fun k ↦ averaged_matrix_limit_psh hU hH hHm hposm hc hp (hr k) (hb k) hbound (hl k)) + hMusc (fun p hp ↦ hMl p.1 hp.1 p.2) + (B := fun p : E × (n → ℂ) ↦ C * ‖p.2‖ ^ 2) (by fun_prop) + intro k p hpU + rw [Real.norm_eq_abs, abs_of_nonneg (ball_average_nonneg + (hpos.mono fun _ hy ↦ quadraticValue_nonneg hy p.2) _ _)] + apply le_of_tendsto (hl k p.1 hpU.1 p.2) + apply Eventually.of_forall + intro m + have hi : Integrable (fun y : E ↦ quadraticValue (Hm m y) p.2) μ := + (quadraticValueCLM p.2).integrable_comp (hHm m) + apply ball_average_le_const (μ := μ) (x := p.1) (hr k) hi.integrableOn + filter_upwards [ae_restrict_mem measurableSet_ball] with y hy + apply hbound m y _ p.2 + have ha : y - p.1 ∈ closedBall (0 : E) (r k) := by + simpa only [mem_closedBall, dist_zero_right, ← dist_eq_norm] using (mem_ball.mp hy).le + simpa only [add_sub_cancel] using hb k (y-p.1) ha p.1 hpU.1 + +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Model.lean b/lean/OAI/Geometry/QuadricBundles/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..6864755523f9bf0c1e3f531e2bc2ab462772c7be --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Model.lean @@ -0,0 +1,172 @@ +import Mathlib + +namespace OAI + +namespace QuadricCounterexample +open Set Filter Topology Metric OnePoint +noncomputable section +open scoped Matrix.Norms.Elementwise ComplexOrder + +abbrev ProjectiveLine := OnePoint ℂ +abbrev QuadricSurface := ProjectiveLine × ProjectiveLine + +def reciprocalP1 (x : ProjectiveLine) : ProjectiveLine := + x.elim (0 : ℂ) (fun z ↦ if z = 0 then ∞ else (z⁻¹ : ℂ)) + +def affineP1 (i : Fin 2) (z : ℂ) : ProjectiveLine := + if i = 0 then reciprocalP1 z else (z : ProjectiveLine) + +def affineQuadric (i : Fin 2 × Fin 2) (z : ℂ × ℂ) : QuadricSurface := + (affineP1 i.1 z.1, affineP1 i.2 z.2) + +def coordP1 (i : Fin 2) (x : ProjectiveLine) : ℂ := + (if i=0 then reciprocalP1 x else x).elim 0 id +def coordQuadric (i : Fin 2 × Fin 2) (x : QuadricSurface) : ℂ × ℂ := + (coordP1 i.1 x.1,coordP1 i.2 x.2) + +def powerP1 (m : ℕ) (x : ProjectiveLine) : ProjectiveLine := + x.elim ∞ (fun z ↦ ((z^m : ℂ) : ProjectiveLine)) +def powerQuadric (m : ℕ) (x : QuadricSurface) : QuadricSurface := + (powerP1 m x.1,powerP1 m x.2) + +abbrev BaseCoordinates := ℂ × ℂ +abbrev FiberCoordinates := Fin 2 → ℂ +abbrev TwoMatrix := Matrix (Fin 2) (Fin 2) ℂ +abbrev BasePolynomial := MvPolynomial (Fin 2) ℂ +def baseEval (p : BasePolynomial) (z : BaseCoordinates) : ℂ := + MvPolynomial.eval ![z.1,z.2] p + +def AlgebraicallyRegularOn (U : Set BaseCoordinates) (f : BaseCoordinates → ℂ) : Prop := + ∀ z ∈ U, ∃ p q : BasePolynomial, baseEval q z ≠ 0 ∧ + ∀ w ∈ U, baseEval q w ≠ 0 → f w=baseEval p w/baseEval q w + +def principalChart (i : Fin 2 × Fin 2) (p : BasePolynomial) : Set QuadricSurface := + {x | x ∈ range (affineQuadric i) ∧ baseEval p (coordQuadric i x) ≠ 0} + +structure AlgebraicRankTwoBundle where + numberOfCharts : ℕ + chart : ℕ → Fin 2 × Fin 2 + equation : ℕ → BasePolynomial + finiteCover : ∀ i, numberOfCharts ≤ i → equation i=0 + covers : ∀ x : QuadricSurface, ∃ i, x ∈ principalChart (chart i) (equation i) + transition : ℕ → ℕ → QuadricSurface → TwoMatrix + transition_self : ∀ i x, x ∈ principalChart (chart i) (equation i) → + transition i i x=1 + transition_mul : ∀ i j k x, + x ∈ principalChart (chart i) (equation i) → + x ∈ principalChart (chart j) (equation j) → + x ∈ principalChart (chart k) (equation k) → + transition i j x * transition j k x=transition i k x + transition_regular : ∀ i j a b, AlgebraicallyRegularOn + {z | baseEval (equation i) z ≠ 0 ∧ + affineQuadric (chart i) z ∈ principalChart (chart j) (equation j)} + (fun z ↦ transition i j (affineQuadric (chart i) z) a b) + +namespace AlgebraicRankTwoBundle +def domain (V : AlgebraicRankTwoBundle) (i : ℕ) : Set QuadricSurface := + principalChart (V.chart i) (V.equation i) +def coordinateDomain (V : AlgebraicRankTwoBundle) (i : ℕ) : Set BaseCoordinates := + {z | baseEval (V.equation i) z ≠ 0} + +def dualTransition (V : AlgebraicRankTwoBundle) (i j : ℕ) (x : QuadricSurface) : TwoMatrix := + (V.transition j i x).transpose +end AlgebraicRankTwoBundle + +def hyperplaneTransition (i j : Fin 2) (x : ProjectiveLine) : ℂ := + if i=j then 1 else coordP1 i x +def polarizationTransition (i j : Fin 2 × Fin 2) (x : QuadricSurface) : ℂ := + hyperplaneTransition i.1 j.1 x.1 * hyperplaneTransition i.2 j.2 x.2 + +def IsPowerPullbackTwist (G : AlgebraicRankTwoBundle) (m : ℕ) + (E : AlgebraicRankTwoBundle) : Prop := + E.numberOfCharts=G.numberOfCharts ∧ E.chart=G.chart ∧ + (∀ i, E.equation i = (MvPolynomial.bind₁ fun j ↦ MvPolynomial.X j ^ m) (G.equation i)) ∧ + ∀ i j x, x ∈ E.domain i → x ∈ E.domain j → + E.transition i j x = polarizationTransition (G.chart i) (G.chart j) x • + G.transition i j (powerQuadric m x) + +structure SymmetricSection (V : AlgebraicRankTwoBundle) (n : ℕ) where + coefficient : ℕ → Fin (n+1) → BaseCoordinates → ℂ + regular : ∀ i k, AlgebraicallyRegularOn (V.coordinateDomain i) (coefficient i k) + compatible : ∀ i j x, x ∈ V.domain i → x ∈ V.domain j → ∀ v : FiberCoordinates, + (∑ k : Fin (n+1), coefficient i k (coordQuadric (V.chart i) x) * + ((V.dualTransition i j x).mulVec v 0)^k.val * + ((V.dualTransition i j x).mulVec v 1)^(n-k.val)) = + ∑ k : Fin (n+1), coefficient j k (coordQuadric (V.chart j) x) * v 0^k.val * v 1^(n-k.val) + +def SymmetricSection.value {V : AlgebraicRankTwoBundle} {n : ℕ} + (s : SymmetricSection V n) (i : ℕ) (x : QuadricSurface) (v : FiberCoordinates) : ℂ := + ∑ k : Fin (n+1), s.coefficient i k (coordQuadric (V.chart i) x) * v 0^k.val * v 1^(n-k.val) + +def ProjectiveAlgebraicCone {N : ℕ} (C : Set (Fin N → ℂ)) : Prop := + ∃ equations : Set (MvPolynomial (Fin N) ℂ), + (∀ p ∈ equations, ∃ d : ℕ, p.IsHomogeneous d) ∧ + C = {y | ∀ p ∈ equations, MvPolynomial.eval y p=0} + +def sectionVector {V : AlgebraicRankTwoBundle} {n N : ℕ} + (s : Fin N → SymmetricSection V n) (i : ℕ) (x : QuadricSurface) + (v : FiberCoordinates) : Fin N → ℂ := fun j ↦ (s j).value i x v + +def GivesClosedProjectiveEmbedding {V : AlgebraicRankTwoBundle} {n N : ℕ} + (s : Fin N → SymmetricSection V n) : Prop := + (∀ i x, x ∈ V.domain i → ∀ v : FiberCoordinates, v ≠ 0 → sectionVector s i x v ≠ 0) ∧ + (∀ i j x y, x ∈ V.domain i → y ∈ V.domain j → ∀ v w : FiberCoordinates, + v ≠ 0 → w ≠ 0 → (∃ c : ℂ, c ≠ 0 ∧ sectionVector s i x v = c • sectionVector s j y w) → + x=y ∧ ∃ c : ℂ, c ≠ 0 ∧ v=c • ((V.dualTransition i j x).mulVec w)) ∧ + ProjectiveAlgebraicCone ({0} ∪ {a | ∃ i x, x ∈ V.domain i ∧ + ∃ v : FiberCoordinates, v ≠ 0 ∧ ∃ c : ℂ, c ≠ 0 ∧ a=c • sectionVector s i x v}) ∧ + ∀ i x, x ∈ V.domain i → ∀ v : FiberCoordinates, v ≠ 0 → + ∃ j : Fin N, ∃ b : Fin 2, v b ≠ 0 ∧ sectionVector s i x v j ≠ 0 ∧ + ∃ p q : Fin 3 → MvPolynomial (Fin N) ℂ, + (∀ k, MvPolynomial.eval (fun l ↦ sectionVector s i x v l / sectionVector s i x v j) (q k) ≠ 0) ∧ + ∀ i' x', x' ∈ V.domain i' → ∀ v' : FiberCoordinates, v' ≠ 0 → + sectionVector s i' x' v' j ≠ 0 → + (∀ k, MvPolynomial.eval (fun l ↦ sectionVector s i' x' v' l / sectionVector s i' x' v' j) (q k) ≠ 0) → + x' ∈ V.domain i ∧ ((V.dualTransition i i' x').mulVec v') b ≠ 0 ∧ + (∀ k : Fin 3, + (![ (coordQuadric (V.chart i) x').1, (coordQuadric (V.chart i) x').2, + ((V.dualTransition i i' x').mulVec v') (1-b) / + ((V.dualTransition i i' x').mulVec v') b ] : Fin 3 → ℂ) k = + MvPolynomial.eval (fun l ↦ sectionVector s i' x' v' l / sectionVector s i' x' v' j) (p k) / + MvPolynomial.eval (fun l ↦ sectionVector s i' x' v' l / sectionVector s i' x' v' j) (q k)) + +def IsAmple (V : AlgebraicRankTwoBundle) : Prop := + ∃ n : ℕ, 0 < n ∧ ∃ N : ℕ, ∃ s : Fin N → SymmetricSection V n, + GivesClosedProjectiveEmbedding s + +def holomorphicMetricDerivative (H : BaseCoordinates → TwoMatrix) + (z u : BaseCoordinates) : TwoMatrix := + (1/2 : ℂ) • (fderiv ℝ H z u - Complex.I • fderiv ℝ H z (Complex.I • u)) + +def metricMixedHessian (H : BaseCoordinates → TwoMatrix) + (z u : BaseCoordinates) : TwoMatrix := + (1/4 : ℂ) • ((fderiv ℝ (fun y ↦ fderiv ℝ H y) z u) u + + (fderiv ℝ (fun y ↦ fderiv ℝ H y) z (Complex.I • u)) (Complex.I • u)) + +structure SmoothHermitianMetric (V : AlgebraicRankTwoBundle) where + dualMatrix : ℕ → BaseCoordinates → TwoMatrix + smooth : ∀ i, ContDiffOn ℝ ((⊤ : ℕ∞) : WithTop ℕ∞) (dualMatrix i) (V.coordinateDomain i) + positive : ∀ i z, z ∈ V.coordinateDomain i → (dualMatrix i z).PosDef + compatible : ∀ i j x, x ∈ V.domain i → x ∈ V.domain j → + dualMatrix j (coordQuadric (V.chart j) x) = + (V.dualTransition i j x).conjTranspose * dualMatrix i (coordQuadric (V.chart i) x) * + V.dualTransition i j x + +def SmoothHermitianMetric.StrictlyGriffithsPositive {V : AlgebraicRankTwoBundle} + (h : SmoothHermitianMetric V) : Prop := + ∀ i z, z ∈ V.coordinateDomain i → ∀ u : BaseCoordinates, u ≠ 0 → + (metricMixedHessian (h.dualMatrix i) z u - + (holomorphicMetricDerivative (h.dualMatrix i) z u).conjTranspose * + (h.dualMatrix i z)⁻¹ * holomorphicMetricDerivative (h.dualMatrix i) z u).PosDef + +def SourceMainTheorem : Prop := + ∃ G : AlgebraicRankTwoBundle, ∃ E : ℕ → AlgebraicRankTwoBundle, + (∀ m, 0 < m → IsPowerPullbackTwist G m (E m)) ∧ + (∀ m, 0 < m → IsAmple (E m)) ∧ + ∃ m₀ : ℕ, 0 < m₀ ∧ ∀ m, m₀ ≤ m → + ¬ ∃ h : SmoothHermitianMetric (E m), h.StrictlyGriffithsPositive + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Noncollapse.lean b/lean/OAI/Geometry/QuadricBundles/Noncollapse.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc48cc23b8b21ca9545546091d1a30cd2dc1dfe3 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Noncollapse.lean @@ -0,0 +1,271 @@ +import OAI.Geometry.QuadricBundles.DualForms + +namespace OAI + +universe u1 u2 u3 + +noncomputable section + +namespace QuadricCounterexample +open Matrix Complex Filter Topology BigOperators Set Metric MeasureTheory +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +lemma norm_matrix_pair_le {n : Type u1} [Fintype n] + (H : Matrix n n ℂ) (v w : n → ℂ) {C : ℝ} + (hC : 0 ≤ C) (hb : ∀ i j, ‖H i j‖ ≤ C) : + ‖star v ⬝ᵥ H *ᵥ w‖ ≤ (Fintype.card n : ℝ)^2 * C * ‖v‖ * ‖w‖ := by + change ‖∑ i, star (v i) * ∑ j, H i j * w j‖ ≤ _ + simp_rw [Finset.mul_sum] + calc + _ ≤ ∑ i, ∑ j, ‖star (v i) * (H i j * w j)‖ := + (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ ↦ norm_sum_le _ _) + _ ≤ ∑ _i : n, ∑ _j : n, ‖v‖ * (C * ‖w‖) := by + apply Finset.sum_le_sum; intro i _ + apply Finset.sum_le_sum; intro j _ + rw [norm_mul, norm_star, norm_mul] + exact mul_le_mul (norm_le_pi_norm v i) + (mul_le_mul (hb i j) (norm_le_pi_norm w j) (norm_nonneg _) hC) + (mul_nonneg (norm_nonneg _) (norm_nonneg _)) (norm_nonneg _) + _ = _ := by simp [pow_two]; ring + +lemma quadraticValue_sub_bound {n : Type u2} [Fintype n] + (H : Matrix n n ℂ) (v w : n → ℂ) {C : ℝ} + (hC : 0 ≤ C) (hb : ∀ i j, ‖H i j‖ ≤ C) : + |quadraticValue H v - quadraticValue H w| ≤ + (Fintype.card n : ℝ)^2 * C * ‖v-w‖ * (‖v‖+‖w‖) := by + have he : star v ⬝ᵥ H *ᵥ v - star w ⬝ᵥ H *ᵥ w = + star (v-w) ⬝ᵥ H *ᵥ v + star w ⬝ᵥ H *ᵥ (v-w) := by + simp only [star_sub, sub_dotProduct, Matrix.mulVec_sub, dotProduct_sub] + ring + calc + _ = |(star v ⬝ᵥ H *ᵥ v - star w ⬝ᵥ H *ᵥ w).re| := by + simp [quadraticValue] + _ ≤ ‖star v ⬝ᵥ H *ᵥ v - star w ⬝ᵥ H *ᵥ w‖ := Complex.abs_re_le_norm _ + _ ≤ ‖star (v-w) ⬝ᵥ H *ᵥ v‖ + ‖star w ⬝ᵥ H *ᵥ (v-w)‖ := by + rw [he]; exact norm_add_le _ _ + _ ≤ (Fintype.card n : ℝ)^2 * C * ‖v-w‖ * ‖v‖ + + (Fintype.card n : ℝ)^2 * C * ‖w‖ * ‖v-w‖ := + add_le_add (norm_matrix_pair_le H _ _ hC hb) (norm_matrix_pair_le H _ _ hC hb) + _ = _ := by ring + +theorem quadraticValue_moving_vector {n : Type u3} [Fintype n] + (H : ℕ → Matrix n n ℂ) {v : ℕ → n → ℂ} {w : n → ℂ} {C : ℝ} + (hC : 0 ≤ C) (hb : ∀ k i j, ‖H k i j‖ ≤ C) + (hv : Tendsto v atTop (𝓝 w)) : + Tendsto (fun k ↦ quadraticValue (H k) (v k) - quadraticValue (H k) w) + atTop (𝓝 0) := by + have ht : Tendsto (fun k ↦ (Fintype.card n : ℝ)^2 * C * ‖v k-w‖ * (‖v k‖+‖w‖)) + atTop (𝓝 0) := by + have hs : Tendsto (fun k ↦ ‖v k-w‖) atTop (𝓝 ‖w-w‖) := + (hv.sub tendsto_const_nhds).norm + have hh : Tendsto (fun k ↦ (Fintype.card n : ℝ)^2 * C * ‖v k-w‖ * (‖v k‖+‖w‖)) + atTop (𝓝 ((Fintype.card n : ℝ)^2 * C * ‖w-w‖ * (‖w‖+‖w‖))) := + (tendsto_const_nhds.mul hs).mul (hv.norm.add tendsto_const_nhds) + simpa using hh + apply squeeze_zero_norm + (fun k ↦ by simpa only [Real.norm_eq_abs] using + quadraticValue_sub_bound (H k) (v k) w hC (hb k)) ht + +lemma nonnegative_usc_integrableOn_ball {Ω : Set (ℂ × ℂ)} {q : ℂ × ℂ → ℝ} + (hq : UpperSemicontinuousOn q Ω) (hpos : ∀ x ∈ Ω, 0 ≤ q x) + {x : ℂ × ℂ} {r : ℝ} (hb : closedBall x r ⊆ Ω) : + IntegrableOn q (ball x r) := by + obtain ⟨C,hC⟩ := (hq.mono hb).bddAbove_of_isCompact (isCompact_closedBall x r) + have hmeas : AEStronglyMeasurable q (volume.restrict (ball x r)) := + (aemeasurable_restrict_of_measurable_subtype measurableSet_ball + (upperSemicontinuousOn_iff_restrict.mpr + (hq.mono (ball_subset_closedBall.trans hb))).measurable).aestronglyMeasurable + exact (integrableOn_const (C := C) + (measure_ne_top_of_subset ball_subset_closedBall + (isCompact_closedBall x r).measure_ne_top)).mono' hmeas + ((ae_restrict_mem measurableSet_ball).mono fun y hy ↦ by + rw [Real.norm_eq_abs, abs_of_nonneg (hpos y (hb (ball_subset_closedBall hy)))] + exact hC (mem_image_of_mem _ (ball_subset_closedBall hy))) + +local instance : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + +theorem moving_points_force_nonzero_limit + {Ω : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) + {u : ℕ → (ℂ × ℂ) → ℝ} {q : (ℂ × ℂ) → ℝ} + (hu : ∀ k, DiskPshOn Ω (u k)) (hpos : ∀ k x, x ∈ Ω → 0 ≤ u k x) + {xm : ℕ → ℂ × ℂ} {x : ℂ × ℂ} {r : ℝ} (hr : 0 < r) + (hb : closedBall x (3*r) ⊆ Ω) + (hx : Tendsto xm atTop (𝓝 x)) + (hn : Tendsto (fun k ↦ u k (xm k)) atTop (𝓝 1)) + (hl : Tendsto (fun k ↦ ⨍ y in ball x (2*r), u k y) atTop + (𝓝 (⨍ y in ball x (2*r), q y))) : + ∃ y ∈ ball x (2*r), q y ≠ 0 := by + have hb2 : closedBall x (2*r) ⊆ Ω := + (closedBall_subset_closedBall (by linarith)).trans hb + have hv (c : ℂ × ℂ) {s : ℝ} (hs : 0 < s) : 0 < (volume (ball c s)).toReal := + ENNReal.toReal_pos (ne_of_gt (Metric.measure_ball_pos volume c hs)) + (measure_ne_top_of_subset ball_subset_closedBall (isCompact_closedBall c s).measure_ne_top) + have hV := hv x (show 0 < 2*r by positivity) + have hW := hv (0 : ℂ × ℂ) hr + let a : ℝ := (volume (ball x (2*r))).toReal⁻¹ * + ((volume (ball (0 : ℂ × ℂ) r)).toReal * (1/2)) + apply nonzero_of_average_limit measurableSet_ball (a := a) + (mul_pos (inv_pos.mpr hV) (mul_pos hW (by norm_num))) hl + have hxe : ∀ᶠ k in atTop, dist (xm k) x < r := + hx.eventually (ball_mem_nhds x hr) + have hne : ∀ᶠ k in atTop, (1/2 : ℝ) ≤ u k (xm k) := + ((tendsto_order.mp hn).1 (1/2) (by norm_num)).mono fun _ h ↦ h.le + filter_upwards [hxe,hne] with k hk hn' + have hi := nonnegative_usc_integrableOn_ball (hu k).1 (hpos k) hb2 + have hm := (hu k).moving_base_mass hΩ hr hk hb + (fun y hy ↦ hpos k y (hb2 (ball_subset_closedBall hy))) hi hn' + simpa [a, setAverage_eq, smul_eq_mul, measureReal_def] using + mul_le_mul_of_nonneg_left hm (inv_nonneg.mpr hV.le) + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +namespace ExtractedTrace +variable {D : EqualizerData} {ex : ℕ → ℕ} {P : ∀ k, TwistedPshForm D (ex k)} + (X : ExtractedTrace ex P) + +lemma averages_globalValue (i : StandardChart) (n : ℕ) (x : BaseCoordinates) (r : ℝ) + (v : FiberCoordinates) (hb : ball x r ⊆ traceInterior (i,n)) : + Tendsto (fun k ↦ ⨍ y in ball x r, (P (X.subsequence k)).value i (y,v)) atTop + (𝓝 (⨍ y in ball x r, X.globalValue i (y,v))) := by + have he (k : ℕ) : (⨍ y in ball x r, quadraticValue (cutoffTrace (P (X.subsequence k)) (i,n) y) v)= + ⨍ y in ball x r, (P (X.subsequence k)).value i (y,v) := by + apply setAverage_congr_fun measurableSet_ball + apply Eventually.of_forall + intro y hy + rw [cutoffTrace_eq _ _ (traceDomain_subset_support (i,n) (traceInterior_subset_domain (i,n) (hb hy)))] + rfl + have hq : (⨍ y in ball x r, quadraticValue (X.matrix (i,n) y) v)= + ⨍ y in ball x r, X.globalValue i (y,v) := by + apply setAverage_congr_fun measurableSet_ball + apply Eventually.of_forall + intro y hy + exact (X.globalValue_eq_value i n (p := (y,v)) (hb hy)).symm + simpa only [he,hq] using X.averages (i,n) x r v hb + +lemma globalValue_nonzero_of_sequence + (i : StandardChart) (φ : ℕ → ℕ) (hφ : StrictMono φ) + (z : ℕ → BaseCoordinates) (v : ℕ → FiberCoordinates) + (x : BaseCoordinates) (w : FiberCoordinates) + (hxlim : Tendsto z atTop (𝓝 x)) (hvlim : Tendsto v atTop (𝓝 w)) + (hxn : dist x 0 ≤ 1) + (hbnd : ∀ k t, (P (X.subsequence (φ k))).value i (z k,t) ≤ ‖t‖^2) + (hnorm : Tendsto (fun k ↦ (P (X.subsequence (φ k))).value i (z k,v k)) atTop (𝓝 1)) : + ∃ y, X.globalValue i (y,w) ≠ 0 := by + let seq (k : ℕ) := X.subsequence (φ k) + have hcoeff (k : ℕ) (b c : Fin 2) : ‖(P (seq k)).matrix i (z k) b c‖ ≤ 4 := by + have hm : ‖(P (seq k)).matrix i (z k)‖ ≤ 4 * 1 := + norm_matrix_of_quadratic_bound ((P (seq k)).positive i _).posSemidef + (C := 1) (by norm_num) + (fun t ↦ by simpa only [one_mul, TwistedPshForm.value] using hbnd k t) + calc + _ ≤ ‖(P (seq k)).matrix i (z k) b‖ := norm_le_pi_norm _ c + _ ≤ ‖(P (seq k)).matrix i (z k)‖ := norm_le_pi_norm _ b + _ ≤ 4 := by simpa only [mul_one] using hm + have hdiff := quadraticValue_moving_vector (fun k ↦ (P (seq k)).matrix i (z k)) + (by norm_num : (0:ℝ)≤4) hcoeff hvlim + have hfixed : Tendsto (fun k ↦ (P (seq k)).value i (z k,w)) atTop (𝓝 1) := by + have h := hnorm.sub hdiff + simpa only [TwistedPshForm.value,seq,sub_sub_cancel,sub_zero] using h + have hball : closedBall x (3*(1/4:ℝ)) ⊆ traceInterior (i,0) := by + apply closedBall_subset_ball' + simp only [Nat.cast_zero, zero_add] + linarith + have hb : ball x (2*(1/4:ℝ)) ⊆ traceInterior (i,0) := + ball_subset_closedBall.trans ((closedBall_subset_closedBall (by norm_num)).trans hball) + have hav := (X.averages_globalValue i 0 x (2*(1/4:ℝ)) w hb).comp hφ.tendsto_atTop + have hp (k : ℕ) : DiskPshOn (traceInterior (i,0)) + (fun y : BaseCoordinates ↦ (P (seq k)).value i (y,w)) := + ((P (seq k)).psh i).comp (f := fun y : BaseCoordinates ↦ (y,w)) + (by fun_prop) (mapsTo_univ _ _) + obtain ⟨y,_,hy⟩ := moving_points_force_nonzero_limit (Ω := traceInterior (i,0)) isOpen_ball hp + (fun k y _ ↦ (P (seq k)).value_nonneg i y w) + (by norm_num : (0:ℝ)<1/4) hball hxlim hfixed hav + exact ⟨y,hy⟩ + +theorem globalValue_nonzero + (hP : ∀ k i z, ‖z‖≤1 → ∀ v, (P k).value i (z,v)≤‖v‖^2) + (hN : ∀ k, ∃ i z v, ‖z‖≤1 ∧ ‖v‖≤1 ∧ (P k).value i (z,v)=1) : + ∃ i z v, X.globalValue i (z,v)≠0 := by + choose chart z v hz hv hn using hN + let S := StandardChart × (BaseCoordinates × FiberCoordinates) + let p (k : ℕ) : S := (chart (X.subsequence k),(z (X.subsequence k),v (X.subsequence k))) + let K : Set S := univ ×ˢ (closedBall 0 1 ×ˢ closedBall 0 1) + have hK : IsCompact K := isCompact_univ.prod ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hp (k : ℕ) : p k∈K := by + exact ⟨mem_univ _,by simpa only [mem_closedBall,dist_zero_right] using hz (X.subsequence k), + by simpa only [mem_closedBall,dist_zero_right] using hv (X.subsequence k)⟩ + obtain ⟨a,ha,φ,hφ,hlim⟩ := hK.isSeqCompact.subseq_of_frequently_in (x := p) (Frequently.of_forall hp) + let i : StandardChart := a.1 + let x : BaseCoordinates := a.2.1 + let w : FiberCoordinates := a.2.2 + let seq (k : ℕ) := X.subsequence (φ k) + have hxlim : Tendsto (fun k ↦ z (seq k)) atTop (𝓝 x) := + ((continuous_fst.comp continuous_snd).tendsto a).comp hlim + have hvlim : Tendsto (fun k ↦ v (seq k)) atTop (𝓝 w) := + ((continuous_snd.comp continuous_snd).tendsto a).comp hlim + have hilim : ∀ᶠ k in atTop, chart (seq k)=i := by + have hi : Tendsto (fun k ↦ chart (seq k)) atTop (𝓝 i) := + (continuous_fst.tendsto a).comp hlim + exact hi.eventually ((isOpen_discrete {i}).mem_nhds (mem_singleton i)) + have hnorm : Tendsto (fun k ↦ (P (seq k)).value i (z (seq k),v (seq k))) atTop (𝓝 1) := by + apply tendsto_const_nhds.congr' + filter_upwards [hilim] with k hk + rw [← hk,hn] + obtain ⟨y,hy⟩ := X.globalValue_nonzero_of_sequence i φ hφ + (fun k ↦ z (seq k)) (fun k ↦ v (seq k)) x w hxlim hvlim ha.2.1 + (fun k t ↦ hP (seq k) i _ (hz (seq k)) t) hnorm + exact ⟨i,y,w,hy⟩ +end ExtractedTrace +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +def ExtractedTrace.pshDualForm {D : EqualizerData} {ex : ℕ → ℕ} + {P : ∀ k, TwistedPshForm D (ex k)} (X : ExtractedTrace ex P) + (hex : Tendsto ex atTop atTop) : D.PshDualForm where + value := X.globalValue + quadratic i z := ⟨X.globalMatrix i z,X.globalMatrix_positive i z,fun _ ↦ rfl⟩ + psh := X.globalValue_psh + compatible i j _ hz v := X.globalValue_change hex i j hz v + +theorem no_unbounded_positive_metrics (ex : ℕ → ℕ) (hex : ∀ k, 0 < ex k) + (hlim : Tendsto ex atTop atTop) + (hmetric : ∀ k, ∃ h : SmoothHermitianMetric + (powerPullbackTwist sourceGraphScalars.equalizerData.bundle (ex k) (hex k)), + h.StrictlyGriffithsPositive) : False := by + choose h hp using hmetric + have hn (k : ℕ) := ((h k).tracedForm (hex k) (hp k)).exists_normalized + choose P hP hN using hn + obtain ⟨X⟩ := exists_extractedTrace hex P hP + obtain ⟨i,z,v,hv⟩ := X.globalValue_nonzero hP hN + exact hv ((X.pshDualForm hlim).source_value_zero i z v) + +theorem source_eventually_no_positive_metric : + ∃ m₀ : ℕ, 0 < m₀ ∧ ∀ m (hm : 0 < m), m₀ ≤ m → + ¬ ∃ h : SmoothHermitianMetric + (powerPullbackTwist sourceGraphScalars.equalizerData.bundle m hm), + h.StrictlyGriffithsPositive := by + by_contra hh + push Not at hh + have hseq (k : ℕ) := hh (k+1) (by omega) + choose ex hex hbound hm using hseq + have hlim : Tendsto ex atTop atTop := by + apply tendsto_atTop_mono (f := fun k : ℕ ↦ k) + · intro k; exact (Nat.le_succ k).trans (hbound k) + · exact tendsto_id + exact no_unbounded_positive_metrics ex hex hlim hm +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Plurisubharmonic.lean b/lean/OAI/Geometry/QuadricBundles/Plurisubharmonic.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f6708b78c38362c2b093398dda9be706c9371fc --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Plurisubharmonic.lean @@ -0,0 +1,396 @@ +import OAI.Geometry.QuadricBundles.DiskHessian + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory +noncomputable section +open scoped Pointwise +def radialIntegral (u : ℂ → ℝ) (c z : ℂ) : ℝ := + ∫ a in closedBall (0 : ℂ) 1, u (c + a*z) + +lemma radialIntegral_zero (u : ℂ → ℝ) (c : ℂ) : + radialIntegral u c 0 = (volume (closedBall (0 : ℂ) 1)).toReal * u c := by + simp [radialIntegral,measureReal_def] + +lemma radialIntegral_rotation (u : ℂ → ℝ) (c z : ℂ) (η : Circle) : + radialIntegral u c ((η : ℂ)*z) = radialIntegral u c z := by + have he : (rotation η) ⁻¹' closedBall (0 : ℂ) 1 = closedBall 0 1 := by + ext a + simp only [mem_preimage,mem_closedBall,dist_zero_right,rotation_apply, + norm_mul,Circle.norm_coe,one_mul] + have hp := (rotation η).measurePreserving.restrict_preimage (s := closedBall (0 : ℂ) 1) measurableSet_closedBall + rw [he] at hp + have hi := hp.integral_comp (rotation η).toHomeomorph.measurableEmbedding + (fun a : ℂ ↦ u (c+a*z)) + simpa only [radialIntegral,rotation_apply,mul_assoc,mul_left_comm] using hi + +lemma radialIntegral_eq_of_norm_eq (u : ℂ → ℝ) (c : ℂ) {z w : ℂ} + (h : ‖z‖ = ‖w‖) : radialIntegral u c z = radialIntegral u c w := by + by_cases hw : w=0 + · have hz : z=0 := norm_eq_zero.mp (by simpa [hw] using h) + simp [hw,hz] + · let η : Circle := ⟨z/w,by change z/w ∈ sphere (0 : ℂ) 1; rw [mem_sphere_zero_iff_norm]; simp [h,norm_ne_zero_iff.mpr hw]⟩ + have he : (η : ℂ)*w=z := by simp [η,div_mul_cancel₀ _ hw] + rw [← he] + exact radialIntegral_rotation u c w η + +lemma radialIntegral_pos_radius (u : ℂ → ℝ) (c : ℂ) {R : ℝ} (hR : 0 < R) : + radialIntegral u c (R : ℂ) = (R^2)⁻¹ * ∫ y in closedBall c R, u y := by + have hs : R • closedBall (0 : ℂ) 1 = closedBall 0 R := by + simpa [abs_of_nonneg hR.le] using smul_closedBall' hR.ne' (0 : ℂ) 1 + have hi := Measure.setIntegral_comp_smul_of_pos volume + (fun y : ℂ ↦ u (c+y)) (closedBall 0 1) hR + rw [hs] at hi + have ht := (measurePreserving_add_left volume c).setIntegral_image_emb + (Homeomorph.addLeft c).measurableEmbedding u (closedBall (0 : ℂ) R) + have he : (fun y : ℂ ↦ c+y) '' closedBall 0 R = closedBall c R := by + ext y + constructor + · rintro ⟨a,ha,rfl⟩ + simpa only [mem_closedBall,dist_zero_right,dist_self_add_left] using ha + · intro hy + refine ⟨y-c,?_,by ring⟩ + simpa only [mem_closedBall,dist_zero_right,dist_eq_norm,sub_zero] using hy + rw [he] at ht + simp only [Complex.finrank_real_complex,smul_eq_mul] at hi + simpa only [radialIntegral,Complex.real_smul,mul_comm] using + hi.trans (congrArg (fun t : ℝ ↦ (R^2)⁻¹*t) ht.symm) + +attribute [local instance] Measure.Subtype.measureSpace + +lemma complex_closedBall_ae_ball (c : ℂ) (r : ℝ) : + closedBall c r =ᵐ[volume] ball c r := by + have h := measure_eq_zero_iff_ae_notMem.mp (Measure.addHaar_sphere volume c r) + filter_upwards [h] with x hx + apply propext + exact ⟨fun hh ↦ lt_of_le_of_ne hh (by simpa only [mem_sphere] using hx), + fun hx ↦ mem_closedBall.mpr (mem_ball.mp hx).le⟩ + +lemma compact_integral_continuousOn + {α : Type u1} [TopologicalSpace α] [CompactSpace α] [T2Space α] + [MeasurableSpace α] [BorelSpace α] [SecondCountableTopology α] + {μ : Measure α} [IsFiniteMeasure μ] {c : ℂ} {r : ℝ} + {F : α → ℂ → ℝ} + (hF : ContinuousOn (Function.uncurry F) (univ ×ˢ closedBall c r)) : + ContinuousOn (fun z ↦ ∫ a, F a z ∂μ) (closedBall c r) := by + have hc : Continuous (fun p : (closedBall c r) × α ↦ F p.2 p.1) := + hF.comp_continuous (f := fun p : (closedBall c r) × α ↦ (p.2,(p.1 : ℂ))) + (by fun_prop) (fun p ↦ ⟨mem_univ _,p.1.property⟩) + have hi := continuous_parametric_integral_of_continuous (μ := μ) + (f := fun z : closedBall c r ↦ fun a : α ↦ F a z) hc isCompact_univ + apply continuousOn_iff_continuous_domRestrict.mpr + convert hi using 1 + ext z + simp only [setIntegral_univ,Set.domRestrict_apply] + +def radialLinear (a : ℂ) : ℂ →L[ℝ] ℂ := ContinuousLinearMap.mul ℝ ℂ a +@[simp] lemma radialLinear_apply (a z : ℂ) : radialLinear a z=a*z := rfl + +def radialFirst (u : ℂ → ℝ) (c : ℂ) (a z : ℂ) : ℂ →L[ℝ] ℝ := + (fderiv ℝ u (c+a*z)).comp (radialLinear a) +def radialSecond (u : ℂ → ℝ) (c : ℂ) (a z : ℂ) : ℂ →L[ℝ] ℂ →L[ℝ] ℝ := + ((ContinuousLinearMap.compL ℝ ℂ ℂ ℝ).flip (radialLinear a)).comp + ((fderiv ℝ (fderiv ℝ u) (c+a*z)).comp (radialLinear a)) + +@[simp] lemma radialSecond_apply (u : ℂ → ℝ) (c a z v w : ℂ) : + radialSecond u c a z v w = + (fderiv ℝ (fderiv ℝ u) (c+a*z) (a*v)) (a*w) := rfl + +lemma radialFirst_hasFDerivAt {u : ℂ → ℝ} {c a z : ℂ} + (hu : DifferentiableAt ℝ u (c+a*z)) : + HasFDerivAt (fun x : ℂ ↦ u (c+a*x)) (radialFirst u c a z) z := by + exact hu.hasFDerivAt.comp z ((radialLinear a).hasFDerivAt.const_add c) + +lemma radialSecond_hasFDerivAt {u : ℂ → ℝ} {c a z : ℂ} + (hu : DifferentiableAt ℝ (fderiv ℝ u) (c+a*z)) : + HasFDerivAt (radialFirst u c a) (radialSecond u c a z) z := by + exact ((ContinuousLinearMap.compL ℝ ℂ ℂ ℝ).flip (radialLinear a)).hasFDerivAt.comp z + (hu.hasFDerivAt.comp z ((radialLinear a).hasFDerivAt.const_add c)) + +lemma radialFamily_maps_closedBall {c : ℂ} {R : ℝ} (_hR : 0 ≤ R) + (a : closedBall (0 : ℂ) 1) (z : ℂ) (hz : z∈closedBall 0 R) : + c+(a : ℂ)*z ∈ closedBall c R := by + rw [mem_closedBall,dist_self_add_left,norm_mul] + have ha : ‖(a : ℂ)‖≤1 := by simpa only [mem_closedBall,dist_zero_right] using a.property + have hz' : ‖z‖≤R := by simpa only [mem_closedBall,dist_zero_right] using hz + nlinarith [mul_le_mul ha hz' (norm_nonneg z) (by norm_num : (0 : ℝ)≤1)] + +lemma radialFamily_continuous {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hR : 0≤R) (hu : ContinuousOn u D) (hb : closedBall c R⊆D) : + ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ u (c+(p.1 : ℂ)*p.2)) + (univ ×ˢ closedBall 0 R) := by + exact hu.comp (by fun_prop) (fun p hp ↦ hb (radialFamily_maps_closedBall hR p.1 p.2 hp.2)) + +lemma radialFirst_continuous {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hD : IsOpen D) (hR : 0≤R) (hu : ContDiffOn ℝ 2 u D) (hb : closedBall c R⊆D) : + ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ radialFirst u c p.1 p.2) + (univ ×ˢ closedBall 0 R) := by + have hfd : ContinuousOn (fderiv ℝ u) D := + (hu.fderiv_of_isOpen hD (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).continuousOn + have hf := hfd.comp (show ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ + c+(p.1 : ℂ)*p.2) (univ ×ˢ closedBall 0 R) by fun_prop) + (fun p hp ↦ hb (radialFamily_maps_closedBall hR p.1 p.2 hp.2)) + exact hf.clm_comp (show ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ radialLinear p.1) + (univ ×ˢ closedBall 0 R) from (ContinuousLinearMap.mul ℝ ℂ).continuous.continuousOn.comp + (by fun_prop) (mapsTo_univ _ _)) + +lemma radialSecond_continuous {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hD : IsOpen D) (hR : 0≤R) (hu : ContDiffOn ℝ 2 u D) (hb : closedBall c R⊆D) : + ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ radialSecond u c p.1 p.2) + (univ ×ˢ closedBall 0 R) := by + have hfd : ContinuousOn (fderiv ℝ (fderiv ℝ u)) D := + ((hu.fderiv_of_isOpen hD (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))).fderiv_of_isOpen + hD (by norm_num : 0+1 ≤ (1 : WithTop ℕ∞))).continuousOn + have hf := hfd.comp (show ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ + c+(p.1 : ℂ)*p.2) (univ ×ˢ closedBall 0 R) by fun_prop) + (fun p hp ↦ hb (radialFamily_maps_closedBall hR p.1 p.2 hp.2)) + have hL : ContinuousOn (fun p : closedBall (0 : ℂ) 1 × ℂ ↦ radialLinear p.1) + (univ ×ˢ closedBall 0 R) := + (ContinuousLinearMap.mul ℝ ℂ).continuous.continuousOn.comp (by fun_prop) (mapsTo_univ _ _) + exact (((ContinuousLinearMap.compL ℝ ℂ ℂ ℝ).flip).continuous.comp_continuousOn hL).clm_comp + (hf.clm_comp hL) + +lemma radialIntegral_C2 {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hD : IsOpen D) (hR : 0.differentiableAt (by norm_num)) + have hd' (a : A) (z : ℂ) (hz : z∈ball 0 R) : + HasFDerivAt (radialFirst u c a) (radialSecond u c a z) z := by + have hx := hb (radialFamily_maps_closedBall hR.le a z (ball_subset_closedBall hz)) + exact radialSecond_hasFDerivAt + (((hu.fderiv_of_isOpen hD (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))) _ hx).contDiffAt + (hD.mem_nhds hx) |>.differentiableAt (by norm_num)) + have hh := compactParameter_contDiffOn_two_Integral (μ := (volume : Measure A)) isOpen_ball + ((radialFamily_continuous hR.le hu.continuousOn hb).mono (prod_mono (Subset.refl univ) ball_subset_closedBall)) + ((radialFirst_continuous hD hR.le hu hb).mono (prod_mono (Subset.refl univ) ball_subset_closedBall)) + ((radialSecond_continuous hD hR.le hu hb).mono (prod_mono (Subset.refl univ) ball_subset_closedBall)) hd hd' + convert hh using 1 + ext z + exact (integral_subtype (s := closedBall (0 : ℂ) 1) measurableSet_closedBall + (fun a : ℂ ↦ u (c+a*z))).symm + +local instance realDualComplexGroup : NormedAddCommGroup (ℂ →L[ℝ] ℝ) := inferInstance +local instance realDualComplexSpace : NormedSpace ℝ (ℂ →L[ℝ] ℝ) := inferInstance + +lemma integral_bilinear_apply {α : Type u2} [MeasurableSpace α] {μ : Measure α} + {F : α → ℂ →L[ℝ] ℂ →L[ℝ] ℝ} (hF : Integrable F μ) (v w : ℂ) : + (∫ a, F a ∂μ) v w = ∫ a, F a v w ∂μ := by + let ev : (ℂ →L[ℝ] ℂ →L[ℝ] ℝ) →L[ℝ] (ℂ →L[ℝ] ℝ) := + ContinuousLinearMap.apply ℝ (ℂ →L[ℝ] ℝ) v + have hv : Integrable (fun a ↦ F a v) μ := ev.integrable_comp hF + rw [ContinuousLinearMap.integral_apply hF v,ContinuousLinearMap.integral_apply hv w] + +lemma radialIntegral_laplacian {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hD : IsOpen D) (hR : 0.differentiableAt (by norm_num)) + have hd' (a : A) (z : ℂ) (hz : z∈ball 0 R) : + HasFDerivAt (radialFirst u c a) (radialSecond u c a z) z := by + have hx := hb (radialFamily_maps_closedBall hR.le a z (ball_subset_closedBall hz)) + exact radialSecond_hasFDerivAt + (((hu.fderiv_of_isOpen hD (by norm_num : 1+1 ≤ (2 : WithTop ℕ∞))) _ hx).contDiffAt + (hD.mem_nhds hx) |>.differentiableAt (by norm_num)) + have hF := (radialFamily_continuous hR.le hu.continuousOn hb).mono + (prod_mono (Subset.refl univ) ball_subset_closedBall) + have hF' := (radialFirst_continuous hD hR.le hu hb).mono + (prod_mono (Subset.refl univ) ball_subset_closedBall) + have hF'' := (radialSecond_continuous hD hR.le hu hb).mono + (prod_mono (Subset.refl univ) ball_subset_closedBall) + have hh := compactParameter_secondFDerivIntegral (μ := (volume : Measure A)) isOpen_ball + hF hF' hF'' hd hd' hz + have he : (fun z ↦ ∫ a : A, u (c+(a : ℂ)*z))=radialIntegral u c := by + ext x + exact integral_subtype (s := closedBall (0 : ℂ) 1) measurableSet_closedBall + (fun a : ℂ ↦ u (c+a*x)) + rw [he] at hh + have hH : Integrable (fun a : A ↦ radialSecond u c a z) := + compactParameter_integrable (F := fun a : A ↦ radialSecond u c a) hz hF'' + have hHv (v w : ℂ) : Integrable (fun a : A ↦ radialSecond u c a z v w) := by + let ev : (ℂ →L[ℝ] ℂ →L[ℝ] ℝ) →L[ℝ] (ℂ →L[ℝ] ℝ) := + ContinuousLinearMap.apply ℝ (ℂ →L[ℝ] ℝ) v + have hv : Integrable (fun a : A ↦ radialSecond u c a z v) := ev.integrable_comp hH + exact (ContinuousLinearMap.apply ℝ ℝ w).integrable_comp hv + unfold complexLaplacian + rw [hh,integral_bilinear_apply hH 1 1,integral_bilinear_apply hH Complex.I Complex.I, + ← integral_add (hHv 1 1) (hHv Complex.I Complex.I)] + rw [← integral_subtype (s := closedBall (0 : ℂ) 1) measurableSet_closedBall] + apply integral_congr_ae + exact Eventually.of_forall fun a ↦ by + simpa only [radialSecond_apply,mul_one,mul_comm (a : ℂ) Complex.I] using + rotated_hessian_trace (fderiv ℝ (fderiv ℝ u) (c+(a : ℂ)*z)) a + +lemma radialIntegral_laplacian_nonneg {u : ℂ → ℝ} {D : Set ℂ} {c : ℂ} {R : ℝ} + (hD : IsOpen D) (hR : 0 simp + simp_rw [hi] + simp only [Finset.sum_ite_eq',Finset.mem_univ,ite_true] + rfl + _ = w := hv + +def symmetricGeneration : PolynomialGeneration (2*t) (SymmetricGeneratorIndex t) where + coefficient := fun i a q ↦ (D.symmetricGeneratorValue_regular m e t he i a q).exists_polynomial.choose + recovery := fun i a q ↦ (D.generatorRecoveryValue_regular m e t he i a q).exists_polynomial.choose + leftInverse := by + intro i z w + have hQ : (fun a q ↦ baseEval ((D.symmetricGeneratorValue_regular m e t he i a q).exists_polynomial.choose) z)= + D.symmetricGeneratorValue m e t he i z := by + funext a q + exact (congrFun (D.symmetricGeneratorValue_regular m e t he i a q).exists_polynomial.choose_spec z).symm + have hR : (fun a q ↦ baseEval ((D.generatorRecoveryValue_regular m e t he i a q).exists_polynomial.choose) z)= + D.generatorRecoveryValue m e t he i z := by + funext a q + exact (congrFun (D.generatorRecoveryValue_regular m e t he i a q).exists_polynomial.choose_spec z).symm + rw [hQ,hR] + exact D.generatorRecoveryValue_leftInverse m e t he i z w +lemma symmetricGeneration_matrix (i : StandardChart) (z : BaseCoordinates) : + (D.symmetricGeneration m e t he).matrix i z=D.symmetricGeneratorValue m e t he i z := by + funext a q + exact (congrFun (D.symmetricGeneratorValue_regular m e t he i a q).exists_polynomial.choose_spec z).symm +lemma symmetricGeneratorValue_compatible (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) (q : SymmetricGeneratorIndex t) : + (D.symmetricGeneratorValue m e t he i z).col q= + lineFactor (e,e) i j z • (symmetricMatrix (2*t) (D.coordinateTransition i j (powerCoordinates m z))).mulVec + ((D.symmetricGeneratorValue m e t he j (coordinateChange i j z)).col q) := by + let B := D.symmetricFlag m e t he + have hc := (B.generator q.1 q.2).compatible i j z hz + change (D.flagBasis m t i z).mulVec (TriangularCechBundle.polynomialValue (B.generator q.1 q.2).polynomial i z)=_ + rw [← hc] + change (D.flagBasis m t i z).mulVec ((D.flagMatrix m e t i j z).mulVec _)=_ + rw [flagMatrix,Matrix.smul_mulVec,Matrix.mulVec_smul,Matrix.mulVec_mulVec, + ← Matrix.mul_assoc,← Matrix.mul_assoc, + Matrix.mul_nonsing_inv _ (D.flagBasis_det_unit m t i z),Matrix.one_mul] + rw [← Matrix.mulVec_mulVec] + rfl +end EqualizerData +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/ProjectiveEquations.lean b/lean/OAI/Geometry/QuadricBundles/ProjectiveEquations.lean new file mode 100644 index 0000000000000000000000000000000000000000..222bb5bfbc90b0caa93bb297b1c0b4cbde0eaef5 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/ProjectiveEquations.lean @@ -0,0 +1,445 @@ +import OAI.Geometry.QuadricBundles.PolynomialGeneration + +namespace OAI + +universe u1 u2 u3 + +noncomputable section + +namespace QuadricCounterexample.BinaryForms +open MvPolynomial Matrix +open scoped BigOperators +noncomputable section + +def veronese (n : ℕ) (v : Fin 2 → ℂ) : Fin (n+1) → ℂ := fun k ↦ v 0^k.val*v 1^(n-k.val) +@[simp] lemma veronese_zero (n : ℕ) (v : Fin 2 → ℂ) : veronese n v 0=v 1^n := by simp [veronese] +@[simp] lemma veronese_last (n : ℕ) (v : Fin 2 → ℂ) : veronese n v (Fin.last n)=v 0^n := by simp [veronese] +lemma veronese_nonzero (n : ℕ) {v : Fin 2 → ℂ} (hv : v≠0) : veronese n v≠0 := by + intro h + have h0 := congrFun h (0 : Fin (n+1)) + have h1 := congrFun h (Fin.last n) + simp only [veronese_zero,veronese_last,Pi.zero_apply] at h0 h1 + apply hv + ext k + fin_cases k + · exact eq_zero_of_pow_eq_zero h1 + · exact eq_zero_of_pow_eq_zero h0 + +def veroneseOne (n : ℕ) (hn : 0 simp + | succ k ih => + have he := h.2 k + rw [ih] at he + apply mul_right_cancel₀ h0 + calc + w k.succ*w 0 = w 0*(w (veroneseOne n hn)/w 0)^k.val*w (veroneseOne n hn) := he + _ = (w 0*(w (veroneseOne n hn)/w 0)^k.succ.val)*w 0 := by + simp only [Fin.val_succ,pow_succ] + field_simp + refine ⟨w 0,h0,![w (veroneseOne n hn)/w 0,1],by simp,?_⟩ + ext k + simpa [veronese] using hc k + +def veroneseEndpoint (n : ℕ) (b : Fin 2) : Fin (n+1) := if b=0 then Fin.last n else 0 +def veroneseAdjacent (n : ℕ) (hn : 0 simp [veroneseEndpoint] +lemma veronese_adjacent_ratio (n : ℕ) (hn : 0 fin_cases b <;> simp_all + subst k + have hh := (div_eq_div_iff hv hw).mp h + simp only [Pi.smul_apply,smul_eq_mul] + calc + _ = (w (1-b)*v b)/w b := (eq_div_iff hw).mpr hh + _ = _ := by ring +lemma veronese_projective_injective (n : ℕ) (hn : 0 fin_cases j <;> + simp [segreFactor,eval_lineGenerator,lineFactor,flipFirst,firstFactor,secondFactor,scalarFactor] +@[simp] lemma segreFactor_flipSecond (i : StandardChart) (z : BaseCoordinates) : + segreFactor (flipSecond i) i z=z.2 := by + rcases i with ⟨i,j⟩ + fin_cases i <;> fin_cases j <;> + simp [segreFactor,eval_lineGenerator,lineFactor,flipSecond,firstFactor,secondFactor,scalarFactor] +lemma segreFactor_ne_zero_iff (a i : StandardChart) (z : BaseCoordinates) : + segreFactor a i z≠0 ↔ z∈coordinateOverlap i a := by + rw [coordinateOverlap_iff] + simp only [segreFactor,eval_lineGenerator,lineFactor,firstFactor,secondFactor,scalarFactor,pow_one] + rw [mul_ne_zero_iff] + constructor + · rintro ⟨h₁,h₂⟩ + constructor + · by_cases h : i.1=a.1 + · exact Or.inl h + · exact Or.inr (by simpa only [ite_eq_right h] using h₁) + · by_cases h : i.2=a.2 + · exact Or.inl h + · exact Or.inr (by simpa only [ite_eq_right h] using h₂) + · rintro ⟨h₁,h₂⟩ + constructor + · rcases h₁ with h₁|h₁ + · simp [h₁] + · split_ifs <;> simp_all + · rcases h₂ with h₂|h₂ + · simp [h₂] + · split_ifs <;> simp_all + +namespace PolynomialGeneration +variable {n : ℕ} {ι : Type u1} [Fintype ι] (B : PolynomialGeneration n ι) +abbrev ProjectiveIndex (ι : Type u2) [Fintype ι] := Fin (Fintype.card (StandardChart × ι)) +def index : (StandardChart × ι) ≃ ProjectiveIndex ι := Fintype.equivFin _ +def label (j : ProjectiveIndex ι) : StandardChart × ι := (index (ι:=ι)).symm j +@[simp] lemma label_index (a : StandardChart) (q : ι) : label (index (a,q))=(a,q) := Equiv.symm_apply_apply _ _ +@[simp] lemma index_label (j : ProjectiveIndex ι) : index (label j)=j := Equiv.apply_symm_apply _ _ + +def stencil (i : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) : ProjectiveIndex ι → ℂ := + fun j ↦ segreFactor (label j).1 i z*((B.matrix i z).transpose.mulVec w) (label j).2 +def value (i : StandardChart) (z : BaseCoordinates) (v : FiberCoordinates) : ProjectiveIndex ι → ℂ := + B.stencil i z (veronese n v) +@[simp] lemma stencil_index (i a : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) (q : ι) : + B.stencil i z w (index (a,q))=segreFactor a i z*((B.matrix i z).transpose.mulVec w) q := by + simp [stencil] +@[simp] lemma stencil_self (i : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) (q : ι) : + B.stencil i z w (index (i,q))=((B.matrix i z).transpose.mulVec w) q := by + simp +lemma stencil_smul (i : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) (c : ℂ) : + B.stencil i z (c • w)=c • B.stencil i z w := by + ext j + simp only [stencil,Matrix.mulVec_smul,Pi.smul_apply,smul_eq_mul] + ring +lemma stencil_nonzero (i : StandardChart) (z : BaseCoordinates) {w : Fin (n+1) → ℂ} (hw : w≠0) : + B.stencil i z w≠0 := by + intro hh + apply B.matrix_nonzero i z hw + ext q + simpa only [stencil_self,Pi.zero_apply] using congrFun hh (index (i,q)) +lemma value_nonzero (i : StandardChart) (z : BaseCoordinates) {v : FiberCoordinates} (hv : v≠0) : + B.value i z v≠0 := B.stencil_nonzero i z (veronese_nonzero n hv) + +def normalize (j : ProjectiveIndex ι) (y : ProjectiveIndex ι → ℂ) : ProjectiveIndex ι → ℂ := fun k ↦ y k/y j +lemma normalize_smul (j : ProjectiveIndex ι) (y : ProjectiveIndex ι → ℂ) (c : ℂ) (hc : c≠0) : + normalize j (c • y)=normalize j y := by + ext k + simp only [normalize,Pi.smul_apply,smul_eq_mul,mul_div_mul_left _ _ hc] +lemma normalize_pivot (j : ProjectiveIndex ι) (y : ProjectiveIndex ι → ℂ) (hy : y j≠0) : + normalize j y j=1 := div_self hy + +def patchCoordinates (i : StandardChart) (q : ι) (y : ProjectiveIndex ι → ℂ) : BaseCoordinates := + (y (index (flipFirst i,q)),y (index (flipSecond i,q))) +def block (i : StandardChart) (y : ProjectiveIndex ι → ℂ) : ι → ℂ := fun q ↦ y (index (i,q)) +def patchRecovery (i : StandardChart) (q : ι) (y : ProjectiveIndex ι → ℂ) : Fin (n+1) → ℂ := + (B.recover i (patchCoordinates i q y)).mulVec (block i y) +lemma patchCoordinates_stencil (i : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) (q : ι) + (hq : B.stencil i z w (index (i,q))≠0) : + patchCoordinates i q (normalize (index (i,q)) (B.stencil i z w))=z := by + have hq' : ((B.matrix i z).transpose.mulVec w) q≠0 := by simpa only [stencil_self] using hq + simp only [patchCoordinates,normalize,stencil_index,segreFactor_self,one_mul, + segreFactor_flipFirst,segreFactor_flipSecond,mul_div_cancel_right₀ _ hq'] +lemma patchRecovery_stencil (i : StandardChart) (z : BaseCoordinates) (w : Fin (n+1) → ℂ) (q : ι) + (hq : B.stencil i z w (index (i,q))≠0) : + B.patchRecovery i q (normalize (index (i,q)) (B.stencil i z w))= + (B.stencil i z w (index (i,q)))⁻¹ • w := by + unfold patchRecovery + rw [B.patchCoordinates_stencil i z w q hq] + have hb : block i (normalize (index (i,q)) (B.stencil i z w))= + (B.stencil i z w (index (i,q)))⁻¹ • (B.matrix i z).transpose.mulVec w := by + ext r + simp only [block,normalize,stencil_self,Pi.smul_apply,smul_eq_mul,div_eq_mul_inv,mul_comm] + rw [hb,Matrix.mulVec_smul,B.recover_matrix] +end PolynomialGeneration +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial +open scoped BigOperators +noncomputable section + +lemma exists_homogenizeAt {N : ℕ} (j : Fin N) (p : MvPolynomial (Fin N) ℂ) : + ∃ d : ℕ,∃ h : MvPolynomial (Fin N) ℂ,h.IsHomogeneous d ∧ + ∀ y : Fin N → ℂ,y j≠0 → MvPolynomial.eval y h=(y j)^d*MvPolynomial.eval (fun k ↦ y k/y j) p := by + induction p using MvPolynomial.induction_on with + | C c => exact ⟨0,C c,isHomogeneous_C _ _,fun _ _ ↦ by simp⟩ + | add p q hp hq => + obtain ⟨d,h,hh,he⟩ := hp + obtain ⟨e,k,hk,ke⟩ := hq + refine ⟨d+e,X j^e*h+X j^d*k,?_,?_⟩ + · apply IsHomogeneous.add + · simpa only [add_comm] using (isHomogeneous_X_pow j e).mul hh + · exact (isHomogeneous_X_pow j d).mul hk + · intro y hy + rw [map_add,map_add,map_mul,map_mul,map_pow,map_pow,eval_X,he y hy,ke y hy,pow_add] + ring + | mul_X p k hp => + obtain ⟨d,h,hh,he⟩ := hp + refine ⟨d+1,h*X k,hh.mul (isHomogeneous_X ℂ k),?_⟩ + intro y hy + rw [map_mul,map_mul,eval_X,eval_X,he y hy,pow_succ] + field_simp + +lemma projectiveCone_of_patch_equations {N : ℕ} (C : Set (Fin N → ℂ)) (hzero : 0∈C) + (E : Fin N → Set (MvPolynomial (Fin N) ℂ)) + (hE : ∀ j y,y j≠0 → (y∈C ↔ ∀ p∈E j,MvPolynomial.eval (fun k ↦ y k/y j) p=0)) : + ProjectiveAlgebraicCone C := by + choose degree hom homogeneous evaluate using fun j p ↦ exists_homogenizeAt (N:=N) j p + let equations : Set (MvPolynomial (Fin N) ℂ) := + {q | ∃ j p,p∈E j ∧ q=X j*hom j p} + refine ⟨equations,?_,?_⟩ + · rintro q ⟨j,p,_,rfl⟩ + exact ⟨1+degree j p,(isHomogeneous_X ℂ j).mul (homogeneous j p)⟩ + · ext y + constructor + · intro hy q hq + obtain ⟨j,p,hp,rfl⟩ := hq + rw [map_mul,eval_X] + by_cases hj : y j=0 + · rw [hj,zero_mul] + · rw [evaluate j p y hj,(hE j y hj).mp hy p hp,mul_zero,mul_zero] + · intro hy + by_cases hz : y=0 + · simpa only [hz] using hzero + · obtain ⟨j,hj⟩ : ∃ j,y j≠0 := by + by_contra hn + apply hz + ext j + by_contra hh + exact hn ⟨j,hh⟩ + apply (hE j y hj).mpr + intro p hp + have h := hy (X j*hom j p) ⟨j,p,hp,rfl⟩ + rw [map_mul,eval_X,evaluate j p y hj] at h + exact (mul_eq_zero.mp h).resolve_left hj |> fun h ↦ (mul_eq_zero.mp h).resolve_left (pow_ne_zero _ hj) +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix LaurentCech BinaryForms +open scoped BigOperators +noncomputable section +namespace PolynomialGeneration +variable {n : ℕ} {ι : Type u3} [Fintype ι] (B : PolynomialGeneration n ι) + +lemma normalize_eq_smul (j : ProjectiveIndex ι) (y : ProjectiveIndex ι → ℂ) : + normalize j y=(y j)⁻¹ • y := by + ext k + simp [normalize,div_eq_mul_inv,mul_comm] +lemma stencil_zero (i : StandardChart) (z : BaseCoordinates) : B.stencil i z 0=0 := by + ext j + simp [stencil] + +def liftPatchPolynomial (i : StandardChart) (q : ι) (p : BasePolynomial) : + MvPolynomial (ProjectiveIndex ι) ℂ := + MvPolynomial.bind₁ (fun k : Fin 2 ↦ if k=0 then X (index (flipFirst i,q)) else X (index (flipSecond i,q))) p +lemma eval_liftPatchPolynomial (i : StandardChart) (q : ι) (p : BasePolynomial) (y : ProjectiveIndex ι → ℂ) : + MvPolynomial.eval y (liftPatchPolynomial i q p)=baseEval p (patchCoordinates i q y) := by + change MvPolynomial.eval₂Hom (RingHom.id ℂ) _ ((MvPolynomial.bind₁ _) p)=_ + rw [MvPolynomial.eval₂Hom_bind₁] + change MvPolynomial.eval _ p=MvPolynomial.eval _ p + apply congrArg (fun f : Fin 2 → ℂ ↦ MvPolynomial.eval f p) + funext k + fin_cases k <;> simp [patchCoordinates] + +def recoveryPolynomial (i : StandardChart) (q : ι) (k : Fin (n+1)) : + MvPolynomial (ProjectiveIndex ι) ℂ := + ∑ r : ι,liftPatchPolynomial i q (B.recovery i k r)*X (index (i,r)) +lemma eval_recoveryPolynomial (i : StandardChart) (q : ι) (k : Fin (n+1)) (y : ProjectiveIndex ι → ℂ) : + MvPolynomial.eval y (B.recoveryPolynomial i q k)=B.patchRecovery i q y k := by + simp only [recoveryPolynomial,map_sum,map_mul,eval_X,eval_liftPatchPolynomial] + rfl + +def patchEquations (hn : 0 simpa only [pow_zero] using RegularFamily.const U 1 + | succ n ih => simpa only [pow_succ] using ih.mul hp +lemma RegularFamily.fintype_sum {ι : Type u1} [Fintype ι] {U : Set BaseCoordinates} + {p : ι → BaseCoordinates → Poly (R := ℂ)} (hp : ∀ i,RegularFamily U (p i)) : + RegularFamily U (fun z ↦ ∑ i,p i z) := by + intro a + simpa only [coeff_sum] using UniformlyRegularOn.fintype_sum (fun i ↦ hp i a) +lemma substitute_regular {U : Set BaseCoordinates} {T : BaseCoordinates → Matrix (Fin 2) (Fin 2) ℂ} + (hT : ∀ a b,UniformlyRegularOn U (fun z ↦ T z a b)) (p : Poly (R := ℂ)) : + RegularFamily U (fun z ↦ substitute (T z) p) := by + induction p using MvPolynomial.induction_on with + | C c => simpa only [substitute_C] using RegularFamily.const U (C c) + | add p q hp hq => simpa only [map_add] using hp.add hq + | mul_X p b hp => + simp only [map_mul,substitute_X] + exact hp.mul (RegularFamily.fintype_sum (fun a ↦ (RegularFamily.C (hT a b)).mul (RegularFamily.const U (X a)))) +lemma symmetricMatrix_regular {U : Set BaseCoordinates} {T : BaseCoordinates → Matrix (Fin 2) (Fin 2) ℂ} + (hT : ∀ a b,UniformlyRegularOn U (fun z ↦ T z a b)) (n : ℕ) (a b : Fin (n+1)) : + UniformlyRegularOn U (fun z ↦ symmetricMatrix n (T z) a b) := + substitute_regular hT _ _ +lemma adaptedPolynomials_regular {U : Set BaseCoordinates} {h d u v : BaseCoordinates → ℂ} + (hh : UniformlyRegularOn U h) (hd : UniformlyRegularOn U d) + (hu : UniformlyRegularOn U u) (hv : UniformlyRegularOn U v) (t : ℕ) (k : Fin (2*t+1)) : + RegularFamily U (fun z ↦ adaptedPolynomials (h z) (d z) (u z) (v z) t k) := by + have hk : RegularFamily U (fun z ↦ kernelForm (h z) (d z)) := + ((RegularFamily.C hd).mul (RegularFamily.const U (X 0))).sub ((RegularFamily.C hh).mul (RegularFamily.const U (X 1))) + have hl : RegularFamily U (fun z ↦ liftForm (u z) (v z)) := + ((RegularFamily.C hu).mul (RegularFamily.const U (X 0))).add ((RegularFamily.C hv).mul (RegularFamily.const U (X 1))) + induction t with + | zero => exact RegularFamily.const U 1 + | succ t ih => + refine Fin.lastCases (n:=2*t+2) ?_ (fun k ↦ ?_) k + · simpa only [adaptedPolynomials,Fin.snoc_last] using hl.pow (2*(t+1)) + · refine Fin.lastCases (n:=2*t+1) ?_ (fun k ↦ ?_) k + · simpa only [adaptedPolynomials,Fin.snoc_castSucc,Fin.snoc_last] using + hk.mul (RegularFamily.const U (X 0^(2*t+1))) + · simpa only [adaptedPolynomials,Fin.snoc_castSucc] using + (hk.mul (RegularFamily.const U (X 1))).mul (ih k) +lemma adaptedMatrix_regular {U : Set BaseCoordinates} {h d u v : BaseCoordinates → ℂ} + (hh : UniformlyRegularOn U h) (hd : UniformlyRegularOn U d) + (hu : UniformlyRegularOn U u) (hv : UniformlyRegularOn U v) (t : ℕ) (a b : Fin (2*t+1)) : + UniformlyRegularOn U (fun z ↦ adaptedMatrix (h z) (d z) (u z) (v z) t a b) := + adaptedPolynomials_regular hh hd hu hv t b _ +end BinaryForms +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial +noncomputable section +lemma polynomial_bezout (h d : BasePolynomial) + (hu : ∀ z : BaseCoordinates,baseEval d z=0 → baseEval h z≠0) : + ∃ u v : BasePolynomial,u*h+v*d=1 := by + let J : Ideal BasePolynomial := Ideal.span {h,d} + have hv : (1 : BasePolynomial)∈MvPolynomial.vanishingIdeal ℂ (MvPolynomial.zeroLocus ℂ J) := by + rw [MvPolynomial.mem_vanishingIdeal_iff] + intro z hz + rw [MvPolynomial.zeroLocus_span] at hz + have hh := hz h (Set.mem_insert h {d}) + have hd := hz d (Set.mem_insert_of_mem h (Set.mem_singleton d)) + have he : z=![z 0,z 1] := by ext k; fin_cases k <;> rfl + have hdz : baseEval d (z 0,z 1)=0 := by simpa only [baseEval,← he,aeval_eq_eval] using hd + exact False.elim (hu (z 0,z 1) hdz (by simpa only [baseEval,← he,aeval_eq_eval] using hh)) + rw [MvPolynomial.vanishingIdeal_zeroLocus_eq_radical] at hv + obtain ⟨n,hn⟩ := hv + apply Ideal.mem_span_pair.mp + simpa only [one_pow] using hn + +namespace EqualizerData +variable (D : EqualizerData) +def bezoutU (i : StandardChart) : BasePolynomial := (polynomial_bezout (D.lift i) (D.divisor i) (D.lift_unit i)).choose +def bezoutV (i : StandardChart) : BasePolynomial := + (polynomial_bezout (D.lift i) (D.divisor i) (D.lift_unit i)).choose_spec.choose +lemma bezout_spec (i : StandardChart) : D.bezoutU i*D.lift i+D.bezoutV i*D.divisor i=1 := + (polynomial_bezout (D.lift i) (D.divisor i) (D.lift_unit i)).choose_spec.choose_spec +lemma bezout_eval (i : StandardChart) (z : BaseCoordinates) : + baseEval (D.bezoutU i) z*baseEval (D.lift i) z+ + baseEval (D.bezoutV i) z*baseEval (D.divisor i) z=1 := by + have h := congrArg (fun p ↦ baseEval p z) (D.bezout_spec i) + simpa using h +end EqualizerData +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix +open BinaryForms +noncomputable section +namespace EqualizerData +variable (D : EqualizerData) +def kernelFactor (i j : StandardChart) (z : BaseCoordinates) : ℂ := + firstFactor i j z^21*(secondFactor i j z)⁻¹^3 +lemma kernelFactor_regular (i j : StandardChart) : + UniformlyRegularOn (coordinateOverlap i j) (kernelFactor i j) := + ((firstFactor_regular i j _).pow 21).mul + (((secondFactor_regular i j _).inv (fun _ hz ↦ secondFactor_ne_zero hz)).pow 3) +lemma kernelFactor_divisor (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + kernelFactor i j z*(firstFactor i j z*secondFactor i j z)^3=topFactor i j z := by + have hs := secondFactor_ne_zero hz + unfold kernelFactor topFactor + field_simp +lemma bottomFactor_divisor (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + bottomFactor i j z*(firstFactor i j z*secondFactor i j z)^3=quotientFactor i j z := by + have hf := firstFactor_ne_zero hz + unfold bottomFactor quotientFactor + field_simp +lemma kernelFactor_bottomFactor (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + kernelFactor i j z*bottomFactor i j z=(firstFactor i j z*secondFactor i j z)^18 := by + have hf := firstFactor_ne_zero hz + have hs := secondFactor_ne_zero hz + unfold kernelFactor bottomFactor + field_simp +lemma kernel_coordinates (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + baseEval (D.divisor j) (coordinateChange i j z)*topFactor i j z= + kernelFactor i j z*baseEval (D.divisor i) z ∧ + baseEval (D.divisor j) (coordinateChange i j z)*D.low i j z- + baseEval (D.lift j) (coordinateChange i j z)*bottomFactor i j z= + -kernelFactor i j z*baseEval (D.lift i) z := by + let δ := (firstFactor i j z*secondFactor i j z)^3 + have hδ : δ≠0 := pow_ne_zero _ (mul_ne_zero (firstFactor_ne_zero hz) (secondFactor_ne_zero hz)) + have hk := kernelFactor_divisor i j hz + have hb := bottomFactor_divisor i j hz + have hd := D.divisor_change i j z hz + have hl := D.low_spec i j hz + change baseEval (D.divisor i) z=δ*baseEval (D.divisor j) (coordinateChange i j z) at hd + change kernelFactor i j z*δ=topFactor i j z at hk + change bottomFactor i j z*δ=quotientFactor i j z at hb + unfold numerator at hl + constructor + · rw [hd,← hk]; ring + · apply mul_left_cancel₀ hδ + linear_combination hl-(D.low i j z)*hd- + (baseEval (D.lift j) (coordinateChange i j z))*hb+(baseEval (D.lift i) z)*hk + +lemma substitute_kernel (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + substitute (D.coordinateTransition i j z) + (kernelForm (baseEval (D.lift j) (coordinateChange i j z)) + (baseEval (D.divisor j) (coordinateChange i j z)))= + C (kernelFactor i j z)*kernelForm (baseEval (D.lift i) z) (baseEval (D.divisor i) z) := by + obtain ⟨h0,h1⟩ := D.kernel_coordinates i j hz + apply MvPolynomial.funext + intro x + rw [eval_substitute] + simp only [eval_kernelForm,map_mul,eval_C] + simp only [coordinateTransition,Matrix.transpose_apply,Matrix.mulVec, dotProduct,Fin.sum_univ_two, + Matrix.of_apply,cons_val_zero,cons_val_one,cons_val_fin_one,zero_mul] + linear_combination (x 0)*h0+(x 1)*h1 +lemma substitute_f (i j : StandardChart) (z : BaseCoordinates) : + substitute (D.coordinateTransition i j z) (X 1)=C (bottomFactor i j z)*X 1 := by + rw [substitute_X] + simp [coordinateTransition,Fin.sum_univ_two] +lemma substitute_e_projection (i j : StandardChart) (z : BaseCoordinates) : + MvPolynomial.eval ![1,0] (substitute (D.coordinateTransition i j z) (X 0))=topFactor i j z := by + rw [substitute_X] + simp [coordinateTransition,Fin.sum_univ_two] +lemma quotient_covector (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) (x : Fin 2 → ℂ) : + baseEval (D.lift i) z*((D.coordinateTransition i j z).mulVec x 0)+ + baseEval (D.divisor i) z*((D.coordinateTransition i j z).mulVec x 1)= + quotientFactor i j z*(baseEval (D.lift j) (coordinateChange i j z)*x 0+ + baseEval (D.divisor j) (coordinateChange i j z)*x 1) := by + have hl := D.low_spec i j hz + have hd := D.divisor_factor i j hz + unfold numerator at hl + simp only [coordinateTransition,Matrix.mulVec,dotProduct,Fin.sum_univ_two,Matrix.of_apply, + cons_val_zero,cons_val_one,cons_val_fin_one,zero_mul] + linear_combination (x 0)*hl+(x 1)*hd +lemma substitute_lift_quotient (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + MvPolynomial.eval ![baseEval (D.lift i) z,baseEval (D.divisor i) z] + (substitute (D.coordinateTransition i j z) + (liftForm (baseEval (D.bezoutU j) (coordinateChange i j z)) + (baseEval (D.bezoutV j) (coordinateChange i j z))))=quotientFactor i j z := by + rw [eval_substitute,eval_liftForm] + have h := D.quotient_covector i j hz + ![baseEval (D.bezoutU j) (coordinateChange i j z),baseEval (D.bezoutV j) (coordinateChange i j z)] + simp only [coordinateTransition,Matrix.transpose_apply,Matrix.mulVec, dotProduct,Fin.sum_univ_two, + Matrix.of_apply,cons_val_zero,cons_val_one,cons_val_fin_one,zero_mul] at h ⊢ + have hu := D.bezout_eval j (coordinateChange i j z) + linear_combination h+(quotientFactor i j z)*hu +end EqualizerData +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Regularity.lean b/lean/OAI/Geometry/QuadricBundles/Regularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd262966a1c57ddbb750b7d1067b5817389c6841 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Regularity.lean @@ -0,0 +1,246 @@ +import OAI.Geometry.QuadricBundles.Charts + +namespace OAI + +namespace QuadricCounterexample +open Set Filter Topology MvPolynomial +noncomputable section + +@[simp] lemma baseEval_add (p q : BasePolynomial) (z : BaseCoordinates) : + baseEval (p+q) z=baseEval p z+baseEval q z := by simp [baseEval] +@[simp] lemma baseEval_neg (p : BasePolynomial) (z : BaseCoordinates) : + baseEval (-p) z= -baseEval p z := by simp [baseEval] +@[simp] lemma baseEval_sub (p q : BasePolynomial) (z : BaseCoordinates) : + baseEval (p-q) z=baseEval p z-baseEval q z := by simp [baseEval] +@[simp] lemma baseEval_C (a : ℂ) (z : BaseCoordinates) : baseEval (C a) z=a := by simp [baseEval] + +lemma AlgebraicallyRegularOn.add {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hg : AlgebraicallyRegularOn U g) : + AlgebraicallyRegularOn U (fun z ↦ f z+g z) := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + obtain ⟨r,s,hs,k⟩ := hg z hz + refine ⟨p*s+r*q,q*s,by simpa using mul_ne_zero hq hs,?_⟩ + intro w hw hqw + have hh : baseEval q w ≠ 0 ∧ baseEval s w ≠ 0 := by simpa using hqw + dsimp only + rw [h w hw hh.1,k w hw hh.2] + simp only [baseEval_add,baseEval_mul] + simpa only [mul_comm] using (div_add_div (baseEval p w) (baseEval r w) hh.1 hh.2) + +lemma AlgebraicallyRegularOn.neg {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) : AlgebraicallyRegularOn U (fun z ↦ -f z) := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + exact ⟨-p,q,hq,fun w hw hqw ↦ by dsimp only; rw [h w hw hqw,baseEval_neg,neg_div]⟩ +lemma AlgebraicallyRegularOn.sub {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hg : AlgebraicallyRegularOn U g) : + AlgebraicallyRegularOn U (fun z ↦ f z-g z) := by + simpa only [sub_eq_add_neg] using hf.add hg.neg +lemma AlgebraicallyRegularOn.inv {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hn : ∀ z ∈ U, f z ≠ 0) : + AlgebraicallyRegularOn U (fun z ↦ (f z)⁻¹) := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + have hp : baseEval p z ≠ 0 := by + intro hp + specialize hn z hz + rw [h z hz hq,hp,zero_div] at hn + exact hn rfl + refine ⟨q*q,p*q,by simpa using mul_ne_zero hp hq,?_⟩ + intro w hw hqw + have hnw : baseEval p w ≠ 0 ∧ baseEval q w ≠ 0 := by simpa using hqw + dsimp only + rw [h w hw hnw.2,baseEval_mul,baseEval_mul] + field_simp + +lemma analytic_baseEval (p : BasePolynomial) : AnalyticOnNhd ℂ (baseEval p) univ := by + intro z _ + have hf : ∀ i : Fin 2, AnalyticAt ℂ (fun w : BaseCoordinates ↦ (![w.1,w.2] : Fin 2 → ℂ) i) z := by + intro i + fin_cases i + · exact (ContinuousLinearMap.fst ℂ ℂ ℂ).analyticAt z + · exact (ContinuousLinearMap.snd ℂ ℂ ℂ).analyticAt z + have hh := AnalyticAt.aeval_mvPolynomial hf p + simp only [aeval_eq_eval] at hh + convert hh using 1 + rfl + +lemma AlgebraicallyRegularOn.analyticOnNhd {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : AlgebraicallyRegularOn U f) (hU : IsOpen U) : AnalyticOnNhd ℂ f U := by + intro z hz + obtain ⟨p,q,hq,h⟩ := hf z hz + have ha := (analytic_baseEval p z (mem_univ _)).div (analytic_baseEval q z (mem_univ _)) hq + apply ha.congr + filter_upwards [hU.mem_nhds hz, (analytic_baseEval q z (mem_univ _)).continuousAt.eventually_ne hq] + with w hw hqw + exact (h w hw hqw).symm + +lemma dense_polynomial_nonzero {p : BasePolynomial} (hp : p ≠ 0) : + Dense {z | baseEval p z ≠ 0} := by + rw [dense_iff_inter_open] + intro U hU ⟨z,hz⟩ + by_contra! h + have he : baseEval p =ᶠ[𝓝 z] fun _ ↦ 0 := by + filter_upwards [hU.mem_nhds hz] with w hw + by_contra hn + have : w ∈ U ∩ {z | baseEval p z ≠ 0} := ⟨hw,hn⟩ + rw [h] at this + exact this + have hall := (analytic_baseEval p).eq_of_eventuallyEq analyticOnNhd_const he + apply hp + apply MvPolynomial.funext + intro x + have hx : x=![x 0,x 1] := by ext i; fin_cases i <;> rfl + rw [hx,map_zero] + simpa only [baseEval] using congrFun hall (x 0,x 1) + +lemma continuous_cancel_polynomial {U : Set BaseCoordinates} (hU : IsOpen U) + {f g : BaseCoordinates → ℂ} (hf : ContinuousOn f U) (hg : ContinuousOn g U) + {p : BasePolynomial} (hp : p ≠ 0) + (he : ∀ z ∈ U, baseEval p z*f z=baseEval p z*g z) : EqOn f g U := by + intro z hz + by_contra hne + have hat : ContinuousAt (fun w ↦ f w-g w) z := + ((hf z hz).continuousAt (hU.mem_nhds hz)).sub ((hg z hz).continuousAt (hU.mem_nhds hz)) + have hn : ∀ᶠ w in 𝓝 z, w ∈ U ∧ f w ≠ g w := by + filter_upwards [hU.mem_nhds hz,hat.eventually_ne (sub_ne_zero.mpr hne)] with w hw hnw + exact ⟨hw,sub_ne_zero.mp hnw⟩ + obtain ⟨w,hw,hpw⟩ := mem_closure_iff_nhds.mp (dense_polynomial_nonzero hp z) _ hn + exact hw.2 (mul_left_cancel₀ hpw (he w hw.1)) + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial +noncomputable section + +def UniformlyRegularOn (U : Set BaseCoordinates) (f : BaseCoordinates → ℂ) : Prop := + ∃ p q : BasePolynomial, (∀ z ∈ U, baseEval q z ≠ 0) ∧ + ∀ z ∈ U, f z=baseEval p z/baseEval q z + +lemma UniformlyRegularOn.regular {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (h : UniformlyRegularOn U f) : AlgebraicallyRegularOn U f := by + obtain ⟨p,q,hq,h⟩ := h + exact fun z hz ↦ ⟨p,q,hq z hz,fun w hw _ ↦ h w hw⟩ + +lemma UniformlyRegularOn.congr {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (h : UniformlyRegularOn U f) (he : EqOn f g U) : UniformlyRegularOn U g := by + obtain ⟨p,q,hq,h⟩ := h + exact ⟨p,q,hq,fun z hz ↦ (he hz).symm.trans (h z hz)⟩ + +lemma UniformlyRegularOn.mono {U V : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (h : UniformlyRegularOn U f) (hVU : V ⊆ U) : UniformlyRegularOn V f := by + obtain ⟨p,q,hq,h⟩ := h + exact ⟨p,q,fun z hz ↦ hq z (hVU hz),fun z hz ↦ h z (hVU hz)⟩ + +lemma uniformlyRegular_polynomial (U : Set BaseCoordinates) (p : BasePolynomial) : + UniformlyRegularOn U (baseEval p) := by + exact ⟨p,1,fun _ _ ↦ by simp,fun _ _ ↦ by simp⟩ +lemma uniformlyRegular_const (U : Set BaseCoordinates) (c : ℂ) : + UniformlyRegularOn U (fun _ ↦ c) := by + exact ⟨C c,1,fun _ _ ↦ by simp,fun _ _ ↦ by simp⟩ + +lemma UniformlyRegularOn.add {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) (hg : UniformlyRegularOn U g) : + UniformlyRegularOn U (fun z ↦ f z+g z) := by + obtain ⟨p,q,hq,h⟩ := hf + obtain ⟨r,s,hs,k⟩ := hg + refine ⟨p*s+q*r,q*s, fun z hz ↦ by simpa using mul_ne_zero (hq z hz) (hs z hz),?_⟩ + intro z hz + dsimp only + rw [h z hz,k z hz] + simp only [baseEval_add,baseEval_mul] + exact div_add_div _ _ (hq z hz) (hs z hz) + +lemma UniformlyRegularOn.neg {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) : UniformlyRegularOn U (fun z ↦ - f z) := by + obtain ⟨p,q,hq,h⟩ := hf + exact ⟨-p,q,hq,fun z hz ↦ by dsimp only; rw [h z hz,baseEval_neg,neg_div]⟩ +lemma UniformlyRegularOn.sub {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) (hg : UniformlyRegularOn U g) : + UniformlyRegularOn U (fun z ↦ f z-g z) := by + simpa only [sub_eq_add_neg] using hf.add hg.neg +lemma UniformlyRegularOn.mul {U : Set BaseCoordinates} {f g : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) (hg : UniformlyRegularOn U g) : + UniformlyRegularOn U (fun z ↦ f z*g z) := by + obtain ⟨p,q,hq,h⟩ := hf + obtain ⟨r,s,hs,k⟩ := hg + refine ⟨p*r,q*s, fun z hz ↦ by simpa using mul_ne_zero (hq z hz) (hs z hz),?_⟩ + intro z hz + dsimp only + rw [h z hz,k z hz] + simp only [baseEval_mul,mul_div_mul_comm] +lemma UniformlyRegularOn.inv {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) (hn : ∀ z ∈ U, f z ≠ 0) : + UniformlyRegularOn U (fun z ↦ (f z)⁻¹) := by + obtain ⟨p,q,hq,h⟩ := hf + refine ⟨q,p,?_,?_⟩ + · intro z hz he + apply hn z hz + rw [h z hz,he,zero_div] + · intro z hz + dsimp only + rw [h z hz,inv_div] +lemma UniformlyRegularOn.pow {U : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn U f) (n : ℕ) : UniformlyRegularOn U (fun z ↦ f z^n) := by + induction n with + | zero => simpa using uniformlyRegular_const U 1 + | succ n ih => simpa only [pow_succ] using ih.mul hf + +lemma UniformlyRegularOn.eval {U : Set BaseCoordinates} {f : Fin 2 → BaseCoordinates → ℂ} + (hf : ∀ i, UniformlyRegularOn U (f i)) (p : BasePolynomial) : + UniformlyRegularOn U (fun z ↦ MvPolynomial.eval (fun i ↦ f i z) p) := by + induction p using MvPolynomial.induction_on with + | C c => simpa only [eval_C] using uniformlyRegular_const U c + | add p q hp hq => simpa only [map_add] using hp.add hq + | mul_X p i hp => simpa only [map_mul,eval_X] using hp.mul (hf i) + +lemma squarefree_dvd_of_baseEval_zero {d p : BasePolynomial} (hd : Squarefree d) + (he : ∀ z, baseEval d z=0 → baseEval p z=0) : d ∣ p := by + let J : Ideal BasePolynomial := Ideal.span {d} + have hJ : J.IsRadical := isRadical_iff_span_singleton.mp hd.isRadical + apply Ideal.mem_span_singleton.mp + change p ∈ J + rw [← hJ.radical,← MvPolynomial.vanishingIdeal_zeroLocus_eq_radical (K := ℂ)] + rw [MvPolynomial.mem_vanishingIdeal_iff] + intro z hz + rw [MvPolynomial.zeroLocus_span] at hz + have hh := hz _ (Set.mem_singleton _) + have hz' : z=![z 0,z 1] := by ext i; fin_cases i <;> rfl + rw [hz'] at hh ⊢ + simpa only [aeval_eq_eval,baseEval] using he (z 0,z 1) (by simpa [baseEval,aeval_eq_eval] using hh) + +lemma exists_uniformlyRegular_division (r d : BasePolynomial) (hd : Squarefree d) + (f : BaseCoordinates → ℂ) (hf : UniformlyRegularOn {z | baseEval r z ≠ 0} f) + (he : ∀ z, baseEval r z ≠ 0 → baseEval d z=0 → f z=0) : + ∃ k : BaseCoordinates → ℂ, UniformlyRegularOn {z | baseEval r z ≠ 0} k ∧ + ∀ z, baseEval r z ≠ 0 → baseEval d z*k z=f z := by + obtain ⟨p,q,hq,h⟩ := hf + have hdiv : d ∣ r*p := by + apply squarefree_dvd_of_baseEval_zero hd + intro z hz + by_cases hr : baseEval r z=0 + · simp [hr] + · have hv := he z hr hz + rw [h z hr] at hv + have hp : baseEval p z=0 := (div_eq_zero_iff).mp hv |>.resolve_right (hq z hr) + simp [hp] + obtain ⟨a,ha⟩ := hdiv + refine ⟨fun z ↦ baseEval a z/baseEval (r*q) z,⟨a,r*q,?_,fun _ _ ↦ rfl⟩,?_⟩ + · intro z hz + simpa using mul_ne_zero hz (hq z hz) + · intro z hz + have hqa := hq z hz + have heq := congrArg (fun p ↦ baseEval p z) ha + simp only [baseEval_mul] at heq + dsimp only + rw [baseEval_mul,h z hz] + field_simp + linear_combination -heq + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/Removability.lean b/lean/OAI/Geometry/QuadricBundles/Removability.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bd732de6285c870da07f8145a53a937e066a122 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/Removability.lean @@ -0,0 +1,886 @@ +import OAI.Geometry.QuadricBundles.Curvature + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 u28 u29 + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric + +lemma usc_ge_of_ae_ge {Ω : Set ℂ} (hΩ : IsOpen Ω) {u : ℂ → ℝ} + (hu : UpperSemicontinuousOn u Ω) {c : ℝ} + (hae : ∀ᵐ x ∂volume.restrict Ω, c ≤ u x) : ∀ x ∈ Ω, c ≤ u x := by + have hopen : IsOpen {x | x ∈ Ω ∧ u x < c} := by + apply isOpen_iff_mem_nhds.mpr + intro x hx + have hh := hu x hx.1 c hx.2 + rw [nhdsWithin_eq_nhds.mpr (hΩ.mem_nhds hx.1)] at hh + exact inter_mem (hΩ.mem_nhds hx.1) hh + have hz : volume {x | x ∈ Ω ∧ u x < c} = 0 := by + have hh := (ae_restrict_iff' hΩ.measurableSet).mp hae + simpa only [ae_iff, not_forall, not_le, Classical.not_imp, exists_prop] using hh + have he := hopen.eq_empty_of_measure_zero hz + intro x hx + by_contra h + have : x ∈ {x | x ∈ Ω ∧ u x < c} := ⟨hx, lt_of_not_ge h⟩ + rw [he] at this + exact this + +lemma DiskSubharmonicOn.eq_on_ball_of_max {Ω : Set ℂ} {u : ℂ → ℝ} + (hu : DiskSubharmonicOn Ω u) {x : ℂ} (hx : x ∈ Ω) {r : ℝ} (hr : 0 < r) + (hball : closedBall x r ⊆ Ω) (hmax : ∀ y ∈ Ω, u y ≤ u x) : + ∀ y ∈ ball x r, u y = u x := by + have hb : ball x r ⊆ Ω := ball_subset_closedBall.trans hball + have hi := (hu.2 x hx r hr hball).1 + have hle : u ≤ᵐ[volume.restrict (ball x r)] fun _ ↦ u x := + (ae_restrict_mem measurableSet_ball).mono fun y hy ↦ hmax y (hb hy) + have hc : IntegrableOn (fun _ : ℂ ↦ u x) (ball x r) := + integrableOn_const (measure_ne_top_of_subset ball_subset_closedBall + (isCompact_closedBall x r).measure_ne_top) + have he : (∫ y in ball x r, u y) = ∫ _ in ball x r, u x := by + apply le_antisymm (integral_mono_ae hi hc hle) + simpa only [setIntegral_const, measureReal_def, smul_eq_mul] + using (hu.2 x hx r hr hball).2 + have hae := (integral_eq_iff_of_ae_le hi hc hle).mp he + have hge := usc_ge_of_ae_ge isOpen_ball (hu.1.mono hb) + (hae.mono fun _ h ↦ h.ge) + intro y hy + exact le_antisymm (hmax y (hb hy)) (hge y hy) + +theorem DiskSubharmonicOn.eq_const_of_max {Ω : Set ℂ} {u : ℂ → ℝ} + (hΩ : IsOpen Ω) (hconn : IsPreconnected Ω) (hu : DiskSubharmonicOn Ω u) + {x : ℂ} (hx : x ∈ Ω) (hmax : ∀ y ∈ Ω, u y ≤ u x) : + ∀ y ∈ Ω, u y = u x := by + let : PreconnectedSpace Ω := isPreconnected_iff_preconnectedSpace.mp hconn + let C : Set Ω := {y | u x ≤ u y} + have hc : IsClosed C := + (upperSemicontinuousOn_iff_restrict.mpr hu.1).isClosed_preimage (u x) + have ho : IsOpen C := by + apply isOpen_iff_mem_nhds.mpr + intro y hy + obtain ⟨r, hr, hball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp (hΩ.mem_nhds y.property) + have hey : u y = u x := le_antisymm (hmax y y.property) hy + have he := hu.eq_on_ball_of_max y.property hr hball + (fun z hz ↦ (hmax z hz).trans hey.ge) + have hn : {z : Ω | (z : ℂ) ∈ ball (y : ℂ) r} ∈ 𝓝 y := + continuous_subtype_val.continuousAt (ball_mem_nhds (y : ℂ) hr) + apply mem_of_superset hn + intro z hz + change u x ≤ u z + rw [he z hz, hey] + have hne : C.Nonempty := ⟨⟨x,hx⟩, by change u x ≤ u x; exact le_rfl⟩ + have heq : C = univ := (show IsClopen C from ⟨hc, ho⟩).eq_univ hne + intro y hy + have hh : (⟨y,hy⟩ : Ω) ∈ C := heq.symm ▸ mem_univ _ + exact le_antisymm (hmax y hy) hh + +def LocalDiskSubmeanOn (Ω : Set ℂ) (u : ℂ → ℝ) : Prop := + UpperSemicontinuousOn u Ω ∧ ∀ x ∈ Ω, ∃ r : ℝ, 0 < r ∧ closedBall x r ⊆ Ω ∧ + IntegrableOn u (ball x r) ∧ + (volume (ball x r)).toReal * u x ≤ ∫ y in ball x r, u y + +theorem LocalDiskSubmeanOn.eq_on_ball_of_max {Ω : Set ℂ} {u : ℂ → ℝ} + (hu : LocalDiskSubmeanOn Ω u) {x : ℂ} (hx : x ∈ Ω) + (hmax : ∀ y ∈ Ω, u y ≤ u x) : + ∃ r : ℝ, 0 < r ∧ ball x r ⊆ Ω ∧ ∀ y ∈ ball x r, u y = u x := by + obtain ⟨r,hr,hball,hi,hmean⟩ := hu.2 x hx + have hb : ball x r ⊆ Ω := ball_subset_closedBall.trans hball + have hle : u ≤ᵐ[volume.restrict (ball x r)] fun _ ↦ u x := + (ae_restrict_mem measurableSet_ball).mono fun y hy ↦ hmax y (hb hy) + have hc : IntegrableOn (fun _ : ℂ ↦ u x) (ball x r) := + integrableOn_const measure_ball_lt_top.ne + have he : (∫ y in ball x r, u y) = ∫ _ in ball x r, u x := by + apply le_antisymm (integral_mono_ae hi hc hle) + simpa only [setIntegral_const, measureReal_def, smul_eq_mul] using hmean + have hae := (integral_eq_iff_of_ae_le hi hc hle).mp he + have hge := usc_ge_of_ae_ge isOpen_ball (hu.1.mono hb) (hae.mono fun _ h ↦ h.ge) + exact ⟨r,hr,hb,fun y hy ↦ le_antisymm (hmax y (hb hy)) (hge y hy)⟩ + +theorem LocalDiskSubmeanOn.eq_const_of_max {Ω : Set ℂ} {u : ℂ → ℝ} + (hconn : IsPreconnected Ω) (hu : LocalDiskSubmeanOn Ω u) + {x : ℂ} (hx : x ∈ Ω) (hmax : ∀ y ∈ Ω, u y ≤ u x) : + ∀ y ∈ Ω, u y = u x := by + let : PreconnectedSpace Ω := isPreconnected_iff_preconnectedSpace.mp hconn + let C : Set Ω := {y | u x ≤ u y} + have hc : IsClosed C := + (upperSemicontinuousOn_iff_restrict.mpr hu.1).isClosed_preimage (u x) + have ho : IsOpen C := by + apply isOpen_iff_mem_nhds.mpr + intro y hy + have hey : u y = u x := le_antisymm (hmax y y.property) hy + obtain ⟨r,hr,_,he⟩ := hu.eq_on_ball_of_max y.property + (fun z hz ↦ (hmax z hz).trans hey.ge) + have hn : {z : Ω | (z : ℂ) ∈ ball (y : ℂ) r} ∈ 𝓝 y := + continuous_subtype_val.continuousAt (ball_mem_nhds (y : ℂ) hr) + apply mem_of_superset hn + intro z hz + change u x ≤ u z + rw [he z hz,hey] + have hne : C.Nonempty := ⟨⟨x,hx⟩,by change u x ≤ u x; exact le_rfl⟩ + have heq : C = univ := (show IsClopen C from ⟨hc,ho⟩).eq_univ hne + intro y hy + have hh : (⟨y,hy⟩ : Ω) ∈ C := heq.symm ▸ mem_univ _ + exact le_antisymm (hmax y hy) hh + +theorem LocalDiskSubmeanOn.le_boundary {u : ℂ → ℝ} {c : ℂ} {R M : ℝ} + (hR : 0 < R) (hc : ContinuousOn u (closedBall c R)) + (hu : LocalDiskSubmeanOn (ball c R) u) + (hb : ∀ z ∈ sphere c R, u z ≤ M) : ∀ z ∈ closedBall c R, u z ≤ M := by + obtain ⟨x,hx,hmax⟩ := (isCompact_closedBall c R).exists_isMaxOn + ⟨c,mem_closedBall_self hR.le⟩ hc + suffices hh : u x ≤ M from fun z hz ↦ (hmax hz).trans hh + by_cases hxb : x ∈ sphere c R + · exact hb x hxb + · have hxi : x ∈ ball c R := by + rw [mem_ball,mem_closedBall] at * + exact lt_of_le_of_ne hx (by simpa only [mem_sphere] using hxb) + have he := hu.eq_const_of_max (convex_ball c R).isPreconnected hxi + (fun z hz ↦ hmax (ball_subset_closedBall hz)) + have hec : ∀ z ∈ closedBall c R, u z = u x := by + exact Set.EqOn.of_subset_closure he hc continuousOn_const + ball_subset_closedBall (by rw [closure_ball c hR.ne']) + have hz : c + (R : ℂ) ∈ sphere c R := by simp [hR.le] + rw [← hec _ (sphere_subset_closedBall hz)] + exact hb _ hz + +theorem compact_family_local_submean + {α : Type u1} {E : Type u2} [TopologicalSpace α] [CompactSpace α] + [NormedAddCommGroup E] [NormedSpace ℂ E] + {D : Set ℂ} (hD : IsOpen D) {Φ : α → ℂ → E} + (hc : ContinuousOn (Function.uncurry Φ) (univ ×ˢ D)) + (hd : ∀ a, DifferentiableOn ℂ (Φ a) D) + {U : Set E} {q : E → ℝ} (hm : ∀ a, MapsTo (Φ a) D U) + (hl : ∀ x ∈ U, ∃ V : Set E, IsOpen V ∧ x ∈ V ∧ DiskPshOn V q) + {z : ℂ} (hz : z ∈ D) : + ∃ r : ℝ, 0 < r ∧ closedBall z r ⊆ D ∧ ∀ a, + IntegrableOn (q ∘ Φ a) (ball z r) ∧ + (volume (ball z r)).toReal * q (Φ a z) ≤ ∫ y in ball z r, q (Φ a y) := by + classical + have hh (a : α) : ∃ (A : Set α) (W : Set ℂ) (V : Set E), + A ∈ 𝓝 a ∧ W ∈ 𝓝 z ∧ IsOpen V ∧ DiskPshOn V q ∧ + ∀ b ∈ A, ∀ y ∈ W, Φ b y ∈ V := by + obtain ⟨V,hVo,haV,hV⟩ := hl _ (hm a hz) + have hcont : ContinuousAt (Function.uncurry Φ) (a,z) := + hc.continuousAt ((isOpen_univ.prod hD).mem_nhds ⟨mem_univ a,hz⟩) + have hn : (Function.uncurry Φ) ⁻¹' V ∈ 𝓝 (a,z) := hcont (hVo.mem_nhds haV) + rw [nhds_prod_eq,mem_prod_iff] at hn + obtain ⟨A,hA,W,hW,hAW⟩ := hn + exact ⟨A,W,V,hA,hW,hVo,hV,fun b hb y hy ↦ hAW (show (b,y) ∈ A ×ˢ W from ⟨hb,hy⟩)⟩ + choose A W V hA hW hVo hV hmap using hh + obtain ⟨t,_,ht⟩ := isCompact_univ.elim_nhds_subcover A (fun a _ ↦ hA a) + have hn : D ∩ ⋂ a ∈ t, W a ∈ 𝓝 z := + inter_mem (hD.mem_nhds hz) ((Filter.biInter_mem t.finite_toSet).mpr (fun a _ ↦ hW a)) + obtain ⟨r,hr,hball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp hn + refine ⟨r,hr,fun y hy ↦ (hball hy).1,?_⟩ + intro a + obtain ⟨b,hbt,hab⟩ := mem_iUnion₂.mp (ht (mem_univ a)) + let O := D ∩ (Φ a) ⁻¹' V b + have hO : IsOpen O := (hd a).continuousOn.isOpen_inter_preimage hD (hVo b) + have hbO : closedBall z r ⊆ O := by + intro y hy + have hhy := hball hy + exact ⟨hhy.1,hmap b a hab y (mem_iInter₂.mp hhy.2 b hbt)⟩ + have hp := (hV b).2 O hO (Φ a) ((hd a).mono inter_subset_left) (fun _ h ↦ h.2) + exact hp.2 z (hbO (mem_closedBall_self hr.le)) r hr hbO + +open scoped Pointwise +noncomputable section + +attribute [local instance] Measure.Subtype.measureSpace + +theorem submean_of_locally_psh + {E : Type u3} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {q : E → ℝ} (hq : ContinuousOn q U) + (hl : ∀ x ∈ U, ∃ V : Set E, IsOpen V ∧ x ∈ V ∧ DiskPshOn V q) + {D : Set ℂ} (_hD : IsOpen D) {γ : ℂ → E} + (hγ : DifferentiableOn ℂ γ D) (hm : MapsTo γ D U) + {c : ℂ} (_hc : c ∈ D) {R : ℝ} (hR : 0 < R) (hb : closedBall c R ⊆ D) : + (volume (ball c R)).toReal * q (γ c) ≤ ∫ y in ball c R, q (γ y) := by + let A := closedBall (0 : ℂ) 1 + let : IsFiniteMeasure (volume : Measure A) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall (0 : ℂ) 1).measure_lt_top⟩ + let Φ : A → ℂ → E := fun a z ↦ γ (c+(a : ℂ)*z) + let F : A → ℂ → ℝ := fun a z ↦ q (Φ a z) + have hbΦ : ∀ a : A, MapsTo (fun z : ℂ ↦ c+(a : ℂ)*z) (closedBall 0 R) + (closedBall c R) := by + intro a z hz + have ha : ‖(a : ℂ)‖ ≤ 1 := by + have hh : (a : ℂ) ∈ closedBall 0 1 := a.property + simpa only [mem_closedBall,dist_zero_right] using hh + have hz' : ‖z‖ ≤ R := by simpa using hz + simp only [mem_closedBall,dist_self_add_left,norm_mul] + exact (mul_le_of_le_one_left (norm_nonneg z) ha).trans hz' + have hΦ : ContinuousOn (Function.uncurry Φ) (univ ×ˢ closedBall 0 R) := by + apply hγ.continuousOn.comp (f := fun p : A × ℂ ↦ c+(p.1 : ℂ)*p.2) (by fun_prop) + exact fun p hp ↦ hb (hbΦ p.1 hp.2) + have hF : ContinuousOn (Function.uncurry F) (univ ×ˢ closedBall 0 R) := + hq.comp hΦ (fun p hp ↦ hm (hb (hbΦ p.1 hp.2))) + have hcont := compact_integral_continuousOn (μ := (volume : Measure A)) hF + have hdΦ : ∀ a, DifferentiableOn ℂ (Φ a) (ball 0 R) := by + intro a + apply hγ.comp (f := fun z : ℂ ↦ c+(a : ℂ)*z) (by fun_prop) + exact fun z hz ↦ hb (hbΦ a (ball_subset_closedBall hz)) + have hΦmap : ∀ a, MapsTo (Φ a) (ball 0 R) U := + fun a z hz ↦ hm (hb (hbΦ a (ball_subset_closedBall hz))) + have hlocal : LocalDiskSubmeanOn (ball 0 R) (fun z ↦ ∫ a : A, F a z) := by + refine ⟨(hcont.mono ball_subset_closedBall).upperSemicontinuousOn,?_⟩ + intro z hz + obtain ⟨r,hr,hbr,hs⟩ := compact_family_local_submean isOpen_ball + (hΦ.mono (prod_mono (Subset.refl univ) ball_subset_closedBall)) hdΦ hΦmap hl hz + have hprod : Integrable (fun p : A × ℂ ↦ F p.1 p.2) + ((volume : Measure A).prod (volume.restrict (ball z r))) := by + have hi := (hF.mono (prod_mono (Subset.refl univ) + (hbr.trans ball_subset_closedBall))).integrableOn_compact + (μ := (volume : Measure A).prod volume) (isCompact_univ.prod (isCompact_closedBall z r)) + have hj := hi.mono_set (prod_mono (Subset.refl univ) ball_subset_closedBall) + unfold IntegrableOn at hj + rw [← Measure.prod_restrict,Measure.restrict_univ] at hj + exact hj + have hp : Integrable (fun a : A ↦ F a z) := by + have hh : Continuous (fun a : A ↦ F a z) := + hF.comp_continuous (f := fun a : A ↦ (a,z)) (by fun_prop) + (fun _ ↦ ⟨mem_univ _,ball_subset_closedBall hz⟩) + exact integrableOn_univ.mp (hh.continuousOn.integrableOn_compact isCompact_univ) + refine ⟨r,hr,hbr,hprod.integral_prod_right,?_⟩ + calc + (volume (ball z r)).toReal * (∫ a : A, F a z) = + ∫ a : A, (volume (ball z r)).toReal * F a z := (integral_const_mul _ _).symm + _ ≤ ∫ a : A, ∫ y in ball z r, F a y := + integral_mono_ae (hp.const_mul _) hprod.integral_prod_left + (Eventually.of_forall fun a ↦ (hs a).2) + _ = ∫ y in ball z r, ∫ a : A, F a y := integral_integral_swap hprod + have he (z : ℂ) : (∫ a : A, F a z) = radialIntegral (q ∘ γ) c z := by + exact integral_subtype (s := closedBall (0 : ℂ) 1) measurableSet_closedBall + (fun a : ℂ ↦ q (γ (c+a*z))) + have hm0 := hlocal.le_boundary hR hcont (M := radialIntegral (q ∘ γ) c (R : ℂ)) (by + intro z hz + rw [he] + apply le_of_eq + apply radialIntegral_eq_of_norm_eq + simpa only [mem_sphere,dist_zero_right,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hR] using hz) + 0 (mem_closedBall_self hR.le) + rw [he,radialIntegral_zero,radialIntegral_pos_radius _ _ hR] at hm0 + have hv := radialIntegral_pos_radius (fun _ ↦ (1 : ℝ)) c hR + simp only [radialIntegral,setIntegral_const,measureReal_def,smul_eq_mul,mul_one] at hv + have heR := complex_closedBall_ae_ball c R + rw [measure_congr heR] at hv + rw [← setIntegral_congr_set heR] + have hn : R^2 ≠ 0 := pow_ne_zero _ hR.ne' + have hscale : R^2 * (R^2)⁻¹ = 1 := mul_inv_cancel₀ hn + have hmul := mul_le_mul_of_nonneg_left hm0 (sq_nonneg R) + calc + (volume (ball c R)).toReal * q (γ c) = + R^2 * ((volume (closedBall (0 : ℂ) 1)).toReal * q (γ c)) := by + rw [hv] + rw [← mul_assoc,← mul_assoc,hscale,one_mul] + _ ≤ R^2 * ((R^2)⁻¹ * ∫ y in closedBall c R, q (γ y)) := hmul + _ = ∫ y in closedBall c R, q (γ y) := by rw [← mul_assoc,hscale,one_mul] + +theorem DiskPshOn.of_locally + {E : Type u4} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {q : E → ℝ} (hq : ContinuousOn q U) + (hl : ∀ x ∈ U, ∃ V : Set E, IsOpen V ∧ x ∈ V ∧ DiskPshOn V q) : + DiskPshOn U q := by + refine ⟨hq.upperSemicontinuousOn,?_⟩ + intro D hD γ hγ hm + have hcont := hq.comp hγ.continuousOn hm + refine ⟨hcont.upperSemicontinuousOn,?_⟩ + intro c hc R hR hb + refine ⟨((hcont.mono hb).integrableOn_compact (isCompact_closedBall c R)).mono_set + ball_subset_closedBall,?_⟩ + exact submean_of_locally_psh hq hl hD hγ hm hc hR hb + +open Real + +theorem radialIntegral_of_circle_means {u : ℂ → ℝ} {c : ℂ} {R : ℝ} + (hR : 0 ≤ R) (hu : ContinuousOn u (closedBall c R)) + (hm : ∀ a ∈ closedBall (0 : ℂ) 1, + circleAverage (fun z ↦ u (c+a*z)) 0 R = u c) : + radialIntegral u c (R : ℂ) = (volume (closedBall (0 : ℂ) 1)).toReal * u c := by + have hmap (a : ℂ) (ha : a ∈ closedBall (0 : ℂ) 1) (θ : ℝ) : + c+a*circleMap 0 R θ ∈ closedBall c R := by + have ha' : ‖a‖ ≤ 1 := by simpa only [mem_closedBall,dist_zero_right] using ha + simp only [mem_closedBall,dist_self_add_left,norm_mul,norm_circleMap_zero,abs_of_nonneg hR] + exact mul_le_of_le_one_left hR ha' + have hc : ContinuousOn (fun p : ℂ × ℝ ↦ u (c+p.1*circleMap 0 R p.2)) + (closedBall (0 : ℂ) 1 ×ˢ Icc 0 (2*Real.pi)) := + hu.comp (by fun_prop) (fun p hp ↦ hmap p.1 hp.1 p.2) + have hi := hc.integrableOn_compact + (μ := (volume : Measure ℂ).prod volume) ((isCompact_closedBall (0 : ℂ) 1).prod isCompact_Icc) + have hij := hi.mono_set (prod_mono (Subset.refl (closedBall (0 : ℂ) 1)) Ioc_subset_Icc_self) + unfold IntegrableOn at hij + rw [← Measure.prod_restrict] at hij + have hswap := integral_integral_swap (f := fun a : ℂ ↦ fun θ : ℝ ↦ u (c+a*circleMap 0 R θ)) hij + have hr (θ : ℝ) : (∫ a in closedBall (0 : ℂ) 1, u (c+a*circleMap 0 R θ)) = + radialIntegral u c (R : ℂ) := by + apply radialIntegral_eq_of_norm_eq + simp [norm_circleMap_zero] + calc + radialIntegral u c (R : ℂ) = + (2*Real.pi)⁻¹ * ∫ θ in Ioc 0 (2*Real.pi), radialIntegral u c (R : ℂ) := by + simp only [setIntegral_const, smul_eq_mul, measureReal_def, Real.volume_Ioc] + rw [sub_zero, ENNReal.toReal_ofReal Real.two_pi_pos.le] + field_simp [Real.pi_ne_zero] + _ = (2*Real.pi)⁻¹ * ∫ θ in Ioc 0 (2*Real.pi), + ∫ a in closedBall (0 : ℂ) 1, u (c+a*circleMap 0 R θ) := by simp only [hr] + _ = (2*Real.pi)⁻¹ * ∫ a in closedBall (0 : ℂ) 1, + ∫ θ in Ioc 0 (2*Real.pi), u (c+a*circleMap 0 R θ) := by rw [hswap] + _ = ∫ a in closedBall (0 : ℂ) 1, + circleAverage (fun z ↦ u (c+a*z)) 0 R := by + simp only [circleAverage,intervalIntegral.integral_of_le Real.two_pi_pos.le, + smul_eq_mul,integral_const_mul] + _ = ∫ _a in closedBall (0 : ℂ) 1, u c := by + apply setIntegral_congr_fun measurableSet_closedBall + exact hm + _ = (volume (closedBall (0 : ℂ) 1)).toReal * u c := by + simp only [setIntegral_const,measureReal_def,smul_eq_mul] +lemma log_norm_subharmonic {D : Set ℂ} (hD : IsOpen D) {f : ℂ → ℂ} + (hf : DifferentiableOn ℂ f D) (hn : ∀ z ∈ D, f z ≠ 0) : + DiskSubharmonicOn D (fun z ↦ Real.log ‖f z‖) := by + have hcont : ContinuousOn (fun z ↦ Real.log ‖f z‖) D := + hf.continuousOn.norm.log (fun z hz ↦ norm_ne_zero_iff.mpr (hn z hz)) + refine ⟨hcont.upperSemicontinuousOn,?_⟩ + intro c hc R hR hb + refine ⟨((hcont.mono hb).integrableOn_compact (isCompact_closedBall c R)).mono_set + ball_subset_closedBall,?_⟩ + have hm : ∀ a ∈ closedBall (0 : ℂ) 1, + circleAverage (fun z ↦ Real.log ‖f (c+a*z)‖) 0 R = Real.log ‖f c‖ := by + intro a ha + have ha' : ‖a‖ ≤ 1 := by simpa only [mem_closedBall,dist_zero_right] using ha + have hg : ∀ z ∈ closedBall (0 : ℂ) |R|, c+a*z ∈ D := by + intro z hz + apply hb + have hz' : ‖z‖ ≤ R := by simpa [abs_of_pos hR] using hz + simp only [mem_closedBall,dist_self_add_left,norm_mul] + exact (mul_le_of_le_one_left (norm_nonneg z) ha').trans hz' + have hh : InnerProductSpace.HarmonicOnNhd (fun z ↦ Real.log ‖f (c+a*z)‖) + (closedBall (0 : ℂ) |R|) := by + intro z hz + apply AnalyticAt.harmonicAt_log_norm + · exact (hf.analyticAt (hD.mem_nhds (hg z hz))).comp (f := fun w : ℂ ↦ c+a*w) + (by fun_prop : AnalyticAt ℂ (fun w : ℂ ↦ c+a*w) z) + · exact hn _ (hg z hz) + simpa only [mul_zero,add_zero] using hh.circleAverage_eq + have he := radialIntegral_of_circle_means hR.le (hcont.mono hb) hm + rw [radialIntegral_pos_radius _ _ hR] at he + have hv := radialIntegral_pos_radius (fun _ ↦ (1 : ℝ)) c hR + simp only [radialIntegral,setIntegral_const,measureReal_def,smul_eq_mul,mul_one] at hv + have hball := complex_closedBall_ae_ball c R + rw [measure_congr hball] at hv + rw [← setIntegral_congr_set hball] + apply le_of_eq + rw [hv] at he + apply mul_left_cancel₀ (inv_ne_zero (pow_ne_zero 2 hR.ne')) + simpa only [mul_assoc] using he.symm + +theorem log_norm_psh {E : Type u5} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} (_hU : IsOpen U) {f : E → ℂ} (hf : DifferentiableOn ℂ f U) + (hn : ∀ x ∈ U, f x ≠ 0) : DiskPshOn U (fun x ↦ Real.log ‖f x‖) := by + refine ⟨(hf.continuousOn.norm.log (fun x hx ↦ norm_ne_zero_iff.mpr (hn x hx))).upperSemicontinuousOn,?_⟩ + intro D hD γ hγ hm + exact log_norm_subharmonic hD (hf.comp hγ hm) (fun z hz ↦ hn _ (hm hz)) +lemma DiskPshOn.comp {E : Type u6} {F : Type u7} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] {Ω : Set E} {U : Set F} + {q : E → ℝ} (hq : DiskPshOn Ω q) {f : F → E} + (hf : DifferentiableOn ℂ f U) (hmap : MapsTo f U Ω) : + DiskPshOn U (q ∘ f) := by + refine ⟨hq.1.comp hf.continuousOn hmap, ?_⟩ + intro D hD γ hγ hγmap + exact hq.2 D hD (f ∘ γ) (hf.comp hγ hγmap) (hmap.comp hγmap) + +lemma DiskSubharmonicOn.add {D : Set ℂ} {u v : ℂ → ℝ} + (hu : DiskSubharmonicOn D u) (hv : DiskSubharmonicOn D v) : + DiskSubharmonicOn D (fun z ↦ u z + v z) := by + refine ⟨hu.1.add hv.1,?_⟩ + intro c hc R hR hb + obtain ⟨hui,hus⟩ := hu.2 c hc R hR hb + obtain ⟨hvi,hvs⟩ := hv.2 c hc R hR hb + refine ⟨hui.add hvi,?_⟩ + rw [integral_add hui hvi,mul_add] + exact add_le_add hus hvs + +lemma DiskSubharmonicOn.max {D : Set ℂ} {u v : ℂ → ℝ} + (hu : DiskSubharmonicOn D u) (hv : DiskSubharmonicOn D v) : + DiskSubharmonicOn D (fun z ↦ max (u z) (v z)) := by + refine ⟨hu.1.sup hv.1,?_⟩ + intro c hc R hR hb + obtain ⟨hui,hus⟩ := hu.2 c hc R hR hb + obtain ⟨hvi,hvs⟩ := hv.2 c hc R hR hb + have hi := hui.sup hvi + refine ⟨hi,?_⟩ + dsimp only + rcases le_total (u c) (v c) with h|h + · rw [max_eq_right h] + exact hvs.trans (integral_mono hvi hi (fun z ↦ le_max_right _ _)) + · rw [max_eq_left h] + exact hus.trans (integral_mono hui hi (fun z ↦ le_max_left _ _)) + +lemma DiskPshOn.add {E : Type u8} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {u v : E → ℝ} (hu : DiskPshOn U u) (hv : DiskPshOn U v) : + DiskPshOn U (fun z ↦ u z + v z) := by + refine ⟨hu.1.add hv.1,?_⟩ + intro D hD γ hγ hm + exact (hu.2 D hD γ hγ hm).add (hv.2 D hD γ hγ hm) + +lemma DiskPshOn.max {E : Type u9} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {u v : E → ℝ} (hu : DiskPshOn U u) (hv : DiskPshOn U v) : + DiskPshOn U (fun z ↦ max (u z) (v z)) := by + refine ⟨hu.1.sup hv.1,?_⟩ + intro D hD γ hγ hm + exact (hu.2 D hD γ hγ hm).max (hv.2 D hD γ hγ hm) + +lemma diskPshOn_const {E : Type u10} [NormedAddCommGroup E] [NormedSpace ℂ E] + (U : Set E) (c : ℝ) : DiskPshOn U (fun _ ↦ c) := by + refine ⟨continuousOn_const.upperSemicontinuousOn,?_⟩ + intro D hD γ hγ hm + refine ⟨continuousOn_const.upperSemicontinuousOn,?_⟩ + intro z hz R hR hb + refine ⟨integrableOn_const measure_ball_lt_top.ne,?_⟩ + simp only [Function.comp_apply,setIntegral_const,measureReal_def,smul_eq_mul,le_refl] + +lemma DiskPshOn.const_mul_of_continuous {E : Type u11} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {u : E → ℝ} (hu : DiskPshOn U u) (hc : ContinuousOn u U) + {δ : ℝ} (hδ : 0 ≤ δ) : DiskPshOn U (fun z ↦ δ*u z) := by + refine ⟨(hc.const_mul δ).upperSemicontinuousOn,?_⟩ + intro D hD γ hγ hm + refine ⟨((hc.comp hγ.continuousOn hm).const_mul δ).upperSemicontinuousOn,?_⟩ + intro z hz R hR hb + obtain ⟨hi,hs⟩ := (hu.2 D hD γ hγ hm).2 z hz R hR hb + refine ⟨hi.const_mul δ,?_⟩ + change (volume (ball z R)).toReal * (δ*u (γ z)) ≤ ∫ y in ball z R, δ*u (γ y) + rw [integral_const_mul,mul_left_comm] + exact mul_le_mul_of_nonneg_left hs hδ + +lemma DiskPshOn.mono {E : Type u12} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U V : Set E} {u : E → ℝ} (hu : DiskPshOn U u) (hVU : V ⊆ U) : DiskPshOn V u := + ⟨hu.1.mono hVU,fun D hD γ hγ hm ↦ hu.2 D hD γ hγ (fun _ hz ↦ hVU (hm hz))⟩ + +lemma DiskPshOn.congr {E : Type u13} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} {u v : E → ℝ} (hu : DiskPshOn U u) (he : EqOn u v U) : + DiskPshOn U v := by + refine ⟨fun x hx ↦ UpperSemicontinuousWithinAt.congr_of_eventuallyEq (hu.1 x hx) hx + ((show ∀ᶠ y in 𝓝[U] x, y ∈ U from self_mem_nhdsWithin).mono (fun y hy ↦ he hy)),?_⟩ + intro D hD γ hγ hm + have hd := hu.2 D hD γ hγ hm + refine ⟨fun z hz ↦ UpperSemicontinuousWithinAt.congr_of_eventuallyEq (hd.1 z hz) hz + ((show ∀ᶠ y in 𝓝[D] z, y ∈ D from self_mem_nhdsWithin).mono (fun y hy ↦ he (hm hy))),?_⟩ + intro z hz R hR hb + have he' : (fun y ↦ u (γ y)) =ᵐ[volume.restrict (ball z R)] (fun y ↦ v (γ y)) := + (ae_restrict_mem measurableSet_ball).mono (fun y hy ↦ he (hm (hb (ball_subset_closedBall hy)))) + obtain ⟨hi,hs⟩ := hd.2 z hz R hR hb + refine ⟨hi.congr he',?_⟩ + change (volume (ball z R)).toReal * v (γ z) ≤ ∫ y in ball z R, v (γ y) + change (volume (ball z R)).toReal * u (γ z) ≤ ∫ y in ball z R, u (γ y) at hs + rwa [integral_congr_ae he',he (hm hz)] at hs +def logBarrier {E : Type u14} (q : E → ℝ) (f : E → ℂ) (δ : ℝ) (x : E) : ℝ := + if f x = 0 then 0 else max (q x + δ * Real.log ‖f x‖) 0 + +lemma logBarrier_eventually_zero {E : Type u15} [TopologicalSpace E] + {q : E → ℝ} {f : E → ℂ} {x : E} (hq : ContinuousAt q x) + (hf : ContinuousAt f x) (hx : f x = 0) {δ : ℝ} (hδ : 0 < δ) : + logBarrier q f δ =ᶠ[𝓝 x] (fun _ ↦ 0) := by + have hq' : ∀ᶠ y in 𝓝 x, q y < q x + 1 := + hq.eventually (gt_mem_nhds (lt_add_one (q x))) + have hf' : ∀ᶠ y in 𝓝 x, ‖f y‖ < Real.exp (-(q x+1)/δ) := + hf.norm.eventually (gt_mem_nhds (by simpa [hx] using Real.exp_pos (-(q x+1)/δ))) + filter_upwards [hq',hf'] with y hyq hyf + unfold logBarrier + split_ifs with hy + · rfl + · have hl := (Real.log_lt_iff_lt_exp (norm_pos_iff.mpr hy)).mpr hyf + have hm := mul_lt_mul_of_pos_left hl hδ + have he : δ * (-(q x+1)/δ) = -(q x+1) := by field_simp + rw [he] at hm + exact max_eq_right (by linarith) + +lemma logBarrier_continuousOn {E : Type u16} [TopologicalSpace E] + {U : Set E} (hU : IsOpen U) {q : E → ℝ} {f : E → ℂ} + (hq : ContinuousOn q U) (hf : ContinuousOn f U) {δ : ℝ} (hδ : 0 < δ) : + ContinuousOn (logBarrier q f δ) U := by + intro x hx + have hqa := hq.continuousAt (hU.mem_nhds hx) + have hfa := hf.continuousAt (hU.mem_nhds hx) + apply ContinuousAt.continuousWithinAt + by_cases hz : f x = 0 + · exact continuousAt_const.congr_of_eventuallyEq + (logBarrier_eventually_zero hqa hfa hz hδ) + · have hn : ∀ᶠ y in 𝓝 x, f y ≠ 0 := hfa.eventually_ne hz + have hc : ContinuousAt (fun y ↦ max (q y + δ * Real.log ‖f y‖) 0) x := + (hqa.add ((hfa.norm.log (norm_ne_zero_iff.mpr hz)).const_mul δ)).max continuousAt_const + apply hc.congr_of_eventuallyEq + filter_upwards [hn] with y hy + simp only [logBarrier,hy,↓reduceIte] + +lemma logBarrier_nonneg {E : Type u17} (q : E → ℝ) (f : E → ℂ) (δ : ℝ) (x : E) : + 0 ≤ logBarrier q f δ x := by + unfold logBarrier + split_ifs + · exact le_refl _ + · exact le_max_right _ _ + +lemma logBarrier_le {E : Type u18} {q : E → ℝ} {f : E → ℂ} {δ : ℝ} + (hδ0 : 0 ≤ δ) (hδ1 : δ ≤ 1) {x : E} (hq : 0 ≤ q x) : + logBarrier q f δ x ≤ q x + ‖f x‖ := by + unfold logBarrier + split_ifs with hf + · positivity + · apply max_le _ (by positivity) + apply add_le_add_right + by_cases hl : Real.log ‖f x‖ ≤ 0 + · exact (mul_nonpos_of_nonneg_of_nonpos hδ0 hl).trans (norm_nonneg _) + · exact (mul_le_of_le_one_left (le_of_not_ge hl) hδ1).trans + ((Real.log_le_sub_one_of_pos (norm_pos_iff.mpr hf)).trans (by linarith)) + +lemma logBarrier_tendsto_of_ne_zero {E : Type u19} {q : E → ℝ} {f : E → ℂ} + {δ : ℕ → ℝ} (hδ : Tendsto δ atTop (𝓝 0)) {x : E} + (hf : f x ≠ 0) (hq : 0 ≤ q x) : + Tendsto (fun n ↦ logBarrier q f (δ n) x) atTop (𝓝 (q x)) := by + simpa only [logBarrier,hf,↓reduceIte,zero_mul,add_zero,max_eq_left hq] using + ((tendsto_const_nhds (x := q x)).add (hδ.mul_const (Real.log ‖f x‖))).max + (tendsto_const_nhds (x := (0 : ℝ))) + +theorem logBarrier_psh {E : Type u20} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} (hU : IsOpen U) {q : E → ℝ} {f : E → ℂ} + (hq : ContinuousOn q U) (hf : Differentiable ℂ f) + (hp : DiskPshOn (U ∩ {x | f x ≠ 0}) q) {δ : ℝ} (hδ : 0 < δ) : + DiskPshOn U (logBarrier q f δ) := by + apply DiskPshOn.of_locally (logBarrier_continuousOn hU hq hf.continuous.continuousOn hδ) + intro x hx + by_cases hz : f x = 0 + · have he := logBarrier_eventually_zero (hq.continuousAt (hU.mem_nhds hx)) + hf.continuous.continuousAt hz hδ + obtain ⟨V,hV,ho,hxV⟩ := _root_.mem_nhds_iff.mp he + refine ⟨V,ho,hxV,(diskPshOn_const V 0).congr ?_⟩ + exact fun y hy ↦ (hV hy).symm + · let V := U ∩ {y | f y ≠ 0} + have hV : IsOpen V := hU.inter (isClosed_singleton.isOpen_compl.preimage hf.continuous) + have hn : ∀ y ∈ V, f y ≠ 0 := fun y hy ↦ hy.2 + have hc : ContinuousOn (fun y ↦ Real.log ‖f y‖) V := + hf.continuous.continuousOn.norm.log (fun y hy ↦ norm_ne_zero_iff.mpr (hn y hy)) + have hl := (log_norm_psh hV hf.differentiableOn hn).const_mul_of_continuous hc hδ.le + refine ⟨V,hV,⟨hx,hz⟩,((hp.add hl).max (diskPshOn_const V 0)).congr ?_⟩ + intro y hy + simp only [logBarrier,hn y hy,↓reduceIte] + +theorem DiskSubharmonicOn.pointwise_limit {Ω : Set ℂ} {u : ℕ → ℂ → ℝ} + {q : ℂ → ℝ} (hu : ∀ n, DiskSubharmonicOn Ω (u n)) + (hq : UpperSemicontinuousOn q Ω) + (hlim : ∀ x ∈ Ω, Tendsto (fun n ↦ u n x) atTop (𝓝 (q x))) + (hbound : ∀ x ∈ Ω, ∀ r : ℝ, 0 < r → closedBall x r ⊆ Ω → + ∃ C : ℝ, ∀ n, ∀ y ∈ ball x r, ‖u n y‖ ≤ C) : DiskSubharmonicOn Ω q := by + refine ⟨hq, ?_⟩ + intro x hx r hr hb + obtain ⟨C, hC⟩ := hbound x hx r hr hb + have hi (n : ℕ) : IntegrableOn (u n) (ball x r) := (hu n).2 x hx r hr hb |>.1 + have hc : IntegrableOn (fun _ : ℂ ↦ C) (ball x r) := + integrableOn_const measure_ball_lt_top.ne + have hCae (n : ℕ) : ∀ᵐ y ∂volume.restrict (ball x r), ‖u n y‖ ≤ C := + (ae_restrict_mem measurableSet_ball).mono fun y hy ↦ hC n y hy + have hl : ∀ᵐ y ∂volume.restrict (ball x r), + Tendsto (fun n ↦ u n y) atTop (𝓝 (q y)) := + (ae_restrict_mem measurableSet_ball).mono fun y hy ↦ hlim y (hb (ball_subset_closedBall hy)) + have hqi : IntegrableOn q (ball x r) := by + apply hc.mono' (aestronglyMeasurable_of_tendsto_ae atTop + (fun n ↦ (hi n).aestronglyMeasurable) hl) + filter_upwards [hl, ae_all_iff.mpr hCae] with y hy hCy + exact le_of_tendsto hy.norm (Eventually.of_forall hCy) + have hInt := tendsto_integral_of_dominated_convergence (fun _ : ℂ ↦ C) + (fun n ↦ (hi n).aestronglyMeasurable) hc hCae hl + refine ⟨hqi, ?_⟩ + exact le_of_tendsto_of_tendsto ((hlim x hx).const_mul _) hInt + (Eventually.of_forall fun n ↦ (hu n).2 x hx r hr hb |>.2) + +theorem DiskSubharmonicOn.integral {α : Type u21} [MeasurableSpace α] + {μ : Measure α} [SFinite μ] {Ω : Set ℂ} {F : α → ℂ → ℝ} + (hF : ∀ᵐ a ∂μ, DiskSubharmonicOn Ω (F a)) + (hc : UpperSemicontinuousOn (fun z ↦ ∫ a, F a z ∂μ) Ω) + (hpoint : ∀ z ∈ Ω, Integrable (fun a ↦ F a z) μ) + (hprod : ∀ z ∈ Ω, ∀ r : ℝ, 0 < r → closedBall z r ⊆ Ω → + Integrable (fun p : α × ℂ ↦ F p.1 p.2) (μ.prod (volume.restrict (ball z r)))) : + DiskSubharmonicOn Ω (fun z ↦ ∫ a, F a z ∂μ) := by + refine ⟨hc, ?_⟩ + intro z hz r hr hb + have hi := hprod z hz r hr hb + refine ⟨hi.integral_prod_right, ?_⟩ + have hm : ∀ᵐ a ∂μ, (volume (ball z r)).toReal * F a z ≤ ∫ y in ball z r, F a y := + hF.mono fun a ha ↦ (ha.2 z hz r hr hb).2 + calc + (volume (ball z r)).toReal * (∫ a, F a z ∂μ) = + ∫ a, (volume (ball z r)).toReal * F a z ∂μ := (integral_const_mul _ _).symm + _ ≤ ∫ a, (∫ y in ball z r, F a y) ∂μ := + integral_mono_ae ((hpoint z hz).const_mul _) hi.integral_prod_left hm + _ = ∫ y in ball z r, ∫ a, F a y ∂μ := integral_integral_swap hi + +theorem DiskPshOn.pointwise_limit {E : Type u22} [NormedAddCommGroup E] + [NormedSpace ℂ E] {Ω : Set E} {u : ℕ → E → ℝ} {q : E → ℝ} + (hu : ∀ n, DiskPshOn Ω (u n)) (hq : UpperSemicontinuousOn q Ω) + (hlim : ∀ x ∈ Ω, Tendsto (fun n ↦ u n x) atTop (𝓝 (q x))) + (hbound : ∀ K : Set E, IsCompact K → K ⊆ Ω → + ∃ C : ℝ, ∀ n, ∀ x ∈ K, ‖u n x‖ ≤ C) : DiskPshOn Ω q := by + refine ⟨hq, ?_⟩ + intro D hD γ hγ hmap + refine DiskSubharmonicOn.pointwise_limit (fun n ↦ (hu n).2 D hD γ hγ hmap) + (hq.comp hγ.continuousOn hmap) (fun x hx ↦ hlim (γ x) (hmap hx)) ?_ + intro x hx r hr hb + have hc : IsCompact (γ '' closedBall x r) := + (isCompact_closedBall x r).image_of_continuousOn (hγ.continuousOn.mono hb) + obtain ⟨C, hC⟩ := hbound _ hc (image_subset_iff.mpr (hmap.mono_left hb)) + exact ⟨C, fun n y hy ↦ hC n (γ y) ⟨y, ball_subset_closedBall hy, rfl⟩⟩ + +lemma continuousOn_integral_compact_parameter + {E : Type u23} {α : Type u24} [NormedAddCommGroup E] [LocallyCompactSpace E] + [TopologicalSpace α] [CompactSpace α] [MeasurableSpace α] [BorelSpace α] + {μ : Measure α} [IsFiniteMeasure μ] {Ω : Set E} (hΩ : IsOpen Ω) + {F : α → E → ℝ} (hF : ContinuousOn (Function.uncurry F) (univ ×ˢ Ω)) : + ContinuousOn (fun x ↦ ∫ a, F a x ∂μ) Ω := by + let : LocallyCompactSpace Ω := hΩ.locallyCompactSpace + have hc : Continuous (fun p : Ω × α ↦ F p.2 p.1) := + hF.comp_continuous (f := fun p : Ω × α ↦ (p.2, (p.1 : E))) + (by fun_prop) (fun p ↦ ⟨mem_univ _, p.1.property⟩) + have hi := continuous_parametric_integral_of_continuous (μ := μ) + (f := fun x : Ω ↦ fun a : α ↦ F a x) hc isCompact_univ + apply continuousOn_iff_continuous_domRestrict.mpr + convert hi using 1 + ext x + simp only [Set.domRestrict_apply, setIntegral_univ] + +theorem DiskPshOn.integral_compact_parameter + {E : Type u25} {α : Type u26} [NormedAddCommGroup E] [NormedSpace ℂ E] [LocallyCompactSpace E] + [TopologicalSpace α] [CompactSpace α] [T2Space α] [SecondCountableTopology α] + [MeasurableSpace α] [BorelSpace α] {μ : Measure α} [IsFiniteMeasure μ] + {Ω : Set E} (hΩ : IsOpen Ω) {F : α → E → ℝ} + (hc : ContinuousOn (Function.uncurry F) (univ ×ˢ Ω)) + (hF : ∀ a, DiskPshOn Ω (F a)) : DiskPshOn Ω (fun x ↦ ∫ a, F a x ∂μ) := by + have hcont := continuousOn_integral_compact_parameter (μ := μ) hΩ hc + refine ⟨hcont.upperSemicontinuousOn, ?_⟩ + intro D hD γ hγ hmap + apply DiskSubharmonicOn.integral + (Eventually.of_forall fun a ↦ (hF a).2 D hD γ hγ hmap) + (hcont.upperSemicontinuousOn.comp hγ.continuousOn hmap) + · intro z hz + have hh : Continuous (fun a ↦ F a (γ z)) := + hc.comp_continuous (f := fun a : α ↦ (a, γ z)) + (by fun_prop) (fun a ↦ ⟨mem_univ _, hmap hz⟩) + exact integrableOn_univ.mp (hh.continuousOn.integrableOn_compact isCompact_univ) + · intro z hz r hr hb + have hcomp : ContinuousOn (fun p : α × ℂ ↦ F p.1 (γ p.2)) + (univ ×ˢ closedBall z r) := by + apply hc.comp (continuous_fst.continuousOn.prodMk + (hγ.continuousOn.comp continuous_snd.continuousOn (fun p hp ↦ hb hp.2))) + exact fun p hp ↦ ⟨mem_univ _, hmap (hb hp.2)⟩ + have hi := hcomp.integrableOn_compact (μ := μ.prod volume) (isCompact_univ.prod (isCompact_closedBall z r)) + have hij := hi.mono_set (prod_mono (Subset.refl univ) ball_subset_closedBall) + unfold IntegrableOn at hij + rw [← Measure.prod_restrict univ (ball z r), Measure.restrict_univ] at hij + exact hij + +theorem averaged_hypersurface_removal + {E : Type u27} {α : Type u28} [NormedAddCommGroup E] [NormedSpace ℂ E] [LocallyCompactSpace E] + [TopologicalSpace α] [CompactSpace α] [T2Space α] [SecondCountableTopology α] + [MeasurableSpace α] [BorelSpace α] {μ : Measure α} [IsFiniteMeasure μ] + {U V : Set E} (hU : IsOpen U) (hV : IsOpen V) {q : E → ℝ} {f : E → ℂ} + (hq : ContinuousOn q U) (hq0 : ∀ x ∈ U, 0 ≤ q x) (hf : Differentiable ℂ f) + (hp : DiskPshOn (U ∩ {x | f x ≠ 0}) q) {H : α → E → E} + (hHc : ContinuousOn (Function.uncurry H) (univ ×ˢ V)) + (hHd : ∀ a, DifferentiableOn ℂ (H a) V) (hHm : ∀ a, MapsTo (H a) V U) + (hzero : ∀ x ∈ V, ∀ᵐ a ∂μ, f (H a x) ≠ 0) : + DiskPshOn V (fun x ↦ ∫ a, q (H a x) ∂μ) := by + let δ : ℕ → ℝ := fun n ↦ 1 / ((n : ℝ)+1) + have hδp (n : ℕ) : 0 < δ n := by dsimp [δ]; positivity + have hδ1 (n : ℕ) : δ n ≤ 1 := by + dsimp [δ] + exact (div_le_one (by positivity)).mpr (by have := Nat.cast_nonneg (α := ℝ) n; linarith) + have hδlim : Tendsto δ atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + let F : ℕ → α → E → ℝ := fun n a x ↦ logBarrier q f (δ n) (H a x) + have hFc (n : ℕ) : ContinuousOn (Function.uncurry (F n)) (univ ×ˢ V) := + (logBarrier_continuousOn hU hq hf.continuous.continuousOn (hδp n)).comp hHc + (fun p hp ↦ hHm p.1 hp.2) + have hFpsh (n : ℕ) (a : α) : DiskPshOn V (F n a) := + (logBarrier_psh hU hq hf hp (hδp n)).comp (hHd a) (hHm a) + have hqc : ContinuousOn (fun p : α × E ↦ q (H p.1 p.2)) (univ ×ˢ V) := + hq.comp hHc (fun p hp ↦ hHm p.1 hp.2) + have hbc : ContinuousOn (fun p : α × E ↦ q (H p.1 p.2) + ‖f (H p.1 p.2)‖) + (univ ×ˢ V) := hqc.add (hf.continuous.continuousOn.comp hHc (fun _ _ ↦ mem_univ _)).norm + have hbound : ∀ K : Set E, IsCompact K → K ⊆ V → + ∃ C : ℝ, ∀ n, ∀ a, ∀ x ∈ K, ‖F n a x‖ ≤ C := by + intro K hK hKV + obtain ⟨C,hC⟩ := (isCompact_univ.prod hK).exists_bound_of_continuousOn + (hbc.mono (prod_mono (Subset.refl univ) hKV)) + refine ⟨C,fun n a x hx ↦ ?_⟩ + rw [Real.norm_eq_abs,abs_of_nonneg (logBarrier_nonneg q f (δ n) (H a x))] + exact (logBarrier_le (hδp n).le (hδ1 n) (hq0 _ (hHm a (hKV hx)))).trans + ((le_abs_self _).trans (hC (a,x) ⟨mem_univ _,hx⟩)) + apply DiskPshOn.pointwise_limit + (u := fun n x ↦ ∫ a, F n a x ∂μ) + (fun n ↦ DiskPshOn.integral_compact_parameter hV (hFc n) (hFpsh n)) + (continuousOn_integral_compact_parameter (μ := μ) (F := fun a x ↦ q (H a x)) hV hqc).upperSemicontinuousOn + · intro x hx + obtain ⟨C,hC⟩ := hbound {x} isCompact_singleton (singleton_subset_iff.mpr hx) + have hi (n : ℕ) : Integrable (fun a ↦ F n a x) μ := by + have hc : Continuous (fun a ↦ F n a x) := + (hFc n).comp_continuous (f := fun a : α ↦ (a,x)) (by fun_prop) + (fun _ ↦ ⟨mem_univ _,hx⟩) + exact integrableOn_univ.mp (hc.continuousOn.integrableOn_compact isCompact_univ) + apply tendsto_integral_of_dominated_convergence (fun _ : α ↦ C) + (fun n ↦ (hi n).aestronglyMeasurable) (integrable_const C) + (fun n ↦ Eventually.of_forall (fun a ↦ hC n a x (mem_singleton x))) + exact (hzero x hx).mono (fun a ha ↦ + logBarrier_tendsto_of_ne_zero hδlim ha (hq0 _ (hHm a hx))) + · intro K hK hKV + obtain ⟨C,hC⟩ := hbound K hK hKV + refine ⟨C * μ.real univ,fun n x hx ↦ ?_⟩ + exact norm_integral_le_of_norm_le_const (Eventually.of_forall (fun a ↦ hC n a x hx)) + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric +open scoped unitInterval +noncomputable section + +lemma interval_translation_ne_zero_ae (z : ℂ) {δ : ℝ} (hδ : δ ≠ 0) : + ∀ᵐ a : unitInterval, z + (δ : ℂ) * (a : ℝ) ≠ 0 := by + have hinj : Function.Injective (fun a : unitInterval ↦ z + (δ : ℂ) * (a : ℝ)) := by + intro a b hab + apply Subtype.ext + apply Complex.ofReal_injective + exact mul_left_cancel₀ (Complex.ofReal_ne_zero.mpr hδ) (add_left_cancel hab) + have hs : Set.Subsingleton {a : unitInterval | z + (δ : ℂ) * (a : ℝ) = 0} := by + intro a ha b hb + exact hinj (ha.trans hb.symm) + simpa only [ae_iff, not_not] using hs.countable.measure_zero (μ := volume) + +variable {V : Type u29} [NormedAddCommGroup V] [NormedSpace ℂ V] + [LocallyCompactSpace V] + +omit [NormedSpace ℂ V] [LocallyCompactSpace V] in +lemma first_translation_continuous (δ : ℝ) : + Continuous (fun p : unitInterval × (ℂ × V) ↦ + (p.2.1 + (δ : ℂ) * (p.1 : ℝ), p.2.2)) := by + fun_prop + +omit [NormedSpace ℂ V] [LocallyCompactSpace V] in +lemma first_translation_dist (δ : ℝ) (hδ : 0 ≤ δ) (a : unitInterval) (x : ℂ × V) : + dist (x.1 + (δ : ℂ) * (a : ℝ), x.2) x ≤ δ := by + change max (dist (x.1 + (δ : ℂ) * (a : ℝ)) x.1) (dist x.2 x.2) ≤ δ + simp only [dist_self, dist_eq_norm, add_sub_cancel_left, norm_mul, + Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg hδ, abs_of_nonneg a.property.1] + exact max_le (mul_le_of_le_one_right hδ a.property.2) hδ + +omit [NormedSpace ℂ V] [LocallyCompactSpace V] in + +lemma translation_average_tendsto {q : ℂ × V → ℝ} {c : ℂ × V} {r : ℝ} + (hr : 0 < r) (hq : ContinuousOn q (ball c r)) {x : ℂ × V} + (hx : x ∈ ball c (r / 2)) : + Tendsto (fun n : ℕ ↦ ∫ a : unitInterval, + q (x.1 + ((r / (4 * ((n : ℝ) + 1)) : ℝ) : ℂ) * (a : ℝ), x.2)) + atTop (𝓝 (q x)) := by + let δ : ℕ → ℝ := fun n ↦ r / (4 * ((n : ℝ) + 1)) + have hδp (n : ℕ) : 0 ≤ δ n := by dsimp [δ]; positivity + have hδle (n : ℕ) : δ n ≤ r / 4 := by + dsimp [δ] + exact div_le_div_of_nonneg_left hr.le (by positivity) (by nlinarith [Nat.cast_nonneg (α := ℝ) n]) + have hδlim : Tendsto δ atTop (𝓝 0) := by + have hh := tendsto_one_div_add_atTop_nhds_zero_nat.const_mul (r / 4) + convert hh using 1 <;> simp [δ, div_eq_mul_inv, mul_comm, mul_left_comm] + have hxq : x ∈ ball c r := by exact ball_subset_ball (by linarith) hx + have hxcont : ContinuousAt q x := (hq x hxq).continuousAt (isOpen_ball.mem_nhds hxq) + have hmap (n : ℕ) (a : unitInterval) : + (x.1 + (δ n : ℂ) * (a : ℝ), x.2) ∈ ball c r := by + apply lt_of_le_of_lt (dist_triangle _ x c) + have hd := first_translation_dist (V := V) (δ n) (hδp n) a x + have hx' : dist x c < r / 2 := hx + linarith [hδle n] + obtain ⟨s, hs, hsball⟩ := Metric.nhds_basis_closedBall.mem_iff.mp + (hxcont (ball_mem_nhds (q x) (show 0 < (1 : ℝ) by norm_num))) + have he : ∀ᶠ n : ℕ in atTop, δ n ≤ s := + (tendsto_order.1 hδlim).2 s hs + |>.mono (fun _ h ↦ h.le) + suffices Tendsto (fun n : ℕ ↦ ∫ a : unitInterval, + q (x.1 + (δ n : ℂ) * (a : ℝ), x.2)) atTop + (𝓝 (∫ _a : unitInterval, q x)) by simpa [δ] using this + apply tendsto_integral_filter_of_dominated_convergence + (fun _ : unitInterval ↦ ‖q x‖ + 1) + · filter_upwards [] with n + apply Continuous.aestronglyMeasurable + exact (hq.comp_continuous + (by fun_prop : Continuous (fun a : unitInterval ↦ (x.1 + (δ n : ℂ)*(a : ℝ),x.2))) + (hmap n)) + · filter_upwards [he] with n hn + exact Eventually.of_forall fun a ↦ by + have hqa := hsball ((first_translation_dist (V := V) (δ n) (hδp n) a x).trans hn) + have hdist : dist (q (x.1 + (δ n : ℂ)*(a : ℝ),x.2)) (q x) < 1 := hqa + calc + ‖q (x.1 + (δ n : ℂ)*(a : ℝ),x.2)‖ ≤ + dist (q (x.1 + (δ n : ℂ)*(a : ℝ),x.2)) (q x) + ‖q x‖ := by + simpa only [dist_zero_right] using + (dist_triangle (q (x.1 + (δ n : ℂ)*(a : ℝ),x.2)) (q x) 0) + _ ≤ ‖q x‖ + 1 := by linarith + · exact integrable_const _ + · exact Eventually.of_forall fun a ↦ hxcont.tendsto.comp (by + apply Metric.tendsto_nhds.mpr + intro ε hε + filter_upwards [(tendsto_order.1 hδlim).2 ε hε] with n hn + exact (first_translation_dist (V := V) (δ n) (hδp n) a x).trans_lt hn) + +theorem first_hyperplane_removable_ball {c : ℂ × V} {r : ℝ} (hr : 0 < r) + {q : ℂ × V → ℝ} (hq : ContinuousOn q (ball c r)) + (hq0 : ∀ x ∈ ball c r, 0 ≤ q x) + (hp : DiskPshOn (ball c r ∩ {x | x.1 ≠ 0}) q) : + DiskPshOn (ball c (r / 2)) q := by + let : ProperSpace (ℂ × V) := ProperSpace.of_locallyCompactSpace ℂ + let δ : ℕ → ℝ := fun n ↦ r / (4 * ((n : ℝ) + 1)) + let H : ℕ → unitInterval → (ℂ × V) → (ℂ × V) := + fun n a x ↦ (x.1 + (δ n : ℂ) * (a : ℝ), x.2) + have hδp (n : ℕ) : 0 < δ n := by dsimp [δ]; positivity + have hδle (n : ℕ) : δ n ≤ r / 4 := by + dsimp [δ] + exact div_le_div_of_nonneg_left hr.le (by positivity) + (by nlinarith [Nat.cast_nonneg (α := ℝ) n]) + have hmapSmall (n : ℕ) (a : unitInterval) (x : ℂ × V) + (hx : x ∈ ball c (r / 2)) : H n a x ∈ closedBall c (3*r/4) := by + have hd := first_translation_dist (V := V) (δ n) (hδp n).le a x + change dist (H n a x) c ≤ 3*r/4 + have ht := dist_triangle (H n a x) x c + have hx' : dist x c < r/2 := hx + change dist (H n a x) x ≤ δ n at hd + linarith [hδle n] + have hb : closedBall c (3*r/4) ⊆ ball c r := + closedBall_subset_ball (by linarith) + have hmap (n : ℕ) (a : unitInterval) : MapsTo (H n a) (ball c (r/2)) (ball c r) := + fun x hx ↦ hb (hmapSmall n a x hx) + have hu (n : ℕ) : DiskPshOn (ball c (r / 2)) + (fun x ↦ ∫ a : unitInterval, q (H n a x)) := by + apply averaged_hypersurface_removal isOpen_ball isOpen_ball hq hq0 + (f := fun x : ℂ × V ↦ x.1) differentiable_fst hp + (first_translation_continuous (V := V) (δ n)).continuousOn + (fun a ↦ (by fun_prop : Differentiable ℂ (H n a)).differentiableOn) (hmap n) + intro x _ + exact interval_translation_ne_zero_ae x.1 (hδp n).ne' + apply DiskPshOn.pointwise_limit hu + (hq.mono (ball_subset_ball (by linarith))).upperSemicontinuousOn + · intro x hx + exact translation_average_tendsto hr hq hx + · intro K _hK hKV + obtain ⟨C,hC⟩ := (isCompact_closedBall c (3*r/4)).exists_bound_of_continuousOn (hq.mono hb) + refine ⟨C,fun n x hx ↦ ?_⟩ + have hh := norm_integral_le_of_norm_le_const (μ := (volume : Measure unitInterval)) + (C := C) (Eventually.of_forall (fun a ↦ hC _ (hmapSmall n a x (hKV hx)))) + simpa using hh + +theorem first_hyperplane_removable {U : Set (ℂ × V)} (hU : IsOpen U) + {q : ℂ × V → ℝ} (hq : ContinuousOn q U) (hq0 : ∀ x ∈ U, 0 ≤ q x) + (hp : DiskPshOn (U ∩ {x | x.1 ≠ 0}) q) : DiskPshOn U q := by + apply DiskPshOn.of_locally hq + intro x hx + obtain ⟨r, hr, hb⟩ := Metric.nhds_basis_ball.mem_iff.mp (hU.mem_nhds hx) + refine ⟨ball x (r/2), isOpen_ball, mem_ball_self (by linarith), ?_⟩ + exact first_hyperplane_removable_ball hr (hq.mono hb) (fun y hy ↦ hq0 y (hb hy)) + (hp.mono (inter_subset_inter_left _ hb)) + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/RootTrace.lean b/lean/OAI/Geometry/QuadricBundles/RootTrace.lean new file mode 100644 index 0000000000000000000000000000000000000000..b89221921d8832fd422f19824a32ffab8f14b4a7 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/RootTrace.lean @@ -0,0 +1,300 @@ +import OAI.Geometry.QuadricBundles.Removability + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 + +namespace QuadricCounterexample +open Complex Topology BigOperators + +noncomputable section +variable (m : ℕ) [NeZero m] +local instance : Fintype (rootsOfUnity m ℂ) := Fintype.ofFinite _ + +noncomputable def chosenRoot (x : ℂ) : ℂ := + Classical.choose ((Complex.isOpenQuotientMap_pow m).surjective x) + +lemma chosenRoot_pow (x : ℂ) : chosenRoot m x ^ m = x := + Classical.choose_spec ((Complex.isOpenQuotientMap_pow m).surjective x) + +lemma same_power_orbit {x y : ℂ} (h : x^m=y^m) : + ∃ ζ : rootsOfUnity m ℂ, x = (ζ.val : ℂ)*y := by + by_cases hy : y=0 + · have hx : x=0 := (pow_eq_zero_iff (NeZero.ne m)).mp (by simpa [hy, zero_pow (NeZero.ne m)] using h) + exact ⟨1, by simp [hx,hy]⟩ + · have hp : (x/y)^m=1 := by rw [div_pow,h,div_self (pow_ne_zero m hy)] + exact ⟨rootsOfUnity.mkOfPowEq (x/y) hp, by simp [div_mul_cancel₀ _ hy]⟩ + +def rootOrbitAverage {V : Type u1} (F : ℂ × V → ℝ) (p : ℂ × V) : ℝ := + (m : ℝ)⁻¹ * ∑ ζ : rootsOfUnity m ℂ, F ((ζ.val : ℂ)*p.1,p.2) + +def rootTrace {V : Type u2} (F : ℂ × V → ℝ) (p : ℂ × V) : ℝ := + rootOrbitAverage m F (chosenRoot m p.1,p.2) + +lemma rootOrbitAverage_orbit {V : Type u3} (F : ℂ × V → ℝ) (x : ℂ) (v : V) + (η : rootsOfUnity m ℂ) : + rootOrbitAverage m F ((η.val : ℂ)*x,v) = rootOrbitAverage m F (x,v) := by + unfold rootOrbitAverage + congr 1 + have he := Equiv.sum_comp (Equiv.mulRight η) + (fun ζ : rootsOfUnity m ℂ ↦ F ((ζ.val : ℂ)*x,v)) + change (∑ ζ : rootsOfUnity m ℂ, F ((((ζ * η).val : ℂ))*x,v)) = _ at he + simpa only [Subgroup.coe_mul, Units.val_mul, mul_assoc] using he + +lemma rootTrace_pow {V : Type u4} (F : ℂ × V → ℝ) (x : ℂ) (v : V) : + rootTrace m F (x^m,v) = rootOrbitAverage m F (x,v) := by + obtain ⟨ζ,hζ⟩ := same_power_orbit m (chosenRoot_pow m (x^m)) + change rootOrbitAverage m F (chosenRoot m (x^m),v) = _ + rw [hζ,rootOrbitAverage_orbit] + +lemma continuous_rootOrbitAverage {V : Type u5} [TopologicalSpace V] + {F : ℂ × V → ℝ} (hF : Continuous F) : Continuous (rootOrbitAverage m F) := by + unfold rootOrbitAverage + apply Continuous.const_mul + apply continuous_finsetSum + intro ζ _ + exact hF.comp (by fun_prop) + +theorem continuous_rootTrace {V : Type u6} [TopologicalSpace V] + {F : ℂ × V → ℝ} (hF : Continuous F) : Continuous (rootTrace m F) := by + have hquot := ((Complex.isOpenQuotientMap_pow m).prodMap + (IsOpenQuotientMap.id (X := V))).isQuotientMap + apply hquot.continuous_iff.mpr + convert continuous_rootOrbitAverage m hF using 1 + ext p + exact rootTrace_pow m F p.1 p.2 + +lemma rootTrace_zero {V : Type u7} (F : ℂ × V → ℝ) (v : V) : + rootTrace m F (0,v) = F (0,v) := by + have hc : Fintype.card (rootsOfUnity m ℂ) = m := by + rw [← Nat.card_eq_fintype_card, Complex.card_rootsOfUnity] + have hz : (0 : ℂ)^m=0 := zero_pow (NeZero.ne m) + conv_lhs => rw [← hz] + rw [rootTrace_pow] + simp only [rootOrbitAverage, mul_zero, Finset.sum_const, Finset.card_univ, + nsmul_eq_mul, hc] + rw [← mul_assoc, inv_mul_cancel₀ (Nat.cast_ne_zero.mpr (NeZero.ne m)), one_mul] + +lemma rootTrace_nonneg {V : Type u8} {F : ℂ × V → ℝ} + (hF : ∀ p, 0 ≤ F p) (p : ℂ × V) : 0 ≤ rootTrace m F p := by + apply mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg m)) + exact Finset.sum_nonneg fun ζ _ ↦ hF _ + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Complex BigOperators +noncomputable section + +lemma DiskPshOn.sum {E : Type u9} {ι : Type u10} [NormedAddCommGroup E] [NormedSpace ℂ E] + {U : Set E} (s : Finset ι) (q : ι → E → ℝ) (hq : ∀ i ∈ s, DiskPshOn U (q i)) : + DiskPshOn U (fun x ↦ ∑ i ∈ s, q i x) := by + classical + induction s using Finset.induction_on with + | empty => simpa only [Finset.sum_empty] using diskPshOn_const U 0 + | @insert i s hi ih => + simp only [Finset.sum_insert hi] + exact (hq i (Finset.mem_insert_self i s)).add + (ih (fun j hj ↦ hq j (Finset.mem_insert_of_mem hj))) + +variable (m : ℕ) [NeZero m] +local instance : Fintype (rootsOfUnity m ℂ) := Fintype.ofFinite _ + +lemma rootTrace_eq_of_pow {W : Type u11} (F : ℂ × W → ℝ) {z x : ℂ} (hz : z^m=x) + (v : W) : rootTrace m F (x,v) = rootOrbitAverage m F (z,v) := by + rw [← hz, rootTrace_pow] + +theorem continuousOn_rootTrace {W : Type u12} [TopologicalSpace W] + {U : Set (ℂ × W)} {F : ℂ × W → ℝ} (hU : IsOpen U) + (hF : ContinuousOn F ((fun p : ℂ × W ↦ (p.1^m,p.2)) ⁻¹' U)) : + ContinuousOn (rootTrace m F) U := by + let π : ℂ × W → ℂ × W := fun p ↦ (p.1^m,p.2) + have hav : ContinuousOn (rootOrbitAverage m F) (π ⁻¹' U) := by + apply ContinuousOn.const_mul + apply continuousOn_finsetSum + intro ζ _ + apply hF.comp (by fun_prop : ContinuousOn + (fun p : ℂ × W ↦ ((ζ.val : ℂ)*p.1,p.2)) (π ⁻¹' U)) + intro p hp + change (((ζ.val : ℂ)*p.1)^m,p.2) ∈ U + rw [mul_pow, (mem_rootsOfUnity' m ζ.val).mp ζ.property, one_mul] + exact hp + have hπ := ((Complex.isOpenQuotientMap_pow m).prodMap + (IsOpenQuotientMap.id (X := W))) + apply (hπ.isQuotientMap.continuousOn_isOpen_iff hU).mpr + apply hav.congr + intro p _ + exact rootTrace_pow m F p.1 p.2 + +def centeredRoot (x : ℂ) (z : ℂ) : ℂ := + chosenRoot m x * (z/x) ^ ((m : ℂ)⁻¹) + +lemma centeredRoot_pow {x : ℂ} (hx : x ≠ 0) (z : ℂ) : centeredRoot m x z ^ m = z := by + rw [centeredRoot, mul_pow, chosenRoot_pow, + Complex.cpow_nat_inv_pow _ (NeZero.ne m)] + exact mul_div_cancel₀ z hx + +lemma centeredRoot_differentiableOn {x : ℂ} : + DifferentiableOn ℂ (centeredRoot m x) {z | z/x ∈ Complex.slitPlane} := by + intro z hz + apply DifferentiableAt.differentiableWithinAt + exact ((analyticAt_const.mul ((analyticAt_id.div_const (c := x)).cpow analyticAt_const hz)).differentiableAt) + +variable {V : Type u13} [NormedAddCommGroup V] [NormedSpace ℂ V] + [LocallyCompactSpace V] + +omit [LocallyCompactSpace V] in + +theorem rootTrace_psh_off_zero {U : Set (ℂ × V)} (hU : IsOpen U) + {F : ℂ × V → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × V ↦ (p.1^m,p.2)) ⁻¹' U)) + (hp : DiskPshOn ((fun p : ℂ × V ↦ (p.1^m,p.2)) ⁻¹' U) F) : + DiskPshOn (U ∩ {p | p.1 ≠ 0}) (rootTrace m F) := by + let π : ℂ × V → ℂ × V := fun p ↦ (p.1^m,p.2) + have hc := continuousOn_rootTrace m hU hF + apply DiskPshOn.of_locally (hc.mono inter_subset_left) + intro x hx + let W : Set (ℂ × V) := U ∩ {p | p.1/x.1 ∈ Complex.slitPlane} + have hW : IsOpen W := hU.inter (Complex.isOpen_slitPlane.preimage (by fun_prop)) + have hxW : x ∈ W := by + refine ⟨hx.1, ?_⟩ + change x.1 / x.1 ∈ Complex.slitPlane + simpa only [div_self hx.2] using Complex.one_mem_slitPlane + refine ⟨W, hW, hxW, ?_⟩ + let R : rootsOfUnity m ℂ → (ℂ × V) → (ℂ × V) := + fun ζ p ↦ ((ζ.val : ℂ) * centeredRoot m x.1 p.1,p.2) + have hRd (ζ : rootsOfUnity m ℂ) : DifferentiableOn ℂ (R ζ) W := by + apply DifferentiableOn.prodMk + · apply DifferentiableOn.const_mul + exact (centeredRoot_differentiableOn m).comp differentiableOn_fst (fun p hp ↦ hp.2) + · exact differentiableOn_snd + have hRm (ζ : rootsOfUnity m ℂ) : MapsTo (R ζ) W (π ⁻¹' U) := by + intro p hp + change (((ζ.val : ℂ) * centeredRoot m x.1 p.1)^m,p.2) ∈ U + rw [mul_pow, (mem_rootsOfUnity' m ζ.val).mp ζ.property, one_mul, + centeredRoot_pow m hx.2] + exact hp.1 + have hsum := DiskPshOn.sum (Finset.univ : Finset (rootsOfUnity m ℂ)) + (fun ζ p ↦ F (R ζ p)) (fun ζ _ ↦ hp.comp (hRd ζ) (hRm ζ)) + have hsumc : ContinuousOn (fun p ↦ ∑ ζ : rootsOfUnity m ℂ, F (R ζ p)) W := by + apply continuousOn_finsetSum + intro ζ _ + exact hF.comp (hRd ζ).continuousOn (hRm ζ) + have hs := hsum.const_mul_of_continuous hsumc (inv_nonneg.mpr (Nat.cast_nonneg m)) + apply hs.congr + intro p _ + exact (rootTrace_eq_of_pow m F (centeredRoot_pow m hx.2 p.1) p.2).symm + +theorem rootTrace_psh {U : Set (ℂ × V)} (hU : IsOpen U) + {F : ℂ × V → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × V ↦ (p.1^m,p.2)) ⁻¹' U)) + (hF0 : ∀ p, (p.1^m,p.2) ∈ U → 0 ≤ F p) + (hp : DiskPshOn ((fun p : ℂ × V ↦ (p.1^m,p.2)) ⁻¹' U) F) : + DiskPshOn U (rootTrace m F) := by + apply first_hyperplane_removable hU (continuousOn_rootTrace m hU hF) + · intro p hpU + apply mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg m)) + apply Finset.sum_nonneg + intro ζ _ + apply hF0 + rw [mul_pow, (mem_rootsOfUnity' m ζ.val).mp ζ.property, one_mul, chosenRoot_pow] + exact hpU + · exact rootTrace_psh_off_zero m hU hF hp + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Complex BigOperators +noncomputable section +variable {W : Type u14} [NormedAddCommGroup W] [NormedSpace ℂ W] + +def swapBase (p : ℂ × (ℂ × W)) : ℂ × (ℂ × W) := (p.2.1,(p.1,p.2.2)) + +omit [NormedAddCommGroup W] [NormedSpace ℂ W] in +@[simp] lemma swapBase_swapBase (p : ℂ × (ℂ × W)) : swapBase (swapBase p) = p := rfl + +lemma differentiable_swapBase : Differentiable ℂ (swapBase (W := W)) := by + exact (differentiable_snd.fst).prodMk + (differentiable_fst.prodMk (differentiable_snd.snd)) + +variable (m : ℕ) [NeZero m] +local instance : Fintype (rootsOfUnity m ℂ) := Fintype.ofFinite _ + +def secondRootTrace (F : ℂ × (ℂ × W) → ℝ) (p : ℂ × (ℂ × W)) : ℝ := + rootTrace m (F ∘ swapBase) (swapBase p) + +lemma continuousOn_secondRootTrace {U : Set (ℂ × (ℂ × W))} (hU : IsOpen U) + {F : ℂ × (ℂ × W) → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × (ℂ × W) ↦ (p.1,(p.2.1^m,p.2.2))) ⁻¹' U)) : + ContinuousOn (secondRootTrace m F) U := by + have hT := differentiable_swapBase (W := W) + have hc : ContinuousOn (F ∘ swapBase) + ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,p.2)) ⁻¹' (swapBase ⁻¹' U)) := + hF.comp hT.continuous.continuousOn (fun _ h ↦ h) + exact (continuousOn_rootTrace m (hU.preimage hT.continuous) hc).comp + hT.continuous.continuousOn (fun _ h ↦ h) + +variable [LocallyCompactSpace W] + +lemma secondRootTrace_psh {U : Set (ℂ × (ℂ × W))} (hU : IsOpen U) + {F : ℂ × (ℂ × W) → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × (ℂ × W) ↦ (p.1,(p.2.1^m,p.2.2))) ⁻¹' U)) + (hF0 : ∀ p, (p.1,(p.2.1^m,p.2.2)) ∈ U → 0 ≤ F p) + (hp : DiskPshOn ((fun p : ℂ × (ℂ × W) ↦ (p.1,(p.2.1^m,p.2.2))) ⁻¹' U) F) : + DiskPshOn U (secondRootTrace m F) := by + have hT := differentiable_swapBase (W := W) + have hc : ContinuousOn (F ∘ swapBase) + ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,p.2)) ⁻¹' (swapBase ⁻¹' U)) := + hF.comp hT.continuous.continuousOn (fun _ h ↦ h) + have hq : DiskPshOn + ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,p.2)) ⁻¹' (swapBase ⁻¹' U)) (F ∘ swapBase) := + hp.comp hT.differentiableOn (fun _ h ↦ h) + exact (rootTrace_psh m (hU.preimage hT.continuous) hc + (fun p h ↦ hF0 (swapBase p) h) hq).comp hT.differentiableOn (fun _ h ↦ h) + +def doubleRootTrace (F : ℂ × (ℂ × W) → ℝ) : ℂ × (ℂ × W) → ℝ := + rootTrace m (secondRootTrace m F) + +omit [LocallyCompactSpace W] [NormedAddCommGroup W] [NormedSpace ℂ W] in +lemma doubleRootTrace_formula (F : ℂ × (ℂ × W) → ℝ) (p : ℂ × (ℂ × W)) : + doubleRootTrace m F p = (m : ℝ)⁻¹ ^ 2 * + ∑ ζ : rootsOfUnity m ℂ, ∑ η : rootsOfUnity m ℂ, + F ((ζ.val : ℂ) * chosenRoot m p.1, + ((η.val : ℂ) * chosenRoot m p.2.1,p.2.2)) := by + simp only [doubleRootTrace, secondRootTrace, rootTrace, rootOrbitAverage, + Function.comp_apply, swapBase] + rw [← Finset.mul_sum, ← mul_assoc, pow_two] + +omit [LocallyCompactSpace W] in +lemma continuousOn_doubleRootTrace {U : Set (ℂ × (ℂ × W))} (hU : IsOpen U) + {F : ℂ × (ℂ × W) → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,(p.2.1^m,p.2.2))) ⁻¹' U)) : + ContinuousOn (doubleRootTrace m F) U := by + apply continuousOn_rootTrace m hU + apply continuousOn_secondRootTrace m (hU.preimage (by fun_prop)) + exact hF + +theorem doubleRootTrace_psh {U : Set (ℂ × (ℂ × W))} (hU : IsOpen U) + {F : ℂ × (ℂ × W) → ℝ} + (hF : ContinuousOn F ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,(p.2.1^m,p.2.2))) ⁻¹' U)) + (hF0 : ∀ p, (p.1^m,(p.2.1^m,p.2.2)) ∈ U → 0 ≤ F p) + (hp : DiskPshOn ((fun p : ℂ × (ℂ × W) ↦ (p.1^m,(p.2.1^m,p.2.2))) ⁻¹' U) F) : + DiskPshOn U (doubleRootTrace m F) := by + apply rootTrace_psh m hU + · exact continuousOn_secondRootTrace m (hU.preimage (by fun_prop)) hF + · intro p hpU + apply mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg m)) + apply Finset.sum_nonneg + intro η _ + apply hF0 + change (p.1 ^ m, (((η.val : ℂ) * chosenRoot m p.2.1)^m,p.2.2)) ∈ U + rw [mul_pow, (mem_rootsOfUnity' m η.val).mp η.property, one_mul, chosenRoot_pow] + exact hpU + · exact secondRootTrace_psh m (hU.preimage (by fun_prop)) hF hF0 hp + +end +end QuadricCounterexample + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/SymmetricFlags.lean b/lean/OAI/Geometry/QuadricBundles/SymmetricFlags.lean new file mode 100644 index 0000000000000000000000000000000000000000..90cdf39588dfc634b3cd86ddce8720078c44eaf4 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/SymmetricFlags.lean @@ -0,0 +1,192 @@ +import OAI.Geometry.QuadricBundles.RegularMatrices + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +open Set MvPolynomial Matrix BinaryForms LaurentCech +open scoped BigOperators +noncomputable section + +def powerCoordinates (m : ℕ) (z : BaseCoordinates) : BaseCoordinates := (z.1^m,z.2^m) +lemma powerCoordinates_change (m : ℕ) (i j : StandardChart) (z : BaseCoordinates) : + powerCoordinates m (coordinateChange i j z)=coordinateChange i j (powerCoordinates m z) := by + ext <;> simp only [powerCoordinates,coordinateChange,scalarCoordinateChange] <;> + split_ifs <;> simp [inv_pow] +lemma powerCoordinates_overlap (m : ℕ) {i j : StandardChart} {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : powerCoordinates m z∈coordinateOverlap i j := by + rw [coordinateOverlap_iff] at hz ⊢ + exact ⟨hz.1.imp_right (fun h ↦ pow_ne_zero _ h),hz.2.imp_right (fun h ↦ pow_ne_zero _ h)⟩ +lemma UniformlyRegularOn.comp_power {U V : Set BaseCoordinates} {f : BaseCoordinates → ℂ} + (hf : UniformlyRegularOn V f) (m : ℕ) (hm : ∀ z∈U,powerCoordinates m z∈V) : + UniformlyRegularOn U (fun z ↦ f (powerCoordinates m z)) := by + apply hf.comp _ _ hm + · simpa [powerCoordinates,baseEval] using (uniformlyRegular_polynomial U (X 0)).pow m + · simpa [powerCoordinates,baseEval] using (uniformlyRegular_polynomial U (X 1)).pow m +lemma firstFactor_power (m : ℕ) (i j : StandardChart) (z : BaseCoordinates) : + firstFactor i j (powerCoordinates m z)=firstFactor i j z^m := by + simp only [firstFactor,powerCoordinates,scalarFactor]; split_ifs <;> simp +lemma secondFactor_power (m : ℕ) (i j : StandardChart) (z : BaseCoordinates) : + secondFactor i j (powerCoordinates m z)=secondFactor i j z^m := by + simp only [secondFactor,powerCoordinates,scalarFactor]; split_ifs <;> simp + +namespace EqualizerData +variable (D : EqualizerData) +def flagFrame (m : ℕ) (i : StandardChart) (z : BaseCoordinates) : FlagFrame where + h := baseEval (D.lift i) (powerCoordinates m z) + d := baseEval (D.divisor i) (powerCoordinates m z) + u := baseEval (D.bezoutU i) (powerCoordinates m z) + v := baseEval (D.bezoutV i) (powerCoordinates m z) + bezout := D.bezout_eval i _ +def flagChange (m : ℕ) (i j : StandardChart) (z : BaseCoordinates) (hz : z∈coordinateOverlap i j) : + FlagChange (D.flagFrame m i z) (D.flagFrame m j (coordinateChange i j z)) where + T := D.coordinateTransition i j (powerCoordinates m z) + kernel := kernelFactor i j (powerCoordinates m z) + bottom := bottomFactor i j (powerCoordinates m z) + top := topFactor i j (powerCoordinates m z) + quotient := quotientFactor i j (powerCoordinates m z) + kernel_change := by simpa only [flagFrame,powerCoordinates_change] using D.substitute_kernel i j (powerCoordinates_overlap m hz) + bottom_change := D.substitute_f i j _ + top_projection := D.substitute_e_projection i j _ + lift_quotient := by simpa only [flagFrame,powerCoordinates_change] using D.substitute_lift_quotient i j (powerCoordinates_overlap m hz) + +def flagBasis (m t : ℕ) (i : StandardChart) (z : BaseCoordinates) : Matrix (Fin (2*t+1)) (Fin (2*t+1)) ℂ := + (D.flagFrame m i z).matrix t +lemma flagBasis_det_unit (m t : ℕ) (i : StandardChart) (z : BaseCoordinates) : + IsUnit (D.flagBasis m t i z).det := (D.flagFrame m i z).det_unit t +lemma flagBasis_regular (m t : ℕ) (i : StandardChart) (a b : Fin (2*t+1)) : + UniformlyRegularOn univ (fun z ↦ D.flagBasis m t i z a b) := by + apply adaptedMatrix_regular + all_goals exact (uniformlyRegular_polynomial univ _).comp_power m (fun _ _ ↦ mem_univ _) + +def flagMatrix (m e t : ℕ) (i j : StandardChart) (z : BaseCoordinates) : Matrix (Fin (2*t+1)) (Fin (2*t+1)) ℂ := + lineFactor (e,e) i j z • ((D.flagBasis m t i z)⁻¹* + symmetricMatrix (2*t) (D.coordinateTransition i j (powerCoordinates m z))* + D.flagBasis m t j (coordinateChange i j z)) +lemma flagMatrix_change (m e t : ℕ) (i j : StandardChart) {z : BaseCoordinates} (hz : z∈coordinateOverlap i j) : + D.flagMatrix m e t i j z=lineFactor (e,e) i j z • (D.flagChange m i j z hz).matrix t := rfl +lemma flagMatrix_regular (m e t : ℕ) (i j : StandardChart) (a b : Fin (2*t+1)) : + UniformlyRegularOn (coordinateOverlap i j) (fun z ↦ D.flagMatrix m e t i j z a b) := by + apply (lineFactor_regular (e,e) i j _).mul + apply UniformlyRegularOn.matrix_mul _ _ a b + · apply UniformlyRegularOn.matrix_mul + · exact UniformlyRegularOn.matrix_inv (fun a b ↦ (D.flagBasis_regular m t i a b).mono (subset_univ _)) + (fun z _ ↦ D.flagBasis_det_unit m t i z) + · exact symmetricMatrix_regular (fun a b ↦ (D.coordinateTransition_regular i j a b).comp_power m + (fun _ hz ↦ powerCoordinates_overlap m hz)) (2*t) + · intro a b + exact (D.flagBasis_regular m t j a b).comp (coordinateChange_fst_regular i j) + (coordinateChange_snd_regular i j) (fun _ _ ↦ mem_univ _) +lemma flagMatrix_self (m e t : ℕ) (i : StandardChart) (z : BaseCoordinates) : + D.flagMatrix m e t i i z=1 := by + simp only [flagMatrix,lineFactor_self,coordinateChange_self,D.coordinateTransition_self, + symmetricMatrix_one,Matrix.mul_one,one_smul] + exact Matrix.nonsing_inv_mul _ (D.flagBasis_det_unit m t i z) +lemma flagMatrix_cocycle (m e t : ℕ) (i j k : StandardChart) {z : BaseCoordinates} + (hj : z∈coordinateOverlap i j) (hk : z∈coordinateOverlap i k) : + D.flagMatrix m e t i j z*D.flagMatrix m e t j k (coordinateChange i j z)=D.flagMatrix m e t i k z := by + simp only [flagMatrix,smul_mul,Matrix.mul_smul,smul_smul, + coordinateChange_comp i j k hj] + rw [mul_comm (lineFactor (e,e) j k (coordinateChange i j z)),lineFactor_mul_one_overlap (e,e) i j k hj] + congr 1 + rw [Matrix.mul_assoc,Matrix.mul_assoc,← Matrix.mul_assoc (D.flagBasis m t j (coordinateChange i j z)), + ← Matrix.mul_assoc (D.flagBasis m t j (coordinateChange i j z)), + Matrix.mul_nonsing_inv _ (D.flagBasis_det_unit m t j _),Matrix.one_mul, + ← Matrix.mul_assoc (symmetricMatrix (2*t) (D.coordinateTransition i j (powerCoordinates m z))), + ← symmetricMatrix_mul,powerCoordinates_change, + D.coordinateTransition_mul i j k (powerCoordinates_overlap m hj) (powerCoordinates_overlap m hk), + ← Matrix.mul_assoc] +lemma flagMatrix_triangular (m e t : ℕ) (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) (a b : Fin (2*t+1)) (hab : b.1 a b hab,smul_zero] +end EqualizerData +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix BinaryForms LaurentCech EqualizerData +open scoped BigOperators +noncomputable section + +def flagDegree (m : ℕ) : (e t : ℕ) → Fin (2*t+1) → ℕ × ℕ + | e,0 => fun _ ↦ (e,e) + | e,t+1 => Fin.snoc (n:=2*t+2) (Fin.snoc (n:=2*t+1) + (flagDegree m (e+18*m) t) (e-3*m+24*m*(2*t+2),e-3*m)) (e,e+24*m*(2*t+2)) + +lemma power_mul_inv_power (x : ℂ) (hx : x≠0) (a b : ℕ) (hb : b≤a) : + x^a*(x⁻¹)^b=x^(a-b) := by + calc + _ = x^(a-b)*x^b*(x⁻¹)^b := by rw [← pow_add,Nat.sub_add_cancel hb] + _ = x^(a-b) := by rw [mul_assoc,← mul_pow,mul_inv_cancel₀ hx,one_pow,mul_one] +lemma flag_pen_scalar (m e t : ℕ) (he : 3*m≤e) (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + lineFactor (e,e) i j z*(EqualizerData.kernelFactor i j (powerCoordinates m z)* + topFactor i j (powerCoordinates m z)^(2*t+1))= + lineFactor (e-3*m+24*m*(2*t+2),e-3*m) i j z := by + simp only [lineFactor,EqualizerData.kernelFactor,topFactor,firstFactor_power,secondFactor_power, + ← inv_pow,← pow_mul] + have hexp : e+(m*21+(m*24)*(2*t+1))=e-3*m+24*m*(2*t+2) := by + have hh := Nat.sub_add_cancel he + nlinarith + have hs := power_mul_inv_power (secondFactor i j z) (secondFactor_ne_zero hz) e (m*3) (by omega) + calc + _ = firstFactor i j z^(e+(m*21+(m*24)*(2*t+1)))* + (secondFactor i j z^e*(secondFactor i j z)⁻¹^(m*3)) := by + simp only [pow_add]; ring + _ = _ := by rw [hexp,hs,show m*3=3*m by omega] +lemma flag_residual_scalar (m e : ℕ) (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + lineFactor (e,e) i j z*(EqualizerData.kernelFactor i j (powerCoordinates m z)* + bottomFactor i j (powerCoordinates m z))=lineFactor (e+18*m,e+18*m) i j z := by + rw [EqualizerData.kernelFactor_bottomFactor i j (powerCoordinates_overlap m hz)] + simp only [firstFactor_power,secondFactor_power,lineFactor,mul_pow,← pow_mul,pow_add] + rw [show m*18=18*m by omega] + ring +lemma flag_last_scalar (m e t : ℕ) (i j : StandardChart) (z : BaseCoordinates) : + lineFactor (e,e) i j z*quotientFactor i j (powerCoordinates m z)^(2*(t+1))= + lineFactor (e,e+24*m*(2*t+2)) i j z := by + simp only [lineFactor,quotientFactor,secondFactor_power,← pow_mul,pow_add] + rw [show m*24*(2*(t+1))=24*m*(2*t+2) by ring] + ring +namespace EqualizerData +variable (D : EqualizerData) +lemma flagChange_graded (m e t : ℕ) (he : 3*m≤e) (i j : StandardChart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) (a : Fin (2*t+1)) : + lineFactor (e,e) i j z*(D.flagChange m i j z hz).graded t a= + lineFactor (flagDegree m e t a) i j z := by + induction t generalizing e with + | zero => simp only [FlagChange.graded,flagDegree,mul_one] + | succ t ih => + refine Fin.lastCases (n:=2*t+2) ?_ (fun a ↦ ?_) a + · simpa only [FlagChange.graded,flagDegree,Fin.snoc_last,flagChange] using flag_last_scalar m e t i j z + · refine Fin.lastCases (n:=2*t+1) ?_ (fun a ↦ ?_) a + · simpa only [FlagChange.graded,flagDegree,Fin.snoc_castSucc,Fin.snoc_last,flagChange] using + flag_pen_scalar m e t he i j hz + · simp only [FlagChange.graded,flagDegree,Fin.snoc_castSucc] + rw [← mul_assoc (lineFactor (e,e) i j z)] + rw [show (D.flagChange m i j z hz).kernel*(D.flagChange m i j z hz).bottom= + kernelFactor i j (powerCoordinates m z)*bottomFactor i j (powerCoordinates m z) from rfl, + flag_residual_scalar m e i j hz,ih (e+18*m) (by omega)] + +def symmetricFlag (m e t : ℕ) (he : 3*m≤e) : TriangularCechBundle (2*t+1) where + degree := flagDegree m e t + matrix := D.flagMatrix m e t + regular := D.flagMatrix_regular m e t + self := D.flagMatrix_self m e t + cocycle := fun i j k z hj hk ↦ D.flagMatrix_cocycle m e t i j k hj hk + triangular := fun i j z hz a b hab ↦ D.flagMatrix_triangular m e t i j hz a b hab + diagonal := by + intro i j z hz a + rw [D.flagMatrix_change m e t i j hz,Matrix.smul_apply,smul_eq_mul, + (D.flagChange m i j z hz).triangular_diagonal t |>.2 a] + exact D.flagChange_graded m e t he i j hz a +end EqualizerData +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/TraceExtraction.lean b/lean/OAI/Geometry/QuadricBundles/TraceExtraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e936197756e0e23585f808dc3138287fd84dcaee --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/TraceExtraction.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.QuadricBundles.TraceMetrics + +namespace OAI + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section +local instance : TopologicalSpace.PseudoMetrizableSpace TwoMatrix := + inferInstanceAs (TopologicalSpace.PseudoMetrizableSpace (Fin 2 → Fin 2 → ℂ)) + +abbrev TraceIndex := StandardChart × ℕ +abbrev CoefficientSpace := EuclideanSpace ℂ (Fin 2 × Fin 2) +abbrev CoefficientL2 := Lp CoefficientSpace 2 (volume : Measure BaseCoordinates) +def traceInterior (a : TraceIndex) : Set BaseCoordinates := ball 0 ((a.2:ℝ)+2) +def traceDomain (a : TraceIndex) : Set BaseCoordinates := ball 0 ((a.2:ℝ)+3) +def traceSupport (a : TraceIndex) : Set BaseCoordinates := closedBall 0 ((a.2:ℝ)+4) +def traceBound (D : EqualizerData) (a : TraceIndex) : ℝ := + (TwistedPshForm.local_bound D a.1 ((a.2:ℝ)+4)).choose +lemma traceBound_nonneg (D : EqualizerData) (a : TraceIndex) : 0≤traceBound D a := + (TwistedPshForm.local_bound D a.1 ((a.2:ℝ)+4)).choose_spec.1 +lemma traceBound_spec (D : EqualizerData) (a : TraceIndex) (m : ℕ) (hm : 0 < m) + (P : TwistedPshForm D m) (hP : ∀ i z, ‖z‖≤1 → ∀ v, P.value i (z,v)≤‖v‖^2) + (z : BaseCoordinates) (hz : z∈traceSupport a) (v : FiberCoordinates) : + P.value a.1 (z,v)≤traceBound D a*‖v‖^2 := + (TwistedPshForm.local_bound D a.1 ((a.2:ℝ)+4)).choose_spec.2 m hm P hP z + (by simpa only [traceSupport,mem_closedBall,dist_zero_right] using hz) v + +def cutoffTrace {D : EqualizerData} {m : ℕ} (P : TwistedPshForm D m) (a : TraceIndex) : + BaseCoordinates → TwoMatrix := (traceSupport a).indicator (P.matrix a.1) + +lemma cutoffTrace_eq {D : EqualizerData} {m : ℕ} (P : TwistedPshForm D m) (a : TraceIndex) + {z : BaseCoordinates} (hz : z∈traceSupport a) : cutoffTrace P a z=P.matrix a.1 z := + indicator_of_mem hz _ +lemma traceDomain_subset_support (a : TraceIndex) : traceDomain a ⊆ traceSupport a := + ball_subset_closedBall.trans (closedBall_subset_closedBall (by linarith)) +lemma traceInterior_subset_domain (a : TraceIndex) : traceInterior a ⊆ traceDomain a := + ball_subset_ball (by linarith) + +structure ExtractedTrace {D : EqualizerData} (ex : ℕ → ℕ) (P : ∀ k, TwistedPshForm D (ex k)) where + matrix : TraceIndex → BaseCoordinates → TwoMatrix + f : ℕ → TraceIndex → CoefficientL2 + w : TraceIndex → CoefficientL2 + subsequence : ℕ → ℕ + strictMono : StrictMono subsequence + coefficients : ∀ k a, (fun x ↦ coefficientsToMatrix (f k a x)) =ᵐ[volume] cutoffTrace (P k) a + bound : ∀ k a, ∀ᵐ x ∂volume, ‖f k a x‖≤8*traceBound D a ∧ + (x∉traceSupport a → f k a x=0) + representative : ∀ a, matrix a =ᵐ[volume.restrict (traceInterior a)] + fun x ↦ coefficientsToMatrix (w a x) + weak : ∀ a v, Tendsto (fun k ↦ inner ℂ (f (subsequence k) a) v) atTop (𝓝 (inner ℂ (w a) v)) + positive : ∀ a x, x∈traceInterior a → (matrix a x).PosSemidef + psh : ∀ a, DiskPshOn (traceInterior a ×ˢ univ) + (fun p : BaseCoordinates × FiberCoordinates ↦ quadraticValue (matrix a p.1) p.2) + averages : ∀ a x r v, ball x r ⊆ traceInterior a → + Tendsto (fun k ↦ ⨍ y in ball x r, quadraticValue (cutoffTrace (P (subsequence k)) a y) v) + atTop (𝓝 (⨍ y in ball x r, quadraticValue (matrix a y) v)) + +lemma exists_extractedTrace {D : EqualizerData} {ex : ℕ → ℕ} (hex : ∀ k, 0 < ex k) + (P : ∀ k, TwistedPshForm D (ex k)) + (hP : ∀ k i z, ‖z‖≤1 → ∀ v, (P k).value i (z,v)≤‖v‖^2) : + Nonempty (ExtractedTrace ex P) := by + let H (k : ℕ) (a : TraceIndex) := cutoffTrace (P k) a + have heq (k : ℕ) (a : TraceIndex) : EqOn + (fun p : BaseCoordinates × FiberCoordinates ↦ quadraticValue (H k a p.1) p.2) + ((P k).value a.1) (traceDomain a ×ˢ univ) := by + intro p hp + change quadraticValue (H k a p.1) p.2 = quadraticValue ((P k).matrix a.1 p.1) p.2 + rw [show H k a p.1=(P k).matrix a.1 p.1 from cutoffTrace_eq _ _ (traceDomain_subset_support a hp.1)] + have hmeas (k : ℕ) (a : TraceIndex) : AEStronglyMeasurable (H k a) := + ((P k).continuous a.1).aestronglyMeasurable.indicator measurableSet_closedBall + have hpos (k : ℕ) (a : TraceIndex) : ∀ᵐ x ∂volume, (H k a x).PosSemidef := by + apply Eventually.of_forall; intro x + by_cases hx : x∈traceSupport a + · rw [show H k a x=(P k).matrix a.1 x from cutoffTrace_eq _ _ hx] + exact ((P k).positive a.1 x).posSemidef + · simp only [H,cutoffTrace,indicator_of_notMem hx] + exact Matrix.PosSemidef.zero + have hcont (k : ℕ) (a : TraceIndex) : ContinuousOn + (fun p : BaseCoordinates × FiberCoordinates ↦ quadraticValue (H k a p.1) p.2) + (traceDomain a ×ˢ univ) := ((P k).value_continuous a.1).continuousOn.congr (heq k a) + have hpsh (k : ℕ) (a : TraceIndex) : DiskPshOn (traceDomain a ×ˢ univ) + (fun p : BaseCoordinates × FiberCoordinates ↦ quadraticValue (H k a p.1) p.2) := + (((P k).psh a.1).mono (subset_univ _)).congr (heq k a).symm + have hb (k : ℕ) (a : TraceIndex) : ∀ᵐ x ∂volume, + ‖matrixToCoefficients (H k a x)‖≤8*traceBound D a ∧ (x∉traceSupport a → H k a x=0) := by + apply Eventually.of_forall; intro x + by_cases hx : x∈traceSupport a + · rw [show H k a x=(P k).matrix a.1 x from cutoffTrace_eq _ _ hx] + exact ⟨norm_coefficients_of_quadratic_bound ((P k).positive a.1 x).posSemidef + (traceBound_nonneg D a) (traceBound_spec D a (ex k) (hex k) (P k) (hP k) x hx), + fun hn ↦ (hn hx).elim⟩ + · simp only [H,cutoffTrace,indicator_of_notMem hx,map_zero,norm_zero] + exact ⟨mul_nonneg (by norm_num) (traceBound_nonneg D a),fun _ ↦ trivial⟩ + let r (_ : TraceIndex) (k : ℕ) : ℝ := 1/(k+1) + have hr (a : TraceIndex) (k : ℕ) : 0 < r a k := by dsimp [r]; positivity + have hr0 (a : TraceIndex) : Tendsto (r a) atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + have hballs (a : TraceIndex) (k : ℕ) : ∀ x∈traceInterior a, closedBall x (r a k) ⊆ traceDomain a := by + intro x hx + apply closedBall_subset_ball' + have hxr : dist x 0 < (a.2:ℝ)+2 := hx + have hrle : r a k≤1 := by + dsimp [r] + rw [div_le_one (by positivity)] + exact le_add_of_nonneg_left (Nat.cast_nonneg k) + linarith + have hbound (k : ℕ) (a : TraceIndex) : ∀ x∈traceDomain a, ∀ v, + quadraticValue (H k a x) v≤traceBound D a*‖v‖^2 := by + intro x hx v + rw [show H k a x=(P k).matrix a.1 x from cutoffTrace_eq _ _ (traceDomain_subset_support a hx)] + exact traceBound_spec D a (ex k) (hex k) (P k) (hP k) x (traceDomain_subset_support a hx) v + obtain ⟨M,f,w,φ,hφ,hf,hfb,hlim⟩ := countable_local_quadratic_compactness_with_weak + (fun _ ↦ isOpen_ball) (fun _ ↦ isOpen_ball) (fun _ ↦ measurableSet_closedBall) + (fun _ ↦ measure_closedBall_lt_top.ne) hmeas hpos hcont hpsh + (fun a ↦ mul_nonneg (by norm_num) (traceBound_nonneg D a)) hb hr hr0 hballs hbound + exact ⟨{ + matrix := M, f := f, w := w, subsequence := φ, strictMono := hφ + coefficients := hf, bound := hfb, representative := fun a ↦ (hlim a).1 + weak := fun a ↦ (hlim a).2.1, positive := fun a ↦ (hlim a).2.2.1 + psh := fun a ↦ (hlim a).2.2.2.1, averages := fun a ↦ (hlim a).2.2.2.2 }⟩ +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/TraceMetrics.lean b/lean/OAI/Geometry/QuadricBundles/TraceMetrics.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b6ba5043b5cc30150a832877f8285fe481a88a9 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/TraceMetrics.lean @@ -0,0 +1,638 @@ +import OAI.Geometry.QuadricBundles.Compactness + +namespace OAI + +universe u1 u2 + +noncomputable section + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory Matrix +open scoped ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +def standardChartIndex (i : StandardChart) : ℕ := (standardChartNat_surj i).choose +lemma standardChartIndex_lt (i : StandardChart) : standardChartIndex i<4 := + (standardChartNat_surj i).choose_spec.1 +@[simp] lemma standardChartNat_index (i : StandardChart) : + standardChartNat (standardChartIndex i)=i := (standardChartNat_surj i).choose_spec.2 + +lemma EqualizerData.twist_coordinateDomain (D : EqualizerData) (m : ℕ) (hm : 0 < m) + (i : StandardChart) : + (powerPullbackTwist D.bundle m hm).coordinateDomain (standardChartIndex i)=univ := by + ext z + simp [AlgebraicRankTwoBundle.coordinateDomain,powerPullbackTwist,EqualizerData.bundle, + standardEquationNat,standardChartIndex_lt,baseEval_pullback] + +lemma EqualizerData.twist_chart (D : EqualizerData) (m : ℕ) (hm : 0 < m) + (i : StandardChart) : + (powerPullbackTwist D.bundle m hm).chart (standardChartIndex i)=i := + standardChartNat_index i + +lemma EqualizerData.twist_domain (D : EqualizerData) (m : ℕ) (hm : 0 < m) + (i : StandardChart) : + (powerPullbackTwist D.bundle m hm).domain (standardChartIndex i)=range (affineQuadric i) := by + ext x + simp [AlgebraicRankTwoBundle.domain,powerPullbackTwist,EqualizerData.bundle, + standardEquationNat,standardChartIndex_lt,principalChart,baseEval_pullback] + +lemma SmoothHermitianMetric.chart_psh {V : AlgebraicRankTwoBundle} + (h : SmoothHermitianMetric V) (hp : h.StrictlyGriffithsPositive) (i : ℕ) + (hi : V.coordinateDomain i=univ) : + DiskPshOn univ (fun p : BaseCoordinates × FiberCoordinates ↦ + quadraticValue (h.dualMatrix i p.1) p.2) := by + have hh := chern_positive_dual_norm_psh isOpen_univ + (H := h.dualMatrix i) (by simpa only [hi] using (h.smooth i).of_le (by exact WithTop.coe_le_coe.mpr le_top)) + (by simpa only [hi] using h.positive i) + (by simpa only [hi,mixedHessian,wirtingerDerivative,metricMixedHessian, + holomorphicMetricDerivative] using hp i) + rw [univ_prod_univ] at hh + convert hh using 1 + rfl + +lemma continuous_matrix_of_quadratic {X : Type u1} [TopologicalSpace X] + {n : Type u2} [Fintype n] [DecidableEq n] {H : X → Matrix n n ℂ} + (hh : ∀ x, (H x).IsHermitian) + (hc : ∀ v, Continuous (fun x ↦ quadraticValue (H x) v)) : Continuous H := by + have he : H=fun x ↦ matrixFromQuadratic (quadraticValue (H x)) := by + funext x; exact (matrixFromQuadratic_value (hh x)).symm + rw [he] + apply continuous_pi; intro i + apply continuous_pi; intro j + change Continuous (fun x ↦ Complex.equivRealProdCLM.symm + ((quadraticValue (H x) (Pi.single i 1+Pi.single j 1)-quadraticValue (H x) (Pi.single i 1)- + quadraticValue (H x) (Pi.single j 1))/2, + (quadraticValue (H x) (Pi.single i 1)+quadraticValue (H x) (Pi.single j 1)- + quadraticValue (H x) (Pi.single i 1+Complex.I • Pi.single j 1))/2)) + exact Complex.equivRealProdCLM.symm.continuous.comp + ((((hc _).sub (hc _) |>.sub (hc _)).div_const 2).prodMk + (((hc _).add (hc _) |>.sub (hc _)).div_const 2)) + +section Trace +variable (m : ℕ) [NeZero m] +local instance : Fintype (rootsOfUnity m ℂ) := Fintype.ofFinite _ + +def matrixRootTrace (H : BaseCoordinates → TwoMatrix) (z : BaseCoordinates) : TwoMatrix := + ((m : ℝ)⁻¹ ^ 2) • ∑ ζ : rootsOfUnity m ℂ, ∑ η : rootsOfUnity m ℂ, + H ((ζ.val : ℂ)*chosenRoot m z.1,(η.val : ℂ)*chosenRoot m z.2) + +lemma matrixRootTrace_quadratic (H : BaseCoordinates → TwoMatrix) (z : BaseCoordinates) + (v : FiberCoordinates) : + quadraticValue (matrixRootTrace m H z) v = + doubleRootTrace m (fun p : ℂ × (ℂ × FiberCoordinates) ↦ + quadraticValue (H (p.1,p.2.1)) p.2.2) (z.1,(z.2,v)) := by + rw [doubleRootTrace_formula] + change (quadraticValueCLM v) (((m : ℝ)⁻¹ ^ 2) • ∑ ζ : rootsOfUnity m ℂ, + ∑ η : rootsOfUnity m ℂ, H ((ζ.val : ℂ)*chosenRoot m z.1,(η.val : ℂ)*chosenRoot m z.2)) = _ + simp only [map_smul,map_sum,smul_eq_mul] + rfl + +lemma matrixRootTrace_posDef {H : BaseCoordinates → TwoMatrix} + (hH : ∀ z, (H z).PosDef) (z : BaseCoordinates) : (matrixRootTrace m H z).PosDef := by + unfold matrixRootTrace + apply Matrix.PosDef.smul + · apply Matrix.posDef_sum (Finset.univ_nonempty) + intro ζ _ + exact Matrix.posDef_sum (Finset.univ_nonempty) (fun η _ ↦ hH _) + · exact pow_pos (inv_pos.mpr (Nat.cast_pos.mpr (Nat.pos_of_ne_zero (NeZero.ne m)))) _ + +lemma continuous_matrixRootTrace {H : BaseCoordinates → TwoMatrix} + (hc : Continuous H) (hh : ∀ z, (H z).IsHermitian) : + Continuous (matrixRootTrace m H) := by + apply continuous_matrix_of_quadratic + · intro z + unfold matrixRootTrace + exact (IsSelfAdjoint.all ((m : ℝ)⁻¹ ^ 2)).smul + (isSelfAdjoint_sum _ fun _ _ ↦ isSelfAdjoint_sum _ fun _ _ ↦ hh _) + · intro v + have hq : Continuous (fun p : ℂ × (ℂ × FiberCoordinates) ↦ + quadraticValue (H (p.1,p.2.1)) p.2.2) := by + unfold quadraticValue + fun_prop + have htrace := continuousOn_doubleRootTrace m isOpen_univ + (U := univ) (by simpa only [preimage_univ] using hq.continuousOn) + have ht : Continuous (fun z : BaseCoordinates ↦ + doubleRootTrace m (fun p : ℂ × (ℂ × FiberCoordinates) ↦ + quadraticValue (H (p.1,p.2.1)) p.2.2) (z.1,(z.2,v))) := + continuousOn_univ.mp htrace |>.comp (by fun_prop) + exact ht.congr (fun z ↦ (matrixRootTrace_quadratic m H z v).symm) + +lemma matrixRootTrace_psh {H : BaseCoordinates → TwoMatrix} + (hc : Continuous H) (hpos : ∀ z, (H z).PosDef) + (hp : DiskPshOn univ (fun p : BaseCoordinates × FiberCoordinates ↦ + quadraticValue (H p.1) p.2)) : + DiskPshOn univ (fun p : BaseCoordinates × FiberCoordinates ↦ + quadraticValue (matrixRootTrace m H p.1) p.2) := by + let F := fun p : ℂ × (ℂ × FiberCoordinates) ↦ quadraticValue (H (p.1,p.2.1)) p.2.2 + have hF : Continuous F := by unfold F quadraticValue; fun_prop + have hFp : DiskPshOn univ F := hp.comp + (by fun_prop : DifferentiableOn ℂ (fun p : ℂ × (ℂ × FiberCoordinates) ↦ ((p.1,p.2.1),p.2.2)) univ) + (fun _ _ ↦ mem_univ _) + have ht := doubleRootTrace_psh m isOpen_univ (U := univ) + (by simpa only [preimage_univ] using hF.continuousOn) + (fun p _ ↦ quadraticValue_nonneg (hpos _).posSemidef _) + (by simpa only [preimage_univ] using hFp) + have ha := ht.comp + (by fun_prop : DifferentiableOn ℂ (fun p : BaseCoordinates × FiberCoordinates ↦ (p.1.1,(p.1.2,p.2))) univ) + (fun _ _ ↦ mem_univ _) + convert ha using 1 + funext p + exact matrixRootTrace_quadratic m H p.1 p.2 + +lemma matrixRootTrace_anyRoot (H : BaseCoordinates → TwoMatrix) + (x : BaseCoordinates) : + matrixRootTrace m H (x.1^m,x.2^m) = + ((m : ℝ)⁻¹ ^ 2) • ∑ ζ : rootsOfUnity m ℂ, ∑ η : rootsOfUnity m ℂ, + H ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2) := by + obtain ⟨a,ha⟩ := same_power_orbit m (chosenRoot_pow m (x.1^m)) + obtain ⟨b,hb⟩ := same_power_orbit m (chosenRoot_pow m (x.2^m)) + unfold matrixRootTrace + rw [ha,hb] + congr 1 + have he := Equiv.sum_comp ((Equiv.mulRight a).prodCongr (Equiv.mulRight b)) + (fun p : rootsOfUnity m ℂ × rootsOfUnity m ℂ ↦ + H ((p.1.val : ℂ)*x.1,(p.2.val : ℂ)*x.2)) + simp only [Fintype.sum_prod_type] at he + change (∑ ζ : rootsOfUnity m ℂ, ∑ η : rootsOfUnity m ℂ, + H ((((ζ*a).val : ℂ))*x.1,(((η*b).val : ℂ))*x.2)) = _ at he + simpa only [Subgroup.coe_mul,Units.val_mul,mul_assoc] using he + +omit [NeZero m] in +lemma root_pow (ζ : rootsOfUnity m ℂ) (x : ℂ) : ((ζ.val : ℂ)*x)^m=x^m := by + rw [mul_pow,(mem_rootsOfUnity' m ζ.val).mp ζ.property,one_mul] + +lemma root_norm (ζ : rootsOfUnity m ℂ) (x : ℂ) : ‖(ζ.val : ℂ)*x‖=‖x‖ := by + rw [norm_mul,Complex.norm_eq_one_of_mem_rootsOfUnity ζ.property,one_mul] + +def rootSwitchEquiv (i j : Fin 2) : Equiv.Perm (rootsOfUnity m ℂ) := + if i=j then Equiv.refl _ else Equiv.inv _ + +omit [NeZero m] in +lemma scalarCoordinateChange_root (i j : Fin 2) (ζ : rootsOfUnity m ℂ) (x : ℂ) : + scalarCoordinateChange i j ((ζ.val : ℂ)*x) = + ((rootSwitchEquiv m i j ζ).val : ℂ)*scalarCoordinateChange i j x := by + by_cases hij : i=j <;> + simp [scalarCoordinateChange,rootSwitchEquiv,hij,_root_.mul_inv_rev,mul_comm] + +omit [NeZero m] in +lemma coordinateChange_pow (i j : StandardChart) (x : BaseCoordinates) : + coordinateChange i j (x.1^m,x.2^m) = + ((coordinateChange i j x).1^m,(coordinateChange i j x).2^m) := by + ext <;> simp only [coordinateChange,scalarCoordinateChange] <;> split_ifs <;> simp + +lemma coordinateOverlap_pow (i j : StandardChart) (x : BaseCoordinates) : + (x.1^m,x.2^m) ∈ coordinateOverlap i j ↔ x ∈ coordinateOverlap i j := by + simp only [coordinateOverlap_iff,ne_eq,pow_eq_zero_iff (NeZero.ne m)] + +lemma polarizationTransition_affine (i j : StandardChart) (x : BaseCoordinates) : + polarizationTransition i j (affineQuadric i x)=firstFactor i j x*secondFactor i j x := by + simp only [polarizationTransition,hyperplaneTransition,affineQuadric,coordP1_affine, + firstFactor,secondFactor,scalarFactor] + +lemma polarizationTransition_root_norm (i j : StandardChart) (x : BaseCoordinates) + (ζ η : rootsOfUnity m ℂ) : + ‖polarizationTransition i j (affineQuadric i ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2))‖ = + ‖polarizationTransition i j (affineQuadric i x)‖ := by + simp only [polarizationTransition_affine,norm_mul,firstFactor,secondFactor,scalarFactor] + split_ifs <;> simp only [root_norm] + +lemma matrixRootTrace_change (H : BaseCoordinates → TwoMatrix) (i j : StandardChart) + (x : BaseCoordinates) : + matrixRootTrace m H (coordinateChange i j (x.1^m,x.2^m)) = + ((m : ℝ)⁻¹ ^ 2) • ∑ ζ : rootsOfUnity m ℂ, ∑ η : rootsOfUnity m ℂ, + H (coordinateChange i j ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2)) := by + rw [coordinateChange_pow,matrixRootTrace_anyRoot] + congr 1 + have he := Equiv.sum_comp ((rootSwitchEquiv m i.1 j.1).prodCongr + (rootSwitchEquiv m i.2 j.2)) + (fun p : rootsOfUnity m ℂ × rootsOfUnity m ℂ ↦ + H ((p.1.val : ℂ)*(coordinateChange i j x).1, + (p.2.val : ℂ)*(coordinateChange i j x).2)) + simpa only [Fintype.sum_prod_type,Equiv.prodCongr_apply,Prod.map,coordinateChange, + scalarCoordinateChange_root] using he.symm + +lemma quadraticValue_congruence (A H : TwoMatrix) (v : FiberCoordinates) : + quadraticValue (A.conjTranspose*H*A) v=quadraticValue H (A.mulVec v) := by + simp only [quadraticValue,star_mulVec,dotProduct_mulVec,vecMul_vecMul] + +lemma quadraticValue_scalar (H : TwoMatrix) (c : ℂ) (v : FiberCoordinates) : + quadraticValue H (c • v)=‖c‖^2*quadraticValue H v := by + simp only [quadraticValue,star_smul,mulVec_smul,smul_dotProduct,dotProduct_smul,smul_eq_mul, + ← mul_assoc,Complex.star_def] + rw [Complex.mul_conj,Complex.normSq_eq_norm_sq] + simp only [Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,zero_mul,sub_zero] + +lemma quadraticValue_sum_smul (H : rootsOfUnity m ℂ → rootsOfUnity m ℂ → TwoMatrix) + (v : FiberCoordinates) : + quadraticValue (((m : ℝ)⁻¹^2) • ∑ ζ, ∑ η, H ζ η) v = + ((m : ℝ)⁻¹^2)*∑ ζ, ∑ η, quadraticValue (H ζ η) v := by + change (quadraticValueCLM v) _ = _ + simp only [map_smul,map_sum,smul_eq_mul] + rfl + +omit [NeZero m] in +lemma SmoothHermitianMetric.twist_quadratic_change {D : EqualizerData} {hm : 0 < m} + (h : SmoothHermitianMetric (powerPullbackTwist D.bundle m hm)) + (i j : StandardChart) {x : BaseCoordinates} (hx : x ∈ coordinateOverlap i j) + (v : FiberCoordinates) : + quadraticValue (h.dualMatrix (standardChartIndex i) x) v = + ‖polarizationTransition i j (affineQuadric i x)‖^2* + quadraticValue (h.dualMatrix (standardChartIndex j) (coordinateChange i j x)) + ((D.coordinateTransition i j (x.1^m,x.2^m)).transpose.mulVec v) := by + have hi : affineQuadric i x ∈ (powerPullbackTwist D.bundle m hm).domain (standardChartIndex i) := by + rw [D.twist_domain]; exact ⟨x,rfl⟩ + have hj : affineQuadric i x ∈ (powerPullbackTwist D.bundle m hm).domain (standardChartIndex j) := by + rw [D.twist_domain]; exact (affineQuadric_mem_range _ _ _).mpr hx + have he := h.compatible (standardChartIndex j) (standardChartIndex i) (affineQuadric i x) hj hi + simp only [D.twist_chart,coordQuadric_affine,coordinateChange_coord] at he + rw [he,quadraticValue_congruence] + change quadraticValue (h.dualMatrix (standardChartIndex j) (coordinateChange i j x)) + (((polarizationTransition _ _ _ • D.globalTransition _ _ (powerQuadric m (affineQuadric i x))).transpose).mulVec v)=_ + simp only [EqualizerData.bundle,standardChartNat_index,powerQuadric_affine hm, + EqualizerData.globalTransition,coordQuadric_affine,Matrix.transpose_smul,smul_mulVec] + exact quadraticValue_scalar _ _ _ + +lemma SmoothHermitianMetric.trace_quadratic_change {D : EqualizerData} {hm : 0 < m} + (h : SmoothHermitianMetric (powerPullbackTwist D.bundle m hm)) + (i j : StandardChart) {x : BaseCoordinates} (hx : x ∈ coordinateOverlap i j) + (v : FiberCoordinates) : + quadraticValue (matrixRootTrace m (h.dualMatrix (standardChartIndex i)) (x.1^m,x.2^m)) v = + ‖polarizationTransition i j (affineQuadric i x)‖^2* + quadraticValue (matrixRootTrace m (h.dualMatrix (standardChartIndex j)) + (coordinateChange i j (x.1^m,x.2^m))) + ((D.coordinateTransition i j (x.1^m,x.2^m)).transpose.mulVec v) := by + rw [matrixRootTrace_anyRoot,matrixRootTrace_change,quadraticValue_sum_smul, + quadraticValue_sum_smul] + have hs : ∀ ζ η : rootsOfUnity m ℂ, + quadraticValue (h.dualMatrix (standardChartIndex i) ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2)) v = + ‖polarizationTransition i j (affineQuadric i x)‖^2* + quadraticValue (h.dualMatrix (standardChartIndex j) + (coordinateChange i j ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2))) + ((D.coordinateTransition i j (x.1^m,x.2^m)).transpose.mulVec v) := by + intro ζ η + have hr : ((ζ.val : ℂ)*x.1,(η.val : ℂ)*x.2) ∈ coordinateOverlap i j := by + rw [← coordinateOverlap_pow m] + simpa only [root_pow] using (coordinateOverlap_pow m i j x).mpr hx + simpa only [root_pow,polarizationTransition_root_norm] using h.twist_quadratic_change m i j hr v + simp_rw [hs,← Finset.mul_sum] + ring + +omit [NeZero m] in +lemma polarizationTransition_power (i j : StandardChart) (x : BaseCoordinates) : + polarizationTransition i j (affineQuadric i (x.1^m,x.2^m)) = + polarizationTransition i j (affineQuadric i x)^m := by + simp only [polarizationTransition_affine,firstFactor,secondFactor,scalarFactor] + split_ifs <;> simp [mul_pow] + +def traceScalar (i j : StandardChart) (z : BaseCoordinates) : ℝ := + ‖polarizationTransition i j (affineQuadric i z)‖ ^ (2/(m : ℝ)) + +lemma traceScalar_power (i j : StandardChart) (x : BaseCoordinates) : + traceScalar m i j (x.1^m,x.2^m) = + ‖polarizationTransition i j (affineQuadric i x)‖^2 := by + unfold traceScalar + rw [polarizationTransition_power,norm_pow] + have he : (2/(m : ℝ))=(m : ℝ)⁻¹*(2 : ℕ) := by simp only [Nat.cast_ofNat]; ring + rw [he,Real.rpow_mul_natCast (by positivity),Real.pow_rpow_inv_natCast (norm_nonneg _) (NeZero.ne m)] + +lemma SmoothHermitianMetric.trace_change {D : EqualizerData} {hm : 0 < m} + (h : SmoothHermitianMetric (powerPullbackTwist D.bundle m hm)) + (i j : StandardChart) {z : BaseCoordinates} (hz : z ∈ coordinateOverlap i j) + (v : FiberCoordinates) : + quadraticValue (matrixRootTrace m (h.dualMatrix (standardChartIndex i)) z) v = + traceScalar m i j z * + quadraticValue (matrixRootTrace m (h.dualMatrix (standardChartIndex j)) + (coordinateChange i j z)) + ((D.coordinateTransition i j z).transpose.mulVec v) := by + let x : BaseCoordinates := (chosenRoot m z.1,chosenRoot m z.2) + have hx : (x.1^m,x.2^m)=z := Prod.ext (chosenRoot_pow m _) (chosenRoot_pow m _) + have hr : x ∈ coordinateOverlap i j := (coordinateOverlap_pow m i j x).mp (hx ▸ hz) + have he := h.trace_quadratic_change m i j hr v + rw [← traceScalar_power m i j x,hx] at he + exact he +end Trace +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric MeasureTheory Matrix +open scoped ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +structure TwistedPshForm (D : EqualizerData) (m : ℕ) where + matrix : StandardChart → BaseCoordinates → TwoMatrix + continuous : ∀ i, Continuous (matrix i) + positive : ∀ i z, (matrix i z).PosDef + psh : ∀ i, DiskPshOn univ (fun p : BaseCoordinates × FiberCoordinates ↦ + quadraticValue (matrix i p.1) p.2) + compatible : ∀ i j z, z ∈ coordinateOverlap i j → ∀ v, + quadraticValue (matrix i z) v = traceScalar m i j z * + quadraticValue (matrix j (coordinateChange i j z)) + ((D.coordinateTransition i j z).transpose.mulVec v) + +namespace TwistedPshForm +variable {D : EqualizerData} {m : ℕ} +def value (P : TwistedPshForm D m) (i : StandardChart) + (p : BaseCoordinates × FiberCoordinates) : ℝ := quadraticValue (P.matrix i p.1) p.2 + +lemma value_continuous (P : TwistedPshForm D m) (i : StandardChart) : Continuous (P.value i) := by + unfold value quadraticValue + have hc := P.continuous i + fun_prop + +lemma value_nonneg (P : TwistedPshForm D m) (i : StandardChart) + (z : BaseCoordinates) (v : FiberCoordinates) : 0 ≤ P.value i (z,v) := + quadraticValue_nonneg (P.positive i z).posSemidef v + +lemma value_scalar (P : TwistedPshForm D m) (i : StandardChart) + (z : BaseCoordinates) (c : ℂ) (v : FiberCoordinates) : + P.value i (z,c • v)=‖c‖^2*P.value i (z,v) := quadraticValue_scalar _ _ _ + +def rescale (P : TwistedPshForm D m) (c : ℝ) (hc : 0 simp [e,hk]) + have h0 : 0 decide + refine ⟨1-a,Or.inr (le_of_not_ge hw),?_⟩ + simp only [scalarCoordinateChange,ite_eq_right ha,norm_inv] + exact inv_le_one_of_one_le₀ (le_of_not_ge hw) + obtain ⟨j₁,h₁,b₁⟩ := hs i.1 z.1 + obtain ⟨j₂,h₂,b₂⟩ := hs i.2 z.2 + refine ⟨(j₁,j₂),⟨by simpa only [mem_closedBall,dist_zero_right] using hR,h₁,h₂⟩,?_⟩ + exact max_le b₁ b₂ + +lemma TwistedPshForm.local_bound (D : EqualizerData) (i : StandardChart) (R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ m, 0 < m → ∀ P : TwistedPshForm D m, + (∀ j z, ‖z‖≤1 → ∀ v, P.value j (z,v)≤‖v‖^2) → + ∀ z, ‖z‖≤R → ∀ v, P.value i (z,v)≤C*‖v‖^2 := by + let F (j : StandardChart) (z : BaseCoordinates) : ℝ := + (1+‖polarizationTransition i j (affineQuadric i z)‖^2)*(2*‖D.coordinateTransition i j z‖)^2 + have hc (j : StandardChart) : ContinuousOn (F j) (switchRegion R i j) := by + have hT := (D.coordinateTransition_continuousOn i j).mono (switchRegion_subset R i j) + have hg : Continuous (fun z ↦ polarizationTransition i j (affineQuadric i z)) := by + simp_rw [polarizationTransition_polynomial] + exact continuousOn_univ.mp (analytic_baseEval _).continuousOn + exact (continuousOn_const.add (hg.norm.continuousOn.pow 2)).mul + ((continuousOn_const.mul hT.norm).pow 2) + choose B hB using fun j ↦ (switchRegion_compact R i j).exists_bound_of_continuousOn (hc j) + let C : ℝ := ∑ j : StandardChart, |B j| + have hC : 0≤C := Finset.sum_nonneg (fun _ _ ↦ abs_nonneg _) + refine ⟨C,hC,?_⟩ + intro m hm P hP z hz v + obtain ⟨j,hzj,hsmall⟩ := exists_unit_coordinateChange i z R hz + have hcov := P.compatible i j z (switchRegion_subset R i j hzj) v + have hq := hP j (coordinateChange i j z) hsmall ((D.coordinateTransition i j z).transpose.mulVec v) + have hs : 0≤traceScalar m i j z := Real.rpow_nonneg (norm_nonneg _) _ + have hbound : F j z≤C := calc + F j z ≤ ‖F j z‖ := le_abs_self _ + _ ≤ B j := hB j z hzj + _ ≤ |B j| := le_abs_self _ + _ ≤ C := by + change |B j|≤ ∑ k : StandardChart, |B k| + exact Finset.single_le_sum (fun k _ ↦ abs_nonneg (B k)) (Finset.mem_univ j) + calc + P.value i (z,v) = traceScalar m i j z * + P.value j (coordinateChange i j z,(D.coordinateTransition i j z).transpose.mulVec v) := hcov + _ ≤ traceScalar m i j z * ‖(D.coordinateTransition i j z).transpose.mulVec v‖^2 := + mul_le_mul_of_nonneg_left hq hs + _ ≤ (1+‖polarizationTransition i j (affineQuadric i z)‖^2) * + (2*‖D.coordinateTransition i j z‖*‖v‖)^2 := by + apply mul_le_mul (traceScalar_le m hm i j z) _ (sq_nonneg _) (by positivity) + exact sq_le_sq₀ (norm_nonneg _) (by positivity) |>.mpr (norm_transpose_mulVec_le _ _) + _ = F j z*‖v‖^2 := by dsimp [F]; ring + _ ≤ C*‖v‖^2 := mul_le_mul_of_nonneg_right hbound (sq_nonneg _) +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology Metric Matrix +open scoped ComplexOrder Matrix.Norms.Elementwise +noncomputable section + +lemma norm_matrix_of_quadratic_bound {H : TwoMatrix} (hH : H.PosSemidef) {C : ℝ} + (hC : 0≤C) (hb : ∀ v : FiberCoordinates, quadraticValue H v≤C*‖v‖^2) : ‖H‖≤4*C := by + have hnon (v : FiberCoordinates) : 0≤quadraticValue H v := quadraticValue_nonneg hH v + have he (i : Fin 2) : ‖(Pi.single i 1 : FiberCoordinates)‖=1 := by rw [Pi.norm_single,norm_one] + have hsingle (i : Fin 2) : quadraticValue H (Pi.single i 1)≤C := by simpa only [he,one_pow,mul_one] using hb (Pi.single i 1) + have hsmall (v : FiberCoordinates) (hv : ‖v‖≤2) : quadraticValue H v≤4*C := by + have hn := sq_le_sq₀ (norm_nonneg v) (by norm_num : (0:ℝ)≤2) |>.mpr hv + have hh := mul_le_mul_of_nonneg_left hn hC + exact (hb v).trans (by nlinarith) + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro i + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro j + have hsum := hsmall (Pi.single i 1+Pi.single j 1) (by + calc ‖(Pi.single i 1 : FiberCoordinates)+Pi.single j 1‖ ≤ ‖(Pi.single i 1 : FiberCoordinates)‖+‖(Pi.single j 1 : FiberCoordinates)‖ := norm_add_le _ _ + _ = 2 := by rw [he,he]; norm_num) + have hisum := hsmall (Pi.single i 1+Complex.I •Pi.single j 1) (by + calc ‖(Pi.single i 1 : FiberCoordinates)+Complex.I •Pi.single j 1‖ ≤ ‖(Pi.single i 1 : FiberCoordinates)‖+‖Complex.I •(Pi.single j 1 : FiberCoordinates)‖ := norm_add_le _ _ + _ = 2 := by rw [norm_smul,Complex.norm_I,he,he]; norm_num) + have hid := congrFun (congrFun (matrixFromQuadratic_value hH.isHermitian) i) j + have hre : |(H i j).re|≤2*C := by + rw [← hid] + change |(quadraticValue H (Pi.single i 1+Pi.single j 1)-quadraticValue H (Pi.single i 1)-quadraticValue H (Pi.single j 1))/2|≤2*C + apply abs_le.mpr + constructor <;> nlinarith [hnon (Pi.single i 1+Pi.single j 1),hnon (Pi.single i 1),hnon (Pi.single j 1),hsingle i,hsingle j] + have him : |(H i j).im|≤2*C := by + rw [← hid] + change |(quadraticValue H (Pi.single i 1)+quadraticValue H (Pi.single j 1)-quadraticValue H (Pi.single i 1+Complex.I •Pi.single j 1))/2|≤2*C + apply abs_le.mpr + constructor <;> nlinarith [hnon (Pi.single i 1+Complex.I •Pi.single j 1),hnon (Pi.single i 1),hnon (Pi.single j 1),hsingle i,hsingle j] + exact (Complex.norm_le_abs_re_add_abs_im (H i j)).trans (by linarith) + +lemma norm_coefficients_of_quadratic_bound {H : TwoMatrix} (hH : H.PosSemidef) {C : ℝ} + (hC : 0≤C) (hb : ∀ v : FiberCoordinates, quadraticValue H v≤C*‖v‖^2) : + ‖matrixToCoefficients H‖≤8*C := by + have hM := norm_matrix_of_quadratic_bound hH hC hb + apply (sq_le_sq₀ (norm_nonneg _) (by positivity : 0≤8*C)).mp + rw [PiLp.norm_sq_eq_of_L2] + calc + ∑ ij : Fin 2 × Fin 2, ‖matrixToCoefficients H ij‖^2 ≤ ∑ _ij : Fin 2 × Fin 2, (4*C)^2 := by + apply Finset.sum_le_sum + intro ij _ + change ‖H ij.1 ij.2‖^2≤(4*C)^2 + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr + exact (norm_le_pi_norm (H ij.1) ij.2).trans ((norm_le_pi_norm H ij.1).trans hM) + _ = (8*C)^2 := by simp only [Finset.sum_const,Finset.card_univ,Fintype.card_prod,Fintype.card_fin,nsmul_eq_mul]; norm_num; ring + +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/TriangularSections.lean b/lean/OAI/Geometry/QuadricBundles/TriangularSections.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1edec71ea0817de4a6ff071259835cd64f38a60 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/TriangularSections.lean @@ -0,0 +1,304 @@ +import OAI.Geometry.QuadricBundles.LaurentCech + +namespace OAI + +universe u1 u2 + +noncomputable section + +namespace QuadricCounterexample +open Set MvPolynomial Matrix +open scoped BigOperators +noncomputable section + +lemma UniformlyRegularOn.finset_sum {ι : Type u1} (s : Finset ι) + {U : Set BaseCoordinates} {f : ι → BaseCoordinates → ℂ} + (hf : ∀ i∈s,UniformlyRegularOn U (f i)) : + UniformlyRegularOn U (fun z ↦ ∑ i∈s,f i z) := by + classical + induction s using Finset.induction_on with + | empty => simpa using uniformlyRegular_const U 0 + | @insert a s ha ih => + simpa only [Finset.sum_insert ha] using (hf a (Finset.mem_insert_self a s)).add + (ih (fun i hi ↦ hf i (Finset.mem_insert_of_mem hi))) +lemma UniformlyRegularOn.fintype_sum {ι : Type u2} [Fintype ι] + {U : Set BaseCoordinates} {f : ι → BaseCoordinates → ℂ} + (hf : ∀ i,UniformlyRegularOn U (f i)) : + UniformlyRegularOn U (fun z ↦ ∑ i,f i z) := + UniformlyRegularOn.finset_sum Finset.univ (fun i _ ↦ hf i) + +namespace LaurentCech +lemma scalarFactor_mul_one_overlap (i j k : Fin 2) {z : ℂ} (hz : i=j ∨ z≠0) : + scalarFactor i j z*scalarFactor j k (scalarCoordinateChange i j z)=scalarFactor i k z := by + fin_cases i <;> fin_cases j <;> fin_cases k <;> simp_all [scalarFactor,scalarCoordinateChange] +lemma lineFactor_mul_one_overlap (d : ℕ × ℕ) (i j k : Chart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + lineFactor d i j z*lineFactor d j k (coordinateChange i j z)=lineFactor d i k z := by + have h1 := scalarFactor_mul_one_overlap i.1 j.1 k.1 ((coordinateOverlap_iff i j z).mp hz).1 + have h2 := scalarFactor_mul_one_overlap i.2 j.2 k.2 ((coordinateOverlap_iff i j z).mp hz).2 + unfold lineFactor firstFactor secondFactor coordinateChange + calc + _ = (scalarFactor i.1 j.1 z.1*scalarFactor j.1 k.1 (scalarCoordinateChange i.1 j.1 z.1))^d.1* + (scalarFactor i.2 j.2 z.2*scalarFactor j.2 k.2 (scalarCoordinateChange i.2 j.2 z.2))^d.2 := by + simp only [mul_pow]; ring + _ = _ := by rw [h1,h2] +@[simp] lemma lineFactor_self (d : ℕ × ℕ) (i : Chart) (z : BaseCoordinates) : + lineFactor d i i z=1 := by simp [lineFactor,firstFactor,secondFactor,scalarFactor] + +def lineGenerator (d : ℕ × ℕ) (anchor i : Chart) : BasePolynomial := + (if i.1=anchor.1 then 1 else X 0^d.1)*(if i.2=anchor.2 then 1 else X 1^d.2) +lemma eval_lineGenerator (d : ℕ × ℕ) (anchor i : Chart) (z : BaseCoordinates) : + baseEval (lineGenerator d anchor i) z=lineFactor d i anchor z := by + simp only [lineGenerator,lineFactor,firstFactor,secondFactor,scalarFactor,baseEval_mul] + split_ifs <;> simp [baseEval] +lemma lineGenerator_compatible (d : ℕ × ℕ) (anchor i j : Chart) {z : BaseCoordinates} + (hz : z∈coordinateOverlap i j) : + lineFactor d i j z*baseEval (lineGenerator d anchor j) (coordinateChange i j z)= + baseEval (lineGenerator d anchor i) z := by + simp only [eval_lineGenerator] + exact lineFactor_mul_one_overlap d i j anchor hz +end LaurentCech + +open LaurentCech + +structure TriangularCechBundle (r : ℕ) where + degree : Fin r → ℕ × ℕ + matrix : Chart → Chart → BaseCoordinates → Matrix (Fin r) (Fin r) ℂ + regular : ∀ i j a b,UniformlyRegularOn (coordinateOverlap i j) (fun z ↦ matrix i j z a b) + self : ∀ i z,matrix i i z=1 + cocycle : ∀ i j k z,z∈coordinateOverlap i j → z∈coordinateOverlap i k → + matrix i j z*matrix j k (coordinateChange i j z)=matrix i k z + triangular : ∀ i j z,z∈coordinateOverlap i j → ∀ a b,b + refine ⟨0,fun _ _ _ ↦ rfl,?_⟩ + intro i j z hz + rw [B.delta_zero] + ext a + exact hf i j z hz a (Nat.zero_le _) + | succ b ih => + let k : Fin r := ⟨b,by omega⟩ + have hc : ∀ i j l z,z∈coordinateOverlap i j → z∈coordinateOverlap i l → + f.value i j z k+lineFactor (B.degree k) i j z*f.value j l (coordinateChange i j z) k= + f.value i l z k := by + intro i j l z hj hl + have h := congrFun (f.compatible i j l z hj hl) k + dsimp only [Pi.add_apply] at h + rw [B.row_of_high_zero i j hj k _ (fun a ha ↦ + hf j l _ (coordinateOverlap_third i j l hj hl) a (by exact ha))] at h + exact h + obtain ⟨p,hp⟩ := split_regular_line_cocycle (B.degree k) (fun i j z ↦ f.value i j z k) + (fun i j ↦ f.regular i j k) hc + let q₀ : Chart → Fin r → BasePolynomial := fun i a ↦ if a=k then p i else 0 + have hq (i : Chart) (z : BaseCoordinates) (a : Fin r) : + polynomialValue q₀ i z a=if a=k then baseEval (p i) z else 0 := by + simp only [polynomialValue,q₀]; split_ifs <;> simp + have hδ (i j : Chart) (z : BaseCoordinates) (hz : z∈coordinateOverlap i j) (a : Fin r) + (ha : k≤a) : + B.delta q₀ i j z a=if a=k then f.value i j z k else 0 := by + unfold delta + simp only [Pi.sub_apply] + rw [B.row_of_high_zero i j hz a _ (fun c hc ↦ by rw [hq]; simp [ne_of_gt (lt_of_le_of_lt ha hc)])] + rw [hq,hq] + by_cases h : a=k + · subst a; simp only [ite_true]; exact (hp i j z hz).symm + · simp [h] + let g := Cocycle.sub B f (B.coboundary q₀) + have hg : ∀ i j z,z∈coordinateOverlap i j → ∀ a : Fin r,b≤a.val → g.value i j z a=0 := by + intro i j z hz a ha + change f.value i j z a-B.delta q₀ i j z a=0 + rw [hδ i j z hz a ha] + by_cases h : a=k + · simp [h] + · have hlt : b+1≤a.val := by have hne : a.val≠b := fun he ↦ h (Fin.ext he); omega + simp [h,hf i j z hz a hlt] + obtain ⟨q,hq0,hqe⟩ := ih (by omega) g hg + refine ⟨q+q₀,?_,?_⟩ + · intro i a ha + have hak : a≠k := by intro h; subst a; dsimp [k] at ha; omega + simp [hq0 i a (by omega),q₀,hak] + · intro i j z hz + rw [B.delta_add] + have h := hqe i j z hz + change f.value i j z-B.delta q₀ i j z=B.delta q i j z at h + exact sub_eq_iff_eq_add.mp h + +theorem solve (f : B.Cocycle) : ∃ q : Chart → Fin r → BasePolynomial, + ∀ i j z,z∈coordinateOverlap i j → f.value i j z=B.delta q i j z := by + obtain ⟨q,_,hq⟩ := B.solve_upTo r le_rfl f (fun _ _ _ _ a ha ↦ False.elim (by omega)) + exact ⟨q,hq⟩ +end TriangularCechBundle +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set MvPolynomial Matrix LaurentCech +open scoped BigOperators +noncomputable section +namespace TriangularCechBundle +variable {r : ℕ} (B : TriangularCechBundle r) + +structure Section where + polynomial : Chart → Fin r → BasePolynomial + compatible : ∀ i j z,z∈coordinateOverlap i j → + (B.matrix i j z).mulVec (polynomialValue polynomial j (coordinateChange i j z))= + polynomialValue polynomial i z + +lemma delta_sub (q p : Chart → Fin r → BasePolynomial) (i j : Chart) (z : BaseCoordinates) : + B.delta (q-p) i j z=B.delta q i j z-B.delta p i j z := by + have h (a : Chart) (w : BaseCoordinates) : + polynomialValue (q-p) a w=polynomialValue q a w-polynomialValue p a w := by + ext b; simp [polynomialValue] + simp only [delta,h,mulVec_sub] + abel + +theorem exists_generator (anchor : Chart) (k : Fin r) : + ∃ s : B.Section, + (∀ i a,k simp + have hd : ∀ i j z,z∈coordinateOverlap i j → ∀ a : Fin r,k.val≤a.val → B.delta l i j z a=0 := by + intro i j z hz a ha + unfold delta + simp only [Pi.sub_apply] + rw [B.row_of_high_zero i j hz a _ (fun b hb ↦ by + rw [hl] + have hbk : b≠k := fun he ↦ by subst b; exact (not_lt_of_ge ha) hb + simp [hbk])] + rw [hl,hl] + by_cases h : a=k + · subst a + simp only [ite_true] + exact sub_eq_zero.mpr (lineGenerator_compatible (B.degree k) anchor i j hz) + · simp [h] + obtain ⟨q,hq,hqe⟩ := B.solve_upTo k.val (Nat.le_of_lt k.isLt) (B.coboundary l) hd + have hcomp : ∀ i j z,z∈coordinateOverlap i j → B.delta (l-q) i j z=0 := by + intro i j z hz + rw [B.delta_sub] + exact sub_eq_zero.mpr (hqe i j z hz) + refine ⟨⟨l-q,fun i j z hz ↦ sub_eq_zero.mp (hcomp i j z hz)⟩,?_,?_⟩ + · intro i a ha + change l i a-q i a=0 + simp [l,ne_of_gt ha,hq i a (Nat.le_of_lt ha)] + · intro i + change l i k-q i k=_ + simp [l,hq i k le_rfl] + +def generator (anchor : Chart) (k : Fin r) : B.Section := (B.exists_generator anchor k).choose +lemma generator_high (anchor i : Chart) (k a : Fin r) (ha : k.trans (mul_le_mul_of_nonneg_right hx (norm_nonneg _)) + +def boundedMultiplierLp (hA : AEStronglyMeasurable A μ) + (hC : 0 ≤ C) (hb : ∀ᵐ x ∂μ, ‖A x‖ ≤ C) : Lp E p μ →L[ℝ] Lp F p μ := + LinearMap.mkContinuous + { toFun := fun f ↦ (boundedMultiplier_memLp hA hC hb f).toLp (fun x ↦ A x (f x)) + map_add' := fun f g ↦ by + apply Lp.ext + filter_upwards [(boundedMultiplier_memLp hA hC hb (f+g)).coeFn_toLp, + (boundedMultiplier_memLp hA hC hb f).coeFn_toLp, + (boundedMultiplier_memLp hA hC hb g).coeFn_toLp, + Lp.coeFn_add f g, + Lp.coeFn_add ((boundedMultiplier_memLp hA hC hb f).toLp _) + ((boundedMultiplier_memLp hA hC hb g).toLp _)] with x hfg hf hg hadd hsum + simp only [hfg,hf,hg,hadd,map_add,hsum,Pi.add_apply] + map_smul' := fun c f ↦ by + apply Lp.ext + filter_upwards [(boundedMultiplier_memLp hA hC hb (c • f)).coeFn_toLp, + (boundedMultiplier_memLp hA hC hb f).coeFn_toLp, + Lp.coeFn_smul c f, Lp.coeFn_smul c ((boundedMultiplier_memLp hA hC hb f).toLp _)] + with x hcf hf hsmul hout + simp only [hcf,hf,hsmul,map_smul,hout,RingHom.id_apply,Pi.smul_apply] } + C (fun f ↦ by + apply Lp.norm_le_mul_norm_of_ae_le_mul + filter_upwards [(boundedMultiplier_memLp hA hC hb f).coeFn_toLp,hb] with x hx hbx + change ‖((boundedMultiplier_memLp hA hC hb f).toLp (fun x ↦ A x (f x))) x‖ ≤ C * ‖f x‖ + rw [hx] + exact (A x).le_opNorm (f x) |>.trans + (mul_le_mul_of_nonneg_right hbx (norm_nonneg _))) + +lemma boundedMultiplierLp_coe (hA : AEStronglyMeasurable A μ) + (hC : 0 ≤ C) (hb : ∀ᵐ x ∂μ, ‖A x‖ ≤ C) (f : Lp E p μ) : + boundedMultiplierLp hA hC hb f =ᵐ[μ] fun x ↦ A x (f x) := + (boundedMultiplier_memLp hA hC hb f).coeFn_toLp +end Multiplier +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory +noncomputable section + +lemma compact_involution_map_bound {X : Type u10} [NormedAddCommGroup X] + [NormedSpace ℝ X] [FiniteDimensional ℝ X] [MeasurableSpace X] [BorelSpace X] + {μ : Measure X} [μ.IsAddHaarMeasure] {T : X → X} {U K : Set X} + (hT : Measurable T) (hi : Function.Involutive T) (hU : IsOpen U) + (hd : ContDiffOn ℝ 1 T U) (hK : IsCompact K) (hKU : K ⊆ U) + (hTU : MapsTo T U U) : + ∃ C : ℝ, 0 ≤ C ∧ Measure.map T (μ.restrict K) ≤ ENNReal.ofReal C • μ := by + have hTK : IsCompact (T '' K) := hK.image_of_continuousOn (hd.continuousOn.mono hKU) + have hTKU : T '' K ⊆ U := by rintro _ ⟨x,hx,rfl⟩; exact hTU (hKU hx) + have hc : ContinuousOn (fun x ↦ |(fderiv ℝ T x).det|) (T '' K) := + (continuous_abs.comp_continuousOn + (ContinuousLinearMap.continuous_det.comp_continuousOn + (hd.continuousOn_fderiv_of_isOpen hU le_rfl))).mono hTKU + obtain ⟨C,hC⟩ := hTK.bddAbove_image hc + refine ⟨max C 0,le_max_right _ _,map_restrict_involution_le (T' := fderiv ℝ T) hT hi hTK.measurableSet ?_ ?_⟩ + · intro x hx + exact ((hd.differentiableOn_one x (hTKU hx)).differentiableAt + (hU.mem_nhds (hTKU hx))).hasFDerivAt.hasFDerivWithinAt + · intro x hx + exact (hC (mem_image_of_mem _ hx)).trans (le_max_left _ _) + +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric Matrix +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise +noncomputable section +abbrev MatrixCoefficients := EuclideanSpace ℂ (Fin 2 × Fin 2) + +lemma matrix_eq_of_quadratic_eq {H K : TwoMatrix} (hH : H.IsHermitian) (hK : K.IsHermitian) + (h : ∀ v : FiberCoordinates, quadraticValue H v=quadraticValue K v) : H=K := by + rw [← matrixFromQuadratic_value hH,← matrixFromQuadratic_value hK] + congr 1 + exact funext h + +def congruenceCoefficients (A : TwoMatrix) : MatrixCoefficients →L[ℂ] MatrixCoefficients := + LinearMap.toContinuousLinearMap + { toFun := fun c ↦ matrixToCoefficients (A.conjTranspose*coefficientsToMatrix c*A) + map_add' := fun c d ↦ by simp only [map_add,mul_add,add_mul] + map_smul' := fun t c ↦ by simp only [map_smul,Matrix.mul_smul,Matrix.smul_mul,RingHom.id_apply] } + +lemma congruenceCoefficients_apply (A : TwoMatrix) (c : MatrixCoefficients) : + coefficientsToMatrix (congruenceCoefficients A c)=A.conjTranspose*coefficientsToMatrix c*A := rfl + +lemma continuous_congruenceCoefficients : Continuous congruenceCoefficients := by + apply continuous_clm_apply.mpr + intro c + change Continuous (fun A : TwoMatrix ↦ matrixToCoefficients (A.conjTranspose*coefficientsToMatrix c*A)) + have hm : Continuous (matrixToCoefficients (n := Fin 2)) := LinearMap.continuous_of_finiteDimensional _ + exact hm.comp (by fun_prop) + +lemma TwistedPshForm.matrix_compatible {D : EqualizerData} {m : ℕ} (P : TwistedPshForm D m) + (i j : StandardChart) {z : BaseCoordinates} (hz : z∈coordinateOverlap i j) : + P.matrix i z= traceScalar m i j z • + ((D.coordinateTransition i j z).transpose.conjTranspose * + P.matrix j (coordinateChange i j z)*(D.coordinateTransition i j z).transpose) := by + apply matrix_eq_of_quadratic_eq (P.positive i z).isHermitian + ((Matrix.isHermitian_conjTranspose_mul_mul _ (P.positive j (coordinateChange i j z)).isHermitian).smul (by simp [IsSelfAdjoint])) + intro v + rw [P.compatible i j z hz,← quadraticValue_congruence] + change _=(quadraticValueCLM v) (_ • _) + rw [map_smul,smul_eq_mul] + rfl + +lemma coordinateChange_symm (i j : StandardChart) : coordinateChange i j=coordinateChange j i := by + funext z + simp only [coordinateChange,scalarCoordinateChange,eq_comm] + +lemma coordinateChange_involutive (i j : StandardChart) : Function.Involutive (coordinateChange i j) := by + intro z + rw [coordinateChange_symm i j] at * + simpa only [← coordinateChange_symm i j] using coordinateChange_inv i j z + +lemma coordinateChange_measurable (i j : StandardChart) : Measurable (coordinateChange i j) := by + unfold coordinateChange scalarCoordinateChange + split_ifs <;> fun_prop + +lemma coordinateChange_contDiffOn (i j : StandardChart) : + ContDiffOn ℝ 1 (coordinateChange i j) (coordinateOverlap i j) := by + apply ContDiffOn.prodMk + · by_cases h : i.1=j.1 + · simp only [scalarCoordinateChange,ite_eq_left h] + fun_prop + · simp only [scalarCoordinateChange,ite_eq_right h] + exact contDiffOn_fst.inv (fun z hz ↦ ((coordinateOverlap_iff i j z).mp hz).1.resolve_left h) + · by_cases h : i.2=j.2 + · simp only [scalarCoordinateChange,ite_eq_left h] + fun_prop + · simp only [scalarCoordinateChange,ite_eq_right h] + exact contDiffOn_snd.inv (fun z hz ↦ ((coordinateOverlap_iff i j z).mp hz).2.resolve_left h) + +lemma coordinateChange_mapsTo_overlap (i j : StandardChart) : + MapsTo (coordinateChange i j) (coordinateOverlap i j) (coordinateOverlap i j) := by + intro z hz + rw [coordinateOverlap_iff] at hz ⊢ + constructor + · rcases hz.1 with h|h + · exact Or.inl h + · right + simp only [coordinateChange,scalarCoordinateChange] + split_ifs <;> simpa using h + · rcases hz.2 with h|h + · exact Or.inl h + · right + simp only [coordinateChange,scalarCoordinateChange] + split_ifs <;> simpa using h + +lemma coordinateChange_compact_bound (i j : StandardChart) {K : Set BaseCoordinates} + (hK : IsCompact K) (hKU : K ⊆ coordinateOverlap i j) : + ∃ C : ℝ, 0≤C ∧ Measure.map (coordinateChange i j) (volume.restrict K) ≤ ENNReal.ofReal C • volume := by + let : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + exact compact_involution_map_bound (coordinateChange_measurable i j) + (coordinateChange_involutive i j) (coordinateOverlap_open i j) + (coordinateChange_contDiffOn i j) hK hKU (coordinateChange_mapsTo_overlap i j) +end +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory +open scoped ENNReal +noncomputable section + +lemma L2_norm_tendsto_zero_of_bounded_ae {α : Type u11} {E : Type u12} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] {μ : Measure α} [IsFiniteMeasure μ] + (f : ℕ → Lp E 2 μ) {C : ℝ} (_hC : 0 ≤ C) + (hb : ∀ k, ∀ᵐ x ∂μ, ‖f k x‖≤C) + (hlim : ∀ᵐ x ∂μ, Tendsto (fun k ↦ f k x) atTop (𝓝 0)) : + Tendsto (fun k ↦ ‖f k‖) atTop (𝓝 0) := by + have hn (k : ℕ) : (∫ x, ‖f k x‖^2 ∂μ)=‖f k‖^2 := by + rw [← real_inner_self_eq_norm_sq, L2.inner_def] + congr 1 + funext x + exact (real_inner_self_eq_norm_sq (f k x)).symm + have hh := tendsto_integral_of_dominated_convergence + (F := fun k x ↦ ‖f k x‖^2) (f := fun _ ↦ (0:ℝ)) (fun _ : α ↦ C^2) + (fun k ↦ ((Lp.aestronglyMeasurable (f k)).norm.pow 2)) + (integrable_const (C^2)) + (fun k ↦ (hb k).mono fun x hx ↦ by + simpa only [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg ‖f k x‖)] using + pow_le_pow_left₀ (norm_nonneg _) hx 2) + (hlim.mono fun x hx ↦ by simpa using hx.norm.pow 2) + simp only [integral_zero,hn] at hh + simpa only [Real.sqrt_sq (norm_nonneg _),Real.sqrt_zero] using hh.sqrt + +section Weak +variable {E : Type u13} {F : Type u14} {G : Type u15} [NormedAddCommGroup E] [NormedAddCommGroup F] + [NormedAddCommGroup G] [InnerProductSpace ℂ E] [InnerProductSpace ℂ F] + [InnerProductSpace ℂ G] [CompleteSpace E] [CompleteSpace F] [CompleteSpace G] +local instance : InnerProductSpace ℝ E := InnerProductSpace.rclikeToReal ℂ E +local instance : InnerProductSpace ℝ F := InnerProductSpace.rclikeToReal ℂ F +local instance : InnerProductSpace ℝ G := InnerProductSpace.rclikeToReal ℂ G +lemma real_weakLimit_two_maps (A : E →L[ℝ] G) (B : F →L[ℝ] G) + {u : ℕ → E} {v : ℕ → F} {w : E} {z : F} + (hw : ∀ e, Tendsto (fun k ↦ inner ℂ (u k) e) atTop (𝓝 (inner ℂ w e))) + (hz : ∀ f, Tendsto (fun k ↦ inner ℂ (v k) f) atTop (𝓝 (inner ℂ z f))) + (herr : Tendsto (fun k ↦ ‖B (v k)-A (u k)‖) atTop (𝓝 0)) : B z=A w := by + have he := tendsto_zero_iff_norm_tendsto_zero.mpr herr + have hweak (g : G) := (real_weakLimit_map B (complex_weak_implies_real hz) g).sub + (real_weakLimit_map A (complex_weak_implies_real hw) g) + have hzero (g : G) : Tendsto (fun k ↦ inner ℝ (B (v k)-A (u k)) g) atTop (𝓝 0) := by + simpa only [inner_zero_left] using he.inner tendsto_const_nhds + have heq (g : G) : inner ℝ (B z-A w) g=0 := by + apply tendsto_nhds_unique _ (hzero g) + simpa only [inner_sub_left] using hweak g + exact sub_eq_zero.mp (inner_self_eq_zero.mp (heq (B z-A w))) +end Weak +end +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/QuadricBundles/WeakLimits.lean b/lean/OAI/Geometry/QuadricBundles/WeakLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a5f2e5ac391f658a80feda7ed5e73798661c024 --- /dev/null +++ b/lean/OAI/Geometry/QuadricBundles/WeakLimits.lean @@ -0,0 +1,377 @@ +import OAI.Geometry.QuadricBundles.MatrixRepresentative + +namespace OAI + +universe u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 u23 u24 u25 u26 u27 u28 u29 u30 u31 + +noncomputable section + +namespace QuadricCounterexample +open Filter Topology Set MeasureTheory +open scoped ENNReal + +lemma tendsto_dual_of_tendsto_inner + {E : Type u1} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + {f : ℕ → E} {w : E} + (h : ∀ v : E, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) + (d : StrongDual ℂ E) : Tendsto (fun k ↦ d (f k)) atTop (𝓝 (d w)) := by + let v := (InnerProductSpace.toDual ℂ E).symm d + have h' := (h v).star + have he (z : E) : star (inner ℂ z v) = d z := by + change (starRingEnd ℂ) (inner ℂ z v) = d z + rw [inner_conj_symm] + exact InnerProductSpace.toDual_symm_apply + simpa only [he] using h' + +lemma tendsto_real_dual_of_tendsto_inner + {E : Type u2} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {f : ℕ → E} {w : E} + (h : ∀ v : E, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) + (d : StrongDual ℝ E) : Tendsto (fun k ↦ d (f k)) atTop (𝓝 (d w)) := by + have ht := Complex.continuous_re.continuousAt.tendsto.comp + (tendsto_dual_of_tendsto_inner h (StrongDual.extendRCLike d)) + have he (y : E) : ((StrongDual.extendRCLike d) y : ℂ).re = d y := + StrongDual.re_extendRCLike_apply (𝕜 := ℂ) d y + simpa only [Function.comp_def, he] using ht + +lemma mem_closed_convex_of_weak_limit + {E : Type u3} [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {C : Set E} (hclosed : IsClosed C) (hconvex : Convex ℝ C) + {f : ℕ → E} {w : E} (hf : ∀ k, f k ∈ C) + (hlim : ∀ v : E, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) : + w ∈ C := by + by_contra hw + obtain ⟨d, r, hr, hw⟩ := + RCLike.geometric_hahn_banach_closed_point (𝕜 := ℂ) hconvex hclosed hw + have hl := Complex.continuous_re.continuousAt.tendsto.comp + (tendsto_dual_of_tendsto_inner hlim d) + have he : ∀ᶠ k in atTop, (d (f k)).re ≤ r := + Eventually.of_forall fun k ↦ (hr (f k) (hf k)).le + exact hw.not_ge (le_of_tendsto hl he) + +lemma isClosed_ae_linear_constraint {α : Type u4} {E : Type u5} [MeasurableSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] + {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] (Ω : Set α) + (ℓ : E →L[ℝ] ℝ) (A : α → Lp E p μ →L[ℝ] ℝ) : + IsClosed {f : Lp E p μ | ∀ᵐ x ∂μ.restrict Ω, ℓ (f x) ≤ A x f} := by + apply IsSeqClosed.isClosed + intro f g hf hfg + obtain ⟨φ, hφmono, hφ⟩ := (tendstoInMeasure_of_tendsto_Lp hfg).exists_seq_tendsto_ae + have hall := ae_all_iff.mpr hf + filter_upwards [hall, ae_restrict_of_ae hφ] with x hx hlim + have hleft := ℓ.continuous.continuousAt.tendsto.comp hlim + have hright := (A x).continuous.continuousAt.tendsto.comp + (hfg.comp hφmono.tendsto_atTop) + exact le_of_tendsto_of_tendsto hleft hright (Eventually.of_forall fun n ↦ hx (φ n)) + +lemma convex_ae_linear_constraint {α : Type u6} {E : Type u7} [MeasurableSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] + {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] (Ω : Set α) + (ℓ : E →L[ℝ] ℝ) (A : α → Lp E p μ →L[ℝ] ℝ) : + Convex ℝ {f : Lp E p μ | ∀ᵐ x ∂μ.restrict Ω, ℓ (f x) ≤ A x f} := by + intro f hf g hg a b ha hb _ + filter_upwards [hf, hg, ae_restrict_of_ae (Lp.coeFn_add (a • f) (b • g)), + ae_restrict_of_ae (Lp.coeFn_smul a f), + ae_restrict_of_ae (Lp.coeFn_smul b g)] with x hx hy hadd hsmul₁ hsmul₂ + rw [hadd, Pi.add_apply, hsmul₁, hsmul₂] + simp only [Pi.smul_apply, map_add, map_smul, smul_eq_mul] + exact add_le_add (mul_le_mul_of_nonneg_left hx ha) (mul_le_mul_of_nonneg_left hy hb) + +theorem ae_linear_constraint_of_weak_limit {α : Type u8} {E : Type u9} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {μ : Measure α} (Ω : Set α) (ℓ : E →L[ℝ] ℝ) + (A : α → Lp E 2 μ →L[ℝ] ℝ) + {f : ℕ → Lp E 2 μ} {w : Lp E 2 μ} + (hf : ∀ k, ∀ᵐ x ∂μ.restrict Ω, ℓ (f k x) ≤ A x (f k)) + (hw : ∀ v, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) : + ∀ᵐ x ∂μ.restrict Ω, ℓ (w x) ≤ A x w := + mem_closed_convex_of_weak_limit (isClosed_ae_linear_constraint Ω ℓ A) + (convex_ae_linear_constraint Ω ℓ A) hf hw + +noncomputable def setAverageL2Functional {α : Type u10} {E : Type u11} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {μ : Measure α} (ℓ : E →L[ℝ] ℝ) {s : Set α} + (hs : MeasurableSet s) (hμs : μ s ≠ ∞) : Lp E 2 μ →L[ℝ] ℝ := + (μ s).toReal⁻¹ • Complex.reCLM.comp + ((innerSL ℂ (indicatorConstLp 2 hs hμs + ((InnerProductSpace.toDual ℂ E).symm (StrongDual.extendRCLike ℓ)))).restrictScalars ℝ) + +lemma setAverageL2Functional_apply {α : Type u12} {E : Type u13} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {μ : Measure α} (ℓ : E →L[ℝ] ℝ) {s : Set α} + (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (f : Lp E 2 μ) : + setAverageL2Functional ℓ hs hμs f = ⨍ x in s, ℓ (f x) ∂μ := by + let z := (InnerProductSpace.toDual ℂ E).symm (StrongDual.extendRCLike ℓ) + have hz (y : E) : inner ℂ z y = StrongDual.extendRCLike ℓ y := + InnerProductSpace.toDual_symm_apply + change (μ s).toReal⁻¹ * (inner ℂ (indicatorConstLp 2 hs hμs z) f).re = _ + rw [L2.inner_indicatorConstLp_eq_setIntegral_inner ℂ f hs z hμs] + simp_rw [hz] + have hg : (∫ x in s, (StrongDual.extendRCLike (𝕜 := ℂ) ℓ) (f x) ∂μ).re = + ∫ x in s, ((StrongDual.extendRCLike (𝕜 := ℂ) ℓ) (f x)).re ∂μ := + (integral_re ((StrongDual.extendRCLike (𝕜 := ℂ) ℓ).integrable_comp + (integrableOn_Lp_of_measure_ne_top f (by norm_num) hμs))).symm + rw [hg] + have he (y : E) : ((StrongDual.extendRCLike ℓ) y : ℂ).re = ℓ y := + StrongDual.re_extendRCLike_apply (𝕜 := ℂ) ℓ y + simp only [he, setAverage_eq, smul_eq_mul, measureReal_def] + +lemma tendsto_setAverage_of_tendsto_inner {α : Type u14} {E : Type u15} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {μ : Measure α} (ℓ : E →L[ℝ] ℝ) {s : Set α} + (hs : MeasurableSet s) (hμs : μ s ≠ ∞) + {f : ℕ → Lp E 2 μ} {w : Lp E 2 μ} + (hw : ∀ v, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) : + Tendsto (fun k ↦ ⨍ x in s, ℓ (f k x) ∂μ) atTop (𝓝 (⨍ x in s, ℓ (w x) ∂μ)) := by + simpa only [setAverageL2Functional_apply] using + tendsto_real_dual_of_tendsto_inner hw (setAverageL2Functional ℓ hs hμs) + +theorem ae_submean_of_weak_limit {α : Type u16} {E : Type u17} [MeasurableSpace α] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedSpace ℝ E] [IsScalarTower ℝ ℂ E] + {μ : Measure α} (Ω : Set α) (ℓ : E →L[ℝ] ℝ) + (S : α → Set α) (hS : ∀ x, MeasurableSet (S x)) (hμS : ∀ x, μ (S x) ≠ ∞) + {f : ℕ → Lp E 2 μ} {w : Lp E 2 μ} + (hf : ∀ k, ∀ᵐ x ∂μ.restrict Ω, ℓ (f k x) ≤ ⨍ y in S x, ℓ (f k y) ∂μ) + (hw : ∀ v, Tendsto (fun k ↦ inner ℂ (f k) v) atTop (𝓝 (inner ℂ w v))) : + ∀ᵐ x ∂μ.restrict Ω, ℓ (w x) ≤ ⨍ y in S x, ℓ (w y) ∂μ := by + have hc := ae_linear_constraint_of_weak_limit Ω ℓ + (fun x ↦ setAverageL2Functional ℓ (hS x) (hμS x)) + (fun k ↦ by simpa only [setAverageL2Functional_apply] using hf k) hw + simpa only [setAverageL2Functional_apply] using hc + +end QuadricCounterexample + +namespace QuadricCounterexample +open Set Filter Topology MeasureTheory Metric + +theorem DiskPshOn.base_submean + {Ω : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) {q : ℂ × ℂ → ℝ} + (hq : DiskPshOn Ω q) {x : ℂ × ℂ} (hx : x ∈ Ω) {r : ℝ} (hr : 0 < r) + (hb : closedBall x r ⊆ Ω) (hi : IntegrableOn q (ball x r)) : + (volume (ball x r)).toReal * q x ≤ ∫ y in ball x r, q y := by + have hprod : Integrable q + ((volume.restrict (ball x.1 r)).prod (volume.restrict (ball x.2 r))) := by + rw [Measure.prod_restrict, ball_prod_same] + exact hi + have h1 : DiskSubharmonicOn ((fun z : ℂ ↦ (z,x.2)) ⁻¹' Ω) + (fun z ↦ q (z,x.2)) := + hq.2 _ (hΩ.preimage (by fun_prop)) _ (by fun_prop) (fun _ h ↦ h) + have hb1 : closedBall x.1 r ⊆ (fun z : ℂ ↦ (z,x.2)) ⁻¹' Ω := by + intro z hz + apply hb + simpa only [mem_closedBall, Prod.dist_eq, dist_self, max_le_iff] using + And.intro (show dist z x.1 ≤ r from hz) hr.le + have hs1 := h1.2 x.1 hx r hr hb1 + have h2 (z : ℂ) (hz : z ∈ ball x.1 r) : + (volume (ball x.2 r)).toReal * q (z,x.2) ≤ ∫ w in ball x.2 r, q (z,w) := by + have hh : DiskSubharmonicOn ((fun w : ℂ ↦ (z,w)) ⁻¹' Ω) (fun w ↦ q (z,w)) := + hq.2 _ (hΩ.preimage (by fun_prop)) _ (by fun_prop) (fun _ h ↦ h) + have hbs : closedBall x.2 r ⊆ (fun w : ℂ ↦ (z,w)) ⁻¹' Ω := by + intro w hw + apply hb + simpa only [mem_closedBall, Prod.dist_eq, max_le_iff] using + And.intro (le_of_lt (show dist z x.1 < r from hz)) (show dist w x.2 ≤ r from hw) + exact (hh.2 x.2 (hbs (mem_closedBall_self hr.le)) r hr hbs).2 + have hmeasure : (volume (ball x r)).toReal = + (volume (ball x.1 r)).toReal * (volume (ball x.2 r)).toReal := by + rw [← ball_prod_same] + change ((volume.prod volume) (ball x.1 r ×ˢ ball x.2 r)).toReal = _ + rw [Measure.prod_prod, ENNReal.toReal_mul] + rw [hmeasure] + calc + (volume (ball x.1 r)).toReal * (volume (ball x.2 r)).toReal * q x = + (volume (ball x.2 r)).toReal * ((volume (ball x.1 r)).toReal * q x) := by ring + _ ≤ (volume (ball x.2 r)).toReal * (∫ z in ball x.1 r, q (z,x.2)) := + mul_le_mul_of_nonneg_left hs1.2 ENNReal.toReal_nonneg + _ = ∫ z in ball x.1 r, (volume (ball x.2 r)).toReal * q (z,x.2) := + (integral_const_mul _ _).symm + _ ≤ ∫ z in ball x.1 r, ∫ w in ball x.2 r, q (z,w) := + integral_mono_ae (hs1.1.const_mul _) hprod.integral_prod_left + ((ae_restrict_mem measurableSet_ball).mono h2) + _ = ∫ y in ball x r, q y := by + rw [← integral_prod q hprod, Measure.prod_restrict, ball_prod_same] + rfl + +end QuadricCounterexample + +namespace QuadricCounterexample +open Filter Topology Set MeasureTheory Metric +open scoped ENNReal ComplexOrder Matrix.Norms.Elementwise + +lemma isClosed_ae_mem_Lp {α : Type u18} {E : Type u19} [MeasurableSpace α] + [NormedAddCommGroup E] {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + {C : Set E} (hC : IsClosed C) : + IsClosed {f : Lp E p μ | ∀ᵐ x ∂μ, f x ∈ C} := by + apply IsSeqClosed.isClosed + intro f g hf hfg + obtain ⟨φ, _, hφ⟩ := (tendstoInMeasure_of_tendsto_Lp hfg).exists_seq_tendsto_ae + have hall : ∀ᵐ x ∂μ, ∀ n, f n x ∈ C := ae_all_iff.mpr hf + filter_upwards [hall, hφ] with x hx hlim + exact hC.mem_of_tendsto hlim (Eventually.of_forall fun n ↦ hx (φ n)) + +lemma convex_ae_mem_Lp {α : Type u20} {E : Type u21} [MeasurableSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] + {μ : Measure α} {p : ℝ≥0∞} [Fact (1 ≤ p)] + {C : Set E} (hC : Convex ℝ C) : + Convex ℝ {f : Lp E p μ | ∀ᵐ x ∂μ, f x ∈ C} := by + intro f hf g hg a b ha hb hab + filter_upwards [hf, hg, Lp.coeFn_add (a • f) (b • g), + Lp.coeFn_smul a f, Lp.coeFn_smul b g] with x hx hy hadd hsmul₁ hsmul₂ + change (a • f + b • g) x ∈ C + rw [hadd, Pi.add_apply, hsmul₁, hsmul₂] + exact hC hx hy ha hb hab + +noncomputable def coefficientsToMatrix {n : Type u22} [Fintype n] : + EuclideanSpace ℂ (n × n) →ₗ[ℂ] Matrix n n ℂ where + toFun v i j := v (i,j) + map_add' := by intros; rfl + map_smul' := by intros; rfl + +lemma continuous_coefficientsToMatrix {n : Type u23} [Fintype n] : + Continuous (coefficientsToMatrix (n := n)) := + LinearMap.continuous_of_finiteDimensional _ + +noncomputable def coefficientsQuadraticCLM {n : Type u24} [Fintype n] + (v : n → ℂ) : EuclideanSpace ℂ (n × n) →L[ℝ] ℝ := + (quadraticValueCLM v).comp + ((coefficientsToMatrix (n := n)).toContinuousLinearMap.restrictScalars ℝ) + +lemma coefficientsQuadraticCLM_apply {n : Type u25} [Fintype n] + (v : n → ℂ) (c : EuclideanSpace ℂ (n × n)) : + coefficientsQuadraticCLM v c = quadraticValue (coefficientsToMatrix c) v := rfl + +lemma weak_coefficients_positive {α : Type u26} {n : Type u27} [MeasurableSpace α] + [Fintype n] [DecidableEq n] {μ : Measure α} + {f : ℕ → Lp (EuclideanSpace ℂ (n × n)) 2 μ} + {w : Lp (EuclideanSpace ℂ (n × n)) 2 μ} + (hf : ∀ m, ∀ᵐ x ∂μ, (coefficientsToMatrix (f m x)).PosSemidef) + (hw : ∀ v, Tendsto (fun m ↦ inner ℂ (f m) v) atTop (𝓝 (inner ℂ w v))) : + ∀ᵐ x ∂μ, (coefficientsToMatrix (w x)).PosSemidef := by + have hclosed : IsClosed {c : EuclideanSpace ℂ (n × n) | + (coefficientsToMatrix c).PosSemidef} := + isClosed_matrix_positive_semidefinite.preimage continuous_coefficientsToMatrix + have hconvex : Convex ℝ {c : EuclideanSpace ℂ (n × n) | + (coefficientsToMatrix c).PosSemidef} := + convex_matrix_positive_semidefinite.linear_preimage (coefficientsToMatrix.restrictScalars ℝ) + exact mem_closed_convex_of_weak_limit (isClosed_ae_mem_Lp hclosed) + (convex_ae_mem_Lp hconvex) hf hw + +lemma DiskPshOn.base_average_submean + {Ω : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) {q : ℂ × ℂ → ℝ} + (hq : DiskPshOn Ω q) {x : ℂ × ℂ} (hx : x ∈ Ω) {r : ℝ} (hr : 0 < r) + (hb : closedBall x r ⊆ Ω) (hi : IntegrableOn q (ball x r)) : + q x ≤ ⨍ y in ball x r, q y := by + have hm : 0 < (volume (ball x r)).toReal := + ENNReal.toReal_pos (ne_of_gt (Metric.measure_ball_pos volume x hr)) measure_ball_lt_top.ne + rw [setAverage_eq, smul_eq_mul, measureReal_def, ← div_eq_inv_mul, le_div_iff₀ hm] + simpa only [mul_comm] using hq.base_submean hΩ hx hr hb hi + +local instance {n : Type u28} [Fintype n] : ContinuousENorm (Matrix n n ℂ) := + inferInstanceAs (ContinuousENorm (n → n → ℂ)) + +lemma weak_quadratic_averages {n : Type u29} [Fintype n] + {f : ℕ → Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {w : Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {Hm : ℕ → (ℂ × ℂ) → Matrix n n ℂ} + (hf : ∀ m, (fun x ↦ coefficientsToMatrix (f m x)) =ᵐ[volume] Hm m) + (hw : ∀ v, Tendsto (fun m ↦ inner ℂ (f m) v) atTop (𝓝 (inner ℂ w v))) + (x : ℂ × ℂ) (r : ℝ) (v : n → ℂ) : + Tendsto (fun m ↦ ⨍ y in ball x r, quadraticValue (Hm m y) v) atTop + (𝓝 (⨍ y in ball x r, quadraticValue (coefficientsToMatrix (w y)) v)) := by + have hlim := tendsto_setAverage_of_tendsto_inner (coefficientsQuadraticCLM v) + (measurableSet_ball (x := x) (ε := r)) measure_ball_lt_top.ne hw + have he (m : ℕ) : (⨍ y in ball x r, coefficientsQuadraticCLM v (f m y)) = + ⨍ y in ball x r, quadraticValue (Hm m y) v := by + apply average_congr + exact (ae_restrict_of_ae (hf m)).mono fun y hy ↦ by + exact congrArg (fun M ↦ quadraticValue M v) hy + simp_rw [he] at hlim + exact hlim + +lemma weak_quadratic_submean {n : Type u30} [Fintype n] + {f : ℕ → Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {w : Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {Hm : ℕ → (ℂ × ℂ) → Matrix n n ℂ} + {Ω U : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) (hU : IsOpen U) + (hf : ∀ m, (fun x ↦ coefficientsToMatrix (f m x)) =ᵐ[volume] Hm m) + (hw : ∀ v, Tendsto (fun m ↦ inner ℂ (f m) v) atTop (𝓝 (inner ℂ w v))) + (hHm : ∀ m, Integrable (Hm m)) + (hp : ∀ m, DiskPshOn (Ω ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2)) + {r : ℝ} (hr : 0 < r) (hb : ∀ x ∈ U, closedBall x r ⊆ Ω) (v : n → ℂ) : + ∀ᵐ x ∂volume.restrict U, + quadraticValue (coefficientsToMatrix (w x)) v ≤ + ⨍ y in ball x r, quadraticValue (coefficientsToMatrix (w y)) v := by + have hall : ∀ m, ∀ᵐ x ∂volume.restrict U, coefficientsQuadraticCLM v (f m x) ≤ + ⨍ y in ball x r, coefficientsQuadraticCLM v (f m y) := by + intro m + have he (x : ℂ × ℂ) : (⨍ y in ball x r, coefficientsQuadraticCLM v (f m y)) = + ⨍ y in ball x r, quadraticValue (Hm m y) v := by + apply average_congr + exact (ae_restrict_of_ae (hf m)).mono fun y hy ↦ by + exact congrArg (fun M ↦ quadraticValue M v) hy + have hbase : DiskPshOn Ω (fun x ↦ quadraticValue (Hm m x) v) := + (hp m).comp (f := fun x ↦ (x,v)) (by fun_prop) (fun _ hx ↦ ⟨hx, mem_univ _⟩) + have hi : Integrable (fun x ↦ quadraticValue (Hm m x) v) := + (quadraticValueCLM v).integrable_comp (hHm m) + filter_upwards [ae_restrict_mem hU.measurableSet, ae_restrict_of_ae (hf m)] with x hx hfx + rw [coefficientsQuadraticCLM_apply, hfx, he] + exact hbase.base_average_submean hΩ (hb x hx (mem_closedBall_self hr.le)) hr + (hb x hx) hi.integrableOn + have hs := ae_submean_of_weak_limit U (coefficientsQuadraticCLM v) + (fun x ↦ ball x r) (fun _ ↦ measurableSet_ball) (fun _ ↦ measure_ball_lt_top.ne) hall hw + simpa only [coefficientsQuadraticCLM_apply] using hs + +local instance : (volume : Measure (ℂ × ℂ)).IsAddHaarMeasure := + inferInstanceAs ((volume.prod volume : Measure (ℂ × ℂ)).IsAddHaarMeasure) + +theorem weak_quadratic_psh_representative {n : Type u31} [Fintype n] [DecidableEq n] + {f : ℕ → Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {w : Lp (EuclideanSpace ℂ (n × n)) 2 (volume : Measure (ℂ × ℂ))} + {Hm : ℕ → (ℂ × ℂ) → Matrix n n ℂ} + {Ω U : Set (ℂ × ℂ)} (hΩ : IsOpen Ω) (hU : IsOpen U) + (hf : ∀ m, (fun x ↦ coefficientsToMatrix (f m x)) =ᵐ[volume] Hm m) + (hw : ∀ v, Tendsto (fun m ↦ inner ℂ (f m) v) atTop (𝓝 (inner ℂ w v))) + (hwL1 : Integrable (fun x ↦ w x)) (hHm : ∀ m, Integrable (Hm m)) + (hposm : ∀ m, ∀ᵐ x ∂volume, (Hm m x).PosSemidef) + (hc : ∀ m, ContinuousOn (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2) + (Ω ×ˢ univ)) + (hp : ∀ m, DiskPshOn (Ω ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (Hm m p.1) p.2)) + {C : ℝ} {r : ℕ → ℝ} (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hb : ∀ k, ∀ x ∈ U, closedBall x (r k) ⊆ Ω) + (hbound : ∀ m, ∀ x ∈ Ω, ∀ v, quadraticValue (Hm m x) v ≤ C * ‖v‖ ^ 2) : + ∃ M : (ℂ × ℂ) → Matrix n n ℂ, + (∀ x ∈ U, (M x).PosSemidef) ∧ + M =ᵐ[volume.restrict U] (fun x ↦ coefficientsToMatrix (w x)) ∧ + DiskPshOn (U ×ˢ univ) + (fun p : (ℂ × ℂ) × (n → ℂ) ↦ quadraticValue (M p.1) p.2) := by + have hH : Integrable (fun x ↦ coefficientsToMatrix (w x)) := + coefficientsToMatrix.toContinuousLinearMap.integrable_comp hwL1 + have hpos : ∀ᵐ x ∂volume, (coefficientsToMatrix (w x)).PosSemidef := by + apply weak_coefficients_positive _ hw + intro m + filter_upwards [hf m, hposm m] with x hx hp + rwa [hx] + apply joint_matrix_regularized_representative hU hH hHm hpos hposm hc hp hr hr0 + _ hbound _ _ + · intro k a ha x hx + apply hb k x hx + simpa only [mem_closedBall, dist_eq_norm, add_sub_cancel_left, sub_zero] using ha + · intro k x _ v + exact weak_quadratic_averages hf hw x (r k) v + · intro v k + exact weak_quadratic_submean hΩ hU hf hw hHm hp (hr k) (hb k) v + +end QuadricCounterexample + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ACCoordinateEndpointEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/ACCoordinateEndpointEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..12fcc56508d220102336c389e8879fd595bc5b59 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ACCoordinateEndpointEnergy.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Coordinates.ACFrameEnergyPairing + +namespace OAI + +/-! # Endpoint control from the integrated coefficient energy on actual coordinate paths -/ + +open Set Filter MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem ac_coordinate_endpoint_energy {n : ℕ} {f : ℝ → ℝ} {b c : Fin n → ℝ → ℝ} + {L D η : ℝ} (hf : AbsolutelyContinuousOnInterval f 0 1) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) + (hc : ∀ i, AbsolutelyContinuousOnInterval (c i) 0 1) + (hη : ∀ i t, t∈Icc (0:ℝ) 1 → |c i t-((1-t)*c i 0+t*c i 1)|≤η) + (hD : 0≤D) + (N : ℝ → ℝ) (hN : ∀ t, 0≤N t) (hNI : IntegrableOn N (Icc (0:ℝ) 1)) + (hbN : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + ‖(WithLp.toLp 2 (fun i => b i t) : Euclidean n)‖^2≤L^2+N t) + (E : ℝ → ℝ) (hE : ∀ t, 0≤E t) (hEI : IntegrableOn E (Icc (0:ℝ) 1)) + (hderiv : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv f t-∑ i, b i t*deriv (c i) t)^2≤D^2*E t) : + |f 1-f 0| ≤ Real.sqrt (L^2+∫ t in Icc (0:ℝ) 1, N t)*‖(WithLp.toLp 2 (fun i => c i 1-c i 0) : Euclidean n)‖+ + η*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+ + D*Real.sqrt (∫ t in Icc (0:ℝ) 1, E t) := by + classical + let w : Euclidean n := WithLp.toLp 2 (fun i => c i 1-c i 0) + let z (i : Fin n) (t : ℝ) := c i t-(c i 0+t*w i) + have hz (i : Fin n) : AbsolutelyContinuousOnInterval (z i) 0 1 := by + have ha : ContDiff ℝ 1 (fun t : ℝ => c i 0+t*w i) := by fun_prop + exact (hc i).sub ha.contDiffOn.absolutelyContinuousOnInterval + have hz0 (i : Fin n) : z i 0=0 := by simp only [z,zero_mul,add_zero,sub_self] + have hz1 (i : Fin n) : z i 1=0 := by + change c i 1-(c i 0+1*(c i 1-c i 0))=0 + ring + have hzη (i : Fin n) (t : ℝ) (ht : t∈Icc (0:ℝ) 1) : |z i t|≤η := by + convert hη i t ht using 1 + congr 1 + change c i t-(c i 0+t*(c i 1-c i 0))=c i t-((1-t)*c i 0+t*c i 1) + ring + apply ac_frame_endpoint_energy w hf hb hz hz0 hz1 hzη hD N hN hNI hbN E hE hEI + filter_upwards [hderiv,ae_all_iff.mpr (fun i => (hc i).ae_differentiableAt)] with t ht hct htin + have he (i : Fin n) : w i+deriv (z i) t=deriv (c i) t := by + have hd : HasDerivAt (fun s : ℝ => c i 0+s*w i) (w i) t := by + simpa only [one_mul] using! ((hasDerivAt_id t).mul_const (w i)).const_add (c i 0) + have hcd : DifferentiableAt ℝ (c i) t := hct i (by + simpa only [uIcc_of_le zero_le_one] using Ioo_subset_Icc_self htin) + have hzderiv : deriv (z i) t=deriv (c i) t-w i := (hcd.hasDerivAt.sub hd).deriv + rw [hzderiv] + ring + simp_rw [he] + exact ht htin + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ACFrameEndpointPairing.lean b/lean/OAI/Geometry/RCD/Coordinates/ACFrameEndpointPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..67bdb7c7f620b122670fbfc566f59f2c2e008f6b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ACFrameEndpointPairing.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Harmonic.ACAffinePairing +import OAI.Geometry.RCD.Coordinates.CoordinatePathVelocity + +namespace OAI + +/-! # Endpoint control from the integrated affine-direction pairing -/ + +open Set Filter MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem ac_frame_endpoint_error_of_pairing {n : ℕ} {f : ℝ → ℝ} {b z : Fin n → ℝ → ℝ} + (w : Euclidean n) {P D η : ℝ} + (hf : AbsolutelyContinuousOnInterval f 0 1) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) + (hz : ∀ i, AbsolutelyContinuousOnInterval (z i) 0 1) + (hz0 : ∀ i, z i 0=0) (hz1 : ∀ i, z i 1=0) + (hη : ∀ i t, t∈Icc (0:ℝ) 1 → |z i t|≤η) + (hD : 0 ≤ D) + (hpair : |∫ t in Icc (0:ℝ) 1, ∑ i, b i t*w i|≤P) + (E : ℝ → ℝ) (hE : ∀ t, 0 ≤ E t) (hEI : IntegrableOn E (Icc (0:ℝ) 1)) + (hderiv : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv f t-∑ i, b i t*(w i+deriv (z i) t))^2≤D^2*E t) : + |f 1-f 0| ≤ P+η*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+ + D*Real.sqrt (∫ t in Icc (0:ℝ) 1, E t) := by + classical + let ν := volume.restrict (Icc (0:ℝ) 1) + let A t := ∑ i, b i t*w i + let Z t := ∑ i, b i t*deriv (z i) t + let H t := ∑ i, b i t*(w i+deriv (z i) t) + have hbc (i : Fin n) : ContinuousOn (b i) (Icc (0:ℝ) 1) := by + simpa only [uIcc_of_le zero_le_one] using (hb i).continuousOn + have hAi (i : Fin n) : Integrable (fun t => b i t*w i) ν := + ((hbc i).mul continuousOn_const).integrableOn_Icc + have hZi (i : Fin n) : Integrable (fun t => b i t*deriv (z i) t) ν := by + have hh := (hz i).intervalIntegrable_deriv.continuousOn_mul (hb i).continuousOn + exact (intervalIntegrable_iff_integrableOn_Icc_of_le zero_le_one).mp hh + have hA : Integrable A ν := integrable_finsetSum _ (fun i _ => hAi i) + have hZ : Integrable Z ν := integrable_finsetSum _ (fun i _ => hZi i) + have heq (t : ℝ) : H t=A t+Z t := by simp only [H,A,Z,mul_add,Finset.sum_add_distrib] + have hH : Integrable H ν := (hA.add hZ).congr (Eventually.of_forall fun t => (heq t).symm) + have hZnorm : |∫ t, Z t ∂ν| ≤ η*∑ i, ∫ t, |deriv (b i) t| ∂ν := by + rw [show (∫ t, Z t ∂ν)=∑ i, ∫ t, b i t*deriv (z i) t ∂ν from + integral_finsetSum _ (fun i _ => hZi i),Finset.mul_sum] + exact (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum fun i _ => + ac_zero_endpoint_pairing_bound (hb i) (hz i) (hz0 i) (hz1 i) (hη i)) + have hHnorm : |∫ t, H t ∂ν| ≤ P+η*∑ i, ∫ t, |deriv (b i) t| ∂ν := by + have hh : (∫ t, H t ∂ν)=(∫ t, A t ∂ν)+(∫ t, Z t ∂ν) := by + simp_rw [heq] + exact integral_add hA hZ + rw [hh] + exact (abs_add_le _ _).trans (add_le_add hpair hZnorm) + have hs := ac_endpoint_L2_error hf hH hEI hderiv + have hmass : 0 ≤ ∫ t in Icc (0:ℝ) 1, E t := integral_nonneg hE + have hsq := Real.sq_sqrt hmass + have hroot := Real.sqrt_nonneg (∫ t in Icc (0:ℝ) 1, E t) + have herror : |f 1-f 0-(∫ t, H t ∂ν)|≤D*Real.sqrt (∫ t in Icc (0:ℝ) 1, E t) := by + change (f 1-f 0-(∫ t, H t ∂ν))^2≤D^2*(∫ t in Icc (0:ℝ) 1, E t) at hs + nlinarith [sq_abs (f 1-f 0-(∫ t, H t ∂ν)),mul_nonneg hD hroot] + have ht := abs_add_le (f 1-f 0-(∫ t, H t ∂ν)) (∫ t, H t ∂ν) + have he : f 1-f 0-(∫ t, H t ∂ν)+(∫ t, H t ∂ν)=f 1-f 0 := by ring + rw [he] at ht + exact ht.trans (by linarith) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ACFrameEnergyPairing.lean b/lean/OAI/Geometry/RCD/Coordinates/ACFrameEnergyPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..66c936a3161523fa605a25a4e36b9a98f84fe2bf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ACFrameEnergyPairing.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Coordinates.ACFrameEndpointPairing + +namespace OAI + +/-! # The affine-direction pairing from an integrated coefficient error -/ + +open Set Filter MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem ac_frame_pairing_energy {n : ℕ} (b : Fin n → ℝ → ℝ) (w : Euclidean n) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) (L : ℝ) (N : ℝ → ℝ) + (hN : ∀ t, 0≤N t) (hNI : IntegrableOn N (Icc (0:ℝ) 1)) + (hbN : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + ‖(WithLp.toLp 2 (fun i => b i t) : Euclidean n)‖^2≤L^2+N t) : + |∫ t in Icc (0:ℝ) 1, ∑ i, b i t*w i|≤ + Real.sqrt (L^2+∫ t in Icc (0:ℝ) 1, N t)*‖w‖ := by + let ν := volume.restrict (Icc (0:ℝ) 1) + let A t := ∑ i, b i t*w i + have hbc (i : Fin n) : ContinuousOn (b i) (Icc (0:ℝ) 1) := by + simpa only [uIcc_of_le zero_le_one] using (hb i).continuousOn + have hAc : ContinuousOn A (Icc (0:ℝ) 1) := + continuousOn_finsetSum _ (fun i _ => (hbc i).mul continuousOn_const) + have hAI : Integrable A ν := hAc.integrableOn_Icc + have hA2 : Integrable (fun t => (A t)^2) ν := (hAc.pow 2).integrableOn_Icc + have hAml : MemLp A 2 ν := (memLp_two_iff_integrable_sq hAI.aestronglyMeasurable).mpr hA2 + have hcs := integral_mul_sq_le_integral_sq ν A (fun _ => 1) hAml (memLp_const (1:ℝ)) + have hmass : ν.real univ=1 := by + simp only [ν,Measure.real,Measure.restrict_apply_univ,Real.volume_Icc,sub_zero, + ENNReal.ofReal_one,ENNReal.toReal_one] + have hcs' : (∫ t, A t ∂ν)^2≤∫ t, (A t)^2 ∂ν := by + simpa only [mul_one,one_pow,integral_const,smul_eq_mul,hmass,sq_abs] using hcs + have hpoint : ∀ᵐ t ∂ν, (A t)^2≤(L^2+N t)*‖w‖^2 := by + filter_upwards [hbN] with t ht + let B : Euclidean n := WithLp.toLp 2 (fun i => b i t) + have he : A t=⟪B,w⟫_ℝ := by + simp only [A,B,PiLp.inner_apply,RCLike.inner_apply,conj_trivial] + congr 1 + ext i + ring + have hh := mul_self_le_mul_self (abs_nonneg ⟪B,w⟫_ℝ) (abs_real_inner_le_norm B w) + have hh' : (A t)^2≤‖B‖^2*‖w‖^2 := by simpa only [he,← pow_two,sq_abs,mul_pow] using hh + exact hh'.trans (mul_le_mul_of_nonneg_right ht (sq_nonneg _)) + have hi := integral_mono_ae hA2 (((integrable_const (L^2)).add hNI).mul_const (‖w‖^2)) hpoint + rw [integral_mul_const] at hi + simp only [Pi.add_apply] at hi + rw [integral_add (integrable_const (L^2)) hNI,integral_const] at hi + simp only [smul_eq_mul] at hi + change (∫ t, (A t)^2 ∂ν)≤(ν.real univ*L^2+∫ t, N t ∂ν)*‖w‖^2 at hi + rw [hmass,one_mul] at hi + have hq : |∫ t, A t ∂ν|^2≤(L^2+∫ t, N t ∂ν)*‖w‖^2 := by simpa only [sq_abs] using hcs'.trans hi + have hh := Real.le_sqrt_of_sq_le hq + rw [Real.sqrt_mul (add_nonneg (sq_nonneg _) (integral_nonneg hN)),Real.sqrt_sq (norm_nonneg w)] at hh + exact hh + +theorem ac_frame_endpoint_energy {n : ℕ} {f : ℝ → ℝ} {b z : Fin n → ℝ → ℝ} + (w : Euclidean n) {L D η : ℝ} + (hf : AbsolutelyContinuousOnInterval f 0 1) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) + (hz : ∀ i, AbsolutelyContinuousOnInterval (z i) 0 1) + (hz0 : ∀ i, z i 0=0) (hz1 : ∀ i, z i 1=0) + (hη : ∀ i t, t∈Icc (0:ℝ) 1 → |z i t|≤η) (hD : 0≤D) + (N : ℝ → ℝ) (hN : ∀ t, 0≤N t) (hNI : IntegrableOn N (Icc (0:ℝ) 1)) + (hbN : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + ‖(WithLp.toLp 2 (fun i => b i t) : Euclidean n)‖^2≤L^2+N t) + (E : ℝ → ℝ) (hE : ∀ t, 0≤E t) (hEI : IntegrableOn E (Icc (0:ℝ) 1)) + (hderiv : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv f t-∑ i, b i t*(w i+deriv (z i) t))^2≤D^2*E t) : + |f 1-f 0|≤Real.sqrt (L^2+∫ t in Icc (0:ℝ) 1, N t)*‖w‖+ + η*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+ + D*Real.sqrt (∫ t in Icc (0:ℝ) 1, E t) := + ac_frame_endpoint_error_of_pairing w hf hb hz hz0 hz1 hη hD + (ac_frame_pairing_energy b w hb L N hN hNI hbN) E hE hEI hderiv + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualCovectorFit.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualCovectorFit.lean new file mode 100644 index 0000000000000000000000000000000000000000..df9e866f34fe0c0c703ed16ab912e691e48719ba --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualCovectorFit.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Coordinates.ActualRadialCovector +import OAI.Geometry.RCD.Sobolev.DirectionalGradientBound +import OAI.Geometry.RCD.Coordinates.RadialFitFromCorrection +import OAI.Geometry.RCD.Harmonic.LocalConstantHarmonic +import OAI.Geometry.RCD.Harmonic.CenteredColumns + +namespace OAI + +/-! # The actual affine-fit step in every constant covector -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual Poisson construction and harmonic improvement give this +fit estimate. Its only error is the complete summable Poisson defect. -/ +theorem actual_distance_radial_covector_fit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) + {θ : ℝ} (hθ : 0 < θ) (hθ1 : θ ≤ 1) + (hfit : HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) θ) : + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let q := positiveSquaredDistance μ hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left + (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; positivity : 0 ≤ r) hθ1) + let C₀ := (1 / 2 : ℝ) * θ * Real.sqrt θ + let V := Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + ∀ b : Euclidean n, + let ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; linarith : r ≤ s / 4)) + (hgrad j)) b + let raw := (localGamma_memLp_two_of_bound μ hX.quadratic (ball p r) q + (sobolevColumnMap μ hX.quadratic u b) ha).toLp + (localGamma μ hX.quadratic q (sobolevColumnMap μ hX.quadratic u b)) + ‖normalizeLocalL2 μ (ball p (θ * r)) ht + (affineResidual μ hX.quadratic u (ball p (θ * r)) ht + (localL2Restriction μ (ball p r) (ball p (θ * r)) hsub raw))‖ ≤ + (V + C₀) * Real.sqrt ((μ.real (ball p r))⁻¹ * + ((n : ℝ) * (radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect μ hX.quadratic S i)) * ‖b‖ ^ 2)) + + C₀ * ‖normalizeLocalL2 μ (ball p r) hs + (affineResidual μ hX.quadratic u (ball p r) hs raw)‖ := by + dsimp only + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let q := positiveSquaredDistance μ hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hsub : ball p r ⊆ ball p (s / 4) := ball_subset_ball (by dsimp only [r]; linarith) + have hu' j := (hu j).mono μ hX.quadratic hsub + have hη := χ.harmonic_on_inner_ball μ hX.quadratic + have hone : SobolevSpace.restrictLp μ hX.quadratic (ball p r) χ.sobolev = + restrictedOne μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) := by + apply restrictLp_eq_one_of_representative + filter_upwards [ae_restrict_of_ae χ.representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans (χ.one x hxr) + have happrox := actual_distance_radial_covector_error hX hn hhessian hκ hK hB hJ hA hepsilon hCχ + p S T i hs1 u hu hgrad hf χ hvol hdouble + intro b + obtain ⟨h, hh, he⟩ := happrox b + have ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hgrad j)) b + have hE : 0 ≤ (n : ℝ) * (radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect μ hX.quadratic S i)) * ‖b‖ ^ 2 := by + have hconst := (radialCorrectionConstant_pos (K := K) (n := n) + (epsilon := epsilon) (A := A) hB hJ hCχ).le + have hdefect := normalizedPoissonDefect_nonneg μ hX.quadratic S hκ i + positivity + exact radial_fit_of_harmonic_correction hX u p hr hθ hθ1 hu' χ.sobolev hη hone hfit + q (sobolevColumnMap μ hX.quadratic u b) h hE ha hh he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitStep.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3c14fe333376f54bf8a2ef9797676acaa89f461 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitStep.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.RCD.Coordinates.ActualCovectorFit +import OAI.Geometry.RCD.Coordinates.DyadicRadialFits + +namespace OAI + +/-! # The actual dyadic covector-fit step uses the next canonical datum -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Canonical distance targets, actual Poisson corrections and harmonic +improvement give the lagged fit step in every covector. -/ +theorem actual_dyadic_radial_fit_step {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) + (m : ℕ) + (hfit : HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ m)) : + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left + (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; positivity : 0 ≤ r) + (pow_le_one₀ (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) ≤ 1))) + let V := Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + ∀ b : Euclidean n, + let ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; linarith : r ≤ s / 4)) + (hgrad j)) b + let hat := ae_restrict_of_ae_restrict_of_subset hsub ha + radialFitError μ hX.quadratic u p (θ * r) ht (T.distanceDatum μ hX.quadratic (i + m)) + (sobolevColumnMap μ hX.quadratic u b) hat ≤ + (V + (1 / 2 : ℝ) * θ * Real.sqrt θ) / (θ * r) * + Real.sqrt ((μ.real (ball p r))⁻¹ * + ((n : ℝ) * (radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect μ hX.quadratic S i)) * ‖b‖ ^ 2)) + + (1 / 2 : ℝ) * Real.sqrt θ * radialFitError μ hX.quadratic u p r hs + (T.distanceDatum μ hX.quadratic i) (sobolevColumnMap μ hX.quadratic u b) ha := by + dsimp only + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hθ : 0 < θ := pow_pos (by norm_num) _ + have hθ1 : θ ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hsub : ball p r ⊆ ball p (s / 4) := ball_subset_ball (by dsimp only [r]; linarith) + have hu' j := (hu j).mono μ hX.quadratic hsub + have hone : SobolevSpace.restrictLp μ hX.quadratic (ball p r) χ.sobolev = + restrictedOne μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) := by + apply restrictLp_eq_one_of_representative + filter_upwards [ae_restrict_of_ae χ.representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans (χ.one x hxr) + have happrox := actual_distance_radial_covector_error hX hn hhessian hκ hK hB hJ hA hepsilon hCχ + p S T i hs1 u hu hgrad hf χ hvol hdouble + intro b + obtain ⟨h, hh, he⟩ := happrox b + have ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hgrad j)) b + have hE : 0 ≤ (n : ℝ) * (radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect μ hX.quadratic S i)) * ‖b‖ ^ 2 := by + have hconst := (radialCorrectionConstant_pos (K := K) (n := n) + (epsilon := epsilon) (A := A) hB hJ hCχ).le + have hdefect := normalizedPoissonDefect_nonneg μ hX.quadratic S hκ i + positivity + have hstep := radialFitError_step_of_correction hX u p hr hθ hθ1 hu' χ.sobolev + (χ.harmonic_on_inner_ball μ hX.quadratic) hone hfit + (T.distanceDatum μ hX.quadratic i) (sobolevColumnMap μ hX.quadratic u b) h hE ha hh he + have hrad : θ * r = distanceSourceRadius r0 (i + m) / 64 := + (distanceSourceRadius_testing_shift r0 i m).symm + have hat := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (mul_le_of_le_one_left hr.le hθ1)) ha + have hsame : radialFitError μ hX.quadratic u p (θ * r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (T.distanceDatum μ hX.quadratic i) (sobolevColumnMap μ hX.quadratic u b) hat = + radialFitError μ hX.quadratic u p (θ * r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (T.distanceDatum μ hX.quadratic (i + m)) (sobolevColumnMap μ hX.quadratic u b) hat := by + apply radialFitError_congr + rw [hrad] + exact T.distanceDatum_pairing_later μ hX.quadratic (Nat.le_add_right i m) _ + dsimp only at hstep + rw [hsame] at hstep + exact hstep + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitUnits.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f992b162b21a1bd21767b032e357ef2c0c702d7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualDyadicFitUnits.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.ActualDyadicFitStep +import OAI.Geometry.RCD.Coordinates.DyadicFitVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # The canonical dyadic fit recurrence in scale-independent units -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The quarter-error volume regime removes every physical radius and volume +factor from the actual covector-fit step. -/ +theorem actual_dyadic_radial_fit_natural_units {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) + (m : ℕ) + (hfit : HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ m)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ distanceSourceRadius r0 i → + |(hausdorff n X).real (ball p t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) : + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left + (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; positivity : 0 ≤ r) + (pow_le_one₀ (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) ≤ 1))) + let Λ := Real.sqrt ((5 / 3 : ℝ) * (θ ^ n)⁻¹) + let D := (4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n + let coefficient := (64 / θ) * (Λ + (1 / 2 : ℝ) * θ * Real.sqrt θ) * + Real.sqrt ((n : ℝ) * radialCorrectionConstant K n epsilon A B J Cχ * D) + ∀ b : Euclidean n, + let ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; linarith : r ≤ s / 4)) + (hgrad j)) b + let hat := ae_restrict_of_ae_restrict_of_subset hsub ha + radialFitError μ hX.quadratic u p (θ * r) ht (T.distanceDatum μ hX.quadratic (i + m)) + (sobolevColumnMap μ hX.quadratic u b) hat ≤ + (1 / 2 : ℝ) * Real.sqrt θ * radialFitError μ hX.quadratic u p r hs + (T.distanceDatum μ hX.quadratic i) (sobolevColumnMap μ hX.quadratic u b) ha + + coefficient * Real.sqrt (normalizedPoissonDefect μ hX.quadratic S i) * ‖b‖ := by + dsimp only + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hθ : 0 < θ := pow_pos (by norm_num) _ + have hθ1 : θ ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hv := hquarter r hr (by dsimp only [r]; linarith) + have hw := hquarter (θ * r) (mul_pos hθ hr) + ((mul_le_of_le_one_left hr.le hθ1).trans (by dsimp only [r]; linarith)) + have homega := euclideanUnitVolume_pos n + have hratio := radial_testing_volume_ratio hs homega hv + have hV := radial_sqrt_volume_ratio hr hθ homega (measureReal_nonneg : 0 ≤ μ.real (ball p r)) hv hw + have hC := (radialCorrectionConstant_pos (K := K) (n := n) + (epsilon := epsilon) (A := A) hB hJ hCχ).le + have hQ := normalizedPoissonDefect_nonneg μ hX.quadratic S hκ i + have hstep := actual_dyadic_radial_fit_step hX hn hhessian hκ hK hB hJ hA hepsilon hCχ + p S T i hs1 u hu hgrad hf χ hvol hdouble m hfit + dsimp only at hstep + intro b + have he := hstep b + have he' := radial_covector_fit_natural_units hs hθ + (by positivity : 0 ≤ Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r)))) + hQ (mul_nonneg (Nat.cast_nonneg n) hC) + (by positivity : 0 ≤ (4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + (norm_nonneg b) hV hratio + (by simpa only [mul_assoc] using he) + exact he' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualFitCommutator.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualFitCommutator.lean new file mode 100644 index 0000000000000000000000000000000000000000..01d246820ef776bfa2fa5b8f0fa7c5709b00eecd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualFitCommutator.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedPoissonCommutator +import OAI.Geometry.RCD.Harmonic.CommutatorRepresentatives + +namespace OAI + +/-! # The actual Poisson commutator for the chosen radial fit families -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The full-mass commutator bound applies to the exact Sobolev families +selected by radial approximation, simultaneously for every covector. -/ +theorem normalized_poisson_commutator_for_fits {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + {κ B J C A Cχ epsilon r0 : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) + (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (p₁ p₂ z : X) + (S₁ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₁ r0) + (S₂ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₂ r0) + (T₁ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₁ B J C) + (T₂ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₂ B J C) + (i : ℕ) + (hroom₁ : dist z p₁ ≤ distanceSourceRadius r0 i / 4) + (hroom₂ : dist z p₂ ≤ distanceSourceRadius r0 i / 4) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball z (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf₁ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₁.replacement i) (T₁.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (hf₂ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) (T₂.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic z (distanceSourceRadius r0 i / 64) Cχ) + (hvolume : |(hausdorff n X).real (ball z (distanceSourceRadius r0 i / 64)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 64) ^ n) - 1| ≤ 1 / 4) + (G H : Euclidean n →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (hG : ∀ b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (G b) =ᵐ[ + (hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 64))] + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b)) + (hH : ∀ b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H b) =ᵐ[ + (hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 64))] + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i - T₁.replacement i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b)) : + ∀ b, let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let Ω := ball z (s / 64) + (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hX.quadratic (T₂.replacement i - T₁.replacement i) (G b) x - + localGamma μ hX.quadratic (T₂.replacement i) (H b) x - + localGamma μ hX.quadratic (T₂.replacement i - T₁.replacement i) + (sobolevColumnMap μ hX.quadratic u b) x) ^ 2 ∂μ) ≤ + poissonCommutatorConstant n A epsilon B J Cχ * s ^ 2 * ‖b‖ ^ 2 * + (normalizedPoissonDefect μ hX.quadratic S₁ i + normalizedPoissonDefect μ hX.quadratic S₂ i) := by + intro b + obtain ⟨g, h, hg, hh, he⟩ := normalized_poisson_commutator_error hX hhessian hκ hK + hB hJ hCχ hA hepsilon p₁ p₂ z S₁ S₂ T₁ T₂ i hroom₁ hroom₂ u hu hgrad hf₁ hf₂ χ hvolume b + have hi := commutator_error_transfer (hausdorff n X) hX.quadratic + (T₂.replacement i) (T₂.replacement i - T₁.replacement i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) g h (G b) (H b) + hg hh (hG b) (hH b) le_rfl + exact (mul_le_mul_of_nonneg_left hi (by positivity)).trans he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualRadialCovector.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualRadialCovector.lean new file mode 100644 index 0000000000000000000000000000000000000000..303bff38b673286f005ea853327392c8d2829ea8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualRadialCovector.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Harmonic.ActualRadialError +import OAI.Geometry.RCD.Harmonic.RadialLinearCombination + +namespace OAI + +/-! # Actual radial approximation in every constant covector -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual component corrections extend to every constant covector. +The dimension loss is fixed and the only source remains the same complete +Poisson defect; no direction-dependent error is postulated. -/ +theorem actual_distance_radial_covector_error {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) : + let s := distanceSourceRadius r0 i + let q := positiveSquaredDistance (hausdorff n X) hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + ∀ b : Euclidean n, ∃ h : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (s / 64)) h ∧ + (∫ x in ball p (s / 64), + (localGamma (hausdorff n X) hX.quadratic q + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) x - + SobolevSpace.toLp (hausdorff n X) hX.quadratic h x) ^ 2 ∂hausdorff n X) ≤ + (n : ℝ) * (radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect (hausdorff n X) hX.quadratic S i)) * ‖b‖ ^ 2 := by + dsimp only + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let q := positiveSquaredDistance μ hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + have ha := actual_distance_radial_error hX hn hhessian hκ hK hB hJ hA hepsilon hCχ + p S T i hs1 u hu hgrad hf χ hvol hdouble + dsimp only at ha + choose h hh he using ha + intro b + refine ⟨sobolevColumnMap μ hX.quadratic h b, ?_⟩ + apply radial_linear_harmonic_correction μ hX.quadratic q u h hh + · intro j + have hj := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [s]; linarith : + s / 64 ≤ s / 4)) (hgrad j) + exact (localGamma_memLp_two_of_bound μ hX.quadratic (ball p (s / 64)) q (u j) hj).sub + ((Lp.memLp (SobolevSpace.toLp μ hX.quadratic (h j))).restrict _) + · exact he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ActualRegularFlatness.lean b/lean/OAI/Geometry/RCD/Coordinates/ActualRegularFlatness.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d513d4107c31c034e3401fa3cab80240293032e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ActualRegularFlatness.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Coordinates.UniformRegularFlatnessInput +import OAI.Geometry.RCD.Coordinates.RegularLimitEuclideanNeighborhood +import OAI.Geometry.RCD.Metric.MovingCompactness +import OAI.Geometry.RCD.Metric.MovingPointedData +import OAI.Geometry.RCD.Metric.InnerIsometryApproximation +import OAI.Geometry.RCD.Metric.LowerCurvatureVolume + +namespace OAI + +/-! # Uniform pointed flatness in a neighborhood of every regular point + +Near-regular compactness and the local metric-limit construction give +Euclidean approximations at every sufficiently small nearby scale. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} + +theorem NoncollapsedRCD.actual_regular_uniform_flatness_nonpositive + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hn : 2 ≤ n) (hK : K ≤ 0) {o : X} (ho : IsRegular n o) + {θ : ℝ} (hθ : 0 < θ) : + ∃ D : ℝ, 0 < D ∧ ∀ p, dist o p ≤ D → ∀ r : ℝ, 0 < r → r ≤ D/4 → + ∃ f : X → Euclidean n, IsPointedApproximation p 0 r 2 θ f := by + classical + by_contra hnot + push Not at hnot + let d := fun k : ℕ => 1/((k:ℝ)+1) + have hd k : 0 < d k := by dsimp only [d]; positivity + have hex k := hnot (d k) (hd k) + choose p hp r hr hrbound hbad using hex + have hd0 : Tendsto d atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + have hp0 : Tendsto p atTop (𝓝 o) := by + apply tendsto_iff_dist_tendsto_zero.mpr + apply squeeze_zero (fun _ => dist_nonneg) _ hd0 + intro k + simpa only [dist_comm] using hp k + have hr0 : Tendsto r atTop (𝓝 0) := + squeeze_zero (fun k => (hr k).le) hrbound (by simpa only [zero_div] using hd0.div_const 4) + let s := fun k => 256*r k + have hs k : 0 < s k := mul_pos (by norm_num) (hr k) + have hs0 : Tendsto s atTop (𝓝 0) := by simpa only [mul_zero] using hr0.const_mul 256 + obtain ⟨φ,hφ,hcurv,Y,dY,hproper,q,hconv⟩ := hX.movingRescalingPrecompactness hn p s hs hs0 + let := dY + let := hproper + let : MeasurableSpace Y := borel Y + let : BorelSpace Y := ⟨rfl⟩ + obtain ⟨α,V,hα,hV⟩ := hconv.subsequence_data (by norm_num : (0:ℝ)<5) + let ε := fun k : ℕ => 1/((k:ℝ)+1) + have hε : Tendsto ε atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + have ht : Tendsto (fun k => φ (α k)) atTop atTop := hφ.tendsto_atTop.comp hα.tendsto_atTop + obtain ⟨f,hf,hfq,hfull⟩ := hX.regular_limit_euclidean_neighborhood hn hK ho + (fun k => p (φ (α k))) (fun k => s (φ (α k))) ε V + (hp0.comp ht) (fun k => hs _) (hs0.comp ht) hε (fun k => hcurv _) hV + have hsmall := hε.eventually (gt_mem_nhds + (lt_min (by norm_num : (0:ℝ)<1/1024) (div_pos hθ (by norm_num : (0:ℝ)<4096)))) + obtain ⟨k,hk⟩ := hsmall.exists + have he0 : 0 ≤ ε k := dist_nonneg.trans (hV k).1 + obtain ⟨w,hw⟩ := pointed_approximation_of_inner_isometry (hs _) he0 + (hk.trans_le (min_le_left _ _)) (hV k) f hf hfq hfull + have hw' : IsPointedApproximation (p (φ (α k))) 0 (r (φ (α k))) 2 (4096*ε k) w := by + change IsPointedApproximation (p (φ (α k))) 0 (s (φ (α k))/256) 2 (4096*ε k) w at hw + have he : s (φ (α k))/256 = r (φ (α k)) := by dsimp only [s]; ring + rwa [he] at hw + apply hbad (φ (α k)) w + apply hw'.mono_error + have hh := hk.trans_le (min_le_right _ _) + linarith + +theorem NoncollapsedRCD.actual_regular_uniform_flatness + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hn : 2 ≤ n) {o : X} (ho : IsRegular n o) {θ : ℝ} (hθ : 0 < θ) : + ∃ D : ℝ, 0 < D ∧ ∀ p, dist o p ≤ D → ∀ r : ℝ, 0 < r → r ≤ D/4 → + ∃ f : X → Euclidean n, IsPointedApproximation p 0 r 2 θ f := by + by_cases hK : K ≤ 0 + · exact hX.actual_regular_uniform_flatness_nonpositive hn hK ho hθ + · exact (hX.zero_of_nonneg_curvature hn (le_of_not_ge hK)).actual_regular_uniform_flatness_nonpositive + hn le_rfl ho hθ + +theorem NoncollapsedRCD.uniformRegularFlatnessInput + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hn : 2 ≤ n) : UniformRegularFlatnessInput hX := by + intro p hp θ hθ + exact hX.actual_regular_uniform_flatness hn hp hθ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AdjacentMeanComparison.lean b/lean/OAI/Geometry/RCD/Coordinates/AdjacentMeanComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc40844011400b6f344ea3552cbbdf85b836a4cc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AdjacentMeanComparison.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Coordinates.ExactNormalizationComparison +import OAI.Geometry.RCD.Metric.UniformVolumeRatio + +namespace OAI + +/-! # Adjacent-scale relative mean comparison from the published splitting input -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A fixed dimensional Bishop--Gromov ratio controls the restriction to +half radius. No interscale transformation bound is assumed. -/ +theorem normalized_adjacent_mean_comparison {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + {p : X} {r ε : ℝ} {w : X → Euclidean (m + 1)} + (hr : 0 < r) (hscale : a * (3 * (r / 2)) ≤ 1) (hε : 0 ≤ ε) + (hfirst : FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p r ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u A) w) + (hexact : IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (v : Euclidean (m + 1)) : + (1 - ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε)) * + ⟪v, sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball v⟫_ℝ ≤ + ⟪v, sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p (r / 2)) measurableSet_ball v⟫_ℝ ∧ + ⟪v, sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p (r / 2)) measurableSet_ball v⟫_ℝ ≤ + (1 + ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε)) * + ⟪v, sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball v⟫_ℝ := by + let μ := hausdorff (m + 1) X + have hratio := nearby_normalization_volume_ratio m hX ha hBG (half_pos hr) hscale + (show p ∈ ball p ((r / 2) / 4) by simpa only [mem_ball, dist_self] using (by positivity : (0 : ℝ) < (r / 2) / 4)) + have hsmall : μ.real (ball p ((r / 2) / 2)) ≤ μ.real (ball p (r / 2)) := + measureReal_mono (ball_subset_ball (by linarith)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + have hC : 0 ≤ normalizationVolumeRatio m := le_trans zero_le_one (normalizationVolumeRatio_ge_one m) + have hvol : μ.real (ball p r) ≤ normalizationVolumeRatio m * μ.real (ball p (r / 2)) := by + have htwo : 2 * (r / 2) = r := by ring + rw [htwo] at hratio + exact hratio.trans (mul_le_mul_of_nonneg_left hsmall hC) + exact exact_normalization_subball_bounds μ hX.quadratic u A hfirst hexact + (ball p (r / 2)) measurableSet_ball (ball_subset_ball (by linarith)) + (ne_of_gt (hX.fullSupport p (r / 2) (half_pos hr))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport p r hr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hC hε hvol v + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AffineFitDifference.lean b/lean/OAI/Geometry/RCD/Coordinates/AffineFitDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..7baa97e22a9d933c5959e23e82f6941ef41a6703 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AffineFitDifference.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Harmonic.AffineEvaluation + +namespace OAI + +/-! # Consecutive actual affine fits and their center values -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +/-- On a nested pair of fitting sets, the difference of the actual fits +is controlled by the two residuals, with the exact normalized volume loss. -/ +theorem normalized_affineFit_difference (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (s t : Set X) (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (hs0 : μ s ≠ 0) (ht0 : μ t ≠ 0) + (f : Lp ℝ 2 (μ.restrict s)) (c d : ℝ) (a b : Euclidean n) + (hc : affineProjection μ hQ u s hs f = affineCoordinateMap μ hQ u s hs (c, a)) + (hd : affineProjection μ hQ u t ht (localL2Restriction μ s t hts f) = + affineCoordinateMap μ hQ u t ht (d, b)) : + ‖normalizeLocalL2 μ t ht (affineCoordinateMap μ hQ u t ht (c - d, a - b))‖ ≤ + (Real.sqrt (μ.real s) / Real.sqrt (μ.real t)) * + ‖normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs f)‖ + + ‖normalizeLocalL2 μ t ht + (affineResidual μ hQ u t ht (localL2Restriction μ s t hts f))‖ := by + have heq : affineCoordinateMap μ hQ u t ht (c - d, a - b) = + affineResidual μ hQ u t ht (localL2Restriction μ s t hts f) - + localL2Restriction μ s t hts (affineResidual μ hQ u s hs f) := by + change affineCoordinateMap μ hQ u t ht ((c, a) - (d, b)) = _ + rw [map_sub, ← hd, ← localL2Restriction_affine μ hQ u s t hts hs ht c a, ← hc] + simp only [affineResidual, sub_apply, ContinuousLinearMap.id_apply, + map_sub] + abel + rw [heq, normalizeLocalL2, smul_sub] + have hn := norm_sub_le + (normalizeLocalL2 μ t ht (affineResidual μ hQ u t ht (localL2Restriction μ s t hts f))) + (normalizeLocalL2 μ t ht (localL2Restriction μ s t hts (affineResidual μ hQ u s hs f))) + have hr := normalized_localL2Restriction_le μ s t hts hs ht hs0 ht0 + (affineResidual μ hQ u s hs f) + exact hn.trans (by linarith) + +variable [BorelSpace X] [ProperSpace X] + +/-- Mean-value evaluation removes the constant term quantitatively from +consecutive least-squares fits. The coefficients need not be unique. -/ +theorem affineFit_center_difference {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (r R : ℝ) (_hr : 0 < r) (hrR : r ≤ R), -κ ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + (∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u i)) → + ContinuousOn v (ball p r) → + (∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v x i) → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun _ => (1 : ℝ)) → + let μ := hausdorff n X + let hs := ne_of_lt (hX.finiteOnBounded (ball p R) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let hsub := ball_subset_ball (α := X) (x := p) hrR + ∀ (f : Lp ℝ 2 (μ.restrict (ball p R))) (c d : ℝ) (a b : Euclidean n), + affineProjection μ hX.quadratic u (ball p R) hs f = + affineCoordinateMap μ hX.quadratic u (ball p R) hs (c, a) → + affineProjection μ hX.quadratic u (ball p r) ht + (localL2Restriction μ (ball p R) (ball p r) hsub f) = + affineCoordinateMap μ hX.quadratic u (ball p r) ht (d, b) → + |(c + ⟪v p, a⟫_ℝ) - (d + ⟪v p, b⟫_ℝ)| ≤ + C * (Real.sqrt (μ.real (ball p R)) / Real.sqrt (μ.real (ball p r))) * + ‖normalizeLocalL2 μ (ball p R) hs (affineResidual μ hX.quadratic u (ball p R) hs f)‖ + + C * ‖normalizeLocalL2 μ (ball p r) ht + (affineResidual μ hX.quadratic u (ball p r) ht + (localL2Restriction μ (ball p R) (ball p r) hsub f))‖ := by + obtain ⟨C, hC, heval⟩ := affine_evaluation_of_mean_value hX hmean hn hκ + refine ⟨C, hC, ?_⟩ + intro p r R hr hrR hcurv u v hu hv hrep η hη μ hs ht hsub f c d a b hc hd + have hb := heval p r hr hcurv u v hu hv hrep η hη (c - d) (a - b) + have hfit := normalized_affineFit_difference μ hX.quadratic u (ball p R) (ball p r) + hsub hs ht (ne_of_gt (hX.fullSupport p R (hr.trans_le hrR))) + (ne_of_gt (hX.fullSupport p r hr)) f c d a b hc hd + have hm := mul_le_mul_of_nonneg_left hfit (by linarith : 0 ≤ C) + have he : c - d + ⟪v p, a - b⟫_ℝ = (c + ⟪v p, a⟫_ℝ) - (d + ⟪v p, b⟫_ℝ) := by + rw [inner_sub_right] + ring + rw [he] at hb + exact hb.trans (by nlinarith [hm]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AffineFitPerturbation.lean b/lean/OAI/Geometry/RCD/Coordinates/AffineFitPerturbation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e32245e3fde151f5ea81b1f6d6d3bfd6b6ff880 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AffineFitPerturbation.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Harmonic.LocalL2Restriction +import OAI.Geometry.RCD.Harmonic.HomogeneousAffineImprovement + +namespace OAI + +/-! # Stability of the actual least-squares fit under harmonic correction -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem normalized_affineResidual_norm_le {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hs : μ s ≠ ∞) + (f : Lp ℝ 2 (μ.restrict s)) : + ‖normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs f)‖ ≤ + ‖normalizeLocalL2 μ s hs f‖ := by + unfold normalizeLocalL2 + rw [← map_smul] + exact affineResidual_norm_le μ hQ u s hs _ + +theorem normalized_affineResidual_perturbation {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hs : μ s ≠ ∞) + (f g : Lp ℝ 2 (μ.restrict s)) : + ‖normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs f)‖ ≤ + ‖normalizeLocalL2 μ s hs (f - g)‖ + + ‖normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs g)‖ := by + have he : affineResidual μ hQ u s hs f = + affineResidual μ hQ u s hs (f - g) + affineResidual μ hQ u s hs g := by + rw [map_sub] + abel + rw [he, normalizeLocalL2, smul_add] + exact (norm_add_le _ _).trans (add_le_add + (normalized_affineResidual_norm_le μ hQ u s hs (f - g)) le_rfl) + +theorem affineResidual_sub_affine {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : μ s ≠ ∞) (f : Lp ℝ 2 (μ.restrict s)) + (c : ℝ) (v : Euclidean n) : + affineResidual μ hQ u s hs (f - affineCoordinateMap μ hQ u s hs (c, v)) = + affineResidual μ hQ u s hs f := by + rw [map_sub] + exact sub_eq_self.mpr (affineResidual_eq_zero_of_mem μ hQ u s hs _ ⟨(c, v), rfl⟩) + +/-- Every actual outer affine projection has a Sobolev representative +which is harmonic wherever the columns and local constant are harmonic. -/ +theorem affineProjection_harmonic_representative {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hs : μ s ≠ ∞) + (hu : ∀ i, IsSobolevHarmonicOn μ hQ s (u i)) + (η : SobolevSpace μ hQ) (hη : IsSobolevHarmonicOn μ hQ s η) + (hηone : SobolevSpace.restrictLp μ hQ s η = restrictedOne μ s hs) + (f : Lp ℝ 2 (μ.restrict s)) : + ∃ (F : SobolevSpace μ hQ) (c : ℝ) (v : Euclidean n), + F = c • η + sobolevColumnMap μ hQ u v ∧ + IsSobolevHarmonicOn μ hQ s F ∧ + SobolevSpace.restrictLp μ hQ s F = affineProjection μ hQ u s hs f := by + obtain ⟨c, v, hcv⟩ := affineProjection_has_coefficients μ hQ u s hs f + refine ⟨c • η + sobolevColumnMap μ hQ u v, c, v, rfl, ?_, ?_⟩ + · exact (hη.smul μ hQ c).add μ hQ (IsSobolevHarmonicOn.linearCombination μ hQ hu v) + · rw [map_add, map_smul, hηone] + exact hcv.symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AffineFitRecurrence.lean b/lean/OAI/Geometry/RCD/Coordinates/AffineFitRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..79471527446e3b2066f46750b6b115b18a390c0f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AffineFitRecurrence.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Harmonic.PinchingEnvelope + +namespace OAI + +/-! # The squared affine-fit recurrence and its geometric envelope -/ + +open scoped BigOperators + +namespace RegularPointCoordinates + +/-- Squaring a single affine-improvement estimate costs a fixed factor, +and preserves the Poisson defect without taking its square root. -/ +theorem affine_fit_squared_step {e e' a C P : ℝ} + (he : 0 ≤ e) (he' : 0 ≤ e') (ha : 0 ≤ a) (hC : 0 ≤ C) (hP : 0 ≤ P) + (hfit : e' ≤ a * e + C * Real.sqrt P) : + e' ^ 2 ≤ 2 * a ^ 2 * e ^ 2 + 2 * C ^ 2 * P := by + have hsq := (sq_le_sq₀ he' (by positivity : 0 ≤ a * e + C * Real.sqrt P)).mpr hfit + have hroot := Real.sq_sqrt hP + have hyoung := sq_nonneg (a * e - C * Real.sqrt P) + nlinarith + +theorem forwardDefect_succ (σ η : ℝ) (P : ℕ → ℝ) (i : ℕ) : + forwardDefect σ η P (i + 1) = σ * forwardDefect σ η P i + P (i + 1) := by + have he : (∑ j ∈ Finset.range (i + 1), σ ^ (i + 1 - j) * P j) = + σ * ∑ j ∈ Finset.range (i + 1), σ ^ (i - j) * P j := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + have hj' := Finset.mem_range.mp hj + have hnat : i + 1 - j = (i - j) + 1 := by omega + rw [hnat, pow_succ] + ring + simp only [forwardDefect, Finset.sum_range_succ, + Nat.sub_self, pow_zero, one_mul, he, pow_succ] + ring + +theorem forwardDefect_propagates {σ η : ℝ} (hσ : 0 ≤ σ) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (i k : ℕ) : + σ ^ k * forwardDefect σ η P i ≤ forwardDefect σ η P (i + k) := by + induction k with + | zero => simp + | succ k ih => + have hh := mul_le_mul_of_nonneg_left ih hσ + rw [show i + (k + 1) = (i + k) + 1 by omega, forwardDefect_succ, pow_succ] + nlinarith [hP (i + k + 1)] + +/-- A stride of `m` leaves the final new source term available, even +though all intermediate source terms are discarded from the bound. -/ +theorem forwardDefect_stride {σ η : ℝ} (hσ : 0 ≤ σ) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) {m : ℕ} (hm : 0 < m) (i : ℕ) : + σ ^ m * forwardDefect σ η P i + P (i + m) ≤ + forwardDefect σ η P (i + m) := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (Nat.ne_of_gt hm) + have hh := mul_le_mul_of_nonneg_left (forwardDefect_propagates (η := η) hσ hP i k) hσ + rw [show i + (k + 1) = (i + k) + 1 by omega, forwardDefect_succ, pow_succ] + nlinarith + +/-- The same comparison works simultaneously in all residue classes of +the affine-improvement stride. This is the discrete step used before +the two-sided smoothing in radial pinching. -/ +theorem affine_fit_le_forwardDefect {σ η : ℝ} (hσ : 0 ≤ σ) + {P F : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) {m : ℕ} (hm : 0 < m) + (hinitial : ∀ i < m, F i ≤ η * σ ^ i) + (hstep : ∀ i, F (i + m) ≤ σ ^ m * F i + P (i + m)) : + ∀ i, F i ≤ forwardDefect σ η P i := by + intro i + induction i using Nat.strong_induction_on with + | h i ih => + by_cases hi : i < m + · exact (hinitial i hi).trans (le_add_of_nonneg_right + (Finset.sum_nonneg fun j _ => mul_nonneg (pow_nonneg hσ _) (hP j))) + · have hj : i - m < i := by omega + have he : i - m + m = i := by omega + have h := (hstep (i - m)).trans + (add_le_add (mul_le_mul_of_nonneg_left (ih (i - m) hj) (pow_nonneg hσ m)) le_rfl) + have hg := forwardDefect_stride (η := η) hσ hP hm (i - m) + rw [he] at h hg + exact h.trans hg + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AffineFitSmoothing.lean b/lean/OAI/Geometry/RCD/Coordinates/AffineFitSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbe8fba7c27fa554ca58b5ae4b74515b0540ab81 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AffineFitSmoothing.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Coordinates.AffineFitRecurrence + +namespace OAI + +/-! # Smoothing the actual past-source affine recurrence + +The radial correction at scale i uses the defect P i, whereas its improved +fit is at scale i+m. The strict contraction margin absorbs this lag. +-/ + +namespace RegularPointCoordinates + +theorem affine_fit_past_source_envelope {σ η A D lam : ℝ} + (hσ : 0 ≤ σ) (hη : 0 ≤ η) (hA : 0 ≤ A) (hD : 0 ≤ D) (hlam : 0 ≤ lam) + {P F : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) {m : ℕ} (hm : 0 < m) + (hmargin : lam * A + D ≤ σ ^ m * A) + (hinitial : ∀ i < m, F i ≤ A * (η * σ ^ i)) + (hstep : ∀ i, F (i + m) ≤ lam * F i + D * P i) : + ∀ i, F i ≤ A * forwardDefect σ η P i := by + intro i + induction i using Nat.strong_induction_on with + | h i ih => + by_cases hi : i < m + · exact (hinitial i hi).trans (mul_le_mul_of_nonneg_left + (le_add_of_nonneg_right (Finset.sum_nonneg fun j _ => + mul_nonneg (pow_nonneg hσ _) (hP j))) hA) + · let j := i - m + have hj : j < i := by dsimp only [j]; omega + have hij : j + m = i := by dsimp only [j]; omega + have henv : 0 ≤ forwardDefect σ η P j := forwardDefect_nonneg hσ hη hP j + have hsrc := le_forwardDefect hσ hη hP j + have hprop := forwardDefect_propagates (η := η) hσ hP j m + calc + F i = F (j + m) := by rw [hij] + _ ≤ lam * F j + D * P j := hstep j + _ ≤ lam * (A * forwardDefect σ η P j) + D * forwardDefect σ η P j := + add_le_add (mul_le_mul_of_nonneg_left (ih j hj) hlam) + (mul_le_mul_of_nonneg_left hsrc hD) + _ = (lam * A + D) * forwardDefect σ η P j := by ring + _ ≤ (σ ^ m * A) * forwardDefect σ η P j := + mul_le_mul_of_nonneg_right hmargin henv + _ = A * (σ ^ m * forwardDefect σ η P j) := by ring + _ ≤ A * forwardDefect σ η P (j + m) := mul_le_mul_of_nonneg_left hprop hA + _ = _ := by rw [hij] + +/-- Apply the lagged estimate to the square of a normalized scalar fit. +The only source is the original nonnegative Poisson-defect sequence. -/ +theorem squared_fit_le_forwardDefect {σ η A a C : ℝ} + (hσ : 0 ≤ σ) (hη : 0 ≤ η) (hA : 0 ≤ A) (ha : 0 ≤ a) (hC : 0 ≤ C) + {P e : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (he : ∀ i, 0 ≤ e i) + {m : ℕ} (hm : 0 < m) + (hmargin : (2 * a ^ 2) * A + 2 * C ^ 2 ≤ σ ^ m * A) + (hinitial : ∀ i < m, (e i) ^ 2 ≤ A * (η * σ ^ i)) + (hstep : ∀ i, e (i + m) ≤ a * e i + C * Real.sqrt (P i)) : + ∀ i, (e i) ^ 2 ≤ A * forwardDefect σ η P i := by + apply affine_fit_past_source_envelope hσ hη hA (by positivity) (by positivity) + hP hm hmargin hinitial + intro i + exact affine_fit_squared_step (he i) (he (i + m)) ha hC (hP i) (hstep i) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AllScaleCoordinateDistance.lean b/lean/OAI/Geometry/RCD/Coordinates/AllScaleCoordinateDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..71a48081a0093947ee4845c78d5e83be49a6db9b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AllScaleCoordinateDistance.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedHausdorffImage + +namespace OAI + +/-! # From all smaller coordinate approximations to distance and image bounds -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] {n : ℕ} + +theorem all_scale_coordinate_distance {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/4) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/2) η (fun z => r⁻¹ • (u z-u x))) : + ∀ x ∈ U, ∀ y ∈ U, + (1-4*η)*dist x y ≤ dist (u x) (u y) ∧ + dist (u x) (u y) ≤ (1+4*η)*dist x y := by + intro x hx y hy + by_cases hxy : x=y + · subst y + simp + have hd : 0 < dist x y := dist_pos.mpr hxy + let r := 4*dist x y + have hr : 0 < r := by dsimp only [r]; positivity + have hrR : r < R := by dsimp only [r]; linarith [hsmall x hx y hy] + have hs := happ x hx r hr hrR + have hh := hs.2.1 x y (by simp only [dist_self]; positivity) + (by rw [dist_comm]; dsimp only [r]; nlinarith) + have he : dist (r⁻¹ • (u x-u x)) (r⁻¹ • (u y-u x)) = r⁻¹*dist (u x) (u y) := by + rw [dist_smul₀,Real.norm_of_nonneg (inv_pos.mpr hr).le,dist_sub_right] + rw [he] at hh + have halg : r*(r⁻¹*dist (u x) (u y)-dist x y/r) = dist (u x) (u y)-dist x y := by + field_simp + have hscaled : |dist (u x) (u y)-dist x y| ≤ r*η := by + calc + _ = |r*(r⁻¹*dist (u x) (u y)-dist x y/r)| := by rw [halg] + _ = r*|r⁻¹*dist (u x) (u y)-dist x y/r| := by rw [abs_mul,abs_of_pos hr] + _ ≤ _ := mul_le_mul_of_nonneg_left hh hr.le + have hab := abs_le.mp hscaled + dsimp only [r] at hab + constructor <;> nlinarith + +theorem all_scale_coordinate_lipschitz {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hη : 0 ≤ η) (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/4) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/2) η (fun z => r⁻¹ • (u z-u x))) : + LipschitzOnWith ⟨1+4*η,by positivity⟩ u U := + LipschitzOnWith.of_dist_le_mul fun x hx y hy => + (all_scale_coordinate_distance hsmall happ x hx y hy).2 + +theorem all_scale_coordinate_image_bound [MeasurableSpace X] [BorelSpace X] + {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hη : 0 ≤ η) (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/4) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/2) η (fun z => r⁻¹ • (u z-u x))) + (hfin : hausdorff n X U ≠ ⊤) : + (hausdorff n (Euclidean n)).real (u '' U) ≤ (1+4*η)^n*(hausdorff n X).real U := + normalized_hausdorff_real_image_le (all_scale_coordinate_lipschitz hη hsmall happ) hfin + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/AnnularSquareLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/AnnularSquareLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee4483f15735748af4544a1a33a6869ab9ff6b79 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/AnnularSquareLimit.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Coordinates.OuterNormalizedSquareLimit + +namespace OAI + +/-! # Annular value moments of the same actual Sobolev sequence -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.outer_normalized_annular_square_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S a b τ : ℝ} (hS : 0 ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (b*r k) \ ball (p k) (a*r k), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) x)^2 ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹*∫ z in ball 0 b \ ball 0 a, (g z)^2)) := by + have hua : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p k) (a*r k)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) x-g (V k x)|≤η := by + intro η hη + exact (hu η hη).mono fun k hk => ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (mul_le_mul_of_nonneg_right hab.le (hr k).le)) hk + have hi := hX.outer_normalized_square_limit hS ha (hab.trans hbτ) hτS p r ε V hr hV hε u g hg hua + have ho := hX.outer_normalized_square_limit hS (ha.trans hab) hbτ hτS p r ε V hr hV hε u g hg hu + have ht := ho.sub hi + have hgb : IntegrableOn (fun z => (g z)^2) (ball 0 b) volume := + ((hg.continuousOn.pow 2).integrableOn_compact (isCompact_closedBall (0:Euclidean n) τ)).mono_set + ((ball_subset_ball hbτ.le).trans ball_subset_closedBall) + have he : (∫ z in ball 0 b \ ball 0 a, (g z)^2)= + (∫ z in ball 0 b, (g z)^2)-(∫ z in ball 0 a, (g z)^2) := + setIntegral_sdiff measurableSet_ball hgb (ball_subset_ball hab.le) + rw [he,mul_sub] + convert ht using 1 + funext k + rw [setIntegral_sdiff measurableSet_ball (Lp.memLp + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k))).integrable_sq.restrict + (ball_subset_ball (mul_le_mul_of_nonneg_right hab.le (hr k).le)),mul_sub] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BilinearDiagonalBound.lean b/lean/OAI/Geometry/RCD/Coordinates/BilinearDiagonalBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..29f0f211b6fef3b1470c8e3ffd65da8ba7cbbfd0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BilinearDiagonalBound.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Sobolev.BochnerQuadraticBound + +namespace OAI + +/-! # A sharp mixed bound from diagonal bounds and a positive Gram form -/ + +noncomputable section +namespace RegularPointCoordinates + +variable {m : ℕ} + +/-- Diagonal domination of a symmetric form by a positive Gram form +controls its mixed entries, including when the Gram form is degenerate. -/ +theorem bilinear_mixed_bound_of_diagonal + (P H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) + (hP : ∀ a b, P a b=P b a) (hpos : ∀ a, 0≤P a a) + (hH : ∀ a b, H a b=H b a) (C : ℝ) (hC : 0≤C) + (hdiag : ∀ a, |H a a|≤C*P a a) (a b : Euclidean m) : + (H a b)^2≤C^2*P a a*P b b := by + let Q := C • P+H + have hQ (x : Euclidean m) : 0≤Q x x := by + change 0≤C*P x x+H x x + have hx := (abs_le.mp (hdiag x)).1 + linarith only [hx] + have hQsym (x y : Euclidean m) : Q x y=Q y x := by + change C*P x y+H x y=C*P y x+H y x + rw [hP,hH] + have hzero (x y : Euclidean m) (hx : P x x=0) : H x y=0 := by + have hp := finite_positive_bilinear_cauchySchwarz P hP hpos x y + rw [hx,zero_mul] at hp + have hxy : P x y=0 := by nlinarith only [hp,sq_nonneg (P x y)] + have hxx : H x x=0 := by + have hh := hdiag x + rw [hx,mul_zero,abs_le] at hh + linarith only [hh.1,hh.2] + have hh := finite_positive_bilinear_cauchySchwarz Q hQsym hQ x y + change (C*P x y+H x y)^2≤(C*P x x+H x x)*(C*P y y+H y y) at hh + rw [hxy,hx,hxx] at hh + nlinarith only [hh,sq_nonneg (H x y)] + by_cases ha : P a a=0 + · rw [hzero a b ha,ha] + simp + by_cases hb : P b b=0 + · rw [hH a b,hzero b a hb,hb] + simp + have ha0 : 0

nlinarith only [hplus.1,hplus.2,hminus.1,hminus.2] + have habs : |A*B*H a b|≤C*P a a*P b b := abs_le.mpr hbounds + have hright : 0≤C*P a a*P b b := mul_nonneg (mul_nonneg hC (hpos a)) (hpos b) + have hsq := (sq_le_sq₀ (abs_nonneg _) hright).mpr habs + rw [sq_abs] at hsq + have heq₁ : (A*B*H a b)^2=(P a a*P b b)*(H a b)^2 := by + rw [mul_pow,mul_pow,hA,hB] + ring + have heq₂ : (C*P a a*P b b)^2=(P a a*P b b)*(C^2*P a a*P b b) := by ring + rw [heq₁,heq₂] at hsq + exact (mul_le_mul_iff_right₀ (mul_pos ha0 hb0)).mp hsq + +/-- The square form of the diagonal estimate gives the same sharp mixed +estimate, with no division by the density or by a Gram eigenvalue. -/ +theorem bilinear_mixed_sq_bound_of_diagonal + (P H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) + (hP : ∀ a b, P a b=P b a) (hpos : ∀ a, 0≤P a a) + (hH : ∀ a b, H a b=H b a) (B : ℝ) (hB : 0≤B) + (hdiag : ∀ a, (H a a)^2≤B*(P a a)^2) (a b : Euclidean m) : + (H a b)^2≤B*P a a*P b b := by + have hroot : (Real.sqrt B)^2=B := Real.sq_sqrt hB + have hbound (x : Euclidean m) : |H x x|≤Real.sqrt B*P x x := by + apply (sq_le_sq₀ (abs_nonneg _) (mul_nonneg (Real.sqrt_nonneg B) (hpos x))).mp + rw [sq_abs,mul_pow,hroot] + exact hdiag x + simpa only [hroot] using bilinear_mixed_bound_of_diagonal P H hP hpos hH + (Real.sqrt B) (Real.sqrt_nonneg B) hbound a b + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BilinearHeatEnvelope.lean b/lean/OAI/Geometry/RCD/Coordinates/BilinearHeatEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a2147382b37f4a53db6b087c1bf8bf5f9717d18 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BilinearHeatEnvelope.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Heat.SlowHeatGrowth +import OAI.Geometry.RCD.Coordinates.SymmetricDomination + +namespace OAI + +/-! # From a scalar source envelope to the bilinear heat comparison -/ + +open scoped BigOperators InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +theorem geometric_causal_sum_succ (f : ℕ → ℝ) (β : ℝ) (i : ℕ) : + (∑ j ∈ Finset.range (i + 1 + 1), β ^ (i + 1 - j) * f j) = + β * (∑ j ∈ Finset.range (i + 1), β ^ (i - j) * f j) + f (i + 1) := by + rw [Finset.sum_range_succ, Nat.sub_self, pow_zero, one_mul, Finset.mul_sum] + congr 1 + apply Finset.sum_congr rfl + intro j hj + have hji : j ≤ i := by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hj + rw [show i + 1 - j = (i - j) + 1 by omega, pow_succ] + ring + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The actual geometric source envelope is bounded by the current heat +metric under slow growth and small mass. Its finite background is explicit. -/ +theorem heat_envelope_le_current (Q N F : ℕ → E →L[ℝ] E) + (hQ : ∀ i, (Q i).IsPositive) {b T ε : ℝ} (hb : 0 ≤ b) (hT : 0 ≤ T) (hε : 0 ≤ ε) + (hstep : ∀ i v, ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ) + (hbase : ∀ v, ‖v‖ ^ 2 ≤ T * ⟪v, Q 0 v⟫_ℝ) + (hsmall : ∀ i v, ⟪v, N i v⟫_ℝ ≤ ε * ⟪v, Q i v⟫_ℝ) + (henv : ∀ i v, ⟪v, F i v⟫_ℝ ≤ b * (3 / 4 : ℝ) ^ i * ‖v‖ ^ 2 + + ∑ j ∈ Finset.range (i + 1), (3 / 4 : ℝ) ^ (i - j) * ⟪v, N j v⟫_ℝ) + (i : ℕ) (v : E) : + ⟪v, F i v⟫_ℝ ≤ (b * T + 8 * ε) * ⟪v, Q i v⟫_ℝ := by + have hmass : ∀ i, (∑ j ∈ Finset.range (i + 1), + (3 / 4 : ℝ) ^ (i - j) * ⟪v, N j v⟫_ℝ) ≤ 8 * ε * ⟪v, Q i v⟫_ℝ := by + intro k + induction k with + | zero => + simp only [Nat.zero_add, Finset.sum_range_one, Nat.sub_self, pow_zero, one_mul] + have hn := hsmall 0 v + have hp := (hQ 0).inner_nonneg_right v + nlinarith only [hn, mul_nonneg hε hp] + | succ k ih => + rw [geometric_causal_sum_succ] + have hm := mul_le_mul_of_nonneg_left ih (by norm_num : (0 : ℝ) ≤ 3 / 4) + have ht := mul_le_mul_of_nonneg_left (hstep k v) (by positivity : 0 ≤ (3 / 4 : ℝ) * (8 * ε)) + have hn := hsmall (k + 1) v + have hp := (hQ (k + 1)).inner_nonneg_right v + nlinarith only [hm, ht, hn, mul_nonneg hε hp] + have hg := geometric_form_growth Q (by norm_num : (0 : ℝ) ≤ 9 / 8) hstep (Nat.zero_le i) v + simp only [Nat.sub_zero] at hg + have hinit := mul_le_mul_of_nonneg_left ((hbase v).trans (mul_le_mul_of_nonneg_left hg hT)) + (by positivity : 0 ≤ b * (3 / 4 : ℝ) ^ i) + have hpow : (3 / 4 : ℝ) ^ i * (9 / 8 : ℝ) ^ i ≤ 1 := by + rw [← mul_pow] + exact pow_le_one₀ (by norm_num) (by norm_num) + have hpow' := mul_le_mul_of_nonneg_left hpow + (mul_nonneg (mul_nonneg hb hT) ((hQ i).inner_nonneg_right v)) + have hinitial : b * (3 / 4 : ℝ) ^ i * ‖v‖ ^ 2 ≤ b * T * ⟪v, Q i v⟫_ℝ := by + nlinarith only [hinit, hpow'] + nlinarith only [henv i v, hmass i, hinitial] + +/-- Once the signed scalar source estimate is proved, polarization gives +exactly the asymmetric bilinear estimate required by the coordinate argument. -/ +theorem bilinear_heat_comparison_of_envelope (Q F D : E →L[ℝ] E) + (hF : F.IsPositive) (hD : D.IsSymmetric) {C B : ℝ} + (hsource : ∀ v, |⟪v, D v⟫_ℝ| ≤ C * ⟪v, F v⟫_ℝ) + (hcurrent : ∀ v, ⟪v, F v⟫_ℝ ≤ B * ⟪v, Q v⟫_ℝ) (v w : E) : + ⟪v, D w⟫_ℝ ^ 2 ≤ (C ^ 2 * B) * ⟪v, Q v⟫_ℝ * ⟪w, F w⟫_ℝ := by + have hd : ∀ u, |⟪u, D u⟫_ℝ| ≤ ⟪u, (C • F) u⟫_ℝ := by + intro u + simpa only [smul_apply, inner_smul_right] using hsource u + have h := symmetric_domination_cauchy_schwarz D (C • F) hD hd v w + simp only [smul_apply, inner_smul_right] at h + have hs := mul_le_mul_of_nonneg_right (hcurrent v) + (mul_nonneg (sq_nonneg C) (hF.inner_nonneg_right w)) + nlinarith only [h, hs] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BilinearIntervalAverage.lean b/lean/OAI/Geometry/RCD/Coordinates/BilinearIntervalAverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..246de4c1edb4bdda669557bbc92b060cae0c5173 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BilinearIntervalAverage.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Coordinates.IntervalBilinearEnergy +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap + +namespace OAI + +/-! # Weighted quadratic energy of an actual time average + +Positivity of the bilinear form gives Jensen's inequality directly on the +finite interval used to smooth the Sobolev time family. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem positive_bilinear_interval_average + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + (P : E →L[ℝ] E →L[ℝ] ℝ) (hpos : ∀ x, 0 ≤ P x x) + (hsymm : ∀ x y, P x y = P y x) + {a b : ℝ} (hab : a < b) (u : ℝ → E) (hu : IntegrableOn u (Icc a b)) + (hE : IntegrableOn (fun t => P (u t) (u t)) (Icc a b)) : + let m := (b-a)⁻¹ • ∫ t in Icc a b, u t + P m m ≤ (b-a)⁻¹ * ∫ t in Icc a b, P (u t) (u t) := by + intro m + have hmass : volume.real (Icc a b) = b-a := by + rw [Real.volume_real_Icc_of_le hab.le] + have hmean : (b-a) • m = ∫ t in Icc a b, u t := by + dsimp only [m] + rw [smul_smul,mul_inv_cancel₀ (sub_pos.mpr hab).ne',one_smul] + have hpair : (∫ t in Icc a b, P m (u t)) = (b-a)*P m m := by + rw [(P m).integral_comp_comm hu,← hmean,map_smul,smul_eq_mul] + have hconst : (∫ _ in Icc a b, P m m) = (b-a)*P m m := by + rw [setIntegral_const,hmass,smul_eq_mul] + have hmix : IntegrableOn (fun t => P m (u t)) (Icc a b) := + (P m).integrable_comp hu + have hle : (∫ t in Icc a b, 2*P m (u t)-P m m) ≤ + ∫ t in Icc a b, P (u t) (u t) := by + apply integral_mono_ae ((hmix.const_mul 2).sub (integrableOn_const + (isCompact_Icc.measure_lt_top.ne))) hE + exact Eventually.of_forall fun t => by + change 2*P m (u t)-P m m ≤ P (u t) (u t) + have hh := hpos (u t-m) + simp only [map_sub,sub_apply] at hh + rw [hsymm (u t) m] at hh + linarith + have he : (∫ t in Icc a b, 2*P m (u t)-P m m) = (b-a)*P m m := by + rw [integral_sub (hmix.const_mul 2) (integrableOn_const (isCompact_Icc.measure_lt_top.ne)), + integral_const_mul,hpair,hconst] + ring + rw [he] at hle + have hh := mul_le_mul_of_nonneg_left hle (inv_nonneg.mpr (sub_pos.mpr hab).le) + simpa only [← mul_assoc,inv_mul_cancel₀ (sub_pos.mpr hab).ne',one_mul] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BochnerFrameCompletion.lean b/lean/OAI/Geometry/RCD/Coordinates/BochnerFrameCompletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..e125b4b5c67277c3d5e835b07318b672ef363964 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BochnerFrameCompletion.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Sobolev.BochnerSquareSaturation +import OAI.Geometry.RCD.Sobolev.FiniteDimensionalBochnerAE + +namespace OAI + +/-! # Exact frame completion from the scalar dimensional Bochner inequality -/ + +open Finset Set Filter MeasureTheory TopologicalSpace +noncomputable section +namespace RegularPointCoordinates + +theorem ae_finite_bochner_bound {X : Type*} [MeasurableSpace X] {m : ℕ} + (μ : Measure X) (B : X → Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) + (D : X → Euclidean m →ₗ[ℝ] ℝ) (N : ℝ) + (h : ∀ a, ∀ᵐ x ∂μ, (D x a)^2≤N*B x a a) : + ∀ᵐ x ∂μ, ∀ a, (D x a)^2≤N*B x a a := by + obtain ⟨S,hS,hdense⟩ := exists_countable_dense (Euclidean m) + let : Countable S := hS.to_subtype + filter_upwards [MeasureTheory.ae_all_iff.mpr (fun a : S => h a)] with x hx + have hc : IsClosed {a : Euclidean m | (D x a)^2≤N*B x a a} := + isClosed_le ((D x).toContinuousLinearMap.continuous.pow 2) + (continuous_const.mul (bilinear_diagonal_continuous (B x))) + have hall := closure_minimal (fun a ha => hx ⟨a,ha⟩) hc + rw [hdense.closure_eq] at hall + exact fun a => hall (Set.mem_univ a) + +theorem dimensional_cross_equality {N r s : ℝ} (hN : 0 rw [Finset.sum_comm] + simp only [q,map_smul,map_sum,LinearMap.smul_apply,LinearMap.sum_apply,smul_eq_mul,hBz, + ← mul_sum] + ring + have hBv : B v v=r^2 := by simp [v,hBw]; ring + have hqv : B q v=∑ i, (a i)^2 := by + simp only [q,v,map_smul,map_sum,LinearMap.smul_apply,LinearMap.sum_apply,smul_eq_mul, + hcross,← mul_sum] + ring + have hvq : B v q=∑ i, (a i)^2 := (hsym v q).trans hqv + apply dimensional_cross_abs_defect (N := (n:ℝ)) (by exact_mod_cast hn) + hD hD1 htrace hsquare + intro t + have hh := hBE (q+t • v) + simp only [map_add,map_smul,LinearMap.add_apply,LinearMap.smul_apply,smul_eq_mul, + hLq,hLv,hBq,hBv,hqv,hvq] at hh + convert hh using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedFrameBarrier.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedFrameBarrier.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef7466a2f81f56c37961c5ab7eb82ddf22620e4e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedFrameBarrier.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Harmonic.BoundedTransversePotentials +import OAI.Geometry.RCD.Harmonic.BoundedTransverseFormula +import OAI.Geometry.RCD.Coordinates.TransverseCoordinateDefect +import OAI.Geometry.RCD.Harmonic.TransverseIntegralBound + +namespace OAI + +/-! # The quantitative barrier built from the actual bounded harmonic frame -/ + +open Set Filter MeasureTheory Metric +open scoped InnerProductSpace NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem bounded_frame_transverse_barrier {n : ℕ} + (u : Fin n → SobolevSpace μ Q) (A : Fin n → ℝ≥0) + (hA : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (u i) x|≤A i) + {Ω : Set X} (hΩ : IsOpen Ω) (hfin : μ Ω≠∞) + (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (hh : ∀ i, IsSobolevHarmonicOn μ Q Ω (u i)) + (a : Euclidean n) (ha : ‖a‖=1) {M c : ℝ} (hM : 0≤M) (hc : 0≤c) + (hvM : ∀ x∈Ω, ‖v x‖≤M) (δ : ℝ) + (η : SobolevSpace μ Q) + (hηb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q η x|≤(1:ℝ≥0)) + (hη : SobolevSpace.toLp μ Q η =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) + (χsob : SobolevSpace μ Q) {χ : X → ℝ} {L : ℝ≥0} + (hχ : LipschitzWith L χ) (hχc : HasCompactSupport χ) + (hχb : ∀ x, |χ x|≤(1:ℝ≥0)) (hχ0 : ∀ x, 0≤χ x) + (hχs : tsupport χ⊆Ω) (hχrep : SobolevSpace.toLp μ Q χsob =ᵐ[μ] χ) + (hplateau : ∀ x∈Ω, -δ<⟪v x,a⟫_ℝ → ‖v x‖^2-⟪v x,a⟫_ℝ^2 if -δ<⟪v x,a⟫_ℝ then max (c-(‖v x‖^2-⟪v x,a⟫_ℝ^2)) 0 else 0) Ω μ ∧ + (∫ x in Ω, (if -δ<⟪v x,a⟫_ℝ then max (c-(‖v x‖^2-⟪v x,a⟫_ℝ^2)) 0 else 0) ∂μ) ≤ + (c+(M+|δ|)*2*((n:ℝ)+1)*M)*∫ x in Ω, gramDefect μ Q u x ∂μ := by + let W x := ⟪v x,a⟫_ℝ + let S x := ‖v x‖^2-(W x)^2 + obtain ⟨w,s,B,D,hwb,hsb,hw,hs,hwh,hwdef,hsdef⟩ := + bounded_transverse_potentials μ Q u A hA Ω v hu hh a + obtain ⟨f,hf,hfw⟩ := exists_bounded_transverse_formula μ Q w s η Ω W S B D 1 + hwb hsb hηb hw hs hη δ c + have hww : ∀ᵐ x ∂μ.restrict Ω, |localGamma μ Q w w x-1|≤gramDefect μ Q u x := by + simpa only [hwdef,ha,one_pow,mul_one] using + ae_restrict_of_ae (localGamma_column_defect μ Q u a) + have hsw : ∀ᵐ x ∂μ.restrict Ω, + |localGamma μ Q s w x|≤2*((n:ℝ)+1)*‖v x‖*gramDefect μ Q u x := by + simpa only [hsdef,hwdef] using localGamma_transverse_defect μ Q u A hA Ω v hu a ha B + (by simpa only [hwdef] using hwb) + let C := c+(M+|δ|)*2*((n:ℝ)+1)*M + have hC : 0≤C := by dsimp [C]; positivity + have hEI : IntegrableOn (fun x => C*gramDefect μ Q u x) Ω μ := + (gramDefect_integrableOn μ Q u hfin).const_mul C + have hE0 (x : X) : 0≤C*gramDefect μ Q u x := mul_nonneg hC (gramDefect_nonneg μ Q u x) + have herror : ∀ᵐ x ∂μ.restrict Ω, + |localGamma μ Q f w x-(if -δ if -δ if -δ C*gramDefect μ Q u x) + hEI (Eventually.of_forall hE0) herror) + refine ⟨hb.1,?_⟩ + have hi := hb.2 + rw [integral_const_mul] at hi + exact hi + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedHeatLogRegular.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedHeatLogRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..c6ea111b7661296f12cb39d85e0cbf43b4893c24 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedHeatLogRegular.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Heat.BoundedLocalLogarithm +import OAI.Geometry.RCD.Heat.BoundedHeatMixedGramBounds +import OAI.Geometry.RCD.Sobolev.WeakLaplacianDomain + +namespace OAI + +/-! # Regular bounded extensions of a positive heat logarithm -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [(hausdorff n X).Regular] [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] (hn : 2≤n) (p : X) + +include hn p in +theorem bounded_heat_log_regular (f : Lp ℝ 2 (hausdorff n X)) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) {t : ℝ} (ht : 0 Real.log + (kernelHeat (hausdorff n X) hX.quadratic + (hX.canonicalHeatKernel_isContinuousHeatKernel hn p) t f x)) := by + let m := hausdorff n X + let Q := hX.quadratic + let hk := hX.canonicalHeatKernel_isContinuousHeatKernel hn p + let u := heatSobolev m Q t ht f + have hrep : SobolevSpace.toLp m Q u =ᵐ[m] kernelHeat m Q hk t f := by + simpa only [u,heatSobolev_toLp] using (kernelHeat_represents_L2 m Q hk ht f).symm + obtain ⟨hLip,hBound⟩ := hX.kernelHeat_bounded_regularity hn p hk f A hf t ht + obtain ⟨a,b,ha,hab,hval⟩ := hX.bounded_heat_positive_range hn p f A hf ht hΩ hp + have hval' : ∀ᵐ x ∂m.restrict Ω, kernelHeat m Q hk t f x∈Icc a b := by + filter_upwards [hval,ae_restrict_of_ae hrep] with x hx he + rwa [← he] + have hd : IsWeakLaplacian m Q u (-heatGeneratorAt m Q t f) := by + simpa only [u,heatGeneratorAt_of_pos m Q t ht] using heatSobolev_weak_laplacian m Q t ht f + exact bounded_local_logarithm m Q u (-heatGeneratorAt m Q t f) hd + (kernelHeat m Q hk t f) hLip hBound hrep ha hab hval' + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedLocalCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedLocalCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..4bc7b39150f96c1cf5c09f145ab47ad31b2c6bb3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedLocalCoordinates.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Metric.InwardLocality +import OAI.Geometry.RCD.Harmonic.LocalConstantHarmonic + +namespace OAI + +/-! # Bounded Sobolev representatives preserving local harmonic coordinates -/ + +open Set MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Clipping only the global extension leaves a locally bounded coordinate unchanged. -/ +def boundedLocalVersion (f : SobolevSpace μ hQ) (C : ℝ≥0) : SobolevSpace μ hQ := + SobolevSpace.comp μ hQ (clipReal_lipschitz C) (clipReal_zero C) f + +theorem boundedLocalVersion_bound (f : SobolevSpace μ hQ) (C : ℝ≥0) : + ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (boundedLocalVersion μ hQ f C) x| ≤ C := by + filter_upwards [SobolevSpace.comp_coe μ hQ (clipReal_lipschitz C) (clipReal_zero C) f] + with x hx + change |SobolevSpace.toLp μ hQ + (SobolevSpace.comp μ hQ (clipReal_lipschitz C) (clipReal_zero C) f) x| ≤ C + rw [hx] + exact clipReal_abs_le C _ + +theorem boundedLocalVersion_eq {Ω : Set X} (f : SobolevSpace μ hQ) (C : ℝ≥0) + (hf : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ f x| ≤ C) : + SobolevSpace.toLp μ hQ (boundedLocalVersion μ hQ f C) =ᵐ[μ.restrict Ω] + SobolevSpace.toLp μ hQ f := by + filter_upwards [hf, ae_restrict_of_ae + (SobolevSpace.comp_coe μ hQ (clipReal_lipschitz C) (clipReal_zero C) f)] with x hb hx + exact hx.trans (clipReal_eq_self C hb) + +variable [BorelSpace X] [ProperSpace X] + +/-- Harmonicity depends only on the local almost-everywhere representative. -/ +theorem IsSobolevHarmonicOn.congr_ae {Ω : Set X} (hΩ : MeasurableSet Ω) + {f g : SobolevSpace μ hQ} (hf : IsSobolevHarmonicOn μ hQ Ω f) + (heq : SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ f) : + IsSobolevHarmonicOn μ hQ Ω g := by + have hd : SobolevSpace.toLp μ hQ (g - f) =ᵐ[μ.restrict Ω] fun _ => (0 : ℝ) := by + filter_upwards [heq, ae_restrict_of_ae + (Lp.coeFn_sub (SobolevSpace.toLp μ hQ g) (SobolevSpace.toLp μ hQ f))] with x hx hs + change (SobolevSpace.toLp μ hQ g - SobolevSpace.toLp μ hQ f) x = 0 + simp only [hs, Pi.sub_apply, hx, sub_self] + have hh := IsSobolevHarmonicOn.add μ hQ + (isSobolevHarmonicOn_of_local_constant μ hQ Ω hΩ (g - f) 0 hd) hf + simpa only [sub_add_cancel] using hh + +theorem boundedLocalVersion_harmonic {Ω : Set X} (hΩ : MeasurableSet Ω) + (f : SobolevSpace μ hQ) (C : ℝ≥0) + (hf : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ f x| ≤ C) + (hh : IsSobolevHarmonicOn μ hQ Ω f) : + IsSobolevHarmonicOn μ hQ Ω (boundedLocalVersion μ hQ f C) := + hh.congr_ae μ hQ hΩ (boundedLocalVersion_eq μ hQ f C hf) + +theorem boundedLocalVersion_gamma {Ω : Set X} + (f a : SobolevSpace μ hQ) (C : ℝ≥0) + (hf : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ f x| ≤ C) : + localGamma μ hQ (boundedLocalVersion μ hQ f C) a =ᵐ[μ.restrict Ω] + localGamma μ hQ f a := by + filter_upwards [boundedLocalVersion_eq μ hQ f C hf, + ae_restrict_of_ae (localGamma_eq_on_eq μ hQ (boundedLocalVersion μ hQ f C) f a)] + with x hx hg + exact hg hx + +/-- Replacing both slots preserves the actual local Gram matrix. -/ +theorem boundedLocalVersion_pair {Ω : Set X} (f g : SobolevSpace μ hQ) (C D : ℝ≥0) + (hf : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ f x| ≤ C) + (hg : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ g x| ≤ D) : + localGamma μ hQ (boundedLocalVersion μ hQ f C) (boundedLocalVersion μ hQ g D) + =ᵐ[μ.restrict Ω] localGamma μ hQ f g := by + filter_upwards [boundedLocalVersion_gamma μ hQ f (boundedLocalVersion μ hQ g D) C hf, + ae_restrict_of_ae (localGamma_comm μ hQ f (boundedLocalVersion μ hQ g D)), + boundedLocalVersion_gamma μ hQ g f D hg, + ae_restrict_of_ae (localGamma_comm μ hQ g f)] with x h₁ h₂ h₃ h₄ + exact h₁.trans (h₂.trans (h₃.trans h₄)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularBochnerMass.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularBochnerMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b91cef84c5398c9c747df58f37402f32bc93669 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularBochnerMass.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Sobolev.BoundedGlobalDimensionalBochner +import OAI.Geometry.RCD.Sobolev.PositiveSobolevTestMeasure +import OAI.Geometry.RCD.Sobolev.SobolevTestFunctional +import OAI.Geometry.RCD.Sobolev.SobolevSourceMassBound +import OAI.Geometry.RCD.Sobolev.RadialCutoffNorm + +namespace OAI + +/-! # Quantitative full Bochner measures on continuous compact Sobolev tests -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_regular_bochner_mass {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) (p : X) + (u d G : SobolevSpace (hausdorff n X) hX.quadratic) + (hd : IsWeakLaplacian (hausdorff n X) hX.quadratic u + (SobolevSpace.toLp (hausdorff n X) hX.quadratic d)) + (V : X → ℝ) {L : ℝ≥0} (hV : LipschitzWith L V) + (hu : SobolevSpace.toLp (hausdorff n X) hX.quadratic u =ᵐ[hausdorff n X] V) + (A : ℝ≥0) (hA : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic u x| ≤ A) + (hG : SobolevSpace.toLp (hausdorff n X) hX.quadratic G =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic u u) : + ∃ M : ℝ, 0 < M ∧ ∀ R : ℝ, 0 < R → ∃ σ : Measure X, IsFiniteMeasure σ ∧ + (∀ (ψ : SobolevSpace (hausdorff n X) hX.quadratic) (v : X → ℝ), + Continuous v → HasCompactSupport v → tsupport v ⊆ ball p (3*R) → + SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ =ᵐ[hausdorff n X] v → + (∫ x, v x ∂σ)=-(1/2:ℝ)*energyForm (hausdorff n X) hX.quadratic G ψ- + K*inner ℝ (SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ) + (SobolevSpace.toLp (hausdorff n X) hX.quadratic G)- + weightedGamma (hausdorff n X) hX.quadratic + (SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ) u d) ∧ + σ.real (closedBall p R) ≤ M*Real.sqrt + ((1+R⁻¹^2)*(hausdorff n X).real (closedBall p (2*R))) := by + let μ := hausdorff n X + let Q := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + have hΓ := localGamma_memLp_of_bounded_gradient μ Q u d L + (SobolevSpace.minimalSlope_le_lipschitz μ Q u hV hu) + let T := hΓ.toLp (localGamma μ Q u d) + let H := SobolevSpace.toLp μ Q G + let ρ := (-K) • H-T + let q := (-(1/2:ℝ)) • G + have hformula (ψ : SobolevSpace μ Q) : + sobolevSourceFunctional μ Q q ρ ψ=-(1/2:ℝ)*energyForm μ Q G ψ- + K*inner ℝ (SobolevSpace.toLp μ Q ψ) H- + weightedGamma μ Q (SobolevSpace.toLp μ Q ψ) u d := by + change energyForm μ Q ((-(1/2:ℝ)) • G) ψ+ + inner ℝ ((-K) • H-T) (SobolevSpace.toLp μ Q ψ)=_ + rw [energyForm_smul_left,inner_sub_left,real_inner_smul_left, + weightedGamma_eq_L2_inner μ Q u d hΓ,real_inner_comm H,real_inner_comm T] + ring + let M := 2*‖q‖+‖ρ‖+1 + refine ⟨M,by dsimp only [M]; positivity,?_⟩ + intro R hR + let Ω := ball p (3*(3*R)/2) + let Tψ := compactSobolevTestLift μ Q Ω + let Φ := (sobolevSourceFunctional μ Q q ρ).comp Tψ + have hpos (b : compactSobolevTests μ Q Ω) (hb : 0 ≤ (b : X →ᵇ ℝ)) : 0 ≤ Φ b := by + have htest := hX.bounded_global_dimensional_bochner hn hK p u d G (Tψ b) hd V hV hu A hA hG + b (b : X →ᵇ ℝ).continuous ‖(b : X →ᵇ ℝ)‖₊ + (fun x => by simpa only [coe_nnnorm,Real.norm_eq_abs] using (b : X →ᵇ ℝ).norm_coe_le_norm x) + hb (compactSobolevTestLift_coe μ Q Ω b) + have hnonneg : 0 ≤ (1/(n:ℝ))*(∫ x, (b : X →ᵇ ℝ) x*(SobolevSpace.toLp μ Q d x)^2 ∂μ) := + mul_nonneg (by positivity) (integral_nonneg fun x => mul_nonneg (hb x) (sq_nonneg _)) + change 0 ≤ sobolevSourceFunctional μ Q q ρ (Tψ b) + rw [hformula] + simpa only [bochnerTestForm_apply,neg_mul,sub_eq_add_neg] using hnonneg.trans htest + obtain ⟨σ,hσ,hrep⟩ := exists_positive_sobolev_test_measure μ Q p + (show 0 < 3*R by positivity) Φ hpos + let := hσ + have hfull (ψ : SobolevSpace μ Q) (v : X → ℝ) (hv : Continuous v) (hvc : HasCompactSupport v) + (hvs : tsupport v ⊆ ball p (3*R)) (hψ : SobolevSpace.toLp μ Q ψ =ᵐ[μ] v) : + (∫ x, v x ∂σ)=sobolevSourceFunctional μ Q q ρ ψ := by + let vb : X →ᵇ ℝ := ofCompactSupport v hv hvc + let b : compactSobolevTests μ Q (ball p (3*R)) := ⟨vb,hvc,hvs,ψ,hψ⟩ + let b' : compactSobolevTests μ Q Ω := + ⟨vb,hvc,hvs.trans (ball_subset_ball (by linarith)),ψ,hψ⟩ + have he : Tψ b'=ψ := by + apply Subtype.ext + apply Lp.ext + exact (compactSobolevTestLift_coe μ Q Ω b').trans hψ.symm + have hh := hrep b + change (∫ x, v x ∂σ)=sobolevSourceFunctional μ Q q ρ (Tψ b') at hh + rwa [he] at hh + have hsupp : tsupport (radialCutoff p R) ⊆ ball p (3*R) := by + apply (show tsupport (radialCutoff p R) ⊆ closedBall p (2*R) from ?_).trans + (closedBall_subset_ball (by linarith)) + apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + exact hx (radialCutoff_eq_zero p hR (le_of_lt (by simpa only [mem_closedBall,not_le,dist_comm] using hn))) + have hmass := measure_mass_le_sobolev_source μ Q q (radialSobolevCutoff μ Q p hR) ρ σ + (S := closedBall p R) measurableSet_closedBall (radialCutoff p R) (radialCutoff_lipschitz p hR).continuous + (radialCutoff_hasCompactSupport p hR) (fun x => (radialCutoff_bounds p R x).1) + (fun x hx => by + rw [radialCutoff_eq_one p hR (by simpa only [dist_comm] using mem_closedBall.mp hx)]) + (hfull _ _ (radialCutoff_lipschitz p hR).continuous (radialCutoff_hasCompactSupport p hR) + hsupp (radialSobolevCutoff_coe μ Q p hR)) + refine ⟨σ,hσ,fun ψ v hv hvc hvs hψ => (hfull ψ v hv hvc hvs hψ).trans (hformula ψ),hmass.trans ?_⟩ + exact (mul_le_mul_of_nonneg_left (radialSobolevCutoff_norm_le μ Q p hR) (by positivity)).trans + (mul_le_mul_of_nonneg_right (by dsimp only [M]; linarith) (Real.sqrt_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularGramEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularGramEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4320c4efaf801b22b1ab914e417113619a9c451 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularGramEnergy.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Coordinates.RegularGramEnergy +import OAI.Geometry.RCD.Coordinates.BoundedRegularLocalization +import OAI.Geometry.RCD.Sobolev.BochnerSourceLocality +import OAI.Geometry.RCD.Coordinates.RegularCoreRepresentative +import OAI.Geometry.RCD.Sobolev.CompactMixedEnergy + +namespace OAI + +/-! # A local mixed Gram for the actual bounded regular test + +Only the test is cut off. The two prescribed full positive Bochner measures +are retained, so the estimate uses their original mass on the smaller ball. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_regular_gram_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (f : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (qf : Lp ℝ 2 (hausdorff n X)) + (hqf : IsWeakLaplacian (hausdorff n X) hX.quadratic f.val qf) + (a da : SobolevSpace (hausdorff n X) hX.quadratic) + (hqa : IsWeakLaplacian (hausdorff n X) hX.quadratic a + (SobolevSpace.toLp (hausdorff n X) hX.quadratic da)) + (V : X → ℝ) {L A B : ℝ≥0} (hV : LipschitzWith L V) + (hVa : SobolevSpace.toLp (hausdorff n X) hX.quadratic a =ᵐ[hausdorff n X] V) + (hA : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic a x|≤A) + (hB : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic da x|≤B) + (p : X) {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (htr : t < 2*r) + (hq0 : qf =ᵐ[(hausdorff n X).restrict (ball p (2*r))] fun _ => 0) + (F₀ A₀ : SobolevSpace (hausdorff n X) hX.quadratic) + (σ τ : Measure X) [IsFiniteMeasure σ] [IsFiniteMeasure τ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p (2*r))] localGamma (hausdorff n X) hX.quadratic f.val f.val) + (hA₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic A₀ + =ᵐ[(hausdorff n X).restrict (ball p (2*r))] localGamma (hausdorff n X) hX.quadratic a a) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p (2*r)) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic K f.val f.val 0 0 σ.toSignedMeasure)) + (hτ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p (2*r)) A₀ + (bochnerGramSource (hausdorff n X) hX.quadratic K a a da da τ.toSignedMeasure)) + (Cf Ca : ℝ≥0) + (hCf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic f.val f.val x ≤ (Cf:ℝ)^2) + (hCa : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic a a x ≤ (Ca:ℝ)^2) : + ∃ G : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic G + =ᵐ[(hausdorff n X).restrict (ball p (2*r))] localGamma (hausdorff n X) hX.quadratic f.val a) ∧ + (∫ x in ball p t, localGamma (hausdorff n X) hX.quadratic G G x ∂hausdorff n X) ≤ + 2*(Ca:ℝ)^2*σ.real (ball p t)+2*(Cf:ℝ)^2*τ.real (ball p t) := by + let μ := hausdorff n X + let Q := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + obtain ⟨Cχ,_hCχ,⟨χ⟩⟩ := hX.goodCutoff_exists hn p (show 0 < 2*r by linarith) + obtain ⟨a',qa',hqa',ha',hda'⟩ := bounded_regular_localization μ Q a + (SobolevSpace.toLp μ Q da) hqa V hV hVa A hA χ + obtain ⟨F,Lf,_Af,hF,hFc,hfr,_hAf⟩ := regular_core_representative μ Q f + obtain ⟨W,La,_Aa,hW,hWc,hwr,_hAa⟩ := regular_core_representative μ Q a' + obtain ⟨G,hG⟩ := hX.compact_mixed_energy hn p f.val a'.val hF hFc hfr hW hWc hwr qf qa' hqf hqa' + have he := localGamma_pair_congr_ae μ Q (f := f.val) (f' := f.val) (g := a) (g' := a'.val) + (EventuallyEq.refl _ _) ha' + have hGr : SobolevSpace.toLp μ Q G =ᵐ[μ.restrict (ball p (2*r))] localGamma μ Q f.val a := + Filter.EventuallyEq.trans (ae_restrict_of_ae hG) he + have hA' : SobolevSpace.toLp μ Q A₀ =ᵐ[μ.restrict (ball p (2*r))] localGamma μ Q a'.val a'.val := + hA₀.trans (Filter.EventuallyEq.symm (localGamma_pair_congr_ae μ Q ha' ha')) + have hτ' := IsMeasureLaplacianOn.bochner_congr μ Q measurableSet_ball K τ.toSignedMeasure (Filter.EventuallyEq.symm ha') hτ + have hCa' : ∀ᵐ x ∂μ.restrict (ball p t), localGamma μ Q a'.val a'.val x≤(Ca:ℝ)^2 := by + filter_upwards [hCa,ae_restrict_of_ae_restrict_of_subset (ball_subset_ball htr.le) + (localGamma_pair_congr_ae μ Q ha' ha')] with x hx he + rw [he] + exact hx + have hz : SobolevSpace.toLp μ Q (0 : SobolevSpace μ Q) =ᵐ[μ] fun _ => (0:ℝ) := by + simpa only [map_zero] using! (Lp.coeFn_zero ℝ 2 μ) + have hzb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (0 : SobolevSpace μ Q) x|≤(0:ℝ≥0) := by + filter_upwards [hz] with x hx + simp only [hx,abs_zero,NNReal.coe_zero,le_refl] + have hqzero : qf =ᵐ[μ.restrict (ball p (2*r))] SobolevSpace.toLp μ Q (0 : SobolevSpace μ Q) := + hq0.trans (Filter.EventuallyEq.symm (ae_restrict_of_ae hz)) + refine ⟨G,hGr,?_⟩ + exact hX.regular_gram_energy hn hK f a' p ht htr 0 da qf qa' hqf hqa' + 0 B hzb hB hqzero hda' (ae_restrict_of_ae hz) le_rfl F₀ A₀ G σ τ hF₀ hA' + (ae_restrict_of_ae hG) hσ hτ' Cf Ca hCf hCa' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularLocalization.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ec7ec859fee7310b353022f3b6d954728eaaedf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularLocalization.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.RegularDirichletCore +import OAI.Geometry.RCD.Sobolev.WeakLaplacianProduct +import OAI.Geometry.RCD.Sobolev.GoodLaplacianCutoff + +namespace OAI + +/-! # Compact regular localization retaining the full L² source + +A bounded Lipschitz function with weak L² Laplacian is multiplied by an +actual good cutoff. On its plateau both the function and source agree +with the originals. No constant-source or source-gradient premise is used. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +theorem bounded_regular_localization (u : SobolevSpace μ hQ) (d : Lp ℝ 2 μ) + (hd : IsWeakLaplacian μ hQ u d) (v : X → ℝ) {L : ℝ≥0} + (hv : LipschitzWith L v) (hu : SobolevSpace.toLp μ hQ u =ᵐ[μ] v) + (A : ℝ≥0) (hA : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x|≤A) + {p : X} {r C : ℝ} (χ : GoodLaplacianCutoff μ hQ p r C) : + ∃ (F : compactLaplacianCore μ hQ univ) (q : Lp ℝ 2 μ), + IsWeakLaplacian μ hQ F.val q ∧ + SobolevSpace.toLp μ hQ F.val =ᵐ[μ.restrict (ball p r)] SobolevSpace.toLp μ hQ u ∧ + q =ᵐ[μ.restrict (ball p r)] d := by + have hχb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ χ.sobolev x|≤(1:ℝ≥0) := by + filter_upwards [χ.representative] with x hx + rw [hx,abs_of_nonneg (χ.bounds x).1] + exact (χ.bounds x).2 + have hχg := SobolevSpace.minimalSlope_le_lipschitz μ hQ χ.sobolev χ.lipschitz χ.representative + have hΓ : ∀ᵐ x ∂μ, localGamma μ hQ χ.sobolev χ.sobolev x≤((C/r).toNNReal:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ χ.sobolev,hχg, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ χ.sobolev)] with x hx hg hn + rw [hx] + exact pow_le_pow_left₀ hn hg 2 + let F := SobolevSpace.product μ hQ u χ.sobolev A 1 + obtain ⟨q,hq,hqr⟩ := hd.product μ hQ u χ.sobolev d χ.laplacian χ.weak_laplacian + A 1 (C/r).toNNReal hA hχb hΓ + have hFr : SobolevSpace.toLp μ hQ F =ᵐ[μ] fun x => χ.weight x*v x := by + filter_upwards [SobolevSpace.product_coe μ hQ u χ.sobolev A 1 hA hχb,hu,χ.representative] with x hx hy hz + change SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ u χ.sobolev A 1) x = _ + rw [hx,hy,hz,mul_comm] + obtain ⟨B,hB⟩ := lipschitz_mul_compact_cutoff χ.lipschitz hv (χ.hasCompactSupport μ hQ) + (fun x => by rw [abs_of_nonneg (χ.bounds x).1]; exact (χ.bounds x).2) + have hFc : F ∈ compactLaplacianCore μ hQ univ := + ⟨⟨_,B,hB,(χ.hasCompactSupport μ hQ).mul_right,subset_univ _,hFr⟩,q,hq⟩ + refine ⟨⟨F,hFc⟩,q,hq,?_,?_⟩ + · apply (ae_restrict_iff' measurableSet_ball).mpr + filter_upwards [hFr,hu] with x hx hy hball + rw [hx,χ.one x hball,one_mul,hy] + · apply (ae_restrict_iff' measurableSet_ball).mpr + filter_upwards [hqr,χ.representative,χ.laplacian_locality, + localGamma_zero_on_level μ hQ χ.sobolev u 1, + localGamma_comm μ hQ u χ.sobolev] with x hx hχ hΔ hz hc hball + have hχ1 := χ.one x hball + have hΓ0 : localGamma μ hQ u χ.sobolev x=0 := hc.trans (hz (hχ.trans hχ1)) + rw [hx,hχ,hχ1,hΔ (Or.inl (by simpa only [mem_ball,dist_comm] using hball)),hΓ0] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularMixedHessianDensity.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularMixedHessianDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..94ce189c9736a93fa6f0af296e184961ff5f6641 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularMixedHessianDensity.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreMixedHessian +import OAI.Geometry.RCD.Coordinates.BoundedRegularLocalization +import OAI.Geometry.RCD.Sobolev.GoodCutoffFromResolvent +import OAI.Geometry.RCD.Sobolev.HessianActionLocality + +namespace OAI + +/-! # One fixed local Hessian density for two bounded regular directions + +The finite positive measure is chosen using only the fixed potential. +Directions need an L² Laplacian; no derivative of their source is used. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_regular_mixed_hessian_density {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (w dw : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : IsWeakLaplacian (hausdorff n X) hX.quadratic w + (SobolevSpace.toLp (hausdorff n X) hX.quadratic dw)) + (W : X → ℝ) {L A B : ℝ≥0} (hW : LipschitzWith L W) + (hwr : SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[hausdorff n X] W) + (hwA : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x|≤A) + (hdB : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic dw x|≤B) + (p : X) {r : ℝ} (hr : 0 (u i).val) + let E (i : Fin 3) : Euclidean 3 := EuclideanSpace.single i 1 + have h0 : U (E 0) = f.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 0 + have h1 : U (E 1) = v.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 1 + have h2 : U (E 2) = z.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 2 + have hqU : IsWeakLaplacian m Q (U (E 0)) df := by rw [h0]; exact hf + have hF0 : SobolevSpace.toLp m Q F₀ =ᵐ[m.restrict (ball p (2*r))] + localGamma m Q (U (E 0)) (U (E 0)) := by rw [h0]; exact ae_restrict_of_ae hF₀ + have hlapU : IsMeasureLaplacianOn m Q (ball p (2*r)) F₀ + (bochnerGramSource m Q K (U (E 0)) (U (E 0)) dw dw σ.toSignedMeasure) := by + rw [h0] + exact hlap + obtain ⟨H,_hsym,hH,_hdim,hbound⟩ := hX.regular_core_mixed_hessian_on_measure hn hscalar u + p h2r (isCompact_closedBall p r) hsub (E 0) dw df hqU B hdB hdf le_rfl F₀ σ hF0 hlapU + let WG := H (E 0) (E 1) + let WH := H (E 0) (E 2) + let GH := H (E 1) (E 2) + have hWG : SobolevSpace.toLp m Q WG =ᵐ[m] localGamma m Q f.val v.val := by + have hh := hH (E 0) (E 1) + change SobolevSpace.toLp m Q WG =ᵐ[m] localGamma m Q (U (E 0)) (U (E 1)) at hh + simpa only [h0,h1] using hh + have hWH : SobolevSpace.toLp m Q WH =ᵐ[m] localGamma m Q f.val z.val := by + have hh := hH (E 0) (E 2) + change SobolevSpace.toLp m Q WH =ᵐ[m] localGamma m Q (U (E 0)) (U (E 2)) at hh + simpa only [h0,h2] using hh + have hGH : SobolevSpace.toLp m Q GH =ᵐ[m] localGamma m Q v.val z.val := by + have hh := hH (E 1) (E 2) + change SobolevSpace.toLp m Q GH =ᵐ[m] localGamma m Q (U (E 1)) (U (E 2)) at hh + simpa only [h1,h2] using hh + have hgΩ := ae_restrict_of_ae_restrict_of_subset hsub hvr + have hhΩ := ae_restrict_of_ae_restrict_of_subset hsub hzr + have hb := hbound 0 (E 1) (E 2) + change ∀ᵐ x ∂m.restrict (closedBall p r), + (localHessianAction m Q (U (E 0)) (U (E 1)) (U (E 2)) WG WH GH x - + 0*localGamma m Q (U (E 1)) (U (E 2)) x)^2 ≤ + ((σ.rnDeriv m x).toReal-2*0*SobolevSpace.toLp m Q dw x+(n:ℝ)*0^2)* + localGamma m Q (U (E 1)) (U (E 1)) x*localGamma m Q (U (E 2)) (U (E 2)) x at hb + simp only [h0,h1,h2,zero_mul,mul_zero,sub_zero,zero_pow (by decide : (2:ℕ) ≠ 0),add_zero] at hb + refine ⟨WG,WH,GH,?_,?_,?_,?_⟩ + · filter_upwards [ae_restrict_of_ae hWG,localGamma_pair_congr_ae m Q hfΩ hgΩ] with x hx hy + exact hx.trans hy + · filter_upwards [ae_restrict_of_ae hWH,localGamma_pair_congr_ae m Q hfΩ hhΩ] with x hx hy + exact hx.trans hy + · filter_upwards [ae_restrict_of_ae hGH,localGamma_pair_congr_ae m Q hgΩ hhΩ] with x hx hy + exact hx.trans hy + · have hHlocal : localHessianAction m Q f.val v.val z.val WG WH GH + =ᵐ[m.restrict (closedBall p r)] localHessianAction m Q w g h WG WH GH := + localHessianAction_congr m Q hfΩ hgΩ hhΩ + (EventuallyEq.refl _ _) (EventuallyEq.refl _ _) (EventuallyEq.refl _ _) + filter_upwards [hb,hHlocal,localGamma_pair_congr_ae m Q hgΩ hgΩ, + localGamma_pair_congr_ae m Q hhΩ hhΩ] with x hx hh hg hz + rwa [hh,hg,hz] at hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2be4b0322209dc99733b61e76f1fe1caf0169ae --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularNormalization.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Coordinates.RegularControlledNormalization + +namespace OAI + +/-! # Choosing the normalization radius and raw error under prescribed caps -/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published normalization inputs allow the working radius and the +raw initial error to be capped independently of the later target error. -/ +theorem bounded_regular_controlled_normalization {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (_hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 1) X) (m + 1) p + (euclideanUnitVolume (m + 1))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 1) X) (m + 1) p) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (_hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 1) X) + (comparisonModelVolume m a) y (euclideanUnitVolume (m + 1))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) + {Rcap εcap : ℝ} (hRcap : 0 < Rcap) (hεcap : 0 < εcap) : + ∃ R ε : ℝ, 0 < R ∧ 0 < ε ∧ R ≤ Rcap ∧ ε ≤ εcap ∧ R < 1 ∧ a * (3 * R) ≤ 1 ∧ |K| * R ^ 2 ≤ β ∧ + ∃ (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (v : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 * R) ε u v ∧ + ∀ q ∈ ball p (R / 4), ∀ r : ℝ, 0 < r → 64 * r ≤ R → + ∃ A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball q (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (16 * r) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u A) + (fun x => (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x)) ∧ + IsPointedApproximation q 0 r (1 / 2) ρ + (fun x => r⁻¹ • ((A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q))) := by + obtain ⟨δ, hδ, hnormalize⟩ := uniform_controlled_coordinates_of_comparison m hX hn + htrans hsplit ha hBG hρ hβ + obtain ⟨D, hD, hflat⟩ := hrigidity p hregular δ hδ + let ε := min δ εcap + have hε : 0 < ε := lt_min hδ hεcap + have hεδ : ε ≤ δ := min_le_left _ _ + have hεεcap : ε ≤ εcap := min_le_right _ _ + obtain ⟨T, hT, hinitialize⟩ := regular_initial_splitting_at_all_small_scales hX hn + hcompact hregular hmeasured hinitial hε + have hcap : 0 < min (β / (|K| + 1)) + (min D (min T (min 1 (min (ε / (|K| + 1)) (1 / (3 * (a + 1))))))) := + lt_min (by positivity) + (lt_min hD (lt_min hT (lt_min zero_lt_one (lt_min (by positivity) (by positivity))))) + obtain ⟨R, hR, hRboth⟩ := exists_between (lt_min hRcap hcap) + rcases lt_min_iff.mp hRboth with ⟨hRcap', hRbound⟩ + rcases lt_min_iff.mp hRbound with ⟨hRβ, hRbound⟩ + rcases lt_min_iff.mp hRbound with ⟨hRD, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hRT, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hR1, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hRK, hRa⟩ + obtain ⟨u, v, hu⟩ := hinitialize R hR hRT + have hcurv : -ε ≤ K * R ^ 2 := by + have he : R * (|K| + 1) ≤ ε := (le_div_iff₀ (by positivity)).mp hRK.le + have hs : R ^ 2 ≤ R := by nlinarith + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + have hK := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg R) + nlinarith + have hscale : a * (3 * R) ≤ 1 := by + have he := (lt_div_iff₀ (by positivity : 0 < 3 * (a + 1))).mp hRa + nlinarith + have hcurvβ : |K| * R ^ 2 ≤ β := by + have hb := (lt_div_iff₀ (by positivity : 0 < |K| + 1)).mp hRβ + have hs : R ^ 2 ≤ R := by nlinarith + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + nlinarith + refine ⟨R, ε, hR, hε, hRcap'.le, hεεcap, hR1, hscale, hcurvβ, u, v, hu, ?_⟩ + apply hnormalize p R hR (by linarith) hscale u v + (hu.mono_error (hausdorff (m + 1) X) hX.quadratic hε.le hεδ) + intro q hq s hs hsR + apply hflat q ?_ s hs (by linarith) + have hh := mem_ball.mp hq + rw [dist_comm] at hh + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularPrescribedHessian.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularPrescribedHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba9b01f5d60c458d722ab8cf4078439e8c7b3a8e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedRegularPrescribedHessian.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreMixedHessian +import OAI.Geometry.RCD.Sobolev.BochnerSourceLocality +import OAI.Geometry.RCD.Coordinates.BoundedRegularLocalization +import OAI.Geometry.RCD.Sobolev.GoodCutoffFromResolvent +import OAI.Geometry.RCD.Sobolev.HessianActionLocality + +namespace OAI + +/-! # Mixed Hessian domination by a prescribed full Bochner measure + +Localizing the potential and directions preserves the original measure, +so quantitative mass estimates survive the compact-core reduction. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_regular_prescribed_hessian {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (w dw : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : IsWeakLaplacian (hausdorff n X) hX.quadratic w + (SobolevSpace.toLp (hausdorff n X) hX.quadratic dw)) + (W : X → ℝ) {L A B : ℝ≥0} (hW : LipschitzWith L W) + (hwr : SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[hausdorff n X] W) + (hwA : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x|≤A) + (hdB : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic dw x|≤B) + (G : SobolevSpace (hausdorff n X) hX.quadratic) + (hG : SobolevSpace.toLp (hausdorff n X) hX.quadratic G =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic w w) + (p : X) {r : ℝ} (hr : 0 (u i).val) + let E (i : Fin 3) : Euclidean 3 := EuclideanSpace.single i 1 + have h0 : U (E 0) = f.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 0 + have h1 : U (E 1) = v.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 1 + have h2 : U (E 2) = z.val := by simpa [u,E] using sobolevColumnMap_single m Q (fun i => (u i).val) 2 + have hqU : IsWeakLaplacian m Q (U (E 0)) df := by rw [h0]; exact hf + have hF0 : SobolevSpace.toLp m Q G =ᵐ[m.restrict (ball p (2*r))] + localGamma m Q (U (E 0)) (U (E 0)) := by + rw [h0] + filter_upwards [ae_restrict_of_ae hG,localGamma_pair_congr_ae m Q hfr hfr] with x hx hy + exact hx.trans hy.symm + have hlapU : IsMeasureLaplacianOn m Q (ball p (2*r)) G + (bochnerGramSource m Q K (U (E 0)) (U (E 0)) dw dw σ.toSignedMeasure) := by + rw [h0] + exact IsMeasureLaplacianOn.bochner_congr m Q measurableSet_ball K σ.toSignedMeasure hfr.symm hσ + obtain ⟨H,_hsym,hH,_hdim,hbound⟩ := hX.regular_core_mixed_hessian_on_measure hn hscalar u + p h2r (isCompact_closedBall p r) hsub (E 0) dw df hqU B hdB hdf le_rfl G σ hF0 hlapU + let WG := H (E 0) (E 1) + let WH := H (E 0) (E 2) + let GH := H (E 1) (E 2) + have hWG : SobolevSpace.toLp m Q WG =ᵐ[m] localGamma m Q f.val v.val := by + have hh := hH (E 0) (E 1) + change SobolevSpace.toLp m Q WG =ᵐ[m] localGamma m Q (U (E 0)) (U (E 1)) at hh + simpa only [h0,h1] using hh + have hWH : SobolevSpace.toLp m Q WH =ᵐ[m] localGamma m Q f.val z.val := by + have hh := hH (E 0) (E 2) + change SobolevSpace.toLp m Q WH =ᵐ[m] localGamma m Q (U (E 0)) (U (E 2)) at hh + simpa only [h0,h2] using hh + have hGH : SobolevSpace.toLp m Q GH =ᵐ[m] localGamma m Q v.val z.val := by + have hh := hH (E 1) (E 2) + change SobolevSpace.toLp m Q GH =ᵐ[m] localGamma m Q (U (E 1)) (U (E 2)) at hh + simpa only [h1,h2] using hh + have hgΩ := ae_restrict_of_ae_restrict_of_subset hsub hvr + have hhΩ := ae_restrict_of_ae_restrict_of_subset hsub hzr + have hb := hbound 0 (E 1) (E 2) + change ∀ᵐ x ∂m.restrict (closedBall p r), + (localHessianAction m Q (U (E 0)) (U (E 1)) (U (E 2)) WG WH GH x - + 0*localGamma m Q (U (E 1)) (U (E 2)) x)^2 ≤ + ((σ.rnDeriv m x).toReal-2*0*SobolevSpace.toLp m Q dw x+(n:ℝ)*0^2)* + localGamma m Q (U (E 1)) (U (E 1)) x*localGamma m Q (U (E 2)) (U (E 2)) x at hb + simp only [h0,h1,h2,zero_mul,mul_zero,sub_zero,zero_pow (by decide : (2:ℕ) ≠ 0),add_zero] at hb + refine ⟨WG,WH,GH,?_,?_,?_,?_⟩ + · filter_upwards [ae_restrict_of_ae hWG,localGamma_pair_congr_ae m Q hfΩ hgΩ] with x hx hy + exact hx.trans hy + · filter_upwards [ae_restrict_of_ae hWH,localGamma_pair_congr_ae m Q hfΩ hhΩ] with x hx hy + exact hx.trans hy + · filter_upwards [ae_restrict_of_ae hGH,localGamma_pair_congr_ae m Q hgΩ hhΩ] with x hx hy + exact hx.trans hy + · have hHlocal : localHessianAction m Q f.val v.val z.val WG WH GH + =ᵐ[m.restrict (closedBall p r)] localHessianAction m Q w g h WG WH GH := + localHessianAction_congr m Q hfΩ hgΩ hhΩ + (EventuallyEq.refl _ _) (EventuallyEq.refl _ _) (EventuallyEq.refl _ _) + filter_upwards [hb,hHlocal,localGamma_pair_congr_ae m Q hgΩ hgΩ, + localGamma_pair_congr_ae m Q hhΩ hhΩ] with x hx hh hg hz + rwa [hh,hg,hz] at hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedSourceIntegral.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedSourceIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..e830175c077ca67f1aa5cc9c13ededd5d7fee6f6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedSourceIntegral.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.LongBoundedSource +import OAI.Geometry.RCD.Harmonic.AveragedLpPairing +import OAI.Geometry.RCD.Heat.DyadicTimeIntegral + +namespace OAI + +/-! # Integrating the bounded curvature and endpoint source estimates -/ + +open Set Metric MeasureTheory +open scoped BigOperators ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The complete short-time bounded-source contribution has the square +of the averaging radius. -/ +theorem exists_short_bounded_source_integral_bound (hg : HasCoordinateHeatBounds μ ker) + (n : ℕ) {A V W : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) : + ∃ C : ℝ, 0 < C ∧ ∀ (R : ℝ), 0 < R → R ≤ 1 → ∀ (i : ℕ) (x q : X), + μ (ball q (R / 2 ^ i)) ≠ ∞ → + V * (R / 2 ^ i) ^ n ≤ μ.real (ball q (R / 2 ^ i)) → + dist x q ≤ A * (R / 2 ^ i) → + (∀ j ≤ i, μ.real (ball x (2 ^ j * (R / 2 ^ i))) ≤ W * (2 ^ j * (R / 2 ^ i)) ^ n) → + (∀ t, 0 < t → t ≤ R ^ 2 → ∀ z ∈ ball x R, + V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + ∀ (f : Lp ℝ 2 μ) (B : ℝ), 0 ≤ B → (∀ᵐ z ∂μ, |f z| ≤ B) → + (∀ᵐ z ∂μ, z ∉ ball x R → f z = 0) → + |∫ t in (0 : ℝ)..(R / 2 ^ i) ^ 2, + ∫ z, kernelAverage μ ker t (ball q (R / 2 ^ i)) z * f z ∂μ| ≤ + C * B * (R / 2 ^ i) ^ 2 := by + obtain ⟨C, hC, hb⟩ := exists_short_bounded_source_bound μ hQ hk hg n hA hV hW + refine ⟨C, hC, ?_⟩ + intro R hR hR1 i x q hfinite hvol hcenter hupper hsource f B hB hfb hfzero + have hs : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hsR : (R / (2 : ℝ) ^ i) ^ 2 ≤ R ^ 2 := by + apply pow_le_pow_left₀ hs.le + exact div_le_self hR.le (one_le_pow₀ (by norm_num)) + apply short_time_integral_norm_le hs (by positivity) + intro t ht htime + have he := hb R hR hR1 i x q hfinite hvol hcenter hupper t ht htime + (hsource t ht (htime.trans hsR)) f B hB hfb hfzero + nlinarith only [mul_le_mul_of_nonneg_left he (sq_nonneg (R / (2 : ℝ) ^ i))] + +include hk in +/-- All long-time bounded-source blocks sum to r times the working +radius. This is the gain needed for the curvature contribution. -/ +theorem exists_long_bounded_source_integral_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) + (n : ℕ) {A V W : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) : + ∃ C : ℝ, 0 < C ∧ ∀ (R : ℝ), 0 < R → R ≤ 1 → ∀ (i : ℕ) (x q : X), + μ (ball q (R / 2 ^ i)) ≠ ∞ → 0 < μ.real (ball q (R / 2 ^ i)) → + dist x q ≤ A * (R / 2 ^ i) → + (∀ j, μ.real (ball x (R / 2 ^ j)) ≤ W * (R / 2 ^ j) ^ n) → + (∀ t, 0 < t → t ≤ R ^ 2 → ∀ z ∈ ball x R, + V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + ∀ (f : Lp ℝ 2 μ) (B : ℝ), 0 ≤ B → (∀ᵐ z ∂μ, |f z| ≤ B) → + (∀ᵐ z ∂μ, z ∉ ball x R → f z = 0) → + |∫ t in (R / 2 ^ i) ^ 2..R ^ 2, + ∫ z, (kernelAverage μ ker t (ball q (R / 2 ^ i)) z - ker t x z) * f z ∂μ| ≤ + C * B * (R / 2 ^ i) * R := by + obtain ⟨C, hC, hb⟩ := exists_long_bounded_source_bound μ hQ hk hg hdiff n hA hV hW + refine ⟨2 * C, by positivity, ?_⟩ + intro R hR hR1 i x q hfinite hvol hcenter hupper hsource f B hB hfb hfzero + let F := fun t => ∫ z, (kernelAverage μ ker t (ball q (R / 2 ^ i)) z - ker t x z) * f z ∂μ + have hs : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hsR : (R / (2 : ℝ) ^ i) ^ 2 ≤ R ^ 2 := by + apply pow_le_pow_left₀ hs.le + exact div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hi := kernelAverage_difference_lp_intervalIntegrable μ hQ hk + (ball q (R / (2 : ℝ) ^ i)) measurableSet_ball hfinite x f (sq_pos_of_pos hs) hsR + have hblock : ∀ j < i, + |∫ t in (R / (2 : ℝ) ^ j) ^ 2 / 4..(R / (2 : ℝ) ^ j) ^ 2, F t| ≤ + C * B * (R / (2 : ℝ) ^ i) * (R / (2 : ℝ) ^ j) := by + intro j hji + have hj : 0 < R / (2 : ℝ) ^ j := div_pos hR (by positivity) + have hrj : R / (2 : ℝ) ^ i ≤ (R / (2 : ℝ) ^ j) / 2 := by + rw [div_div, ← pow_succ] + exact div_le_div_of_nonneg_left hR.le (by positivity) (pow_le_pow_right₀ (by norm_num) hji) + have hjR : (R / (2 : ℝ) ^ j) ^ 2 ≤ R ^ 2 := by + apply pow_le_pow_left₀ hj.le + exact div_le_self hR.le (one_le_pow₀ (by norm_num)) + apply dyadic_time_integral_norm_le hj (by positivity) + intro t htime + have ht : 0 < t := (div_pos (sq_pos_of_pos hj) (by norm_num : (0 : ℝ) < 4)).trans_le htime.1 + have hroot : (2 : ℝ) ^ j * (R / (2 : ℝ) ^ j) = R := by field_simp + have he := hb R hR hR1 j (R / (2 : ℝ) ^ i) x q hs hrj hfinite hvol hcenter + (fun k hk => by + have he := outward_radius_eq_ancestor hroot (Nat.sub_le j k) + simp only [Nat.sub_sub_self hk] at he + rw [he] + exact hupper (j - k)) + t ht htime (hsource t ht (htime.2.trans hjR)) f B hB hfb hfzero + have hm := mul_le_mul_of_nonneg_left he (sq_nonneg (R / (2 : ℝ) ^ j)) + apply hm.trans_eq + field_simp + have he := dyadic_time_integral_abs_le F hR i hi _ hblock + have hsum : (∑ j ∈ Finset.range i, C * B * (R / (2 : ℝ) ^ i) * (R / (2 : ℝ) ^ j)) = + C * B * (R / (2 : ℝ) ^ i) * R * ∑ j ∈ Finset.range i, (1 / 2 : ℝ) ^ j := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j _ + rw [div_eq_mul_inv, one_div_pow] + ring + rw [hsum] at he + have hbound := mul_le_mul_of_nonneg_left (sum_geometric_two_le i) + (by positivity : 0 ≤ C * B * (R / (2 : ℝ) ^ i) * R) + nlinarith only [he, hbound] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/BoundedSplittingCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/BoundedSplittingCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..de83f24c3f39ca019c2030a6afafcdf2cff05f9c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/BoundedSplittingCoordinates.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Harmonic.QuadraticModelValues + +namespace OAI + +/-! # First-order splitting data are local to their representatives -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Local equality in both slots preserves the actual gradient pairing. -/ +theorem localGamma_pair_congr_ae {Ω : Set X} {f f' g g' : SobolevSpace μ hQ} + (hf : SobolevSpace.toLp μ hQ f' =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ f) + (hg : SobolevSpace.toLp μ hQ g' =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ g) : + localGamma μ hQ f' g' =ᵐ[μ.restrict Ω] localGamma μ hQ f g := by + filter_upwards [hf, hg, + ae_restrict_of_ae (localGamma_eq_on_eq μ hQ f' f g'), + ae_restrict_of_ae (localGamma_comm μ hQ f g'), + ae_restrict_of_ae (localGamma_eq_on_eq μ hQ g' g f), + ae_restrict_of_ae (localGamma_comm μ hQ g f)] with x hf hg h₁ h₂ h₃ h₄ + exact (h₁ hf).trans (h₂.trans ((h₃ hg).trans h₄)) + +/-- Changing global Sobolev extensions preserves every first-order splitting +condition when the local pointwise coordinate representative is unchanged. -/ +theorem FirstOrderSplittingOn.congr_representative {n : ℕ} {p : X} {r ε : ℝ} + {u u' : Fin n → SobolevSpace μ hQ} {v : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ p r ε u v) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u' j) =ᵐ[μ.restrict (ball p r)] fun x => v x j) : + FirstOrderSplittingOn μ hQ p r ε u' v := by + have heq (j : Fin n) : SobolevSpace.toLp μ hQ (u' j) =ᵐ[μ.restrict (ball p r)] + SobolevSpace.toLp μ hQ (u j) := (hrep j).trans (h.representative j).symm + have hg (i j : Fin n) := localGamma_pair_congr_ae μ hQ (heq i) (heq j) + refine ⟨hrep, h.continuous, fun j => (h.harmonic j).congr_ae μ hQ measurableSet_ball (heq j), ?_, ?_⟩ + · intro j + filter_upwards [hg j j, h.gradient j] with x hx hb + rwa [hx] + · intro i j + have hi : (∫ x in ball p r, |localGamma μ hQ (u' i) (u' j) x - if i = j then 1 else 0| ∂μ) = + ∫ x in ball p r, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ := by + apply integral_congr_ae + filter_upwards [hg i j] with x hx + rw [hx] + rw [hi] + exact h.gram i j + +/-- A centered metric approximation supplies globally bounded extensions +of the SAME local splitting map; no global boundedness input is required. -/ +theorem bounded_normalized_splitting {n : ℕ} {p : X} {r ε : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * r) ε u v) (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 r 4 ε (fun x => r⁻¹ • v x)) : + ∃ u' : Fin n → SobolevSpace μ hQ, + (∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u' j) x| ≤ 5 * r) ∧ + FirstOrderSplittingOn μ hQ p (4 * r) ε u' v := by + have hb := bounded_metric_coordinates μ hQ hr (by norm_num : (0 : ℝ) ≤ 4) hε + u v hfirst.harmonic hfirst.representative hv hmetric + let C : ℝ≥0 := ⟨r * (4 + ε), mul_nonneg hr.le (by positivity)⟩ + let u' := fun j => boundedLocalVersion μ hQ (u j) C + refine ⟨u', ?_, hfirst.congr_representative μ hQ hb.2.2⟩ + intro j + filter_upwards [hb.1 j] with x hx + have hscale : r * (4 + ε) ≤ 5 * r := by nlinarith + exact hx.trans hscale + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CanonicalCenteredFits.lean b/lean/OAI/Geometry/RCD/Coordinates/CanonicalCenteredFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..12c9bcb5c93fb9968753b7c61df30475976619ea --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CanonicalCenteredFits.lean @@ -0,0 +1,151 @@ +import OAI.Geometry.RCD.Harmonic.CanonicalDyadicCenters +import OAI.Geometry.RCD.Coordinates.WeightedSquaredFitCenters +import OAI.Geometry.RCD.Coordinates.DyadicFitVolumeUnits +import OAI.Geometry.RCD.Harmonic.DyadicRadialSummability + +namespace OAI + +/-! # Quantitative removal of the actual affine constants -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The inward estimate and square summability control the canonical radial fits. -/ +theorem canonical_centered_fits_of_squared_bound {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hmean : LocalHarmonicL2MeanValueInput hX) {a κ₀ κ r0 B J C L δ ε : ℝ} {p : X} + (hκ₀ : 0 ≤ κ₀) (ha : 0 ≤ a) (hδ : 0 ≤ δ) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) + (hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u v) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (hscale : a * (3 * r0) ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (w : ℕ → X → Euclidean (m + 2)) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (w i)) + (hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + {Z : ℝ} (hZ : 0 < Z) (Q : ℕ → ℝ) (hQ : ∀ i, 0 ≤ Q i) (hQs : Summable Q) + (hsquare : ∀ b : Euclidean (m + 2), b ≠ 0 → ∀ i, + (dyadicRadialFit hX T u L hbase i b) ^ 2 ≤ Z * Q i * ‖(F i).symm b‖ ^ 2) : + ∃ D : ℝ, 0 < D ∧ ∀ b : Euclidean (m + 2), b ≠ 0 → + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪v p, A i⟫_ℝ| ≤ D * (distanceSourceRadius r0 i / 64) * + ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i)) ∧ + (∀ i, ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b - + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (-⟪v p, A i⟫_ℝ, A i))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * + Real.sqrt (symmetricDefect (7 / 8) Q i)) := by + let μ := hausdorff (m + 2) X + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + let Λ := Real.sqrt ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹) + have hΛ : 0 ≤ Λ := Real.sqrt_nonneg _ + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hradius (i k : ℕ) : r (i + k) = (1 / 2 : ℝ) ^ k * r i := by + exact distanceSourceRadius_testing_shift r0 i k + have hrle (i : ℕ) : r i ≤ r0 := by + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + have hs := distanceSourceRadius_pos S.radius_pos i + dsimp only [r] + linarith + have hratio (i : ℕ) : Real.sqrt (μ.real (ball p (r i))) / + Real.sqrt (μ.real (ball p (r (i + 1)))) ≤ Λ := by + rw [hradius i 1, pow_one] + exact radial_sqrt_volume_ratio (hr i) (by norm_num) (euclideanUnitVolume_pos (m + 2)) + (measureReal_nonneg) (hquarter _ (hr i) (hrle i)) + (by simpa only [hradius i 1, pow_one] using hquarter _ (hr (i + 1)) (hrle (i + 1))) + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hgrowth := dyadic_covector_norm_reverse_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨w i, by simpa only [hrad] using hfirst i⟩) + obtain ⟨M, hM, hcenters⟩ := canonical_dyadic_affine_centers m hX hmean hκ₀ ha hδ hBG + S T u v hu hbase hscale hsmall F w hexact hfirst hcurv + let H := (1 - (9 / 16 : ℝ) / Real.sqrt (7 / 8))⁻¹ * (1 + (Real.sqrt (7 / 8))⁻¹) + have hroot : (9 / 16 : ℝ) < Real.sqrt (7 / 8) := by + have hh := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 7 / 8) + nlinarith [Real.sqrt_nonneg (7 / 8)] + have hH : 0 ≤ H := by + dsimp only [H] + have hh : (9 / 16 : ℝ) / Real.sqrt (7 / 8) < 1 := + (div_lt_one (Real.sqrt_pos.mpr (by norm_num))).mpr hroot + positivity + let Dc := (M * (Λ + 1) * Real.sqrt Z) * H + have hDc : 0 ≤ Dc := by dsimp only [Dc]; positivity + let D := Real.sqrt Z + Dc + have hD : 0 < D := add_pos_of_pos_of_nonneg (Real.sqrt_pos.mpr hZ) hDc + refine ⟨D, hD, ?_⟩ + intro b hb + obtain ⟨c, A, hfit, _hsize, hlim, hdiff⟩ := hcenters b + have hc (i : ℕ) : |c i + ⟪v p, A i⟫_ℝ| ≤ + Dc * r i * ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i) := by + have hh := weighted_centers_from_squared_fit (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num : (7 / 8 : ℝ) < 1) hroot (zero_le_one.trans hM) hΛ hZ.le hQ hQs + (fun j => (hr j).le) (fun j => norm_nonneg ((F j).symm b)) + (fun j => dyadicRadialFit_nonneg hX T u L hbase j b) hradius + (fun j k => hgrowth j k b) hlim (hsquare b hb) (fun j => ?_) i + · convert hh using 1 + dsimp only [Dc, H] + ring + · have hs := hdiff j + have hv := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hratio j) (zero_le_one.trans hM)) + (mul_nonneg (hr j).le (dyadicRadialFit_nonneg hX T u L hbase j b)) + apply hs.trans + exact add_le_add (hv.trans_eq (by ring)) (le_of_eq (by dsimp only [r]; ring)) + have herror (i : ℕ) : dyadicRadialFit hX T u L hbase i b ≤ + Real.sqrt Z * ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i) := by + have hsq := hsquare b hb i + have hbound : dyadicRadialFit hX T u L hbase i b ≤ Real.sqrt Z * ‖(F i).symm b‖ * Real.sqrt (Q i) := by + apply (sq_le_sq₀ (dyadicRadialFit_nonneg hX T u L hbase i b) (by positivity)).mp + calc + _ ≤ Z * Q i * ‖(F i).symm b‖ ^ 2 := hsq + _ = _ := by rw [mul_pow, mul_pow, Real.sq_sqrt hZ.le, Real.sq_sqrt (hQ i)]; ring + exact hbound.trans (mul_le_mul_of_nonneg_left + (Real.sqrt_le_sqrt (le_symmetricDefect (by norm_num) (by norm_num) hQ hQs i)) (by positivity)) + refine ⟨c, A, hfit, ?_, ?_⟩ + · intro i + exact (hc i).trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right + (show Dc ≤ D by exact le_add_of_nonneg_left (Real.sqrt_nonneg Z)) (hr i).le) (norm_nonneg _)) + (Real.sqrt_nonneg _)) + · intro i + have hs := centered_affineFit_error μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (ne_of_gt (hX.fullSupport p _ (hr i))) + (v p) (dyadicRadialTarget hX T u hbase i b) (c i) (A i) (hfit i) + rw [dyadicRadialTarget_residual_norm hX T u hbase i b] at hs + have hh := add_le_add (mul_le_mul_of_nonneg_left (herror i) (hr i).le) (hc i) + exact hs.trans (hh.trans_eq (by dsimp only [D]; ring)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CanonicalCoordinateHeatInput.lean b/lean/OAI/Geometry/RCD/Coordinates/CanonicalCoordinateHeatInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..38f973d82203c82f6a974737c4db232a784d84bc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CanonicalCoordinateHeatInput.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.CanonicalLocalLower + +namespace OAI + +/-! # Heat bounds for the coordinate construction -/ + +open MeasureTheory TopologicalSpace + +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +theorem canonicalHeatKernel_coordinateBounds : + HasCoordinateHeatBounds (hausdorff n X) (hX.canonicalHeatKernel hn p) where + estimates ε hε _ := by + obtain ⟨C,B,hC,hB,hupper⟩ := hX.canonicalHeatKernel_gaussian_upper hn p hε + exact ⟨C,B,hC,hB,fun t ht x y => + ⟨hX.canonicalHeatKernel_nonneg hn p t x y,hupper t ht x y⟩⟩ + localLower := hX.canonicalHeatKernel_local_lower hn p + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredBoundedFrame.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredBoundedFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0fc70740cc4009b8d70d62bc2e5edc87a92be54 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredBoundedFrame.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Coordinates.BoundedLocalCoordinates +import OAI.Geometry.RCD.Sobolev.SobolevLevelChain +import OAI.Geometry.RCD.Coordinates.LocalPoissonRegularExtension + +namespace OAI + +/-! # Bounded global representatives of centered local harmonic frames -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem localGamma_pair_constant_shift {Ω : Set X} + (f f' g g' : SobolevSpace μ Q) (a b : ℝ) + (hf : (fun x => SobolevSpace.toLp μ Q f' x-SobolevSpace.toLp μ Q f x) + =ᵐ[μ.restrict Ω] fun _ => a) + (hg : (fun x => SobolevSpace.toLp μ Q g' x-SobolevSpace.toLp μ Q g x) + =ᵐ[μ.restrict Ω] fun _ => b) : + localGamma μ Q f' g' =ᵐ[μ.restrict Ω] localGamma μ Q f g := by + filter_upwards [hf,hg,ae_restrict_of_ae (localGamma_eq_on_diff_level μ Q f' f g' a), + ae_restrict_of_ae (localGamma_eq_on_diff_level μ Q g' g f b), + ae_restrict_of_ae (localGamma_comm μ Q f g'),ae_restrict_of_ae (localGamma_comm μ Q g f)] + with x hfx hgx h₁ h₂ h₃ h₄ + exact (h₁ hfx).trans (h₃.trans ((h₂ hgx).trans h₄)) + +theorem centered_bounded_frame {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (v : X → Euclidean n) (c : Euclidean n) (Ω : Set X) (hΩ : MeasurableSet Ω) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (hH : ∀ i, IsSobolevHarmonicOn μ Q Ω (u i)) + (hgram : ∀ i j, localGamma μ Q (u i) (u j) =ᵐ[μ.restrict Ω] + fun _ => if i=j then 1 else 0) + (η : SobolevSpace μ Q) + (hη : SobolevSpace.toLp μ Q η =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) + (C : ℝ≥0) (hC : ∀ x∈Ω, ∀ i, |v x i-c i|≤C) : + ∃ U : Fin n → SobolevSpace μ Q, + (∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (U i) x|≤C) ∧ + (∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ.restrict Ω] fun x => (v x-c) i) ∧ + (∀ i, IsSobolevHarmonicOn μ Q Ω (U i)) ∧ + (∀ i j, localGamma μ Q (U i) (U j) =ᵐ[μ.restrict Ω] + fun _ => if i=j then 1 else 0) := by + let f i := u i-c i • η + have hf (i : Fin n) : SobolevSpace.toLp μ Q (f i) =ᵐ[μ.restrict Ω] + fun x => v x i-c i := by + change SobolevSpace.toLpCLM μ Q (u i-c i • η) =ᵐ[μ.restrict Ω] _ + rw [map_sub,map_smul] + filter_upwards [hu i,hη,ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ Q (u i)) + (c i • SobolevSpace.toLp μ Q η)),ae_restrict_of_ae (Lp.coeFn_smul (c i) (SobolevSpace.toLp μ Q η))] + with x hx hηx hsub hsm + change (SobolevSpace.toLp μ Q (u i)-c i • SobolevSpace.toLp μ Q η) x=_ + simp only [hsub,Pi.sub_apply,hsm,Pi.smul_apply,smul_eq_mul,hx,hηx,mul_one] + have hfbound (i : Fin n) : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ Q (f i) x|≤C := by + filter_upwards [hf i,ae_restrict_mem hΩ] with x hx hxm + rw [hx] + exact hC x hxm i + let U i := boundedLocalVersion μ Q (f i) C + have hUf (i : Fin n) := boundedLocalVersion_eq μ Q (f i) C (hfbound i) + have hconst := isSobolevHarmonicOn_of_local_constant μ Q Ω hΩ η 1 hη + have hfh (i : Fin n) : IsSobolevHarmonicOn μ Q Ω (f i) := by + simpa only [f,sub_eq_add_neg,neg_smul] using (hH i).add μ Q (hconst.smul μ Q (-c i)) + have hd (i : Fin n) : (fun x => SobolevSpace.toLp μ Q (f i) x-SobolevSpace.toLp μ Q (u i) x) + =ᵐ[μ.restrict Ω] fun _ => -c i := by + filter_upwards [hf i,hu i] with x hx hy + simp only [hx,hy] + ring + refine ⟨U,fun i => boundedLocalVersion_bound μ Q (f i) C,?_,?_,?_⟩ + · intro i + exact (hUf i).trans (hf i) + · intro i + exact (hfh i).congr_ae μ Q hΩ (hUf i) + · intro i j + exact (localGamma_pair_congr_ae μ Q (hUf i) (hUf j)).trans + ((localGamma_pair_constant_shift μ Q (u i) (f i) (u j) (f j) (-c i) (-c j) + (hd i) (hd j)).trans (hgram i j)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredCoordinateNorm.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredCoordinateNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..898cab054e4d0f94068c9d4f09a827c7b86fcaf5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredCoordinateNorm.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Coordinates.CoarseFineCoordinateDistance + +namespace OAI + +/-! # Centered coordinate approximations locate actual source preimages -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] {n : ℕ} + +theorem centered_coordinate_norm_bounds {p : X} {r S ε : ℝ} + (hr : 0 < r) (hS : 0 ≤ S) {v : X → Euclidean n} + (hV : IsPointedApproximation p 0 r S ε (fun x => r⁻¹ • (v x-v p))) + {x : X} (hx : dist x p ≤ S*r) : + dist x p-r*ε ≤ ‖v x-v p‖ ∧ ‖v x-v p‖ ≤ dist x p+r*ε := by + have hh := hV.2.1 x p hx (by simpa only [dist_self] using mul_nonneg hS hr.le) + simp only [sub_self,smul_zero,dist_zero_right,norm_smul, + Real.norm_of_nonneg (inv_pos.mpr hr).le] at hh + have hs := mul_le_mul_of_nonneg_left hh hr.le + have habs : |r*(r⁻¹*‖v x-v p‖-dist x p/r)| ≤ r*ε := by + rw [abs_mul,abs_of_pos hr] + exact hs + have he : r*(r⁻¹*‖v x-v p‖-dist x p/r) = ‖v x-v p‖-dist x p := by field_simp + rw [he] at habs + exact ⟨by linarith only [(abs_le.mp habs).1],by linarith only [(abs_le.mp habs).2]⟩ + +theorem centered_coordinate_preimage_ball {p : X} {r S ε ρ e : ℝ} + (hr : 0 < r) (hS : 0 ≤ S) (he : r*ε ≤ e) {v : X → Euclidean n} + (hV : IsPointedApproximation p 0 r S ε (fun x => r⁻¹ • (v x-v p))) + {x : X} (hx : dist x p ≤ S*r) (himage : v x-v p ∈ ball 0 ρ) : + x ∈ ball p (ρ+e) := by + have hn := (centered_coordinate_norm_bounds hr hS hV hx).1 + have hi : ‖v x-v p‖ < ρ := by simpa only [mem_ball,dist_zero_right] using himage + exact mem_ball.mpr (by linarith only [hn,hi,he]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredFirstOrderFrame.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredFirstOrderFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..596b7be1de645623e186236bfa739c0be884263c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredFirstOrderFrame.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Sobolev.CenteredHarmonicEnergy +import OAI.Geometry.RCD.Sobolev.ContinuousLocalGradientBound +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # Bounded centered harmonic components of a first-order frame -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.centered_first_order_frame {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {p : X} {r ε : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n) + (hsplit : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (80*r) ε u v) : + ∃ w : Fin n → SobolevSpace (hausdorff n X) hX.quadratic, + (∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (5*r)) (w i)) ∧ + (∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i) =ᵐ[ + (hausdorff n X).restrict (ball p (5*r))] fun x => (r⁻¹ • (v x-v p)) i) ∧ + (∀ i, harmonicTargetNorm hX p (5*r) (w i) ≤ 10) ∧ + ∀ i j, (fun x => r^2*localGamma (hausdorff n X) hX.quadratic (w i) (w j) x) =ᵐ[ + (hausdorff n X).restrict (ball p (5*r))] + localGamma (hausdorff n X) hX.quadratic (u i) (u j) := by + let μ := hausdorff n X + have hs40 : ball p (8*(5*r)) ⊆ ball p (80*r) := ball_subset_ball (by linarith) + have hs5 : ball p (5*r) ⊆ ball p (80*r) := ball_subset_ball (by linarith) + have hex (i : Fin n) := hX.centered_harmonic_direction_with_energy hn p + (show 0<5*r by positivity) hr (by norm_num : (0:ℝ)≤10) (u i) + (fun x => v x i) (v p i) ((hsplit.harmonic i).mono μ hX.quadratic hs5) + (ae_restrict_of_ae_restrict_of_subset hs5 (hsplit.representative i)) + have hb (i : Fin n) : ∀ x ∈ ball p (5*r), |v x i-v p i| ≤ 10*r := by + have hg : ∀ᵐ x ∂μ.restrict (ball p (8*(5*r))), + localGamma μ hX.quadratic (u i) (u i) x ≤ ((2 : ℝ≥0) : ℝ)^2 := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hs40 (hsplit.gradient i)] with x hx + norm_num only [NNReal.coe_ofNat] at * + nlinarith + have hv : ContinuousOn (fun x => v x i) (ball p (8*(5*r))) := + (EuclideanSpace.proj i).continuous.comp_continuousOn (hsplit.continuous.mono hs40) + have hbound := hX.continuous_local_gradient_bound hn (u i) (fun x => v x i) p + (show 0<5*r by positivity) 2 hv + (ae_restrict_of_ae_restrict_of_subset hs40 (hsplit.representative i)) hg + intro x hx + have hh := hbound x hx + norm_num only [NNReal.coe_ofNat] at hh + have hd : dist x p < 5*r := hx + linarith + choose w hw hrep hnorm he using (fun i => hex i (hb i)) + refine ⟨w,hw,?_,hnorm,?_⟩ + · intro i + filter_upwards [hrep i] with x hx + change _ = r⁻¹*(v x i-v p i) + simpa only [div_eq_inv_mul] using hx + · intro i j + exact rescaled_local_pairing_of_centering μ hX.quadratic (ball p (5*r)) hr.ne' + (u i) (u j) (w i) (w j) (he i) (he j) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredFrameGramBound.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredFrameGramBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ec7503cc1d068ed49d34d3a8abd39bf04d01c19 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredFrameGramBound.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Coordinates.CenteredFirstOrderFrame + +namespace OAI + +/-! # The exact inner Gram error of centered first-order coordinates -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem centered_frame_gram_bound {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + {p : X} {r ε D : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) + (u w : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) + (hsplit : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (80*r) ε u v) + (hvol : (hausdorff n X).real (ball p (80*r)) ≤ D*(hausdorff n X).real (ball p (5*r))) + (he : ∀ i j, (fun x => r^2*localGamma (hausdorff n X) hX.quadratic (w i) (w j) x) =ᵐ[ + (hausdorff n X).restrict (ball p (5*r))] + localGamma (hausdorff n X) hX.quadratic (u i) (u j)) (i j : Fin n) : + ((hausdorff n X).real (ball p (5*r)))⁻¹* + ∫ x in ball p (4*r), |r^2*localGamma (hausdorff n X) hX.quadratic (w i) (w j) x- + (if i=j then 1 else 0)| ∂hausdorff n X ≤ D*ε := by + let μ := hausdorff n X + let f := fun x => |localGamma μ hX.quadratic (u i) (u j) x-(if i=j then 1 else 0)| + have hf : IntegrableOn f (ball p (80*r)) μ := + ((localGamma_memL1 μ hX.quadratic (u i) (u j)).integrableOn.sub + (integrableOn_const (hX.finiteOnBounded _ isBounded_ball).ne)).abs + have hs : ball p (5*r) ⊆ ball p (80*r) := ball_subset_ball (by linarith) + have ht : ball p (4*r) ⊆ ball p (5*r) := ball_subset_ball (by linarith) + have hpos (a : ℝ) (ha : 0 < a) : 0 < μ.real (ball p (a*r)) := + ENNReal.toReal_pos (ne_of_gt (hX.fullSupport p (a*r) (mul_pos ha hr))) + (hX.finiteOnBounded _ isBounded_ball).ne + have hb := average_nonneg_le_of_subset μ hs (hpos 5 (by norm_num)) + (hpos 80 (by norm_num)) hf (fun x => abs_nonneg _) hε hvol (hsplit.gram i j) + rw [integral_congr_ae (show (fun x => |r^2*localGamma μ hX.quadratic (w i) (w j) x- + (if i=j then 1 else 0)|) =ᵐ[μ.restrict (ball p (4*r))] f from by + filter_upwards [ae_restrict_of_ae_restrict_of_subset ht (he i j)] with x hx + dsimp only [f] + rw [hx])] + exact (mul_le_mul_of_nonneg_left + (setIntegral_mono_set (hf.mono_set hs) (Filter.Eventually.of_forall (fun x => abs_nonneg _)) + (Filter.Eventually.of_forall ht)) (inv_nonneg.mpr measureReal_nonneg)).trans hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..39f25e9dcc594ed4b45fbf941ce6f2e9dab280cf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredNormalization.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Coordinates.CenteredSplitting +import OAI.Geometry.RCD.Coordinates.GramNormalization + +namespace OAI + +/-! # Exact harmonic normalization survives centering -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Centering has zero local gradient in every covector, so it preserves +the complete actual mean Gram operator on the region. -/ +theorem centeredColumn_meanGram {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (Ω : Set X) (hΩ : MeasurableSet Ω) (c : Euclidean n) (eta : SobolevSpace μ hQ) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) : + sobolevMeanGram μ hQ (sobolevColumnMap μ hQ (centeredColumn μ hQ u c eta)) Ω hΩ = + sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) Ω hΩ := by + apply ContinuousLinearMap.ext + intro v + apply ext_inner_right ℝ + intro z + rw [sobolevMeanGram_inner, sobolevMeanGram_inner] + congr 1 + apply integral_congr_ae + let U := sobolevColumnMap μ hQ u + let V := sobolevColumnMap μ hQ (centeredColumn μ hQ u c eta) + have hv := localGamma_eq_of_constant_difference μ hQ Ω (V v) (U v) (V z) + (-⟪c, v⟫_ℝ) (centeredColumn_covector_difference μ hQ u Ω c v eta heta) + have hz := localGamma_eq_of_constant_difference μ hQ Ω (V z) (U z) (U v) + (-⟪c, z⟫_ℝ) (centeredColumn_covector_difference μ hQ u Ω c z eta heta) + filter_upwards [hv, hz, ae_restrict_of_ae (localGamma_comm μ hQ (U v) (V z)), + ae_restrict_of_ae (localGamma_comm μ hQ (U z) (U v))] with x hv hz hc hd + exact hv.trans (hc.trans (hz.trans hd)) + +/-- The exact same frame normalizes both the original and centered +coordinate columns; no new normalizing matrix is chosen. -/ +theorem IsExactMeanNormalization.center {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (Ω : Set X) (hΩ : MeasurableSet Ω) (c : Euclidean n) (eta : SobolevSpace μ hQ) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (N : Euclidean n ≃L[ℝ] Euclidean n) + (hN : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) Ω hΩ N) : + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ (centeredColumn μ hQ u c eta)) Ω hΩ N := by + unfold IsExactMeanNormalization at hN ⊢ + rw [sobolevMeanGram_comp, centeredColumn_meanGram μ hQ u Ω hΩ c eta heta, + ← sobolevMeanGram_comp] + exact hN + +/-- Globally clipped coordinate extensions retain the same local mean +Gram whenever their representatives agree on the region. -/ +theorem sobolevMeanGram_eq_of_local_representatives {n : ℕ} + (u v : Fin n → SobolevSpace μ hQ) (Ω : Set X) (hΩ : MeasurableSet Ω) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ (v j)) : + sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) Ω hΩ = + sobolevMeanGram μ hQ (sobolevColumnMap μ hQ v) Ω hΩ := by + classical + apply ContinuousLinearMap.ext + intro a + apply ext_inner_right ℝ + intro b + rw [sobolevMeanGram_inner, sobolevMeanGram_inner] + congr 1 + apply integral_congr_ae + have hcol (a : Euclidean n) : SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u a) =ᵐ[μ.restrict Ω] + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ v a) := by + have hlocal (j : Fin n) : SobolevSpace.restrictLp μ hQ Ω (u j) = + SobolevSpace.restrictLp μ hQ Ω (v j) := by + apply Lp.ext + exact (SobolevSpace.restrictLp_coe μ hQ Ω (u j)).trans + ((hrep j).trans (SobolevSpace.restrictLp_coe μ hQ Ω (v j)).symm) + have heq : SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ u a) = + SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ v a) := by + simp only [sobolevColumnMap_apply, map_sum, map_smul, hlocal] + filter_upwards [SobolevSpace.restrictLp_coe μ hQ Ω (sobolevColumnMap μ hQ u a), + SobolevSpace.restrictLp_coe μ hQ Ω (sobolevColumnMap μ hQ v a)] with x hu hv + exact hu.symm.trans ((congrArg (fun f : Lp ℝ 2 (μ.restrict Ω) => f x) heq).trans hv) + exact localGamma_pair_congr_ae μ hQ (hcol a) (hcol b) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CenteredSplitting.lean b/lean/OAI/Geometry/RCD/Coordinates/CenteredSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e7d2975eeb49802ff47f93d526fff84c5590467 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CenteredSplitting.lean @@ -0,0 +1,162 @@ +import OAI.Geometry.RCD.Coordinates.BoundedSplittingCoordinates +import OAI.Geometry.RCD.Coordinates.RadialFitCoordinates +import OAI.Geometry.RCD.Harmonic.ColumnRepresentatives + +namespace OAI + +/-! # Centering the same normalized harmonic column + +The constant is represented by a genuine local Sobolev cutoff. Centering +preserves all local Gram entries and the actual affine least-squares error. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +def centeredColumn {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (c : Euclidean n) (η : SobolevSpace μ hQ) : Fin n → SobolevSpace μ hQ := + affineChangedColumn μ hQ u (ContinuousLinearMap.id ℝ (Euclidean n)) (-(innerSL ℝ c)) η + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredColumn_apply {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (c : Euclidean n) (η : SobolevSpace μ hQ) (i : Fin n) : + centeredColumn μ hQ u c η i = u i + (-c i) • η := by + simp only [centeredColumn, affineChangedColumn, ContinuousLinearMap.id_apply, + sobolevColumnMap_single, neg_apply, innerSL_apply_apply, + EuclideanSpace.inner_single_right, starRingEnd_apply, star_trivial, one_mul] + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredColumn_representative {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (v : X → Euclidean n) (c : Euclidean n) (η : SobolevSpace μ hQ) + (hu : ∀ i, SobolevSpace.toLp μ hQ (u i) =ᵐ[μ.restrict s] fun x => v x i) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) (i : Fin n) : + SobolevSpace.toLp μ hQ (centeredColumn μ hQ u c η i) =ᵐ[μ.restrict s] + fun x => (v x - c) i := by + have hi := affineChangedColumn_representative μ hQ u s v hu + (ContinuousLinearMap.id ℝ (Euclidean n)) (-(innerSL ℝ c)) η hη i + filter_upwards [hi] with x hx + change _ = (v x - c) i + rw [PiLp.sub_apply] + simpa only [centeredColumn, ContinuousLinearMap.adjoint_id, ContinuousLinearMap.id_apply, + neg_apply, innerSL_apply_apply, EuclideanSpace.inner_single_right, + starRingEnd_apply, star_trivial, one_mul, sub_eq_add_neg] using hx + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredColumn_difference {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (c : Euclidean n) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) (i : Fin n) : + SobolevSpace.toLp μ hQ (centeredColumn μ hQ u c η i - u i) =ᵐ[μ.restrict s] + fun _ => -c i := by + rw [centeredColumn_apply, add_sub_cancel_left] + change SobolevSpace.toLpCLM μ hQ ((-c i) • η) =ᵐ[μ.restrict s] _ + rw [map_smul] + filter_upwards [hη, ae_restrict_of_ae (Lp.coeFn_smul (-c i) (SobolevSpace.toLp μ hQ η))] + with x hx hs + change ((-c i) • SobolevSpace.toLp μ hQ η) x = -c i + simp only [hs, Pi.smul_apply, smul_eq_mul, hx, mul_one] + +theorem centeredColumn_gram {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (c : Euclidean n) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) (i j : Fin n) : + localGamma μ hQ (centeredColumn μ hQ u c η i) (centeredColumn μ hQ u c η j) + =ᵐ[μ.restrict s] localGamma μ hQ (u i) (u j) := by + filter_upwards [localGamma_eq_of_constant_difference μ hQ s _ _ _ (-c i) + (centeredColumn_difference μ hQ u s c η hη i), + ae_restrict_of_ae (localGamma_comm μ hQ (u i) (centeredColumn μ hQ u c η j)), + localGamma_eq_of_constant_difference μ hQ s _ _ (u i) (-c j) + (centeredColumn_difference μ hQ u s c η hη j), + ae_restrict_of_ae (localGamma_comm μ hQ (u j) (u i))] with x h₁ h₂ h₃ h₄ + exact h₁.trans (h₂.trans (h₃.trans h₄)) + +theorem FirstOrderSplittingOn.center {n : ℕ} {p : X} {r ε : ℝ} + {u : Fin n → SobolevSpace μ hQ} {v : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ p r ε u v) + (c : Euclidean n) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict (ball p r)] fun _ => (1 : ℝ)) : + FirstOrderSplittingOn μ hQ p r ε (centeredColumn μ hQ u c η) (fun x => v x - c) := by + have hc := isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball η 1 hη + refine ⟨centeredColumn_representative μ hQ u _ v c η h.representative hη, + h.continuous.sub continuousOn_const, ?_, ?_, ?_⟩ + · intro i + rw [centeredColumn_apply] + exact IsSobolevHarmonicOn.add μ hQ (h.harmonic i) (hc.smul μ hQ (-c i)) + · intro i + filter_upwards [centeredColumn_gram μ hQ u _ c η hη i i, h.gradient i] with x hx hg + rwa [hx] + · intro i j + have he : (∫ x in ball p r, + |localGamma μ hQ (centeredColumn μ hQ u c η i) (centeredColumn μ hQ u c η j) x - + if i = j then 1 else 0| ∂μ) = + ∫ x in ball p r, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ := by + apply integral_congr_ae + filter_upwards [centeredColumn_gram μ hQ u _ c η hη i j] with x hx + rw [hx] + rw [he] + exact h.gram i j + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredColumn_residual {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hfin : μ s ≠ ∞) (c : Euclidean n) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) : + affineResidual μ hQ (centeredColumn μ hQ u c η) s hfin = affineResidual μ hQ u s hfin := by + exact affineChangedColumn_residual_eq μ hQ u (ContinuousLinearEquiv.refl ℝ (Euclidean n)) + (-(innerSL ℝ c)) η s hfin (restrictLp_eq_one_of_representative μ hQ η s hfin hη) + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredColumn_covector_difference {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (c b : Euclidean n) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) : + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b - + sobolevColumnMap μ hQ u b) =ᵐ[μ.restrict s] fun _ => -⟪c, b⟫_ℝ := by + have he : sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b - + sobolevColumnMap μ hQ u b = (-⟪c, b⟫_ℝ) • η := by + rw [centeredColumn, sobolevColumnMap_affineChanged] + simp only [add_apply, ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, + ContinuousLinearMap.smulRight_apply, neg_apply, innerSL_apply_apply, add_sub_cancel_left] + rw [he] + change SobolevSpace.toLpCLM μ hQ ((-⟪c, b⟫_ℝ) • η) =ᵐ[μ.restrict s] _ + rw [map_smul] + filter_upwards [hη, ae_restrict_of_ae + (Lp.coeFn_smul (-⟪c, b⟫_ℝ) (SobolevSpace.toLp μ hQ η))] with x hx hs + change ((-⟪c, b⟫_ℝ) • SobolevSpace.toLp μ hQ η) x = -⟪c, b⟫_ℝ + simp only [hs, Pi.smul_apply, smul_eq_mul, hx, mul_one] + +/-- The raw derivative and its affine fit are unchanged by centering, +for every fixed covector and every admissible local gradient bound. -/ +theorem centeredColumn_radial_fit {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) (r : ℝ) (hfin : μ (ball p r) ≠ ∞) (c b : Euclidean n) + (η q : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict (ball p r)] fun _ => (1 : ℝ)) + {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b) + (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b) x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ B') : + radialFitError μ hQ (centeredColumn μ hQ u c η) p r hfin q + (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b) ha = + radialFitError μ hQ u p r hfin q (sobolevColumnMap μ hQ u b) ha' := by + have he : localGamma μ hQ q (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b) + =ᵐ[μ.restrict (ball p r)] localGamma μ hQ q (sobolevColumnMap μ hQ u b) := by + filter_upwards [localGamma_eq_of_constant_difference μ hQ (ball p r) _ _ q (-⟪c, b⟫_ℝ) + (centeredColumn_covector_difference μ hQ u _ c b η hη), + ae_restrict_of_ae (localGamma_comm μ hQ q + (sobolevColumnMap μ hQ (centeredColumn μ hQ u c η) b)), + ae_restrict_of_ae (localGamma_comm μ hQ q (sobolevColumnMap μ hQ u b))] + with x h₁ h₂ h₃ + exact h₂.trans (h₁.trans h₃.symm) + unfold radialFitError + rw [centeredColumn_residual μ hQ u _ hfin c η hη, + radialPairingLp_congr μ hQ _ _ _ _ _ ha ha' he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ChartTopology.lean b/lean/OAI/Geometry/RCD/Coordinates/ChartTopology.lean new file mode 100644 index 0000000000000000000000000000000000000000..e81d8a86b0a32ac7678e4275587fe008469d01c3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ChartTopology.lean @@ -0,0 +1,63 @@ +import OAI.Analysis.RCDHeat.Foundations +import OAI.Geometry.RCD.Metric.MetricLimit + +namespace OAI + +/-! +# Openness of the limiting coordinate chart + +Euclidean invariance of domain is formulated as an open-image property, +following Hatcher, *Algebraic Topology* (2002), Theorem 2B.3, page 172. +The metric estimates use the ambient subtype distance. +-/ + +open Set Topology + +namespace RegularPointCoordinates + +/-- Precisely the Euclidean open-image assertion of Hatcher, Theorem 2B.3. -/ +def EuclideanInvarianceOfDomain (n : ℕ) : Prop := + ∀ (O : Set (Euclidean n)), IsOpen O → + ∀ f : O → Euclidean n, Continuous f → Function.Injective f → IsOpen (range f) + +/-- Transfer invariance of domain through the original topological coordinates. -/ +theorem isOpen_range_of_coordinates {X : Type*} [TopologicalSpace X] {n : ℕ} + (hIOD : EuclideanInvarianceOfDomain n) {O : Set (Euclidean n)} (hO : IsOpen O) + (u : X ≃ₜ O) {F : X → Euclidean n} (hF : Continuous F) + (hinj : Function.Injective F) : IsOpen (range F) := by + have hopen := hIOD O hO (F ∘ u.symm) (hF.comp u.symm.continuous) + (hinj.comp u.symm.injective) + have hrange : range (F ∘ u.symm) = range F := by + ext y + constructor + · rintro ⟨x, rfl⟩ + exact ⟨u.symm x, rfl⟩ + · rintro ⟨x, rfl⟩ + exact ⟨u x, by simp⟩ + rwa [hrange] at hopen + +/-- Two-sided ambient-distance bounds and topological coordinates give an open +bi-Lipschitz chart. -/ +theorem hasOpenBilipschitzChart_of_coordinates_and_bounds + {X : Type*} [MetricSpace X] {n : ℕ} {p : X} + (hIOD : EuclideanInvarianceOfDomain n) + {U : Set X} (hU : IsOpen U) (hp : p ∈ U) + {O : Set (Euclidean n)} (hO : IsOpen O) (u : U ≃ₜ O) + {F : U → Euclidean n} {L : ℝ} (hL : 1 ≤ L) + (hbound : ∀ x z : U, + L⁻¹ * dist (x : X) (z : X) ≤ dist (F x) (F z) ∧ + dist (F x) (F z) ≤ L * dist (x : X) (z : X)) : + HasOpenBilipschitzChart n p := by + have hLpos : 0 < L := lt_of_lt_of_le zero_lt_one hL + obtain ⟨hLip, hAnti⟩ := lipschitz_antilipschitz_of_dist_bounds + (inv_pos.mpr hLpos) hLpos.le hbound + have hEmb : IsEmbedding F := hAnti.isEmbedding hLip.continuous + have hRange : IsOpen (range F) := + isOpen_range_of_coordinates hIOD hO u hLip.continuous hEmb.injective + refine ⟨U, range F, hU, hp, hRange, hEmb.toHomeomorph, L, hL, ?_⟩ + intro x z + simpa using hbound x z + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoarseFineCoordinateDistance.lean b/lean/OAI/Geometry/RCD/Coordinates/CoarseFineCoordinateDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dc098757bf422f354770d06a4c8b0360f3eb095 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoarseFineCoordinateDistance.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.FullScaleCoordinateDistance + +namespace OAI + +/-! # Global distance control from a coarse chart and fine local charts -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates + +/-- The coarse approximation controls widely separated points. The +all-scale charts control the remaining pairs, with the same small error. -/ +theorem coarse_fine_coordinate_distance {X : Type*} [MetricSpace X] {n : ℕ} + {p : X} {v : X → Euclidean n} {U : Set X} {r S T ε η : ℝ} + (hr : 0 < r) (hη : 0 ≤ η) (herror : ε*r ≤ η*T) + (hU : ∀ x ∈ U, dist x p ≤ S*r) + (hcoarse : IsPointedApproximation p 0 r S ε (fun z => r⁻¹ • (v z-v p))) + (hfine : ∀ x ∈ U, ∀ s : ℝ, 0 < s → s < T → + IsPointedApproximation x 0 s (1/16) η (fun z => s⁻¹ • (v z-v x))) : + ∀ x ∈ U, ∀ y ∈ U, + (1-32*η)*dist x y ≤ dist (v x) (v y) ∧ + dist (v x) (v y) ≤ (1+32*η)*dist x y := by + intro x hx y hy + by_cases hxy : dist x y < T/32 + · have hT : 0 < T/32 := lt_of_le_of_lt dist_nonneg hxy + exact full_scale_coordinate_distance + (U := {x,y}) (by + intro a ha b hb + change a=x ∨ a=y at ha + change b=x ∨ b=y at hb + rcases ha with hax | hay <;> rcases hb with hbx | hby + · simpa only [hax,hbx,dist_self] using hT + · simpa only [hax,hby] using hxy + · simpa only [hay,hbx,dist_comm y x] using hxy + · simpa only [hay,hby,dist_self] using hT) + (by + intro a ha s hs hsT + change a=x ∨ a=y at ha + rcases ha with hax | hay + · rw [hax]; exact hfine x hx s hs hsT + · rw [hay]; exact hfine y hy s hs hsT) + x (by simp) y (by simp) + · have hfar : T ≤ 32*dist x y := by linarith only [hxy] + have hh := hcoarse.2.1 x y (hU x hx) (hU y hy) + rw [dist_smul₀,Real.norm_of_nonneg (inv_pos.mpr hr).le,dist_sub_right] at hh + have hscaled : |dist (v x) (v y)-dist x y| ≤ r*ε := by + have heq : r*(r⁻¹*dist (v x) (v y)-dist x y/r)= + dist (v x) (v y)-dist x y := by field_simp + rw [← heq,abs_mul,abs_of_pos hr] + exact mul_le_mul_of_nonneg_left hh hr.le + have hefar := mul_le_mul_of_nonneg_left hfar hη + have hb := abs_le.mp hscaled + constructor <;> nlinarith only [hb.1,hb.2,herror,hefar] + +theorem coarse_fine_coordinate_lipschitz {X : Type*} [MetricSpace X] {n : ℕ} + {p : X} {v : X → Euclidean n} {U : Set X} {r S T ε η : ℝ} + (hr : 0 < r) (hη : 0 ≤ η) (herror : ε*r ≤ η*T) + (hU : ∀ x ∈ U, dist x p ≤ S*r) + (hcoarse : IsPointedApproximation p 0 r S ε (fun z => r⁻¹ • (v z-v p))) + (hfine : ∀ x ∈ U, ∀ s : ℝ, 0 < s → s < T → + IsPointedApproximation x 0 s (1/16) η (fun z => s⁻¹ • (v z-v x))) : + LipschitzOnWith ⟨1+32*η,by positivity⟩ v U := + LipschitzOnWith.of_dist_le_mul fun x hx y hy => + (coarse_fine_coordinate_distance hr hη herror hU hcoarse hfine x hx y hy).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CommonFrameRadialFits.lean b/lean/OAI/Geometry/RCD/Coordinates/CommonFrameRadialFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..33dcae8e7ce91df782f31ab03fadb3a4276faf52 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CommonFrameRadialFits.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Coordinates.RebasedRadialFits +import OAI.Geometry.RCD.Coordinates.RadialFitRestriction +import OAI.Geometry.RCD.Harmonic.CenteredAffineDifference + +namespace OAI + +/-! # Transporting the actual radial fits to a common frame and region -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +/-- The common-frame residual is exactly the original residual at the +transported covector, including its recentering constant. -/ +theorem common_frame_radial_residual {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) + (G : Euclidean n →L[ℝ] SobolevSpace μ hQ) (x z : Euclidean n) + (N M : Euclidean n ≃L[ℝ] Euclidean n) (C : Euclidean n →L[ℝ] Euclidean n) + (b : Euclidean n) : + G (M.symm (N b)) - + (centeredSobolevMap μ hQ u η z).comp N.toContinuousLinearMap + (rebasedRadialOperator N M C b) - + ⟪z - x, C (M.symm (N b))⟫_ℝ • η = + G (M.symm (N b)) - centeredAffineSobolev μ hQ u η x (C (M.symm (N b))) := by + rw [centered_radial_rebase μ hQ u η x z N M C b] + module + +omit [ProperSpace X] in +/-- The volume ratio and frame operator norm account for all losses when +the original all-covector radial fit is used on the common commutator region. -/ +theorem common_frame_radial_bounds {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) + (G : Euclidean n →L[ℝ] SobolevSpace μ hQ) (x z : Euclidean n) + (N M : Euclidean n ≃L[ℝ] Euclidean n) (C : Euclidean n →L[ℝ] Euclidean n) + {Ωv Ωe Ω : Set X} (hΩv : Ω ⊆ Ωv) (hΩe : Ω ⊆ Ωe) + (hvfin : μ Ωv ≠ ∞) (hfin : μ Ω ≠ ∞) + (hvpos : 0 < μ.real Ωv) (hepos : 0 < μ.real Ωe) (hpos : 0 < μ.real Ω) + {V W E D : ℝ} (hE : 0 ≤ E) (hD : 0 ≤ D) + (hvolv : μ.real Ωv ≤ V * μ.real Ω) (hvole : μ.real Ωe ≤ W * μ.real Ω) + (hvalue : ∀ a, ‖normalizeLocalL2 μ Ωv hvfin (SobolevSpace.restrictLp μ hQ Ωv + (G a - centeredAffineSobolev μ hQ u η x (C a)))‖ ^ 2 ≤ E * ‖a‖ ^ 2) + (henergy : ∀ a, (μ.real Ωe)⁻¹ * (∫ t in Ωe, localGamma μ hQ + (G a - centeredAffineSobolev μ hQ u η x (C a)) + (G a - centeredAffineSobolev μ hQ u η x (C a)) t ∂μ) ≤ D * ‖a‖ ^ 2) + (b : Euclidean n) : + let P := M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap + let R := G (P b) - + (centeredSobolevMap μ hQ u η z).comp N.toContinuousLinearMap + (rebasedRadialOperator N M C b) - ⟪z - x, C (P b)⟫_ℝ • η + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω R)‖ ^ 2 ≤ + V * (E * ‖P‖ ^ 2) * ‖b‖ ^ 2 ∧ + (μ.real Ω)⁻¹ * (∫ t in Ω, localGamma μ hQ R R t ∂μ) ≤ + W * (D * ‖P‖ ^ 2) * ‖b‖ ^ 2 := by + dsimp only + have hrebase := common_frame_radial_residual μ hQ u η G x z N M C b + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe] at hrebase ⊢ + rw [hrebase] + let P := M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap + have hnorm (F : ℝ) (hF : 0 ≤ F) : F * ‖P b‖ ^ 2 ≤ F * ‖P‖ ^ 2 * ‖b‖ ^ 2 := by + calc + _ ≤ F * (‖P‖ * ‖b‖) ^ 2 := by gcongr; exact P.le_opNorm b + _ = _ := by ring + have hv := normalized_fit_restrict_sq μ hQ hΩv hvfin hfin hvpos hpos + (G (P b) - centeredAffineSobolev μ hQ u η x (C (P b))) + (mul_nonneg (mul_nonneg hE (sq_nonneg _)) (sq_nonneg _)) hvolv + ((hvalue (P b)).trans (hnorm E hE)) + have he := normalized_fit_energy_restrict μ hQ hΩe hepos hpos + (G (P b) - centeredAffineSobolev μ hQ u η x (C (P b))) + (mul_nonneg (mul_nonneg hD (sq_nonneg _)) (sq_nonneg _)) hvole + ((henergy (P b)).trans (hnorm D hD)) + constructor + · simpa only [P, ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, mul_assoc] using hv + · simpa only [P, ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, mul_assoc] using he + +omit [BorelSpace X] [ProperSpace X] in +/-- Centering the common harmonic column changes each covector by a +locally constant function, represented by the same compact cutoff. -/ +theorem centered_sobolev_constant_difference {n : ℕ} + (Ω : Set X) (u : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) + (z b : Euclidean n) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) : + SobolevSpace.toLp μ hQ (centeredSobolevMap μ hQ u η z b - sobolevColumnMap μ hQ u b) + =ᵐ[μ.restrict Ω] fun _ => -⟪z, b⟫_ℝ := by + have he : centeredSobolevMap μ hQ u η z b - sobolevColumnMap μ hQ u b = + (-⟪z, b⟫_ℝ) • η := by + simp only [centeredSobolevMap, sub_apply, ContinuousLinearMap.smulRight_apply, + innerSL_apply_apply] + module + rw [he] + change SobolevSpace.toLpCLM μ hQ ((-⟪z, b⟫_ℝ) • η) =ᵐ[μ.restrict Ω] _ + rw [map_smul] + filter_upwards [hη, ae_restrict_of_ae + (Lp.coeFn_smul (-⟪z, b⟫_ℝ) (SobolevSpace.toLp μ hQ η))] with x hx hs + change ((-⟪z, b⟫_ℝ) • SobolevSpace.toLp μ hQ η) x = _ + simp only [hs, Pi.smul_apply, smul_eq_mul, hx, mul_one] + +/-- The transported radial family remains a representative of the +derivative of the same centered coordinate map in the common frame. -/ +theorem common_frame_radial_representative {n : ℕ} + (Ω : Set X) (f : SobolevSpace μ hQ) (u : Fin n → SobolevSpace μ hQ) + (η : SobolevSpace μ hQ) (z : Euclidean n) + (N M : Euclidean n ≃L[ℝ] Euclidean n) + (G : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hG : ∀ a, SobolevSpace.toLp μ hQ (G a) =ᵐ[μ.restrict Ω] + localGamma μ hQ f (sobolevColumnMap μ hQ u (M a))) (b : Euclidean n) : + SobolevSpace.toLp μ hQ (G (M.symm (N b))) =ᵐ[μ.restrict Ω] + localGamma μ hQ f ((centeredSobolevMap μ hQ u η z).comp N.toContinuousLinearMap b) := by + have hrep := hG (M.symm (N b)) + rw [M.apply_symm_apply] at hrep + have hd := localGamma_eq_of_constant_difference μ hQ Ω + (centeredSobolevMap μ hQ u η z (N b)) (sobolevColumnMap μ hQ u (N b)) f + (-⟪z, N b⟫_ℝ) (centered_sobolev_constant_difference μ hQ Ω u η z (N b) hη) + filter_upwards [hrep, hd, + ae_restrict_of_ae (localGamma_comm μ hQ f (centeredSobolevMap μ hQ u η z (N b))), + ae_restrict_of_ae (localGamma_comm μ hQ f (sobolevColumnMap μ hQ u (N b)))] + with x hr hd hc hc' + change _ = localGamma μ hQ f (centeredSobolevMap μ hQ u η z (N b)) x + exact hr.trans (hc'.trans (hd.symm.trans hc.symm)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CompactFactorRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/CompactFactorRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..400214ae587bda850f0f5592bcb2e1f80ec8cfd8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CompactFactorRegularity.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Metric.CompactFactorL2 +import OAI.Geometry.RCD.Coordinates.KernelHeatBoundedRegularity +import OAI.Geometry.RCD.Heat.KernelHeatSpatialSource + +namespace OAI + +/-! # Bounded Lipschitz and weak-Laplacian data for the actual heat factors -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped ENNReal NNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +theorem compact_heat_factor_regularity {S : Set X} [CompactSpace S] + (ν : Measure S) [IsProbabilityMeasure ν] (ρ : X → ℝ) + (hρ : Measurable ρ) (hρ0 : ∀ x, 0 ≤ ρ x) {C : ℝ≥0} + (hC : ∀ᵐ x ∂hausdorff n X, |ρ x| ≤ C) + (hν : ν.map Subtype.val = (hausdorff n X).withDensity (fun x => ENNReal.ofReal (ρ x))) + (F : C(S, ℝ)) : + ∃ D : ℝ≥0, ∀ (t : ℝ) (ht : 0 < t), + LipschitzWith ⟨Real.sqrt ((D:ℝ)^2/(2*t*Real.exp (-2 * |K| * t))),Real.sqrt_nonneg _⟩ + (hX.compactHeatFactor hn p ν F t ht) ∧ + (∀ x, |hX.compactHeatFactor hn p ν F t ht x| ≤ D) ∧ + ∃ (u : SobolevSpace (hausdorff n X) hX.quadratic) (d : Lp ℝ 2 (hausdorff n X)), + (hX.compactHeatFactor hn p ν F t ht =ᵐ[hausdorff n X] + SobolevSpace.toLp (hausdorff n X) hX.quadratic u) ∧ + IsWeakLaplacian (hausdorff n X) hX.quadratic u d := by + obtain ⟨f,hf,he⟩ := hX.compact_heat_factor_L2 hn p ν ρ hρ hρ0 hC hν F + obtain ⟨D,hD⟩ := hf + refine ⟨D,?_⟩ + intro t ht + have hfun : hX.compactHeatFactor hn p ν F t ht = + kernelHeat (hausdorff n X) hX.quadratic + (hX.canonicalHeatKernel_isContinuousHeatKernel hn p) t f := funext (he t ht) + rw [hfun] + obtain ⟨hl,hb⟩ := hX.kernelHeat_bounded_regularity hn p + (hX.canonicalHeatKernel_isContinuousHeatKernel hn p) f D hD t ht + obtain ⟨u,d,hu,hd,_⟩ := kernelHeat_spatial_source (hausdorff n X) hX.quadratic + (hX.canonicalHeatKernel_isContinuousHeatKernel hn p) f ht + exact ⟨hl,hb,u,d,hu,hd⟩ + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CompactHeatGaugeNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/CompactHeatGaugeNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..2634a372b224748253d46fafd24455e37cb84c3f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CompactHeatGaugeNormalization.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Metric.FixedGaugeScaledPotential + +namespace OAI + +/-! # Positive endpoint scaling realizes the fixed additive heat gauge -/ + +open Set Filter MeasureTheory TopologicalSpace +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +theorem compactHeatFactor_smul {S : Set X} [CompactSpace S] + (ν : Measure S) [IsProbabilityMeasure ν] (F : C(S,ℝ)) + (a t : ℝ) (ht : 0 < t) (x : X) : + hX.compactHeatFactor hn p ν (a • F) t ht x = + a*hX.compactHeatFactor hn p ν F t ht x := by + change (∫ y, hX.compactHeatFactorKernel hn p S t ht (x,y)*(a*F y) ∂ν) = + a*(∫ y, hX.compactHeatFactorKernel hn p S t ht (x,y)*F y ∂ν) + rw [← integral_const_mul] + apply integral_congr_ae + exact Eventually.of_forall fun _ => by ring + +theorem fixedGaugeScaledPotential_normalized {S : Set X} [CompactSpace S] + (ν : Measure S) [IsProbabilityMeasure ν] (F : C(S,ℝ)) (hF : ∀ y, 0 < F y) + {ε δ t : ℝ} (hε : 0 < ε) (hδ : 0 < δ) (ht : δ ≤ t) (z : X) : + ∃ G : C(S,ℝ), (∀ y, 0 < G y) ∧ ∀ x, + hX.fixedGaugeScaledPotential hn p ν F ε hε δ hδ z t x = + ε*Real.log (hX.compactHeatFactor hn p ν G (ε*t/2) + (div_pos (mul_pos hε (hδ.trans_le ht)) (by norm_num)) x) := by + let c := hX.compactHeatFactor hn p ν F ε hε z + have hc : 0 < c := hX.compactHeatFactor_positive hn p ν F hF ε hε z + refine ⟨c⁻¹ • F,fun y => mul_pos (inv_pos.mpr hc) (hF y),?_⟩ + intro x + rw [hX.fixedGaugeScaledPotential_eq hn p ν F ε hε δ hδ z ht x] + dsimp only [scaledCompactHeatPotential] + rw [hX.compactHeatFactor_smul,Real.log_mul (inv_ne_zero hc.ne') + (hX.compactHeatFactor_positive hn p ν F hF _ _ x).ne',Real.log_inv] + dsimp only [c] + ring + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CompactHeatOsmoticRegular.lean b/lean/OAI/Geometry/RCD/Coordinates/CompactHeatOsmoticRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..e59961f99e668f354fdd43c245fa77743f4c8ea8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CompactHeatOsmoticRegular.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Coordinates.BoundedHeatLogRegular +import OAI.Geometry.RCD.Heat.CompactHeatOsmoticGradient + +namespace OAI + +/-! # Bounded regular representatives of the actual osmotic potential -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD.CompactHeatScalingData +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + {hn : 2≤n} {p : X} [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + {S T : Set X} [CompactSpace S] [CompactSpace T] + {μ : Measure S} {ν : Measure T} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] + {ε : ℕ → ℝ} {hε : ∀ k, 0<ε k} + (D : hX.CompactHeatScalingData hn p μ ν ε hε) + +theorem osmotic_regular + (ρ₀ ρ₁ : X → ℝ) (hm₀ : Measurable ρ₀) (hm₁ : Measurable ρ₁) + (hp₀ : ∀ x, 0≤ρ₀ x) (hp₁ : ∀ x, 0≤ρ₁ x) {C₀ C₁ : ℝ≥0} + (hC₀ : ∀ᵐ x ∂hausdorff n X, |ρ₀ x|≤C₀) + (hC₁ : ∀ᵐ x ∂hausdorff n X, |ρ₁ x|≤C₁) + (hμ : μ.map Subtype.val=(hausdorff n X).withDensity (fun x => ENNReal.ofReal (ρ₀ x))) + (hν : ν.map Subtype.val=(hausdorff n X).withDensity (fun x => ENNReal.ofReal (ρ₁ x))) + (k : ℕ) (t : Ioo (0:ℝ) 1) {Ω : Set X} (hΩ : IsCompact Ω) : + ∃ (η : SobolevSpace (hausdorff n X) hX.quadratic) (q : Lp ℝ 2 (hausdorff n X)) + (V : X → ℝ) (L B : ℝ≥0), + IsWeakLaplacian (hausdorff n X) hX.quadratic η q ∧ LipschitzWith L V ∧ + (∀ x, |V x|≤B) ∧ (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[hausdorff n X] V) ∧ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η + =ᵐ[(hausdorff n X).restrict Ω] D.osmoticPotential k t) := by + let m := hausdorff n X + let Q := hX.quadratic + let hk := hX.canonicalHeatKernel_isContinuousHeatKernel hn p + let c : ℝ≥0 := ⟨ε k/4,(div_pos (hε k) (by norm_num)).le⟩ + have hc : 0<(c:ℝ) := div_pos (hε k) (by norm_num) + have hs : 0<(c:ℝ)*(t:ℝ) := mul_pos hc t.property.1 + have ht : 0<(c:ℝ)*(1-t) := mul_pos hc (sub_pos.mpr t.property.2) + obtain ⟨f,A,-,hf,hef⟩ := hX.compact_heat_factor_nonnegative_L2 hn p μ ρ₀ hm₀ hp₀ hC₀ hμ + (D.left k) (fun a => (D.left_pos k a).le) + obtain ⟨g,B,-,hg,heg⟩ := hX.compact_heat_factor_nonnegative_L2 hn p ν ρ₁ hm₁ hp₁ hC₁ hν + (D.right k) (fun a => (D.right_pos k a).le) + have hpf : ∀ x∈Ω, 0 (c:ℝ)*(U x+V x) := by + filter_upwards [hu,hv,Lp.coeFn_add (SobolevSpace.toLp m Q u) (SobolevSpace.toLp m Q v), + Lp.coeFn_smul (c:ℝ) (SobolevSpace.toLp m Q (u+v))] with x hux hvx ha hm + change SobolevSpace.toLp m Q η x=(c:ℝ)*SobolevSpace.toLp m Q (u+v) x at hm + change SobolevSpace.toLp m Q u x=U x at hux + change SobolevSpace.toLp m Q v x=V x at hvx + rw [hm] + simp only [map_add] + rw [ha] + simp only [Pi.add_apply] + rw [hux,hvx] + refine ⟨η,(c:ℝ) • (du+dv),fun x => (c:ℝ)*(U x+V x),‖(c:ℝ)‖₊*(L+M),c*(A'+B'), + ((hdu.add m Q hdv).smul m Q (c:ℝ)),?_,?_,hrep,?_⟩ + · apply LipschitzWith.of_dist_le_mul + intro x y + have hh := mul_le_mul_of_nonneg_left ((hU.add hV).dist_le_mul x y) (abs_nonneg (c:ℝ)) + simpa only [Real.dist_eq,← mul_sub,abs_mul,NNReal.coe_mul,coe_nnnorm, + Real.norm_eq_abs,mul_assoc] using hh + · intro x + rw [abs_mul,abs_of_nonneg c.coe_nonneg] + exact mul_le_mul_of_nonneg_left ((abs_add_le _ _).trans (add_le_add (hUA x) (hVB x))) c.coe_nonneg + · filter_upwards [hur,hvr,ae_restrict_of_ae hrep,ae_restrict_of_ae hu,ae_restrict_of_ae hv] + with x hux hvx he hu' hv' + rw [he,← hu',← hv',hux,hvx,← hef _ hs x,← heg _ ht x] + dsimp only [osmoticPotential,interpolationDensity] + rw [Real.log_mul + (hX.compactHeatFactor_positive hn p μ (D.left k) (D.left_pos k) _ _ x).ne' + (hX.compactHeatFactor_positive hn p ν (D.right k) (D.right_pos k) _ _ x).ne'] + rfl + +end RegularPointCoordinates.NoncollapsedRCD.CompactHeatScalingData + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CompactRadialPullback.lean b/lean/OAI/Geometry/RCD/Coordinates/CompactRadialPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3b6d2221d95f0bd131eceae94bba7184c63f690 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CompactRadialPullback.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Harmonic.MeasuredRadialL2 +import OAI.Geometry.RCD.Sobolev.GammaL2Bound + +namespace OAI + +/-! # Compact radial weights agree on the gradients of supported recoveries -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem compact_radial_pullback (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} {S c T : ℝ} (hS : 0 ‖z‖^2/2) (closedBall 0 T)) : + ∀ᶠ k in atTop, (fun x => (‖V k x‖^2/2)*localGamma μ hQ (u k) (w k) x)=ᵐ[μ] + (fun x => F (V k x)*localGamma μ hQ (u k) (w k) x) := by + filter_upwards [hε.eventually (gt_mem_nhds (show 0<(T-c)/2 by linarith))] with k hk + filter_upwards [hz k,localGamma_zero_on_level μ hQ (u k) (w k) 0] with x hx hγ + by_cases hxc : x∈ball (p k) (c*r k) + · have hxs : dist x (p k)≤S*r k := + hxc.le.trans (mul_le_mul_of_nonneg_right (hcT.trans hTS).le (hr k).le) + have hd := (abs_le.mp (pointed_radial_distance (hr k) hS.le (hV k).metric hxs)).2 + have hdc : dist x (p k)/r k (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p t) measurableSet_ball A := by + obtain ⟨C,hC,hnormalize⟩ := hX.interior_radius_normalization hn τ hτ hτ1 + obtain ⟨θ,hθ,hsharp⟩ := hX.harmonic_l1_gradient_bound hn β (8*(n : ℝ)^2) hβ (by positivity) + let D := 8*(n : ℝ)^2*C+1 + have ha : 0 ≤ (n : ℝ)^2*C := mul_nonneg (sq_nonneg _) (zero_le_one.trans hC) + have hD : 0 < D := by dsimp only [D]; nlinarith + let δ := min 1 (min ((1/2)/D) (min (β/D) (θ/D))) + have hδ : 0 < δ := lt_min zero_lt_one + (lt_min (div_pos (by norm_num) hD) (lt_min (div_pos hβ hD) (div_pos hθ hD))) + have hδ1 : δ ≤ 1 := min_le_left _ _ + have hhalf : D*δ ≤ 1/2 := by + have hh : δ ≤ (1/2)/D := (min_le_right _ _).trans (min_le_left _ _) + nlinarith [(le_div_iff₀ hD).mp hh] + have hbet : D*δ ≤ β := by + have hh : δ ≤ β/D := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)) + nlinarith [(le_div_iff₀ hD).mp hh] + have htheta : D*δ ≤ θ := by + have hh : δ ≤ θ/D := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)) + nlinarith [(le_div_iff₀ hD).mp hh] + have hsmall : (n : ℝ)^2*(C*δ) ≤ 1/2 := by dsimp only [D] at hhalf; nlinarith + have hgramsmall : 8*(n : ℝ)^2*(C*δ) ≤ β := by dsimp only [D] at hbet; nlinarith + have herrorsmall : 4*(n : ℝ)^2*(C*δ) ≤ θ := by + dsimp only [D] at htheta + nlinarith [mul_nonneg ha hδ.le] + refine ⟨δ,hδ,?_⟩ + intro p R hR hcurv u v hfirst t ht htR + let μ := hausdorff n X + let U := sobolevColumnMap μ hX.quadratic u + have ht0 : 0 < t := lt_of_lt_of_le (by positivity : 0 < τ*R) ht + have htSub : ball p t ⊆ ball p (2*R) := ball_subset_ball (by linarith) + have hRSub : ball p t ⊆ ball p R := ball_subset_ball htR + have hz : μ (ball p t) ≠ 0 := (hX.fullSupport _ _ ht0).ne' + have hf : μ (ball p t) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hΩz : μ (ball p (2*R)) ≠ 0 := (hX.fullSupport _ _ (by positivity)).ne' + have hΩf : μ (ball p (2*R)) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + obtain ⟨hinner,A,hA,hnorm,hdir⟩ := hnormalize p R δ hR hcurv hδ.le hsmall u v hfirst t ht htR + have houter (z : Euclidean n) : (μ.real (ball p (2*R)))⁻¹*(∫ x in ball p (2*R), + |localGamma μ hX.quadratic (U (A z)) (U (A z)) x-‖z‖^2| ∂μ) + ≤ 4*(n : ℝ)^2*(C*δ)*‖z‖^2 := by + have he := normalized_outer_direction_error μ hX.quadratic u (ball p t) (ball p (2*R)) + measurableSet_ball hz hf hΩz hΩf hδ.le (mul_nonneg (zero_le_one.trans hC) hδ.le) + hsmall hinner.gram hfirst.gram A hA z + have hcoef : 2*(n : ℝ)^2*(δ+C*δ) ≤ 4*(n : ℝ)^2*(C*δ) := by + nlinarith [mul_nonneg (sq_nonneg (n : ℝ)) (mul_nonneg (sub_nonneg.mpr hC) hδ.le)] + exact he.trans (mul_le_mul_of_nonneg_right hcoef (sq_nonneg _)) + have hg (i : Fin n) : ∀ᵐ x ∂μ.restrict (ball p R), + localGamma μ hX.quadratic (transformedColumn μ hX.quadratic u A i) + (transformedColumn μ hX.quadratic u A i) x ≤ 1+β := by + let ei : Euclidean n := EuclideanSpace.single i 1 + have hAi : ‖A ei‖^2 ≤ 2 := by + have he : ‖A ei‖ ≤ ‖(A : Euclidean n →L[ℝ] Euclidean n)‖ := by + simpa only [ei,PiLp.norm_single,norm_one,mul_one,ContinuousLinearEquiv.coe_coe] using + (A : Euclidean n →L[ℝ] Euclidean n).le_opNorm ei + exact (pow_le_pow_left₀ (norm_nonneg _) he 2).trans hnorm + have hcoarse := hfirst.directional_gradient μ hX.quadratic (A ei) + have hcoef : ((n : ℝ)*(1+δ))^2 ≤ 4*(n : ℝ)^2 := + splittingDirectionBound_sq_le hδ.le hδ1 + have hb : ∀ᵐ x ∂μ.restrict (ball p (2*R)), + localGamma μ hX.quadratic (U (A ei)) (U (A ei)) x ≤ 8*(n : ℝ)^2 := by + filter_upwards [hcoarse] with x hx + have hm := mul_le_mul hcoef hAi (sq_nonneg _) (by positivity : 0 ≤ 4*(n : ℝ)^2) + nlinarith + have he : (μ.real (ball p (2*R)))⁻¹*(∫ x in ball p (2*R), + |localGamma μ hX.quadratic (U (A ei)) (U (A ei)) x-1| ∂μ) ≤ θ := by + have hh := houter ei + simp only [ei,PiLp.norm_single,norm_one,one_pow,mul_one] at hh + exact hh.trans herrorsmall + exact hsharp p R hR hcurv (U (A ei)) + (IsSobolevHarmonicOn.linearCombination μ hX.quadratic hfirst.harmonic (A ei)) hb he + have hgrams : ∀ i j : Fin n, (μ.real (ball p t))⁻¹*∫ x in ball p t, + |localGamma μ hX.quadratic (transformedColumn μ hX.quadratic u A i) + (transformedColumn μ hX.quadratic u A j) x-(if i=j then 1 else 0)| ∂μ ≤ β := by + have hh := directional_error_implies_gram μ hX.quadratic (transformedColumn μ hX.quadratic u A) + (ball p t) hf (show 0 ≤ 4*(n : ℝ)^2*(C*δ) by positivity) (by + intro z + rw [sobolevColumnMap_transformed] + exact hdir z) + intro i j + exact (hh i j).trans (by nlinarith only [hgramsmall]) + refine ⟨A,⟨?_,?_,?_,?_,hgrams⟩,hA⟩ + · intro i + have he := sobolevColumnMap_representative μ hX.quadratic u (ball p t) v + (fun j => ae_restrict_of_ae_restrict_of_subset htSub (hfirst.representative j)) + (A (EuclideanSpace.single i 1)) + filter_upwards [he] with x hx + change SobolevSpace.toLp μ hX.quadratic (U (A (EuclideanSpace.single i 1))) x = _ + rw [hx] + have ha := ContinuousLinearMap.adjoint_inner_left + (A : Euclidean n →L[ℝ] Euclidean n) (EuclideanSpace.single i 1) (v x) + simpa only [real_inner_comm,EuclideanSpace.inner_single_right,starRingEnd_apply, + star_trivial,one_mul,ContinuousLinearEquiv.coe_coe] using ha.symm + · exact (A : Euclidean n →L[ℝ] Euclidean n).adjoint.continuous.comp_continuousOn + (hfirst.continuous.mono htSub) + · exact transformedColumn_harmonic μ hX.quadratic u A (ball p t) + (fun i => (hfirst.harmonic i).mono μ hX.quadratic htSub) + · intro i + filter_upwards [ae_restrict_of_ae_restrict_of_subset hRSub (hg i)] with x hx + exact hx.trans (by nlinarith : 1+β ≤ (1+β)^2) + +theorem NoncollapsedRCD.comparable_radius_splitting {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (β : ℝ) (hβ : 0 < β) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -1 ≤ K*(2*R)^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) δ u v → + ∀ t : ℝ, R/2 ≤ t → t ≤ R → ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p t β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p t) measurableSet_ball A := by + simpa only [show ∀ R : ℝ, (1/2)*R=R/2 by intro R; ring] using + hX.interior_radius_splitting hn (1/2) (by norm_num) (by norm_num) β hβ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ConditionalMain.lean b/lean/OAI/Geometry/RCD/Coordinates/ConditionalMain.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea1163e382dd873d42f19b1f6ec6f5be10793d79 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ConditionalMain.lean @@ -0,0 +1,414 @@ +import OAI.Geometry.RCD.Coordinates.ActualRegularFlatness +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.ScaledChartPinching +import OAI.Geometry.RCD.Coordinates.ScaledPatchIteration +import OAI.Geometry.RCD.Coordinates.RegularLimitChart +import OAI.Geometry.RCD.Coordinates.PatchBudget +import OAI.Geometry.RCD.Coordinates.PatchGeometryMonotone + +namespace OAI + +/-! # Bi-Lipschitz coordinates from local geometric and analytic estimates + +The neighborhood and chart are constructed from harmonic approximation, +heat-kernel bounds, and summable directional pinching. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds_actual {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + (hGevrey : EuclideanGevreyCutoffInput (m + 2)) : + HasOpenBilipschitzChart (m + 2) p := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, Cpin, hB, hJ, hC, hA, hCχ, hCpin, hconstruct⟩ := + exists_scaled_pinching_field m hX ha hcompact hregular hvolume hmeasured hBG hdensity + hdistance hsobolev hpoisson haction hproduct hpoincare hpoissonCompact hhessian hmean + hinitial htrans hsplit (hX.uniformRegularFlatnessInput (by omega)) hbochner hcutoff hharmonic hgradient heuclidean + hmetricmeasure hk hg hdiff + obtain ⟨psi⟩ := hGevrey + obtain ⟨Theta, tau, hTheta, htau, hpatch⟩ := exists_scaled_patch_iteration hX hk c + obtain ⟨epsilon, hepsilon, hepsilon1, hchart⟩ := + regular_iteration_limit_chart hX psi hCpin.le hTheta + let epsilon₀ := min epsilon tau + have hepsilon₀ : 0 < epsilon₀ := lt_min hepsilon htau + have hepsilon₀epsilon : epsilon₀ ≤ epsilon := min_le_left _ _ + have hepsilon₀tau : epsilon₀ ≤ tau := min_le_right _ _ + let n := m + 2 + let N := patchOverlapBound n (1 / 2) 2 3 + let g4 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) + let g2 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) + let g8 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) + let g64 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) + let Lpair := iterationPairMultiplier Theta + (patchJetBase N (Real.sqrt (3 * Cpin)) (psi.constant * 536870912)) 64 + let Dmass := 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ + have hg4 : 0 ≤ g4 := by dsimp only [g4]; positivity + have hg2 : 0 ≤ g2 := by dsimp only [g2]; positivity + have hg8 : 0 ≤ g8 := by dsimp only [g8]; positivity + have hg64 : 0 ≤ g64 := by dsimp only [g64]; positivity + have hLpair : 0 ≤ Lpair := by + have hTheta0 : 0 < Theta := lt_of_lt_of_le zero_lt_one hTheta + have hL : 1 ≤ psi.constant * 536870912 := by nlinarith only [psi.constant_ge_one] + have hJet := patchJetBase_ge_one (N := (N : ℝ)) (L := Real.sqrt (3 * Cpin)) hL + dsimp only [Lpair, iterationPairMultiplier, iterationChartRatio] + positivity + have hDmass : 0 ≤ Dmass := by + have homega := euclideanUnitVolume_pos n + have hCχ0 : 0 ≤ Cχ := zero_le_one.trans hCχ + dsimp only [Dmass, pinchingMassUnitFactor, regularSmallMassCoefficient] + positivity + let P := g4 + g2 + g8 + g64 + Lpair + 2 * Dmass + (N : ℝ) * (2 * Dmass) + have hND : 0 ≤ (N : ℝ) * (2 * Dmass) := by positivity + have hP : 0 ≤ P := by dsimp only [P]; positivity + obtain ⟨budget, hbudget, hbudgetE, hbudgetSmall, hproducts⟩ := + exists_uniform_patch_budget hP hepsilon₀ + obtain ⟨zeta, eta, hzeta, heta, e, hmatch, hzetaBudget, ⟨f⟩⟩ := hconstruct budget hbudget + have hbounded (t : ℝ) (ht : 0 ≤ t) (htP : t ≤ P) : + t * zeta ≤ min epsilon₀ (1 / 8192) := + (mul_le_mul_of_nonneg_left hzetaBudget ht).trans (hproducts t ht htP) + have hsmallTarget : min epsilon₀ (1 / 8192) ≤ (1 / 4 : ℝ) := + (min_le_right _ _).trans (by norm_num) + have hgram : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4 := by + have h := hbounded g4 hg4 (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + simpa only [g4, mul_assoc] using h.trans (hsmallTarget.trans (by norm_num : (1 / 4 : ℝ) ≤ 3 / 4)) + have hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4 := by + have h := hbounded g2 hg2 (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + simpa only [g2, mul_assoc] using h.trans hsmallTarget + have hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2 := by + have h := hbounded g8 hg8 (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + simpa only [g8, mul_assoc] using h.trans (hsmallTarget.trans (by norm_num : (1 / 4 : ℝ) ≤ 1 / 2)) + have hwide : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4 := by + have h := hbounded g64 hg64 (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + simpa only [g64, mul_assoc] using h.trans hsmallTarget + have hzetaSmall : zeta ≤ 1 / 2048 := + hzetaBudget.trans (hbudgetSmall.trans (by norm_num)) + have hzeta64 : zeta ≤ 1 / 64 := hzetaSmall.trans (by norm_num) + have hzetaL : zeta * Lpair ≤ 2097152 := by + have h := hbounded Lpair hLpair (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + simpa only [mul_comm] using h.trans (hsmallTarget.trans (by norm_num : (1 / 4 : ℝ) ≤ 2097152)) + have hcurv : |K| * e.heat.radius ^ 2 ≤ zeta := hmatch.2.2.2.2.2.2.2 + have hlocal (i : ℕ) : zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2 ≤ 2 * zeta := by + have hr : e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) ≤ e.heat.radius := + div_le_self e.heat.radius_pos.le (one_le_pow₀ (by norm_num)) + have hs : 0 ≤ e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := + div_nonneg e.heat.radius_pos.le (by positivity) + have hsq := (sq_le_sq₀ hs e.heat.radius_pos.le).mpr hr + have hh := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + linarith only [hh, hcurv] + have hcoef (i : ℕ) : Dmass * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon₀ := by + have h := hbounded (2 * Dmass) (by positivity) (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + have hh := mul_le_mul_of_nonneg_left (hlocal i) hDmass + nlinarith only [hh, h.trans (min_le_left _ _)] + have hmass (i : ℕ) : (N : ℝ) * (Dmass * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2)) ≤ epsilon₀ := by + have h := hbounded ((N : ℝ) * (2 * Dmass)) (by positivity) (by dsimp only [P]; linarith only [hg4, hg2, hg8, hg64, hLpair, hDmass, hND]) + have hh := mul_le_mul_of_nonneg_left (hlocal i) + (show 0 ≤ (N : ℝ) * Dmass by positivity) + nlinarith only [hh, h.trans (min_le_left _ _)] + obtain ⟨hΩ, chart, hchartValues⟩ := regular_working_chart hX e hzeta.le hzetaSmall hgram + obtain ⟨inverse, hinverse⟩ := exists_working_chart_inverse e.heat chart hchartValues + let selection := regularPatchSelection hX e hzeta64 psi f hCpin.le + obtain ⟨g, hg⟩ := hpatch e hmatch hzeta.le hzeta64 (zero_le_one.trans hCχ) (by norm_num) + hsmall hnear hwide psi f selection epsilon₀ hepsilon₀.le hepsilon₀tau hbudgetE hcoef hmass + _ inverse hinverse + exact hchart e hzeta.le hzetaSmall hgram hnear hzetaL _ hΩ chart hchartValues + inverse hinverse (g.monoError hepsilon₀epsilon) hg + +theorem regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (_hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + (hGevrey : EuclideanGevreyCutoffInput (m + 2)) : + HasOpenBilipschitzChart (m + 2) p := by + exact regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds_actual m hX ha + hcompact hregular hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson + haction hproduct hpoincare hpoissonCompact hhessian hmean hinitial htrans hsplit + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +theorem regular_point_has_open_bilipschitz_chart_conditional {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalAlmostSplittingInput hX) (hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasGaussianHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + (hGevrey : EuclideanGevreyCutoffInput (m + 2)) : + HasOpenBilipschitzChart (m + 2) p := by + exact regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit.flatSplittingInput hrigidity hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg.toCoordinate hdiff hGevrey + +theorem regular_point_has_open_bilipschitz_chart_of_coordinate_heat_bounds {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalAlmostSplittingInput hX) (hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + (hGevrey : EuclideanGevreyCutoffInput (m + 2)) : + HasOpenBilipschitzChart (m + 2) p := by + exact regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit.flatSplittingInput hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +/-- Regular points in dimension at least two admit charts with two-sided +ambient-distance bounds under the stated local estimates. -/ +theorem every_regular_point_has_bilipschitz_coordinates_of_flat_coordinate_heat_bounds {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff n X) n p + (euclideanUnitVolume n)) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff n X) n p) + (hBG : BallVolumeComparison (hausdorff n X) (comparisonModelVolume (n - 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff n X) + (comparisonModelVolume (n - 1) a) y (euclideanUnitVolume n)) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff n X) ker) + (hGevrey : EuclideanGevreyCutoffInput n) : + HasOpenBilipschitzChart n p := by + obtain ⟨m, rfl⟩ : ∃ m, n = m + 2 := ⟨n - 2, by omega⟩ + exact regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +theorem every_regular_point_has_bilipschitz_coordinates_of_flat_coordinate_heat_bounds_actual {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff n X) n p + (euclideanUnitVolume n)) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff n X) n p) + (hBG : BallVolumeComparison (hausdorff n X) (comparisonModelVolume (n - 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff n X) + (comparisonModelVolume (n - 1) a) y (euclideanUnitVolume n)) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff n X) ker) + (hGevrey : EuclideanGevreyCutoffInput n) : + HasOpenBilipschitzChart n p := by + obtain ⟨m, rfl⟩ : ∃ m, n = m + 2 := ⟨n - 2, by omega⟩ + exact regular_point_has_open_bilipschitz_chart_of_flat_coordinate_heat_bounds_actual m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +theorem every_regular_point_has_bilipschitz_coordinates_of_coordinate_heat_bounds {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff n X) n p + (euclideanUnitVolume n)) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff n X) n p) + (hBG : BallVolumeComparison (hausdorff n X) (comparisonModelVolume (n - 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff n X) + (comparisonModelVolume (n - 1) a) y (euclideanUnitVolume n)) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalAlmostSplittingInput hX) (hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff n X) ker) + (hGevrey : EuclideanGevreyCutoffInput n) : + HasOpenBilipschitzChart n p := by + obtain ⟨m, rfl⟩ : ∃ m, n = m + 2 := ⟨n - 2, by omega⟩ + exact regular_point_has_open_bilipschitz_chart_of_coordinate_heat_bounds m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +/-- Regular points in dimension at least two admit charts with two-sided +ambient-distance bounds under the stated local estimates. -/ +theorem every_regular_point_has_bilipschitz_coordinates_conditional {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff n X) n p + (euclideanUnitVolume n)) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff n X) n p) + (hBG : BallVolumeComparison (hausdorff n X) (comparisonModelVolume (n - 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff n X) + (comparisonModelVolume (n - 1) a) y (euclideanUnitVolume n)) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalAlmostSplittingInput hX) (hrigidity : LocalVolumeRigidityInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasGaussianHeatBounds (hausdorff n X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff n X) ker) + (hGevrey : EuclideanGevreyCutoffInput n) : + HasOpenBilipschitzChart n p := by + obtain ⟨m, rfl⟩ : ∃ m, n = m + 2 := ⟨n - 2, by omega⟩ + exact regular_point_has_open_bilipschitz_chart_conditional m hX ha hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff hGevrey + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ControlledNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/ControlledNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..57834340a279d3065f5da16061339a886489ece0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ControlledNormalization.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Coordinates.TransformationInput + +namespace OAI + +/-! +# Exact normalization retaining arbitrarily small splitting error + +The two published harmonic inputs are applied with compatible thresholds. +Metric flatness supplies the no-extra-factor hypothesis by a proved finite +configuration argument. The resulting normalization acts on the actual +Sobolev column, and its pointwise coordinate map approximates the metric. +-/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +private theorem controlled_scaled_curvature_lower {K δ ε r R : ℝ} (hr : 0 < r) (hrR : r ≤ R) + (hδε : δ ≤ ε) (hε : 0 ≤ ε) (hcurv : -δ ≤ K * R ^ 2) : -ε ≤ K * r ^ 2 := by + by_cases hK : 0 ≤ K + · have hp := mul_nonneg hK (sq_nonneg r) + linarith + · have hs : r ^ 2 ≤ R ^ 2 := by nlinarith + have hm := mul_le_mul_of_nonpos_left hs (le_of_not_ge hK) + exact (neg_le_neg hδε).trans (hcurv.trans hm) + +universe u + +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A common threshold retains exact means, the prescribed first-order error, +and metric approximation at every interior scale. The extra quantitative +conclusion is already present in Huang--Huang Theorem 4.1(1). -/ +theorem controlled_normalization_of_published_inputs {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (htrans : LocalTransformationInput hX) (hsplit : LocalFlatSplittingInput hX) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -δ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * R) δ u v → + (∀ s : ℝ, 0 < s → s ≤ R → + ∃ f : X → Euclidean n, IsPointedApproximation p 0 s 2 δ f) → + ∀ r : ℝ, 0 < r → 16 * r ≤ R → ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16 * r) β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsPointedApproximation p 0 r (1 / 2) ρ + (fun x => r⁻¹ • ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p))) := by + obtain ⟨τ, ε, hτ, hε, happ⟩ := hsplit hn ρ hρ + let η : ℝ := 1 / (100 * ((n + 1 : ℕ) : ℝ) ^ 2) + have hη : 0 < η := by dsimp [η]; positivity + let ε' := min ε β + have hε' : 0 < ε' := lt_min hε hβ + obtain ⟨d, hd, hnormalize⟩ := htrans hn ε' η hε' hη + let δ := min (d / 3) (min ε (min τ (η / 3))) + have hδ : 0 < δ := lt_min (by positivity) (lt_min hε (lt_min hτ (by positivity))) + have hδd : 3 * δ ≤ d := by have h := min_le_left (d / 3) (min ε (min τ (η / 3))); dsimp [δ]; linarith + have hδε : δ ≤ ε := (min_le_right _ _).trans (min_le_left _ _) + have hδτ : δ ≤ τ := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)) + have hδη : 3 * δ ≤ η := by + have h : δ ≤ η / 3 := (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)) + linarith + have hδd' : δ ≤ d := by linarith + refine ⟨δ, hδ, ?_⟩ + intro p R hR hcurv u v hu hflat r hr hrR + have hgeometry (s : ℝ) (hs : 0 < s) (hsR : s ≤ R) : + (∃ f : X → Euclidean n, IsPointedApproximation p 0 s 1 d f) ∧ + NoExtraEuclideanFactor n p s η := by + obtain ⟨f, hf⟩ := hflat s hs hsR + have hsmall := hf.restrict_radius hs (by norm_num : (0 : ℝ) ≤ 1) + (by norm_num : (1 : ℝ) ≤ 2) hδ.le + exact ⟨⟨f, hsmall.mono_error hδd⟩, + noExtraEuclideanFactor_of_approximation n hs (by positivity) hδη f hsmall⟩ + have hu' := hu.mono_error (hausdorff n X) hX.quadratic hδ.le hδd' + obtain ⟨A, hAfirst, hAexact⟩ := hnormalize p R hR + ((neg_le_neg hδd').trans hcurv) u v hu' hgeometry (16 * r) (by positivity) hrR + have hAε := hAfirst.mono_error (hausdorff n X) hX.quadratic hε'.le (min_le_left _ _) + have hAβ := hAfirst.mono_error (hausdorff n X) hX.quadratic hε'.le (min_le_right _ _) + refine ⟨A, hAexact, hAβ, ?_⟩ + have hrR' : r ≤ R := by linarith + have hcurv' : -ε ≤ K * r ^ 2 := controlled_scaled_curvature_lower hr hrR' hδε hε.le hcurv + apply happ p r hr hcurv' (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) hAε + obtain ⟨f, hf⟩ := hflat r hr hrR' + exact ⟨f, hf.mono_error hδτ⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinateBilinear.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinateBilinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee35c46df21a033741a58fbe250aadf9fda88ecb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinateBilinear.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion + +namespace OAI + +/-! # Bilinear forms determined by their finite coordinate entries -/ + +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {m : ℕ} {F : Type*} [AddCommGroup F] [Module ℝ F] + +def coordinateBilinear (a : Fin m → Fin m → F) : + Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] F := + (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.constr ℝ fun i => + (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.constr ℝ (a i) + +theorem coordinateBilinear_apply (a : Fin m → Fin m → F) (v w : Euclidean m) : + coordinateBilinear a v w = ∑ i : Fin m, ∑ j : Fin m, (v i * w j) • a i j := by + simp only [coordinateBilinear, Module.Basis.constr_apply_fintype, + LinearMap.sum_apply, LinearMap.smul_apply, Finset.smul_sum, smul_smul] + rfl + +theorem coordinateBilinear_symmetric (a : Fin m → Fin m → F) + (ha : ∀ i j, a i j = a j i) (v w : Euclidean m) : + coordinateBilinear a v w = coordinateBilinear a w v := by + rw [coordinateBilinear_apply, coordinateBilinear_apply, Finset.sum_comm] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + rw [ha i j, mul_comm] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinateEllipsoids.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinateEllipsoids.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b899185809db97ba31c5bbcf149861604cd96f1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinateEllipsoids.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Coordinates.OpenCoordinates +import OAI.Geometry.RCD.Coordinates.MetricIteration + +namespace OAI + +/-! # The quarter-scale open-map construction supplies dyadic ellipsoids -/ + +open Set + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [CompleteSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem coordinateQuarterRadius_eq_even_iterationRadius (r : ℝ) (i : ℕ) : + coordinateQuarterRadius r i = iterationRadius r (2 * i) := by + simp only [coordinateQuarterRadius, iterationRadius, pow_mul] + rw [show (2 : ℝ) ^ 2 = 4 by norm_num] + rw [show (1 / 4 : ℝ) = (4 : ℝ)⁻¹ by norm_num, inv_pow, div_eq_mul_inv] + +theorem quarter_half_index_bounds {r : ℝ} (hr : 0 ≤ r) (i : ℕ) : + iterationRadius r i ≤ coordinateQuarterRadius r (i / 2) ∧ + coordinateQuarterRadius r (i / 2) ≤ 2 * iterationRadius r i := by + have hi : i = 2 * (i / 2) + i % 2 := by omega + rcases Nat.mod_two_eq_zero_or_one i with hm | hm + · have he : i = 2 * (i / 2) := by omega + rw [coordinateQuarterRadius_eq_even_iterationRadius, ← he] + have hn : 0 ≤ iterationRadius r i := div_nonneg hr (pow_nonneg (by norm_num) i) + constructor <;> linarith + · have he : iterationRadius r i = coordinateQuarterRadius r (i / 2) / 2 := by + conv_lhs => rw [hi, hm] + rw [coordinateQuarterRadius_eq_even_iterationRadius] + simp only [iterationRadius, pow_succ] + ring + rw [he] + have hn : 0 ≤ coordinateQuarterRadius r (i / 2) := + mul_nonneg hr (pow_nonneg (by norm_num) _) + constructor <;> linarith + +/-- Comparable normalizations transfer the exact preimages to a desired +frozen ellipsoid. The dyadic radius may lie between consecutive quarter +scales. -/ +theorem ellipsoid_preimages_of_comparable_normalizations + {Ω : Set X} {f : X → E} {r C ρ : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hcont : ContinuousOn f Ω) (j : ℕ) (x : X) (T : E ≃L[ℝ] E) + (hρ : 0 < ρ) + (hlower : ρ ≤ coordinateQuarterRadius r j) + (hupper : coordinateQuarterRadius r j ≤ 2 * ρ) + (hball : Metric.ball x (2 * coordinateQuarterRadius r j) ⊆ Ω) + (hcompare : ∀ w, ‖d.normalization j x w‖ ≤ 2 * ‖T w‖) : + ∀ P : E, ‖T (P - f x)‖ < ρ / 32 → + ∃ y ∈ Ω, dist x y < ρ ∧ f y = P := by + intro P hP + have hnorm : ‖d.normalization j x (P - f x)‖ < + coordinateQuarterRadius r j / 16 := by + have hc := hcompare (P - f x) + linarith + obtain ⟨y, hy, heq⟩ := d.exists_preimage hr hC hcont j x hball hnorm + have hR : 0 < coordinateQuarterRadius r j := + mul_pos hr (pow_pos (by norm_num) j) + refine ⟨y, hball ?_, ?_, heq⟩ + · change dist y x < 2 * coordinateQuarterRadius r j + linarith + · rw [dist_comm] + linarith + +/-- Even dyadic scales are exactly the quarter scales used in the Cauchy +correction argument. This version has no scale-comparability premise. -/ +theorem even_iteration_ellipsoid_preimages + {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hcont : ContinuousOn f Ω) (j : ℕ) (x : X) (T : E ≃L[ℝ] E) + (hball : Metric.ball x (2 * iterationRadius r (2 * j)) ⊆ Ω) + (hcompare : ∀ w, ‖d.normalization j x w‖ ≤ 2 * ‖T w‖) : + ∀ P : E, ‖T (P - f x)‖ < iterationRadius r (2 * j) / 32 → + ∃ y ∈ Ω, dist x y < iterationRadius r (2 * j) ∧ f y = P := by + have heq := coordinateQuarterRadius_eq_even_iterationRadius r j + apply ellipsoid_preimages_of_comparable_normalizations d hr hC hcont j x T + · rw [← heq] + exact mul_pos hr (pow_pos (by norm_num) j) + · exact heq.ge + · rw [← heq] + have hpos : 0 < coordinateQuarterRadius r j := + mul_pos hr (pow_pos (by norm_num) j) + linarith + · simpa only [heq] using hball + · exact hcompare + +/-- The working ball of radius `4 r_i` suffices for every dyadic index, +including the odd indices between successive quarter scales. -/ +theorem dyadic_ellipsoid_preimages + {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hcont : ContinuousOn f Ω) (i : ℕ) (x : X) (T : E ≃L[ℝ] E) + (hball : Metric.ball x (4 * iterationRadius r i) ⊆ Ω) + (hcompare : ∀ w, ‖d.normalization (i / 2) x w‖ ≤ 2 * ‖T w‖) : + ∀ P : E, ‖T (P - f x)‖ < iterationRadius r i / 32 → + ∃ y ∈ Ω, dist x y < iterationRadius r i ∧ f y = P := by + obtain ⟨hl, hu⟩ := quarter_half_index_bounds hr.le i + apply ellipsoid_preimages_of_comparable_normalizations d hr hC hcont + (i / 2) x T (div_pos hr (pow_pos (by norm_num) i)) hl hu + · intro y hy + apply hball + have hy' : dist y x < 2 * coordinateQuarterRadius r (i / 2) := hy + change dist y x < 4 * iterationRadius r i + linarith + · exact hcompare + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinateHeatInput.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinateHeatInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..eaee030eec0fb873127042047ce55265eebeb0ab --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinateHeatInput.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Heat.GaussianHeatInput + +namespace OAI + +/-! # The heat bounds actually used by the coordinate construction + +Jiang--Li--Zhang (2016), Theorem 1.2, implies these bounds. The lower +estimate is needed only when squared distance is a fixed multiple of +time, and only for times at most one. The full two-sided +Gaussian estimate gives these local comparisons. +-/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +structure HasCoordinateHeatBounds (μ : Measure X) (k : ℝ → X → X → ℝ) : Prop where + estimates : ∀ ε : ℝ, 0 < ε → ε < 1 → ∃ C B : ℝ, 0 < C ∧ 0 ≤ B ∧ + ∀ t : ℝ, 0 < t → ∀ x y : X, 0 ≤ k t x y ∧ + k t x y ≤ C/μ.real (ball y (Real.sqrt t))*Real.exp (-(dist x y)^2/((4+ε)*t)+B*t) + localLower : ∀ A : ℝ, 0 ≤ A → ∃ c : ℝ, 0 < c ∧ + ∀ t : ℝ, 0 < t → t ≤ 1 → ∀ x y : X, (dist x y)^2 ≤ A*t → + c/μ.real (ball y (Real.sqrt t)) ≤ k t x y + +instance {μ : Measure X} {k : ℝ → X → X → ℝ} : + CoeFun (HasCoordinateHeatBounds μ k) (fun _ => ∀ ε : ℝ, 0 < ε → ε < 1 → + ∃ C B : ℝ, 0 < C ∧ 0 ≤ B ∧ ∀ t : ℝ, 0 < t → ∀ x y : X, 0 ≤ k t x y ∧ + k t x y ≤ C/μ.real (ball y (Real.sqrt t))*Real.exp (-(dist x y)^2/((4+ε)*t)+B*t)) := + ⟨HasCoordinateHeatBounds.estimates⟩ + +theorem HasGaussianHeatBounds.toCoordinate {μ : Measure X} {k : ℝ → X → X → ℝ} + (hg : HasGaussianHeatBounds μ k) : HasCoordinateHeatBounds μ k where + estimates ε hε hε1 := by + obtain ⟨C,B,hC,hB,h⟩ := hg ε hε hε1 + exact ⟨C,B,hC,hB,fun t ht x y => ⟨le_trans (by positivity) (h t ht x y).1,(h t ht x y).2⟩⟩ + localLower A _hA := by + obtain ⟨C,B,hC,hB,h⟩ := hg (1/2) (by norm_num) (by norm_num) + let c := C⁻¹*Real.exp (-A/(4-1/2)-B) + refine ⟨c,by dsimp only [c]; positivity,?_⟩ + intro t ht ht1 x y hd + have hfrac : (dist x y)^2/((4-(1/2:ℝ))*t) ≤ A/(4-1/2) := by + calc + _ ≤ (A*t)/((4-(1/2:ℝ))*t) := div_le_div_of_nonneg_right hd (by positivity) + _ = _ := by field_simp + have hexp : -A/(4-(1/2:ℝ))-B ≤ -(dist x y)^2/((4-(1/2:ℝ))*t)-B*t := by + have hb := mul_le_mul_of_nonneg_left ht1 hB + have hh : -A/(4-(1/2:ℝ)) ≤ -(dist x y)^2/((4-(1/2:ℝ))*t) := by + simpa only [neg_div] using neg_le_neg hfrac + linarith only [hh,hb] + calc + _ = (C*μ.real (ball y (Real.sqrt t)))⁻¹*Real.exp (-A/(4-(1/2:ℝ))-B) := by + dsimp only [c] + rw [mul_inv_rev] + ring + _ ≤ (C*μ.real (ball y (Real.sqrt t)))⁻¹* + Real.exp (-(dist x y)^2/((4-(1/2:ℝ))*t)-B*t) := + mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hexp) (by positivity) + _ ≤ _ := (h t ht x y).1 + +theorem HasCoordinateHeatBounds.upper_five (μ : Measure X) {k : ℝ → X → X → ℝ} + (hg : HasCoordinateHeatBounds μ k) : + ∃ C B : ℝ, 0 < C ∧ 0 ≤ B ∧ ∀ t, 0 < t → ∀ x y, + k t x y ≤ C/μ.real (ball y (Real.sqrt t))*Real.exp (-(dist x y)^2/(5*t)+B*t) := by + obtain ⟨C,B,hC,hB,h⟩ := hg (1/2) (by norm_num) (by norm_num) + refine ⟨C,B,hC,hB,?_⟩ + intro t ht x y + apply (h t ht x y).2.trans + apply mul_le_mul_of_nonneg_left _ (div_nonneg hC.le ENNReal.toReal_nonneg) + apply Real.exp_le_exp.mpr + have hd : (dist x y)^2/(5*t) ≤ (dist x y)^2/((4+(1/2:ℝ))*t) := + div_le_div_of_nonneg_left (sq_nonneg _) (by positivity) (by nlinarith) + have hh := neg_le_neg hd + simpa only [neg_div] using add_le_add_left hh (B*t) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinateImageMass.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinateImageMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..c501ae3430b58dc59403a13faebeeb2f6f0b413d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinateImageMass.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.RCD.Coordinates.RegularEuclideanHausdorff +import OAI.Geometry.RCD.Coordinates.NormalizedHausdorffImage + +namespace OAI + +/-! # Converting a small omitted image volume into source mass -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem source_mass_of_image_defect {n : ℕ} + (hEuclidean : hausdorff n (Euclidean n) = volume) + {v : X → Euclidean n} {U : Set X} {C : ℝ≥0} + (hU : IsCompact U) (hv : LipschitzOnWith C v U) (hfin : hausdorff n X U ≠ ⊤) + (z : Euclidean n) (R δ : ℝ) + (hdefect : volume.real (ball z R \ v '' U) ≤ δ*volume.real (ball z R)) : + (1-δ)*volume.real (ball z R) ≤ (C:ℝ)^n*(hausdorff n X).real U := by + have himage : IsCompact (v '' U) := hU.image_of_continuousOn hv.continuousOn + have hsplit := measureReal_inter_add_sdiff (μ := (volume : Measure (Euclidean n))) + himage.measurableSet (s := ball z R) measure_ball_ne_top + have hinter : volume.real (ball z R ∩ v '' U) ≤ volume.real (v '' U) := + measureReal_mono inter_subset_right himage.measure_lt_top.ne + have hmass := normalized_hausdorff_real_image_le hv hfin + rw [hEuclidean] at hmass + nlinarith only [hsplit,hdefect,hinter,hmass] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinatePathVelocity.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinatePathVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..799527f3d6fc6f37bd76473adb8aad006ca593ba --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinatePathVelocity.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.RCD.Coordinates.FrameVelocityDefect + +namespace OAI + +/-! # The finite coordinate derivative along a real parameter -/ + +open Finset +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +def coordinateDerivative {n : ℕ} (f : ℝ → Euclidean n) (t : ℝ) : Euclidean n := + WithLp.toLp 2 (fun i => deriv (fun s => f s i) t) + +theorem coordinate_inner_hasDerivAt {n : ℕ} (f : ℝ → Euclidean n) {t : ℝ} + (h : ∀ i, DifferentiableAt ℝ (fun s => f s i) t) (a : Euclidean n) : + HasDerivAt (fun s => ⟪f s,a⟫_ℝ) ⟪coordinateDerivative f t,a⟫_ℝ t := by + have hh := HasDerivAt.fun_sum (u := (univ : Finset (Fin n))) + (fun i _ => (h i).hasDerivAt.const_mul (a i)) + simpa only [PiLp.inner_apply,RCLike.inner_apply,conj_trivial,coordinateDerivative] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CoordinateTargetNorm.lean b/lean/OAI/Geometry/RCD/Coordinates/CoordinateTargetNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..350f085049c40be1cc9f30fa13f080b0132e8c87 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CoordinateTargetNorm.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicCoordinateValueLimit + +namespace OAI + +/-! # Actual coordinate limits give uniform interior normalization bounds -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.target_norm_le_of_pointwise {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {p : X} {R B : ℝ} (hR : 0 by + simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg _) hx 2) + have hi' : (∫ x in ball p R, (SobolevSpace.toLp μ hX.quadratic u x)^2 ∂μ)≤ + B^2*μ.real (ball p R) := by + simpa only [integral_const,Measure.real,Measure.restrict_apply_univ,smul_eq_mul,mul_comm] using hi + apply (sq_le_sq₀ (norm_nonneg _) hB).mp + change harmonicTargetNorm hX p R u^2≤B^2 + rw [show harmonicTargetNorm hX p R u^2=_ from + normalized_sobolev_mean_sq μ hX.quadratic (ball p R) (hX.finiteOnBounded _ isBounded_ball).ne u] + calc _ ≤ (μ.real (ball p R))⁻¹*(B^2*μ.real (ball p R)) := + mul_le_mul_of_nonneg_left hi' (inv_nonneg.mpr hm.le) + _ = B^2 := by field_simp + +omit [ProperSpace X] in +theorem NoncollapsedRCD.coordinate_target_norm_eventually {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S W : ℝ} (hW : 0 (1 : ℝ)) → + ∀ (A B : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) (d : ℝ), 0 ≤ d → + ‖A - 1‖ ≤ 1 / 4 → + (∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (c b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u ((A * B - B * (A - 1)) b)))‖ ≤ d * ‖b‖) → + ‖B‖ ≤ 2 * ‖N.toContinuousLinearMap‖ * (C / R * d) := by + obtain ⟨C, hC, hcoeff⟩ := hinput.affine_operator_bound hn hκ + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv u N hN hu η hη A B c d hd hA herror + let T := A * B - B * (A - 1) + have ht := hcoeff p R hR hcurv u N hN hu η hη T c d hd herror + have hT : ‖T‖ ≤ ‖N.toContinuousLinearMap‖ * (C / R * d) := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro b + have hh := (N.symm.toContinuousLinearMap.comp T).le_opNorm b + have hb : ‖N.symm (T b)‖ ≤ (C / R * d) * ‖b‖ := + hh.trans (mul_le_mul_of_nonneg_right ht (norm_nonneg b)) + calc + ‖T b‖ = ‖N (N.symm (T b))‖ := by rw [N.apply_symm_apply] + _ ≤ ‖N.toContinuousLinearMap‖ * ‖N.symm (T b)‖ := N.toContinuousLinearMap.le_opNorm _ + _ ≤ ‖N.toContinuousLinearMap‖ * ((C / R * d) * ‖b‖) := mul_le_mul_of_nonneg_left hb (norm_nonneg _) + _ = _ := by ring + exact (covector_commutator_norm_le A B hA hT).trans_eq (by ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CovectorCommutator.lean b/lean/OAI/Geometry/RCD/Coordinates/CovectorCommutator.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c7bea0ff04b461d6bd7b9504d53ae4279d29abd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CovectorCommutator.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.RCD.Harmonic.TwoCenterCommutator + +namespace OAI + +/-! # Recovering the difference of radial operators in covector order -/ + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The affine Sobolev identity acts on covectors, so its commutator has +this reversed order. The same near-identity absorption controls B. -/ +theorem covector_commutator_norm_le (A B : E →L[ℝ] E) + (hA : ‖A - 1‖ ≤ 1 / 4) {η : ℝ} + (herror : ‖A * B - B * (A - 1)‖ ≤ η) : ‖B‖ ≤ 2 * η := by + have hid : B = (A * B - B * (A - 1)) - + ((A - 1) * B - B * (A - 1)) := by noncomm_ring + have ht : ‖B‖ ≤ ‖A * B - B * (A - 1)‖ + + (‖A - 1‖ * ‖B‖ + ‖B‖ * ‖A - 1‖) := by + calc + ‖B‖ = ‖(A * B - B * (A - 1)) - ((A - 1) * B - B * (A - 1))‖ := congrArg norm hid + _ ≤ ‖A * B - B * (A - 1)‖ + ‖(A - 1) * B - B * (A - 1)‖ := norm_sub_le _ _ + _ ≤ _ := add_le_add le_rfl ((norm_sub_le _ _).trans + (add_le_add (norm_mul_le _ _) (norm_mul_le _ _))) + have hs := mul_le_mul_of_nonneg_left hA (norm_nonneg B) + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CovectorConstantRecovery.lean b/lean/OAI/Geometry/RCD/Coordinates/CovectorConstantRecovery.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c0427eed25286e3d119962b08b5f9f62ab60f1e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CovectorConstantRecovery.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.CovectorCommutator +import Mathlib.Analysis.InnerProductSpace.Adjoint + +namespace OAI + +/-! # Recovering the displacement from the two-center affine constant -/ + +noncomputable section +namespace RegularPointCoordinates + +/-- Right composition with a near-identity coordinate operator controls +the norm of a constant covector. -/ +theorem covector_norm_le_two_comp {n : ℕ} (A : Euclidean n →L[ℝ] Euclidean n) + (hA : ‖A - 1‖ ≤ 1 / 2) (c : Euclidean n →L[ℝ] ℝ) : + ‖c‖ ≤ 2 * ‖c.comp A‖ := by + have he : c = c.comp A - c.comp (A - 1) := by + ext b + simp only [ContinuousLinearMap.comp_apply, sub_apply, one_apply_eq_self, map_sub] + ring + have hn : ‖c‖ ≤ ‖c.comp A‖ + ‖c‖ * ‖A - 1‖ := by + calc + _ = ‖c.comp A - c.comp (A - 1)‖ := congrArg norm he + _ ≤ ‖c.comp A‖ + ‖c.comp (A - 1)‖ := norm_sub_le _ _ + _ ≤ _ := add_le_add le_rfl (c.opNorm_comp_le (A - 1)) + have hh := mul_le_mul_of_nonneg_left hA (norm_nonneg c) + nlinarith + +/-- The controlled commutator constant and matrix difference recover +the actual displacement covector. No inverse matrix is introduced. -/ +theorem covector_constant_recovery {n : ℕ} + (Ax Az : Euclidean n →L[ℝ] Euclidean n) (d c : Euclidean n →L[ℝ] ℝ) + (hx : ‖Ax - 1‖ ≤ 1 / 2) (hc : c = d.comp Ax) + {L η M : ℝ} (hB : ‖Az - Ax‖ ≤ L) (hM : ‖c‖ ≤ M) + (hconst : ‖c.comp (Az - 1)‖ ≤ η) : + ‖c - d‖ ≤ 2 * (η + M * L) := by + have hid : c.comp (Ax - 1) = c.comp (Az - 1) - c.comp (Az - Ax) := by + ext b + simp only [ContinuousLinearMap.comp_apply, sub_apply, one_apply_eq_self, map_sub] + ring + have he : (c - d).comp Ax = c.comp (Ax - 1) := by + ext b + simp only [ContinuousLinearMap.comp_apply, sub_apply, one_apply_eq_self, map_sub] + have hb := congrArg (fun f : Euclidean n →L[ℝ] ℝ => f b) hc + change c b = d (Ax b) at hb + rw [hb] + have hforce : ‖c.comp (Ax - 1)‖ ≤ η + M * L := by + rw [hid] + calc + _ ≤ ‖c.comp (Az - 1)‖ + ‖c.comp (Az - Ax)‖ := norm_sub_le _ _ + _ ≤ η + ‖c‖ * ‖Az - Ax‖ := + add_le_add hconst (ContinuousLinearMap.opNorm_comp_le _ _) + _ ≤ _ := add_le_add le_rfl (mul_le_mul hM hB (norm_nonneg _) ((norm_nonneg c).trans hM)) + have hlower := covector_norm_le_two_comp Ax hx (c - d) + rw [he] at hlower + exact hlower.trans (mul_le_mul_of_nonneg_left hforce (by norm_num)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CovectorRadialSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/CovectorRadialSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9d822027d37c5a971187bb8586d3b7b003055e6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CovectorRadialSmallness.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Harmonic.LocalRadialSmallness +import OAI.Geometry.RCD.Coordinates.RadialFitSmallness + +namespace OAI + +/-! # Qualitative radial smallness in every constant covector -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- The same actual radial smallness holds in every direction, with the +squared covector norm and only a dimensional loss. -/ +theorem DyadicDistanceReplacements.local_covector_radial_error {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + {ε Cχ : ℝ} (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * (distanceSourceRadius r0 i / 64)) ε u v) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 ε + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • v x)) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < μ.real (ball p (4 * (distanceSourceRadius r0 i / 64)))) (b : Euclidean n) : + let r := distanceSourceRadius r0 i / 64 + (∫ x in ball p r, (localGamma μ hQ (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u b) x) ^ 2 ∂μ) ≤ + (n : ℝ) * ((1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1)) * ε * r ^ 2 * μ.real (ball p (4 * r))) * ‖b‖ ^ 2 := by + dsimp only + let s := distanceSourceRadius r0 i + let r := s / 64 + let q := T.distanceDatum μ hQ i + have hr : 0 < r := by + have := distanceSourceRadius_pos S.radius_pos i + dsimp only [r, s] + positivity + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have hgrad (j : Fin n) := ae_restrict_of_ae_restrict_of_subset hsub (hfirst.gradient j) + have hh (j : Fin n) := (hfirst.harmonic j).mono μ hQ hsub + have hm (j : Fin n) : MemLp (fun x => localGamma μ hQ q (u j) x - + SobolevSpace.toLp μ hQ (u j) x) 2 (μ.restrict (ball p r)) := + (localGamma_memLp_two_of_bound μ hQ (ball p r) q (u j) (hgrad j)).sub + ((Lp.memLp (SobolevSpace.toLp μ hQ (u j))).restrict _) + exact (radial_linear_harmonic_correction μ hQ q u u hh hm + (fun j => T.local_radial_error μ hQ i hε hε1 hCχ u v hfirst hv hmetric χ hvol j) b).2 + +/-- The actual dimensionless affine fit inherits the qualitative bound. -/ +theorem DyadicDistanceReplacements.local_covector_fit_smallness {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + {ε Cχ : ℝ} (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * (distanceSourceRadius r0 i / 64)) ε u v) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 ε + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • v x)) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < μ.real (ball p (4 * (distanceSourceRadius r0 i / 64)))) (b : Euclidean n) : + let r := distanceSourceRadius r0 i / 64 + let hr : 0 < r := by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r]; positivity + let hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + let hsub := ball_subset_ball (show r ≤ 4 * r by linarith) + let ha := gamma_column_le_of_diagonal_bounds μ hQ u (ball p r) (1 + ε) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hfirst.gradient j)) b + (radialFitError μ hQ u p r hfin (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) ha) ^ 2 ≤ + ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * ε * + (μ.real (ball p (4 * r)) / μ.real (ball p r)) * ‖b‖ ^ 2 := by + dsimp only + let r := distanceSourceRadius r0 i / 64 + have hr : 0 < r := by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r]; positivity + have hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have ha := gamma_column_le_of_diagonal_bounds μ hQ u (ball p r) (1 + ε) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hfirst.gradient j)) b + have he := T.local_covector_radial_error μ hQ i hε hε1 hCχ u v hfirst hv hmetric χ hvol b + have hf := radialFitError_sq_le_linear μ hQ u p r hfin (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ u b) ha b he + apply hf.trans_eq + calc + _ = (((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * ε * + (μ.real (ball p (4 * r)) / μ.real (ball p r)) * ‖b‖ ^ 2) * (r ^ 2 / r ^ 2) := by ring + _ = _ := by rw [div_self (pow_ne_zero 2 hr.ne'), mul_one] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CurvedHeatRegularSource.lean b/lean/OAI/Geometry/RCD/Coordinates/CurvedHeatRegularSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7dcbefae78ebb2d35f7b23b3118b37112b09506 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CurvedHeatRegularSource.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Heat.HeatGeneratorAmplitude +import OAI.Geometry.RCD.Heat.BoundedHeatSobolevData + +namespace OAI + +/-! # Bounded regular heat data with nonpositive curvature -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.heat_regular_bounded_source_curved {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K≤0) (p : X) + (f : Lp ℝ 2 (hausdorff n X)) (A : ℝ≥0) + (hA : ∀ᵐ x ∂hausdorff n X, |f x| ≤ A) {t : ℝ} (ht : 0 < t) : + let μ := hausdorff n X + let Q := hX.quadratic + let w := heatSobolev μ Q t ht f + let d := heatSobolevMap μ Q (t/2) (half_pos ht) (-heatGeneratorAt μ Q (t-t/2) f) + ∃ (W : X → ℝ) (L B : ℝ≥0), + LipschitzWith L W ∧ + (SobolevSpace.toLp μ Q w =ᵐ[μ] W) ∧ + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x| ≤ A) ∧ + IsWeakLaplacian μ Q w (SobolevSpace.toLp μ Q d) ∧ + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q d x| ≤ B) := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + intro μ Q w d + let hk := hX.canonicalHeatKernel_isContinuousHeatKernel hn p + obtain ⟨hLip,-⟩ := hX.kernelHeat_bounded_regularity hn p hk f A hA t ht + have hwr : SobolevSpace.toLp μ Q w =ᵐ[μ] kernelHeat μ Q hk t f := by + simpa only [w,heatSobolev_toLp] using (kernelHeat_represents_L2 μ Q hk ht f).symm + let B : ℝ≥0 := ⟨(2*(n:ℝ)*(|K|+1/t))*(A:ℝ),by positivity⟩ + refine ⟨kernelHeat μ Q hk t f,_,B,hLip,hwr, + (hX.bounded_heat_sobolev_data hn p f A hA ht).1, + heatTail_weak_laplacian μ Q t ht f,?_⟩ + have hd : SobolevSpace.toLp μ Q d= -heatGeneratorAt μ Q t f := + heatTail_deriv_toLp μ Q (t/2) (half_pos ht) f t (by linarith) + rw [hd] + filter_upwards [hX.heatGeneratorAt_amplitude hn p hK f A hA ht, + Lp.coeFn_neg (heatGeneratorAt μ Q t f)] with x hx he + rw [he] + change |-(heatGeneratorAt μ Q t f x)| ≤ (2*(n:ℝ)*(|K|+1/t))*(A:ℝ) + simpa only [abs_neg] using hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/CurvedRegularShiftedHessian.lean b/lean/OAI/Geometry/RCD/Coordinates/CurvedRegularShiftedHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..de4d61a70ead276e58629fe7243e3ee4c2da9427 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/CurvedRegularShiftedHessian.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreWeakMeasure +import OAI.Geometry.RCD.Coordinates.BoundedRegularLocalization +import OAI.Geometry.RCD.Sobolev.GoodCutoffFromResolvent +import OAI.Geometry.RCD.Sobolev.HessianActionLocality +import OAI.Geometry.RCD.Sobolev.BochnerSourceLocality +import OAI.Geometry.RCD.Sobolev.ScalarBochnerConstruction + +namespace OAI + +/-! # The shifted diagonal Hessian estimate for the prescribed full source -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_regular_shifted_hessian_curved {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (w dw G : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : IsWeakLaplacian (hausdorff n X) hX.quadratic w + (SobolevSpace.toLp (hausdorff n X) hX.quadratic dw)) + (W : X → ℝ) (L A B : ℝ≥0) (hW : LipschitzWith L W) + (hwr : SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[hausdorff n X] W) + (hA : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x| ≤ A) + (hB : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic dw x| ≤ B) + (hG : SobolevSpace.toLp (hausdorff n X) hX.quadratic G =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic w w) + (p : X) {r : ℝ} (hr : 0 < r) (σ : Measure X) [IsFiniteMeasure σ] + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p (2*r)) G + (bochnerGramSource (hausdorff n X) hX.quadratic K w w dw dw σ.toSignedMeasure)) + (g : SobolevSpace (hausdorff n X) hX.quadratic) (dg : Lp ℝ 2 (hausdorff n X)) + (hdg : IsWeakLaplacian (hausdorff n X) hX.quadratic g dg) + (V : X → ℝ) (M C : ℝ≥0) (hV : LipschitzWith M V) + (hgr : SobolevSpace.toLp (hausdorff n X) hX.quadratic g =ᵐ[hausdorff n X] V) + (hC : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic g x| ≤ C) : + ∃ FG GG : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic FG + =ᵐ[(hausdorff n X).restrict (closedBall p r)] localGamma (hausdorff n X) hX.quadratic w g) ∧ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic GG + =ᵐ[(hausdorff n X).restrict (closedBall p r)] localGamma (hausdorff n X) hX.quadratic g g) ∧ + (∀ᵐ x ∂(hausdorff n X).restrict (closedBall p r), + 0 ≤ (σ.rnDeriv (hausdorff n X) x).toReal- + 2*SobolevSpace.toLp (hausdorff n X) hX.quadratic dw x+(n:ℝ)) ∧ + (∀ᵐ x ∂(hausdorff n X).restrict (closedBall p r), + (localHessianAction (hausdorff n X) hX.quadratic w g g FG FG GG x- + localGamma (hausdorff n X) hX.quadratic g g x)^2 ≤ + ((σ.rnDeriv (hausdorff n X) x).toReal- + 2*SobolevSpace.toLp (hausdorff n X) hX.quadratic dw x+(n:ℝ))* + (localGamma (hausdorff n X) hX.quadratic g g x)^2) := by + let μ := hausdorff n X + let Q := hX.quadratic + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + have hsub : closedBall p r ⊆ ball p (2*r) := closedBall_subset_ball (by linarith) + obtain ⟨Cχ,-,⟨χ⟩⟩ := hX.goodCutoff_exists hn p (by positivity : 0 < 2*r) + obtain ⟨f,df,hf,hfr,hdf⟩ := bounded_regular_localization μ Q w + (SobolevSpace.toLp μ Q dw) hw W hW hwr A hA χ + obtain ⟨v,-,-,hvr,-⟩ := bounded_regular_localization μ Q g dg hdg V hV hgr C hC χ + have hF : SobolevSpace.toLp μ Q G =ᵐ[μ.restrict (ball p (2*r))] localGamma μ Q f.val f.val := by + filter_upwards [ae_restrict_of_ae hG,localGamma_pair_congr_ae μ Q hfr hfr] with x hx hy + exact hx.trans hy.symm + have hs : IsMeasureLaplacianOn μ Q (ball p (2*r)) G + (bochnerGramSource μ Q K f.val f.val dw dw σ.toSignedMeasure) := + IsMeasureLaplacianOn.bochner_congr μ Q measurableSet_ball K σ.toSignedMeasure (EventuallyEq.symm hfr) hσ + obtain ⟨FG,GG,hFG,hGG,hdim,hbound⟩ := hX.regular_core_weak_hessian_on_measure hn + (hX.scalarBochner_nonpositive K n hn hK p) f v p (by positivity : 0 < 2*r) + (isCompact_closedBall p r) hsub dw df hf B hB hdf le_rfl G σ hF hs + have hfΩ := ae_restrict_of_ae_restrict_of_subset hsub hfr + have hgΩ := ae_restrict_of_ae_restrict_of_subset hsub hvr + have hFG' := EventuallyEq.trans (ae_restrict_of_ae hFG) (localGamma_pair_congr_ae μ Q hfΩ hgΩ) + have hGG' := EventuallyEq.trans (ae_restrict_of_ae hGG) (localGamma_pair_congr_ae μ Q hgΩ hgΩ) + have hh := localHessianAction_congr μ Q (f := f.val) (f' := w) (u := v.val) (u' := g) + (v := v.val) (v' := g) (fu := FG) (fv := FG) (uv := GG) + hfΩ hgΩ hgΩ EventuallyEq.rfl EventuallyEq.rfl EventuallyEq.rfl + refine ⟨FG,GG,hFG',hGG',?_,?_⟩ + · have hn0 : 0 < (n:ℝ) := by exact_mod_cast (show 0 < n by omega) + filter_upwards [hdim] with x hx + have hpos : 0 ≤ (n:ℝ)*((σ.rnDeriv μ x).toReal-2*SobolevSpace.toLp μ Q dw x+n) := by + nlinarith only [hx,sq_nonneg (SobolevSpace.toLp μ Q dw x-(n:ℝ))] + exact (mul_nonneg_iff_of_pos_left hn0).mp hpos + · have hb1 := hbound 1 + filter_upwards [hb1,hh,localGamma_pair_congr_ae μ Q hgΩ hgΩ] with x hx hy hz + simp only [one_mul,one_pow,mul_one] at hx + change (localHessianAction μ Q f.val v.val v.val FG FG GG x-localGamma μ Q v.val v.val x)^2 ≤ + ((σ.rnDeriv μ x).toReal-2*SobolevSpace.toLp μ Q dw x+(n:ℝ))*(localGamma μ Q v.val v.val x)^2 at hx + rwa [hy,hz] at hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DiagonalMeanSelection.lean b/lean/OAI/Geometry/RCD/Coordinates/DiagonalMeanSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9a6348c80cee5c5e68fdfa9f4aebc12533806b4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DiagonalMeanSelection.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.RCD.Coordinates.VanishingDiagonalCost +import Mathlib.MeasureTheory.Integral.Average + +namespace OAI + +/-! # Simultaneous diagonal and sample choice for vanishing mean costs -/ + +open Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem diagonal_mean_selection {A : Type*} [MeasurableSpace A] + (μ : ℕ → ℕ → Measure A) [∀ m k, IsProbabilityMeasure (μ m k)] + (f : ℕ → ℕ → A → ℝ) (P : ℕ → ℕ → A → Prop) + (hf : ∀ m k, Integrable (f m k) (μ m k)) + (hpos : ∀ m k a, 0 ≤ f m k a) + (hP : ∀ m k, ∀ᵐ a ∂μ m k, P m k a) + (hlim : ∀ m, Tendsto (fun k => ∫ a, f m k a ∂μ m k) atTop (𝓝 0)) : + ∃ (d : ℕ → ℕ) (a : ℕ → A), Tendsto d atTop atTop ∧ + (∀ k, P (d k) k (a k)) ∧ + Tendsto (fun k => f (d k) k (a k)) atTop (𝓝 0) := by + obtain ⟨d,hd,hcost⟩ := exists_vanishing_diagonal_cost + (fun m k => ∫ a, f m k a ∂μ m k) + (fun m k => integral_nonneg (hpos m k)) hlim + have hex (k : ℕ) : ∃ a, P (d k) k a ∧ f (d k) k a ≤ ∫ z, f (d k) k z ∂μ (d k) k := by + obtain ⟨a,ha,hb⟩ := exists_notMem_null_le_integral (hf (d k) k) (ae_iff.mp (hP (d k) k)) + exact ⟨a,of_not_not ha,hb⟩ + choose a hPa ha using hex + exact ⟨d,a,hd,hPa,squeeze_zero (fun k => hpos (d k) k (a k)) ha hcost⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DifferentialBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/DifferentialBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..379981bbdb8faeda93dc8322a15f9b1976e1880e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DifferentialBounds.lean @@ -0,0 +1,195 @@ +import OAI.Geometry.RCD.Sobolev.ScalarAbsorption +import Mathlib.Analysis.Normed.Operator.Basic + +namespace OAI + +/-! +# Quantitative bounds for the differential update + +The vectors `v`, `v1`, and `v2` stand for a field and its first and second +directional derivatives. The operators `K`, `K1`, and `K2` stand for the +inverse transpose and its directional derivatives. Their stated bounds +are used directly, with an arbitrary real-valued dual-size function. +The algebra does not assume the desired increment or recurrence estimates. +-/ + +namespace RegularPointCoordinates + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The first derivative increment has the square-root forcing bound. -/ +theorem differential_first_increment_norm_le + (K K1 : E →L[ℝ] F) (dual : E → ℝ) (v v1 : E) + {C epsilon q r z energy : ℝ} (hC : 1 ≤ C) (hq : 0 < q) (hr : 0 < r) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hK1 : ∀ w, ‖K1 w‖ ≤ C * q / r * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) + (hv1 : dual v1 ≤ C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) : + ‖K v1 + K1 v‖ ≤ C ^ 2 * Real.sqrt epsilon * + (Real.sqrt z + 2 * Real.sqrt energy * q) := by + have hC0 : 0 ≤ C := by linarith + have h1 := (hK v1).trans (mul_le_mul_of_nonneg_left hv1 hC0) + have h0 := (hK1 v).trans + (mul_le_mul_of_nonneg_left hv (show 0 ≤ C * q / r by positivity)) + have hcancel : C * q / r * (C * Real.sqrt epsilon * r * Real.sqrt energy) = + C ^ 2 * Real.sqrt epsilon * Real.sqrt energy * q := by + field_simp [ne_of_gt hr] + rw [hcancel] at h0 + calc + _ ≤ ‖K v1‖ + ‖K1 v‖ := norm_add_le _ _ + _ ≤ C * (C * Real.sqrt epsilon * (Real.sqrt z + Real.sqrt energy * q)) + + C ^ 2 * Real.sqrt epsilon * Real.sqrt energy * q := add_le_add h1 h0 + _ = _ := by ring + +/-- The squared first increment in `re:squared-increment`. -/ +theorem differential_first_increment_sq_le + (K K1 : E →L[ℝ] F) (dual : E → ℝ) (v v1 : E) + {C epsilon q r z energy : ℝ} (hC : 1 ≤ C) + (hepsilon : 0 ≤ epsilon) (hq : 0 < q) (hr : 0 < r) + (hz : 0 ≤ z) (henergy : 0 ≤ energy) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hK1 : ∀ w, ‖K1 w‖ ≤ C * q / r * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) + (hv1 : dual v1 ≤ C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) : + ‖K v1 + K1 v‖ ^ 2 ≤ 5 * C ^ 4 * epsilon * (z + energy * q ^ 2) := by + have hnorm := differential_first_increment_norm_le K K1 dual v v1 + hC hq hr hK hK1 hv hv1 + have henergySq : (Real.sqrt energy * q) ^ 2 = energy * q ^ 2 := by + rw [mul_pow, Real.sq_sqrt henergy] + have hforce : (Real.sqrt z + 2 * Real.sqrt energy * q) ^ 2 ≤ + 5 * (z + energy * q ^ 2) := by + nlinarith [Real.sq_sqrt hz, henergySq, + sq_nonneg (2 * Real.sqrt z - Real.sqrt energy * q)] + calc + _ ≤ (C ^ 2 * Real.sqrt epsilon * + (Real.sqrt z + 2 * Real.sqrt energy * q)) ^ 2 := + pow_le_pow_left₀ (norm_nonneg _) hnorm 2 + _ = C ^ 4 * epsilon * (Real.sqrt z + 2 * Real.sqrt energy * q) ^ 2 := by + rw [mul_pow, mul_pow, Real.sq_sqrt hepsilon] + ring + _ ≤ C ^ 4 * epsilon * (5 * (z + energy * q ^ 2)) := + mul_le_mul_of_nonneg_left hforce (by positivity) + _ = _ := by ring + +/-- Before rescaling, the three second-derivative terms are controlled +by the same forcing. -/ +theorem differential_second_increment_norm_le + (K K1 K2 : E →L[ℝ] F) (dual : E → ℝ) (v v1 v2 : E) + {C epsilon q r z energy : ℝ} (hC : 1 ≤ C) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hq : 0 < q) (hr : 0 < r) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hK1 : ∀ w, ‖K1 w‖ ≤ C * q / r * dual w) + (hK2 : ∀ w, ‖K2 w‖ ≤ C * q ^ 2 / r ^ 2 * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) + (hv1 : dual v1 ≤ C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) + (hv2 : dual v2 ≤ C / r * (Real.sqrt z * q + Real.sqrt energy * q ^ 2)) : + ‖K v2 + (2 : ℝ) • K1 v1 + K2 v‖ ≤ + 4 * (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) := by + have hC0 : 0 ≤ C := by linarith + have hsqrt : Real.sqrt epsilon ≤ 1 := by + nlinarith [Real.sq_sqrt hepsilon, Real.sqrt_nonneg epsilon] + have hscale : 0 ≤ C ^ 2 * q / r := by positivity + have hforce : 0 ≤ Real.sqrt z + Real.sqrt energy * q := by positivity + have h0 : ‖K v2‖ ≤ (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) := by + calc + _ ≤ C * (C / r * (Real.sqrt z * q + Real.sqrt energy * q ^ 2)) := + (hK v2).trans (mul_le_mul_of_nonneg_left hv2 hC0) + _ = _ := by ring + have h1 : ‖K1 v1‖ ≤ (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) := by + calc + _ ≤ C * q / r * (C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) := + (hK1 v1).trans (mul_le_mul_of_nonneg_left hv1 (by positivity)) + _ = (C ^ 2 * q / r) * + (Real.sqrt epsilon * (Real.sqrt z + Real.sqrt energy * q)) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (mul_le_of_le_one_left hforce hsqrt) hscale + have h2 : ‖K2 v‖ ≤ (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) := by + calc + _ ≤ C * q ^ 2 / r ^ 2 * (C * Real.sqrt epsilon * r * Real.sqrt energy) := + (hK2 v).trans (mul_le_mul_of_nonneg_left hv (by positivity)) + _ = (C ^ 2 * q / r) * (Real.sqrt epsilon * (Real.sqrt energy * q)) := by + field_simp [ne_of_gt hr] + _ ≤ (C ^ 2 * q / r) * (Real.sqrt energy * q) := + mul_le_mul_of_nonneg_left (mul_le_of_le_one_left (by positivity) hsqrt) hscale + _ ≤ _ := mul_le_mul_of_nonneg_left (le_add_of_nonneg_left (Real.sqrt_nonneg _)) hscale + calc + _ ≤ ‖K v2 + (2 : ℝ) • K1 v1‖ + ‖K2 v‖ := norm_add_le _ _ + _ ≤ (‖K v2‖ + ‖(2 : ℝ) • K1 v1‖) + ‖K2 v‖ := + add_le_add (norm_add_le _ _) le_rfl + _ = ‖K v2‖ + 2 * ‖K1 v1‖ + ‖K2 v‖ := by norm_num [norm_smul] + _ ≤ (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) + + 2 * ((C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q)) + + (C ^ 2 * q / r) * (Real.sqrt z + Real.sqrt energy * q) := + add_le_add (add_le_add h0 (mul_le_mul_of_nonneg_left h1 (by norm_num))) h2 + _ = _ := by ring + +/-- The dyadic normalization of the actual second increment. -/ +theorem differential_second_increment_normalized_le + (K K1 K2 : E →L[ℝ] F) (dual : E → ℝ) (v v1 v2 : E) + {C epsilon q r z energy : ℝ} (hC : 1 ≤ C) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hq : 0 < q) (hr : 0 < r) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hK1 : ∀ w, ‖K1 w‖ ≤ C * q / r * dual w) + (hK2 : ∀ w, ‖K2 w‖ ≤ C * q ^ 2 / r ^ 2 * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) + (hv1 : dual v1 ≤ C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) + (hv2 : dual v2 ≤ C / r * (Real.sqrt z * q + Real.sqrt energy * q ^ 2)) : + r / (2 * q) * ‖K v2 + (2 : ℝ) • K1 v1 + K2 v‖ ≤ + 2 * C ^ 2 * (Real.sqrt z + Real.sqrt energy * q) := by + have h := mul_le_mul_of_nonneg_left + (differential_second_increment_norm_le K K1 K2 dual v v1 v2 + hC hepsilon hepsilon1 hq hr hK hK1 hK2 hv hv1 hv2) + (show 0 ≤ r / (2 * q) by positivity) + convert h using 1 + field_simp [ne_of_gt hr, ne_of_gt hq] + ring + +omit [NormedSpace ℝ F] in +/-- Increasing the directional metric and halving the radius give the +contractive half of the diagonal recurrence. -/ +theorem diagonal_recurrence_of_increment_bound (old increment next : F) + {q qnext r forcing : ℝ} (hq : 0 < q) (hr : 0 < r) (hmetric : q ≤ qnext) + (hnext : next = old + increment) + (hincrement : r / (2 * q) * ‖increment‖ ≤ forcing) : + (r / 2) / qnext * ‖next‖ ≤ (r / q * ‖old‖) / 2 + forcing := by + rw [hnext] + calc + _ ≤ (r / 2) / q * ‖old + increment‖ := + mul_le_mul_of_nonneg_right + (div_le_div_of_nonneg_left (by positivity) hq hmetric) (norm_nonneg _) + _ ≤ (r / 2) / q * (‖old‖ + ‖increment‖) := + mul_le_mul_of_nonneg_left (norm_add_le _ _) (by positivity) + _ = (r / q * ‖old‖) / 2 + r / (2 * q) * ‖increment‖ := by ring + _ ≤ _ := add_le_add le_rfl hincrement + +/-- The complete diagonal recurrence for an update with the actual +three-term second derivative increment. -/ +theorem differential_diagonal_update_recurrence + (K K1 K2 : E →L[ℝ] F) (dual : E → ℝ) (v v1 v2 : E) (old next : F) + {C epsilon q qnext r z energy : ℝ} (hC : 1 ≤ C) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hq : 0 < q) (hr : 0 < r) (hmetric : q ≤ qnext) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hK1 : ∀ w, ‖K1 w‖ ≤ C * q / r * dual w) + (hK2 : ∀ w, ‖K2 w‖ ≤ C * q ^ 2 / r ^ 2 * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) + (hv1 : dual v1 ≤ C * Real.sqrt epsilon * + (Real.sqrt z + Real.sqrt energy * q)) + (hv2 : dual v2 ≤ C / r * (Real.sqrt z * q + Real.sqrt energy * q ^ 2)) + (hnext : next = old + (K v2 + (2 : ℝ) • K1 v1 + K2 v)) : + (r / 2) / qnext * ‖next‖ ≤ (r / q * ‖old‖) / 2 + + 2 * C ^ 2 * (Real.sqrt z + Real.sqrt energy * q) := by + exact diagonal_recurrence_of_increment_bound old _ next hq hr hmetric hnext + (differential_second_increment_normalized_le K K1 K2 dual v v1 v2 + hC hepsilon hepsilon1 hq hr hK hK1 hK2 hv hv1 hv2) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DifferentialStep.lean b/lean/OAI/Geometry/RCD/Coordinates/DifferentialStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..019275aa83bd2a3413990602f6d951a61f38dbfb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DifferentialStep.lean @@ -0,0 +1,200 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedJetStep +import OAI.Geometry.RCD.Metric.ScalarMetricBootstrap + +namespace OAI + +/-! +# Differential identities for the metric iteration + +These identities concern the actual update `h + (Dh)⁻ᵀ v`. In particular, +the second derivative includes both mixed terms and the second derivative +of the inverse field. The metric identity keeps the diagonal cancellation +before taking norms. +-/ + +open Filter +open scoped Topology InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +section General + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The second derivative in one direction, expressed without choosing +coordinates on the space of bilinear maps. -/ +def diagonalSecond (f : E → F) (x ξ : E) : F := + fderiv ℝ (fun y => fderiv ℝ f y ξ) x ξ + +/-- Evaluating the derivative of a linear-map-valued function commutes +with evaluation on a fixed vector. -/ +theorem fderiv_apply_fixed {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + {A : E → F →L[ℝ] G} {x : E} (hA : DifferentiableAt ℝ A x) (u : E) + (v : F) : + fderiv ℝ (fun y => A y v) x u = fderiv ℝ A x u v := by + have h := hA.hasFDerivAt.clm_apply (hasFDerivAt_const v x) + simpa using congrArg (fun L => L u) h.fderiv + +/-- The directional form is the diagonal evaluation of the genuine +second Fréchet derivative. -/ +theorem diagonalSecond_eq {f : E → F} {x : E} + (hf : ContDiffAt ℝ 2 f x) (ξ : E) : + diagonalSecond f x ξ = iteratedFDeriv ℝ 2 f x (fun _ => ξ) := by + rw [diagonalSecond, iteratedFDeriv_two_apply] + exact fderiv_apply_fixed ((hf.fderiv_right (m := 1) (by norm_num)).differentiableAt + (by norm_num)) ξ ξ + +/-- All three terms of the second derivative of an operator applied to +a vector field, with the two equal mixed terms combined. -/ +theorem diagonalSecond_clm_apply {K : E → F →L[ℝ] F} {v : E → F} {x : E} + (hK : ContDiffAt ℝ 2 K x) (hv : ContDiffAt ℝ 2 v x) (ξ : E) : + diagonalSecond (fun y => K y (v y)) x ξ = + K x (diagonalSecond v x ξ) + + 2 • (fderiv ℝ K x ξ (fderiv ℝ v x ξ)) + + diagonalSecond K x ξ (v x) := by + have hKdiff := hK.differentiableAt (by norm_num) + have hvdiff := hv.differentiableAt (by norm_num) + have hdK := (hK.fderiv_right (m := 1) (by norm_num)).differentiableAt (by norm_num) + have hdv := (hv.fderiv_right (m := 1) (by norm_num)).differentiableAt (by norm_num) + have hdKξ := hdK.hasFDerivAt.clm_apply (hasFDerivAt_const ξ x) + have hdvξ := hdv.hasFDerivAt.clm_apply (hasFDerivAt_const ξ x) + have hterm := (hKdiff.hasFDerivAt.clm_apply hdvξ).add + (hdKξ.clm_apply hvdiff.hasFDerivAt) + have heq : (fun y => K y (fderiv ℝ v y ξ) + fderiv ℝ K y ξ (v y)) =ᶠ[𝓝 x] + (fun y => fderiv ℝ (fun z => K z (v z)) y ξ) := by + filter_upwards [hK.eventually (by norm_num), hv.eventually (by norm_num)] with y hKy hvy + rw [fderiv_clm_apply (hKy.differentiableAt (by norm_num)) + (hvy.differentiableAt (by norm_num))] + simp + have hder := hterm.congr_of_eventuallyEq heq.symm + have hvsecond := fderiv_apply_fixed hdv ξ ξ + have hKsecond := fderiv_apply_fixed hdK ξ ξ + rw [diagonalSecond, hder.fderiv] + simp only [add_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.flip_apply, zero_apply] + dsimp [diagonalSecond] at hvsecond hKsecond ⊢ + rw [hvsecond, hKsecond] + simp only [map_zero, zero_apply, zero_add] + module + +/-- Addition of maps preserves the actual second directional derivative. -/ +theorem diagonalSecond_add {f g : E → F} {x : E} + (hf : ContDiffAt ℝ 2 f x) (hg : ContDiffAt ℝ 2 g x) (ξ : E) : + diagonalSecond (fun y => f y + g y) x ξ = + diagonalSecond f x ξ + diagonalSecond g x ξ := by + rw [diagonalSecond_eq (hf.add hg), diagonalSecond_eq hf, diagonalSecond_eq hg] + rw [show (fun y => f y + g y) = f + g from rfl, iteratedFDeriv_add_apply hf hg] + rfl + +end General + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- The exact metric increment for the genuine update. The derivative +of the inverse transpose is contracted with the old Jacobian before +being estimated, so only the diagonal second derivative of `h` remains. -/ +theorem inverseTranspose_update_metric_increment + {h v : E → E} {x : E} (hh : ContDiffAt ℝ 2 h x) + (hv : DifferentiableAt ℝ v x) (J : E ≃L[ℝ] E) + (hJ : fderiv ℝ h x = (J : E →L[ℝ] E)) (ξ : E) : + let next := fun y => h y + operatorInverseTranspose (fderiv ℝ h y) (v y) + let delta := fderiv ℝ next x ξ - J ξ + ‖fderiv ℝ next x ξ‖ ^ 2 - ‖J ξ‖ ^ 2 = + 2 * ⟪ξ, fderiv ℝ v x ξ⟫_ℝ - + 2 * ⟪diagonalSecond h x ξ, inverseTranspose J (v x)⟫_ℝ + ‖delta‖ ^ 2 := by + dsimp only + have hdJ := (hh.fderiv_right (m := 1) (by norm_num)).differentiableAt (by norm_num) + have hi := hasFDerivAt_operator_inverseTranspose J + rw [← hJ] at hi + have hK := hi.comp x hdJ.hasFDerivAt + have hstep := (hh.differentiableAt (by norm_num)).hasFDerivAt.fun_add + (hK.clm_apply hv.hasFDerivAt) + change HasFDerivAt (fun y => h y + + operatorInverseTranspose (fderiv ℝ h y) (v y)) _ x at hstep + have hder : fderiv ℝ (fun y => h y + + operatorInverseTranspose (fderiv ℝ h y) (v y)) x ξ = + J ξ + (inverseTranspose J (fderiv ℝ v x ξ) + + inverseTransposeVariation J (fderiv ℝ (fderiv ℝ h) x ξ) (v x)) := by + rw [hstep.fderiv] + simp only [add_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.flip_apply, hJ] + simp only [Function.comp_apply, hJ, operatorInverseTranspose_equiv] + have hvar := inverseTranspose_derivative_apply J (fderiv ℝ (fderiv ℝ h) x ξ) + simp only [ContinuousLinearMap.comp_apply] at hvar + rw [hvar] + rfl + rw [hder] + have hdiag : diagonalSecond h x ξ = fderiv ℝ (fderiv ℝ h) x ξ ξ := + fderiv_apply_fixed hdJ ξ ξ + rw [hdiag] + simpa only [add_sub_cancel_left] using + norm_sq_inverseTranspose_increment J (fderiv ℝ (fderiv ℝ h) x ξ) + ξ (fderiv ℝ v x ξ) (v x) + +/-- The first two inverse-field costs follow from only three source +derivatives. The same constant works for every point and jet base. -/ +theorem exists_inverseTranspose_low_order_cost {A : ℝ} (hA : 1 ≤ A) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (h : E → E) (x : E), + ContDiffAt ℝ 3 h x → IsUnit (fderiv ℝ h x) → + ‖Ring.inverse (fderiv ℝ h x)‖ ≤ Real.sqrt A → + (∀ m, 2 ≤ m → m ≤ 3 → ‖iteratedFDeriv ℝ m h x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) → + let K := fun y => operatorInverseTranspose (fderiv ℝ h y) + ‖K x‖ ≤ C ∧ ∀ ξ w : E, + ‖fderiv ℝ K x ξ w‖ ≤ 8 * C * B * ‖ξ‖ * ‖w‖ ∧ + ‖diagonalSecond K x ξ w‖ ≤ 216 * C * B ^ 2 * ‖ξ‖ ^ 2 * ‖w‖ := by + obtain ⟨C, hC0, hC1, hbound⟩ := + inverseTranspose_iteratedFDeriv_finite_uniform_bound (E := E) hA + refine ⟨C, hC0, hC1, ?_⟩ + intro B hB h x hh hunit hinv hsource + let J := fderiv ℝ h + let K := fun y => operatorInverseTranspose (J y) + have hJ : ContDiffAt ℝ 2 J x := hh.fderiv_right (by norm_num) + have hK : ContDiffAt ℝ 2 K x := contDiffAt_inverseTranspose_field hJ hunit + have hJacobian (m : ℕ) (hm : 0 < m) (hm2 : m ≤ 2) : + ‖iteratedFDeriv ℝ m J x‖ ≤ factorialMajorant m * jetCoefficientScale B m := by + rw [norm_iteratedFDeriv_fderiv] + calc + _ ≤ B ^ ((m + 1) - 1) * ((m + 1).factorial : ℝ) ^ 3 := + hsource (m + 1) (by omega) (by omega) + _ = _ := by + simp only [Nat.add_sub_cancel] + unfold factorialMajorant jetCoefficientScale + rw [Nat.factorial_succ] + push_cast + ring + have hKb := hbound B hB 2 J x hJ hunit hinv hJacobian + have h0 : ‖K x‖ ≤ C := by + simpa [factorialMajorant] using hKb 0 (by omega) + have h1 : ‖fderiv ℝ K x‖ ≤ 8 * C * B := by + have hb := hKb 1 (by omega) + norm_num [factorialMajorant, jetCoefficientScale] at hb + convert hb using 1; ring + have h2 : ‖iteratedFDeriv ℝ 2 K x‖ ≤ 216 * C * B ^ 2 := by + have hb := hKb 2 (by omega) + norm_num [factorialMajorant, jetCoefficientScale] at hb + convert hb using 1; ring + refine ⟨h0, fun ξ w => ⟨?_, ?_⟩⟩ + · calc + _ ≤ ‖fderiv ℝ K x ξ‖ * ‖w‖ := (fderiv ℝ K x ξ).le_opNorm w + _ ≤ (‖fderiv ℝ K x‖ * ‖ξ‖) * ‖w‖ := + mul_le_mul_of_nonneg_right ((fderiv ℝ K x).le_opNorm ξ) (norm_nonneg _) + _ ≤ _ := by gcongr + · rw [diagonalSecond_eq hK] + calc + _ ≤ ‖iteratedFDeriv ℝ 2 K x (fun _ => ξ)‖ * ‖w‖ := + (iteratedFDeriv ℝ 2 K x (fun _ => ξ)).le_opNorm w + _ ≤ (‖iteratedFDeriv ℝ 2 K x‖ * ‖ξ‖ ^ 2) * ‖w‖ := by + gcongr + simpa using (iteratedFDeriv ℝ 2 K x).le_opNorm (fun _ => ξ) + _ ≤ _ := by gcongr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicCenterDecay.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicCenterDecay.lean new file mode 100644 index 0000000000000000000000000000000000000000..b35ebc4d0d0e1f6e613629f6eaca1e1b26f6dfc4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicCenterDecay.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Coordinates.OutwardCovectorGrowth +import OAI.Geometry.RCD.Coordinates.DyadicRadialFits + +namespace OAI + +/-! # Vanishing of affine center values at shrinking radial scales -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- The actual dyadic radius decays faster than the proved covector +growth. Thus the size estimate for affine fit centers forces a zero limit. -/ +theorem dyadic_affine_center_tendsto_zero {n : ℕ} {r0 M : ℝ} + (hr0 : 0 ≤ r0) (hM : 0 ≤ M) + (F : ℕ → Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n) + (hgrowth : ∀ i, ‖(F i).symm b‖ ≤ (9 / 8 : ℝ) ^ i * ‖(F 0).symm b‖) + (c : ℕ → ℝ) + (hsize : ∀ i, |c i| ≤ M * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖) : + Tendsto c atTop (𝓝 0) := by + have hrad (i : ℕ) : (distanceSourceRadius r0 i / 64) * (9 / 8 : ℝ) ^ i = + (r0 / 128) * (9 / 16 : ℝ) ^ i := by + calc + _ = (r0 / 128) * ((9 / 8 : ℝ) ^ i / (2 : ℝ) ^ i) := by + unfold distanceSourceRadius + rw [pow_succ] + field_simp + ring + _ = _ := by rw [← div_pow]; norm_num + have hbound (i : ℕ) : ‖c i‖ ≤ + (M * (r0 / 128) * ‖(F 0).symm b‖) * (9 / 16 : ℝ) ^ i := by + rw [Real.norm_eq_abs] + have hh := mul_le_mul_of_nonneg_left (hgrowth i) + (show 0 ≤ M * (distanceSourceRadius r0 i / 64) by + unfold distanceSourceRadius + positivity) + apply (hsize i).trans (hh.trans_eq ?_) + calc + _ = M * ((distanceSourceRadius r0 i / 64) * (9 / 8 : ℝ) ^ i) * ‖(F 0).symm b‖ := by ring + _ = _ := by rw [hrad]; ring + have ht := (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 9 / 16) + (by norm_num : (9 / 16 : ℝ) < 1)).const_mul (M * (r0 / 128) * ‖(F 0).symm b‖) + apply squeeze_zero_norm hbound + simpa only [mul_zero] using ht + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicCovectorGrowth.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicCovectorGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..36281cc37a8088180852e78292cd682b71e3f3a3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicCovectorGrowth.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.AdjacentMeanComparison + +namespace OAI + +/-! # Slow growth of covectors in the same exact dyadic frames -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Exact normalization converts the adjacent mean comparison directly +into slow growth of the covector norm used by the radial fit recurrence. -/ +theorem dyadic_covector_norm_growth {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) {a R ε : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) (hR : 0 < R) (hscale : a * (3 * R) ≤ 1) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 64) + (S : ℕ → Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (R / 2 ^ i)) measurableSet_ball (S i)) + (hfirst : ∀ i, ∃ w : X → Euclidean (m + 1), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (R / 2 ^ i) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) w) : + ∀ i k (b : Euclidean (m + 1)), + ‖(S i).symm b‖ ≤ (9 / 8 : ℝ) ^ k * ‖(S (i + k)).symm b‖ := by + let μ := hausdorff (m + 1) X + have hstep (i : ℕ) (b : Euclidean (m + 1)) : + ‖(S i).symm b‖ ≤ (9 / 8 : ℝ) * ‖(S (i + 1)).symm b‖ := by + have hr : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hrR : R / (2 : ℝ) ^ i ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hscaled : a * (3 * ((R / (2 : ℝ) ^ i) / 2)) ≤ 1 := by + apply le_trans (mul_le_mul_of_nonneg_left (show 3 * ((R / (2 : ℝ) ^ i) / 2) ≤ 3 * R by linarith) ha) hscale + obtain ⟨w, hw⟩ := hfirst i + have hh := (normalized_adjacent_mean_comparison m hX ha hBG u (S i) hr hscaled hε hw (hexact i) b).1 + have hnext : (R / (2 : ℝ) ^ i) / 2 = R / 2 ^ (i + 1) := by + rw [pow_succ] + field_simp + rw [hnext] at hh + rw [← exact_mean_inverse_norm_sq μ hX.quadratic _ _ measurableSet_ball (S i) (hexact i) b, + ← exact_mean_inverse_norm_sq μ hX.quadratic _ _ measurableSet_ball (S (i + 1)) (hexact (i + 1)) b] at hh + have hs := mul_le_mul_of_nonneg_right hsmall (sq_nonneg ‖(S i).symm b‖) + have hsq : ‖(S i).symm b‖ ^ 2 ≤ ((9 / 8 : ℝ) * ‖(S (i + 1)).symm b‖) ^ 2 := by + nlinarith [sq_nonneg ‖(S (i + 1)).symm b‖] + exact (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp hsq + intro i k b + induction k with + | zero => simp + | succ k ih => + have hh := mul_le_mul_of_nonneg_left (hstep (i + k) b) (pow_nonneg (by norm_num : (0 : ℝ) ≤ 9 / 8) k) + calc + _ ≤ (9 / 8 : ℝ) ^ k * ‖(S (i + k)).symm b‖ := ih + _ ≤ (9 / 8 : ℝ) ^ k * ((9 / 8 : ℝ) * ‖(S (i + k + 1)).symm b‖) := hh + _ = _ := by simp only [Nat.add_assoc, pow_succ]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicFitVolumeUnits.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicFitVolumeUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..205860c258dfdc20c3ecffa165b5e552e655493b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicFitVolumeUnits.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits + +namespace OAI + +/-! # Removing radius and volume units from the covector fit step -/ + +namespace RegularPointCoordinates + +theorem radial_sqrt_volume_ratio {n : ℕ} {r theta omega V W : ℝ} + (hr : 0 < r) (htheta : 0 < theta) (homega : 0 < omega) (hV0 : 0 ≤ V) + (hV : |V / (omega * r ^ n) - 1| ≤ 1 / 4) + (hW : |W / (omega * (theta * r) ^ n) - 1| ≤ 1 / 4) : + Real.sqrt V / Real.sqrt W ≤ Real.sqrt ((5 / 3 : ℝ) * (theta ^ n)⁻¹) := by + rw [← Real.sqrt_div hV0] + exact Real.sqrt_le_sqrt (radial_fraction_volume_ratio hr htheta homega hV hW) + +/-- The actual covector error has one coefficient independent of the +center and dyadic scale; its only variable source is sqrt(P) times the +norm of the covector in the current normalizing frame. -/ +theorem radial_covector_fit_natural_units {s theta V Lambda A D N W Q b E F : ℝ} + (hs : 0 < s) (htheta : 0 < theta) (hV : 0 ≤ V) (hQ : 0 ≤ Q) + (hA : 0 ≤ A) (hD : 0 ≤ D) (hb : 0 ≤ b) (hVL : V ≤ Lambda) (hratio : N / W ≤ D) + (hstep : F ≤ (V + (1 / 2 : ℝ) * theta * Real.sqrt theta) / (theta * (s / 64)) * + Real.sqrt (W⁻¹ * (A * s ^ 2 * (N * Q)) * b ^ 2) + + (1 / 2 : ℝ) * Real.sqrt theta * E) : + F ≤ (1 / 2 : ℝ) * Real.sqrt theta * E + + (64 / theta) * (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) * + Real.sqrt (A * D) * Real.sqrt Q * b := by + have hroot := radial_sqrt_error_bound hs.le (mul_nonneg hQ (sq_nonneg b)) hA hD hratio + have he : W⁻¹ * (A * s ^ 2 * (N * (Q * b ^ 2))) = + W⁻¹ * (A * s ^ 2 * (N * Q)) * b ^ 2 := by ring + rw [he, Real.sqrt_mul hQ, Real.sqrt_sq hb] at hroot + have hcoef : (V + (1 / 2 : ℝ) * theta * Real.sqrt theta) / (theta * (s / 64)) ≤ + (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) / (theta * (s / 64)) := + div_le_div_of_nonneg_right (add_le_add hVL (le_refl _)) (by positivity) + have hLambda : 0 ≤ Lambda := hV.trans hVL + have hh := mul_le_mul hcoef hroot (Real.sqrt_nonneg _) + (by positivity : 0 ≤ (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) / (theta * (s / 64))) + apply hstep.trans + calc + _ ≤ (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) / (theta * (s / 64)) * + (s * Real.sqrt (A * D) * (Real.sqrt Q * b)) + + (1 / 2 : ℝ) * Real.sqrt theta * E := add_le_add hh (le_refl _) + _ = _ := by field_simp; ring + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicMeanControl.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicMeanControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ba2b57fb6239d12e75c4cbf3ee78f068ce84f89 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicMeanControl.lean @@ -0,0 +1,145 @@ +import OAI.Geometry.RCD.Coordinates.AdjacentMeanComparison +import Mathlib.Analysis.InnerProductSpace.Rayleigh + +namespace OAI + +/-! +# Dyadic growth and relative error of actual mean Grams + +Adjacent relative estimates give an explicit outward growth bound and an +error that is linear in the original splitting error. This is the bound +needed when summing Gaussian annuli in a frame normalized at a small radius. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +/-- Adjacent relative bounds propagate outwards, retaining a factor of +the small error in the difference from the initial value. -/ +theorem relative_sequence_growth {s : ℕ → ℝ} {δ : ℝ} + (hδ : 0 ≤ δ) (hδhalf : δ ≤ 1 / 2) (k : ℕ) + (hs : ∀ j ≤ k, 0 ≤ s j) + (hstep : ∀ j < k, (1 - δ) * s (j + 1) ≤ s j ∧ s j ≤ (1 + δ) * s (j + 1)) : + s k ≤ 2 ^ k * s 0 ∧ |s k - s 0| ≤ 2 * δ * (2 ^ k - 1) * s 0 := by + induction k with + | zero => simp + | succ k ih => + have hk := ih (fun j hj => hs j (hj.trans (Nat.le_succ k))) + (fun j hj => hstep j (hj.trans_le (Nat.le_succ k))) + have hnext : s (k + 1) ≤ 2 * s k := by + have he := (hstep k (Nat.lt_succ_self k)).1 + have hp := mul_le_mul_of_nonneg_right hδhalf (hs (k + 1) le_rfl) + linarith + have hdiff : |s (k + 1) - s k| ≤ δ * s (k + 1) := by + apply abs_le.mpr + constructor + · nlinarith [(hstep k (Nat.lt_succ_self k)).2] + · nlinarith [(hstep k (Nat.lt_succ_self k)).1] + have hupper : s (k + 1) ≤ 2 ^ (k + 1) * s 0 := by + rw [pow_succ] + nlinarith [hk.1] + refine ⟨hupper, ?_⟩ + have ht : |s (k + 1) - s 0| ≤ |s (k + 1) - s k| + |s k - s 0| := by + have he : s (k + 1) - s 0 = (s (k + 1) - s k) + (s k - s 0) := by ring + rw [he] + exact abs_add_le _ _ + have hh := mul_le_mul_of_nonneg_left hupper hδ + rw [pow_succ] at hh ⊢ + nlinarith [hk.2] + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- A symmetric operator norm is controlled by all of its quadratic +forms, with no extra dimension factor. -/ +theorem symmetric_norm_le_of_quadratic (A : E →L[ℝ] E) (hA : A.IsSymmetric) + {C : ℝ} (hC : 0 ≤ C) (hbound : ∀ v, |⟪v, A v⟫_ℝ| ≤ C * ‖v‖ ^ 2) : + ‖A‖ ≤ C := by + rw [A.norm_eq_iSup_rayleighQuotient hA] + apply ciSup_le + intro v + by_cases hv : v = 0 + · simpa only [hv, A.rayleighQuotient_apply_zero, abs_zero] using hC + have hp : 0 < ‖v‖ ^ 2 := sq_pos_of_pos (norm_pos_iff.mpr hv) + change |⟪A v, v⟫_ℝ / ‖v‖ ^ 2| ≤ C + rw [real_inner_comm, abs_div, abs_of_pos hp] + exact (div_le_iff₀ hp).mpr (hbound v) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A relative quadratic estimate for two actual means is an operator +estimate in any exact normalizing frame for the reference mean. -/ +theorem normalized_mean_relative_norm_le (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + [CompleteSpace E] (U : E →L[ℝ] SobolevSpace μ hQ) + (s t : Set X) (hs : MeasurableSet s) (ht : MeasurableSet t) + (A : E ≃L[ℝ] E) (hA : IsExactMeanNormalization μ hQ U s hs A) + {C : ℝ} (hC : 0 ≤ C) + (hrelative : ∀ v, |⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ - + ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ| ≤ + C * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ) : + ‖sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) t ht - + ContinuousLinearMap.id ℝ E‖ ≤ C := by + have hsym := (sobolevMeanGram_isPositive μ hQ (U.comp (A : E →L[ℝ] E)) t ht).isSymmetric + apply symmetric_norm_le_of_quadratic _ (hsym.sub LinearMap.IsSymmetric.id) hC + intro v + have hmean (b : Set X) (hb : MeasurableSet b) : + ⟪v, sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) b hb v⟫_ℝ = + ⟪A v, sobolevMeanGram μ hQ U b hb (A v)⟫_ℝ := by + rw [sobolevMeanGram_comp, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.adjoint_inner_right, ContinuousLinearMap.comp_apply] + rfl + have hnorm : ⟪A v, sobolevMeanGram μ hQ U s hs (A v)⟫_ℝ = ‖v‖ ^ 2 := by + rw [← hmean s hs, hA, ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] + simpa only [sub_apply, ContinuousLinearMap.id_apply, inner_sub_right, + real_inner_self_eq_norm_sq, hmean, hnorm] using hrelative (A v) + +/-- Outward dyadic means of the same original harmonic map have linear +relative error. Every adjacent premise comes from the proved +normalization/Bishop--Gromov comparison. -/ +theorem dyadic_mean_growth {K : ℝ} (m : ℕ) (hX : NoncollapsedRCD K (m + 1) X) + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 2) + (k : ℕ) (hscale : ∀ j ≤ k, a * (3 * (2 ^ j * r)) ≤ 1) + (hnormal : ∀ j ≤ k, ∃ (A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (w : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 ^ j * r) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u A) w ∧ + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (2 ^ j * r)) measurableSet_ball A) + (v : Euclidean (m + 1)) : + let R := fun j => sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (2 ^ j * r)) measurableSet_ball + ⟪v, R k v⟫_ℝ ≤ 2 ^ k * ⟪v, R 0 v⟫_ℝ ∧ + |⟪v, R k v⟫_ℝ - ⟪v, R 0 v⟫_ℝ| ≤ + 2 * (((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε)) * + (2 ^ k - 1) * ⟪v, R 0 v⟫_ℝ := by + let μ := hausdorff (m + 1) X + let U := sobolevColumnMap μ hX.quadratic u + let R := fun j => sobolevMeanGram μ hX.quadratic U (ball p (2 ^ j * r)) measurableSet_ball + let δ := ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) + have hδ : 0 ≤ δ := mul_nonneg (sq_nonneg _) (mul_nonneg + (zero_le_one.trans (normalizationVolumeRatio_ge_one m)) hε) + apply relative_sequence_growth hδ hsmall k + (fun j _ => (sobolevMeanGram_isPositive μ hX.quadratic U + (ball p (2 ^ j * r)) measurableSet_ball).inner_nonneg_right v) + intro j hj + obtain ⟨A, w, hfirst, hexact⟩ := hnormal (j + 1) hj + have hrj : 0 < (2 : ℝ) ^ (j + 1) * r := mul_pos (pow_pos (by norm_num) _) hr + have hhalf : (2 : ℝ) ^ (j + 1) * r / 2 = 2 ^ j * r := by rw [pow_succ]; ring + have hb := normalized_adjacent_mean_comparison m hX ha hBG u A hrj + (by rw [hhalf]; exact hscale j (Nat.le_of_lt hj)) hε hfirst hexact v + simpa only [hhalf] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedError.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedError.lean new file mode 100644 index 0000000000000000000000000000000000000000..f036b9985d927f7c9bac1cd4544b8ca03c3534a7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedError.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.RCD.Coordinates.DyadicMeanControl +import OAI.Geometry.RCD.Coordinates.NormalizedDirectionError + +namespace OAI + +/-! # Uniform directional errors in a fixed dyadic normalizing frame -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Outward mean comparisons become a norm estimate in the initial exact frame. -/ +theorem dyadic_normalized_mean_bound {K : ℝ} (m : ℕ) (hX : NoncollapsedRCD K (m + 1) X) + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 2) + (A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (hA : IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (k : ℕ) (hscale : ∀ j ≤ k, a * (3 * (2 ^ j * r)) ≤ 1) + (hnormal : ∀ j ≤ k, ∃ (S : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (w : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 ^ j * r) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (2 ^ j * r)) measurableSet_ball S) : + ‖sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + ((sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u).comp (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1))) + (ball p (2 ^ k * r)) measurableSet_ball - + ContinuousLinearMap.id ℝ (Euclidean (m + 1))‖ ≤ + 2 * (((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε)) * (2 ^ k - 1) := by + apply normalized_mean_relative_norm_le _ _ _ (ball p r) (ball p (2 ^ k * r)) + measurableSet_ball measurableSet_ball A hA + · have hratio : 0 ≤ normalizationVolumeRatio m := + zero_le_one.trans (normalizationVolumeRatio_ge_one m) + have hp : (1 : ℝ) ≤ 2 ^ k := one_le_pow₀ (by norm_num) + positivity + · intro v + simpa only [pow_zero, one_mul] using + (dyadic_mean_growth m hX ha hBG u p hr hε hsmall k hscale hnormal v).2 + +/-- The coefficient in the directional estimate grows at most like `2^k`, +while retaining the original splitting error. -/ +theorem dyadic_error_coefficient_le {n C ε : ℝ} (hC : 0 ≤ C) + (hε : 0 ≤ ε) (hsmall : n ^ 2 * (C * ε) ≤ 1 / 2) (k : ℕ) : + (n ^ 2 * ε) * (1 + 2 * (n ^ 2 * (C * ε)) * (2 ^ k - 1)) + + 2 * (n ^ 2 * (C * ε)) * (2 ^ k - 1) ≤ + (n ^ 2 + 2 * (n ^ 2 * C)) * ε * 2 ^ k := by + have hp : (1 : ℝ) ≤ 2 ^ k := one_le_pow₀ (by norm_num) + have hbound : 1 + 2 * (n ^ 2 * (C * ε)) * (2 ^ k - 1) ≤ 2 ^ k := by + nlinarith + have h1 := mul_le_mul_of_nonneg_left hbound (mul_nonneg (sq_nonneg n) hε) + have h2 : 2 * (n ^ 2 * (C * ε)) * (2 ^ k - 1) ≤ + 2 * (n ^ 2 * (C * ε)) * 2 ^ k := by + apply mul_le_mul_of_nonneg_left (by linarith) + positivity + nlinarith + +/-- Every finite outward dyadic ball has a directional L1 error bounded +by the initial splitting tolerance times an explicit geometric factor. -/ +theorem dyadic_normalized_directional_error {K : ℝ} (m : ℕ) (hX : NoncollapsedRCD K (m + 1) X) + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 2) + (A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (hA : IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (k : ℕ) (hscale : ∀ j ≤ k, a * (3 * (2 ^ j * r)) ≤ 1) + (hnormal : ∀ j ≤ k, ∃ (S : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (w : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 ^ j * r) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (2 ^ j * r)) measurableSet_ball S) + (hvolume : 0 < (hausdorff (m + 1) X).real (ball p (2 ^ k * r))) + (hfinite : hausdorff (m + 1) X (ball p (2 ^ k * r)) ≠ ⊤) + (v : Euclidean (m + 1)) : + (∫ x in ball p (2 ^ k * r), + |localGamma (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u (A v)) + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u (A v)) x - ‖v‖ ^ 2| + ∂(hausdorff (m + 1) X)) ≤ + ((((m + 1 : ℕ) : ℝ) ^ 2 + + 2 * (((m + 1 : ℕ) : ℝ) ^ 2 * normalizationVolumeRatio m)) * ε * 2 ^ k) * + (hausdorff (m + 1) X).real (ball p (2 ^ k * r)) * ‖v‖ ^ 2 := by + obtain ⟨S, w, hfirst, hexact⟩ := hnormal k le_rfl + have hmean := dyadic_normalized_mean_bound m hX ha hBG u p hr hε hsmall A hA + k hscale hnormal + have he := changed_frame_directional_error (hausdorff (m + 1) X) hX.quadratic u p + (2 ^ k * r) S A hε hfirst hexact hvolume hfinite hmean v + have hc := dyadic_error_coefficient_le + (zero_le_one.trans (normalizationVolumeRatio_ge_one m)) hε hsmall k + exact he.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hc hvolume.le) (sq_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedFamily.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae5fdb50a98d5a9550f8d91b1eef7b497a5a5166 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedFamily.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Coordinates.BoundedRegularNormalization + +namespace OAI + +/-! # Extracting one fixed-root dyadic normalization family -/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The all-small-scales transformation theorem supplies a single chosen +family with exact means at the radii of the actual heat construction. -/ +theorem exists_dyadic_normalized_family (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (p : X) {R T β : ℝ} + (hR : 0 < R) (hRT : 4 * R ≤ T) + (hfamily : ∀ r : ℝ, 0 < r → 64 * r ≤ T → + ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (16 * r)) measurableSet_ball A ∧ + ∃ w : X → Euclidean n, + FirstOrderSplittingOn μ hQ p (16 * r) β (transformedColumn μ hQ u A) w) : + ∃ S : ℕ → Euclidean n ≃L[ℝ] Euclidean n, + (∀ i, IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + ∀ i, ∃ w : X → Euclidean n, + FirstOrderSplittingOn μ hQ p (R / 2 ^ i) β (transformedColumn μ hQ u (S i)) w := by + have hchoose (i : ℕ) : ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (R / 2 ^ i)) measurableSet_ball A ∧ + ∃ w : X → Euclidean n, + FirstOrderSplittingOn μ hQ p (R / 2 ^ i) β (transformedColumn μ hQ u A) w := by + have hs : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hsR : R / (2 : ℝ) ^ i ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsmall : 64 * ((R / 2 ^ i) / 16) ≤ T := by linarith + have h := hfamily ((R / 2 ^ i) / 16) (by positivity) hsmall + simpa only [show 16 * ((R / (2 : ℝ) ^ i) / 16) = R / 2 ^ i by ring] using h + choose S hS using hchoose + exact ⟨S, fun i => (hS i).1, fun i => (hS i).2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..34fe32b8074335d6b9472e8d8964fb98b5e94a5e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedGradient.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Coordinates.FiniteNormalizerGrowth +import OAI.Geometry.RCD.Coordinates.InitialAnalyticBounds + +namespace OAI + +/-! # Growth of the actual harmonic gradients in one root-normalized frame -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_gradient_bound {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m+1) X) {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (u : Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*ε) ≤ 1/2) + (A : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (k : ℕ) (hscale : ∀ j ≤ k, a*(3*(2^j*r)) ≤ 1) + (hframes : ∀ j ≤ k, ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic p (2^j*r) ε + (transformedColumn (hausdorff (m+1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) + (ball p (2^j*r)) measurableSet_ball S) + (z : Euclidean (m+1)) : + ∀ᵐ x ∂(hausdorff (m+1) X).restrict (ball p (2^k*r)), + localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) x + ≤ 4*((m+1 : ℕ) : ℝ)^2*2^k*‖z‖^2 := by + let μ := hausdorff (m+1) X + let U := sobolevColumnMap μ hX.quadratic u + obtain ⟨S,w,hfirst,hS⟩ := hframes k le_rfl + have hrelative : ‖S.symm (A z)‖^2 ≤ (2 : ℝ)^k*‖z‖^2 := by + rw [exact_mean_inverse_norm_sq μ hX.quadratic U (ball p (2^k*r)) measurableSet_ball S hS] + have hh := (dyadic_mean_growth m hX ha hBG u p hr hε hsmall k hscale hframes (A z)).1 + simp only [pow_zero,one_mul] at hh + rw [meanGram_energy_of_exact_normalization μ hX.quadratic U (ball p r) measurableSet_ball A hA, + A.symm_apply_apply] at hh + exact hh + have hb := hfirst.directional_gradient μ hX.quadratic (S.symm (A z)) + rw [sobolevColumnMap_transformed] at hb + simp only [ContinuousLinearMap.comp_apply,ContinuousLinearEquiv.coe_coe,S.apply_symm_apply] at hb + have hcoef : (((m+1 : ℕ) : ℝ)*(1+ε))^2 ≤ 4*((m+1 : ℕ) : ℝ)^2 := + splittingDirectionBound_sq_le hε hε1 + filter_upwards [hb] with x hx + have hm := mul_le_mul hcoef hrelative (sq_nonneg _) (by positivity : 0 ≤ 4*((m+1 : ℕ) : ℝ)^2) + exact hx.trans (by nlinarith only [hm]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedLipschitz.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedLipschitz.lean new file mode 100644 index 0000000000000000000000000000000000000000..f7423beb969ab5081cbf25e6849c187c684c22cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicNormalizedLipschitz.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.DyadicNormalizedGradient +import OAI.Geometry.RCD.Sobolev.ColumnGradientValueBound + +namespace OAI + +/-! # Lipschitz control in the same root-normalized harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_lipschitz_bound {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (u : Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : X → Euclidean (m+1)) (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*ε) ≤ 1/2) + (A : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (k : ℕ) (hscale : ∀ j ≤ k, a*(3*(2^j*r)) ≤ 1) + (hframes : ∀ j ≤ k, ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic p (2^j*r) ε + (transformedColumn (hausdorff (m+1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) + (ball p (2^j*r)) measurableSet_ball S) + (hv : ContinuousOn v (ball p (2^k*r))) + (hrep : ∀ i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball p (2^k*r))] fun x => v x i) + (z : Euclidean (m+1)) : + ∀ x ∈ ball p ((2 : ℝ)^k*r/8), ∀ y ∈ ball p ((2 : ℝ)^k*r/8), + |⟪v x-v y,A z⟫_ℝ| ≤ + (2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^k)*‖z‖)*dist x y := by + let L : ℝ≥0 := ⟨2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^k)*‖z‖,by positivity⟩ + have hrad : 8*((2 : ℝ)^k*r/8) = 2^k*r := by ring + have hgrad := dyadic_root_gradient_bound m hX ha hBG u p hr hε hε1 hsmall A hA k hscale hframes z + have hL : (L : ℝ)^2 = 4*((m+1 : ℕ) : ℝ)^2*2^k*‖z‖^2 := by + change (2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^k)*‖z‖)^2 = _ + rw [mul_pow,mul_pow,mul_pow,Real.sq_sqrt (by positivity)] + ring + have hg : ∀ᵐ x ∂(hausdorff (m+1) X).restrict (ball p (8*((2 : ℝ)^k*r/8))), + localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) x ≤ (L : ℝ)^2 := by + rw [hrad,hL] + exact hgrad + have hl := hX.continuous_local_gradient_lipschitz hm + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) + (fun x => ⟪v x,A z⟫_ℝ) p (by positivity : 0 < (2 : ℝ)^k*r/8) L + (by rw [hrad]; exact hv.inner continuousOn_const) + (by + rw [hrad] + exact sobolevColumnMap_representative (hausdorff (m+1) X) + hX.quadratic u (ball p (2^k*r)) v hrep (A z)) hg + intro x hx y hy + have hh := hl.dist_le_mul x hx y hy + have hLval : (L : ℝ) = 2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^k)*‖z‖ := rfl + rw [Real.dist_eq,hLval] at hh + simpa only [inner_sub_left] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFit.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFit.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b98c2f2338272f56d3cbb320729af1f29d58dc1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFit.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRadialFits + +namespace OAI + +/-! # The canonical actual dyadic radial-fit sequence -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [IsFiniteMeasureOnCompacts (hausdorff n X)] + +/-- The bound only supplies local L2 membership. The numerical value is +the actual least-squares residual for the canonical distance derivative. -/ +def dyadicRadialFit {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0} + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (L : ℝ) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (i : ℕ) (b : Euclidean n) : ℝ := + radialFitError (hausdorff n X) hX.quadratic u p (distanceSourceRadius r0 i / 64) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (T.distanceDatum (hausdorff n X) hX.quadratic i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) + (gamma_column_le_of_diagonal_bounds (hausdorff n X) hX.quadratic u _ L (hbase i) b) + +theorem dyadicRadialFit_nonneg {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0} + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (L : ℝ) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (i : ℕ) (b : Euclidean n) : 0 ≤ dyadicRadialFit hX T u L hbase i b := by + apply radialFitError_nonneg + exact (div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num)).le + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFitEstimates.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFitEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..df52fb24be732b9d8d6a3443db66a589a0d781be --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFitEstimates.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRadialFit +import OAI.Geometry.RCD.Coordinates.FramedDyadicFit +import OAI.Geometry.RCD.Coordinates.NormalizedFrameRadialSmallness + +namespace OAI + +/-! # Estimates for one canonical dyadic radial-fit sequence -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +def radialFitStepConstant (K : ℝ) (n : ℕ) (A B J Cχ : ℝ) (m : ℕ) : ℝ := + let θ := (1 / 2 : ℝ) ^ m + (64 / θ) * (Real.sqrt ((5 / 3 : ℝ) * (θ ^ n)⁻¹) + (1 / 2 : ℝ) * θ * Real.sqrt θ) * + Real.sqrt ((n : ℝ) * radialCorrectionConstant K n 1 A B J Cχ * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n)) + +def radialFitQualitativeConstant (n : ℕ) (Cχ : ℝ) : ℝ := + ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * + radialNormalizationRestrictionConstant n * ((5 / 3 : ℝ) * (4 : ℝ) ^ n) + +theorem radialFitStepConstant_nonneg (K : ℝ) (n : ℕ) (A B J Cχ : ℝ) (m : ℕ) : + 0 ≤ radialFitStepConstant K n A B J Cχ m := by + dsimp only [radialFitStepConstant] + positivity + +theorem radialFitQualitativeConstant_nonneg (n : ℕ) {Cχ : ℝ} (hCχ : 0 ≤ Cχ) : + 0 ≤ radialFitQualitativeConstant n Cχ := by + have hd := zero_le_one.trans (radialNormalizationRestrictionConstant_ge_one n) + dsimp only [radialFitQualitativeConstant] + positivity + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [IsFiniteMeasureOnCompacts (hausdorff n X)] + {κ r0 B J C A Cχ L : ℝ} {p : X} + {S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0} + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + +theorem dyadicRadialFit_step + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) + (i : ℕ) (hs1 : distanceSourceRadius r0 i ≤ 1) + (F : Euclidean n ≃L[ℝ] Euclidean n) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (transformedColumn (hausdorff n X) hX.quadratic u F j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic u F j) + (transformedColumn (hausdorff n X) hX.quadratic u F j) x ≤ (1 + (1 : ℝ)) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) + (m : ℕ) + (hfit : HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ m)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ distanceSourceRadius r0 i → + |(hausdorff n X).real (ball p t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) + (b : Euclidean n) : + dyadicRadialFit hX T u L hbase (i + m) b ≤ + (1 / 2 : ℝ) * Real.sqrt ((1 / 2 : ℝ) ^ m) * dyadicRadialFit hX T u L hbase i b + + radialFitStepConstant K n A B J Cχ m * ‖F.symm b‖ * + Real.sqrt (normalizedPoissonDefect (hausdorff n X) hX.quadratic S i) := by + have hstep := actual_framed_dyadic_radial_fit hX hn hhessian hκ hK hB hJ hA + (by norm_num : (0 : ℝ) ≤ 1) hCχ p S T i hs1 u F hu hgrad (hbase i) + hf χ hvol hdouble m hfit hquarter + dsimp only at hstep + have hb := hstep b + convert hb using 1 + · symm + apply radialFitError_radius_eq + exact (distanceSourceRadius_testing_shift r0 i m).symm + · dsimp only [dyadicRadialFit, radialFitStepConstant] + ring + +theorem dyadicRadialFit_smallness {δ : ℝ} (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant n * δ ≤ 1) (hCχ : 0 ≤ Cχ) + (i : ℕ) (F : Euclidean n ≃L[ℝ] Euclidean n) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * distanceSourceRadius r0 i) δ + (transformedColumn (hausdorff n X) hX.quadratic u F) v) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v x - v p))) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ 2 * distanceSourceRadius r0 i → + |(hausdorff n X).real (ball p t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) + (b : Euclidean n) : + (dyadicRadialFit hX T u L hbase i b) ^ 2 ≤ + radialFitQualitativeConstant n Cχ * δ * ‖F.symm b‖ ^ 2 := by + exact T.normalized_frame_fit_smallness (hausdorff n X) hX.quadratic i + (euclideanUnitVolume_pos n) hδ hδ1 hCχ hquarter u F v hfirst hmetric χ b + (gamma_column_le_of_diagonal_bounds (hausdorff n X) hX.quadratic u _ L (hbase i) b) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFits.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..1af2d1897ca15fb9f018bda94b14021bdfc9f06a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicRadialFits.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Coordinates.RadialFitRecurrence +import OAI.Geometry.RCD.Metric.PositiveDistanceLocality + +namespace OAI + +/-! # Actual radial targets at successive dyadic source scales -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The fixed testing fraction commutes with every dyadic scale shift. -/ +theorem distanceSourceRadius_testing_shift (r0 : ℝ) (i m : ℕ) : + distanceSourceRadius r0 (i + m) / 64 = + (1 / 2 : ℝ) ^ m * (distanceSourceRadius r0 i / 64) := by + rw [distanceSourceRadius_add] + simp only [one_div, inv_pow] + ring + +theorem distanceSourceRadius_antitone {r0 : ℝ} (hr0 : 0 ≤ r0) : + Antitone (distanceSourceRadius r0) := by + intro i j hij + obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hij + rw [distanceSourceRadius_add] + exact div_le_self (by unfold distanceSourceRadius; positivity) (one_le_pow₀ (by norm_num)) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +namespace DyadicDistanceReplacements + +/-- The canonical compact squared-distance datum at this source scale. -/ +def distanceDatum {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) : SobolevSpace μ hQ := + positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * distanceSourceRadius r0 i) + (T.cutoff i) + +/-- On a later testing ball every earlier datum gives the same radial +pairing. This identifies the actual targets in the lagged recurrence. -/ +theorem distanceDatum_pairing_later {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) {i j : ℕ} (hij : i ≤ j) + (a : SobolevSpace μ hQ) : + localGamma μ hQ (T.distanceDatum μ hQ i) a =ᵐ[μ.restrict (ball p (distanceSourceRadius r0 j / 64))] + localGamma μ hQ (T.distanceDatum μ hQ j) a := by + have hi := (distanceSourceRadius_pos S.radius_pos i).le + have hj := (distanceSourceRadius_pos S.radius_pos j).le + have hmono := distanceSourceRadius_antitone S.radius_pos.le hij + exact positiveSquaredDistance_pairing_independent μ hQ + (by positivity) (by positivity) (by linarith) (by linarith) (T.cutoff i) (T.cutoff j) a + +/-- Changing to the next canonical source datum preserves the actual +least-squares fit on its testing ball. -/ +theorem distanceDatum_fit_later {n k : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) {i j : ℕ} (hij : i ≤ j) + (u : Fin k → SobolevSpace μ hQ) (a : SobolevSpace μ hQ) + (hfin : μ (ball p (distanceSourceRadius r0 j / 64)) ≠ ∞) {A A' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 j / 64)), localGamma μ hQ a a x ≤ A) + (ha' : ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 j / 64)), localGamma μ hQ a a x ≤ A') : + radialFitError μ hQ u p (distanceSourceRadius r0 j / 64) hfin (T.distanceDatum μ hQ i) a ha = + radialFitError μ hQ u p (distanceSourceRadius r0 j / 64) hfin (T.distanceDatum μ hQ j) a ha' := + radialFitError_congr μ hQ u p _ hfin _ a _ a ha ha' + (T.distanceDatum_pairing_later μ hQ hij a) + +end DyadicDistanceReplacements +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicRootEventualSplitting.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicRootEventualSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..6313adbc4d41403c70be28a993c9d68d0c2fa03c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicRootEventualSplitting.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRootGramConvergence +import OAI.Geometry.RCD.Harmonic.FirstOrderFromConvergingGrams +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # The prescribed root frame eventually satisfies every fixed splitting tolerance -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_eventual_splitting {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (p : ℕ → X) (r ε : ℕ → ℝ) (d : ℕ → ℕ) + (hr : ∀ k, 0 < r k) (hd : Tendsto d atTop atTop) + (hcurv : ∀ k, -1 ≤ K*(r k)^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (V : ℕ → X → Euclidean (m+1)) + (hV : ∀ j : ℕ, ∀ᶠ k in atTop, IsMeasuredEuclideanApproximation (hausdorff (m+1) X) + (m+1) (p k) (r k) ((j : ℝ)+1) (ε k) (V k)) + (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)) (A : ℕ → Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : ∀ k, IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (r k)) measurableSet_ball (A k)) + (hscale : ∀ k j, j ≤ d k → a*(3*((2 : ℝ)^j*r k)) ≤ 1) + (hframes : ∀ k j, j ≤ d k → ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) ((2 : ℝ)^j*r k) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) ((2 : ℝ)^j*r k)) measurableSet_ball S) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) ((2 : ℝ)^(d k)*r k))) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u k i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] fun x => v k x i) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (u k i)) : + ∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) (r k) β + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) (A k)) + (fun x => (A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) := by + let μ := hausdorff (m+1) X + obtain ⟨hg,hgram⟩ := dyadic_root_gram_convergence m hm hX ha hBG hκ hκ1 hsmall + p r ε d hr hd hcurv hcurv5 hε hε1 hεlim V hV u v A hA hscale hframes hv hrep hu + have hsub (k : ℕ) : ball (p k) (r k) ⊆ ball (p k) ((2 : ℝ)^(d k)*r k) := + ball_subset_ball (by nlinarith [one_le_pow₀ (by norm_num : (1:ℝ)≤2) (n:=d k),hr k]) + have hrep' (k : ℕ) (i : Fin (m+1)) : + SobolevSpace.toLp μ hX.quadratic (transformedColumn μ hX.quadratic (u k) (A k) i) =ᵐ[ + μ.restrict (ball (p k) (r k))] + fun x => ((A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) i := by + have he := sobolevColumnMap_representative μ hX.quadratic (u k) (ball (p k) (r k)) (v k) + (fun j => ae_restrict_of_ae_restrict_of_subset (hsub k) (hrep k j)) + (A k (EuclideanSpace.single i 1)) + filter_upwards [he] with x hx + change SobolevSpace.toLp μ hX.quadratic + (sobolevColumnMap μ hX.quadratic (u k) (A k (EuclideanSpace.single i 1))) x = _ + rw [hx] + have hh := ContinuousLinearMap.adjoint_inner_left + (A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)) (EuclideanSpace.single i 1) (v k x) + simpa only [real_inner_comm,EuclideanSpace.inner_single_right,starRingEnd_apply, + star_trivial,one_mul,ContinuousLinearEquiv.coe_coe] using hh.symm + have hv' (k : ℕ) : ContinuousOn + (fun x => (A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) + (ball (p k) (r k)) := + (A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint.continuous.comp_continuousOn + ((hv k).mono (hsub k)) + have hu' (k : ℕ) : ∀ i, IsSobolevHarmonicOn μ hX.quadratic (ball (p k) (r k)) + (transformedColumn μ hX.quadratic (u k) (A k) i) := + transformedColumn_harmonic μ hX.quadratic (u k) (A k) _ + (fun i => (hu k i).mono μ hX.quadratic (hsub k)) + obtain ⟨C,hC,hvol⟩ := hX.rescaled_ball_volume_factor hm (a:=1) (δ:=1/2) + (by norm_num) (by norm_num) (by norm_num) + have hcurv2 (k : ℕ) : -1 ≤ K*(2*r k)^2 := by + by_cases hK : 0 ≤ K + · exact (by norm_num : (-1:ℝ)≤0).trans (mul_nonneg hK (sq_nonneg _)) + · exact (hcurv5 k).trans (mul_le_mul_of_nonpos_left + (pow_le_pow_left₀ (mul_nonneg (by norm_num) (hr k).le) (by linarith [hr k]) 2) + (le_of_not_ge hK)) + apply hX.first_order_of_converging_grams p r hr + (fun k => transformedColumn μ hX.quadratic (u k) (A k)) + (fun k x => (A k : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) + hrep' hv' hu' hC _ hg hgram + intro k + have hh := hvol (p k) (2*r k) (mul_pos (by norm_num) (hr k)) (hcurv2 k) (p k) + (by simpa only [dist_self] using (mul_pos (by norm_num : (0:ℝ)<2) (hr k)).le) + simpa only [show (1/2 : ℝ)*(2*r k)=r k by ring] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/DyadicTransformationReduction.lean b/lean/OAI/Geometry/RCD/Coordinates/DyadicTransformationReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9a410bb249abb551120642a7ae7496ddff3dc94 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/DyadicTransformationReduction.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Coordinates.FiniteDepthNormalization +import OAI.Geometry.RCD.Coordinates.NormalizationComposition +import OAI.Geometry.RCD.Sobolev.BoundedDyadicScale + +namespace OAI + +/-! # Reduction of a failing radius to a first failing dyadic scale -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem exists_dyadic_comparison_scale {R t : ℝ} (hR : 0 < R) (ht : 0 < t) (htR : t ≤ R) : + ∃ j : ℕ, t ≤ R/(2 : ℝ)^j ∧ R/(2 : ℝ)^j < 2*t := by + obtain ⟨j,hn,hc⟩ := exists_nat_pow_near_of_lt_one (div_pos ht hR) + ((div_le_one hR).mpr htR) (by norm_num : (0 : ℝ) < 1/2) + (by norm_num : (1/2 : ℝ) < 1) + have hp (i : ℕ) : (1/2 : ℝ)^i = ((2 : ℝ)^i)⁻¹ := by rw [one_div,inv_pow] + have hu : t ≤ R/(2 : ℝ)^j := by + have h := (div_le_iff₀ hR).mp hc + rw [hp j] at h + simpa only [div_eq_mul_inv,mul_comm] using h + refine ⟨j,hu,?_⟩ + have h := (lt_div_iff₀ hR).mp hn + rw [pow_succ,hp j] at h + have he : ((2 : ℝ)^j)⁻¹*(1/2)*R = (R/(2 : ℝ)^j)/2 := by ring + rw [he] at h + linarith + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.dyadic_splitting_implies_all_scales {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (β : ℝ) (hβ : 0 < β) : + ∃ γ : ℝ, 0 < γ ∧ γ ≤ 1 ∧ ∀ (p : X) (R : ℝ), + 0 < R → -1 ≤ K*(2*R)^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) γ u v → + (∀ j : ℕ, ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^j) γ + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x))) → + ∀ t : ℝ, 0 < t → t ≤ R → ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p t β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p t) measurableSet_ball A := by + obtain ⟨δ,hδ,hstep⟩ := hX.comparable_radius_splitting hn β hβ + let γ := min δ 1 + have hγ : 0 < γ := lt_min hδ zero_lt_one + refine ⟨γ,hγ,min_le_right _ _,?_⟩ + intro p R hR hK u v hfirst hframes t ht htR + have hγδ : γ ≤ δ := min_le_left _ _ + by_cases hlarge : R/2 ≤ t + · exact hstep p R hR hK u v + (hfirst.mono_error _ _ hγ.le hγδ) t hlarge htR + obtain ⟨j,hlo,hhi⟩ := exists_dyadic_comparison_scale (show 0 < R/2 by positivity) ht + (le_of_not_ge hlarge) + let s := (R/2)/(2 : ℝ)^j + have hs : 0 < s := by dsimp only [s]; positivity + have hsR : s ≤ R := by + have hh : s ≤ R/2 := div_le_self (by positivity) (one_le_pow₀ (by norm_num)) + linarith + have hsK : -1 ≤ K*(2*s)^2 := by + have hsq : (2*s)^2 ≤ (2*R)^2 := (sq_le_sq₀ (by positivity) (by positivity)).mpr (by linarith) + by_cases hK0 : 0 ≤ K + · exact (by norm_num : (-1 : ℝ) ≤ 0).trans (mul_nonneg hK0 (sq_nonneg _)) + · exact hK.trans (mul_le_mul_of_nonpos_left hsq (le_of_not_ge hK0)) + obtain ⟨A,hA⟩ := hframes j + have he : 2*s = R/(2 : ℝ)^j := by dsimp only [s]; ring + rw [← he] at hA + obtain ⟨B,hB,hBn⟩ := hstep p s hs hsK + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) + (hA.mono_error _ _ hγ.le hγδ) t (by dsimp only [s]; linarith) hlo + exact ⟨B.trans A,firstOrderSplitting_comp _ _ u A B v p t β hB, + exact_mean_normalization_comp _ _ u A B (ball p t) measurableSet_ball hBn⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanAffineTaylor.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanAffineTaylor.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebdd3a2b4dff93dbe0f11dc88b35c9bf5c9cc9c7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanAffineTaylor.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.RCD.Coordinates.TaylorControl +import OAI.Geometry.RCD.Harmonic.AffineProjection + +namespace OAI + +/-! # A quantitative affine Taylor bound in the actual local L² space + +The only analytic hypothesis is an interior second derivative bound. +The scale factor is exactly quadratic; no affine approximation hypothesis +is used. This is the Euclidean calculation in harmonic affine improvement. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [MeasurableSpace E] [BorelSpace E] + +omit [MeasurableSpace E] [BorelSpace E] in +/-- Taylor's estimate on every radial segment of an interior ball. -/ +theorem affine_taylor_bound_on_ball {f : E → ℝ} {df : E → E →L[ℝ] ℝ} + {ddf : E → E →L[ℝ] (E →L[ℝ] ℝ)} {r R C : ℝ} + (hr : 0 < r) (hrR : r ≤ R) (hC : 0 ≤ C) + (hf : ∀ z ∈ ball (0 : E) R, HasFDerivAt f (df z) z) + (hdf : ∀ z ∈ ball (0 : E) R, HasFDerivAt df (ddf z) z) + (hbound : ∀ z ∈ ball (0 : E) R, ‖ddf z‖ ≤ C) + {z : E} (hz : z ∈ ball (0 : E) r) : + |f z - f 0 - df 0 z| ≤ C * r ^ 2 := by + have h0 : (0 : E) ∈ ball (0 : E) r := mem_ball_self hr + have hs : segment ℝ (0 : E) z ⊆ ball (0 : E) R := + ((convex_ball (0 : E) r).segment_subset h0 hz).trans (ball_subset_ball hrR) + have hh := norm_taylor_remainder_le hC (fun y hy => hf y (hs hy)) + (fun y hy => hdf y (hs hy)) (fun y hy => hbound y (hs hy)) + simp only [sub_zero, Real.norm_eq_abs] at hh + have hzr : ‖z‖ < r := by simpa only [mem_ball, dist_zero_right] using hz + exact hh.trans (mul_le_mul_of_nonneg_left + (by nlinarith [norm_nonneg z] : ‖z‖ ^ 2 ≤ r ^ 2) hC) + +/-- The radial Taylor polynomial bounds the local L² error. The norm of +the constant function records the square root of the ball's measure. -/ +theorem l2_affine_taylor_bound (μ : Measure E) + {f : E → ℝ} {df : E → E →L[ℝ] ℝ} + {ddf : E → E →L[ℝ] (E →L[ℝ] ℝ)} {r R C : ℝ} + (hr : 0 < r) (hrR : r ≤ R) (hC : 0 ≤ C) + (hf : ∀ z ∈ ball (0 : E) R, HasFDerivAt f (df z) z) + (hdf : ∀ z ∈ ball (0 : E) R, HasFDerivAt df (ddf z) z) + (hbound : ∀ z ∈ ball (0 : E) R, ‖ddf z‖ ≤ C) + (F A one : Lp ℝ 2 (μ.restrict (ball (0 : E) r))) + (hF : F =ᵐ[μ.restrict (ball (0 : E) r)] f) + (hA : A =ᵐ[μ.restrict (ball (0 : E) r)] fun z => f 0 + df 0 z) + (hone : one =ᵐ[μ.restrict (ball (0 : E) r)] fun _ => (1 : ℝ)) : + ‖F - A‖ ≤ C * r ^ 2 * ‖one‖ := by + apply Lp.norm_le_mul_norm_of_ae_le_mul + filter_upwards [hF, hA, hone, Lp.coeFn_sub F A, + ae_restrict_mem measurableSet_ball] with z hzF hzA hzone hzsub hz + rw [hzsub, Pi.sub_apply, hzF, hzA, hzone] + simp only [norm_one, mul_one, Real.norm_eq_abs] + have hh := affine_taylor_bound_on_ball hr hrR hC hf hdf hbound hz + simpa only [sub_add_eq_sub_sub] using hh + +/-- Evaluation of a linear form in the standard Euclidean coordinates. -/ +theorem euclidean_linear_form_sum {n : ℕ} (ell : Euclidean n →L[ℝ] ℝ) + (z : Euclidean n) : + (∑ i, ell (EuclideanSpace.single i 1) * z i) = ell z := by + have hz : (∑ i, z i • EuclideanSpace.single i 1) = z := by + ext j + simp [Pi.single_apply] + conv_rhs => rw [← hz] + rw [map_sum] + apply Finset.sum_congr rfl + intro i hi + simp only [map_smul, smul_eq_mul, mul_comm] + +/-- The Taylor polynomial is an actual affine combination of the +constant and coordinate functions in the local L² space. -/ +theorem l2_coordinate_affine_taylor_bound {n : ℕ} (μ : Measure (Euclidean n)) + {f : Euclidean n → ℝ} {df : Euclidean n → Euclidean n →L[ℝ] ℝ} + {ddf : Euclidean n → Euclidean n →L[ℝ] (Euclidean n →L[ℝ] ℝ)} + {r R C : ℝ} (hr : 0 < r) (hrR : r ≤ R) (hC : 0 ≤ C) + (hf : ∀ z ∈ ball (0 : Euclidean n) R, HasFDerivAt f (df z) z) + (hdf : ∀ z ∈ ball (0 : Euclidean n) R, HasFDerivAt df (ddf z) z) + (hbound : ∀ z ∈ ball (0 : Euclidean n) R, ‖ddf z‖ ≤ C) + (F one : Lp ℝ 2 (μ.restrict (ball (0 : Euclidean n) r))) + (u : Fin n → Lp ℝ 2 (μ.restrict (ball (0 : Euclidean n) r))) + (hF : F =ᵐ[μ.restrict (ball (0 : Euclidean n) r)] f) + (hone : one =ᵐ[μ.restrict (ball (0 : Euclidean n) r)] fun _ => (1 : ℝ)) + (hu : ∀ i, u i =ᵐ[μ.restrict (ball (0 : Euclidean n) r)] fun z => z i) : + ‖F - f 0 • one - ∑ i, df 0 (EuclideanSpace.single i 1) • u i‖ ≤ + C * r ^ 2 * ‖one‖ := by + let a := fun i => df 0 (EuclideanSpace.single i 1) + let A := f 0 • one + ∑ i, a i • u i + have hA : A =ᵐ[μ.restrict (ball (0 : Euclidean n) r)] fun z => f 0 + df 0 z := by + filter_upwards [Lp.coeFn_add (f 0 • one) (∑ i, a i • u i), + Lp.coeFn_smul (f 0) one, hone, + Lp.coeFn_finsetSum Finset.univ (fun i => a i • u i), + (ae_all_iff.2 fun i => Lp.coeFn_smul (a i) (u i)), ae_all_iff.2 hu] + with z hadd hsmul hone hsum hterms hcoords + change (f 0 • one + ∑ i, a i • u i) z = _ + rw [hadd] + simp only [Pi.add_apply] + rw [hsmul, hsum] + simp only [Pi.smul_apply, smul_eq_mul, hone, mul_one, Finset.sum_apply] + congr 1 + calc + _ = ∑ i, a i * z i := by + apply Finset.sum_congr rfl + intro i hi + rw [hterms i] + simp only [Pi.smul_apply, smul_eq_mul, hcoords i] + _ = df 0 z := euclidean_linear_form_sum (df 0) z + have hh := l2_affine_taylor_bound μ hr hrR hC hf hdf hbound F A one hF hA hone + simpa only [A, sub_add_eq_sub_sub] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateBound.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..f296d78c7b57631e74cc8a54fffc443fcec66f5a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateBound.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.RCD.Coordinates.EuclideanCovectorIsometry + +namespace OAI + +/-! # A finite coordinate error controls the Euclidean distance -/ + +open scoped BigOperators +noncomputable section +namespace RegularPointCoordinates + +theorem euclidean_norm_le_card_mul {n : ℕ} (z : Euclidean n) {δ : ℝ} + (h : ∀ i, |z i| ≤ δ) : ‖z‖ ≤ (n : ℝ)*δ := by + classical + let b := EuclideanSpace.basisFun (Fin n) ℝ + calc + ‖z‖ = ‖∑ i : Fin n, b.repr z i • b i‖ := by rw [b.sum_repr] + _ ≤ ∑ i : Fin n, ‖b.repr z i • b i‖ := norm_sum_le _ _ + _ = ∑ i : Fin n, |z i| := by + apply Finset.sum_congr rfl + intro i _ + rw [norm_smul,b.norm_eq_one,mul_one] + rfl + _ ≤ ∑ _i : Fin n, δ := Finset.sum_le_sum (fun i _ => h i) + _ = (n : ℝ)*δ := by simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateTests.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateTests.lean new file mode 100644 index 0000000000000000000000000000000000000000..08fea71e4c3e5b82d42f8429144f0a34b191c715 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCoordinateTests.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Metric.EuclideanInteriorSmoothExtension +import OAI.Geometry.RCD.Metric.EuclideanGreenIdentity + +namespace OAI + +/-! # Compact tests that agree exactly with Euclidean coordinates -/ + +open Set Metric Filter InnerProductSpace Laplacian +open scoped ContDiff Topology +noncomputable section +namespace RegularPointCoordinates + +theorem euclidean_coordinate_laplacian {n : ℕ} (i : Fin n) : + Δ (fun x : Euclidean n => x i)=0 := by + have hs : ContDiff ℝ 2 (fun x : Euclidean n => x i) := + (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).contDiff + rw [laplacian_eq_sum_second_directional hs] + funext x + have he : ∀ z : Euclidean n, fderiv ℝ (fun y : Euclidean n => y i) z=EuclideanSpace.proj i := + fun z => (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).hasFDerivAt.fderiv + simp_rw [he] + simp + +theorem euclidean_coordinate_harmonic {n : ℕ} (i : Fin n) : + HarmonicOnNhd (fun x : Euclidean n => x i) univ := by + intro x _ + exact ⟨(EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).contDiff.contDiffAt, + Filter.Eventually.of_forall fun y => congrFun (euclidean_coordinate_laplacian i) y⟩ + +theorem compact_euclidean_coordinate_test {n : ℕ} {R S : ℝ} + (hR : 0 x i) (closedBall 0 R) ∧ + EqOn (fderiv ℝ ψ) (fun _ => (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)) (ball 0 R) ∧ + HarmonicOnNhd ψ (ball 0 R) := by + obtain ⟨ψ,hψ,heq,hd⟩ := exists_interior_smooth_extension hR hRS + (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).contDiff.contDiffOn + refine ⟨ψ,hψ,heq,?_,?_⟩ + · intro x hx + exact (hd hx).trans (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).hasFDerivAt.fderiv + · intro x hx + have he : ψ=ᶠ[𝓝 x] (fun y : Euclidean n => y i) := by + filter_upwards [isOpen_ball.mem_nhds hx] with y hy + exact heq (ball_subset_closedBall hy) + exact (harmonicAt_congr_nhds he).mpr (euclidean_coordinate_harmonic i x (mem_univ x)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanCovectorIsometry.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCovectorIsometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a7caaf98d6aadc87f3ba856ef67c2832ca219a5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanCovectorIsometry.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicModel +import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas + +namespace OAI + +/-! # Unit orthogonal covectors form Euclidean isometric coordinates -/ + +open InnerProductSpace +open scoped RealInnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem euclidean_isometry_of_covector_norms {n : ℕ} + (L : Fin n → Euclidean n →L[ℝ] ℝ) + (hL : ∀ i, ‖L i‖^2 = 1) + (hadd : ∀ i j, i ≠ j → ‖L i+L j‖^2 = 2) : + ∃ T : Euclidean n ≃ₗᵢ[ℝ] Euclidean n, ∀ x i, T x i = L i x := by + classical + let a := fun i => (InnerProductSpace.toDual ℝ (Euclidean n)).symm (L i) + have hnorm (i : Fin n) : ‖a i‖^2 = 1 := by + simpa only [a,LinearIsometryEquiv.norm_map] using hL i + have hsum (i j : Fin n) (hij : i ≠ j) : ‖a i+a j‖^2 = 2 := by + simpa only [a,← map_add,LinearIsometryEquiv.norm_map] using hadd i j hij + have horth : Orthonormal ℝ a := by + rw [orthonormal_iff_ite] + intro i j + by_cases hij : i=j + · subst j + simpa only [ite_true,real_inner_self_eq_norm_sq] using hnorm i + · rw [ite_eq_right_iff.mpr (fun h => (hij h).elim)] + nlinarith [norm_add_sq_real (a i) (a j),hnorm i,hnorm j,hsum i j hij] + have hspan : ⊤ ≤ Submodule.span ℝ (Set.range a) := by + rw [horth.linearIndependent.span_eq_top_of_card_eq_finrank' (by simp)] + let b := OrthonormalBasis.mk horth hspan + refine ⟨b.repr,?_⟩ + intro x i + rw [b.repr_apply_apply] + have hb : b i = a i := congrFun (OrthonormalBasis.coe_mk horth hspan) i + rw [hb] + exact InnerProductSpace.toDual_symm_apply + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanDensityNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanDensityNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe7f606d5a1de309e50e761c48e4389526924cad --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanDensityNormalization.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedDensityLaw +import OAI.Geometry.RCD.Metric.MeasuredBallLaw + +namespace OAI + +/-! # Interior Euclidean densities have the same normalized law at either scale -/ + +open Set Filter MeasureTheory Metric +open scoped Topology ENNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates + +theorem euclidean_density_inside {n : ℕ} {S : ℝ} (hS : 0 by rw [hzero x hx,zero_mul])] + field_simp [hV.ne',hp.ne'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanGevreyCutoff.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanGevreyCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a06776648f75a2034fdf3663c8d51228d478c02 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanGevreyCutoff.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Coordinates.PatchCoverData +import Mathlib.Analysis.Calculus.IteratedDeriv.Defs +import OAI.Geometry.RCD.Coordinates.FrozenJetTransport + +namespace OAI + +/-! +# Euclidean Gevrey cutoffs of order two + +L. Hörmander, *Between distributions and hyperfunctions*, Astérisque 131 +(1985), pp. 89–106, §2, equations (2.2) and (2.6), p. 90, describes +nonquasianalytic Gevrey classes containing compactly supported functions. +Squaring a nonzero bump and convolving its normalized dilation with a ball +indicator gives a fixed core and support. Equivalence of coordinate +and finite-dimensional multilinear derivative bounds changes only the +exponential constant. + +https://numdam.org/item/AST_1985__131__89_0.pdf +-/ + +open Set Metric +open scoped ContDiff + +noncomputable section +namespace RegularPointCoordinates + +/-- A single fixed radial-scale cutoff with all-order Gevrey-two bounds. -/ +structure EuclideanGevreyCutoff (n : ℕ) where + value : Euclidean n → ℝ + constant : ℝ + constant_ge_one : 1 ≤ constant + smooth : ContDiff ℝ ∞ value + nonneg : ∀ z, 0 ≤ value z + le_one : ∀ z, value z ≤ 1 + core : ∀ z, ‖z‖ ≤ 2 → value z = 1 + support : tsupport value ⊆ closedBall 0 3 + jet : ∀ (m : ℕ) (z : Euclidean n), + ‖iteratedFDeriv ℝ m value z‖ ≤ constant ^ (m + 1) * (m.factorial : ℝ) ^ 2 + +/-- The precise compact Gevrey specialization needed by the chart proof. -/ +def EuclideanGevreyCutoffInput (n : ℕ) : Prop := Nonempty (EuclideanGevreyCutoff n) + +/-- A fixed affine change preserves the Gevrey order. The base records the +actual operator norm, while the derivative order remains unrestricted. -/ +theorem EuclideanGevreyCutoff.affine_jet_le {n : ℕ} (psi : EuclideanGevreyCutoff n) + (L : Euclidean n →L[ℝ] Euclidean n) (a z : Euclidean n) (m : ℕ) + {M : ℝ} (hM : 1 ≤ M) (hL : ‖L‖ ≤ M) : + ‖iteratedFDeriv ℝ m (fun w => psi.value (a + L w)) z‖ ≤ + (psi.constant * M) ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + have hc : 0 ≤ psi.constant := zero_le_one.trans psi.constant_ge_one + have hbound := norm_iteratedFDeriv_comp_affine_le L psi.value a z m + (psi.smooth.of_le (by simp)).contDiffAt + have hp : ‖L‖ ^ m ≤ M ^ (m + 1) := + (pow_le_pow_left₀ (norm_nonneg L) hL m).trans + (pow_le_pow_right₀ hM (by omega)) + calc + _ ≤ ‖iteratedFDeriv ℝ m psi.value (a + L z)‖ * ‖L‖ ^ m := hbound + _ ≤ (psi.constant ^ (m + 1) * (m.factorial : ℝ) ^ 2) * M ^ (m + 1) := + mul_le_mul (psi.jet m _) hp (by positivity) (by positivity) + _ = _ := by rw [mul_pow]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/EuclideanWeakHarmonicRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/EuclideanWeakHarmonicRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b339379520ef72768544eaef2bf2f86e23886da --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/EuclideanWeakHarmonicRegularity.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.RCD.Sobolev.EuclideanWeakHarmonicMean + +namespace OAI + +/-! # Classical harmonicity from the local compact-test Laplace equation -/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped ContDiff Convolution Topology +noncomputable section +namespace RegularPointCoordinates + +theorem compact_continuous_weak_harmonic {n : ℕ} {f : Euclidean n → ℝ} {S : ℝ} + (hf : Continuous f) (hfs : HasCompactSupport f) (hw : EuclideanWeakHarmonicOn f S) : + HarmonicOnNhd f (ball 0 S) := by + intro p hp + have hpS : ‖p‖ χ x*f x) := by + apply continuous_iff_continuousAt.mpr + intro x + by_cases hx : x∈Ω + · exact hχ.continuousAt.mul (hf.continuousAt (hΩ.mem_nhds hx)) + · have ht : x∉tsupport χ := fun h => hx (hs h) + apply (continuousAt_const (y := (0:ℝ))).congr_of_eventuallyEq + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp ht] with y hy + simp only [hy,Pi.zero_apply,zero_mul] + +theorem continuous_weak_harmonic {n : ℕ} {f : Euclidean n → ℝ} {S : ℝ} + (hf : ContinuousOn f (ball 0 S)) (hw : EuclideanWeakHarmonicOn f S) : + HarmonicOnNhd f (ball 0 S) := by + intro p hp + have hpS : ‖p‖ χ x*f x + have hFc : Continuous F := continuous_mul_of_tsupport_subset isOpen_ball hf χ.continuous + (by rw [χ.tsupport_eq]; exact closedBall_subset_ball hbS) + have hFs : HasCompactSupport F := χ.hasCompactSupport.mul_right + have he : EqOn F f (ball 0 a) := by + intro x hx + change χ x*f x=f x + rw [χ.one_of_mem_closedBall (ball_subset_closedBall hx),one_mul] + have hFw : EuclideanWeakHarmonicOn F a := + (hw.mono (by dsimp only [a]; linarith)).congr he.symm + have hpa : p∈ball (0:Euclidean n) a := by + simp only [mem_ball,dist_zero_right] + dsimp only [a] + linarith + have hevent : F =ᶠ[𝓝 p] f := by + filter_upwards [isOpen_ball.mem_nhds hpa] with y hy + exact he hy + apply (harmonicAt_congr_nhds hevent).mp + exact compact_continuous_weak_harmonic hFc hFs hFw p hpa + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ExactNormalizationComparison.lean b/lean/OAI/Geometry/RCD/Coordinates/ExactNormalizationComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..b537551e57709f3e12f2f1aace4b55cf2dcf05cb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ExactNormalizationComparison.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.RCD.Harmonic.NearbyMeanGrams +import OAI.Geometry.RCD.Harmonic.TransformedColumns + +namespace OAI + +/-! +# Relative comparison from exact harmonic normalization + +Restricting a normalized splitting map to a subball costs only its volume +ratio. The comparison is relative to the original mean Gram, even if that +Gram has arbitrarily small eigenvalues. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Exact mean normalization identifies the inverse-coordinate norm +with the original mean energy, even for a very anisotropic Gram. -/ +theorem exact_mean_inverse_norm_sq {n : ℕ} + (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (s : Set X) (hs : MeasurableSet s) (A : Euclidean n ≃L[ℝ] Euclidean n) + (hA : IsExactMeanNormalization μ hQ U s hs A) (v : Euclidean n) : + ‖A.symm v‖ ^ 2 = ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ := by + have hh : ⟪A.symm v, sobolevMeanGram μ hQ + (U.comp (A : Euclidean n →L[ℝ] Euclidean n)) s hs (A.symm v)⟫_ℝ = + ‖A.symm v‖ ^ 2 := by + rw [hA] + simp only [ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] + rw [sobolevMeanGram_comp] at hh + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] using hh.symm + +/-- Exact normalization on the large ball improves the two-mean comparison: +only the restricted mean incurs an error. -/ +theorem exact_normalization_subball_bounds {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (A : Euclidean n ≃L[ℝ] Euclidean n) + {p : X} {r ε C : ℝ} {w : X → Euclidean n} + (hfirst : FirstOrderSplittingOn μ hQ p r ε (transformedColumn μ hQ u A) w) + (hexact : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p r) measurableSet_ball A) + (s : Set X) (hs : MeasurableSet s) (hsub : s ⊆ ball p r) + (hszero : μ s ≠ 0) (hsfin : μ s ≠ ∞) + (hrzero : μ (ball p r) ≠ 0) (hrfin : μ (ball p r) ≠ ∞) + (hC : 0 ≤ C) (hε : 0 ≤ ε) + (hvol : μ.real (ball p r) ≤ C * μ.real s) (v : Euclidean n) : + (1 - (n : ℝ) ^ 2 * (C * ε)) * + ⟪v, sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) (ball p r) measurableSet_ball v⟫_ℝ ≤ + ⟪v, sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs v⟫_ℝ ∧ + ⟪v, sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs v⟫_ℝ ≤ + (1 + (n : ℝ) ^ 2 * (C * ε)) * + ⟪v, sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) (ball p r) measurableSet_ball v⟫_ℝ := by + let U := sobolevColumnMap μ hQ u + have hnorm := meanGram_sub_id_norm_le_of_subset μ hQ (transformedColumn μ hQ u A) + hs hsub hszero hsfin hrzero hrfin hC hε hvol hfirst.gram + rw [sobolevColumnMap_transformed] at hnorm + have hform (b : Set X) (hb : MeasurableSet b) : + ⟪A.symm v, sobolevMeanGram μ hQ (U.comp (A : Euclidean n →L[ℝ] Euclidean n)) b hb (A.symm v)⟫_ℝ = + ⟪v, sobolevMeanGram μ hQ U b hb v⟫_ℝ := by + rw [sobolevMeanGram_comp] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] + have hv : ‖A.symm v‖ ^ 2 = + ⟪v, sobolevMeanGram μ hQ U (ball p r) measurableSet_ball v⟫_ℝ := by + exact exact_mean_inverse_norm_sq μ hQ U (ball p r) measurableSet_ball A hexact v + have hlo := inner_lower_of_sub_id_norm _ hnorm (A.symm v) + have hup := inner_upper_of_sub_id_norm _ hnorm (A.symm v) + rw [hform s hs, hv] at hlo hup + exact ⟨hlo, hup⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FactorialMajorant.lean b/lean/OAI/Geometry/RCD/Coordinates/FactorialMajorant.lean new file mode 100644 index 0000000000000000000000000000000000000000..422bc2d22d631fbb33e6f5d05eaf5aec26ebeb96 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FactorialMajorant.lean @@ -0,0 +1,194 @@ +import OAI.Geometry.RCD.Coordinates.InverseMajorant +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Data.Nat.Factorial.Basic +import Mathlib.Algebra.BigOperators.Intervals + +namespace OAI + +/-! +# Factorial weights for the inverse-jet estimate + +We use the fixed admissible Gevrey exponent `σ = 2`. The weight +`L m = (m + 1) * ((m + 1)!)²` is positive, has `L 0 = 1`, and its +normalized interior convolution tends to zero. Consequently the +abstract inverse majorant gives one constant for every derivative order. +-/ + +open Finset Filter +open scoped BigOperators Topology + +noncomputable section + +namespace RegularPointCoordinates + +def factorialMajorant (m : ℕ) : ℝ := + ((m : ℝ) + 1) * ((m + 1).factorial : ℝ) ^ 2 + +@[simp] theorem factorialMajorant_zero : factorialMajorant 0 = 1 := by + norm_num [factorialMajorant] + +@[simp] theorem factorialMajorant_one : factorialMajorant 1 = 8 := by + norm_num [factorialMajorant] + +theorem factorialMajorant_pos (m : ℕ) : 0 < factorialMajorant m := by + unfold factorialMajorant + positivity + +theorem factorialMajorant_succ (m : ℕ) : + factorialMajorant (m + 1) = ((m : ℝ) + 2) ^ 3 * ((m + 1).factorial : ℝ) ^ 2 := by + unfold factorialMajorant + rw [Nat.factorial_succ] + push_cast + ring + +/-- The consecutive ratios of the weight are increasing. -/ +theorem factorialMajorant_pair_step {p q : ℕ} (hpq : p ≤ q) : + factorialMajorant (p + 1) * factorialMajorant q ≤ + factorialMajorant p * factorialMajorant (q + 1) := by + have hp : (1 : ℝ) ≤ (p : ℝ) + 1 := by linarith [Nat.cast_nonneg (α := ℝ) p] + have hq : (1 : ℝ) ≤ (q : ℝ) + 1 := by linarith [Nat.cast_nonneg (α := ℝ) q] + have hmul := one_le_mul_of_one_le_of_one_le hp hq + have hlarge : (1 : ℝ) ≤ (p : ℝ) + q + 5 := by linarith + have hprod := one_le_mul_of_one_le_of_one_le hmul hlarge + have hd : (0 : ℝ) ≤ (q : ℝ) - p := sub_nonneg.mpr (by exact_mod_cast hpq) + have hnon := mul_nonneg hd (sub_nonneg.mpr hprod) + have hpoly : ((p : ℝ) + 2) ^ 3 * ((q : ℝ) + 1) ≤ + ((p : ℝ) + 1) * ((q : ℝ) + 2) ^ 3 := by nlinarith only [hnon] + have hscaled := mul_le_mul_of_nonneg_right hpoly + (by positivity : (0 : ℝ) ≤ ((p + 1).factorial : ℝ) ^ 2 * + ((q + 1).factorial : ℝ) ^ 2) + rw [factorialMajorant_succ, factorialMajorant_succ] + unfold factorialMajorant + convert hscaled using 1 <;> ring + +/-- For fixed total order, the largest positive-order product is at an endpoint. -/ +theorem factorialMajorant_pair_le_endpoint {l q : ℕ} (hl : 1 ≤ l) (hq : 1 ≤ q) : + factorialMajorant l * factorialMajorant q ≤ + factorialMajorant 1 * factorialMajorant (l + q - 1) := by + induction l using Nat.strong_induction_on generalizing q with + | h l ih => + by_cases hlone : l = 1 + · subst l + simp + by_cases hlq : l ≤ q + · have hlprev : 1 ≤ l - 1 := by omega + have hpq : l - 1 ≤ q := by omega + have hstep := factorialMajorant_pair_step hpq + have heq : l - 1 + 1 = l := by omega + rw [heq] at hstep + have hbound := ih (l - 1) (by omega) hlprev (by omega : 1 ≤ q + 1) + have hsum : l - 1 + (q + 1) - 1 = l + q - 1 := by omega + exact hstep.trans (by simpa only [hsum] using hbound) + · have hbound := ih q (by omega) hq hl + simpa only [mul_comm, Nat.add_comm] using hbound + +theorem factorialMajorant_endpoint_ratio {m : ℕ} (hm : 1 ≤ m) : + factorialMajorant 1 * factorialMajorant (m - 1) / factorialMajorant m = + 8 * (m : ℝ) / ((m : ℝ) + 1) ^ 3 := by + have hm' : m - 1 + 1 = m := by omega + have hfact : ((m + 1).factorial : ℝ) = ((m : ℝ) + 1) * (m.factorial : ℝ) := by + rw [Nat.factorial_succ] + push_cast + ring + have hfactpos : (0 : ℝ) < (m.factorial : ℝ) := by positivity + rw [factorialMajorant_one] + unfold factorialMajorant + rw [hm', hfact] + have hmreal : (m - 1 : ℕ) + (1 : ℝ) = (m : ℝ) := by + exact_mod_cast hm' + rw [hmreal] + field_simp [ne_of_gt hfactpos] + +/-- A direct bound sufficient for convolution decay. -/ +theorem factorialMajorant_normalized_convolution_le (m : ℕ) : + normalizedInteriorConvolution factorialMajorant m ≤ 8 / ((m : ℝ) + 1) := by + by_cases hmzero : m = 0 + · subst m + norm_num [normalizedInteriorConvolution, interiorConvolution] + have hm : 1 ≤ m := Nat.one_le_iff_ne_zero.mpr hmzero + have hsum : interiorConvolution factorialMajorant m ≤ + (m : ℝ) * (factorialMajorant 1 * factorialMajorant (m - 1)) := by + calc + _ ≤ ∑ _l ∈ Finset.Icc 1 (m - 1), + factorialMajorant 1 * factorialMajorant (m - 1) := by + apply Finset.sum_le_sum + intro l hl + have hl' := Finset.mem_Icc.mp hl + have hq : 1 ≤ m - l := by omega + have h := factorialMajorant_pair_le_endpoint hl'.1 hq + have heq : l + (m - l) - 1 = m - 1 := by omega + simpa only [heq] using h + _ ≤ (m : ℝ) * (factorialMajorant 1 * factorialMajorant (m - 1)) := by + rw [Finset.sum_const, nsmul_eq_mul] + apply mul_le_mul_of_nonneg_right _ + (mul_nonneg (factorialMajorant_pos 1).le (factorialMajorant_pos (m - 1)).le) + have hcard : (Finset.Icc 1 (m - 1)).card ≤ m := by + rw [Nat.card_Icc] + omega + exact_mod_cast hcard + have hdiv := div_le_div_of_nonneg_right hsum (factorialMajorant_pos m).le + change normalizedInteriorConvolution factorialMajorant m ≤ _ at hdiv + calc + _ ≤ (m : ℝ) * (8 * (m : ℝ) / ((m : ℝ) + 1) ^ 3) := by + simpa only [mul_div_assoc, factorialMajorant_endpoint_ratio hm] using hdiv + _ ≤ 8 / ((m : ℝ) + 1) := by + have hp : (0 : ℝ) < (m : ℝ) + 1 := by positivity + rw [← mul_div_assoc, div_le_div_iff₀ (pow_pos hp 3) hp] + nlinarith [sq_nonneg (m : ℝ), Nat.cast_nonneg (α := ℝ) m] + +theorem factorialMajorant_convolution_tendsto_zero : + Tendsto (normalizedInteriorConvolution factorialMajorant) atTop (𝓝 0) := by + have hnon (m : ℕ) : 0 ≤ normalizedInteriorConvolution factorialMajorant m := + div_nonneg (interiorConvolution_nonneg (fun j => (factorialMajorant_pos j).le) m) + (factorialMajorant_pos m).le + have hlim : Tendsto (fun m : ℕ => 8 / ((m : ℝ) + 1)) atTop (𝓝 0) := by + have h := (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).const_mul 8 + simpa only [mul_zero, mul_one_div] using h + exact squeeze_zero hnon factorialMajorant_normalized_convolution_le hlim + +/-- Restoring the endpoint terms gives the uniform full-convolution estimate. -/ +theorem factorialMajorant_full_convolution_le (m : ℕ) : + (∑ l ∈ Finset.range (m + 1), factorialMajorant l * factorialMajorant (m - l)) ≤ + 10 * factorialMajorant m := by + have hdelta : normalizedInteriorConvolution factorialMajorant m ≤ 8 := by + apply (factorialMajorant_normalized_convolution_le m).trans + apply (div_le_iff₀ (by positivity : (0 : ℝ) < (m : ℝ) + 1)).mpr + nlinarith [Nat.cast_nonneg (α := ℝ) m] + have hinterior : interiorConvolution factorialMajorant m ≤ 8 * factorialMajorant m := by + have h := mul_le_mul_of_nonneg_right hdelta (factorialMajorant_pos m).le + rwa [normalizedInteriorConvolution_mul factorialMajorant_pos m] at h + by_cases hmzero : m = 0 + · subst m + norm_num + have hm : 0 < m := Nat.pos_of_ne_zero hmzero + have hIcc : Finset.Ico 1 m = Finset.Icc 1 (m - 1) := by + ext l + simp only [Finset.mem_Ico, Finset.mem_Icc] + omega + have hsplit : (∑ l ∈ Finset.range (m + 1), + factorialMajorant l * factorialMajorant (m - l)) = + 2 * factorialMajorant m + interiorConvolution factorialMajorant m := by + rw [Finset.sum_range_succ, + Finset.sum_range_eq_add_Ico + (fun l => factorialMajorant l * factorialMajorant (m - l)) hm, hIcc] + simp only [Nat.sub_zero, Nat.sub_self, factorialMajorant_zero, one_mul, mul_one] + unfold interiorConvolution + ring + rw [hsplit] + linarith + +/-- The factorial weights satisfy the inverse-coefficient bound with one +constant, uniformly over all orders and all admissible coefficient sequences. -/ +theorem factorial_inverse_coefficients_uniform_bound {A : ℝ} (hA : 1 ≤ A) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ a : ℕ → ℝ, a 0 ≤ Real.sqrt A → + HasInverseMajorantRecurrence factorialMajorant a A → + ∀ m, a m ≤ C * factorialMajorant m := + inverse_coefficients_uniform_bound factorialMajorant_pos factorialMajorant_zero hA + factorialMajorant_convolution_tendsto_zero + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FieldEstimates.lean b/lean/OAI/Geometry/RCD/Coordinates/FieldEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..759a41a82d755fcb49bfea2bbdbbe35d8db1a5e6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FieldEstimates.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.PositiveForms +import Mathlib.Analysis.Calculus.FDeriv.Mul + +namespace OAI + +/-! +# First derivatives of the value-space patch field + +The local mass operators may be singular. Their positivity controls the +error from differentiating the cutoffs by the directional mass, rather than +by the full norm of the local metric. +-/ + +open scoped BigOperators InnerProductSpace + +namespace RegularPointCoordinates + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The field used by the renormalization, written as a finite patch sum. -/ +def patchField (s : Finset ι) (phi : ι → E → ℝ) (D : ι → E →L[ℝ] E) + (c : ι → E) (P : E) : E := + ∑ j ∈ s, phi j P • D j (P - c j) + +/-- Its derivative consists of the principal positive mass plus cutoff errors. -/ +theorem hasFDerivAt_patchField (s : Finset ι) (phi : ι → E → ℝ) + (dphi : ι → E →L[ℝ] ℝ) (D : ι → E →L[ℝ] E) (c : ι → E) (P : E) + (hphi : ∀ j ∈ s, HasFDerivAt (phi j) (dphi j) P) : + HasFDerivAt (patchField s phi D c) + (∑ j ∈ s, ((phi j P) • D j + (dphi j).smulRight (D j (P - c j)))) P := by + have hterm : ∀ j ∈ s, HasFDerivAt (fun y => phi j y • D j (y - c j)) + ((phi j P) • D j + (dphi j).smulRight (D j (P - c j))) P := by + intro j hj + have hD := (D j).hasFDerivAt.comp P ((hasFDerivAt_id P).sub_const (c j)) + simpa [Function.comp_def] using (hphi j hj).fun_smul hD + convert HasFDerivAt.sum hterm using 1 + ext y + simp [patchField] + +/-- A finite cutoff error is bounded by the square root of the directional +mass times the square root of the displacement energy. -/ +theorem patch_error_inner_le (s : Finset ι) (D : ι → E →L[ℝ] E) + (w : ι → E) (a : ι → ℝ) (xi : E) {K : ℝ} (hK : 0 ≤ K) + (hD : ∀ j ∈ s, (D j).IsPositive) (ha : ∀ j ∈ s, |a j| ≤ K) : + |⟪xi, ∑ j ∈ s, a j • D j (w j)⟫_ℝ| ≤ + K * Real.sqrt (∑ j ∈ s, ⟪xi, D j xi⟫_ℝ) * + Real.sqrt (∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ) := by + have hcs := Real.sum_mul_le_sqrt_mul_sqrt s + (fun j => Real.sqrt ⟪xi, D j xi⟫_ℝ) + (fun j => Real.sqrt ⟪w j, D j (w j)⟫_ℝ) + have hx : (∑ j ∈ s, (Real.sqrt ⟪xi, D j xi⟫_ℝ) ^ 2) = + ∑ j ∈ s, ⟪xi, D j xi⟫_ℝ := + Finset.sum_congr rfl (fun j hj => Real.sq_sqrt ((hD j hj).inner_nonneg_right xi)) + have hw : (∑ j ∈ s, (Real.sqrt ⟪w j, D j (w j)⟫_ℝ) ^ 2) = + ∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ := + Finset.sum_congr rfl (fun j hj => Real.sq_sqrt ((hD j hj).inner_nonneg_right (w j))) + rw [hx, hw] at hcs + calc + _ = |∑ j ∈ s, a j * ⟪xi, D j (w j)⟫_ℝ| := by + simp only [inner_sum, inner_smul_right] + _ ≤ ∑ j ∈ s, |a j * ⟪xi, D j (w j)⟫_ℝ| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j ∈ s, K * + (Real.sqrt ⟪xi, D j xi⟫_ℝ * Real.sqrt ⟪w j, D j (w j)⟫_ℝ) := by + apply Finset.sum_le_sum + intro j hj + rw [abs_mul] + exact mul_le_mul (ha j hj) (positive_form_inner_abs_le (hD j hj) xi (w j)) + (abs_nonneg _) hK + _ = K * ∑ j ∈ s, + Real.sqrt ⟪xi, D j xi⟫_ℝ * Real.sqrt ⟪w j, D j (w j)⟫_ℝ := by + rw [Finset.mul_sum] + _ ≤ _ := by + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hcs hK + +/-- The principal part of the derivative is positive when the cutoffs are. -/ +theorem patch_principal_isPositive (s : Finset ι) (phi : ι → ℝ) + (D : ι → E →L[ℝ] E) + (hphi : ∀ j ∈ s, 0 ≤ phi j) (hD : ∀ j ∈ s, (D j).IsPositive) : + (∑ j ∈ s, phi j • D j).IsPositive := by + apply ContinuousLinearMap.isPositive_sum + intro j hj + exact (hD j hj).smul_of_nonneg (hphi j hj) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FiniteBilinearAE.lean b/lean/OAI/Geometry/RCD/Coordinates/FiniteBilinearAE.lean new file mode 100644 index 0000000000000000000000000000000000000000..aae0b721a6ca683efd0c913550fe822eaefb83e3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FiniteBilinearAE.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Coordinates.BilinearDiagonalBound + +namespace OAI + +/-! # A common null set for all mixed directions of finite quadratic forms -/ + +open Set Filter MeasureTheory TopologicalSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {m : ℕ} + +theorem bilinear_coordinates (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) : + coordinateBilinear (fun i j => B (EuclideanSpace.single i 1) (EuclideanSpace.single j 1))=B := by + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro i + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro j + simp [coordinateBilinear,EuclideanSpace.basisFun_apply] + +theorem bilinear_diagonal_continuous (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) : + Continuous (fun a => B a a) := by + rw [← bilinear_coordinates B] + simp only [coordinateBilinear_apply,smul_eq_mul] + fun_prop + +/-- Bounds established separately in each real direction yield one +null set outside which every mixed-direction bound holds. -/ +theorem ae_bilinear_mixed_bound_of_diagonal {X : Type*} [MeasurableSpace X] (μ : Measure X) + (P H : X → Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) (b : X → ℝ) + (hP : ∀ x a c, P x a c=P x c a) (hH : ∀ x a c, H x a c=H x c a) + (hpos : ∀ a, ∀ᵐ x ∂μ, 0≤P x a a) (hb : ∀ᵐ x ∂μ, 0≤b x) + (hdiag : ∀ a, ∀ᵐ x ∂μ, (H x a a)^2≤b x*(P x a a)^2) : + ∀ᵐ x ∂μ, ∀ a c, (H x a c)^2≤b x*P x a a*P x c c := by + obtain ⟨D,hD,hdense⟩ := exists_countable_dense (Euclidean m) + let : Countable D := hD.to_subtype + filter_upwards [hb,ae_all_iff.mpr (fun a : D => (hpos a).and (hdiag a))] with x hb hx + have hPc := bilinear_diagonal_continuous (P x) + have hHc := bilinear_diagonal_continuous (H x) + have hc : IsClosed {a : Euclidean m | 0≤P x a a ∧ (H x a a)^2≤b x*(P x a a)^2} := + (isClosed_le continuous_const hPc).inter + (isClosed_le (hHc.pow 2) (continuous_const.mul (hPc.pow 2))) + have hsub : D ⊆ {a : Euclidean m | 0≤P x a a ∧ (H x a a)^2≤b x*(P x a a)^2} := + fun a ha => hx ⟨a,ha⟩ + have hall := closure_minimal hsub hc + rw [hdense.closure_eq] at hall + intro a c + exact bilinear_mixed_sq_bound_of_diagonal (P x) (H x) (hP x) + (fun z => (hall (mem_univ z)).1) (hH x) (b x) hb + (fun z => (hall (mem_univ z)).2) a c + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FiniteDepthNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/FiniteDepthNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..778f2c4900f25201abefa16f0c3bdfcb90bcfe62 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FiniteDepthNormalization.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.ComparableRadiusSplitting + +namespace OAI + +/-! # Fixed finite depths cannot contain a failing normalization scale -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.finite_depth_splitting {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (N : ℕ) (β : ℝ) (hβ : 0 < β) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -1 ≤ K*(2*R)^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) δ u v → + ∀ t : ℝ, R/(2 : ℝ)^N ≤ t → t ≤ R → ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p t β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p t) measurableSet_ball A := by + obtain ⟨δ,hδ,hgood⟩ := hX.interior_radius_splitting hn (1/(2 : ℝ)^N) + (by positivity) ((div_le_one (by positivity)).mpr (one_le_pow₀ (by norm_num))) β hβ + refine ⟨δ,hδ,?_⟩ + intro p R hR hK u v hfirst t ht htR + apply hgood p R hR hK u v hfirst t _ htR + simpa only [div_eq_mul_inv,one_mul,mul_comm] using ht + +theorem NoncollapsedRCD.failing_depth_tends_to_infinity {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (β : ℝ) (hβ : 0 < β) (p : ℕ → X) (R ε : ℕ → ℝ) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) (d : ℕ → ℕ) + (hR : ∀ k, 0 < R k) (hK : ∀ k, -1 ≤ K*(2*R k)^2) + (hε : ∀ k, 0 ≤ ε k) (hεlim : Tendsto ε atTop (𝓝 0)) + (hfirst : ∀ k, FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (2*R k) (ε k) (u k) (v k)) + (hbad : ∀ k, ¬∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic (p k) (R k/(2 : ℝ)^(d k)) β + (transformedColumn (hausdorff n X) hX.quadratic (u k) A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v k x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (u k)) + (ball (p k) (R k/(2 : ℝ)^(d k))) measurableSet_ball A) : + Tendsto d atTop atTop := by + refine tendsto_atTop.2 fun N => ?_ + obtain ⟨δ,hδ,hgood⟩ := hX.finite_depth_splitting hn N β hβ + filter_upwards [hεlim.eventually (eventually_lt_nhds hδ)] with k hk + have hlarge : N < d k := by + by_contra hnot + have hd : d k ≤ N := le_of_not_gt hnot + have hlo : R k/(2 : ℝ)^N ≤ R k/(2 : ℝ)^(d k) := + div_le_div_of_nonneg_left (hR k).le (by positivity) + (pow_le_pow_right₀ (by norm_num) hd) + have hhi : R k/(2 : ℝ)^(d k) ≤ R k := + div_le_self (hR k).le (one_le_pow₀ (by norm_num)) + exact hbad k (hgood (p k) (R k) (hR k) (hK k) (u k) (v k) + ((hfirst k).mono_error (hausdorff n X) hX.quadratic (hε k) hk.le) + (R k/(2 : ℝ)^(d k)) hlo hhi) + exact hlarge.le + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FiniteNormalizerGrowth.lean b/lean/OAI/Geometry/RCD/Coordinates/FiniteNormalizerGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bc77264a2eddadac86584ea4839dc641120240c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FiniteNormalizerGrowth.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Coordinates.DyadicNormalizedError + +namespace OAI + +/-! # Polynomial norm control of exact normalizers over a finite range -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Relative growth of means gives the squared norm bound for the exact +normalizer at the smaller scale. The larger mean is already normalized. -/ +theorem normalizer_norm_sq_le_of_mean_growth (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) (s t : Set X) + (hs : MeasurableSet s) (ht : MeasurableSet t) + (A : E ≃L[ℝ] E) (hA : IsExactMeanNormalization μ hQ U s hs A) + (htId : sobolevMeanGram μ hQ U t ht = ContinuousLinearMap.id ℝ E) + {B : ℝ} (hB : 0 ≤ B) + (hgrowth : ∀ v : E, ⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ ≤ + B * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ) : + ‖(A : E →L[ℝ] E)‖ ^ 2 ≤ B := by + have hv (v : E) : ‖A v‖ ^ 2 ≤ B * ‖v‖ ^ 2 := by + have hh := hgrowth (A v) + rw [htId, ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] at hh + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] at hh + simpa only [ContinuousLinearEquiv.symm_apply_apply] using hh + have hnorm : ‖(A : E →L[ℝ] E)‖ ≤ Real.sqrt B := by + apply ContinuousLinearMap.opNorm_le_bound _ (Real.sqrt_nonneg _) + intro v + have hh := hv v + have hp : 0 ≤ Real.sqrt B * ‖v‖ := mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _) + change ‖A v‖ ≤ Real.sqrt B * ‖v‖ + apply (sq_le_sq₀ (norm_nonneg _) hp).mp + rwa [mul_pow, Real.sq_sqrt hB] + nlinarith [Real.sq_sqrt hB, norm_nonneg (A : E →L[ℝ] E)] + +omit [CompleteSpace E] in +/-- The frame growth bound yields a bound for every transformed direction. -/ +theorem norm_apply_sq_le_of_norm_sq_le (A : E →L[ℝ] E) {B : ℝ} + (hA : ‖A‖ ^ 2 ≤ B) (v : E) : ‖A v‖ ^ 2 ≤ B * ‖v‖ ^ 2 := by + calc + _ ≤ (‖A‖ * ‖v‖) ^ 2 := pow_le_pow_left₀ (norm_nonneg _) (A.le_opNorm v) 2 + _ = ‖A‖ ^ 2 * ‖v‖ ^ 2 := mul_pow _ _ _ + _ ≤ _ := mul_le_mul_of_nonneg_right hA (sq_nonneg _) + +/-- A normalized working-scale mean gives polynomial growth of every +smaller exact frame from the proved adjacent mean comparisons. -/ +theorem dyadic_normalizer_norm_sq_bound {K : ℝ} (m : ℕ) (hX : NoncollapsedRCD K (m + 1) X) + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) {r ε : ℝ} (hr : 0 < r) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 2) + (A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (hA : IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (k : ℕ) (hscale : ∀ j ≤ k, a * (3 * (2 ^ j * r)) ≤ 1) + (hnormal : ∀ j ≤ k, ∃ (S : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (w : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 ^ j * r) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (2 ^ j * r)) measurableSet_ball S) + (hroot : sobolevMeanGram (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (Metric.ball p (2 ^ k * r)) measurableSet_ball = + ContinuousLinearMap.id ℝ (Euclidean (m + 1))) : + ‖(A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1))‖ ^ 2 ≤ 2 ^ k := by + apply normalizer_norm_sq_le_of_mean_growth _ _ _ (Metric.ball p r) + (Metric.ball p (2 ^ k * r)) measurableSet_ball measurableSet_ball A hA hroot + (pow_nonneg (by norm_num) k) + intro v + simpa only [pow_zero, one_mul] using + (dyadic_mean_growth m hX ha hBG u p hr hε hsmall k hscale hnormal v).1 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstFailingDyadicScale.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingDyadicScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff05be0d97cbe084689209f43dd1e51b47a99131 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingDyadicScale.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.DyadicTransformationReduction + +namespace OAI + +/-! # The first failing exact normalization retains every preceding frame -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_failing_dyadic_scale {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (β : ℝ) (hβ : 0 < β) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ γ : ℝ, 0 ≤ γ → γ ≤ η → + ∀ (p : X) (R : ℝ), 0 < R → -1 ≤ K*(2*R)^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) γ u v → + (∃ t : ℝ, 0 < t ∧ t ≤ R ∧ ¬∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p t β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p t) measurableSet_ball A) → + ∃ d : ℕ, + (¬∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^d) γ + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R/(2 : ℝ)^d)) measurableSet_ball A) ∧ + ∀ j < d, ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^j) γ + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R/(2 : ℝ)^j)) measurableSet_ball A := by + classical + obtain ⟨η,hη,hη1,hall⟩ := hX.dyadic_splitting_implies_all_scales hn β hβ + refine ⟨η,hη,hη1,?_⟩ + intro γ hγ hγη p R hR hK u v hfirst hbad + let Good : ℕ → Prop := fun j => ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^j) γ + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R/(2 : ℝ)^j)) measurableSet_ball A + have hex : ∃ j, ¬Good j := by + by_contra hnot + have hg : ∀ j, Good j := by simpa only [not_exists,not_not] using hnot + obtain ⟨t,ht,htR,htbad⟩ := hbad + apply htbad + apply hall p R hR hK u v (hfirst.mono_error _ _ hγ hγη) + · intro j + obtain ⟨A,hA,_⟩ := hg j + exact ⟨A,hA.mono_error _ _ hγ hγη⟩ + · exact ht + · exact htR + refine ⟨Nat.find hex,Nat.find_spec hex,?_⟩ + intro j hj + exact not_not.mp (Nat.find_min hex hj) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstFailingRootFrame.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingRootFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dd7c39340dc14b16ef8cc5ad8a00b4cfd3b5dc3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingRootFrame.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Coordinates.FirstFailingDyadicScale + +namespace OAI + +/-! # A genuine root frame and all ancestors at a first failing scale -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem dyadic_ancestor_radius (R : ℝ) {d j : ℕ} (hj : j ≤ d) : + (2 : ℝ)^j*(R/(2 : ℝ)^d) = R/(2 : ℝ)^(d-j) := by + have hp : (2 : ℝ)^d = (2 : ℝ)^(d-j)*(2 : ℝ)^j := by + rw [← pow_add,Nat.sub_add_cancel hj] + rw [hp] + field_simp + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_failing_root_frame {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (κ : ℝ) (hκ : 0 < κ) : + ∃ δ : ℝ, 0 < δ ∧ δ ≤ κ ∧ ∀ γ : ℝ, 0 ≤ γ → γ ≤ δ → + ∀ (p : X) (R : ℝ) (d : ℕ), 0 < R → 0 < d → -1 ≤ K*(2*R)^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + (∀ j < d, ∃ S : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^j) γ + (transformedColumn (hausdorff n X) hX.quadratic u S) + (fun x => (S : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R/(2 : ℝ)^j)) measurableSet_ball S) → + ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (R/(2 : ℝ)^d) κ + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R/(2 : ℝ)^d)) measurableSet_ball A ∧ + ∀ j ≤ d, ∃ S : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p + ((2 : ℝ)^j*(R/(2 : ℝ)^d)) κ + (transformedColumn (hausdorff n X) hX.quadratic u S) + (fun x => (S : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p ((2 : ℝ)^j*(R/(2 : ℝ)^d))) measurableSet_ball S := by + obtain ⟨η,hη,hstep⟩ := hX.comparable_radius_splitting hn κ hκ + refine ⟨min η κ,lt_min hη hκ,min_le_right _ _,?_⟩ + intro γ hγ hγδ p R d hR hd hK u v hbefore + let r := R/(2 : ℝ)^d + have hr : 0 < r := by dsimp only [r]; positivity + have hrR : r ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hrK : -1 ≤ K*(2*r)^2 := by + have hsq : (2*r)^2 ≤ (2*R)^2 := + (sq_le_sq₀ (by positivity) (by positivity)).mpr (by linarith) + by_cases hK0 : 0 ≤ K + · exact (by norm_num : (-1 : ℝ) ≤ 0).trans (mul_nonneg hK0 (sq_nonneg _)) + · exact hK.trans (mul_le_mul_of_nonpos_left hsq (le_of_not_ge hK0)) + obtain ⟨S,hS,_⟩ := hbefore (d-1) (by omega) + have he : 2*r = R/(2 : ℝ)^(d-1) := by + simpa only [pow_one] using dyadic_ancestor_radius R (d:=d) (j:=1) hd + rw [← he] at hS + obtain ⟨B,hB,hBn⟩ := hstep p r hr hrK + (transformedColumn (hausdorff n X) hX.quadratic u S) + (fun x => (S : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) + (hS.mono_error _ _ hγ (hγδ.trans (min_le_left _ _))) r (by linarith) le_rfl + let A := B.trans S + have hA := firstOrderSplitting_comp (hausdorff n X) hX.quadratic u S B v p r κ hB + have hAn := exact_mean_normalization_comp (hausdorff n X) hX.quadratic u S B + (ball p r) measurableSet_ball hBn + refine ⟨A,hA,hAn,?_⟩ + intro j hj + by_cases hj0 : j = 0 + · subst j + simpa only [pow_zero,one_mul] using (show ∃ S : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p r κ + (transformedColumn (hausdorff n X) hX.quadratic u S) + (fun x => (S : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p r) measurableSet_ball S + from ⟨A,hA,hAn⟩) + · obtain ⟨T,hT,hTn⟩ := hbefore (d-j) (by omega) + rw [dyadic_ancestor_radius R hj] + exact ⟨T,hT.mono_error _ _ hγ (hγδ.trans (min_le_right _ _)),hTn⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstFailingSequence.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4cb2b5fc8a347f10082ec699e3b5307a49c135c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstFailingSequence.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRootEventualSplitting +import OAI.Geometry.RCD.Coordinates.FirstFailingRootFrame +import OAI.Geometry.RCD.Metric.CommonMeasuredApproximations +import OAI.Geometry.RCD.Metric.DyadicFlatnessLimit + +namespace OAI + +/-! # A first failing dyadic scale contradicts the actual root estimates -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.no_first_failing_sequence {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hMeasured : LocalMeasuredCoordinateInput hX) (hκ : 0 < κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) : + ∃ γ₀ : ℝ, 0 < γ₀ ∧ ∀ γ : ℝ, 0 < γ → γ ≤ γ₀ → + ∀ (p : ℕ → X) (R ε : ℕ → ℝ) (d : ℕ → ℕ), + (∀ k, 0 < R k) → (∀ k, 2 ≤ d k) → Tendsto d atTop atTop → + (∀ k, -1 ≤ K*(2*R k)^2) → + (∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, -δ ≤ K*(R k)^2) → + (∀ k, a*(3*R k) ≤ 1) → Tendsto ε atTop (𝓝 0) → + (∀ k, ∀ t : ℝ, 0 < t → t ≤ R k → + ∃ f : X → Euclidean (m+1), IsPointedApproximation (p k) 0 t 1 (ε k) f) → + ∀ (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)), + (∀ k, FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) (2*R k) (ε k) (u k) (v k)) → + (∀ k, ∀ j < d k, ∃ S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) (R k/(2 : ℝ)^j) γ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) + (fun x => (S : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (R k/(2 : ℝ)^j)) measurableSet_ball S) → + (∀ k, ¬∃ S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) (R k/(2 : ℝ)^(d k)) γ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) + (fun x => (S : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v k x)) ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (R k/(2 : ℝ)^(d k))) measurableSet_ball S) → False := by + obtain ⟨γ₀,hγ₀,_,hroot⟩ := hX.first_failing_root_frame hm κ hκ + refine ⟨γ₀,hγ₀,?_⟩ + intro γ hγ hγle p R ε d hR hd2 hd hK hKsmall hscale hε hflat u v hfirst hbefore hbad + let r := fun k => R k/(2 : ℝ)^(d k) + have hr (k : ℕ) : 0 < r k := div_pos (hR k) (by positivity) + have hrR (k : ℕ) : r k ≤ R k := div_le_self (hR k).le (one_le_pow₀ (by norm_num)) + have hcurv_mono (k : ℕ) {s t : ℝ} (hs : 0 ≤ s) (hst : s ≤ t) : + K*t^2 ≤ K*s^2 ∨ 0 ≤ K*s^2 := by + by_cases hK0 : 0 ≤ K + · exact Or.inr (mul_nonneg hK0 (sq_nonneg _)) + · exact Or.inl (mul_le_mul_of_nonpos_left (pow_le_pow_left₀ hs hst 2) (le_of_not_ge hK0)) + have hc (k : ℕ) : -1 ≤ K*(r k)^2 := by + rcases hcurv_mono k (hr k).le (show r k ≤ 2*R k by linarith [hrR k,hR k]) with h | h + · exact (hK k).trans h + · linarith + have hc5 (k : ℕ) : -1 ≤ K*(5*r k)^2 := by + have hp : (4 : ℝ) ≤ (2 : ℝ)^(d k) := by + simpa only [show (2 : ℝ)^2=4 by norm_num] using + pow_le_pow_right₀ (by norm_num : (1:ℝ)≤2) (hd2 k) + have hrad : 5*r k ≤ 2*R k := by + have hh : r k*(2 : ℝ)^(d k)=R k := by dsimp only [r]; field_simp + nlinarith [mul_le_mul_of_nonneg_left hp (hr k).le,hr k] + rcases hcurv_mono k (mul_nonneg (by norm_num) (hr k).le) hrad with h | h + · exact (hK k).trans h + · linarith + have hcs : ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, -δ ≤ K*(r k)^2 := by + intro δ hδ + filter_upwards [hKsmall δ hδ] with k hk + rcases hcurv_mono k (hr k).le (hrR k) with h | h + · exact hk.trans h + · linarith + obtain ⟨ε',V,hε',hε'lim,hV⟩ := hMeasured.common_approximations hm p r hr hcs + (dyadic_flatness_limit p R ε d hR hd hε hflat) + choose A hAfirst hAn hframes using fun k => + hroot γ hγ.le hγle (p k) (R k) (d k) (hR k) (by have := hd2 k; omega) + (hK k) (u k) (v k) (hbefore k) + have hRroot (k : ℕ) : (2 : ℝ)^(d k)*r k=R k := by dsimp only [r]; field_simp + have hscale' (k j : ℕ) (hj : j ≤ d k) : a*(3*((2 : ℝ)^j*r k)) ≤ 1 := by + have hjR : (2 : ℝ)^j*r k ≤ R k := by + dsimp only [r] + rw [dyadic_ancestor_radius (R k) hj] + exact div_le_self (hR k).le (one_le_pow₀ (by norm_num)) + exact (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hjR (by norm_num)) ha).trans (hscale k) + have hΩ (k : ℕ) : ball (p k) ((2 : ℝ)^(d k)*r k) ⊆ ball (p k) (2*R k) := by + rw [hRroot] + exact ball_subset_ball (by linarith [hR k]) + have hsplit := dyadic_root_eventual_splitting m hm hX ha hBG hκ.le hκ1 hsmall p r ε' d hr hd + hc hc5 (fun k => (hε' k).1.le) (fun k => (hε' k).2) hε'lim V hV u v A hAn hscale' + (fun k j hj => by + obtain ⟨S,hS,hSn⟩ := hframes k j hj + exact ⟨S,_,hS,hSn⟩) + (fun k => (hfirst k).continuous.mono (hΩ k)) + (fun k i => ae_restrict_of_ae_restrict_of_subset (hΩ k) ((hfirst k).representative i)) + (fun k i => ((hfirst k).harmonic i).mono _ _ (hΩ k)) γ hγ + obtain ⟨k,hk⟩ := hsplit.exists + exact hbad k ⟨A k,hk,hAn k⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderCoordinateDistance.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderCoordinateDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..0eb2c31c798b4e77329284360459acd344d88069 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderCoordinateDistance.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Harmonic.NearbyGramColumn +import OAI.Geometry.RCD.Harmonic.NearColumnDistance +import OAI.Geometry.RCD.Coordinates.SplittingCoordinateLipschitz + +namespace OAI + +/-! # The original coordinates do not increase distance in the limit -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_coordinate_distance {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p x y : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 max 0 (dist (v k (x k)) (v k (y k))/r k- + dist (x k) (y k)/r k)) atTop (𝓝 0) := by + obtain ⟨δ,e,γ,hδ,hδ0,he,he0,hnear,hcol⟩ := hX.nearby_gram_column hn hK p x y r ε + hr hr0 hcurv hε hε1 hε0 u v hsplit hx hy (fun k => v k (y k)-v k (x k)) + let E k := |Real.sqrt (1+e k)-1|+(δ k/12)*Real.sqrt (1+e k)+(2*(n:ℝ))*(δ k/12) + have hE (k : ℕ) : 0≤E k := by + have hd := (hδ k).1.le + dsimp [E] + positivity + have hE0 : Tendsto E atTop (𝓝 0) := by + have hs := (he0.const_add 1).sqrt + have hδ' := hδ0.div_const 12 + simpa only [E,add_zero,Real.sqrt_one,sub_self,abs_zero,zero_div,zero_mul,mul_zero] + using (((hs.sub_const 1).abs.add (hδ'.mul hs)).add (hδ'.const_mul (2*(n:ℝ)))) + apply squeeze_zero (fun k => le_max_left _ _) (g := E) + · intro k + apply max_le (hE k) + have hs : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (8*(2*r k)) (ε k) (u k) (v k) := by + simpa only [show (8:ℝ)*(2*r k)=16*r k by ring] using hsplit k + have hLip := hX.splitting_coordinate_lipschitz hn (mul_pos (by norm_num) (hr k)) (hε k) hs + have hC : (n:ℝ)*(1+ε k)≤2*(n:ℝ) := by nlinarith [Nat.cast_nonneg (α:=ℝ) n,hε1 k] + have hγ0 : γ k 0∈ball (p k) (2*r k) := by + change dist (γ k 0) (p k)<2*r k + linarith [(hnear k).2.2 0,hr k] + have hγ1 : γ k 1∈ball (p k) (2*r k) := by + change dist (γ k 1) (p k)<2*r k + linarith [(hnear k).2.2 1,hr k] + have hx' : x k∈ball (p k) (2*r k) := by + change dist (x k) (p k)<2*r k + linarith [hx k,hr k] + have hy' : y k∈ball (p k) (2*r k) := by + change dist (y k) (p k)<2*r k + linarith [hy k,hr k] + have hdx := (hLip.dist_le_mul _ hγ0 _ hx').trans + (mul_le_mul_of_nonneg_right hC dist_nonneg) + have hdy := (hLip.dist_le_mul _ hγ1 _ hy').trans + (mul_le_mul_of_nonneg_right hC dist_nonneg) + have hclose : dist (γ k 0) (x k)+dist (γ k 1) (y k)≤(δ k/12)*r k := by + linarith [(hnear k).1,(hnear k).2.1] + have hb := near_column_distance (v k) (x k) (y k) (γ k 0) (γ k 1) + (by positivity : 0≤2*(n:ℝ)) (hr k) (he k) hclose hdx hdy (hcol k) + have hB : dist (x k) (y k)/r k≤1 := by + apply (div_le_one (hr k)).mpr + have ht := dist_triangle (x k) (p k) (y k) + rw [dist_comm (p k) (y k)] at ht + linarith [hx k,hy k,hr k] + have hB0 : 0≤dist (x k) (y k)/r k := div_nonneg dist_nonneg (hr k).le + have ha := mul_le_mul_of_nonneg_right + (le_abs_self (Real.sqrt (1+e k)-1)) hB0 + have hb' := mul_le_mul_of_nonneg_left hB (abs_nonneg (Real.sqrt (1+e k)-1)) + dsimp [E] + nlinarith + · exact hE0 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameConvergence.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..f086deb73c38cd0ae59a1b2ac4937cd37abf6e84 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameConvergence.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicFrameApproximation +import OAI.Geometry.RCD.Coordinates.CenteredFrameGramBound +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Convergence of the prescribed centered first-order splitting maps -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_frame_convergence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*(80*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (hsplit : ∀ k, FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (80*r k) (ε k) (u k) (v k)) : + ∀ τ : ℝ, 0 < τ → ∀ᶠ k in atTop, + IsPointedApproximation (p k) 0 (r k) (5/2) τ + (fun x => (r k)⁻¹ • (v k x-v k (p k))) := by + let μ := hausdorff n X + obtain ⟨D,hD,hvol⟩ := hX.rescaled_ball_volume_factor hn (by norm_num : (0:ℝ)≤1) + (by norm_num : (0:ℝ)<1/16) (by norm_num : (1/16:ℝ)≤1) + have hvol' (k : ℕ) : μ.real (ball (p k) (80*r k)) ≤ D*μ.real (ball (p k) (5*r k)) := by + have hh := hvol (p k) (80*r k) (mul_pos (by norm_num) (hr k)) (hcurv k) (p k) + (by simpa only [dist_self] using (mul_nonneg (by norm_num : (0:ℝ)≤80) (hr k).le)) + simpa only [show (1/16:ℝ)*(80*r k)=5*r k by ring] using hh + have hex (k : ℕ) := hX.centered_first_order_frame hn (hr k) (hε k) (hε1 k) + (u k) (v k) (hsplit k) + choose w hw hrep hnorm he using hex + have hcurv' (k : ℕ) : -1 ≤ K*(r k)^2 := by + by_cases hK : 0≤K + · exact (by norm_num : (-1:ℝ)≤0).trans (mul_nonneg hK (sq_nonneg _)) + · have hh := hcurv k + nlinarith + have hv (k : ℕ) : ContinuousOn (fun x => (r k)⁻¹ • (v k x-v k (p k))) + (ball (p k) (5*r k)) := by + have hs : ball (p k) (5*r k) ⊆ ball (p k) (80*r k) := + ball_subset_ball (by linarith [hr k]) + exact (((hsplit k).continuous.mono hs).sub + (show ContinuousOn (fun _ : X => v k (p k)) (ball (p k) (5*r k)) from + continuousOn_const)).const_smul (r k)⁻¹ + have hgram (i j : Fin n) : Tendsto (fun k => (μ.real (ball (p k) (5*r k)))⁻¹* + ∫ x in ball (p k) (4*r k), + |r k^2*localGamma μ hX.quadratic (w k i) (w k j) x-(if i=j then 1 else 0)| ∂μ) + atTop (𝓝 0) := by + apply squeeze_zero + · intro k + exact mul_nonneg (inv_nonneg.mpr measureReal_nonneg) (integral_nonneg (fun x => abs_nonneg _)) + · intro k + exact centered_frame_gram_bound hX (hr k) (hε k) (u k) (w k) (v k) + (hsplit k) (hvol' k) (he k) i j + · simpa only [mul_zero] using hεlim.const_mul D + exact hX.harmonic_frame_approximation hn p r ε V + (fun k x => (r k)⁻¹ • (v k x-v k (p k))) hr hcurv' hε hε1 hεlim hV + (fun i k => w k i) (fun i k => hw k i) (by norm_num : (0:ℝ)<10) + (fun i k => hnorm k i) hv (fun k => by simp) (fun i k => hrep k i) hgram + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameErrorIntegral.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameErrorIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..38621c42c4a942c7ad8efbd5ed30e8c4ff5b90fc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderFrameErrorIntegral.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.FrameEnergyError + +namespace OAI + +/-! # Quantitative frame-energy error for the actual first-order splitting -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_frame_error_integral {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hn : 2≤n) (hK : K≤0) (p : X) {R b ε : ℝ} + (hR : 0 (frameEnergyError (hausdorff n X) hX.quadratic u g.val x)^2) + (ball p R) (hausdorff n X) ∧ + (∫ x in ball p R, (frameEnergyError (hausdorff n X) hX.quadratic u g.val x)^2 + ∂hausdorff n X)≤frameDefectConstant n*L^4*(n:ℝ)^2*ε* + (hausdorff n X).real (ball p b) := by + let μ := hausdorff n X + let hQ := hX.quadratic + have hL (i : Fin n) : ∀ᵐ x ∂μ.restrict (ball p b), localGamma μ hQ (u i) (u i) x≤4 := by + filter_upwards [hs.gradient i] with x hx + nlinarith + have hframe := hX.harmonic_global_frame_defect hn hK p u hR hb hs.harmonic hL + g q hq d A hd hqr + obtain ⟨hint,hintbound⟩ := frame_energy_error_sq_integral μ hQ u g.val + (hX.finiteOnBounded _ isBounded_ball).ne hg hframe + refine ⟨hint,hintbound.trans ?_⟩ + have hsub : ball p R⊆ball p b := ball_subset_ball (by linarith) + have hpos : 0<μ.real (ball p b) := ENNReal.toReal_pos + (hX.fullSupport p b (by linarith)).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hdef := gramDefect_integral_bound μ hQ hpos + (hX.finiteOnBounded _ isBounded_ball).ne hs + have hsmall : (∫ x in ball p R, gramDefect μ hQ u x ∂μ)≤ + (n:ℝ)^2*ε*μ.real (ball p b) := + (setIntegral_mono_set (gramDefect_integrableOn μ hQ u (hX.finiteOnBounded _ isBounded_ball).ne) + (Eventually.of_forall (fun x => gramDefect_nonneg μ hQ u x)) + (Eventually.of_forall hsub)).trans hdef + have hC : 0≤frameDefectConstant n := by unfold frameDefectConstant; positivity + have hh := mul_le_mul_of_nonneg_left hsmall (mul_nonneg hC (by positivity : 0≤L^4)) + convert hh using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderHeatFrameEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderHeatFrameEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..008e19dcfef59baa1240d8951bad94ee4a3a4395 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderHeatFrameEnergy.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.RCD.Coordinates.HeatFrameUniformEnergy +import OAI.Geometry.RCD.Coordinates.FirstOrderRegularFamily +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Uniform actual heat-frame energy along the original splitting sequence -/ + +open Set Filter MeasureTheory Metric Finset +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_heat_frame_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 + hX.first_order_regular_family hn (hr k) (hε k) (hε1 k) (u k) (v k) (hsplit k) + have hsmall (k : ℕ) : (-K)*(r k)^2≤1 := by + nlinarith [hcurv k,mul_nonneg (neg_nonneg.mpr hK) (sq_nonneg (r k))] + obtain ⟨C,hC,hcut⟩ := hX.goodCutoffInput hn + have hC0 : 0≤C := by linarith + let χ k := Classical.choice (hcut (p k) (r k) (hr k) (by nlinarith [hsmall k])) + obtain ⟨D,hD,hvol⟩ := hX.rescaled_ball_volume_factor hn (by norm_num : (0:ℝ)≤1) + (by norm_num : (0:ℝ)<1/4) (by norm_num : (1/4:ℝ)≤1) + have hD0 : 0≤D := by linarith + have hm (k : ℕ) (c : ℝ) (hc : 0 |localGamma μ Q (u k i) (u k i) x-1|) + (ball (p k) (16*r k)) μ := + ((localGamma_memL1 μ Q (u k i) (u k i)).integrableOn.sub (integrable_const _)).abs + have hloc : localGamma μ Q (U k i).val (U k i).val + =ᵐ[μ.restrict (closedBall (p k) (2*r k))] localGamma μ Q (u k i) (u k i) := + ae_restrict_of_ae_restrict_of_subset (closedBall_subset_ball (by linarith [hr k])) + (localGamma_pair_congr_ae μ Q (hsame k i) (hsame k i)) + have hEq := integral_congr_ae (hloc.fun_comp (fun z : ℝ => |z-1|)) + simp only [Function.comp_apply] at hEq + rw [hEq] + apply (setIntegral_mono_set hi (Eventually.of_forall (fun _ => abs_nonneg _)) + (Eventually.of_forall (closedBall_subset_ball (by linarith [hr k])))).trans + have hmean := (hsplit k).gram i i + rw [← div_eq_inv_mul,div_le_iff₀ (hm k 16 (by norm_num))] at hmean + have hb : (∫ x in ball (p k) (16*r k), |localGamma μ Q (u k i) (u k i) x-1| ∂μ)≤ + ε k*μ.real (ball (p k) (16*r k)) := by simpa only [ite_true] using hmean + exact (hb.trans (mul_le_of_le_one_left (hm k 16 (by norm_num)).le (hε1 k))).trans (hv k) + let H := (L:ℝ)*Real.exp 1 + let B := 2*(n:ℝ)*(1+1/η)*(a:ℝ) + let N := 2*H^2*((C/2+1)*D+1)+8*((C/2+1)*H^2+B^2+B*H*C) + have hN : 0≤N := by dsimp only [N,H,B]; positivity + have hfamily (k : ℕ) : ∃ G : Fin n → SobolevSpace μ Q, + (∀ i, SobolevSpace.toLp μ Q (G i) =ᵐ[μ.restrict (ball (p k) (4*r k))] + localGamma μ Q (U k i).val (w k)) ∧ + ∀ i, (r k)^2*(∫ x in ball (p k) (r k), localGamma μ Q (G i) (G i) x ∂μ)≤ + N*μ.real (ball (p k) (4*r k)) := by + apply hX.heat_frame_uniform_energy hn hK (p k) (hr k) hη hη1 (by linarith) (hsmall k) (χ k) + (U k) (q k) (hq k) _ _ (he k) (h k) (V k) L (A k) a (hV k) (hVc k) (hrep k) (hA k) (hscale k) + · intro i + exact ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith [hr k])) (hq0 k i) + · intro i + exact ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith [hr k])) (hgrad k i) + choose G hG hGE using hfamily + refine ⟨(n:ℝ)*N+1,G,by positivity,?_,?_⟩ + · intro k i + have hloc := localGamma_pair_congr_ae μ Q + (ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith [hr k])) (hsame k i)) + (EventuallyEq.refl _ _ : SobolevSpace.toLp μ Q (w k) =ᵐ[μ.restrict (ball (p k) (4*r k))] + SobolevSpace.toLp μ Q (w k)) + exact (hG k i).trans hloc + · intro k + have hh := sum_le_sum (fun i (_ : i∈(univ : Finset (Fin n))) => hGE k i) + rw [← mul_sum] at hh + simp only [sum_const,card_univ,Fintype.card_fin,nsmul_eq_mul] at hh + exact hh.trans (by nlinarith [(hm k 4 (by norm_num)).le]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderInnerCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderInnerCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..2151f9f96bdc41d8321ab61f68fd23c14c4cd7ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderInnerCoordinates.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderSmallScaleApproximation +import OAI.Geometry.RCD.Metric.PointedPhysicalScale + +namespace OAI + +/-! # A fixed interior coordinate consequence on the original splitting scale -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_inner_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + {η : ℝ} (hη : 0<η) : + ∃ r₀ ε : ℝ, 0 r⁻¹ • (v x-v p)) := by + obtain ⟨s₀,ε,hs₀,hε,happly⟩ := hX.first_order_small_scale_approximation hn hK + (show 0<5120*η by positivity) + refine ⟨5120*s₀,ε,by positivity,hε,?_⟩ + intro p r hr hr₀ hc u v hs + have he : 81920*(r/5120)=16*r := by ring + have hh := happly p (r/5120) (by positivity) (by linarith) + (by simpa only [he] using hc) u v (by simpa only [he] using hs) + have hh' : IsPointedApproximation p 0 ((1/5120)*r) 2 (5120*η) + (fun x => (r/5120)⁻¹ • (v x-v p)) := by + simpa only [one_div_mul_eq_div] using hh + have hout := hh'.change_scale hr (by norm_num : (0:ℝ)<1/5120) + simpa only [show (1/5120:ℝ)*2=1/2560 by norm_num, + show (1/5120:ℝ)*(5120*η)=η by ring,smul_smul, + show (1/5120:ℝ)*(r/5120)⁻¹=r⁻¹ by field_simp] using hout + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FirstOrderRegularFamily.lean b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderRegularFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0135c86dabbe371f945fe5002f60c33cf9ac882 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FirstOrderRegularFamily.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderCompactRepresentative + +namespace OAI + +/-! # One actual regular family extending all original first-order coordinates -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_regular_family {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {p : X} {r ε : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n) + (hs : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*r) ε u v) : + let μ := hausdorff n X + let Q := hX.quadratic + ∃ (U : Fin n → compactLaplacianCore μ Q univ) (d : Fin n → Lp ℝ 2 μ) + (V : Fin n → C(X,ℝ)) (L A : Fin n → ℝ≥0), + (∀ i, IsWeakLaplacian μ Q (U i).val (d i)) ∧ + (∀ i, LipschitzWith (L i) (V i)) ∧ (∀ i, HasCompactSupport (V i)) ∧ + (∀ i, SobolevSpace.toLp μ Q (U i).val =ᵐ[μ] V i) ∧ + (∀ i x, |V i x|≤A i) ∧ + (∀ i, SobolevSpace.toLp μ Q (U i).val =ᵐ[μ.restrict (ball p (6*r))] SobolevSpace.toLp μ Q (u i)) ∧ + (∀ i, d i =ᵐ[μ.restrict (ball p (6*r))] fun _ => 0) ∧ + (∀ i, EqOn (V i) (fun x => v x i) (ball p (6*r))) ∧ + (∀ i, ∀ᵐ x ∂μ.restrict (ball p (6*r)), localGamma μ Q (U i).val (U i).val x≤4) := by + intro μ Q + let := hX.openPos K n + let ℓ : ℝ≥0 := ⟨1+ε,by linarith⟩ + choose U d hd hrep hd0 using fun i => hX.local_poisson_regular_extension hn (u i) 0 + (show 0 < 6*r by linarith) (show 2*(6*r)<16*r by linarith) + ((isConstantLaplacianOn_zero_iff μ Q _ _).mpr (hs.harmonic i)) ℓ (hs.gradient i) + choose W L _A hW hWc hWr _hA using fun i => regular_core_representative μ Q (U i) + have hsub : ball p (6*r)⊆ball p (16*r) := ball_subset_ball (by linarith) + have heq (i : Fin n) : EqOn (W i) (fun x => v x i) (ball p (6*r)) := by + have he : W i =ᵐ[μ.restrict (ball p (6*r))] fun x => v x i := + (Filter.EventuallyEq.symm (ae_restrict_of_ae (hWr i))).trans + ((hrep i).trans (ae_restrict_of_ae_restrict_of_subset hsub (hs.representative i))) + exact Measure.eqOn_open_of_ae_eq he isOpen_ball (hW i).continuous.continuousOn + (((EuclideanSpace.proj i).continuous.comp_continuousOn hs.continuous).mono hsub) + choose B hB using fun i => (hWc i).exists_bound_of_continuous (hW i).continuous + let A (i : Fin n) : ℝ≥0 := ⟨max (B i) 0,le_max_right _ _⟩ + have hA' (i : Fin n) (x : X) : |W i x|≤A i := + (show |W i x|≤B i by simpa only [Real.norm_eq_abs] using hB i x).trans (le_max_left _ _) + refine ⟨U,d,fun i => ⟨W i,(hW i).continuous⟩,L,A,hd,hW,hWc,hWr,hA',hrep,hd0,heq,?_⟩ + intro i + have he := localGamma_pair_congr_ae μ Q (hrep i) (hrep i) + filter_upwards [he,ae_restrict_of_ae_restrict_of_subset hsub (hs.gradient i)] with x he hg + rw [he] + change localGamma μ Q (u i) (u i) x≤(1+ε)^2 at hg + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FiveGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/FiveGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..674abb650dd4970980f5bb78426a3c7eafacc222 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FiveGeometricInputs.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.RCD.Coordinates.SixGeometricInputs +import OAI.Geometry.RCD.Coordinates.InitialSplittingConstruction + +namespace OAI + +/-! # Coordinates under harmonic normalization and local volume estimates -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_five_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalTransformationInput hX → LocalFlatSplittingInput hX → + LocalVolumeRigidityInput hX → LocalMeasuredCoordinateInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hvol ht hs hr hm + exact regular_coordinates_of_six_geometric_inputs hn hX hp hvol + hX.initialSplittingInput ht hs hr hm + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeHeatRegular.lean b/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeHeatRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..7620446f6374bc7ab3fbb1a4ec6b8da1c4659a4a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeHeatRegular.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Coordinates.CompactHeatGaugeNormalization +import OAI.Geometry.RCD.Coordinates.BoundedHeatLogRegular +import OAI.Geometry.RCD.Metric.CompactFactorL2 + +namespace OAI + +/-! # Actual bounded regular extensions of the fixed-gauge heat potential -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +theorem fixed_gauge_heat_regular + {S : Set X} [CompactSpace S] (ν : Measure S) [IsProbabilityMeasure ν] + (ρ : X → ℝ) (hρ : Measurable ρ) (hρ0 : ∀ x, 0 ≤ ρ x) {B : ℝ≥0} + (hB : ∀ᵐ x ∂hausdorff n X, |ρ x| ≤ B) + (hν : ν.map Subtype.val = (hausdorff n X).withDensity (fun x => ENNReal.ofReal (ρ x))) + (F : C(S,ℝ)) (hF : ∀ y, 0 < F y) + {ε δ s : ℝ} (hε : 0 < ε) (hδ : 0 < δ) (hs : δ ≤ s) (z : X) + {Ω : Set X} (hΩ : IsCompact Ω) : + ∃ (u : SobolevSpace (hausdorff n X) hX.quadratic) (q : Lp ℝ 2 (hausdorff n X)) + (V : X → ℝ) (L C : ℝ≥0), + IsWeakLaplacian (hausdorff n X) hX.quadratic u q ∧ LipschitzWith L V ∧ + (∀ x, |V x| ≤ C) ∧ (SobolevSpace.toLp (hausdorff n X) hX.quadratic u =ᵐ[hausdorff n X] V) ∧ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic u =ᵐ[(hausdorff n X).restrict Ω] + hX.fixedGaugeScaledPotential hn p ν F ε hε δ hδ z s) := by + let m := hausdorff n X + let Q := hX.quadratic + let hk := hX.canonicalHeatKernel_isContinuousHeatKernel hn p + let t := ε*s/2 + have ht : 0 < t := div_pos (mul_pos hε (hδ.trans_le hs)) (by norm_num) + obtain ⟨G,hG,hFG⟩ := hX.fixedGaugeScaledPotential_normalized hn p ν F hF hε hδ hs z + obtain ⟨f,⟨A,hf⟩,he⟩ := hX.compact_heat_factor_L2 hn p ν ρ hρ hρ0 hB hν G + have hp : ∀ x ∈ Ω, 0 < kernelHeat m Q hk t f x := by + intro x _ + rw [← he t ht x] + exact hX.compactHeatFactor_positive hn p ν G hG t ht x + obtain ⟨u,q,U,L,C,hq,hU,hUC,hu,hur⟩ := hX.bounded_heat_log_regular hn p f A hf ht hΩ hp + let c : ℝ≥0 := ⟨ε,hε.le⟩ + have hrep : SobolevSpace.toLp m Q (ε • u) =ᵐ[m] fun x => ε*U x := by + filter_upwards [hu,Lp.coeFn_smul ε (SobolevSpace.toLp m Q u)] with x hx hy + change SobolevSpace.toLp m Q (ε • u) x = ε*SobolevSpace.toLp m Q u x at hy + rw [hy,hx] + refine ⟨ε • u,ε • q,fun x => ε*U x,‖ε‖₊*L,c*C,hq.smul m Q ε,?_,?_,hrep,?_⟩ + · apply LipschitzWith.of_dist_le_mul + intro x y + have hh := mul_le_mul_of_nonneg_left (hU.dist_le_mul x y) (abs_nonneg ε) + simpa only [Real.dist_eq,← mul_sub,abs_mul,NNReal.coe_mul,coe_nnnorm, + Real.norm_eq_abs,mul_assoc] using hh + · intro x + rw [abs_mul,abs_of_nonneg hε.le] + exact mul_le_mul_of_nonneg_left (hUC x) hε.le + · filter_upwards [ae_restrict_of_ae hrep,ae_restrict_of_ae hu,hur] with x hx hy hz + rw [hx,← hy,hz,← he t ht x] + exact (hFG x).symm + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeRegularGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeRegularGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b38ae43c9c15d2e06f6a812c5516271aaa92f02 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FixedGaugeRegularGradient.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Coordinates.FixedGaugeHeatRegular +import OAI.Geometry.RCD.Heat.CompactScaledLogBound + +namespace OAI + +/-! # Uniform local gradient bounds for every fixed-gauge realization -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +theorem fixed_gauge_gradient_bound + {S : Set X} [CompactSpace S] (ν : Measure S) [IsProbabilityMeasure ν] + (ρ : X → ℝ) (hρ : Measurable ρ) (hρ0 : ∀ x, 0 ≤ ρ x) {B : ℝ≥0} + (hB : ∀ᵐ x ∂hausdorff n X, |ρ x| ≤ B) + (hν : ν.map Subtype.val = (hausdorff n X).withDensity (fun x => ENNReal.ofReal (ρ x))) + (z : X) {R r δ : ℝ} (hR : 0 ≤ R) (hdist : ∀ y:S, dist z y ≤ R) (hδ : 0 < δ) : + ∃ P : ℝ, 0 ≤ P ∧ ∀ (F : C(S,ℝ)), (∀ y, 0 < F y) → + ∀ ε (hε : 0 < ε), ε ≤ 1 → ∀ t ∈ Icc δ 1, + ∀ u : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic u + =ᵐ[(hausdorff n X).restrict (closedBall z r)] + hX.fixedGaugeScaledPotential hn p ν F ε hε δ hδ z t) → + ∀ᵐ x ∂(hausdorff n X).restrict (closedBall z r), + localGamma (hausdorff n X) hX.quadratic u u x ≤ P := by + let m := hausdorff n X + let Q := hX.quadratic + obtain ⟨P,hP,hdata⟩ := hX.compact_scaled_log_uniform_bound hn p ν ρ hρ hρ0 hB hν + z (r := r) hR hdist hδ + refine ⟨P,hP,?_⟩ + intro F hF ε hε hε1 t ht u hu + obtain ⟨G,hG,hFG⟩ := hX.fixedGaugeScaledPotential_normalized hn p ν F hF hε hδ ht.1 z + have hc : 0 < ε/2 := half_pos hε + have h2 : 2*(ε/2) = ε := by ring + have htime : ε/2*t = ε*t/2 := by ring + obtain ⟨v,hv,hvP⟩ := hdata G hG hc (by simpa only [h2] using hε1) ht.1 ht.2 + have hv' : SobolevSpace.toLp m Q v =ᵐ[m.restrict (closedBall z r)] fun x => + ε*Real.log (hX.compactHeatFactor hn p ν G (ε*t/2) + (div_pos (mul_pos hε (hδ.trans_le ht.1)) (by norm_num)) x) := by + simpa only [h2,htime] using hv + have huv : SobolevSpace.toLp m Q u =ᵐ[m.restrict (closedBall z r)] SobolevSpace.toLp m Q v := by + filter_upwards [hu,hv'] with x hu hv + exact hu.trans ((hFG x).trans hv.symm) + filter_upwards [localGamma_pair_congr_ae m Q huv huv,hvP, + ae_restrict_of_ae (localGamma_self m Q v)] with x he hb hs + rw [he,hs] + exact hb + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FixedResidualNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/FixedResidualNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..fdff617a65c151ff57e31a4d08302efed5962b88 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FixedResidualNormalization.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedProjectionResidual +import OAI.Geometry.RCD.Coordinates.NormalizedPairing +import OAI.Geometry.RCD.Harmonic.LocalRadialDerivative + +namespace OAI + +/-! # A fixed outer normalization preserves a nonzero inner residual -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- The fixed outer-bound constant makes every normalized outer norm at +most one, while retaining a definite inner norm. -/ +theorem fixed_amplitude_bound {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + (x : H) {M α : ℝ} (hM : 0 < M) (hα : 0 < α) (hx : ‖x‖ ≤ M * α) : + ‖(M * α)⁻¹ • x‖ ≤ 1 := by + rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr (mul_pos hM hα))] + calc + _ ≤ (M * α)⁻¹ * (M * α) := mul_le_mul_of_nonneg_left hx (by positivity) + _ = 1 := inv_mul_cancel₀ (mul_pos hM hα).ne' + +/-- The same normalization bounds the affine coefficients uniformly. -/ +theorem fixed_coefficient_bound {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + (b : H) (k : ℝ) {M α C : ℝ} (hM : 0 < M) (hα : 0 < α) + (hb : ‖b‖ + |k| ≤ C * α) : + ‖(M * α)⁻¹ • b‖ + |(M * α)⁻¹ * k| ≤ C / M := by + rw [norm_smul, Real.norm_eq_abs, abs_mul, + abs_of_pos (inv_pos.mpr (mul_pos hM hα)), ← mul_add] + calc + _ ≤ (M * α)⁻¹ * (C * α) := mul_le_mul_of_nonneg_left hb (by positivity) + _ = C / M := by field_simp + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The inner diagonal moment is exactly `M⁻²`, independent of the small +residual norm. This supplies the nonzero norm in the compactness limit. -/ +theorem fixed_residual_moment {n : ℕ} (s : Set X) (hfin : μ s ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) (w : SobolevSpace μ hQ) + {M : ℝ} (hM : 0 < M) + (hpos : 0 < ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖) : + let α := ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ + ⟪localAffineMomentFamily μ hQ u ((M * α)⁻¹ • w) s hfin none, + localAffineMomentFamily μ hQ u ((M * α)⁻¹ • w) s hfin none⟫_ℝ = (M⁻¹) ^ 2 := by + dsimp only + let α := ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ + change ⟪normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s ((M * α)⁻¹ • w)), + normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s ((M * α)⁻¹ • w))⟫_ℝ = _ + rw [real_inner_self_eq_norm_sq, map_smul, normalizeLocalL2_smul, norm_smul, + Real.norm_eq_abs, abs_of_pos (inv_pos.mpr (mul_pos hM hpos))] + change ((M * α)⁻¹ * α) ^ 2 = (M⁻¹) ^ 2 + have hα : α ≠ 0 := hpos.ne' + field_simp [hM.ne', hα] + +variable [BorelSpace X] [ProperSpace X] + +/-- Amplitude normalization preserves the exact rescaled Euler identity. -/ +theorem amplitude_euler_identity {n : ℕ} (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f w e : SobolevSpace μ hQ) (u : Fin n → SobolevSpace μ hQ) + (b : Fin n → ℝ) (k a t : ℝ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hid : t • localRadialDerivative μ hQ Ω f hf w = + SobolevSpace.restrictLp μ hQ Ω w + (∑ j, b j • SobolevSpace.restrictLp μ hQ Ω (u j)) + + k • restrictedOne μ Ω hfin + SobolevSpace.restrictLp μ hQ Ω e) : + t • localRadialDerivative μ hQ Ω f hf (a • w) = + SobolevSpace.restrictLp μ hQ Ω (a • w) + + (∑ j, (a * b j) • SobolevSpace.restrictLp μ hQ Ω (u j)) + + (a * k) • restrictedOne μ Ω hfin + SobolevSpace.restrictLp μ hQ Ω (a • e) := by + rw [map_smul, smul_comm t a, hid] + simp only [smul_add, Finset.smul_sum, smul_smul, map_smul] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FlatSplittingApproximation.lean b/lean/OAI/Geometry/RCD/Coordinates/FlatSplittingApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4ee6671e4b00a23e0e994393fe424b86412946f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FlatSplittingApproximation.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.FirstOrderFrameConvergence +import OAI.Geometry.RCD.Metric.MeasurablePointedApproximation +import OAI.Geometry.RCD.Metric.PointedPhysicalScale + +namespace OAI + +/-! # The Euclidean-flat consequence of almost splitting + +Measured-coordinate estimates imply a Euclidean coordinate approximation. +The harmonic functions are fixed throughout the compactness argument. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.flat_splitting_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hMeasured : LocalMeasuredCoordinateInput hX) {ρ : ℝ} (hρ : 0 < ρ) : + ∃ τ ε : ℝ, 0 < τ ∧ 0 < ε ∧ + ∀ (p : X) (r : ℝ), 0 < r → -ε ≤ K*r^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*r) ε u v → + (∃ f : X → Euclidean n, IsPointedApproximation p 0 r 2 τ f) → + IsPointedApproximation p 0 r (1/2) ρ (fun x => r⁻¹ • (v x-v p)) := by + classical + by_contra hnot + push Not at hnot + let e := fun k : ℕ => 1/((k : ℝ)+1) + have hepos (k : ℕ) : 0 < e k := by dsimp only [e]; positivity + have he1 (k : ℕ) : e k ≤ 1 := by + dsimp only [e] + apply (div_le_one (by positivity)).mpr + linarith [Nat.cast_nonneg (α := ℝ) k] + have helim : Tendsto e atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + choose δ hδ hmeasure using (fun k => hMeasured hn 5 (e k) (by norm_num) (hepos k)) + let a := fun k => min (e k) (min (δ k) (1/256)) + have hapos (k : ℕ) : 0 < a k := lt_min (hepos k) (lt_min (hδ k) (by norm_num)) + have hae (k : ℕ) : a k ≤ e k := min_le_left _ _ + have haδ (k : ℕ) : a k ≤ δ k := (min_le_right _ _).trans (min_le_left _ _) + have ha256 (k : ℕ) : a k ≤ 1/256 := (min_le_right _ _).trans (min_le_right _ _) + have hex (k : ℕ) := hnot (δ k/25) (a k) (div_pos (hδ k) (by norm_num)) (hapos k) + choose p R hR hcurv u v hsplit hflat hbad using hex + choose f hf using hflat + let r := fun k => R k/5 + have hr (k : ℕ) : 0 < r k := div_pos (hR k) (by norm_num) + have hbig (k : ℕ) : -1 ≤ K*(80*r k)^2 := by + have hh := hcurv k + have hs := ha256 k + dsimp only [r] + nlinarith + have hsmall (k : ℕ) : -(δ k) ≤ K*(r k)^2 := by + have hh := hcurv k + have hs := haδ k + dsimp only [r] + by_cases hK : 0≤K + · exact (neg_nonpos.mpr (hδ k).le).trans (mul_nonneg hK (sq_nonneg _)) + · nlinarith + have hfs (k : ℕ) : IsPointedApproximation (p k) 0 (r k) 10 (δ k/5) + (fun x => (5:ℝ) • f k x) := by + have hf' : IsPointedApproximation (p k) 0 (5*r k) 2 (δ k/25) (f k) := by + simpa only [show 5*r k=R k by dsimp only [r]; ring] using hf k + have hh := hf'.change_scale (hr k) (by norm_num : (0:ℝ)<5) + simpa only [show (5:ℝ)*2=10 by norm_num, + show (5:ℝ)*(δ k/25)=δ k/5 by ring] using hh + have hm (k : ℕ) : ∃ V : X → Euclidean n, + IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (e k) V := by + obtain ⟨V,hVm,hV⟩ := (hfs k).exists_measurable (hr k) (by norm_num) + (div_pos (hδ k) (by norm_num)) + refine ⟨V,hmeasure k (p k) (r k) (hr k) (hsmall k) V hVm ?_⟩ + convert hV using 1 <;> ring + choose V hV using hm + have hs (k : ℕ) : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (80*r k) (e k) (u k) (v k) := by + have hh := (hsplit k).mono_error _ _ (hapos k).le (hae k) + simpa only [show 80*r k=16*R k by dsimp only [r]; ring] using hh + have happ := hX.first_order_frame_convergence hn p r e V hr hbig + (fun k => (hepos k).le) he1 helim hV u v hs (5*ρ) (by positivity) + obtain ⟨k,hk⟩ := happ.exists + have hk' : IsPointedApproximation (p k) 0 ((1/5)*R k) (5/2) (5*ρ) + (fun x => (r k)⁻¹ • (v k x-v k (p k))) := by + simpa only [show (1/5)*R k=r k by dsimp only [r]; ring] using hk + have hout := hk'.change_scale (hR k) (by norm_num : (0:ℝ)<1/5) + apply hbad k + simpa only [show (1/5:ℝ)*(5/2)=1/2 by norm_num, + show (1/5:ℝ)*(5*ρ)=ρ by ring,smul_smul, + show (1/5:ℝ)*(r k)⁻¹=(R k)⁻¹ by dsimp only [r]; field_simp] using hout + +theorem NoncollapsedRCD.flatSplittingInput_of_measured {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hMeasured : LocalMeasuredCoordinateInput hX) : LocalFlatSplittingInput hX := by + intro hn ρ hρ + exact hX.flat_splitting_coordinates hn hMeasured hρ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FourGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/FourGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8a28fe8fa3fb89c0c2a7eae0240f0e839db8003 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FourGeometricInputs.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.RCD.Coordinates.FiveGeometricInputs +import OAI.Geometry.RCD.Coordinates.Transformation + +namespace OAI + +/-! # Coordinates under almost splitting and local volume estimates -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_four_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalAlmostSplittingInput hX → LocalVolumeRigidityInput hX → + LocalMeasuredCoordinateInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hv hs hr hm + exact regular_coordinates_of_five_geometric_inputs hn hX hp hv + (hX.transformationInput_of_measured hm) hs.flatSplittingInput hr hm + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientBound.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..33a39d58781b25ba460ea568fbb48d8148fe0c28 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientBound.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Coordinates.FrameEnergyError +import OAI.Geometry.RCD.Coordinates.FrameResidualEnergy + +namespace OAI + +/-! # Energy bounds for the actual coefficient vector -/ + +open Set Filter MeasureTheory Finset +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem gradient_frame_coefficients_norm_sq_le {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) {S : Set X} + (hu : ∀ i, ∀ᵐ x ∂μ.restrict S, localGamma μ hQ (u i) (u i) x≤4) : + ∀ᵐ x ∂μ.restrict S, ‖gradientFrameCoefficients μ hQ u g x‖^2≤ + 4*(n:ℝ)*localGamma μ hQ g g x := by + have hc (i : Fin n) : ∀ᵐ x ∂μ.restrict S, + (localGamma μ hQ (u i) g x)^2≤4*localGamma μ hQ g g x := by + filter_upwards [hu i,ae_restrict_of_ae (localGamma_sq_le μ hQ (u i) g), + ae_restrict_of_ae (localGamma_self μ hQ g)] with x hx hh he + exact hh.trans (mul_le_mul_of_nonneg_right hx (by rw [he]; positivity)) + filter_upwards [ae_all_iff.mpr hc] with x hx + rw [EuclideanSpace.real_norm_sq_eq] + change (∑ i, (localGamma μ hQ (u i) g x)^2)≤_ + calc + _≤∑ _i : Fin n, 4*localGamma μ hQ g g x := sum_le_sum (fun i _ => hx i) + _=_ := by simp; ring + +theorem gradient_frame_coefficients_bounded {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) {S : Set X} {L : ℝ} + (hu : ∀ i, ∀ᵐ x ∂μ.restrict S, localGamma μ hQ (u i) (u i) x≤4) + (hg : ∀ᵐ x ∂μ.restrict S, localGamma μ hQ g g x≤L^2) : + ∀ᵐ x ∂μ.restrict S, ‖gradientFrameCoefficients μ hQ u g x‖^2≤4*(n:ℝ)*L^2 := by + filter_upwards [gradient_frame_coefficients_norm_sq_le μ hQ u g hu,hg] with x hx hy + exact hx.trans (mul_le_mul_of_nonneg_left hy (by positivity)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientExcess.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientExcess.lean new file mode 100644 index 0000000000000000000000000000000000000000..714865580945af4a4025ce737bcb0ac3e3cc61e5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameCoefficientExcess.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Coordinates.FrameVelocityError + +namespace OAI + +/-! # The same spatial error controls the coefficient norm and scalar velocity -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +theorem frame_coefficients_error_identity {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (g : SobolevSpace μ Q) (x : X) : + ‖gradientFrameCoefficients μ Q u g x‖^2= + localGamma μ Q g g x-frameEnergyError μ Q u g x := by + rw [EuclideanSpace.real_norm_sq_eq] + change (∑ i, (localGamma μ Q (u i) g x)^2)=_ + unfold frameEnergyError + ring + +omit [ProperSpace X] in +theorem frame_coefficients_velocity_error_le {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (g : SobolevSpace μ Q) (x : X) : + ‖gradientFrameCoefficients μ Q u g x‖^2≤localGamma μ Q g g x+frameVelocityError μ Q u g x := by + have he := frame_coefficients_error_identity μ Q u g x + have hE := neg_le_abs (frameEnergyError μ Q u g x) + have hnn := mul_nonneg (gramDefect_nonneg μ Q u x) (sq_nonneg ‖gradientFrameCoefficients μ Q u g x‖) + unfold frameVelocityError + linarith only [he,hE,hnn] + +omit [ProperSpace X] in +theorem frame_coefficients_velocity_bound {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (g : SobolevSpace μ Q) {S : Set X} {L : ℝ} + (hg : ∀ᵐ x ∂μ.restrict S, localGamma μ Q g g x≤L^2) : + ∀ᵐ x ∂μ.restrict S, + ‖gradientFrameCoefficients μ Q u g x‖^2≤L^2+frameVelocityError μ Q u g x := by + filter_upwards [hg] with x hx + exact (frame_coefficients_velocity_error_le μ Q u g x).trans (add_le_add hx le_rfl) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameEnergyError.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameEnergyError.lean new file mode 100644 index 0000000000000000000000000000000000000000..c973fcf8bc195fa60ab82f5869d37efa3c52128b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameEnergyError.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicGlobalFrameDefect + +namespace OAI + +/-! # Integrable quantitative errors for a bounded-gradient probe -/ + +open Set Filter MeasureTheory Finset +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +def frameEnergyError {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (x : X) : ℝ := + localGamma μ hQ g g x-∑ i, (localGamma μ hQ (u i) g x)^2 + +omit [ProperSpace X] in +theorem frameEnergyError_aestronglyMeasurable {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) : + AEStronglyMeasurable (frameEnergyError μ hQ u g) μ := + (localGamma_memL1 μ hQ g g).aestronglyMeasurable.sub + (univ.aestronglyMeasurable_fun_sum (fun i _ => + (localGamma_memL1 μ hQ (u i) g).aestronglyMeasurable.pow 2)) + +omit [ProperSpace X] in +theorem frame_energy_error_sq_integral {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) {S : Set X} + (hfin : μ S≠⊤) {L : ℝ} + (hg : ∀ᵐ x ∂μ.restrict S, localGamma μ hQ g g x≤L^2) + (hframe : ∀ᵐ x ∂μ.restrict S, (frameEnergyError μ hQ u g x)^2≤ + frameDefectConstant n*gramDefect μ hQ u x*(localGamma μ hQ g g x)^2) : + IntegrableOn (fun x => (frameEnergyError μ hQ u g x)^2) S μ ∧ + (∫ x in S, (frameEnergyError μ hQ u g x)^2 ∂μ)≤ + frameDefectConstant n*L^4*(∫ x in S, gramDefect μ hQ u x ∂μ) := by + have hC : 0≤frameDefectConstant n := by unfold frameDefectConstant; positivity + have hbound : ∀ᵐ x ∂μ.restrict S, (frameEnergyError μ hQ u g x)^2≤ + (frameDefectConstant n*L^4)*gramDefect μ hQ u x := by + filter_upwards [hframe,hg,ae_restrict_of_ae (localGamma_self μ hQ g)] with x hx hgx he + have hgg : 0≤localGamma μ hQ g g x := by rw [he]; positivity + have hs : (localGamma μ hQ g g x)^2≤L^4 := by + have hh := pow_le_pow_left₀ hgg hgx 2 + simpa only [← pow_mul] using hh + have hh := mul_le_mul_of_nonneg_left hs (mul_nonneg hC (gramDefect_nonneg μ hQ u x)) + nlinarith only [hx,hh] + have hdom : IntegrableOn (fun x => (frameDefectConstant n*L^4)*gramDefect μ hQ u x) S μ := + (gramDefect_integrableOn μ hQ u hfin).const_mul _ + have hint : IntegrableOn (fun x => (frameEnergyError μ hQ u g x)^2) S μ := + hdom.mono' ((frameEnergyError_aestronglyMeasurable μ hQ u g).restrict.pow 2) + (hbound.mono (fun x hx => by simpa only [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (frameEnergyError μ hQ u g x))] using hx)) + refine ⟨hint,?_⟩ + have hh := integral_mono_ae hint hdom hbound + simpa only [integral_const_mul] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramePathEndpointEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/FramePathEndpointEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7a3537552453254c5b6b6ed86243632cf920750 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramePathEndpointEnergy.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Coordinates.FrameCoefficientExcess +import OAI.Geometry.RCD.Coordinates.ACCoordinateEndpointEnergy + +namespace OAI + +/-! # The scalar endpoint estimate for the actual frame coefficients -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +theorem frame_path_coefficient_norm_bound {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (g : SobolevSpace μ Q) (γ : C(Time,X)) (b : Fin n → ℝ → ℝ) {L : ℝ} + (hb : ∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => localGamma μ Q (u i) g (geodesicExtension γ t)) + (hg : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + localGamma μ Q g g (geodesicExtension γ t)≤L^2) : + ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + ‖(WithLp.toLp 2 (fun i => b i t) : Euclidean n)‖^2≤ + L^2+frameVelocityError μ Q u g (geodesicExtension γ t) := by + filter_upwards [ae_all_iff.mpr hb,hg] with t hb hg + have he : (WithLp.toLp 2 (fun i => b i t) : Euclidean n)= + gradientFrameCoefficients μ Q u g (geodesicExtension γ t) := by + apply PiLp.ext + intro i + exact hb i + rw [he] + exact (frame_coefficients_velocity_error_le μ Q u g _).trans (add_le_add hg le_rfl) + +omit [ProperSpace X] in +theorem frame_path_endpoint_energy {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (g : SobolevSpace μ Q) (γ : C(Time,X)) (b c : Fin n → ℝ → ℝ) (f : ℝ → ℝ) + {L D η : ℝ} + (hf : AbsolutelyContinuousOnInterval f 0 1) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) + (hc : ∀ i, AbsolutelyContinuousOnInterval (c i) 0 1) + (haff : ∀ i t, t∈Icc (0:ℝ) 1 → |c i t-((1-t)*c i 0+t*c i 1)|≤η) + (hD : 0≤D) + (hbrep : ∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => localGamma μ Q (u i) g (geodesicExtension γ t)) + (hg : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), + localGamma μ Q g g (geodesicExtension γ t)≤L^2) + (hEI : IntegrableOn (fun t => frameVelocityError μ Q u g (geodesicExtension γ t)) (Icc (0:ℝ) 1)) + (hd : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv f t-∑ i, b i t*deriv (c i) t)^2≤D^2*frameVelocityError μ Q u g (geodesicExtension γ t)) : + let e := ∫ t in Icc (0:ℝ) 1, frameVelocityError μ Q u g (geodesicExtension γ t) + |f 1-f 0|≤Real.sqrt (L^2+e)*‖(WithLp.toLp 2 (fun i => c i 1-c i 0) : Euclidean n)‖+ + η*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+D*Real.sqrt e := by + apply ac_coordinate_endpoint_energy hf hb hc haff hD + (fun t => frameVelocityError μ Q u g (geodesicExtension γ t)) + (fun _ => frameVelocityError_nonneg μ Q u g _) hEI + (frame_path_coefficient_norm_bound μ Q u g γ b hbrep hg) + (fun t => frameVelocityError μ Q u g (geodesicExtension γ t)) + (fun _ => frameVelocityError_nonneg μ Q u g _) hEI hd + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramePathNormalizedEndpoint.lean b/lean/OAI/Geometry/RCD/Coordinates/FramePathNormalizedEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..39408f0ffda285795734208535175a198959b5aa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramePathNormalizedEndpoint.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedFrameEndpoint + +namespace OAI + +/-! # Normalized scalar endpoints from the actual spatial frame error -/ + +open Set Filter MeasureTheory Metric Finset +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem frame_path_normalized_endpoint (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ Q) (g : SobolevSpace μ Q) + (γ : C(Time,X)) (b : Fin n → ℝ → ℝ) (v : X → Euclidean n) (φ : X → ℝ) + {r L α : ℝ} (hr : 0 φ (geodesicExtension γ t)) 0 1) + (hb : ∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) + (hc : ∀ i, AbsolutelyContinuousOnInterval (fun t => v (geodesicExtension γ t) i) 0 1) + (haff : ∀ i (t : Time), |(v (γ t) i-((1-(t:ℝ))*v (γ 0) i+(t:ℝ)*v (γ 1) i))/r|≤α) + (hbe : ∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => localGamma μ Q (u i) g (geodesicExtension γ t)) + (hg : ∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), localGamma μ Q g g (geodesicExtension γ t)≤L^2) + (hEI : IntegrableOn (fun t => frameVelocityError μ Q u g (geodesicExtension γ t)) (Icc (0:ℝ) 1)) + (hd : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv (fun s => φ (geodesicExtension γ s)) t- + ∑ i, localGamma μ Q (u i) g (geodesicExtension γ t)* + deriv (fun s => v (geodesicExtension γ s) i) t)^2≤ + (dist (γ 0) (γ 1))^2*frameVelocityError μ Q u g (geodesicExtension γ t)) : + let e := ∫ t in Icc (0:ℝ) 1, frameVelocityError μ Q u g (geodesicExtension γ t) + |φ (γ 1)-φ (γ 0)|/r≤Real.sqrt (L^2+e)*(dist (v (γ 0)) (v (γ 1))/r)+ + α*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+Real.sqrt e := by + have he0 : geodesicExtension γ 0=γ 0 := geodesicExtension_eq γ (0:Time) + have he1 : geodesicExtension γ 1=γ 1 := geodesicExtension_eq γ (1:Time) + have hnorm := frame_path_coefficient_norm_bound μ Q u g γ b hbe hg + have hd' : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv (fun s => φ (geodesicExtension γ s)) t- + ∑ i, b i t*deriv (fun s => v (geodesicExtension γ s) i) t)^2≤ + (dist (γ 0) (γ 1))^2*frameVelocityError μ Q u g (geodesicExtension γ t) := by + have he := (ae_restrict_iff' measurableSet_Icc).mp (ae_all_iff.mpr hbe) + filter_upwards [hd,he] with t ht he htI + simpa only [fun i => he (Ioo_subset_Icc_self htI) i] using ht htI + have haff' (i : Fin n) (t : ℝ) (ht : t∈Icc (0:ℝ) 1) : + |(v (geodesicExtension γ t) i-((1-t)*v (geodesicExtension γ 0) i+ + t*v (geodesicExtension γ 1) i))/r|≤α := by + have het : geodesicExtension γ t=γ (⟨t,ht⟩ : Time) := geodesicExtension_eq γ ⟨t,ht⟩ + simpa only [het,he0,he1] using haff i ⟨t,ht⟩ + have hh := normalized_frame_endpoint hr dist_nonneg hspeed hf hb hc haff' + (fun t => frameVelocityError μ Q u g (geodesicExtension γ t)) + (fun _ => frameVelocityError_nonneg μ Q u g _) hEI hnorm hd' + have hn : ‖(WithLp.toLp 2 (fun i => (v (γ 1) i-v (γ 0) i)/r) : Euclidean n)‖= + dist (v (γ 0)) (v (γ 1))/r := by + have hvect : (WithLp.toLp 2 (fun i => (v (γ 1) i-v (γ 0) i)/r) : Euclidean n)= + r⁻¹ • (v (γ 1)-v (γ 0)) := by + apply PiLp.ext + intro i + simp only [PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul,div_eq_inv_mul] + rw [hvect,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hr),dist_eq_norm_sub'] + ring + simpa only [he0,he1,hn] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameResidualDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameResidualDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..a477e22e62acbb9159b53b030996654ee728912b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameResidualDefect.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Coordinates.FrameEnergyError +import OAI.Geometry.RCD.Harmonic.GramQuadraticDefect + +namespace OAI + +/-! # Exact residual energy and its quantitative Gram-error bound -/ + +open Set Filter MeasureTheory Finset +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem frame_residual_energy_expansion {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (a : Euclidean n) : + ∀ᵐ x ∂μ, localGamma μ hQ (g-sobolevColumnMap μ hQ u a) (g-sobolevColumnMap μ hQ u a) x= + ‖gradientFrameCoefficients μ hQ u g x-a‖^2+frameEnergyError μ hQ u g x+ + (localGamma μ hQ (sobolevColumnMap μ hQ u a) (sobolevColumnMap μ hQ u a) x-‖a‖^2) := by + let v := sobolevColumnMap μ hQ u a + have hcomm : ∀ᵐ x ∂μ, ∀ i, localGamma μ hQ (u i) g x=localGamma μ hQ g (u i) x := + ae_all_iff.mpr fun i => localGamma_comm μ hQ (u i) g + filter_upwards [hcomm,localGamma_sub_left μ hQ g v (g-v), + localGamma_comm μ hQ g (g-v),localGamma_sub_left μ hQ g v g, + localGamma_comm μ hQ v (g-v),localGamma_sub_left μ hQ g v v, + localGamma_comm μ hQ v g,localGamma_column_right μ hQ g u a] + with x hc hs h₁ h₂ h₃ h₄ h₅ hcol + have hE : localGamma μ hQ g g x=frameEnergyError μ hQ u g x+ + ‖gradientFrameCoefficients μ hQ u g x‖^2 := by + rw [frameEnergyError,EuclideanSpace.real_norm_sq_eq] + dsimp only [gradientFrameCoefficients] + ring + have hinner : (∑ i, a i*localGamma μ hQ g (u i) x)= + ⟪gradientFrameCoefficients μ hQ u g x,a⟫_ℝ := by + simp only [gradientFrameCoefficients,PiLp.inner_apply,RCLike.inner_apply,conj_trivial] + exact sum_congr rfl (fun i _ => by rw [hc i]) + change localGamma μ hQ (g-v) (g-v) x=_ + rw [hs,h₁,h₂,h₃,h₄,h₅,hcol,hE,hinner,norm_sub_sq_real] + ring + +theorem frame_residual_energy_le {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (a : Euclidean n) : + ∀ᵐ x ∂μ, localGamma μ hQ (g-sobolevColumnMap μ hQ u a) (g-sobolevColumnMap μ hQ u a) x≤ + ‖gradientFrameCoefficients μ hQ u g x-a‖^2+|frameEnergyError μ hQ u g x|+ + gramDefect μ hQ u x*‖a‖^2 := by + filter_upwards [frame_residual_energy_expansion μ hQ u g a, + localGamma_column_defect μ hQ u a] with x hx hcol + rw [hx] + have hh := (abs_le.mp hcol).2 + linarith [le_abs_self (frameEnergyError μ hQ u g x)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameResidualEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameResidualEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..f50aff33cc64d725537325fd56cfc2b22fb85af9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameResidualEnergy.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Sobolev.GammaColumnMixed +import OAI.Geometry.RCD.Sobolev.OrthonormalHarmonicLipschitz + +namespace OAI + +/-! # The exact energy of a residual in an orthonormal gradient frame -/ + +open Set Filter MeasureTheory Finset +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +def gradientFrameCoefficients {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (x : X) : Euclidean n := + WithLp.toLp 2 (fun i => localGamma μ hQ (u i) g x) + +theorem frame_residual_energy {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (S : Set X) + (hgram : ∀ i j, localGamma μ hQ (u i) (u j) =ᵐ[μ.restrict S] + fun _ => if i=j then 1 else 0) + (hframe : localGamma μ hQ g g =ᵐ[μ.restrict S] + fun x => ∑ i, (localGamma μ hQ (u i) g x)^2) (a : Euclidean n) : + localGamma μ hQ (g-sobolevColumnMap μ hQ u a) (g-sobolevColumnMap μ hQ u a) + =ᵐ[μ.restrict S] fun x => ‖gradientFrameCoefficients μ hQ u g x-a‖^2 := by + let v := sobolevColumnMap μ hQ u a + have hcomm : ∀ᵐ x ∂μ.restrict S, ∀ i, localGamma μ hQ (u i) g x=localGamma μ hQ g (u i) x := + ae_all_iff.mpr fun i => ae_restrict_of_ae (localGamma_comm μ hQ (u i) g) + filter_upwards [hframe,hcomm, + ae_restrict_of_ae (localGamma_sub_left μ hQ g v (g-v)), + ae_restrict_of_ae (localGamma_comm μ hQ g (g-v)), + ae_restrict_of_ae (localGamma_sub_left μ hQ g v g), + ae_restrict_of_ae (localGamma_comm μ hQ v (g-v)), + ae_restrict_of_ae (localGamma_sub_left μ hQ g v v), + ae_restrict_of_ae (localGamma_comm μ hQ v g), + ae_restrict_of_ae (localGamma_column_right μ hQ g u a), + localGamma_column_orthonormal μ hQ u S hgram a] with x hf hc hs h₁ h₂ h₃ h₄ h₅ hcol hv + have hnorm : localGamma μ hQ g g x=‖gradientFrameCoefficients μ hQ u g x‖^2 := by + rw [hf,EuclideanSpace.real_norm_sq_eq] + rfl + have hinner : (∑ i, a i*localGamma μ hQ g (u i) x)= + ⟪gradientFrameCoefficients μ hQ u g x,a⟫_ℝ := by + simp only [gradientFrameCoefficients,PiLp.inner_apply,RCLike.inner_apply,conj_trivial] + apply sum_congr rfl + intro i _ + rw [hc i] + change localGamma μ hQ (g-v) (g-v) x=_ + rw [hs,h₁,h₂,h₃,h₄,h₅,hcol,hv,hnorm,hinner,norm_sub_sq_real] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameTestPlanVelocityDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameTestPlanVelocityDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4d06d022c022ca03577655ebc55288a42ccea89 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameTestPlanVelocityDefect.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Coordinates.CoordinatePathVelocity +import OAI.Geometry.RCD.Harmonic.AffinePathDerivative +import OAI.Geometry.RCD.Transport.TestPlanLocalProperty + +namespace OAI + +/-! # Scalar velocities with the actual finite frame errors -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped ENNReal InnerProductSpace Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem frame_testPlan_velocity_defect (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ Q) (g : SobolevSpace μ Q) + (v : X → Euclidean n) (φ : X → ℝ) (hv : Continuous v) (hφ : Continuous φ) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ] fun x => v x i) + (hg : SobolevSpace.toLp μ Q g =ᵐ[μ] φ) + (π : Measure C(Time,X)) [IsFiniteMeasure π] + (hgeo : ∀ᵐ γ ∂π, IsGeodesic γ) {C : ℝ≥0∞} (hC : C≠∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π) : + ∀ᵐ γ ∂π, ∀ᵐ s : ℝ, s∈Ioo (0:ℝ) 1 → + DifferentiableAt ℝ (fun r => φ (geodesicExtension γ r)) s ∧ + (deriv (fun r => φ (geodesicExtension γ r)) s- + ⟪gradientFrameCoefficients μ Q u g (geodesicExtension γ s), + coordinateDerivative (fun r => v (geodesicExtension γ r)) s⟫_ℝ)^2≤ + (dist (γ 0) (γ 1))^2*(|frameEnergyError μ Q u g (geodesicExtension γ s)|+ + gramDefect μ Q u (geodesicExtension γ s)* + ‖gradientFrameCoefficients μ Q u g (geodesicExtension γ s)‖^2) := by + let b : ℕ → Euclidean n := denseSeq (Euclidean n) + let f (k : ℕ) := g-sobolevColumnMap μ Q u (b k) + let ψ (k : ℕ) (x : X) := φ x-⟪v x,b k⟫_ℝ + have hψ (k : ℕ) : Continuous (ψ k) := hφ.sub (hv.inner continuous_const) + have hf (k : ℕ) : SobolevSpace.toLp μ Q (f k) =ᵐ[μ] ψ k := by + have hcol := sobolevColumnMap_representative μ Q u univ v + (fun i => by simpa only [Measure.restrict_univ] using hu i) (b k) + rw [Measure.restrict_univ] at hcol + change SobolevSpace.toLpCLM μ Q (g-sobolevColumnMap μ Q u (b k)) =ᵐ[μ] _ + rw [map_sub] + filter_upwards [hg,hcol,Lp.coeFn_sub (SobolevSpace.toLp μ Q g) + (SobolevSpace.toLp μ Q (sobolevColumnMap μ Q u (b k)))] with x hx hy hz + exact hz.trans (congrArg₂ (·-·) hx hy) + have hres (k : ℕ) := (SobolevSpace.minimalSlope_isRelaxed μ Q (f k)).testPlan_ae_derivative + μ π hgeo hC hcomp hD (hψ k) (hf k) + have henergy (k : ℕ) : ∀ᵐ γ ∂π, ∀ᵐ s : ℝ, s∈Icc (0:ℝ) 1 → + (SobolevSpace.minimalSlope μ Q (f k) (geodesicExtension γ s))^2≤ + ‖gradientFrameCoefficients μ Q u g (geodesicExtension γ s)-b k‖^2+ + |frameEnergyError μ Q u g (geodesicExtension γ s)|+ + gramDefect μ Q u (geodesicExtension γ s)*‖b k‖^2 := by + have he : ∀ᵐ x ∂μ, (SobolevSpace.minimalSlope μ Q (f k) x)^2≤ + ‖gradientFrameCoefficients μ Q u g x-b k‖^2+|frameEnergyError μ Q u g x|+ + gramDefect μ Q u x*‖b k‖^2 := by + filter_upwards [frame_residual_energy_le μ Q u g (b k),localGamma_self μ Q (f k)] with x hx hy + exact hy.symm.trans_le hx + have ht := testPlan_eval_property_on μ π hcomp MeasurableSet.univ + (Eventually.of_forall (fun _ _ => mem_univ _)) + (show ∀ᵐ x ∂μ.restrict univ, _ from by simpa only [Measure.restrict_univ] using he) + filter_upwards [ht] with γ hγ + exact (ae_restrict_iff' measurableSet_Icc).mp hγ + have hcoordinate (i : Fin n) := + (SobolevSpace.minimalSlope_isRelaxed μ Q (u i)).testPlan_ae_derivative μ π hgeo hC hcomp hD + ((EuclideanSpace.proj i).continuous.comp hv) (hu i) + have hd := (SobolevSpace.minimalSlope_isRelaxed μ Q g).testPlan_ae_derivative + μ π hgeo hC hcomp hD hφ hg + filter_upwards [hd,ae_all_iff.mpr hres,ae_all_iff.mpr henergy,ae_all_iff.mpr hcoordinate] + with γ hd hr he hco + have hr' : ∀ᵐ s : ℝ, ∀ k, s∈Ioo (0:ℝ) 1 → + DifferentiableAt ℝ (fun r => ψ k (geodesicExtension γ r)) s ∧ + |deriv (fun r => ψ k (geodesicExtension γ r)) s|≤ + dist (γ 0) (γ 1)*SobolevSpace.minimalSlope μ Q (f k) (geodesicExtension γ s) := + ae_all_iff.mpr hr + filter_upwards [hd,hr',ae_all_iff.mpr he,ae_all_iff.mpr hco] with s hds hrs hes hcos hs + have hdiff := (hds hs).1 + refine ⟨hdiff,?_⟩ + apply velocity_defect_of_dense_residual_bounds + (gradientFrameCoefficients μ Q u g (geodesicExtension γ s)) + (coordinateDerivative (fun r => v (geodesicExtension γ r)) s) _ (dist (γ 0) (γ 1)) + |frameEnergyError μ Q u g (geodesicExtension γ s)| + (gramDefect μ Q u (geodesicExtension γ s)) (denseRange_denseSeq (Euclidean n)) + rintro _ ⟨k,rfl⟩ + have hi := coordinate_inner_hasDerivAt (fun r => v (geodesicExtension γ r)) + (fun i => (hcos i hs).1) (b k) + have hsub : HasDerivAt (fun r => ψ k (geodesicExtension γ r)) + (deriv (fun r => φ (geodesicExtension γ r)) s- + ⟪b k,coordinateDerivative (fun r => v (geodesicExtension γ r)) s⟫_ℝ) s := by + simpa only [ψ,real_inner_comm] using! hdiff.hasDerivAt.sub hi + have hb := (hrs k hs).2 + rw [hsub.deriv] at hb + have hsq := mul_self_le_mul_self (abs_nonneg _) hb + rw [← sq,← sq,mul_pow,sq_abs] at hsq + exact hsq.trans (mul_le_mul_of_nonneg_left (hes k (Ioo_subset_Icc_self hs)) (sq_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..b597dab3def1ad7a956cba9827e5ebe780dc5ff7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityDefect.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.RCD.Coordinates.FrameResidualDefect + +namespace OAI + +/-! # Quantitative scalar velocity recovery from dense residual tests -/ + +open Set +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem velocity_defect_of_dense_residual_bounds {n : ℕ} + (a v : Euclidean n) (w D E G : ℝ) {S : Set (Euclidean n)} (hS : Dense S) + (h : ∀ b∈S, (w-⟪b,v⟫_ℝ)^2≤D^2*(‖a-b‖^2+E+G*‖b‖^2)) : + (w-⟪a,v⟫_ℝ)^2≤D^2*(E+G*‖a‖^2) := by + have hc : IsClosed {b : Euclidean n | + (w-⟪b,v⟫_ℝ)^2≤D^2*(‖a-b‖^2+E+G*‖b‖^2)} := + isClosed_le (by fun_prop) (by fun_prop) + have hall := closure_minimal h hc + rw [hS.closure_eq] at hall + have ha := hall (mem_univ a) + change (w-⟪a,v⟫_ℝ)^2≤D^2*(‖a-a‖^2+E+G*‖a‖^2) at ha + simpa only [sub_self,norm_zero,zero_pow (by norm_num : (2:ℕ)≠0),zero_add] using ha + +theorem scalar_velocity_abs_error {n : ℕ} (a v : Euclidean n) (w D E G : ℝ) + (hD : 0≤D) (hE : 0≤E) (hG : 0≤G) + (h : (w-⟪a,v⟫_ℝ)^2≤D^2*(E+G*‖a‖^2)) : + |w-⟪a,v⟫_ℝ|≤D*Real.sqrt (E+G*‖a‖^2) := by + have hp : 0≤E+G*‖a‖^2 := add_nonneg hE (mul_nonneg hG (sq_nonneg _)) + apply (sq_le_sq₀ (abs_nonneg _) (mul_nonneg hD (Real.sqrt_nonneg _))).mp + simpa only [sq_abs,mul_pow,Real.sq_sqrt hp] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityError.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityError.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbb96ba91bf012219974a600b2021b9a27946ca1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityError.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.FrameCoefficientBound + +namespace OAI + +/-! # An integrable spatial density controlling the scalar velocity error -/ + +open Set Filter MeasureTheory Finset +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +def frameVelocityError {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (x : X) : ℝ := + |frameEnergyError μ hQ u g x|+gramDefect μ hQ u x*‖gradientFrameCoefficients μ hQ u g x‖^2 + +omit [ProperSpace X] in +theorem frameVelocityError_nonneg {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (g : SobolevSpace μ hQ) (x : X) : 0≤frameVelocityError μ hQ u g x := + add_nonneg (abs_nonneg _) (mul_nonneg (gramDefect_nonneg μ hQ u x) (sq_nonneg _)) + +theorem frame_velocity_error_integral {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) {S : Set X} + (hfin : μ S≠⊤) {L : ℝ} + (hu : ∀ i, ∀ᵐ x ∂μ.restrict S, localGamma μ hQ (u i) (u i) x≤4) + (hg : ∀ᵐ x ∂μ.restrict S, localGamma μ hQ g g x≤L^2) + (hE : IntegrableOn (fun x => |frameEnergyError μ hQ u g x|) S μ) : + IntegrableOn (frameVelocityError μ hQ u g) S μ ∧ + (∫ x in S, frameVelocityError μ hQ u g x ∂μ)≤ + (∫ x in S, |frameEnergyError μ hQ u g x| ∂μ)+ + 4*(n:ℝ)*L^2*(∫ x in S, gramDefect μ hQ u x ∂μ) := by + have hD := gramDefect_integrableOn μ hQ u hfin + have hnm : AEStronglyMeasurable (fun x => ‖gradientFrameCoefficients μ hQ u g x‖^2) (μ.restrict S) := by + have he : (fun x => ‖gradientFrameCoefficients μ hQ u g x‖^2)= + fun x => ∑ i, (localGamma μ hQ (u i) g x)^2 := by + funext x + rw [EuclideanSpace.real_norm_sq_eq] + rfl + rw [he] + exact univ.aestronglyMeasurable_fun_sum (fun i _ => + (localGamma_memL1 μ hQ (u i) g).aestronglyMeasurable.restrict.pow 2) + have hbound : ∀ᵐ x ∂μ.restrict S, + gramDefect μ hQ u x*‖gradientFrameCoefficients μ hQ u g x‖^2≤ + (4*(n:ℝ)*L^2)*gramDefect μ hQ u x := by + filter_upwards [gradient_frame_coefficients_bounded μ hQ u g hu hg] with x hx + nlinarith [mul_le_mul_of_nonneg_left hx (gramDefect_nonneg μ hQ u x)] + have hdom := hD.const_mul (4*(n:ℝ)*L^2) + have hp : IntegrableOn (fun x => gramDefect μ hQ u x* + ‖gradientFrameCoefficients μ hQ u g x‖^2) S μ := by + apply hdom.mono' (hD.aestronglyMeasurable.mul hnm) + filter_upwards [hbound] with x hx + change |gramDefect μ hQ u x*‖gradientFrameCoefficients μ hQ u g x‖^2|≤_ + rw [abs_of_nonneg (mul_nonneg (gramDefect_nonneg μ hQ u x) + (sq_nonneg ‖gradientFrameCoefficients μ hQ u g x‖))] + exact hx + refine ⟨hE.add hp,?_⟩ + change (∫ x in S, |frameEnergyError μ hQ u g x|+ + gramDefect μ hQ u x*‖gradientFrameCoefficients μ hQ u g x‖^2 ∂μ)≤_ + rw [integral_add hE hp] + have hh := integral_mono_ae hp hdom hbound + rw [integral_const_mul] at hh + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..4dca25b9996d4a0d1f988470a562f5f5f5e4ba6b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLimit.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.FrameVelocityError +import OAI.Geometry.RCD.Coordinates.NormalizedL2ProductError + +namespace OAI + +/-! # Vanishing normalized velocity errors from the original spatial estimates -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem frame_velocity_error_tendsto {n : ℕ} + (u : ℕ → Fin n → SobolevSpace μ hQ) (g : ℕ → SobolevSpace μ hQ) + (S : ℕ → Set X) (hfin : ∀ k, μ (S k)≠⊤) (hpos : ∀ k, 0<μ.real (S k)) {L : ℝ} + (hu : ∀ k i, ∀ᵐ x ∂μ.restrict (S k), localGamma μ hQ (u k i) (u k i) x≤4) + (hg : ∀ k, ∀ᵐ x ∂μ.restrict (S k), localGamma μ hQ (g k) (g k) x≤L^2) + (hEsq : ∀ k, IntegrableOn (fun x => (frameEnergyError μ hQ (u k) (g k) x)^2) (S k) μ) + (hE0 : Tendsto (fun k => (μ.real (S k))⁻¹* + ∫ x in S k, (frameEnergyError μ hQ (u k) (g k) x)^2 ∂μ) atTop (𝓝 0)) + (hD0 : Tendsto (fun k => (μ.real (S k))⁻¹* + ∫ x in S k, gramDefect μ hQ (u k) x ∂μ) atTop (𝓝 0)) : + (∀ k, IntegrableOn (frameVelocityError μ hQ (u k) (g k)) (S k) μ) ∧ + Tendsto (fun k => (μ.real (S k))⁻¹* + ∫ x in S k, frameVelocityError μ hQ (u k) (g k) x ∂μ) atTop (𝓝 0) := by + let ν (k : ℕ) := μ.restrict (S k) + let : ∀ k, IsFiniteMeasure (ν k) := fun k => + ⟨by simpa only [ν,Measure.restrict_apply_univ] using lt_top_iff_ne_top.mpr (hfin k)⟩ + have hm (k : ℕ) : 0<(ν k).real univ := by + simpa only [ν,Measure.real,Measure.restrict_apply_univ] using hpos k + have hmem (k : ℕ) : MemLp (fun x => |frameEnergyError μ hQ (u k) (g k) x|) 2 (ν k) := by + have hm : AEStronglyMeasurable (frameEnergyError μ hQ (u k) (g k)) (ν k) := + (frameEnergyError_aestronglyMeasurable μ hQ (u k) (g k)).restrict + have habs : AEStronglyMeasurable (fun x => |frameEnergyError μ hQ (u k) (g k) x|) (ν k) := by + simpa only [Real.norm_eq_abs] using hm.norm + apply (memLp_two_iff_integrable_sq habs).mpr + simpa only [sq_abs,ν,IntegrableOn] using hEsq k + have hEabs0 : Tendsto (fun k => (μ.real (S k))⁻¹* + ∫ x in S k, |frameEnergyError μ hQ (u k) (g k) x| ∂μ) atTop (𝓝 0) := by + have hh := normalized_l2_product_error_tendsto ν hm + (fun k x => |frameEnergyError μ hQ (u k) (g k) x|) (fun _ _ => 1) + hmem (fun _ => aestronglyMeasurable_const) (C := 1) + (Eventually.of_forall (fun _ => Eventually.of_forall (fun _ => by norm_num))) + (by simpa only [ν,Measure.real,Measure.restrict_apply_univ,sq_abs] using hE0) + simpa only [ν,Measure.real,Measure.restrict_apply_univ,mul_one] using hh + have hdata (k : ℕ) := frame_velocity_error_integral μ hQ (u k) (g k) (hfin k) (hu k) (hg k) + ((hmem k).integrable (by norm_num)) + refine ⟨fun k => (hdata k).1,?_⟩ + have hup (k : ℕ) : (μ.real (S k))⁻¹*(∫ x in S k, frameVelocityError μ hQ (u k) (g k) x ∂μ)≤ + (μ.real (S k))⁻¹*(∫ x in S k, |frameEnergyError μ hQ (u k) (g k) x| ∂μ)+ + (4*(n:ℝ)*L^2)*((μ.real (S k))⁻¹*∫ x in S k, gramDefect μ hQ (u k) x ∂μ) := by + have hh := mul_le_mul_of_nonneg_left (hdata k).2 (inv_nonneg.mpr (hpos k).le) + convert hh using 1 + ring + apply squeeze_zero (fun k => mul_nonneg (inv_nonneg.mpr (hpos k).le) + (integral_nonneg (frameVelocityError_nonneg μ hQ (u k) (g k)))) hup + simpa only [mul_zero,add_zero] using hEabs0.add (hD0.const_mul (4*(n:ℝ)*L^2)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLocality.lean b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLocality.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c177b60071f1956a59e4103f3faf236672eaba1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrameVelocityErrorLocality.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Coordinates.FrameVelocityError + +namespace OAI + +/-! # Locality of the spatial frame velocity error -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem frameVelocityError_congr_ae {n : ℕ} (u : Fin n → SobolevSpace μ Q) + {g w : SobolevSpace μ Q} {S : Set X} + (hgw : SobolevSpace.toLp μ Q g =ᵐ[μ.restrict S] SobolevSpace.toLp μ Q w) : + frameVelocityError μ Q u g =ᵐ[μ.restrict S] frameVelocityError μ Q u w := by + have hm (i : Fin n) := localGamma_pair_congr_ae μ Q + (show SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict S] SobolevSpace.toLp μ Q (u i) + from Eventually.of_forall (fun _ => rfl)) hgw + filter_upwards [localGamma_pair_congr_ae μ Q hgw hgw,ae_all_iff.mpr hm] with x hgg hm + have hv : gradientFrameCoefficients μ Q u g x=gradientFrameCoefficients μ Q u w x := by + exact congrArg (WithLp.toLp 2) (funext hm) + unfold frameVelocityError frameEnergyError + rw [hgg,hv] + have hs : (∑ i, (localGamma μ Q (u i) g x)^2)=∑ i, (localGamma μ Q (u i) w x)^2 := + Finset.sum_congr rfl (fun i _ => congrArg (fun z : ℝ => z^2) (hm i)) + rw [hs] + +theorem frameVelocityError_frame_congr_ae {n : ℕ} {u U : Fin n → SobolevSpace μ Q} + (g : SobolevSpace μ Q) {S : Set X} + (hu : ∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ.restrict S] SobolevSpace.toLp μ Q (u i)) : + frameVelocityError μ Q U g =ᵐ[μ.restrict S] frameVelocityError μ Q u g := by + have hm (i : Fin n) := localGamma_pair_congr_ae μ Q (hu i) + (show SobolevSpace.toLp μ Q g =ᵐ[μ.restrict S] SobolevSpace.toLp μ Q g + from Eventually.of_forall (fun _ => rfl)) + have hG (i j : Fin n) := localGamma_pair_congr_ae μ Q (hu i) (hu j) + filter_upwards [ae_all_iff.mpr hm,ae_all_iff.mpr (fun i => ae_all_iff.mpr (hG i))] + with x hm hG + have hv : gradientFrameCoefficients μ Q U g x=gradientFrameCoefficients μ Q u g x := + congrArg (WithLp.toLp 2) (funext hm) + have he : frameEnergyError μ Q U g x=frameEnergyError μ Q u g x := by + unfold frameEnergyError + rw [Finset.sum_congr rfl (fun i _ => congrArg (fun z : ℝ => z^2) (hm i))] + have hd : gramDefect μ Q U x=gramDefect μ Q u x := by + unfold gramDefect + exact Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => by rw [hG i j])) + unfold frameVelocityError + rw [hv,he,hd] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedAffineProjection.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedAffineProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..467d673dc20fe7485829482948953d0e8bb4cbd1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedAffineProjection.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicAffineNondegeneracy +import OAI.Geometry.RCD.Harmonic.AffineCenterBounds + +namespace OAI + +/-! # Bounded coefficients and the actual harmonic projection residual -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Projection coefficients are bounded in the exact normalization frame; +no bound for the original coordinate change or its inverse is lost. -/ +theorem framed_affine_projection_coefficients {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (N : Euclidean n ≃L[ℝ] Euclidean n) {H : ℝ} (hH : 0 ≤ H) + (hbound : ∀ c a, |c| + ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ s hfin (affineCoordinateMap μ hQ u s hfin (c, a))‖) + (f : Lp ℝ 2 (μ.restrict s)) : + ∃ (c : ℝ) (b : Euclidean n), + affineProjection μ hQ u s hfin f = affineCoordinateMap μ hQ u s hfin (c, N b) ∧ + |c| + ‖b‖ ≤ H * ‖normalizeLocalL2 μ s hfin f‖ := by + obtain ⟨c, a, hfit⟩ := affineProjection_has_coefficients μ hQ u s hfin f + change affineProjection μ hQ u s hfin f = affineCoordinateMap μ hQ u s hfin (c, a) at hfit + refine ⟨c, N.symm a, by simpa only [N.apply_symm_apply] using hfit, ?_⟩ + have hb := hbound c a + rw [← hfit] at hb + exact hb.trans (mul_le_mul_of_nonneg_left + (normalized_affineProjection_norm_le μ hQ u s hfin f) hH) + +variable [BorelSpace X] [ProperSpace X] + +/-- The least-squares residual is an actual harmonic Sobolev function on +the larger working set and equals the orthogonal residual on its inner +projection set. Its coefficients satisfy the exact-frame value bound. -/ +theorem framed_harmonic_projection_residual {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s Ω : Set X) (hfin : μ s ≠ ∞) + (hsΩ : s ⊆ Ω) (hΩ : MeasurableSet Ω) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j)) + (v η : SobolevSpace μ hQ) (hv : IsSobolevHarmonicOn μ hQ Ω v) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (N : Euclidean n ≃L[ℝ] Euclidean n) {H : ℝ} (hH : 0 ≤ H) + (hbound : ∀ c a, |c| + ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ s hfin (affineCoordinateMap μ hQ u s hfin (c, a))‖) : + ∃ (c : ℝ) (b : Euclidean n) (w : SobolevSpace μ hQ), + w = v - (c • η + sobolevColumnMap μ hQ u (N b)) ∧ + IsSobolevHarmonicOn μ hQ Ω w ∧ + SobolevSpace.restrictLp μ hQ s w = affineResidual μ hQ u s hfin + (SobolevSpace.restrictLp μ hQ s v) ∧ + |c| + ‖b‖ ≤ H * ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s v)‖ := by + obtain ⟨c, b, hfit, hb⟩ := framed_affine_projection_coefficients μ hQ u s hfin N hH hbound + (SobolevSpace.restrictLp μ hQ s v) + let w := v - (c • η + sobolevColumnMap μ hQ u (N b)) + have hηharm := isSobolevHarmonicOn_of_local_constant μ hQ Ω hΩ η 1 hη + have hwharm : IsSobolevHarmonicOn μ hQ Ω w := by + have haff := (hηharm.smul μ hQ c).add μ hQ + (IsSobolevHarmonicOn.linearCombination μ hQ hu (N b)) + intro φ hφ + change energyForm μ hQ (v - (c • η + sobolevColumnMap μ hQ u (N b))) φ = 0 + rw [energyForm_sub_left, hv φ hφ, haff φ hφ, sub_self] + refine ⟨c, b, w, rfl, hwharm, ?_, hb⟩ + have hηs := ae_restrict_of_ae_restrict_of_subset hsΩ hη + change SobolevSpace.restrictLp μ hQ s w = + SobolevSpace.restrictLp μ hQ s v - affineProjection μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s v) + rw [hfit, affineCoordinateMap_apply] + dsimp only [w] + rw [map_sub, map_add, map_smul, restrictLp_eq_one_of_representative μ hQ η s hfin hηs] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedDyadicFit.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedDyadicFit.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ac4d50967c4a30590f9abf40a530910c9ad1674 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedDyadicFit.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.ActualDyadicFitUnits + +namespace OAI + +/-! # The actual dyadic fit recurrence in the original coordinate frame -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The affine residual is the original one at both scales; the source +uses only the covector norm in the current exact normalizing frame. -/ +theorem actual_framed_dyadic_radial_fit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (F : Euclidean n ≃L[ℝ] Euclidean n) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (transformedColumn (hausdorff n X) hX.quadratic u F j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic u F j) + (transformedColumn (hausdorff n X) hX.quadratic u F j) x ≤ (1 + epsilon) ^ 2) + {L : ℝ} + (hbase : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) + (m : ℕ) + (hfit : HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ m)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ distanceSourceRadius r0 i → + |(hausdorff n X).real (ball p t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) : + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left + (by have := distanceSourceRadius_pos S.radius_pos i; dsimp only [r, s]; positivity : 0 ≤ r) + (pow_le_one₀ (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) ≤ 1))) + let Λ := Real.sqrt ((5 / 3 : ℝ) * (θ ^ n)⁻¹) + let D := (4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n + let coefficient := (64 / θ) * (Λ + (1 / 2 : ℝ) * θ * Real.sqrt θ) * + Real.sqrt ((n : ℝ) * radialCorrectionConstant K n epsilon A B J Cχ * D) + ∀ b : Euclidean n, + let ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) L hbase b + let hat := ae_restrict_of_ae_restrict_of_subset hsub ha + radialFitError μ hX.quadratic u p (θ * r) ht (T.distanceDatum μ hX.quadratic (i + m)) + (sobolevColumnMap μ hX.quadratic u b) hat ≤ + (1 / 2 : ℝ) * Real.sqrt θ * radialFitError μ hX.quadratic u p r hs + (T.distanceDatum μ hX.quadratic i) (sobolevColumnMap μ hX.quadratic u b) ha + + coefficient * Real.sqrt (normalizedPoissonDefect μ hX.quadratic S i) * ‖F.symm b‖ := by + dsimp only + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let θ := (1 / 2 : ℝ) ^ m + let uF := transformedColumn μ hX.quadratic u F + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hθ1 : θ ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hsub : ball p (θ * r) ⊆ ball p r := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + have hinner : ball p r ⊆ ball p (s / 4) := ball_subset_ball (by dsimp only [r]; linarith) + have hfitF := hfit.transformed hX F + have hstep := actual_dyadic_radial_fit_natural_units hX hn hhessian hκ hK hB hJ hA hepsilon hCχ + p S T i hs1 uF hu hgrad hf χ hvol hdouble m hfitF hquarter + dsimp only at hstep + intro b + have ha := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) L hbase b + have haF := gamma_column_le_of_diagonal_bounds μ hX.quadratic uF (ball p r) (1 + epsilon) + (fun j => ae_restrict_of_ae_restrict_of_subset hinner (hgrad j)) (F.symm b) + have hat := ae_restrict_of_ae_restrict_of_subset hsub ha + have hatF := ae_restrict_of_ae_restrict_of_subset hsub haF + have he := hstep (F.symm b) + have houter := radialFitError_frame μ hX.quadratic u p r + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (T.distanceDatum μ hX.quadratic i) F b haF ha + have hnext := radialFitError_frame μ hX.quadratic u p (θ * r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (T.distanceDatum μ hX.quadratic (i + m)) F b hatF hat + rw [houter, hnext] at he + exact he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedPointValues.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedPointValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..329f1d3e6c4695591e7316952582504eeb023440 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedPointValues.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Coordinates.CenteredSplitting +import OAI.Geometry.RCD.Sobolev.CenteredAffineSobolev + +namespace OAI + +/-! # Compatibility of centered point values with the normalizing frame -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Continuous representatives of the same Sobolev columns have the exact +covector transformation law, including at the center of an open ball. -/ +theorem framed_covector_point_values [μ.IsOpenPosMeasure] {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (s : Set X) (hs : IsOpen s) (V W : X → Euclidean n) + (hV : ContinuousOn V s) (hW : ContinuousOn W s) + (hu : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict s] fun x => V x j) + (hNu : ∀ j, SobolevSpace.toLp μ hQ (transformedColumn μ hQ u N j) =ᵐ[ + μ.restrict s] fun x => W x j) (b : Euclidean n) : + EqOn (fun x => ⟪W x, N.symm b⟫_ℝ) (fun x => ⟪V x, b⟫_ℝ) s := by + have hw := sobolevColumnMap_representative μ hQ (transformedColumn μ hQ u N) + s W hNu (N.symm b) + simp only [sobolevColumnMap_transformed, ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] at hw + have hv := sobolevColumnMap_representative μ hQ u s V hu b + exact Measure.eqOn_open_of_ae_eq (hw.symm.trans hv) hs + (hW.inner continuousOn_const) (hV.inner continuousOn_const) + +/-- Centering before applying the inverse covector frame gives the same +actual Sobolev function as centering the original coordinate covector. -/ +theorem centered_frame_covector_eq {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (η : SobolevSpace μ hQ) (c cN b : Euclidean n) + (hc : ⟪cN, N.symm b⟫_ℝ = ⟪c, b⟫_ℝ) : + sobolevColumnMap μ hQ (centeredColumn μ hQ (transformedColumn μ hQ u N) cN η) + (N.symm b) = centeredAffineSobolev μ hQ u η c b := by + rw [centeredColumn, sobolevColumnMap_affineChanged] + simp only [add_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.id_apply, ContinuousLinearMap.smulRight_apply, + neg_apply, innerSL_apply_apply, sobolevColumnMap_transformed, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply, hc, + centeredAffineSobolev] + exact add_comm _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedRadialCandidate.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialCandidate.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d2bb4593ff02db538c34899e334c8cd827d7f5b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialCandidate.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Coordinates.FramedPointValues +import OAI.Geometry.RCD.Coordinates.CovectorRadialSmallness + +namespace OAI + +/-! # The actual centered coordinate candidate for the radial fit -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] [μ.IsOpenPosMeasure] + (hQ : QuadraticCheegerEnergy μ) + +/-- The qualitative radial estimate controls the specific original +centered coordinate candidate, rather than just the best-fit infimum. -/ +theorem DyadicDistanceReplacements.framed_radial_candidate + {n : ℕ} {κ r0 B J C ε Cχ : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (V W : X → Euclidean n) + (hV : ContinuousOn V (ball p (4 * (distanceSourceRadius r0 i / 64)))) + (hu : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[ + μ.restrict (ball p (4 * (distanceSourceRadius r0 i / 64)))] fun x => V x j) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * (distanceSourceRadius r0 i / 64)) ε + (transformedColumn μ hQ u N) W) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 ε + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (W x - W p))) + (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[ + μ.restrict (ball p (4 * (distanceSourceRadius r0 i / 64)))] fun _ => (1 : ℝ)) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < μ.real (ball p (4 * (distanceSourceRadius r0 i / 64)))) + (b : Euclidean n) : + let r := distanceSourceRadius r0 i / 64 + (∫ x in ball p r, + (localGamma μ hQ (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (centeredAffineSobolev μ hQ u η (V p) b) x) ^ 2 ∂μ) ≤ + (n : ℝ) * ((1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1)) * ε * r ^ 2 * + μ.real (ball p (4 * r))) * ‖N.symm b‖ ^ 2 := by + dsimp only + let r := distanceSourceRadius r0 i / 64 + have hr : 0 < r := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + let uN := transformedColumn μ hQ u N + let uC := centeredColumn μ hQ uN (W p) η + have hcenter := framed_covector_point_values μ hQ u N (ball p (4 * r)) isOpen_ball + V W hV hfirst.continuous hu hfirst.representative b (mem_ball_self (by positivity)) + have hcolumn := centered_frame_covector_eq μ hQ u N η (V p) (W p) b hcenter + have hcentered := hfirst.center μ hQ (W p) η hη + have herr := T.local_covector_radial_error μ hQ i hε hε1 hCχ uC + (fun x => W x - W p) hcentered (sub_self _) hmetric χ hvol (N.symm b) + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have hconst := centeredColumn_covector_difference μ hQ uN (ball p r) + (W p) (N.symm b) η (ae_restrict_of_ae_restrict_of_subset hsub hη) + have hg := localGamma_eq_of_constant_difference μ hQ (ball p r) + (sobolevColumnMap μ hQ uC (N.symm b)) (sobolevColumnMap μ hQ uN (N.symm b)) + (T.distanceDatum μ hQ i) (-⟪W p, N.symm b⟫_ℝ) hconst + have huN : sobolevColumnMap μ hQ uN (N.symm b) = sobolevColumnMap μ hQ u b := by + simp only [uN, sobolevColumnMap_transformed, ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] + rw [huN] at hg + have heq : (∫ x in ball p r, + (localGamma μ hQ (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (centeredAffineSobolev μ hQ u η (V p) b) x) ^ 2 ∂μ) = + ∫ x in ball p r, + (localGamma μ hQ (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ uC (N.symm b)) x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ uC (N.symm b)) x) ^ 2 ∂μ := by + apply integral_congr_ae + filter_upwards [hg, + ae_restrict_of_ae (localGamma_comm μ hQ (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ u b)), + ae_restrict_of_ae (localGamma_comm μ hQ (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ uC (N.symm b)))] with x hx h₁ h₂ + rw [h₂, hx, ← h₁, show sobolevColumnMap μ hQ uC (N.symm b) = + centeredAffineSobolev μ hQ u η (V p) b from hcolumn] + rw [heq] + exact herr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedRadialEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b4c36fa1813ebfa4bbb5eae44c8833e22e4a72f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialEnergy.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Sobolev.ActualRadialEnergy + +namespace OAI + +/-! # Interior radial energy in the same normalizing covector frame -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem LocalHessianPairing.cast_right_mixed (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {s : Set X} {f a a' : SobolevSpace μ hQ} (ha : a = a') + (G : LocalHessianPairing μ hQ s f a) : + (ha ▸ G : LocalHessianPairing μ hQ s f a').mixed = G.mixed := by + cases ha + rfl + +/-- Applying the energy estimate in a normalized coordinate frame keeps +its source term in the inverse-frame norm of the original covector. The +radial function and the fitted affine function remain the original ones. -/ +theorem framed_radial_fit_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianInput hX) (hgradient : LocalHarmonicL2GradientInput hX) + (hn : 2 ≤ n) {κ₀ : ℝ} (hκ₀ : 0 ≤ κ₀) : + ∃ Cg : ℝ, 1 ≤ Cg ∧ ∀ {κ r0 B J C A ε Cχ Lbase : ℝ}, + 0 ≤ κ → -κ ≤ K → 0 ≤ B → 0 ≤ J → 0 ≤ A → 0 ≤ ε → 0 ≤ Cχ → + ∀ (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ), + distanceSourceRadius r0 i ≤ 1 → -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n), + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (transformedColumn (hausdorff n X) hX.quadratic u N j)) → + ∀ _hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (transformedColumn (hausdorff n X) hX.quadratic u N j) (transformedColumn (hausdorff n X) hX.quadratic u N j) x ≤ (1 + ε) ^ 2, + (∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) → + ∀ _χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ, + 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) → + 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64))) → + ∀ hbase : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ Lbase ^ 2, + ∀ b : Euclidean n, + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let hcoord := gamma_column_le_of_diagonal_bounds μ hX.quadratic u (ball p r) Lbase hbase b + ∃ G : LocalHessianPairing μ hX.quadratic (ball p r) (T.replacement i) + (sobolevColumnMap μ hX.quadratic u b), + ∀ (F : SobolevSpace μ hX.quadratic) {I : ℝ}, + IsSobolevHarmonicOn μ hX.quadratic (ball p r) F → + ‖radialPairingLp μ hX.quadratic (ball p r) (T.distanceDatum μ hX.quadratic i) + (sobolevColumnMap μ hX.quadratic u b) hcoord - SobolevSpace.restrictLp μ hX.quadratic (ball p r) F‖ ^ 2 ≤ I → + (∫ x in ball p (r / 2), localGamma μ hX.quadratic (G.mixed - F) (G.mixed - F) x ∂μ) ≤ + radialEnergyConstant K n Cg ε A B J Cχ * + (I / r ^ 2 + (s ^ (n : ℝ) * normalizedPoissonDefect μ hX.quadratic S i) * ‖N.symm b‖ ^ 2) := by + obtain ⟨Cg, hCg, he⟩ := actual_radial_fit_energy hX hhessian hgradient hn hκ₀ + refine ⟨Cg, hCg, ?_⟩ + intro κ r0 B J C A ε Cχ Lbase hκ hK hB hJ hA hε hCχ p S T i hs1 hcurv u N hu hgrad hf χ hvol hdouble hbase b + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + have hh := he hκ hK hB hJ hA hε hCχ p S T i hs1 hcurv + (transformedColumn μ hQ u N) hu hgrad hf χ hvol hdouble (N.symm b) + dsimp only at hh + have hc : sobolevColumnMap μ hQ (transformedColumn μ hQ u N) (N.symm b) = + sobolevColumnMap μ hQ u b := by + rw [sobolevColumnMap_transformed] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply] + obtain ⟨G, hG⟩ := hh + let G' : LocalHessianPairing μ hQ (ball p (distanceSourceRadius r0 i / 64)) + (T.replacement i) (sobolevColumnMap μ hQ u b) := hc ▸ G + refine ⟨G', ?_⟩ + intro H I hH hfit + have hsub : ball p (distanceSourceRadius r0 i / 64) ⊆ + ball p (distanceSourceRadius r0 i / 4) := by + apply ball_subset_ball + have hs := distanceSourceRadius_pos S.radius_pos i + linarith + have haN := gamma_column_le_of_diagonal_bounds μ hQ (transformedColumn μ hQ u N) + (ball p (distanceSourceRadius r0 i / 64)) (1 + ε) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hgrad j)) (N.symm b) + have haO := gamma_column_le_of_diagonal_bounds μ hQ u + (ball p (distanceSourceRadius r0 i / 64)) Lbase hbase b + have hraw := radialPairingLp_frame μ hQ u (ball p (distanceSourceRadius r0 i / 64)) + (T.distanceDatum μ hQ i) N b haN haO + have hb := hG H hH (by rw [hraw]; exact hfit) + have hmix : G'.mixed = G.mixed := LocalHessianPairing.cast_right_mixed μ hQ hc G + rw [hmix] + exact hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedRadialSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8e587b5904fbf78c279ba3904de9db9e0725054 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialSmallness.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.CenteredSplitting +import OAI.Geometry.RCD.Coordinates.CovectorRadialSmallness + +namespace OAI + +/-! # Qualitative radial error in the original coordinate frame -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- Normalizing and centering are used only to estimate the error. The +result is the actual affine-fit error for the original map and covector. -/ +theorem DyadicDistanceReplacements.framed_covector_fit_smallness + {n : ℕ} {κ r0 B J C : ℝ} {p : X} {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + {ε Cχ : ℝ} (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) + (u : Fin n → SobolevSpace μ hQ) (A : Euclidean n ≃L[ℝ] Euclidean n) + (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * (distanceSourceRadius r0 i / 64)) ε + (transformedColumn μ hQ u A) v) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 ε + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v x - v p))) + (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict (ball p (4 * (distanceSourceRadius r0 i / 64)))] + fun _ => (1 : ℝ)) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < μ.real (ball p (4 * (distanceSourceRadius r0 i / 64)))) + (b : Euclidean n) {L : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ L) : + let r := distanceSourceRadius r0 i / 64 + let hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + (radialFitError μ hQ u p r hfin (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) ha) ^ 2 ≤ + ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * ε * + (μ.real (ball p (4 * r)) / μ.real (ball p r)) * ‖A.symm b‖ ^ 2 := by + dsimp only + let r := distanceSourceRadius r0 i / 64 + let uA := transformedColumn μ hQ u A + let uC := centeredColumn μ hQ uA (v p) η + have hr : 0 < r := by + have := distanceSourceRadius_pos S.radius_pos i + dsimp only [r] + positivity + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have hηr := ae_restrict_of_ae_restrict_of_subset hsub hη + have hcenter := hfirst.center μ hQ (v p) η hη + have hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + have haA := gamma_column_le_of_diagonal_bounds μ hQ uA (ball p r) (1 + ε) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hfirst.gradient j)) (A.symm b) + have haC := gamma_column_le_of_diagonal_bounds μ hQ uC (ball p r) (1 + ε) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hcenter.gradient j)) (A.symm b) + have hsmall := T.local_covector_fit_smallness μ hQ i hε hε1 hCχ uC + (fun x => v x - v p) hcenter (by simp only [sub_self]) hmetric χ hvol (A.symm b) + dsimp only at hsmall + have hc := centeredColumn_radial_fit μ hQ uA p r hfin (v p) (A.symm b) + η (T.distanceDatum μ hQ i) hηr haC haA + have hf := radialFitError_frame μ hQ u p r hfin (T.distanceDatum μ hQ i) A b haA ha + rw [hc, hf] at hsmall + exact hsmall + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FramedRadialValue.lean b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialValue.lean new file mode 100644 index 0000000000000000000000000000000000000000..79fc088a95c3b59435ff59865ee6ee47e41555d3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FramedRadialValue.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.FramedRadialEnergy + +namespace OAI + +/-! # The Poisson radial value estimate in its normalizing frame -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +omit [IsFiniteMeasureOnCompacts μ] in +/-- The original coordinate covector has the gradient bound supplied by +its inverse normalizing frame. -/ +theorem framed_directional_gradient {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (s : Set X) (L : ℝ) + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict s, + localGamma μ hQ (transformedColumn μ hQ u N j) + (transformedColumn μ hQ u N j) x ≤ L ^ 2) (b : Euclidean n) : + ∀ᵐ x ∂μ.restrict s, + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ + ((n : ℝ) * L) ^ 2 * ‖N.symm b‖ ^ 2 := by + have h := gamma_column_le_of_diagonal_bounds μ hQ (transformedColumn μ hQ u N) + s L hgrad (N.symm b) + simpa only [sobolevColumnMap_transformed, ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] using h + +/-- Transfer any actual distance fit to the same Poisson pairing. The +only new term is the already constructed Poisson energy error. -/ +theorem DyadicDistanceReplacements.framed_value_transfer + {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + {L : ℝ} + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma μ hQ (transformedColumn μ hQ u N j) + (transformedColumn μ hQ u N j) x ≤ L ^ 2) + (b : Euclidean n) + (G : LocalHessianPairing μ hQ (ball p (distanceSourceRadius r0 i / 64)) + (T.replacement i) (sobolevColumnMap μ hQ u b)) + (H : SobolevSpace μ hQ) {I Lbase : ℝ} + (hbase : ∀ j, ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma μ hQ (u j) (u j) x ≤ Lbase ^ 2) + (hfit : ‖radialPairingLp μ hQ (ball p (distanceSourceRadius r0 i / 64)) + (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) + (gamma_column_le_of_diagonal_bounds μ hQ u _ Lbase hbase b) - + SobolevSpace.restrictLp μ hQ (ball p (distanceSourceRadius r0 i / 64)) H‖ ^ 2 ≤ I) : + ‖SobolevSpace.restrictLp μ hQ (ball p (distanceSourceRadius r0 i / 64)) (G.mixed - H)‖ ^ 2 ≤ + 2 * I + 2 * (((n : ℝ) * L) ^ 2 * ‖N.symm b‖ ^ 2) * + ((S.source i).real (ball p (distanceSourceRadius r0 i)) * + (B * (distanceSourceRadius r0 i) ^ 2)) := by + have ha := framed_directional_gradient μ hQ u N _ L hgrad b + apply G.fit_value_transfer μ hQ (T.distanceDatum μ hQ i) H + (mul_nonneg (sq_nonneg _) (sq_nonneg _)) ha (T.local_energy_error μ hQ i _) + have he := radialPairingLp_congr μ hQ _ (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ u b) (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) + ha (gamma_column_le_of_diagonal_bounds μ hQ u _ Lbase hbase b) + (Filter.EventuallyEq.rfl) + rw [he] + exact hfit + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrozenCutoffDerivatives.lean b/lean/OAI/Geometry/RCD/Coordinates/FrozenCutoffDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..b051d7f1b1a9e124500b384c654f085b22e27deb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrozenCutoffDerivatives.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.FrozenJetTransport +import OAI.Geometry.RCD.Coordinates.NormalizedUpdate +import OAI.Geometry.RCD.Coordinates.DifferentialStep + +namespace OAI + +/-! # Directional cutoff bounds from its actual normalized jets -/ + +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Undo the frozen affine source in any derivative order. -/ +theorem frozen_cutoff_directional_bound (T : E ≃L[ℝ] E) (phi : E → ℝ) + (x v : E) {r W : ℝ} (hr : 0 < r) (m : ℕ) (hphi : ContDiffAt ℝ m phi x) + (hjet : ‖iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0‖ ≤ W) : + r ^ m * ‖iteratedFDeriv ℝ m phi x (fun _ => v)‖ ≤ W * ‖T v‖ ^ m := by + let L : E →L[ℝ] E := r • T.symm.toContinuousLinearMap + have hf : ContDiffAt ℝ m phi (x + L 0) := by simpa using hphi + have hc := iteratedFDeriv_comp_affine_apply L phi x 0 m hf (fun _ => T v) + have harg : (fun _ : Fin m => L (T v)) = fun _ => r • v := by + funext j + simp [L] + rw [harg, (iteratedFDeriv ℝ m phi (x + L 0)).map_smul_univ] at hc + simp only [map_zero, add_zero] at hc + change iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0 (fun _ => T v) = _ at hc + have hn := (iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0).le_opNorm + (fun _ => T v) + calc + _ = ‖iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0 (fun _ => T v)‖ := by + rw [hc] + simp only [Finset.prod_const, Finset.card_univ, Fintype.card_fin, norm_smul, + Real.norm_eq_abs, abs_of_nonneg (pow_nonneg hr.le _)] + _ ≤ ‖iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0‖ * ‖T v‖ ^ m := by + simpa using hn + _ ≤ W * ‖T v‖ ^ m := mul_le_mul_of_nonneg_right hjet (by positivity) + +/-- The first two orders of one Gevrey estimate supply exactly the +directional hypotheses used by the finite patch-field calculus. -/ +theorem frozen_cutoff_first_second (T : E ≃L[ℝ] E) (phi : E → ℝ) + (x v : E) {r L : ℝ} (hr : 0 < r) (hL : 0 ≤ L) (hphi : ContDiffAt ℝ 2 phi x) + (hjet : ∀ m : ℕ, ‖iteratedFDeriv ℝ m (fun z => phi (frozenSource r T x z)) 0‖ ≤ + L ^ (m + 1) * (m.factorial : ℝ) ^ 2) : + |fderiv ℝ phi x v| ≤ (L ^ 2 + 4 * L ^ 3) / r * ‖T v‖ ∧ + |diagonalSecond phi x v| ≤ (L ^ 2 + 4 * L ^ 3) / r ^ 2 * ‖T v‖ ^ 2 := by + have h1 := frozen_cutoff_directional_bound T phi x v hr 1 + (hphi.of_le (by norm_num)) (hjet 1) + have h2 := frozen_cutoff_directional_bound T phi x v hr 2 hphi (hjet 2) + simp only [iteratedFDeriv_one_apply, Real.norm_eq_abs, pow_one, Nat.factorial_one, + Nat.cast_one, one_pow, mul_one] at h1 + norm_num only [Nat.add_one_sub_one, Nat.reduceAdd] at h1 + rw [← diagonalSecond_eq hphi] at h2 + norm_num only [Nat.factorial_two, Nat.cast_ofNat, Real.norm_eq_abs] at h2 + constructor + · rw [div_mul_eq_mul_div] + apply (le_div_iff₀ hr).2 + linarith only [h1, show 0 ≤ 4 * L ^ 3 * ‖T v‖ by positivity] + · rw [div_mul_eq_mul_div] + apply (le_div_iff₀ (sq_pos_of_pos hr)).2 + linarith only [h2, show 0 ≤ L ^ 2 * ‖T v‖ ^ 2 by positivity] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrozenInverseCosts.lean b/lean/OAI/Geometry/RCD/Coordinates/FrozenInverseCosts.lean new file mode 100644 index 0000000000000000000000000000000000000000..02323e0db34c8a8cc8ac16760e66a5fe11811714 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrozenInverseCosts.lean @@ -0,0 +1,165 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedUpdate +import OAI.Geometry.RCD.Coordinates.DifferentialStep + +namespace OAI + +/-! +# Inverse-derivative costs in frozen coordinates + +The covariance identity is used only near the testing point, where the +Jacobian is represented by continuous linear equivalences. Differentiating +this local identity transports the normalized inverse costs with exactly +one factor of `r⁻¹` per source derivative. +-/ + +open Filter +open scoped Topology InnerProductSpace ContDiff + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +omit [CompleteSpace E] in +/-- Evaluation on a fixed vector commutes with each finite-order derivative. -/ +theorem iteratedFDeriv_clm_apply_fixed {K : E → E →L[ℝ] E} {x : E} {m : ℕ} + (hK : ContDiffAt ℝ m K x) (w : E) (xi : Fin m → E) : + iteratedFDeriv ℝ m (fun y => K y w) x xi = iteratedFDeriv ℝ m K x xi w := by + have h := (ContinuousLinearMap.apply ℝ E w).iteratedFDeriv_comp_left hK le_rfl + exact congrArg (fun f => f xi) h + +/-- Transport of operator jets through a local frozen covariance identity. -/ +theorem frozen_operator_jet_transport (T : E ≃L[ℝ] E) (x xi w : E) (r : ℝ) + {Ko Kn : E → E →L[ℝ] E} {m : ℕ} + (hKo : ContDiffAt ℝ m Ko x) (hKn : ContDiffAt ℝ m Kn 0) + (hcov : (fun z => Kn z ((T.symm : E →L[ℝ] E).adjoint w)) =ᶠ[𝓝 0] + (fun z => Ko (frozenSource r T x z) w)) : + iteratedFDeriv ℝ m Kn 0 (fun _ => T xi) ((T.symm : E →L[ℝ] E).adjoint w) = + r ^ m • iteratedFDeriv ℝ m Ko x (fun _ => xi) w := by + let L : E →L[ℝ] E := r • (T.symm : E →L[ℝ] E) + have hvalue : ContDiffAt ℝ m (fun y => Ko y w) x := hKo.clm_apply contDiffAt_const + have hvalue' : ContDiffAt ℝ m (fun y => Ko y w) (x + L 0) := by simpa using hvalue + have hjet := congrArg (fun f => f (fun _ => T xi)) ((hcov.iteratedFDeriv ℝ m).eq_of_nhds) + calc + _ = iteratedFDeriv ℝ m (fun z => Kn z ((T.symm : E →L[ℝ] E).adjoint w)) + 0 (fun _ => T xi) := (iteratedFDeriv_clm_apply_fixed hKn _ _).symm + _ = iteratedFDeriv ℝ m (fun z => Ko (frozenSource r T x z) w) 0 (fun _ => T xi) := hjet + _ = iteratedFDeriv ℝ m (fun y => Ko y w) x (fun _ => r • xi) := by + have h := iteratedFDeriv_comp_affine_apply L (fun y => Ko y w) x 0 m hvalue' + (fun _ => T xi) + simpa [frozenSource, L] using h + _ = r ^ m • iteratedFDeriv ℝ m (fun y => Ko y w) x (fun _ => xi) := by + rw [(iteratedFDeriv ℝ m (fun y => Ko y w) x).map_smul_univ] + simp + _ = _ := by rw [iteratedFDeriv_clm_apply_fixed hKo] + +/-- The inverse covariance holds in a neighborhood, so it may be +differentiated without assuming invertibility away from that neighborhood. -/ +theorem inverseTranspose_normalized_eventually {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (x : E) (h : E → E) (e : E → E ≃L[ℝ] E) + (hh : ContDiffAt ℝ 3 h x) + (hlocal : ∀ᶠ y in 𝓝 x, fderiv ℝ h y = (e y : E →L[ℝ] E)) (w : E) : + (fun z => operatorInverseTranspose (fderiv ℝ (normalizedCoordinates r T x h) z) + ((T.symm : E →L[ℝ] E).adjoint w)) =ᶠ[𝓝 0] + (fun z => operatorInverseTranspose (fderiv ℝ h (frozenSource r T x z)) w) := by + have hsource : Continuous (frozenSource r T x) := by + unfold frozenSource + fun_prop + have htend : Tendsto (frozenSource r T x) (𝓝 0) (𝓝 x) := by + simpa [frozenSource] using hsource.tendsto (0 : E) + have hreg : ∀ᶠ y in 𝓝 x, ContDiffAt ℝ 3 h y := hh.eventually (by norm_num) + filter_upwards [htend.eventually hlocal, htend.eventually hreg] with z hz hhz + have hj : fderiv ℝ (normalizedCoordinates r T x h) z = + (T.symm.trans (e (frozenSource r T x z)) : E →L[ℝ] E) := by + rw [fderiv_normalizedCoordinates hr T x z h (hhz.differentiableAt (by norm_num)), hz] + rfl + rw [hj, hz, operatorInverseTranspose_equiv, operatorInverseTranspose_equiv] + exact inverseTranspose_normalized_apply T (e (frozenSource r T x z)) w + +/-- The lower metric estimate and normalized source jets imply the first +two original-space inverse costs, with the same constant at every point +and scale. All invertibility data outside the center are local. -/ +theorem exists_frozen_inverse_derivative_cost {A : ℝ} (hA : 1 ≤ A) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ (B r : ℝ), 0 < B → 0 < r → ∀ (T : E ≃L[ℝ] E) (x : E) + (h : E → E) (e : E → E ≃L[ℝ] E), + ContDiffAt ℝ 3 h x → + (∀ᶠ y in 𝓝 x, fderiv ℝ h y = (e y : E →L[ℝ] E)) → + (∀ xi, A⁻¹ * ‖T xi‖ ^ 2 ≤ ‖fderiv ℝ h x xi‖ ^ 2) → + (∀ m, 2 ≤ m → m ≤ 3 → + ‖iteratedFDeriv ℝ m (normalizedCoordinates r T x h) 0‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) → + let K := fun y => operatorInverseTranspose (fderiv ℝ h y) + ∀ xi w : E, + ‖fderiv ℝ K x xi w‖ ≤ + 8 * C * B / r * ‖T xi‖ * ‖(T.symm : E →L[ℝ] E).adjoint w‖ ∧ + ‖diagonalSecond K x xi w‖ ≤ + 216 * C * B ^ 2 / r ^ 2 * ‖T xi‖ ^ 2 * ‖(T.symm : E →L[ℝ] E).adjoint w‖ := by + obtain ⟨C, hC0, hC1, hcost⟩ := exists_inverseTranspose_low_order_cost (E := E) hA + refine ⟨C, hC0, hC1, ?_⟩ + intro B r hB hr T x h e hh hlocal hlower hjets + let g := normalizedCoordinates r T x h + let Ko := fun y => operatorInverseTranspose (fderiv ℝ h y) + let Kn := fun z => operatorInverseTranspose (fderiv ℝ g z) + have he : fderiv ℝ h x = (e x : E →L[ℝ] E) := Filter.EventuallyEq.eq_of_nhds hlocal + have hunit : IsUnit (fderiv ℝ h x) := by rw [he]; exact (e x).toUnit.isUnit + have hsource : ContDiffAt ℝ 3 (frozenSource r T x) 0 := by + unfold frozenSource + fun_prop + have hg : ContDiffAt ℝ 3 g 0 := by + have hh' : ContDiffAt ℝ 3 h (frozenSource r T x 0) := by simpa [frozenSource] using hh + exact ((hh'.comp 0 hsource).sub contDiffAt_const).const_smul r⁻¹ + have hgJ : fderiv ℝ g 0 = (T.symm.trans (e x) : E →L[ℝ] E) := by + change fderiv ℝ (normalizedCoordinates r T x h) 0 = _ + rw [fderiv_normalizedCoordinates hr.ne' T x 0 h] + · simp only [frozenSource, map_zero, smul_zero, add_zero, he] + rfl + · simpa [frozenSource] using hh.differentiableAt (by norm_num) + have hgunit : IsUnit (fderiv ℝ g 0) := by rw [hgJ]; exact (T.symm.trans (e x)).toUnit.isUnit + have hginv : ‖Ring.inverse (fderiv ℝ g 0)‖ ≤ Real.sqrt A := by + have heLower : ∀ xi, A⁻¹ * ‖T xi‖ ^ 2 ≤ ‖e x xi‖ ^ 2 := by + simpa only [he, ContinuousLinearEquiv.coe_coe] using hlower + have heInv : Ring.inverse (fderiv ℝ g 0) = + (T : E →L[ℝ] E) ∘L ((e x).symm : E →L[ℝ] E) := by + rw [hgJ] + change Ring.inverse ((T.symm.trans (e x)).toUnit : E →L[ℝ] E) = _ + rw [Ring.inverse_unit] + rfl + rw [heInv] + exact norm_frozen_comp_inverse_le T (e x) hA heLower + have hKo : ContDiffAt ℝ 2 Ko x := + contDiffAt_inverseTranspose_field (hh.fderiv_right (m := 2) (by norm_num)) hunit + have hKn : ContDiffAt ℝ 2 Kn 0 := + contDiffAt_inverseTranspose_field (hg.fderiv_right (m := 2) (by norm_num)) hgunit + have hbounds := (hcost B hB g 0 hg hgunit hginv hjets).2 + dsimp only + intro xi w + have hcov := inverseTranspose_normalized_eventually hr.ne' T x h e hh hlocal w + have ht1 := frozen_operator_jet_transport T x xi w r + (hKo.of_le (by norm_num : (1 : ℕ∞ω) ≤ 2)) (hKn.of_le (by norm_num : (1 : ℕ∞ω) ≤ 2)) hcov + have ht2 := frozen_operator_jet_transport T x xi w r hKo hKn hcov + simp only [iteratedFDeriv_one_apply, pow_one] at ht1 + change fderiv ℝ Kn 0 (T xi) ((T.symm : E →L[ℝ] E).adjoint w) = + r • fderiv ℝ Ko x xi w at ht1 + rw [← diagonalSecond_eq hKn, ← diagonalSecond_eq hKo] at ht2 + obtain ⟨hb1, hb2⟩ := hbounds (T xi) ((T.symm : E →L[ℝ] E).adjoint w) + change ‖fderiv ℝ Kn 0 (T xi) ((T.symm : E →L[ℝ] E).adjoint w)‖ ≤ _ at hb1 + change ‖diagonalSecond Kn 0 (T xi) ((T.symm : E →L[ℝ] E).adjoint w)‖ ≤ _ at hb2 + rw [ht1, norm_smul, Real.norm_eq_abs, abs_of_pos hr] at hb1 + rw [ht2, norm_smul, Real.norm_eq_abs, abs_of_nonneg (sq_nonneg r)] at hb2 + constructor + · calc + _ ≤ (8 * C * B * ‖T xi‖ * ‖(T.symm : E →L[ℝ] E).adjoint w‖) / r := + (le_div_iff₀ hr).2 (by nlinarith [hb1]) + _ = _ := by ring + · calc + _ ≤ (216 * C * B ^ 2 * ‖T xi‖ ^ 2 * ‖(T.symm : E →L[ℝ] E).adjoint w‖) / r ^ 2 := + (le_div_iff₀ (sq_pos_of_pos hr)).2 (by nlinarith [hb2]) + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrozenJetTransport.lean b/lean/OAI/Geometry/RCD/Coordinates/FrozenJetTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..1faaca3490d835cd6dde2c4de545a033a930623d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrozenJetTransport.lean @@ -0,0 +1,190 @@ +import Mathlib.Analysis.Calculus.ContDiff.Bounds +import Mathlib.Analysis.Calculus.ContDiff.Operations + +namespace OAI + +/-! +# Finite-order transport of jets through frozen affine coordinates + +The input linear map and every output normalization are fixed at the +testing point. Positive-order jets ignore output translations. The +dyadic result therefore applies in every order used by the iteration +without assuming any next-stage jet bound. +-/ + +open Filter Set +open scoped Topology BigOperators + +noncomputable section + +namespace RegularPointCoordinates + +variable {E F G H : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + [NormedAddCommGroup H] [NormedSpace ℝ H] + +/-- Local finite differentiability suffices for exact linear input transport. -/ +theorem iteratedFDeriv_comp_clm_at (L : G →L[ℝ] E) (f : E → F) (z : G) (m : ℕ) + (hf : ContDiffAt ℝ m f (L z)) : + iteratedFDeriv ℝ m (f ∘ L) z = + (iteratedFDeriv ℝ m f (L z)).compContinuousLinearMap (fun _ => L) := by + obtain ⟨u, hu, hfu⟩ := hf.contDiffOn le_rfl (by simp) + obtain ⟨s, hsu, hs, hx⟩ := mem_nhds_iff.mp hu + have hsmooth := hfu.mono hsu + have hpre := hs.preimage L.continuous + have h := L.iteratedFDerivWithin_comp_right hsmooth hs.uniqueDiffOn + hpre.uniqueDiffOn hx le_rfl + rw [iteratedFDerivWithin_of_isOpen m hpre hx, + iteratedFDerivWithin_of_isOpen m hs hx] at h + exact h + +/-- Exact affine input transport in every derivative order, including zero. -/ +theorem iteratedFDeriv_comp_affine_at (L : G →L[ℝ] E) (f : E → F) + (x : E) (z : G) (m : ℕ) (hf : ContDiffAt ℝ m f (x + L z)) : + iteratedFDeriv ℝ m (fun y => f (x + L y)) z = + (iteratedFDeriv ℝ m f (x + L z)).compContinuousLinearMap (fun _ => L) := by + have hshift : ContDiffAt ℝ m (fun y => f (x + y)) (L z) := + hf.comp (L z) (contDiffAt_const.add contDiffAt_id) + have h := iteratedFDeriv_comp_clm_at L (fun y => f (x + y)) z m hshift + rw [iteratedFDeriv_comp_add_left] at h + exact h + +theorem iteratedFDeriv_comp_affine_apply (L : G →L[ℝ] E) (f : E → F) + (x : E) (z : G) (m : ℕ) (hf : ContDiffAt ℝ m f (x + L z)) (xi : Fin m → G) : + iteratedFDeriv ℝ m (fun y => f (x + L y)) z xi = + iteratedFDeriv ℝ m f (x + L z) (fun i => L (xi i)) := by + rw [iteratedFDeriv_comp_affine_at L f x z m hf] + rfl + +/-- The norm cost of affine input transport is exactly the product of +the input operator norms, with no extra combinatorial coefficient. -/ +theorem norm_iteratedFDeriv_comp_affine_le (L : G →L[ℝ] E) (f : E → F) + (x : E) (z : G) (m : ℕ) (hf : ContDiffAt ℝ m f (x + L z)) : + ‖iteratedFDeriv ℝ m (fun y => f (x + L y)) z‖ ≤ + ‖iteratedFDeriv ℝ m f (x + L z)‖ * ‖L‖ ^ m := by + rw [iteratedFDeriv_comp_affine_at L f x z m hf] + simpa using (iteratedFDeriv ℝ m f (x + L z)).norm_compContinuousLinearMap_le + (fun _ : Fin m => L) + +/-- A fixed linear output map and a translation have the expected +positive-order derivative. -/ +theorem iteratedFDeriv_affine_input_output (L : G →L[ℝ] E) (A : F →L[ℝ] H) + (f : E → F) (x : E) (z : G) (b : H) {m : ℕ} (hm : 0 < m) + (hf : ContDiffAt ℝ m f (x + L z)) : + iteratedFDeriv ℝ m (fun y => A (f (x + L y)) + b) z = + A.compContinuousMultilinearMap + ((iteratedFDeriv ℝ m f (x + L z)).compContinuousLinearMap (fun _ => L)) := by + have hcomp : ContDiffAt ℝ m (fun y => f (x + L y)) z := + hf.comp z (contDiffAt_const.add L.contDiff.contDiffAt) + have hout : ContDiffAt ℝ m (fun y => A (f (x + L y))) z := + A.contDiff.contDiffAt.comp z hcomp + change iteratedFDeriv ℝ m ((fun y => A (f (x + L y))) + fun _ => b) z = _ + rw [iteratedFDeriv_add_apply hout contDiffAt_const] + simp only [iteratedFDeriv_const_of_ne (Nat.ne_of_gt hm), Pi.zero_apply, add_zero] + rw [show (fun y => A (f (x + L y))) = A ∘ (fun y => f (x + L y)) from rfl, + A.iteratedFDeriv_comp_left hcomp le_rfl, + iteratedFDeriv_comp_affine_at L f x z m hf] + +theorem norm_iteratedFDeriv_affine_input_output_le + (L : G →L[ℝ] E) (A : F →L[ℝ] H) (f : E → F) (x : E) (z : G) (b : H) + {m : ℕ} (hm : 0 < m) (hf : ContDiffAt ℝ m f (x + L z)) : + ‖iteratedFDeriv ℝ m (fun y => A (f (x + L y)) + b) z‖ ≤ + ‖A‖ * ‖iteratedFDeriv ℝ m f (x + L z)‖ * ‖L‖ ^ m := by + rw [iteratedFDeriv_affine_input_output L A f x z b hm hf] + calc + _ ≤ ‖A‖ * ‖(iteratedFDeriv ℝ m f (x + L z)).compContinuousLinearMap (fun _ => L)‖ := + A.norm_compContinuousMultilinearMap_le _ + _ ≤ ‖A‖ * (‖iteratedFDeriv ℝ m f (x + L z)‖ * ‖L‖ ^ m) := by + apply mul_le_mul_of_nonneg_left _ (norm_nonneg A) + simpa using (iteratedFDeriv ℝ m f (x + L z)).norm_compContinuousLinearMap_le + (fun _ : Fin m => L) + _ = _ := by ring + +/-- Scalar output scaling, with arbitrary output translation. -/ +theorem iteratedFDeriv_scaled_affine (L : G →L[ℝ] E) (f : E → F) + (x : E) (z : G) (a : ℝ) (b : F) {m : ℕ} (hm : 0 < m) + (hf : ContDiffAt ℝ m f (x + L z)) : + iteratedFDeriv ℝ m (fun y => a • f (x + L y) + b) z = + a • (iteratedFDeriv ℝ m f (x + L z)).compContinuousLinearMap (fun _ => L) := by + have hcomp : ContDiffAt ℝ m (fun y => f (x + L y)) z := + hf.comp z (contDiffAt_const.add L.contDiff.contDiffAt) + change iteratedFDeriv ℝ m ((fun y => a • f (x + L y)) + fun _ => b) z = _ + rw [iteratedFDeriv_add_apply (hcomp.const_smul a) contDiffAt_const] + simp only [iteratedFDeriv_const_of_ne (Nat.ne_of_gt hm), Pi.zero_apply, add_zero] + rw [iteratedFDeriv_const_smul_apply' hcomp, + iteratedFDeriv_comp_affine_at L f x z m hf] + +theorem norm_iteratedFDeriv_scaled_affine_le (L : G →L[ℝ] E) (f : E → F) + (x : E) (z : G) (a : ℝ) (b : F) {m : ℕ} (hm : 0 < m) + (hf : ContDiffAt ℝ m f (x + L z)) : + ‖iteratedFDeriv ℝ m (fun y => a • f (x + L y) + b) z‖ ≤ + |a| * ‖iteratedFDeriv ℝ m f (x + L z)‖ * ‖L‖ ^ m := by + rw [iteratedFDeriv_scaled_affine L f x z a b hm hf, norm_smul, Real.norm_eq_abs] + calc + _ ≤ |a| * (‖iteratedFDeriv ℝ m f (x + L z)‖ * ‖L‖ ^ m) := by + apply mul_le_mul_of_nonneg_left _ (abs_nonneg a) + simpa using (iteratedFDeriv ℝ m f (x + L z)).norm_compContinuousLinearMap_le + (fun _ : Fin m => L) + _ = _ := by ring + +/-- The actual normalization `hhat(z) = r⁻¹(h(x+r T⁻¹z)-h(x))`. -/ +theorem normalized_jet_apply (T : E ≃L[ℝ] E) (h : E → F) (x z : E) (r : ℝ) + {m : ℕ} (hm : 0 < m) (hh : ContDiffAt ℝ m h (x + r • T.symm z)) + (xi : Fin m → E) : + iteratedFDeriv ℝ m (fun y => r⁻¹ • (h (x + r • T.symm y) - h x)) z xi = + (r⁻¹ * r ^ m) • iteratedFDeriv ℝ m h (x + r • T.symm z) + (fun i => T.symm (xi i)) := by + let L : E →L[ℝ] E := r • (T.symm : E →L[ℝ] E) + have hformula := iteratedFDeriv_scaled_affine L h x z r⁻¹ (-(r⁻¹ • h x)) hm hh + have heq : (fun y => r⁻¹ • (h (x + r • T.symm y) - h x)) = + (fun y => r⁻¹ • h (x + L y) + -(r⁻¹ • h x)) := by + funext y + simp [L, sub_eq_add_neg] + rw [heq, hformula] + simp only [smul_apply, ContinuousMultilinearMap.compContinuousLinearMap_apply, L] + change r⁻¹ • (iteratedFDeriv ℝ m h (x + r • T.symm z) + (fun i => r • T.symm (xi i))) = _ + rw [(iteratedFDeriv ℝ m h (x + r • T.symm z)).map_smul_univ] + simp [smul_smul] + +/-- Operator-norm form of the same source normalization. -/ +theorem normalized_jet_norm_le (T : E ≃L[ℝ] E) (h : E → F) (x z : E) (r : ℝ) + {m : ℕ} (hm : 0 < m) (hh : ContDiffAt ℝ m h (x + r • T.symm z)) : + ‖iteratedFDeriv ℝ m (fun y => r⁻¹ • (h (x + r • T.symm y) - h x)) z‖ ≤ + |r⁻¹| * ‖iteratedFDeriv ℝ m h (x + r • T.symm z)‖ * + (|r| * ‖(T.symm : E →L[ℝ] E)‖) ^ m := by + let L : E →L[ℝ] E := r • (T.symm : E →L[ℝ] E) + have hbound := norm_iteratedFDeriv_scaled_affine_le L h x z r⁻¹ (-(r⁻¹ • h x)) hm hh + have heq : (fun y => r⁻¹ • (h (x + r • T.symm y) - h x)) = + (fun y => r⁻¹ • h (x + L y) + -(r⁻¹ • h x)) := by + funext y + simp [L, sub_eq_add_neg] + rw [heq] + simpa [L, norm_smul, Real.norm_eq_abs] using hbound + +/-- The dyadic change of variables for a contracting change of frozen metric. +The harmless output constant is retained explicitly. -/ +theorem norm_iteratedFDeriv_dyadic_metric_change_le (S : E →L[ℝ] E) + (g : E → F) (b : F) {m : ℕ} (hm : 0 < m) + (hS : ‖S‖ ≤ 1) (hg : ContDiffAt ℝ m g 0) : + ‖iteratedFDeriv ℝ m (fun z => (2 : ℝ) • g ((1 / 2 : ℝ) • S z) + b) 0‖ ≤ + (2 / (2 : ℝ) ^ m) * ‖iteratedFDeriv ℝ m g 0‖ := by + let L : E →L[ℝ] E := (1 / 2 : ℝ) • S + have hL : ‖L‖ ≤ (1 / 2 : ℝ) := by + simpa [L, norm_smul] using mul_le_mul_of_nonneg_left hS (by norm_num : (0 : ℝ) ≤ 1 / 2) + have hg' : ContDiffAt ℝ m g (0 + L 0) := by simpa using hg + have h := norm_iteratedFDeriv_scaled_affine_le L g 0 0 2 b hm hg' + simp only [map_zero, zero_add, abs_of_pos (by norm_num : (0 : ℝ) < 2)] at h + change ‖iteratedFDeriv ℝ m (fun z => (2 : ℝ) • g ((1 / 2 : ℝ) • S z) + b) 0‖ ≤ _ at h + calc + _ ≤ 2 * ‖iteratedFDeriv ℝ m g 0‖ * ‖L‖ ^ m := h + _ ≤ 2 * ‖iteratedFDeriv ℝ m g 0‖ * (1 / 2 : ℝ) ^ m := + mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg L) hL m) (by positivity) + _ = _ := by rw [div_pow]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FrozenNorms.lean b/lean/OAI/Geometry/RCD/Coordinates/FrozenNorms.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebdfca765a9a74f400a2f5237c4ad9dd87a510d6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FrozenNorms.lean @@ -0,0 +1,149 @@ +import OAI.Geometry.RCD.Coordinates.PositiveForms + +namespace OAI + +/-! +# Frozen primal and dual norms + +A continuous linear equivalence `T` represents the frozen square root +of the source metric. The primal norm is `‖T x‖`, and the dual norm is +`‖(T.symm).adjoint w‖`. Congruence by the inverse of `T` transports the +positive-form bounds to Euclidean norms without a condition-number loss. +No construction or differentiation of a matrix square root is required. +-/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- A covariant positive form in frozen Euclidean coordinates. -/ +def frozenConjugate (T : E ≃L[ℝ] E) (D : E →L[ℝ] E) : E →L[ℝ] E := + (T.symm : E →L[ℝ] E).adjoint ∘L D ∘L (T.symm : E →L[ℝ] E) + +theorem inner_frozenConjugate (T : E ≃L[ℝ] E) (D : E →L[ℝ] E) (x y : E) : + ⟪x, frozenConjugate T D y⟫_ℝ = ⟪T.symm x, D (T.symm y)⟫_ℝ := by + simp only [frozenConjugate, ContinuousLinearMap.comp_apply] + rw [ContinuousLinearMap.adjoint_inner_right] + rfl + +theorem frozenConjugate_apply_primal (T : E ≃L[ℝ] E) (D : E →L[ℝ] E) (w : E) : + frozenConjugate T D (T w) = (T.symm : E →L[ℝ] E).adjoint (D w) := by + simp [frozenConjugate] + +/-- Congruence preserves positivity even when the mass form is singular. -/ +theorem frozenConjugate_isPositive (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) : (frozenConjugate T D).IsPositive := + hD.adjoint_conj (T.symm : E →L[ℝ] E) + +/-- A bound by the frozen source metric becomes a Euclidean form bound. -/ +theorem frozenConjugate_form_bound (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + {epsilon : ℝ} (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) (z : E) : + ⟪z, frozenConjugate T D z⟫_ℝ ≤ epsilon * ‖z‖ ^ 2 := by + rw [inner_frozenConjugate] + simpa using hbound (T.symm z) + +/-- The sharp anisotropic positive-matrix estimate: the dual norm of +`D w` is controlled by its own directional mass, not by the full metric. -/ +theorem frozen_positive_form_norm_sq_le (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) {epsilon : ℝ} + (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) (w : E) : + ‖(T.symm : E →L[ℝ] E).adjoint (D w)‖ ^ 2 ≤ epsilon * ⟪w, D w⟫_ℝ := by + have h := positive_form_norm_sq_le (frozenConjugate_isPositive T hD) + (frozenConjugate_form_bound T hbound) (T w) + rw [inner_frozenConjugate] at h + simpa only [frozenConjugate_apply_primal, ContinuousLinearEquiv.symm_apply_apply] using h + +/-- The same estimate in square-root form. -/ +theorem frozen_positive_form_norm_le (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) (w : E) : + ‖(T.symm : E →L[ℝ] E).adjoint (D w)‖ ≤ + Real.sqrt epsilon * Real.sqrt ⟪w, D w⟫_ℝ := by + have h := positive_form_norm_le (frozenConjugate_isPositive T hD) hepsilon + (frozenConjugate_form_bound T hbound) (T w) + rw [inner_frozenConjugate] at h + simpa only [frozenConjugate_apply_primal, ContinuousLinearEquiv.symm_apply_apply] using h + +/-- Primal-dual pairing is invariant under the frozen normalization. -/ +theorem inner_primal_dual (T : E ≃L[ℝ] E) (x w : E) : + ⟪T x, (T.symm : E →L[ℝ] E).adjoint w⟫_ℝ = ⟪x, w⟫_ℝ := by + rw [ContinuousLinearMap.adjoint_inner_right] + simp + +theorem abs_inner_le_frozen_primal_mul_dual (T : E ≃L[ℝ] E) (x w : E) : + |⟪x, w⟫_ℝ| ≤ ‖T x‖ * ‖(T.symm : E →L[ℝ] E).adjoint w‖ := by + rw [← inner_primal_dual T x w] + exact abs_real_inner_le_norm _ _ + +/-- Positive-form Cauchy--Schwarz has unchanged directional energies +after the frozen normalization. -/ +theorem frozen_positive_form_inner_abs_le (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) (x y : E) : + |⟪T x, frozenConjugate T D (T y)⟫_ℝ| ≤ + Real.sqrt ⟪x, D x⟫_ℝ * Real.sqrt ⟪y, D y⟫_ℝ := by + rw [inner_frozenConjugate] + simpa using positive_form_inner_abs_le hD x y + +/-- The same small form has mixed operator norm at most `epsilon`, +from the frozen primal norm to its dual norm. -/ +theorem frozen_positive_form_norm_le_primal (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) (w : E) : + ‖(T.symm : E →L[ℝ] E).adjoint (D w)‖ ≤ epsilon * ‖T w‖ := by + have hsq := frozen_positive_form_norm_sq_le T hD hbound w + have hsmall := mul_le_mul_of_nonneg_left (hbound w) hepsilon + have htarget : 0 ≤ epsilon * ‖T w‖ := mul_nonneg hepsilon (norm_nonneg _) + nlinarith [norm_nonneg ((T.symm : E →L[ℝ] E).adjoint (D w))] + +theorem frozen_positive_form_mixed_opNorm_le (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) : + ‖frozenConjugate T D‖ ≤ epsilon := by + apply ContinuousLinearMap.opNorm_le_bound _ hepsilon + intro z + have h := frozen_positive_form_norm_le_primal T hD hepsilon hbound (T.symm z) + simpa [frozenConjugate] using h + +/-- A directional displacement-energy estimate gives the dual field-value +bound used by each patch. -/ +theorem frozen_positive_form_value_le (T : E ≃L[ℝ] E) {D : E →L[ℝ] E} + (hD : D.IsPositive) {epsilon C r energy : ℝ} + (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) (hr : 0 ≤ r) (henergy : 0 ≤ energy) + (hbound : ∀ x, ⟪x, D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (w : E) (hw : ⟪w, D w⟫_ℝ ≤ C * r ^ 2 * energy) : + ‖(T.symm : E →L[ℝ] E).adjoint (D w)‖ ≤ + Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy := by + have hsq := (frozen_positive_form_norm_sq_le T hD hbound w).trans + (mul_le_mul_of_nonneg_left hw hepsilon) + have hroot : (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy) ^ 2 = + epsilon * C * r ^ 2 * energy := by + simp only [mul_pow, Real.sq_sqrt hepsilon, Real.sq_sqrt hC, Real.sq_sqrt henergy] + have hnonneg : 0 ≤ Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy := by positivity + nlinarith [norm_nonneg ((T.symm : E →L[ℝ] E).adjoint (D w))] + +/-- Finite cutoff errors and field values may be estimated in the same +dual norm while retaining each patch's directional energy. -/ +theorem frozen_positive_patch_sum_norm_le {ι : Type*} + (T : E ≃L[ℝ] E) (s : Finset ι) (D : ι → E →L[ℝ] E) + (w : ι → E) (a : ι → ℝ) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hbound : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) : + ‖(T.symm : E →L[ℝ] E).adjoint (∑ j ∈ s, a j • D j (w j))‖ ≤ + ∑ j ∈ s, |a j| * (Real.sqrt epsilon * Real.sqrt ⟪w j, D j (w j)⟫_ℝ) := by + rw [map_sum] + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro j hj + rw [map_smul, norm_smul, Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left + (frozen_positive_form_norm_le T (hD j hj) hepsilon (hbound j hj) (w j)) (abs_nonneg _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FullScaleCoordinateDistance.lean b/lean/OAI/Geometry/RCD/Coordinates/FullScaleCoordinateDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..aaffd1ab1f895cf80163426d9dc760de27a0dcbc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FullScaleCoordinateDistance.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.AllScaleCoordinateDistance + +namespace OAI + +/-! # Distance bounds from the inner radius of full almost splitting -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] {n : ℕ} + +theorem full_scale_coordinate_distance {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/32) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (u z-u x))) : + ∀ x ∈ U, ∀ y ∈ U, + (1-32*η)*dist x y ≤ dist (u x) (u y) ∧ + dist (u x) (u y) ≤ (1+32*η)*dist x y := by + intro x hx y hy + by_cases hxy : x=y + · subst y + simp + have hd : 0 < dist x y := dist_pos.mpr hxy + let r := 32*dist x y + have hr : 0 < r := by dsimp only [r]; positivity + have hrR : r < R := by dsimp only [r]; linarith [hsmall x hx y hy] + have hs := happ x hx r hr hrR + have hh := hs.2.1 x y (by simp only [dist_self]; positivity) + (by rw [dist_comm]; dsimp only [r]; nlinarith) + have he : dist (r⁻¹ • (u x-u x)) (r⁻¹ • (u y-u x)) = r⁻¹*dist (u x) (u y) := by + rw [dist_smul₀,Real.norm_of_nonneg (inv_pos.mpr hr).le,dist_sub_right] + rw [he] at hh + have halg : r*(r⁻¹*dist (u x) (u y)-dist x y/r) = dist (u x) (u y)-dist x y := by + field_simp + have hscaled : |dist (u x) (u y)-dist x y| ≤ r*η := by + calc + _ = |r*(r⁻¹*dist (u x) (u y)-dist x y/r)| := by rw [halg] + _ = r*|r⁻¹*dist (u x) (u y)-dist x y/r| := by rw [abs_mul,abs_of_pos hr] + _ ≤ _ := mul_le_mul_of_nonneg_left hh hr.le + have hab := abs_le.mp hscaled + dsimp only [r] at hab + constructor <;> nlinarith + +theorem full_scale_coordinate_lipschitz {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hη : 0 ≤ η) (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/32) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (u z-u x))) : + LipschitzOnWith ⟨1+32*η,by positivity⟩ u U := + LipschitzOnWith.of_dist_le_mul fun x hx y hy => + (full_scale_coordinate_distance hsmall happ x hx y hy).2 + +theorem full_scale_coordinate_image_bound [MeasurableSpace X] [BorelSpace X] + {u : X → Euclidean n} {U : Set X} {R η : ℝ} + (hη : 0 ≤ η) (hsmall : ∀ x ∈ U, ∀ y ∈ U, dist x y < R/32) + (happ : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (u z-u x))) + (hfin : hausdorff n X U ≠ ⊤) : + (hausdorff n (Euclidean n)).real (u '' U) ≤ (1+32*η)^n*(hausdorff n X).real U := + normalized_hausdorff_real_image_le (full_scale_coordinate_lipschitz hη hsmall happ) hfin + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/FullSplittingCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/FullSplittingCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf69da8c944b71f361002889d2e1bed04f075b8b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/FullSplittingCoordinates.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Harmonic.ProductProjection +import OAI.Geometry.RCD.Metric.ApproximationRestriction +import OAI.Geometry.RCD.Coordinates.TransformationInput + +namespace OAI + +/-! # Coordinates from product almost splitting + +Huang--Huang (2024), Theorem 2.9(2), supplies the product approximation +formulated by `LocalAlmostSplittingInput`. Sharp RCD packing removes its +residual factor without assuming ambient flatness. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.full_splitting_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hpublished : LocalAlmostSplittingInput hX) + {η : ℝ} (hη : 0 < η) : + ∃ ε : ℝ, 0 < ε ∧ ∀ (p : X) (r : ℝ), 0 < r → -ε ≤ K*r^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*r) ε u v → + IsPointedApproximation p 0 r (1/16) η (fun x => r⁻¹ • (v x-v p)) := by + obtain ⟨δ,hδ,hproj⟩ := hX.product_projection_of_packing hn hη + obtain ⟨ε₀,he₀,hproduct⟩ := hpublished hn (δ/3) (by positivity) + let ε := min ε₀ (1/16) + have he : 0 < ε := lt_min he₀ (by norm_num) + refine ⟨ε,he,?_⟩ + intro p r hr hcurv u v hsplit + have heε₀ : ε ≤ ε₀ := min_le_left _ _ + have he16 : ε ≤ 1/16 := min_le_right _ _ + have hc : -1 ≤ K*(4*r)^2 := by nlinarith only [hcurv,he16] + obtain ⟨Z,dZ,z₀,w,hw⟩ := hproduct p r hr (by linarith only [hcurv,heε₀]) u v + (hsplit.mono_error _ _ he.le heε₀) + let : MetricSpace Z := dZ + have hres := hw.restrict_radius hr (show (0:ℝ)≤1 by norm_num) + (show (1:ℝ)≤2 by norm_num) (show 0 ≤ δ/3 by positivity) + have hres' : IsPointedApproximation p (WithLp.toLp 2 (0,z₀)) r 1 δ + (fun x => WithLp.toLp 2 (r⁻¹ • (v x-v p),w x)) := by + simpa only [show 3*(δ/3)=δ by ring] using hres + have hout := hproj Z dZ p z₀ r hr hc + (fun x => WithLp.toLp 2 (r⁻¹ • (v x-v p),w x)) hres' + exact hout + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GammaCoordinateForm.lean b/lean/OAI/Geometry/RCD/Coordinates/GammaCoordinateForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e907fa21fa1f3b037b91bc1ffe8023cd1d06e6d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GammaCoordinateForm.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Sobolev.FiniteEnergyRepresentatives + +namespace OAI + +/-! # Pointwise coordinate forms for pairs of Sobolev linear families -/ + +open Set Filter MeasureTheory +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem localGamma_finset_sum_left {ι : Type*} (s : Finset ι) + (u : ι → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) : + localGamma μ hQ (∑ i ∈ s, u i) g =ᵐ[μ] + fun x => ∑ i ∈ s, localGamma μ hQ (u i) g x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty,zero_smul,zero_mul] using + localGamma_smul_left μ hQ 0 (0 : SobolevSpace μ hQ) g + | @insert i s hi ih => + simp only [Finset.sum_insert hi] + filter_upwards [localGamma_add_left μ hQ (u i) (∑ j ∈ s, u j) g,ih] with x hx hy + exact hx.trans (congrArg (fun z => localGamma μ hQ (u i) g x+z) hy) + +theorem localGamma_finset_sum_right {ι : Type*} (s : Finset ι) + (f : SobolevSpace μ hQ) (u : ι → SobolevSpace μ hQ) : + localGamma μ hQ f (∑ i ∈ s, u i) =ᵐ[μ] + fun x => ∑ i ∈ s, localGamma μ hQ f (u i) x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty,zero_smul,zero_mul] using + localGamma_smul_right μ hQ 0 f (0 : SobolevSpace μ hQ) + | @insert i s hi ih => + simp only [Finset.sum_insert hi] + filter_upwards [localGamma_add_right μ hQ f (u i) (∑ j ∈ s, u j),ih] with x hx hy + exact hx.trans (congrArg (fun z => localGamma μ hQ f (u i) x+z) hy) + +variable {m : ℕ} + +def gammaCoordinateForm (U V : Euclidean m →L[ℝ] SobolevSpace μ hQ) (x : X) : + Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ := + coordinateBilinear (fun i j => + localGamma μ hQ (U (EuclideanSpace.single i 1)) (V (EuclideanSpace.single j 1)) x) + +/-- Two different Sobolev linear families have one finite coordinate +bilinear form, representing every fixed pair of gradient directions. -/ +theorem gammaCoordinateForm_rep (U V : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (a b : Euclidean m) : + localGamma μ hQ (U a) (V b) =ᵐ[μ] fun x => gammaCoordinateForm μ hQ U V x a b := by + classical + let e (i : Fin m) : Euclidean m := EuclideanSpace.single i 1 + have hU : U a=∑ i : Fin m, a i • U (e i) := by + have hh := congrArg (fun T : Euclidean m →L[ℝ] SobolevSpace μ hQ => T a) + (sobolevColumnMap_of_linear μ hQ U) + rw [sobolevColumnMap_apply] at hh + exact hh.symm + have hV : V b=∑ j : Fin m, b j • V (e j) := by + have hh := congrArg (fun T : Euclidean m →L[ℝ] SobolevSpace μ hQ => T b) + (sobolevColumnMap_of_linear μ hQ V) + rw [sobolevColumnMap_apply] at hh + exact hh.symm + have hleft := localGamma_finset_sum_left μ hQ Finset.univ (fun i => a i • U (e i)) + (∑ j, b j • V (e j)) + have hright (i : Fin m) := localGamma_finset_sum_right μ hQ Finset.univ + (a i • U (e i)) (fun j => b j • V (e j)) + have hscalar (i j : Fin m) : localGamma μ hQ (a i • U (e i)) (b j • V (e j)) =ᵐ[μ] + fun x => (a i*b j)*localGamma μ hQ (U (e i)) (V (e j)) x := by + filter_upwards [localGamma_smul_left μ hQ (a i) (U (e i)) (b j • V (e j)), + localGamma_smul_right μ hQ (b j) (U (e i)) (V (e j))] with x hx hy + rw [hx,hy] + ring + rw [hU,hV] + filter_upwards [hleft,ae_all_iff.mpr hright, + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hscalar i))] with x hl hr hs + rw [hl] + simp only [gammaCoordinateForm,coordinateBilinear_apply,smul_eq_mul] + apply Finset.sum_congr rfl + intro i _ + rw [hr i] + exact Finset.sum_congr rfl (fun j _ => hs i j) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GeometricInputCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/GeometricInputCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5798dca02fb44ea7665df23aa76d1952d2a2a73 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GeometricInputCoordinates.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Sobolev.ScalarBochnerConstruction +import OAI.Geometry.RCD.Coordinates.ScalarBochnerCoordinates +import OAI.Geometry.RCD.Metric.LowerCurvatureVolume + +namespace OAI + +/-! # Coordinates under local geometric estimates + +For K > 0 the same metric measure space is RCD(0,n). The local estimates +transfer to that curvature bound because their curvature side conditions +are automatic. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalPoissonHarmonicCompactnessInput hX → + LocalInitialSplittingInput hX → LocalTransformationInput hX → + LocalFlatSplittingInput hX → LocalVolumeRigidityInput hX → + LocalHarmonicMomentCompactnessInput hX → LocalMeasuredCoordinateInput hX → + HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hvol hc hi ht hs hr hh hm + by_cases hK : K ≤ 0 + · exact regular_coordinates_of_scalar_bochner hn hX hp hvol + (hX.scalarBochner_nonpositive K n hn hK p) hc hi ht hs hr hh hm + · have hK0 : 0 ≤ K := (lt_of_not_ge hK).le + let h0 := hX.zero_of_nonneg_curvature hn hK0 + have hc0 : LocalPoissonHarmonicCompactnessInput h0 := by + intro hn S hS q r ε hrad _ heps hepslim u V w f hmeas hrep hwharm hnorm henergy hf hquad + obtain ⟨a,ha,model,hmodel⟩ := hc hn S hS q r ε hrad (fun k => + le_trans (by norm_num : (-1:ℝ) ≤ 0) (mul_nonneg hK0 (sq_nonneg (r k)))) + heps hepslim u V w f hmeas hrep hwharm hnorm henergy hf hquad + exact ⟨a,ha,model,⟨hmodel.moments,hmodel.tests⟩⟩ + have hi0 : LocalInitialSplittingInput h0 := by + intro hn β hβ + obtain ⟨ε,hε,happly⟩ := hi hn β hβ + refine ⟨ε,hε,?_⟩ + intro q r hrad _ + exact happly q r hrad ((neg_nonpos.mpr hε.le).trans (mul_nonneg hK0 (sq_nonneg r))) + have ht0 : LocalTransformationInput h0 := by + intro hn β η hβ hη + obtain ⟨δ,hδ,happly⟩ := ht hn β η hβ hη + refine ⟨δ,hδ,?_⟩ + intro q r hrad _ + exact happly q r hrad ((neg_nonpos.mpr hδ.le).trans (mul_nonneg hK0 (sq_nonneg r))) + have hs0 : LocalFlatSplittingInput h0 := by + intro hn τ hτ + obtain ⟨δ,ε,hδ,hε,happly⟩ := hs hn τ hτ + refine ⟨δ,ε,hδ,hε,?_⟩ + intro q r hrad _ + exact happly q r hrad ((neg_nonpos.mpr hε.le).trans (mul_nonneg hK0 (sq_nonneg r))) + have hr0 : LocalVolumeRigidityInput h0 := by + intro hn ε hε + obtain ⟨δ,hδ,happly⟩ := hr hn ε hε + refine ⟨δ,hδ,?_⟩ + intro q r hrad _ + exact happly q r hrad ((neg_nonpos.mpr hδ.le).trans (mul_nonneg hK0 (sq_nonneg r))) + have hh0 : LocalHarmonicMomentCompactnessInput h0 := by + intro S hS q r ε hrad _ + exact hh S hS q r ε hrad (fun k => + le_trans (by norm_num : (-1:ℝ) ≤ 0) (mul_nonneg hK0 (sq_nonneg (r k)))) + have hm0 : LocalMeasuredCoordinateInput h0 := by + intro hn S ε hS hε + obtain ⟨δ,hδ,happly⟩ := hm hn S ε hS hε + refine ⟨δ,hδ,?_⟩ + intro q r hrad _ + exact happly q r hrad ((neg_nonpos.mpr hδ.le).trans (mul_nonneg hK0 (sq_nonneg r))) + exact regular_coordinates_of_scalar_bochner hn h0 hp hvol + (h0.scalarBochner_nonpositive 0 n hn le_rfl p) hc0 hi0 ht0 hs0 hr0 hh0 hm0 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GevreyCompactBump.lean b/lean/OAI/Geometry/RCD/Coordinates/GevreyCompactBump.lean new file mode 100644 index 0000000000000000000000000000000000000000..f042ab69799698dcfaf297da986b765e74e2568d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GevreyCompactBump.lean @@ -0,0 +1,186 @@ +import OAI.Geometry.RCD.Coordinates.GevreyExpGlue +import OAI.Geometry.RCD.Coordinates.FrozenJetTransport +import Mathlib.Analysis.InnerProductSpace.PiL2 + +namespace OAI + +/-! # A compact Euclidean Gevrey bump + +Products of affine copies of the flat exponential give a nonnegative +Gevrey-two function, positive at the origin, supported in a fixed small +ball. No existence theorem for Gevrey functions is assumed. +-/ + +open Set Metric Finset +open scoped ContDiff + +noncomputable section +namespace RegularPointCoordinates + +private theorem factorial_product_le {n i : ℕ} (hi : i ≤ n) : + (n.choose i : ℝ) * (i.factorial : ℝ) ^ 2 * ((n - i).factorial : ℝ) ^ 2 ≤ + (n.factorial : ℝ) ^ 2 := by + have heq : (n.choose i : ℝ) * (i.factorial : ℝ) * ((n - i).factorial : ℝ) = + (n.factorial : ℝ) := by exact_mod_cast Nat.choose_mul_factorial_mul_factorial hi + have hchoose : (1 : ℝ) ≤ n.choose i := by exact_mod_cast Nat.choose_pos hi + have hprod : (i.factorial : ℝ) * ((n - i).factorial : ℝ) ≤ n.factorial := by + nlinarith [mul_nonneg (show 0 ≤ (i.factorial : ℝ) by positivity) + (show 0 ≤ ((n - i).factorial : ℝ) by positivity)] + calc + _ = (n.factorial : ℝ) * ((i.factorial : ℝ) * ((n - i).factorial : ℝ)) := by + rw [← heq]; ring + _ ≤ _ := by nlinarith + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The product estimate used to assemble the coordinate bump. -/ +theorem gevreyTwo_mul_bound {f g : E → ℝ} {A : ℝ} (hA : 1 ≤ A) + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (hfb : ∀ m x, ‖iteratedFDeriv ℝ m f x‖ ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2) + (hgb : ∀ m x, ‖iteratedFDeriv ℝ m g x‖ ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2) + (m : ℕ) (x : E) : + ‖iteratedFDeriv ℝ m (fun y => f y * g y) x‖ ≤ + (2 * A ^ 2) ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + have hA0 := zero_le_one.trans hA + have hterm (i : ℕ) (hi : i ∈ range (m + 1)) : + (m.choose i : ℝ) * ‖iteratedFDeriv ℝ i f x‖ * + ‖iteratedFDeriv ℝ (m - i) g x‖ ≤ + A ^ (m + 2) * (m.factorial : ℝ) ^ 2 := by + have hi' : i ≤ m := by simpa using hi + calc + _ ≤ (m.choose i : ℝ) * (A ^ (i + 1) * (i.factorial : ℝ) ^ 2) * + (A ^ (m - i + 1) * ((m - i).factorial : ℝ) ^ 2) := by + gcongr + · exact hfb i x + · exact hgb (m - i) x + _ = A ^ (m + 2) * ((m.choose i : ℝ) * (i.factorial : ℝ) ^ 2 * + ((m - i).factorial : ℝ) ^ 2) := by + rw [show m + 2 = (i + 1) + (m - i + 1) by omega, pow_add]; ring + _ ≤ _ := mul_le_mul_of_nonneg_left (factorial_product_le hi') (by positivity) + calc + _ ≤ ∑ i ∈ range (m + 1), (m.choose i : ℝ) * ‖iteratedFDeriv ℝ i f x‖ * + ‖iteratedFDeriv ℝ (m - i) g x‖ := norm_iteratedFDeriv_mul_le hf hg x (by simp) + _ ≤ (m + 1 : ℝ) * (A ^ (m + 2) * (m.factorial : ℝ) ^ 2) := by + simpa using sum_le_sum hterm + _ ≤ (2 : ℝ) ^ (m + 1) * (A ^ (2 * (m + 1)) * (m.factorial : ℝ) ^ 2) := by + gcongr + · exact_mod_cast (Nat.lt_two_pow_self (n := m + 1)).le + · omega + _ = _ := by rw [mul_pow, ← pow_mul]; ring + +/-- Finite products preserve the all-order bounds needed here. -/ +theorem exists_gevreyTwo_prod_bound {ι : Type*} (s : Finset ι) (f : ι → E → ℝ) + (hf : ∀ i ∈ s, ContDiff ℝ ∞ (f i)) + (hb : ∀ i ∈ s, ∃ A : ℝ, 1 ≤ A ∧ ∀ m x, + ‖iteratedFDeriv ℝ m (f i) x‖ ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2) : + ∃ A : ℝ, 1 ≤ A ∧ ∀ m x, + ‖iteratedFDeriv ℝ m (fun y => ∏ i ∈ s, f i y) x‖ ≤ + A ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + classical + induction s using Finset.induction_on with + | empty => + refine ⟨1, le_rfl, ?_⟩ + intro m x + cases m with + | zero => simp + | succ m => simp [iteratedFDeriv_succ_const] + | @insert i s his ih => + obtain ⟨A, hA, hAb⟩ := hb i (mem_insert_self _ _) + obtain ⟨B, hB, hBb⟩ := ih + (fun j hj => hf j (mem_insert_of_mem hj)) + (fun j hj => hb j (mem_insert_of_mem hj)) + let C := max A B + have hC : 1 ≤ C := hA.trans (le_max_left _ _) + refine ⟨2 * C ^ 2, by nlinarith [sq_nonneg C], ?_⟩ + intro m x + simp only [prod_insert his] + apply gevreyTwo_mul_bound hC (hf i (mem_insert_self _ _)) + (contDiff_prod fun j hj => hf j (mem_insert_of_mem hj)) + · intro k y + exact (hAb k y).trans (by gcongr; exact le_max_left A B) + · intro k y + exact (hBb k y).trans (by gcongr; exact le_max_right A B) + +/-- An affine flat exponential has a Gevrey-two bound. -/ +theorem exists_gevreyTwo_affine_glue_bound (L : E →L[ℝ] ℝ) (a : ℝ) : + ∃ A : ℝ, 1 ≤ A ∧ ∀ m x, + ‖iteratedFDeriv ℝ m (fun y => expNegInvGlue (a + L y)) x‖ ≤ + A ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + let A : ℝ := 8 * max 1 ‖L‖ + have hA : 1 ≤ A := by dsimp [A]; linarith [le_max_left 1 ‖L‖] + refine ⟨A, hA, ?_⟩ + intro m x + calc + _ ≤ ‖iteratedFDeriv ℝ m expNegInvGlue (a + L x)‖ * ‖L‖ ^ m := + norm_iteratedFDeriv_comp_affine_le L expNegInvGlue a x m + expNegInvGlue.contDiff.contDiffAt + _ ≤ (8 ^ m * (m.factorial : ℝ) ^ 2) * (max 1 ‖L‖) ^ m := by + rw [norm_iteratedFDeriv_eq_norm_iteratedDeriv] + gcongr + exact norm_iteratedDeriv_expNegInvGlue_le m (a + L x) + exact le_max_right 1 ‖L‖ + _ = A ^ m * (m.factorial : ℝ) ^ 2 := by dsimp [A]; rw [mul_pow]; ring + _ ≤ _ := by + apply mul_le_mul_of_nonneg_right (pow_le_pow_right₀ hA (Nat.le_succ m)) + positivity + +/-- A nonnegative compact bump with Gevrey-two jets and support in radius `1/4`. -/ +theorem exists_small_gevreyTwo_bump (n : ℕ) : + ∃ b : EuclideanSpace ℝ (Fin n) → ℝ, ContDiff ℝ ∞ b ∧ + (∀ x, 0 ≤ b x) ∧ 0 < b 0 ∧ tsupport b ⊆ closedBall 0 (1 / 4) ∧ + ∃ A : ℝ, 1 ≤ A ∧ ∀ m x, + ‖iteratedFDeriv ℝ m b x‖ ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + classical + let S : ℝ := 8 * (n + 1) + have hS : 0 < S := by dsimp [S]; positivity + let L : Fin n × Bool → EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := + fun j => (if j.2 then S else -S) • EuclideanSpace.proj j.1 + let f := fun (j : Fin n × Bool) (x : EuclideanSpace ℝ (Fin n)) => + expNegInvGlue (1 + L j x) + let b := fun x => ∏ j, f j x + have hf (j : Fin n × Bool) : ContDiff ℝ ∞ (f j) := + expNegInvGlue.contDiff.comp (contDiff_const.add (L j).contDiff) + have hb : ContDiff ℝ ∞ b := contDiff_prod fun j _ => hf j + refine ⟨b, hb, fun x => prod_nonneg fun j _ => expNegInvGlue.nonneg _, ?_, ?_, ?_⟩ + · apply prod_pos + intro j hj + apply expNegInvGlue.pos_of_pos + simp [L] + · apply closure_minimal _ isClosed_closedBall + intro x hx + have hcoord (i : Fin n) : |x i| ≤ S⁻¹ := by + have hne (j : Fin n × Bool) : f j x ≠ 0 := + (prod_ne_zero_iff.mp hx) j (mem_univ j) + have hp := lt_of_not_ge ((expNegInvGlue.zero_iff_nonpos).not.mp (hne (i, true))) + have hm := lt_of_not_ge ((expNegInvGlue.zero_iff_nonpos).not.mp (hne (i, false))) + change 0 < 1 + S * x i at hp + change 0 < 1 + (-S) * x i at hm + rw [abs_le] + constructor + · apply (mul_le_mul_iff_right₀ hS).mp + nlinarith [mul_inv_cancel₀ hS.ne'] + · apply (mul_le_mul_iff_right₀ hS).mp + nlinarith [mul_inv_cancel₀ hS.ne'] + have hsq : ‖x‖ ^ 2 ≤ (n : ℝ) * (S⁻¹) ^ 2 := by + rw [EuclideanSpace.real_norm_sq_eq] + calc + _ ≤ ∑ _i : Fin n, (S⁻¹) ^ 2 := by + apply sum_le_sum + intro i hi + nlinarith [sq_abs (x i), hcoord i, abs_nonneg (x i), inv_pos.mpr hS] + _ = _ := by simp + have hsmall : (n : ℝ) * (S⁻¹) ^ 2 ≤ (1 / 4 : ℝ) ^ 2 := by + rw [inv_eq_one_div, div_pow, one_pow, ← mul_div_assoc, mul_one, + div_le_iff₀ (sq_pos_of_pos hS)] + dsimp [S] + nlinarith [sq_nonneg (n : ℝ), (show (0 : ℝ) ≤ n by positivity)] + have : ‖x‖ ≤ (1 / 4 : ℝ) := by nlinarith [norm_nonneg x] + simpa only [mem_closedBall, dist_zero_right] using this + · exact exists_gevreyTwo_prod_bound univ f (fun j _ => hf j) + (fun j _ => exists_gevreyTwo_affine_glue_bound (L j) 1) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GevreyConvolution.lean b/lean/OAI/Geometry/RCD/Coordinates/GevreyConvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac0672531e860b260db55b0b8a48b2c90a5cd964 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GevreyConvolution.lean @@ -0,0 +1,65 @@ +import Mathlib.Analysis.Calculus.ContDiff.Convolution + +namespace OAI + +/-! # Uniform derivative bounds for a compactly supported convolution + +The derivative is placed on the smooth compactly supported factor. The +constant is the L¹ norm of the other factor and is independent of the +derivative order. This is the estimate used to give the Gevrey bump a +plateau. +-/ + +open MeasureTheory +open scoped Convolution ContDiff + +noncomputable section +namespace RegularPointCoordinates + +/-- A uniform derivative bound passes through convolution with one fixed +integrable scalar function. All vector spaces here are in the same +universe as the finite-dimensional Euclidean application. -/ +theorem norm_iteratedFDeriv_convolution_le + (n : ℕ) {E F G : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + [MeasurableSpace E] [BorelSpace E] {μ : Measure E} + [SFinite μ] [μ.IsAddLeftInvariant] + (L : ℝ →L[ℝ] F →L[ℝ] G) {f : E → ℝ} {g : E → F} + (hf : Integrable f μ) (hg : ContDiff ℝ ∞ g) (hgc : HasCompactSupport g) + {M : ℝ} (hM : 0 ≤ M) (hb : ∀ x, ‖iteratedFDeriv ℝ n g x‖ ≤ M) (x : E) : + ‖iteratedFDeriv ℝ n (f ⋆[L, μ] g) x‖ ≤ + ‖L‖ * M * ∫ y, ‖f y‖ ∂μ := by + induction n generalizing F G with + | zero => + simp only [norm_iteratedFDeriv_zero] at hb ⊢ + calc + _ ≤ ∫ y, ‖L‖ * M * ‖f y‖ ∂μ := by + apply norm_integral_le_of_norm_le ((hf.norm.const_mul M).const_mul ‖L‖ |>.congr + (Filter.Eventually.of_forall fun y => by ring)) + filter_upwards with y + exact (L.le_opNorm₂ (f y) (g (x - y))).trans (by + have := hb (x - y) + calc + ‖L‖ * ‖f y‖ * ‖g (x - y)‖ ≤ ‖L‖ * ‖f y‖ * M := by gcongr + _ = _ := by ring) + _ = _ := integral_const_mul _ _ + | succ n ih => + have hd : fderiv ℝ (f ⋆[L, μ] g) = (f ⋆[L.precompR E, μ] fderiv ℝ g) := by + funext y + exact (hgc.hasFDerivAt_convolution_right L hf.locallyIntegrable + (hg.of_le (by simp)) y).fderiv + rw [← norm_iteratedFDeriv_fderiv, hd] + have hgb : ∀ y, ‖iteratedFDeriv ℝ n (fderiv ℝ g) y‖ ≤ M := by + intro y + rw [norm_iteratedFDeriv_fderiv] + exact hb y + apply (ih (L.precompR E) (hg.fderiv_right (by simp)) (hgc.fderiv ℝ) hgb).trans + gcongr + exact L.norm_precompR_le E + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GevreyCutoffConstruction.lean b/lean/OAI/Geometry/RCD/Coordinates/GevreyCutoffConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e947248540453f3171700c67cec16389d72fe7c4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GevreyCutoffConstruction.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.RCD.Coordinates.GevreyCompactBump +import OAI.Geometry.RCD.Coordinates.GevreyConvolution +import OAI.Geometry.RCD.Coordinates.EuclideanGevreyCutoff +import Mathlib.MeasureTheory.Integral.Bochner.Set + +namespace OAI + +/-! # Construction of a Euclidean Gevrey cutoff + +Convolve the normalized small Gevrey bump with the indicator of the +radius-5/2 ball. The resulting function is one on the radius-two ball, +vanishes outside radius three, and retains the order-two derivative +bound. This constructs the exact cutoff used in the chart iteration. +-/ + +open Set Metric MeasureTheory +open scoped ContDiff Convolution + +noncomputable section +namespace RegularPointCoordinates + +/-- The compact Gevrey input is constructed in every finite dimension. -/ +theorem euclideanGevreyCutoffInput (n : ℕ) : EuclideanGevreyCutoffInput n := by + classical + obtain ⟨b, hb, hb0, hbpos, hbs, A, hA, hAb⟩ := exists_small_gevreyTwo_bump n + have hbc : HasCompactSupport b := (isCompact_closedBall (0 : Euclidean n) (1 / 4)).of_isClosed_subset + (isClosed_tsupport b) hbs + have hbi : Integrable b volume := hb.continuous.integrable_of_hasCompactSupport hbc + let I : ℝ := ∫ y, b y + have hI : 0 < I := hb.continuous.integral_pos_of_hasCompactSupport_nonneg_nonzero + hbc hb0 hbpos.ne' + let f : Euclidean n → ℝ := (closedBall 0 (5 / 2)).indicator (fun _ => 1) + have hfi : Integrable f volume := (integrable_indicator_iff measurableSet_closedBall).2 + (integrableOn_const (isCompact_closedBall (0 : Euclidean n) (5 / 2)).measure_ne_top) + have hf0 (y : Euclidean n) : 0 ≤ f y := (indicator_nonneg fun _ _ => zero_le_one) y + have hf1 (y : Euclidean n) : f y ≤ 1 := by + by_cases hy : y ∈ closedBall (0 : Euclidean n) (5 / 2) <;> simp [f, hy] + let L := ContinuousLinearMap.mul ℝ ℝ + let h := f ⋆[L, volume] b + have hh : ContDiff ℝ ∞ h := hbc.contDiff_convolution_right L hfi.locallyIntegrable hb + have hleft (x : Euclidean n) : h x = ∫ y, b y * f (x - y) := by + dsimp only [h] + rw [← convolution_flip] + simp [convolution_def, L] + have hnonneg (x : Euclidean n) : 0 ≤ h x := by + rw [hleft] + exact integral_nonneg fun y => mul_nonneg (hb0 y) (hf0 _) + have hle (x : Euclidean n) : h x ≤ I := by + rw [hleft] + apply integral_mono_of_nonneg (Filter.Eventually.of_forall fun y => + mul_nonneg (hb0 y) (hf0 _)) hbi + filter_upwards with y + simpa using mul_le_mul_of_nonneg_left (hf1 (x - y)) (hb0 y) + have hcore (x : Euclidean n) (hx : ‖x‖ ≤ 2) : h x = I := by + rw [hleft] + apply integral_congr_ae + filter_upwards with y + by_cases hy : b y = 0 + · simp [hy] + have hy' : ‖y‖ ≤ (1 / 4 : ℝ) := by + simpa only [mem_closedBall, dist_zero_right] using hbs (subset_closure hy) + have hxy : x - y ∈ closedBall (0 : Euclidean n) (5 / 2) := by + simp only [mem_closedBall, dist_zero_right] + have := norm_sub_le x y + linarith + simp [f, hxy] + have hzero (x : Euclidean n) (hx : x ∉ closedBall (0 : Euclidean n) 3) : h x = 0 := by + rw [hleft] + apply integral_eq_zero_of_ae + filter_upwards with y + by_cases hy : b y = 0 + · simp [hy] + have hy' : ‖y‖ ≤ (1 / 4 : ℝ) := by + simpa only [mem_closedBall, dist_zero_right] using hbs (subset_closure hy) + have hxy : x - y ∉ closedBall (0 : Euclidean n) (5 / 2) := by + simp only [mem_closedBall, dist_zero_right] at hx ⊢ + have ht := norm_add_le (x - y) y + rw [sub_add_cancel] at ht + linarith + simp [f, hxy] + let J : ℝ := I⁻¹ * ‖L‖ * ∫ y, ‖f y‖ + have hJ : 0 ≤ J := by + dsimp [J] + exact mul_nonneg (mul_nonneg (inv_nonneg.mpr hI.le) (norm_nonneg L)) + (integral_nonneg fun y => norm_nonneg (f y)) + let C : ℝ := A * max 1 J + have hC : 1 ≤ C := by + dsimp [C] + nlinarith [le_max_left 1 J] + let psi : Euclidean n → ℝ := fun x => I⁻¹ • h x + refine ⟨{ + value := psi + constant := C + constant_ge_one := hC + smooth := hh.const_smul I⁻¹ + nonneg := fun x => mul_nonneg (inv_nonneg.mpr hI.le) (hnonneg x) + le_one := ?_ + core := ?_ + support := ?_ + jet := ?_ }⟩ + · intro x + change I⁻¹ * h x ≤ 1 + calc + _ ≤ I⁻¹ * I := mul_le_mul_of_nonneg_left (hle x) (inv_nonneg.mpr hI.le) + _ = 1 := inv_mul_cancel₀ hI.ne' + · intro x hx + change I⁻¹ * h x = 1 + rw [hcore x hx, inv_mul_cancel₀ hI.ne'] + · apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + exact hx (by simp [psi, hzero x hn]) + · intro m x + have hj := norm_iteratedFDeriv_convolution_le m L hfi hb hbc + (by positivity : 0 ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2) (hAb m) x + have hp : J ≤ (max 1 J) ^ (m + 1) := + (le_max_right 1 J).trans (le_self_pow₀ (le_max_left 1 J) (by omega)) + calc + ‖iteratedFDeriv ℝ m psi x‖ = I⁻¹ * ‖iteratedFDeriv ℝ m h x‖ := by + rw [iteratedFDeriv_const_smul_apply' (hh.of_le (by simp)).contDiffAt, + norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hI.le)] + _ ≤ I⁻¹ * (‖L‖ * (A ^ (m + 1) * (m.factorial : ℝ) ^ 2) * ∫ y, ‖f y‖) := + mul_le_mul_of_nonneg_left hj (inv_nonneg.mpr hI.le) + _ = A ^ (m + 1) * (m.factorial : ℝ) ^ 2 * J := by dsimp [J]; ring + _ ≤ A ^ (m + 1) * (m.factorial : ℝ) ^ 2 * (max 1 J) ^ (m + 1) := by + gcongr + _ = C ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by dsimp [C]; rw [mul_pow]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GevreyExpGlue.lean b/lean/OAI/Geometry/RCD/Coordinates/GevreyExpGlue.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe2f262f5e32731ef9a77d78e52b4de7b0e67839 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GevreyExpGlue.lean @@ -0,0 +1,169 @@ +import Mathlib.Analysis.SpecialFunctions.SmoothTransition +import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas +import Mathlib.Algebra.Polynomial.Degree.Lemmas + +namespace OAI + +/-! +# Quantitative flat exponential + +The usual flat exponential has Gevrey order two. The proof keeps the +factorial-weighted coefficient sum of its derivative polynomials, so that +the estimate is uniform on the entire real line. +-/ + +open Polynomial Finset + +noncomputable section +namespace RegularPointCoordinates + +private def gluePolynomial : ℕ → ℝ[X] + | 0 => 1 + | n + 1 => X ^ 2 * (gluePolynomial n - (gluePolynomial n).derivative) + +private def coefficientWeight (p : ℝ[X]) (N : ℕ) : ℝ := + ∑ k ∈ range N, |p.coeff k| * (k.factorial : ℝ) + +private theorem gluePolynomial_degree (n : ℕ) : + (gluePolynomial n).natDegree ≤ 2 * n := by + induction n with + | zero => simp [gluePolynomial] + | succ n ih => + have hd := (natDegree_derivative_le (gluePolynomial n)).trans (Nat.sub_le _ _) + have hs := natDegree_sub_le (gluePolynomial n) (gluePolynomial n).derivative + have hm := natDegree_mul_le (p := (X : ℝ[X]) ^ 2) + (q := gluePolynomial n - (gluePolynomial n).derivative) + simp only [natDegree_X_pow] at hm + change (X ^ 2 * (gluePolynomial n - (gluePolynomial n).derivative)).natDegree ≤ _ + omega + +private theorem coefficientWeight_shift (p : ℝ[X]) (N : ℕ) : + coefficientWeight (X ^ 2 * p) (N + 2) = + ∑ k ∈ range N, |p.coeff k| * ((k + 2).factorial : ℝ) := by + rw [coefficientWeight, show N + 2 = 2 + N by omega, sum_range_add] + simp only [sum_range_succ, sum_range_zero, coeff_X_pow_mul', + show ¬2 ≤ 0 by omega, show ¬2 ≤ 1 by omega, ite_false, abs_zero, zero_mul, + zero_add, add_zero] + apply sum_congr rfl + intro k hk + rw [ite_eq_left (by omega), show 2 + k - 2 = k by omega, Nat.add_comm 2 k] + +private theorem coefficientWeight_step (p : ℝ[X]) (N : ℕ) + (hp : p.natDegree < N) : + coefficientWeight (X ^ 2 * (p - p.derivative)) (N + 2) ≤ + (2 * (N : ℝ) * (N + 1)) * coefficientWeight p N := by + rw [coefficientWeight_shift] + have hlast : p.coeff N = 0 := coeff_eq_zero_of_natDegree_lt hp + have hshift : (∑ k ∈ range N, |p.coeff (k + 1)| * ((k + 1).factorial : ℝ)) ≤ + coefficientWeight p N := by + have heq := sum_range_succ' (fun k => |p.coeff k| * (k.factorial : ℝ)) N + rw [sum_range_succ, hlast, abs_zero, zero_mul, add_zero] at heq + simp only [Nat.factorial_zero, Nat.cast_one, mul_one] at heq + change _ ≤ ∑ k ∈ range N, |p.coeff k| * (k.factorial : ℝ) + linarith [abs_nonneg (p.coeff 0)] + have hfirst : (∑ k ∈ range N, |p.coeff k| * ((k + 2).factorial : ℝ)) ≤ + ((N : ℝ) * (N + 1)) * coefficientWeight p N := by + rw [coefficientWeight, mul_sum] + apply sum_le_sum + intro k hk + have hk' : (k : ℝ) + 1 ≤ N := by exact_mod_cast mem_range.mp hk + have hk'' : (k : ℝ) + 2 ≤ N + 1 := by linarith + simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] + nlinarith only [mul_le_mul hk' hk'' (by positivity : 0 ≤ (k : ℝ) + 2) + (by positivity : 0 ≤ (N : ℝ)), + mul_nonneg (abs_nonneg (p.coeff k)) (by positivity : 0 ≤ (k.factorial : ℝ))] + have hsecond : (∑ k ∈ range N, + |p.coeff (k + 1)| * (k + 1 : ℝ) * ((k + 2).factorial : ℝ)) ≤ + ((N : ℝ) * (N + 1)) * coefficientWeight p N := by + calc + _ ≤ ((N : ℝ) * (N + 1)) * + ∑ k ∈ range N, |p.coeff (k + 1)| * ((k + 1).factorial : ℝ) := by + rw [mul_sum] + apply sum_le_sum + intro k hk + have hk' : (k : ℝ) + 1 ≤ N := by exact_mod_cast mem_range.mp hk + have hk'' : (k : ℝ) + 2 ≤ N + 1 := by linarith + rw [Nat.factorial_succ (k + 1), Nat.cast_mul] + push_cast + nlinarith only [mul_le_mul hk' hk'' (by positivity : 0 ≤ (k : ℝ) + 2) + (by positivity : 0 ≤ (N : ℝ)), + mul_nonneg (abs_nonneg (p.coeff (k + 1))) + (by positivity : 0 ≤ ((k + 1).factorial : ℝ))] + _ ≤ _ := mul_le_mul_of_nonneg_left hshift (by positivity) + calc + _ ≤ ∑ k ∈ range N, (|p.coeff k| + + |p.coeff (k + 1)| * (k + 1 : ℝ)) * ((k + 2).factorial : ℝ) := by + apply sum_le_sum + intro k hk + apply mul_le_mul_of_nonneg_right _ (by positivity) + simpa only [coeff_sub, coeff_derivative, abs_mul, Nat.cast_add, Nat.cast_one, + abs_of_nonneg (by positivity : 0 ≤ (k : ℝ) + 1)] using + abs_sub (p.coeff k) (p.coeff (k + 1) * (k + 1 : ℝ)) + _ = (∑ k ∈ range N, |p.coeff k| * ((k + 2).factorial : ℝ)) + + ∑ k ∈ range N, + |p.coeff (k + 1)| * (k + 1 : ℝ) * ((k + 2).factorial : ℝ) := by + simp_rw [add_mul, sum_add_distrib] + _ ≤ _ := by linarith + +private theorem gluePolynomial_weight (n : ℕ) : + coefficientWeight (gluePolynomial n) (2 * n + 1) ≤ + 8 ^ n * (n.factorial : ℝ) ^ 2 := by + induction n with + | zero => norm_num [coefficientWeight, gluePolynomial] + | succ n ih => + have hstep := coefficientWeight_step (gluePolynomial n) (2 * n + 1) + (by have := gluePolynomial_degree n; omega) + change coefficientWeight (gluePolynomial (n + 1)) (2 * (n + 1) + 1) ≤ _ + rw [gluePolynomial, show 2 * (n + 1) + 1 = (2 * n + 1) + 2 by omega] + calc + _ ≤ (2 * ((2 * n + 1 : ℕ) : ℝ) * ((2 * n + 1 : ℕ) + 1)) * + coefficientWeight (gluePolynomial n) (2 * n + 1) := hstep + _ ≤ (8 * (n + 1 : ℝ) ^ 2) * (8 ^ n * (n.factorial : ℝ) ^ 2) := by + apply mul_le_mul _ ih (by unfold coefficientWeight; positivity) (by positivity) + push_cast + nlinarith + _ = _ := by rw [pow_succ, Nat.factorial_succ]; push_cast; ring + +private theorem gluePolynomial_derivative (n : ℕ) : + iteratedDeriv n expNegInvGlue = + fun x => (gluePolynomial n).eval x⁻¹ * expNegInvGlue x := by + induction n with + | zero => simp [gluePolynomial] + | succ n ih => + rw [iteratedDeriv_succ, ih] + funext x + exact (expNegInvGlue.hasDerivAt_polynomial_eval_inv_mul (gluePolynomial n) x).deriv + +/-- The standard flat exponential is globally Gevrey of order two. -/ +theorem norm_iteratedDeriv_expNegInvGlue_le (n : ℕ) (x : ℝ) : + ‖iteratedDeriv n expNegInvGlue x‖ ≤ 8 ^ n * (n.factorial : ℝ) ^ 2 := by + rw [gluePolynomial_derivative, Real.norm_eq_abs] + dsimp only + by_cases hx : x ≤ 0 + · simp only [expNegInvGlue.zero_of_nonpos hx, mul_zero, abs_zero] + positivity + have hx' : 0 < x := lt_of_not_ge hx + have hf : 0 ≤ expNegInvGlue x := expNegInvGlue.nonneg x + have hexp (k : ℕ) : (x⁻¹) ^ k * expNegInvGlue x ≤ (k.factorial : ℝ) := by + have h := Real.pow_div_factorial_le_exp x⁻¹ (inv_nonneg.mpr hx'.le) k + rw [div_le_iff₀ (by positivity)] at h + rw [expNegInvGlue, ite_eq_right hx, Real.exp_neg] + apply (mul_le_mul_of_nonneg_right h (inv_nonneg.mpr (Real.exp_pos _).le)).trans_eq + field_simp + calc + _ ≤ coefficientWeight (gluePolynomial n) (2 * n + 1) := by + rw [(gluePolynomial n).eval_eq_sum_range' (n := 2 * n + 1) + (by have := gluePolynomial_degree n; omega) x⁻¹, sum_mul, coefficientWeight] + apply (abs_sum_le_sum_abs _ _).trans + apply sum_le_sum + intro k hk + rw [abs_mul, abs_mul, abs_of_nonneg (pow_nonneg (inv_nonneg.mpr hx'.le) _), + abs_of_nonneg hf, mul_assoc] + exact mul_le_mul_of_nonneg_left (hexp k) (abs_nonneg _) + _ ≤ _ := gluePolynomial_weight n + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GlobalFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/GlobalFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3cd679ddb45b641872a000ab6af5bd86d5747d2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GlobalFrameDefect.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Sobolev.HarmonicGramEnergyDefect + +namespace OAI + +/-! # A global frame-energy error from the small-defect estimate -/ + +open Finset +noncomputable section +namespace RegularPointCoordinates + +def frameDefectConstant (n : ℕ) : ℝ := 30+5*(1+4*(n:ℝ))^2 + +theorem frame_energy_defect_global {n : ℕ} {r D : ℝ} (hr : 0≤r) (hD : 0≤D) + (a : Fin n → ℝ) (ha : ∀ i, (a i)^2≤4*r) + (hsmall : 5*D≤1 → |r-∑ i, (a i)^2|≤Real.sqrt (30*D)*r) : + (r-∑ i, (a i)^2)^2≤frameDefectConstant n*D*r^2 := by + by_cases hgood : 5*D≤1 + · have hs := (sq_le_sq₀ (abs_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) hr)).mpr (hsmall hgood) + rw [sq_abs,mul_pow,Real.sq_sqrt (mul_nonneg (by norm_num) hD)] at hs + have hc : 30≤frameDefectConstant n := by unfold frameDefectConstant; nlinarith [sq_nonneg (1+4*(n:ℝ))] + exact hs.trans (by gcongr) + · have hsum : (∑ i, (a i)^2)≤4*(n:ℝ)*r := by + calc + _≤∑ _i : Fin n, 4*r := sum_le_sum (fun i _ => ha i) + _=_ := by simp; ring + have hs0 : 0≤∑ i, (a i)^2 := sum_nonneg (fun _ _ => sq_nonneg _) + have habs : |r-∑ i, (a i)^2|≤(1+4*(n:ℝ))*r := by + apply abs_le.mpr + constructor <;> nlinarith [Nat.cast_nonneg (α := ℝ) n] + have hs := (sq_le_sq₀ (abs_nonneg _) (mul_nonneg (by positivity) hr)).mpr habs + rw [sq_abs,mul_pow] at hs + have hcoef : (1+4*(n:ℝ))^2≤frameDefectConstant n*D := by + have hd : 1≤5*D := le_of_lt (lt_of_not_ge hgood) + have hh := mul_le_mul_of_nonneg_right hd (sq_nonneg (1+4*(n:ℝ))) + unfold frameDefectConstant + nlinarith + exact hs.trans (mul_le_mul_of_nonneg_right hcoef (sq_nonneg r)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GoodSplittingSet.lean b/lean/OAI/Geometry/RCD/Coordinates/GoodSplittingSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..69de3c8d7681236261803ab105b3beaeb8a0c753 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GoodSplittingSet.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Harmonic.GramDefect +import OAI.Geometry.RCD.Sobolev.WeakMaximal +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # One compact good set for every smaller splitting scale + +The original harmonic functions and their representatives are retained. +Only their finite Gram defect enters the maximal estimate. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.good_splitting_set {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : X) {R ε t : ℝ} (hR : 0 < R) (hcurv : -1 ≤ K*(5*R)^2) + (hε : 0 ≤ ε) (ht : 0 < t) (hεt : ε ≤ t) + {u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic} {v : X → Euclidean n} + (hsplit : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) ε u v) : + ∃ U : Set X, IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ + (fiveBallConstant n/t)*((n:ℝ)^2*ε*(hausdorff n X).real (ball p (2*R))) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + FirstOrderSplittingOn (hausdorff n X) hX.quadratic x r t u v := by + let μ := hausdorff n X + have hfin : μ (ball p (2*R)) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hvol : 0 < μ.real (ball p (2*R)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (by positivity)).ne' hfin + have hfi := gramDefect_integrableOn μ hX.quadratic u hfin + have hbound := gramDefect_integral_bound μ hX.quadratic hvol hfin hsplit + obtain ⟨U,hU,hUsub,hbad,hgood⟩ := hX.local_maximal_good_set hn p hR hcurv ht hfi + (Filter.Eventually.of_forall (gramDefect_nonneg μ hX.quadratic u)) + refine ⟨U,hU,hUsub,hbad.trans ?_,?_⟩ + · exact mul_le_mul_of_nonneg_left hbound (by unfold fiveBallConstant; positivity) + · intro x hx r hr hrR + have hsub : ball x r ⊆ ball p (2*R) := by + intro y hy + have hh := dist_triangle y x p + have hyx : dist y x < r := hy + have hxp : dist x p ≤ R := hUsub hx + change dist y p < 2*R + linarith + refine ⟨fun i => ae_restrict_of_ae_restrict_of_subset hsub (hsplit.representative i), + hsplit.continuous.mono hsub,fun i => (hsplit.harmonic i).mono μ hX.quadratic hsub,?_,?_⟩ + · intro i + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub (hsplit.gradient i)] with y hy + exact hy.trans (by nlinarith : (1+ε)^2 ≤ (1+t)^2) + · intro i j + have hsmallfin : μ (ball x r) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hsmallvol : 0 < μ.real (ball x r) := + ENNReal.toReal_pos (hX.fullSupport x r hr).ne' hsmallfin + rw [← div_eq_inv_mul,div_le_iff₀ hsmallvol] + apply le_trans _ (hgood x hx r hr hrR) + apply integral_mono + (((localGamma_memL1 μ hX.quadratic (u i) (u j)).integrableOn.sub + (integrableOn_const hsmallfin)).abs) (hfi.mono_set hsub) + exact gramDefect_entry_le μ hX.quadratic u i j + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/GramNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/GramNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3370b146a873188c478de67bc93f796f791c968 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/GramNormalization.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicGrams + +namespace OAI + +/-! +# Exact mean normalizations and their metric consequences + +An exact normalization is the identity for the mean Sobolev Gram operator, +as in Huang--Huang, Theorem 4.1(2). All conclusions below are derived from +that identity. In particular, nondegeneracy of the original Gram operator +is not separately assumed. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) + +/-- The adjoint of a coordinate normalization acts on the coefficients of +the scalar Sobolev column. -/ +def IsExactMeanNormalization (s : Set X) (hs : MeasurableSet s) + (A : E ≃L[ℝ] E) : Prop := + sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) s hs = + ContinuousLinearMap.id ℝ E + +theorem meanGram_energy_of_exact_normalization (s : Set X) (hs : MeasurableSet s) + (A : E ≃L[ℝ] E) (hA : IsExactMeanNormalization μ hQ U s hs A) (v : E) : + ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ = ‖A.symm v‖ ^ 2 := by + have h := congrArg (fun Q : E →L[ℝ] E => ⟪A.symm v, Q (A.symm v)⟫_ℝ) hA + rw [sobolevMeanGram_comp] at h + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply, + ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] using h + +theorem meanGram_strictly_positive_of_exact_normalization + (s : Set X) (hs : MeasurableSet s) (A : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) {v : E} (hv : v ≠ 0) : + 0 < ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ := by + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] + apply sq_pos_of_pos + exact norm_pos_iff.mpr (fun h => hv (A.symm.injective (by simpa using h))) + +theorem meanGram_lower_of_exact_normalization + (s : Set X) (hs : MeasurableSet s) (A : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) + {C : ℝ} (hC : 0 ≤ C) (hbound : ‖(A : E →L[ℝ] E)‖ ≤ C) (v : E) : + ‖v‖ ^ 2 ≤ C ^ 2 * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ := by + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] + have h := (A : E →L[ℝ] E).le_opNorm (A.symm v) + rw [ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] at h + have hb := mul_le_mul_of_nonneg_right hbound (norm_nonneg (A.symm v)) + have hs := (sq_le_sq₀ (norm_nonneg v) + (mul_nonneg hC (norm_nonneg (A.symm v)))).mpr (h.trans hb) + simpa only [mul_pow] using hs + +theorem meanGram_upper_of_exact_normalization + (s : Set X) (hs : MeasurableSet s) (A : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) + {C : ℝ} (hC : 0 ≤ C) (hbound : ‖(A.symm : E →L[ℝ] E)‖ ≤ C) (v : E) : + ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ ≤ C ^ 2 * ‖v‖ ^ 2 := by + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] + have h := (A.symm : E →L[ℝ] E).le_opNorm v + have hb := mul_le_mul_of_nonneg_right hbound (norm_nonneg v) + have hs := (sq_le_sq₀ (norm_nonneg (A.symm v)) + (mul_nonneg hC (norm_nonneg v))).mpr (h.trans hb) + simpa only [mul_pow] using hs + +/-- The precise comparison needed for neighboring centers or scales. -/ +theorem meanGram_comparison_of_normalizations + (s t : Set X) (hs : MeasurableSet s) (ht : MeasurableSet t) + (A B : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) + (hB : IsExactMeanNormalization μ hQ U t ht B) + {C : ℝ} (hC : 0 ≤ C) + (hcompare : ∀ v, ‖B.symm v‖ ≤ C * ‖A.symm v‖) (v : E) : + ⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ ≤ + C ^ 2 * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ := by + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA, + meanGram_energy_of_exact_normalization μ hQ U t ht B hB] + have h := (sq_le_sq₀ (norm_nonneg (B.symm v)) + (mul_nonneg hC (norm_nonneg (A.symm v)))).mpr (hcompare v) + simpa only [mul_pow] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HalfRestrictedMean.lean b/lean/OAI/Geometry/RCD/Coordinates/HalfRestrictedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..34137919cc3852a83afb71e3ca1fa16ba628c08b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HalfRestrictedMean.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedSubplanData + +namespace OAI + +/-! # Testing a half-restricted plan detects the absolute mean error + +Adding half the original plan keeps the subplan mass at least one half. +Its normalization therefore increases compression by at most a factor two. +-/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +def halfRestrictedMeasure (μ : Measure X) (S : Set X) : Measure X := + (1/2:ℝ≥0∞) • (μ+μ.restrict S) + +theorem halfRestrictedMeasure_le (μ : Measure X) (S : Set X) : + halfRestrictedMeasure μ S ≤ μ := by + intro T + simp only [halfRestrictedMeasure,Measure.smul_apply,Measure.add_apply,smul_eq_mul] + calc + _ ≤ (1/2:ℝ≥0∞)*(μ T+μ T) := mul_le_mul' le_rfl + (add_le_add le_rfl (show μ.restrict S T ≤ μ T from Measure.restrict_le_self T)) + _ = μ T := by + have hh : (2:ℝ≥0∞)⁻¹+(2:ℝ≥0∞)⁻¹=1 := by + rw [← two_mul,ENNReal.mul_inv_cancel (by norm_num) (by norm_num)] + rw [mul_add,← add_mul] + simp only [one_div,hh,one_mul] + +theorem halfRestrictedMeasure_mass_lower (μ : Measure X) [IsProbabilityMeasure μ] (S : Set X) : + (1/2:ℝ≥0∞) ≤ halfRestrictedMeasure μ S univ := by + simp only [halfRestrictedMeasure,Measure.smul_apply,Measure.add_apply,smul_eq_mul,measure_univ] + simpa only [mul_one] using mul_le_mul' (le_refl (1/2:ℝ≥0∞)) + (le_add_right le_rfl : (1:ℝ≥0∞) ≤ 1+μ.restrict S univ) + +theorem halfRestrictedMeasure_mass_ne_zero (μ : Measure X) [IsProbabilityMeasure μ] (S : Set X) : + halfRestrictedMeasure μ S univ ≠ 0 := + ne_of_gt ((by norm_num : (0:ℝ≥0∞)<1/2).trans_le (halfRestrictedMeasure_mass_lower μ S)) + +theorem submeasure_integral_tendsto_zero + (μ κ : ℕ → Measure X) [∀ k, IsProbabilityMeasure (μ k)] + (hle : ∀ k, κ k ≤ μ k) (hzero : ∀ k, κ k univ ≠ 0) (f : ℕ → X → ℝ) + (hlim : Tendsto (fun k => ∫ x, f k x ∂((κ k univ)⁻¹ • κ k)) atTop (𝓝 0)) : + Tendsto (fun k => ∫ x, f k x ∂κ k) atTop (𝓝 0) := by + have hfinite (k : ℕ) : κ k univ ≠ ∞ := ne_top_of_le_ne_top (measure_ne_top (μ k) univ) (hle k univ) + have heq (k : ℕ) : (∫ x, f k x ∂κ k)= + (κ k).real univ*(∫ x, f k x ∂((κ k univ)⁻¹ • κ k)) := by + rw [integral_smul_measure,smul_eq_mul,ENNReal.toReal_inv] + change _=(κ k univ).toReal*((κ k univ).toReal⁻¹*_) + rw [← mul_assoc,mul_inv_cancel₀ (ENNReal.toReal_ne_zero.mpr ⟨hzero k,hfinite k⟩),one_mul] + apply squeeze_zero_norm _ (by simpa only [norm_zero] using hlim.norm) + intro k + rw [heq,norm_mul,Real.norm_of_nonneg measureReal_nonneg] + have hm : (κ k).real univ ≤ 1 := by + simpa only [Measure.real,measure_univ,ENNReal.toReal_one] using + ENNReal.toReal_mono (measure_ne_top (μ k) univ) (hle k univ) + exact mul_le_of_le_one_left (norm_nonneg _) hm + +theorem halfRestrictedMeasure_abs_integral (μ : Measure X) [IsProbabilityMeasure μ] + (f : X → ℝ) (hm : Measurable f) (hi : Integrable f μ) : + (∫ x, |f x| ∂μ)=4*(∫ x, f x ∂halfRestrictedMeasure μ {x | 0 ≤ f x})- + 3*(∫ x, f x ∂μ) := by + let S := {x | 0 ≤ f x} + have hS : MeasurableSet S := measurableSet_le measurable_const hm + have hI : Integrable (S.indicator f) μ := hi.indicator hS + have habs : (∫ x, |f x| ∂μ)=2*(∫ x in S, f x ∂μ)-(∫ x, f x ∂μ) := by + calc + _ = ∫ x, 2*S.indicator f x-f x ∂μ := by + apply integral_congr_ae + exact Eventually.of_forall fun x => by + change |f x|=2*S.indicator f x-f x + by_cases hx : 0 ≤ f x + · rw [Set.indicator_of_mem (show x∈S from hx),abs_of_nonneg hx] + ring + · have hx' : f x < 0 := lt_of_not_ge hx + rw [Set.indicator_of_notMem (show x∉S from hx),abs_of_neg hx',mul_zero,zero_sub] + _ = _ := by + rw [integral_sub (hI.const_mul 2) hi,integral_const_mul,integral_indicator hS] + have hk : (∫ x, f x ∂halfRestrictedMeasure μ S)= + (1/2:ℝ)*((∫ x, f x ∂μ)+(∫ x in S, f x ∂μ)) := by + rw [halfRestrictedMeasure,integral_smul_measure,integral_add_measure hi hi.restrict,smul_eq_mul] + norm_num + change _=4*(∫ x, f x ∂halfRestrictedMeasure μ S)-3*(∫ x, f x ∂μ) + rw [hk,habs] + ring + +theorem integral_abs_tendsto_of_halfRestrictedMeans + (μ : ℕ → Measure X) [∀ k, IsProbabilityMeasure (μ k)] + (f : ℕ → X → ℝ) (hm : ∀ k, Measurable (f k)) (hi : ∀ k, Integrable (f k) (μ k)) + (hmean : Tendsto (fun k => ∫ x, f k x ∂μ k) atTop (𝓝 0)) + (hhalf : Tendsto (fun k => + ∫ x, f k x ∂((halfRestrictedMeasure (μ k) {x | 0 ≤ f k x} univ)⁻¹ • + halfRestrictedMeasure (μ k) {x | 0 ≤ f k x})) atTop (𝓝 0)) : + Tendsto (fun k => ∫ x, |f k x| ∂μ k) atTop (𝓝 0) := by + have hκ := submeasure_integral_tendsto_zero μ + (fun k => halfRestrictedMeasure (μ k) {x | 0 ≤ f k x}) + (fun k => halfRestrictedMeasure_le _ _) (fun k => halfRestrictedMeasure_mass_ne_zero _ _) f hhalf + have hh := (hκ.const_mul 4).sub (hmean.const_mul 3) + simpa only [halfRestrictedMeasure_abs_integral _ _ (hm _) (hi _),mul_zero,sub_zero] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateGram.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..43b311e61e6e77aaec9ddfefeb09d7218ff82331 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateGram.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicCoordinatePair +import OAI.Geometry.RCD.Sobolev.HarmonicLinearEnergyL1 +import OAI.Geometry.RCD.Harmonic.MixedGramL1 + +namespace OAI + +/-! # The actual finite harmonic coordinate family has the Euclidean Gram limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_coordinate_gram {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*r k^2) (hcurv5 : ∀ k, -1≤K*(5*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w i k)) + (hnorm : ∀ i k, harmonicTargetNorm hX (p k) (5*r k) (w i k)≤7) + (hconv : ∀ i W, 0 ((hausdorff n X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), + |r k^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w j k) x-(if i=j then 1 else 0)| + ∂hausdorff n X) atTop (𝓝 0)) := by + have hdiag (i : Fin n) : Tendsto (fun k => ((hausdorff n X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), + |r k^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w i k) x-1| ∂hausdorff n X) + atTop (𝓝 0) := + hX.harmonic_linear_energy_l1 hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + (w i) (hw i) (by norm_num : (0:ℝ)<7) (hnorm i) (EuclideanSpace.proj i) + (coordinate_projection_norm i) (hconv i) + constructor + · intro i + exact hX.harmonic_linear_sharp hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + (w i) (hw i) (by norm_num : (0:ℝ)<7) (hnorm i) (EuclideanSpace.proj i) + (coordinate_projection_norm i).le (hconv i) + · intro i j + by_cases hij : i=j + · subst j + simpa using hdiag i + · obtain ⟨hh,hm,hv⟩ := hX.harmonic_coordinate_pair_data p r V w hw hnorm hconv i j + have hp := hX.harmonic_linear_energy_l1 hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + (fun k => (Real.sqrt 2)⁻¹ • (w i k+w j k)) hh (by norm_num : (0:ℝ)<14) hm + ((Real.sqrt 2)⁻¹ • ((EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)+EuclideanSpace.proj j)) + (coordinate_pair_unit_norm i j hij) hv + simpa only [ite_eq_right hij,sub_zero] using mixed_gram_l1_tendsto (hausdorff n X) hX.quadratic + (fun k => ball (p k) (2*r k)) (fun k => (hX.finiteOnBounded _ isBounded_ball).ne) + r (fun k => ((hausdorff n X).real (ball (p k) (2*r k)))⁻¹) (fun _ => by positivity) + (w i) (w j) (hdiag i) (hdiag j) hp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinatePair.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinatePair.lean new file mode 100644 index 0000000000000000000000000000000000000000..00ef5c7dd06c9e0b20de62eaf0cc9e8ea1e65131 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinatePair.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Coordinates.UnitCoordinateDirections +import OAI.Geometry.RCD.Harmonic.FiniteMeasuredHarmonicSequence + +namespace OAI + +/-! # The normalized sums of the actual harmonic coordinate components -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.harmonic_coordinate_pair_data {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (p : ℕ → X) (r : ℕ → ℝ) + (V : ℕ → X → Euclidean n) (w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w i k)) + (hnorm : ∀ i k, harmonicTargetNorm hX (p k) (5*r k) (w i k)≤7) + (hconv : ∀ i W, 0 (Real.sqrt 2)⁻¹ • (w i k+w j k) + let L := (Real.sqrt 2)⁻¹ • ((EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)+EuclideanSpace.proj j) + (∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (q k)) ∧ + (∀ k, harmonicTargetNorm hX (p k) (5*r k) (q k)≤14) ∧ + (∀ W, 0 ((hw i k).add _ _ (hw j k)).smul _ _ _,?_,?_⟩ + · intro k + rw [harmonicTargetNorm_smul,abs_of_pos (inv_pos.mpr hs)] + have hh := harmonicTargetNorm_add_le hX (p k) (5*r k) (w i k) (w j k) + have hsum : harmonicTargetNorm hX (p k) (5*r k) (w i k+w j k)≤14 := by + linarith [hnorm i k,hnorm j k] + calc + _ ≤ (Real.sqrt 2)⁻¹*14 := mul_le_mul_of_nonneg_left hsum (inv_pos.mpr hs).le + _ ≤ 14 := by nlinarith + · intro W hW hW5 δ hδ + filter_upwards [hconv i W hW hW5 (δ/2) (half_pos hδ), + hconv j W hW hW5 (δ/2) (half_pos hδ)] with k hi hj + have hrep : SobolevSpace.toLp (hausdorff n X) hX.quadratic + ((Real.sqrt 2)⁻¹ • (w i k+w j k)) =ᵐ[hausdorff n X] + fun x => (Real.sqrt 2)⁻¹*(SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k) x+ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k) x) := by + rw [map_smul,map_add] + filter_upwards [Lp.coeFn_smul (Real.sqrt 2)⁻¹ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k)+ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k)), + Lp.coeFn_add (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k)) + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k))] with x hsx hax + simpa only [Pi.smul_apply,smul_eq_mul,hax,Pi.add_apply] using hsx + filter_upwards [hi,hj,ae_restrict_of_ae hrep] with x hix hjx hx + rw [hx] + change |(Real.sqrt 2)⁻¹*(_+_)-(Real.sqrt 2)⁻¹*(V k x i+V k x j)|≤δ + have he : (Real.sqrt 2)⁻¹*(SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k) x+ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k) x)-(Real.sqrt 2)⁻¹*(V k x i+V k x j)= + (Real.sqrt 2)⁻¹*((SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k) x-V k x i)+ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k) x-V k x j)) := by ring + rw [he,abs_mul,abs_of_pos (inv_pos.mpr hs)] + calc + _ ≤ (Real.sqrt 2)⁻¹*(|SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k) x-V k x i|+ + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j k) x-V k x j|) := + mul_le_mul_of_nonneg_left (abs_add_le _ _) (inv_pos.mpr hs).le + _ ≤ (Real.sqrt 2)⁻¹*δ := mul_le_mul_of_nonneg_left (by linarith) (inv_pos.mpr hs).le + _ ≤ δ := by nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateValueLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateValueLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..f48d34e7f62f85cfa7e04b91bceeed9d6b2a88e1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicCoordinateValueLimit.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicBoundaryIdentification +import OAI.Geometry.RCD.Coordinates.EuclideanCoordinateTests +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance + +namespace OAI + +/-! # Actual harmonic coordinate replacements have the prescribed value limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology ContDiff NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem CompactHarmonicBoundaryLimit.convergence_of_eqOn {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} + {p : ℕ → X} {r ε : ℕ → ℝ} {V : ℕ → X → Euclidean n} {S R : ℝ} {ψ : Euclidean n → ℝ} + (d : CompactHarmonicBoundaryLimit hX p r V S R ψ) + (hRS : R≤S) (hr : ∀ k, 0 d.subsequence k+d.shift + have hta : Tendsto a atTop atTop := (tendsto_add_atTop_nat d.shift).comp d.strictMono.tendsto_atTop + have heps : ∀ᶠ k in atTop, ε (a k)<(R-W)/2 := + (hεlim.comp hta).eventually (eventually_lt_nhds (by linarith)) + filter_upwards [d.convergence W hW hWR δ hδ,heps] with k hk hεk + filter_upwards [hk,self_mem_ae_restrict measurableSet_ball] with x hx hxb + have hnorm := (abs_le.mp (pointed_radial_distance (hr (a k)) + (hW.le.trans (hWR.le.trans hRS)) (hV (a k)).metric + (hxb.le.trans (mul_le_mul_of_nonneg_right (hWR.le.trans hRS) (hr _).le)))).2 + have hdist : dist x (p (a k))/r (a k) z i) (ball 0 R) ∧ + ∀ W : ℝ, 0 z i) (ball 0 R) := + fun z hz => (he hz).trans (hcoord (ball_subset_closedBall hz)) + exact ⟨ψ,hψ,d,hec,fun _ hW hWR _ hδ => d.convergence_of_eqOn + hRS'.le hr hεlim hV hec hW hWR hδ⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicFitStep.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicFitStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..1728577de00048066401ff98718e23cc6efd2e9e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicFitStep.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.RCD.Coordinates.AffineFitPerturbation + +namespace OAI + +/-! # The two-scale affine-fit estimate from an actual harmonic correction -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + +/-- Harmonic improvement and a harmonic correction give the one-step fit +estimate for a possibly nonharmonic L² target. The error is the actual +correction norm and the restriction loss is the actual volume ratio. -/ +theorem harmonic_affine_fit_step + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) {r θ : ℝ} (hr : 0 < r) (hθ : 0 < θ) (hθ1 : θ ≤ 1) + (hu : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u i)) + (η : SobolevSpace (hausdorff n X) hX.quadratic) + (hη : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) η) + (hηone : SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) η = + restrictedOne (hausdorff n X) (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))) + (hfit : HasNormalizedAffineImprovement hX u p r θ) + (f : Lp ℝ 2 ((hausdorff n X).restrict (ball p r))) + (h : SobolevSpace (hausdorff n X) hX.quadratic) + (hh : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) h) : + let μ := hausdorff n X + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + let C := (1 / 2 : ℝ) * θ * Real.sqrt θ + let D := Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + ‖normalizeLocalL2 μ (ball p (θ * r)) ht + (affineResidual μ hX.quadratic u (ball p (θ * r)) ht + (localL2Restriction μ (ball p r) (ball p (θ * r)) hsub f))‖ ≤ + (D + C) * ‖normalizeLocalL2 μ (ball p r) hs + (f - SobolevSpace.restrictLp μ hX.quadratic (ball p r) h)‖ + + C * ‖normalizeLocalL2 μ (ball p r) hs (affineResidual μ hX.quadratic u (ball p r) hs f)‖ := by + let μ := hausdorff n X + let s := ball p r + let t := ball p (θ * r) + let hs : μ s ≠ ∞ := ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + let ht : μ t ≠ ∞ := ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + have hsub : t ⊆ s := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + let R := localL2Restriction μ s t hsub + let Ns := fun g : Lp ℝ 2 (μ.restrict s) => ‖normalizeLocalL2 μ s hs g‖ + let Nt := fun g : Lp ℝ 2 (μ.restrict t) => ‖normalizeLocalL2 μ t ht g‖ + let C := (1 / 2 : ℝ) * θ * Real.sqrt θ + let D := Real.sqrt (μ.real s) / Real.sqrt (μ.real t) + let hsval := SobolevSpace.restrictLp μ hX.quadratic s h + let htval := SobolevSpace.restrictLp μ hX.quadratic t h + let Ps := affineProjection μ hX.quadratic u s hs + let Es := affineResidual μ hX.quadratic u s hs + let Et := affineResidual μ hX.quadratic u t ht + change Nt (Et (R f)) ≤ (D + C) * Ns (f - hsval) + C * Ns (Es f) + obtain ⟨F, c, v, hF, hFharm, hFs⟩ := affineProjection_harmonic_representative μ hX.quadratic + u s hs hu η hη hηone f + have hFs' : SobolevSpace.restrictLp μ hX.quadratic s F = + affineCoordinateMap μ hX.quadratic u s hs (c, v) := by + rw [hF, map_add, map_smul, hηone, affineCoordinateMap_apply] + have hFt : SobolevSpace.restrictLp μ hX.quadratic t F = + affineCoordinateMap μ hX.quadratic u t ht (c, v) := by + rw [← localL2Restriction_sobolev μ hX.quadratic s t hsub F, hFs', + localL2Restriction_affine] + have hHharm : IsSobolevHarmonicOn μ hX.quadratic s (h - F) := by + simpa only [neg_one_smul, ← sub_eq_add_neg] using + hh.add μ hX.quadratic (hFharm.smul μ hX.quadratic (-1)) + have himprove := hfit.homogeneous hX hr hθ1 (h - F) hHharm + change Nt (Et (SobolevSpace.restrictLp μ hX.quadratic t (h - F))) ≤ + C * Ns (SobolevSpace.restrictLp μ hX.quadratic s (h - F)) at himprove + rw [map_sub, hFt, affineResidual_sub_affine] at himprove + have houter : Ns (SobolevSpace.restrictLp μ hX.quadratic s (h - F)) ≤ + Ns (Es f) + Ns (f - hsval) := by + have he : SobolevSpace.restrictLp μ hX.quadratic s (h - F) = Es f - (f - hsval) := by + rw [map_sub, hFs] + change hsval - Ps f = (f - Ps f) - (f - hsval) + abel + rw [he] + change ‖_ • (Es f - (f - hsval))‖ ≤ ‖_ • Es f‖ + ‖_ • (f - hsval)‖ + rw [smul_sub] + exact norm_sub_le _ _ + have hC : 0 ≤ C := by dsimp only [C]; positivity + have hbound : Nt (Et htval) ≤ C * (Ns (Es f) + Ns (f - hsval)) := + himprove.trans (mul_le_mul_of_nonneg_left houter hC) + have herr : Nt (R f - htval) ≤ D * Ns (f - hsval) := by + have hrestrict := normalized_localL2Restriction_le μ s t hsub hs ht + (ne_of_gt (hX.fullSupport p r hr)) (ne_of_gt (hX.fullSupport p (θ * r) (mul_pos hθ hr))) + (f - hsval) + have hRh : R hsval = htval := localL2Restriction_sobolev μ hX.quadratic s t hsub h + have hmap : R (f - hsval) = R f - htval := by rw [map_sub, hRh] + change Nt (R (f - hsval)) ≤ D * Ns (f - hsval) at hrestrict + rwa [hmap] at hrestrict + have hperturb := normalized_affineResidual_perturbation μ hX.quadratic u t ht (R f) htval + change Nt (Et (R f)) ≤ Nt (R f - htval) + Nt (Et htval) at hperturb + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicFrameApproximation.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicFrameApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..ed9c14d878ebff57f354d1263ea0a782ea3e8063 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicFrameApproximation.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Harmonic.FiniteGramIsometricLimit +import OAI.Geometry.RCD.Harmonic.PointedAffineLimitApproximation +import OAI.Geometry.RCD.Sobolev.EverySubsequenceEventual + +namespace OAI + +/-! # The actual harmonic frame approximates a Euclidean ball -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_frame_approximation {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V v : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*r k^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w i k)) + {M : ℝ} (hM : 0 < M) (hnorm : ∀ i k, harmonicTargetNorm hX (p k) (5*r k) (w i k) ≤ M) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) (5*r k))) (hzero : ∀ k, v k (p k)=0) + (hrep : ∀ i k, SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i k) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (5*r k))] fun x => v k x i) + (hgram : ∀ i j, Tendsto (fun k => ((hausdorff n X).real (ball (p k) (5*r k)))⁻¹* + ∫ x in ball (p k) (4*r k), + |r k^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w j k) x- + (if i=j then 1 else 0)| ∂hausdorff n X) atTop (𝓝 0)) : + ∀ τ : ℝ, 0 < τ → ∀ᶠ k in atTop, + IsPointedApproximation (p k) 0 (r k) (5/2) τ (v k) := by + let := hX.openPos K n + intro τ hτ + apply eventually_of_every_subsequence + intro α hα + obtain ⟨β,hβ,g,T,haff,hconv⟩ := hX.finite_harmonic_isometric_limit hn + (p∘α) (r∘α) (ε∘α) (V∘α) (fun k => hr (α k)) (fun k => hcurv (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) + (fun k => hV (α k)) (fun i => w i∘α) (fun i k => hw i (α k)) hM + (fun i k => hnorm i (α k)) (fun i j => (hgram i j).comp hα.tendsto_atTop) + refine ⟨β,?_⟩ + exact pointed_affine_limit_approximation (hausdorff n X) hX.quadratic + (p∘α∘β) (r∘α∘β) (ε∘α∘β) (V∘α∘β) (v∘α∘β) + (fun k => hr (α (β k))) (fun k => hε (α (β k))) + ((hεlim.comp hα.tendsto_atTop).comp hβ.tendsto_atTop) + (fun k => (hV (α (β k))).metric) (fun i => w i∘α∘β) + (fun k => hv (α (β k))) (fun k => hzero (α (β k))) + (fun i k => hrep i (α (β k))) g T haff hconv τ hτ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HarmonicGlobalFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/HarmonicGlobalFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..d301ad60e575abf21c71cd1e1e74d926cc732972 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HarmonicGlobalFrameDefect.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Coordinates.GlobalFrameDefect +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError + +namespace OAI + +/-! # Global energy defect of the actual local harmonic coordinate family -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_global_frame_defect {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hn : 2≤n) (hK : K≤0) (p : X) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + {R b : ℝ} (hR : 0 localGamma μ hQ (u i) g.val x) hc + change 5*gramDefect μ hQ u x≤1 → + |localGamma μ hQ g.val g.val x-∑ i, (localGamma μ hQ (u i) g.val x)^2|≤ + Real.sqrt (30*gramDefect μ hQ u x)*|localGamma μ hQ g.val g.val x| at hx + simpa only [abs_of_nonneg hg0] using hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HausdorffLowerNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/HausdorffLowerNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..0de31febe05b9e98fffabf5670f54daa984f99e5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HausdorffLowerNormalization.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Metric.BoundedIsodiametric + +namespace OAI + +/-! # The sharp lower normalization bound from the diameter inequality -/ + +open Set Metric MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates + +theorem volume_le_normalized_hausdorff_of_isodiametric {n : ℕ} (hn : 0 < n) + (hcompact : ∀ A : Set (Euclidean n), IsCompact A → + volume.real A ≤ volume.real (closedBall (0 : Euclidean n) (diam A/2))) : + volume ≤ hausdorff n (Euclidean n) := by + let C := volume (ball (0 : Euclidean n) 1)/(2:ℝ≥0∞)^n + have hC0 : C ≠ 0 := (ENNReal.div_pos (measure_ball_pos volume 0 zero_lt_one).ne' + (by simp)).ne' + have hCtop : C ≠ ⊤ := ENNReal.div_ne_top measure_ball_ne_top (by positivity) + have hraw : C⁻¹ • (volume : Measure (Euclidean n)) ≤ Measure.hausdorffMeasure (n:ℝ) := by + apply Measure.le_hausdorffMeasure _ _ 1 zero_lt_one + intro A hA + have hb : Bornology.IsBounded A := isBounded_iff_ediam_ne_top.mpr + (ne_top_of_le_ne_top (by simp) hA) + have hh : C⁻¹*volume A ≤ C⁻¹*(C*(ediam A)^n) := by + gcongr + exact bounded_volume_le_ediam_pow hn hcompact hb + change C⁻¹*volume A ≤ ediam A^(n:ℝ) + rw [← mul_assoc,ENNReal.inv_mul_cancel hC0 hCtop,one_mul] at hh + simpa only [ENNReal.rpow_natCast] using hh + intro A + change volume A ≤ C*Measure.hausdorffMeasure (n:ℝ) A + calc + volume A = C*(C⁻¹*volume A) := by + rw [← mul_assoc,ENNReal.mul_inv_cancel hC0 hCtop,one_mul] + _ ≤ C*Measure.hausdorffMeasure (n:ℝ) A := by + gcongr + exact hraw A + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HausdorffMeasureRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/HausdorffMeasureRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ae91a047985b05058288b67da1fa05c9219e3d0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HausdorffMeasureRegularity.lean @@ -0,0 +1,22 @@ +import OAI.Geometry.RCD.Coordinates.Proper + +namespace OAI + +/-! # Regularity of the actual locally finite Hausdorff measure -/ + +noncomputable section +namespace RegularPointCoordinates +open MeasureTheory +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.hausdorff_regular {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [ProperSpace X] : (hausdorff n X).Regular := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + infer_instance + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HausdorffUpperNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/HausdorffUpperNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..e638a3c419d260c50ef44199443e93b2a24c6efa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HausdorffUpperNormalization.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Metric.HausdorffOpenUpper + +namespace OAI + +/-! # The normalized Euclidean Hausdorff measure is bounded by volume -/ + +open Set Metric MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_hausdorff_le_volume {n : ℕ} (hn : 0 < n) : + hausdorff n (Euclidean n) ≤ volume := by + have hω0 : volume (ball (0 : Euclidean n) 1) ≠ 0 := + (measure_ball_pos volume 0 zero_lt_one).ne' + have hωtop : volume (ball (0 : Euclidean n) 1) ≠ ⊤ := measure_ball_ne_top + have htwo0 : (2:ℝ≥0∞)^n ≠ 0 := by positivity + have htwotop : (2:ℝ≥0∞)^n ≠ ⊤ := by finiteness + have hopen (U : Set (Euclidean n)) (hU : IsOpen U) : + hausdorff n (Euclidean n) U ≤ volume U := by + have hh := raw_hausdorff_open_upper hn hU + change (volume (ball (0 : Euclidean n) 1)/(2:ℝ≥0∞)^n)* + Measure.hausdorffMeasure (n:ℝ) U ≤ volume U + calc + _ ≤ (volume (ball (0 : Euclidean n) 1)/(2:ℝ≥0∞)^n)* + (((2:ℝ≥0∞)^n/volume (ball (0 : Euclidean n) 1))*volume U) := by gcongr + _ = volume U := by + rw [div_eq_mul_inv,div_eq_mul_inv] + calc + _ = ((volume (ball (0 : Euclidean n) 1)* + (volume (ball (0 : Euclidean n) 1))⁻¹)* + (((2:ℝ≥0∞)^n)⁻¹*(2:ℝ≥0∞)^n))*volume U := by ac_rfl + _ = _ := by rw [ENNReal.mul_inv_cancel hω0 hωtop, + ENNReal.inv_mul_cancel htwo0 htwotop,one_mul,one_mul] + intro A + rw [A.measure_eq_iInf_isOpen volume] + apply le_iInf + intro U + apply le_iInf + intro hAU + apply le_iInf + intro hU + exact (measure_mono hAU).trans (hopen U hU) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatFrameGramBound.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatFrameGramBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..ccef36371fd18c7fd79022f2385c4b1d05b7d4b4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatFrameGramBound.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Coordinates.HeatHarmonicFrameGram +import OAI.Geometry.RCD.Heat.HeatFullMassBound + +namespace OAI + +/-! # Quantitative mixed coefficient energy for the actual harmonic frame -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.heat_frame_gram_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (p : X) {r s C : ℝ} (hr : 0 < r) (hs : 0 < s) (hC : 0 ≤ C) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p r C) + (U : Fin n → compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (q : Fin n → Lp ℝ 2 (hausdorff n X)) + (hq : ∀ i, IsWeakLaplacian (hausdorff n X) hX.quadratic (U i).val (q i)) + (hq0 : ∀ i, q i =ᵐ[(hausdorff n X).restrict (ball p (4*r))] fun _ => 0) + (hU : ∀ i, ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic (U i).val (U i).val x≤4) + (h : Lp ℝ 2 (hausdorff n X)) (V : X → ℝ) (L A : ℝ≥0) + (hV : LipschitzWith L V) (hVc : HasCompactSupport V) + (hrep : V =ᵐ[hausdorff n X] h) (hA : ∀ᵐ x ∂hausdorff n X, |h x|≤A) : + let μ := hausdorff n X + let Q := hX.quadratic + let w := heatSobolev μ Q s hs h + let ℓ := (L:ℝ)*Real.exp (-K*s) + let b := (2*(n:ℝ)*(|K|+1/s))*(A:ℝ) + let m := μ.real (closedBall p (2*r)) + let e i := ∫ x in closedBall p (2*r), |localGamma μ Q (U i).val (U i).val x-1| ∂μ + ∃ G : Fin n → SobolevSpace μ Q, + (∀ i, SobolevSpace.toLp μ Q (G i) =ᵐ[μ.restrict (ball p (4*r))] localGamma μ Q (U i).val w) ∧ + ∀ i, (∫ x in ball p r, localGamma μ Q (G i) (G i) x ∂μ)≤ + 2*ℓ^2*((C/r^2)/2*e i+(-K)*(e i+m))+ + 8*((C/r^2)/2*ℓ^2+(-K)*ℓ^2+b^2+b*ℓ*(C/r))*m := by + intro μ Q w ℓ b m e + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let L' : ℝ≥0 := ⟨ℓ,mul_nonneg L.coe_nonneg (Real.exp_pos _).le⟩ + have hw : ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ Q w x≤L' := + hX.heat_compact_slope_bdd K n hn hV hVc p h hrep s hs + have hwg : ∀ᵐ x ∂μ.restrict (ball p r), localGamma μ Q w w x≤(L':ℝ)^2 := by + filter_upwards [ae_restrict_of_ae hw,ae_restrict_of_ae (localGamma_self μ Q w), + ae_restrict_of_ae ((Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ Q w))] + with x hx he hn + rw [he] + exact pow_le_pow_left₀ hn hx 2 + have hq0' (i : Fin n) : q i =ᵐ[μ.restrict (ball p (2*(2*r)))] fun _ => 0 := by + simpa only [show 2*(2*r)=4*r by ring] using hq0 i + obtain ⟨F,σ,H,τ,hσ,hτ,G,hF,hH,hτs,hG⟩ := hX.heat_harmonic_frame_gram_data hn hK p U q hq + (show 0<2*r by linarith) hs hr (by linarith) hq0' hU h A L' hA hwg + let (i : Fin n) : IsFiniteMeasure (σ i) := hσ i + let : IsFiniteMeasure τ := hτ + have hΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2*(2*r)) := + (χ.tsupport_subset μ Q).trans (closedBall_subset_ball (by linarith)) + have hmass (i : Fin n) : (σ i).real (ball p r) ≤ (C/r^2)/2*e i+(-K)*(e i+m) := by + simpa only [one_mul] using χ.harmonic_full_mass_bound μ Q hr hC hK + (U i).val (F i) (hF i).1 hΩ (σ i) (hF i).2 1 + have hheat : τ.real (ball p r) ≤ + ((C/r^2)/2*ℓ^2+(-K)*ℓ^2+b^2+b*ℓ*(C/r))*m := + hX.heat_full_mass_bound hn hK p hr hs hC χ h V L A hV hVc hrep hA H hH hΩ τ hτs + refine ⟨G,?_,?_⟩ + · intro i + simpa only [show 2*(2*r)=4*r by ring] using (hG i).1 + · intro i + apply (hG i).2.trans + exact add_le_add (mul_le_mul_of_nonneg_left (hmass i) (by positivity)) + (by simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hheat (by norm_num : (0:ℝ)≤8)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatFrameUniformEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatFrameUniformEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad809f6bc9dd5425a82ef98edbd4b7ecf99e4196 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatFrameUniformEnergy.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Heat.ScaledHeatGramBound + +namespace OAI + +/-! # Uniform rescaled energy of the actual heat-frame coefficients -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.heat_frame_uniform_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : X) {r η C D : ℝ} (hr : 0 0) + (hU : ∀ i, ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic (U i).val (U i).val x≤4) + (he : ∀ i, (∫ x in closedBall p (2*r), + |localGamma (hausdorff n X) hX.quadratic (U i).val (U i).val x-1| ∂hausdorff n X)≤ + D*(hausdorff n X).real (ball p (4*r))) + (h : Lp ℝ 2 (hausdorff n X)) (V : X → ℝ) (L A a : ℝ≥0) + (hV : LipschitzWith L V) (hVc : HasCompactSupport V) + (hrep : V =ᵐ[hausdorff n X] h) (hA : ∀ᵐ x ∂hausdorff n X, |h x|≤A) + (hscale : (A:ℝ)≤a*r) : + let μ := hausdorff n X + let Q := hX.quadratic + let hs : 0<η*r^2 := mul_pos hη (sq_pos_of_pos hr) + let w := heatSobolev μ Q (η*r^2) hs h + let H := (L:ℝ)*Real.exp 1 + let B := 2*(n:ℝ)*(1+1/η)*(a:ℝ) + let M := 2*H^2*((C/2+1)*D+1)+8*((C/2+1)*H^2+B^2+B*H*C) + ∃ G : Fin n → SobolevSpace μ Q, + (∀ i, SobolevSpace.toLp μ Q (G i) =ᵐ[μ.restrict (ball p (4*r))] localGamma μ Q (U i).val w) ∧ + ∀ i, r^2*(∫ x in ball p r, localGamma μ Q (G i) (G i) x ∂μ)≤ + M*μ.real (ball p (4*r)) := by + intro μ Q hs w H B M + obtain ⟨G,hG,hGE⟩ := hX.heat_frame_gram_bound hn hK p hr hs hC χ U q hq hq0 hU h V L A hV hVc hrep hA + let ℓ := (L:ℝ)*Real.exp (-K*(η*r^2)) + let b := (2*(n:ℝ)*(|K|+1/(η*r^2)))*(A:ℝ) + have hℓ0 : 0≤ℓ := by dsimp only [ℓ]; positivity + have hb0 : 0≤b := by dsimp only [b]; positivity + have hℓ : ℓ≤H := by + apply mul_le_mul_of_nonneg_left _ L.coe_nonneg + apply Real.exp_le_exp.mpr + calc + -K*(η*r^2) = η*((-K)*r^2) := by ring + _ ≤ η*1 := mul_le_mul_of_nonneg_left hcurv hη.le + _ ≤ 1 := by simpa only [mul_one] using hη1 + have hb : r*b≤B := by + have hh := scaled_heat_source_bound hr hη (neg_nonneg.mpr hK) a.coe_nonneg + (Nat.cast_nonneg n) hcurv hscale + simpa only [b,B,abs_of_nonpos hK] using hh + have hmass : μ.real (closedBall p (2*r))≤μ.real (ball p (4*r)) := + measureReal_mono (closedBall_subset_ball (by linarith)) (hX.finiteOnBounded _ isBounded_ball).ne + refine ⟨G,hG,?_⟩ + intro i + exact scaled_heat_gram_energy_bound hr hC (neg_nonneg.mpr hK) hℓ0 hb0 hℓ hb + (integral_nonneg (fun _ => abs_nonneg _)) ENNReal.toReal_nonneg hcurv + (he i) hmass (hGE i) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatHamiltonRegularized.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatHamiltonRegularized.lean new file mode 100644 index 0000000000000000000000000000000000000000..21ce8dcc79732243747322219e5997ccabac4e56 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatHamiltonRegularized.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.RCD.Heat.HeatHamiltonWeighted +import OAI.Geometry.RCD.Heat.HeatReversePoincare +import OAI.Geometry.RCD.Coordinates.RegularizedHamiltonIntegrability + +namespace OAI + +/-! # The regularized Hamilton bound almost everywhere + +Finite-measure indicators test the actual entropy inequality. The bounded +regularized logarithm makes every such local integral finite, even when +the ambient measure is infinite. +-/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2≤n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn p + +omit hn p [SeparableSpace X] [IsLocallyFiniteMeasure (hausdorff n X)] in +private theorem heat_hamilton_regularized_integrableOn + (f : Lp ℝ 2 (hausdorff n X)) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) + {T ε : ℝ} (hT : 0 T*Real.exp (-2*|K| * T)*localGamma (hausdorff n X) hX.quadratic + (heatSobolev (hausdorff n X) hX.quadratic T hT f) + (heatSobolev (hausdorff n X) hX.quadratic T hT f) x / + (ε+heatAt (hausdorff n X) hX.quadratic T f x)) s (hausdorff n X) ∧ + IntegrableOn (fun x => (ε+heatAt (hausdorff n X) hX.quadratic T f x)* + (Real.log (ε+A)-Real.log (ε+heatAt (hausdorff n X) hX.quadratic T f x))) s (hausdorff n X) := by + let μ := hausdorff n X + let Q := hX.quadratic + let u := heatSobolev μ Q T hT f + let v := heatAt μ Q T f + let c := T*Real.exp (-2*|K| * T) + have hv : ∀ᵐ x ∂μ, v x∈Icc 0 (A:ℝ) := by + filter_upwards [(Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ Q T f hf0), + heatAt_abs_le_const μ Q T A f hf] with x hx hy + exact ⟨hx,(le_abs_self _).trans hy⟩ + have hu : ∀ᵐ x ∂μ, 0≤SobolevSpace.toLp μ Q u x := by + simpa only [u,heatSobolev_toLp] using hv.mono (fun _ hx => hx.1) + have hFi := regularized_gamma_integrable μ Q u hε hu c + intro s hs + refine ⟨?_,shifted_log_gap_integrableOn μ v hε A hv hs⟩ + simpa only [u,heatSobolev_toLp] using hFi.integrableOn (s:=s) + + +theorem heat_hamilton_regularized + (f : Lp ℝ 2 (hausdorff n X)) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) + {T ε : ℝ} (hT : 0 c*localGamma μ Q u u x/(ε+v x) + let R := fun x => (ε+v x)*(Real.log (ε+A)-Real.log (ε+v x)) + have hv : ∀ᵐ x ∂μ, v x∈Icc 0 (A:ℝ) := by + filter_upwards [(Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ Q T f hf0), + heatAt_abs_le_const μ Q T A f hf] with x hx hy + exact ⟨hx,(le_abs_self _).trans hy⟩ + have hdata := hX.heat_hamilton_regularized_integrableOn f hf0 A hf hT hε + have hFi (s : Set X) (hs : μ s<∞) : IntegrableOn F s μ := (hdata s hs).1 + have hRi (s : Set X) (hs : μ s<∞) : IntegrableOn R s μ := (hdata s hs).2 + have hp : 0≤ᵐ[μ] fun x => R x-F x := by + apply ae_nonneg_of_forall_setIntegral_nonneg_of_sigmaFinite + · intro s _ hs + exact (hRi s hs).sub (hFi s hs) + · intro s hs hfin + let w : Lp ℝ 2 μ := indicatorConstLp 2 hs hfin.ne 1 + have hwr : w =ᵐ[μ] s.indicator (fun _ => (1:ℝ)) := indicatorConstLp_coeFn + have hw0 : 0≤w := by + apply (Lp.coeFn_nonneg _).mp + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hwb : ∀ᵐ x ∂μ, |w x|≤(1:ℝ≥0) := by + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hh := hX.heat_hamilton_weighted hn p f w hf0 hw0 A 1 hf hwb + (integrable_indicatorConstLp hs hfin.ne 1) hT hε + have hi : (∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ) = + ∫ x in s, localGamma μ Q u u x/(ε+v x) ∂μ := by + calc + _ = ∫ x, w x*(localGamma μ Q u u x/(ε+v x)) ∂μ := by simp only [mul_div_assoc] + _ = _ := integral_indicatorConstLp_mul μ s hs hfin.ne _ + have hr : (∫ x, w x*(ε+v x)*(Real.log (ε+A)-Real.log (ε+v x)) ∂μ) = + ∫ x in s, R x ∂μ := by + calc + _ = ∫ x, w x*R x ∂μ := by dsimp only [R]; simp only [mul_assoc] + _ = _ := integral_indicatorConstLp_mul μ s hs hfin.ne _ + change c*(∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ)≤_ at hh + rw [hi,hr] at hh + rw [integral_sub (hRi s hfin) (hFi s hfin)] + have hFint : (∫ x in s, F x ∂μ) = c*(∫ x in s, localGamma μ Q u u x/(ε+v x) ∂μ) := by + dsimp only [F] + simp only [mul_div_assoc,integral_const_mul] + rw [hFint] + linarith only [hh] + filter_upwards [hp,hv] with x hx hvx + have hden : 0<ε+v x := add_pos_of_pos_of_nonneg hε hvx.1 + have hle : F x≤R x := sub_nonneg.mp hx + have hm := (div_le_iff₀ hden).mp hle + dsimp only [F,R] at hm + dsimp only [c,u,v] at hm ⊢ + nlinarith only [hm] + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatHarmonicFrameGram.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatHarmonicFrameGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..a47fbf4c6934466589e5a98a1683b15dbf6ac744 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatHarmonicFrameGram.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Heat.HeatMixedGramEnergy +import OAI.Geometry.RCD.Sobolev.HarmonicCoreBochnerMeasure + +namespace OAI + +/-! # One heat Bochner measure for the whole original harmonic frame -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.heat_harmonic_frame_gram_data {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (p : X) (U : Fin n → compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (q : Fin n → Lp ℝ 2 (hausdorff n X)) + (hq : ∀ i, IsWeakLaplacian (hausdorff n X) hX.quadratic (U i).val (q i)) + {r s t : ℝ} (hr : 0 < r) (hs : 0 < s) (ht : 0 < t) (htr : t < 2*r) + (hq0 : ∀ i, q i =ᵐ[(hausdorff n X).restrict (ball p (2*r))] fun _ => 0) + (hU : ∀ i, ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic (U i).val (U i).val x≤4) + (h : Lp ℝ 2 (hausdorff n X)) (A Ca : ℝ≥0) + (hA : ∀ᵐ x ∂hausdorff n X, |h x|≤A) + (hCa : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic + (heatSobolev (hausdorff n X) hX.quadratic s hs h) + (heatSobolev (hausdorff n X) hX.quadratic s hs h) x≤(Ca:ℝ)^2) : + let μ := hausdorff n X + let Q := hX.quadratic + let w := heatSobolev μ Q s hs h + let d := heatSobolevMap μ Q (s/2) (half_pos hs) (-heatGeneratorAt μ Q (s-s/2) h) + ∃ (F : Fin n → SobolevSpace μ Q) (σ : Fin n → Measure X) + (H : SobolevSpace μ Q) (τ : Measure X) + (hσ : ∀ i, IsFiniteMeasure (σ i)) (hτ : IsFiniteMeasure τ), + letI (i : Fin n) := hσ i + letI := hτ + ∃ G : Fin n → SobolevSpace μ Q, + (∀ i, (SobolevSpace.toLp μ Q (F i) =ᵐ[μ] localGamma μ Q (U i).val (U i).val) ∧ + IsMeasureLaplacianOn μ Q (ball p (2*r)) (F i) + (bochnerGramSource μ Q K (U i).val (U i).val 0 0 (σ i).toSignedMeasure)) ∧ + (SobolevSpace.toLp μ Q H =ᵐ[μ] localGamma μ Q w w) ∧ + IsMeasureLaplacianOn μ Q (ball p (2*r)) H (bochnerGramSource μ Q K w w d d τ.toSignedMeasure) ∧ + ∀ i, (SobolevSpace.toLp μ Q (G i) =ᵐ[μ.restrict (ball p (2*r))] localGamma μ Q (U i).val w) ∧ + (∫ x in ball p t, localGamma μ Q (G i) (G i) x ∂μ)≤ + 2*(Ca:ℝ)^2*(σ i).real (ball p t)+8*τ.real (ball p t) := by + intro μ Q w d + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + choose F σ hσ hF hFsource using fun i => + hX.harmonic_core_bochner_measure hn (U i) (q i) (hq i) p (show 0 < 2*r by linarith) (hq0 i) + let (i : Fin n) : IsFiniteMeasure (σ i) := hσ i + obtain ⟨H,τ,hτ,hH,hτsource⟩ := hX.bounded_heat_full_source hn hK p h A hA hs hr + let := hτ + let hk := hX.canonicalHeatKernel_isContinuousHeatKernel hn p + obtain ⟨hLip,_⟩ := hX.kernelHeat_bounded_regularity hn p hk h A hA s hs + have hw : SobolevSpace.toLp μ Q w =ᵐ[μ] kernelHeat μ Q hk s h := by + simpa only [w,heatSobolev_toLp] using (kernelHeat_represents_L2 μ Q hk hs h).symm + have hWA := (hX.bounded_heat_sobolev_data hn p h A hA hs).1 + have hd : IsWeakLaplacian μ Q w (SobolevSpace.toLp μ Q d) := heatTail_weak_laplacian μ Q s hs h + have hdt : SobolevSpace.toLp μ Q d = -heatGeneratorAt μ Q s h := + heatTail_deriv_toLp μ Q (s/2) (half_pos hs) h s (by linarith) + let B : ℝ≥0 := ⟨(2*(n:ℝ)*(|K|+1/s))*(A:ℝ),by positivity⟩ + have hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q d x|≤B := by + rw [hdt] + filter_upwards [hX.heatGeneratorAt_amplitude hn p hK h A hA hs, + Lp.coeFn_neg (heatGeneratorAt μ Q s h)] with x hx he + rw [he] + change |-heatGeneratorAt μ Q s h x|≤(2*(n:ℝ)*(|K|+1/s))*(A:ℝ) + simpa only [abs_neg] using hx + have hUi (i : Fin n) : ∀ᵐ x ∂μ.restrict (ball p t), localGamma μ Q (U i).val (U i).val x≤(2:ℝ≥0)^2 := by + simpa only [NNReal.coe_ofNat,show (2:ℝ)^2=4 by norm_num] using hU i + choose G hG henergy using fun i => hX.bounded_regular_gram_energy hn hK (U i) (q i) (hq i) + w d hd (kernelHeat μ Q hk s h) hLip hw hWA hB p hr ht htr (hq0 i) (F i) H (σ i) τ + (ae_restrict_of_ae (hF i)) (ae_restrict_of_ae hH) (hFsource i) hτsource 2 Ca (hUi i) hCa + refine ⟨F,σ,H,τ,hσ,hτ,G,fun i => ⟨hF i,hFsource i⟩,hH,hτsource,?_⟩ + intro i + refine ⟨hG i,?_⟩ + simpa only [NNReal.coe_ofNat,show (2:ℝ)*2^2=8 by norm_num] using henergy i + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauParameterRegularized.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauParameterRegularized.lean new file mode 100644 index 0000000000000000000000000000000000000000..74435691eeda97a693b4de489d79858fed0f1616 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauParameterRegularized.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Heat.HeatLiYauParameterWeighted +import OAI.Geometry.RCD.Coordinates.RegularizedHamiltonIntegrability +import OAI.Geometry.RCD.Heat.HeatReversePoincare + +namespace OAI + +/-! # The arbitrary-parameter regularized Li--Yau estimate almost everywhere + +Finite-measure indicators identify the actual generator and gradient +representatives. All source integrals are justified locally in L². +-/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2≤n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn p + +theorem heat_liYau_parameter_regularized (hK : K≤0) (α : ℝ) (hα : 1 < α) + (f : Lp ℝ 2 (hausdorff n X)) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) + {T ε : ℝ} (hT : 0 localGamma μ Q u u x/(ε+v x) + let R := fun x => c*(ε+v x)+α*d x + have hv : ∀ᵐ x ∂μ, 0≤v x := by + filter_upwards [(Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ Q T f hf0)] with x hx + exact hx + have hu : ∀ᵐ x ∂μ, 0≤SobolevSpace.toLp μ Q u x := hv + have hFi : Integrable F μ := by + simpa only [F,one_mul,u,heatSobolev_toLp] using regularized_gamma_integrable μ Q u hε hu 1 + have hRi (s : Set X) (hs : μ s<∞) : IntegrableOn R s μ := by + let : IsFiniteMeasure (μ.restrict s) := ⟨by simpa only [Measure.restrict_apply_univ] using hs⟩ + have hvi := ((Lp.memLp v).restrict s).integrable (by norm_num) + have hdi := ((Lp.memLp d).restrict s).integrable (by norm_num) + exact (((integrable_const ε).add hvi).const_mul c).add (hdi.const_mul α) + have hp : 0≤ᵐ[μ] fun x => R x-F x := by + apply ae_nonneg_of_forall_setIntegral_nonneg_of_sigmaFinite + · intro s _ hs + exact (hRi s hs).sub hFi.integrableOn + · intro s hs hfin + by_cases hs0 : μ s=0 + · have he : μ.restrict s=0 := Measure.restrict_eq_zero.mpr hs0 + simp only [he,integral_zero_measure,le_refl] + let w : Lp ℝ 2 μ := indicatorConstLp 2 hs hfin.ne 1 + have hwr : w =ᵐ[μ] s.indicator (fun _ => (1:ℝ)) := indicatorConstLp_coeFn + have hw0 : 0≤w := by + apply (Lp.coeFn_nonneg _).mp + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hwb : ∀ᵐ x ∂μ, |w x|≤(1:ℝ≥0) := by + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hmass : (∫ x, w x ∂μ)=μ.real s := by + simpa only [w,smul_eq_mul,mul_one] using integral_indicatorConstLp (p:=2) hs hfin.ne (1:ℝ) + have hwm : 0<∫ x, w x ∂μ := hmass.symm ▸ ENNReal.toReal_pos hs0 hfin.ne + have hh := hX.heat_liYau_parameter_weighted hn p hK α hα f w hf0 hw0 A 1 hf hwb + (integrable_indicatorConstLp hs hfin.ne 1) hwm hT hε + have he (g : Lp ℝ 2 μ) : inner ℝ w g=∫ x in s, g x ∂μ := by + rw [L2.inner_def] + simpa only [Real.inner_apply] using integral_indicatorConstLp_mul μ s hs hfin.ne g + have hF : (∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ)=∫ x in s, F x ∂μ := by + simp only [mul_div_assoc] + exact integral_indicatorConstLp_mul μ s hs hfin.ne F + change (∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ)-α*inner ℝ w d≤ + ((n:ℝ)*(ε*(∫ x, w x ∂μ)+inner ℝ w v)*α^2/2)*(|K|/(α-1)+1/T) at hh + rw [hF,he d,he v,hmass] at hh + let : IsFiniteMeasure (μ.restrict s) := ⟨by simpa only [Measure.restrict_apply_univ] using hfin⟩ + have hvi := ((Lp.memLp v).restrict s).integrable (by norm_num) + have hdi := ((Lp.memLp d).restrict s).integrable (by norm_num) + have hR : (∫ x in s, R x ∂μ)=c*(ε*μ.real s+∫ x in s, v x ∂μ)+α*(∫ x in s, d x ∂μ) := by + have hadd := integral_add (((integrable_const ε).add hvi).const_mul c) (hdi.const_mul α) + have hsum := integral_add (integrable_const ε) hvi + simp only [Pi.add_apply] at hadd hsum + change (∫ x in s, c*(ε+v x)+α*d x ∂μ)=_ + rw [hadd,integral_const_mul,integral_const_mul,hsum,integral_const] + simp only [Measure.restrict_apply_univ,smul_eq_mul,Measure.real] + ring + rw [integral_sub (hRi s hfin) hFi.integrableOn,hR] + dsimp only [c] + nlinarith only [hh] + filter_upwards [hp,hv] with x hx hy + have hden : 0<ε+v x := add_pos_of_pos_of_nonneg hε hy + have hle : F x≤R x := sub_nonneg.mp hx + have hb := (div_le_iff₀ hden).mp hle + dsimp only [F,R,c,u,v,d] at hb ⊢ + nlinarith only [hb] + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauRegularized.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauRegularized.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d40ec2e295b8f70ee2616e58b9ea0ca8fd9f780 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatLiYauRegularized.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Heat.HeatLiYauWeighted +import OAI.Geometry.RCD.Coordinates.RegularizedHamiltonIntegrability +import OAI.Geometry.RCD.Heat.HeatReversePoincare + +namespace OAI + +/-! # The regularized Li--Yau estimate almost everywhere + +Finite-measure indicators identify the actual generator and gradient +representatives. All source integrals are justified locally in L². +-/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2≤n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn p + +theorem heat_liYau_regularized (hK : K≤0) + (f : Lp ℝ 2 (hausdorff n X)) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) + {T ε : ℝ} (hT : 0 localGamma μ Q u u x/(ε+v x) + let R := fun x => c*(ε+v x)+2*d x + have hv : ∀ᵐ x ∂μ, 0≤v x := by + filter_upwards [(Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ Q T f hf0)] with x hx + exact hx + have hu : ∀ᵐ x ∂μ, 0≤SobolevSpace.toLp μ Q u x := hv + have hFi : Integrable F μ := by + simpa only [F,one_mul,u,heatSobolev_toLp] using regularized_gamma_integrable μ Q u hε hu 1 + have hRi (s : Set X) (hs : μ s<∞) : IntegrableOn R s μ := by + let : IsFiniteMeasure (μ.restrict s) := ⟨by simpa only [Measure.restrict_apply_univ] using hs⟩ + have hvi := ((Lp.memLp v).restrict s).integrable (by norm_num) + have hdi := ((Lp.memLp d).restrict s).integrable (by norm_num) + exact (((integrable_const ε).add hvi).const_mul c).add (hdi.const_mul 2) + have hp : 0≤ᵐ[μ] fun x => R x-F x := by + apply ae_nonneg_of_forall_setIntegral_nonneg_of_sigmaFinite + · intro s _ hs + exact (hRi s hs).sub hFi.integrableOn + · intro s hs hfin + by_cases hs0 : μ s=0 + · have he : μ.restrict s=0 := Measure.restrict_eq_zero.mpr hs0 + simp only [he,integral_zero_measure,le_refl] + let w : Lp ℝ 2 μ := indicatorConstLp 2 hs hfin.ne 1 + have hwr : w =ᵐ[μ] s.indicator (fun _ => (1:ℝ)) := indicatorConstLp_coeFn + have hw0 : 0≤w := by + apply (Lp.coeFn_nonneg _).mp + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hwb : ∀ᵐ x ∂μ, |w x|≤(1:ℝ≥0) := by + filter_upwards [hwr] with x hx + rw [hx] + by_cases h : x∈s <;> simp [h] + have hmass : (∫ x, w x ∂μ)=μ.real s := by + simpa only [w,smul_eq_mul,mul_one] using integral_indicatorConstLp (p:=2) hs hfin.ne (1:ℝ) + have hwm : 0<∫ x, w x ∂μ := hmass.symm ▸ ENNReal.toReal_pos hs0 hfin.ne + have hh := hX.heat_liYau_weighted hn p hK f w hf0 hw0 A 1 hf hwb + (integrable_indicatorConstLp hs hfin.ne 1) hwm hT hε + have he (g : Lp ℝ 2 μ) : inner ℝ w g=∫ x in s, g x ∂μ := by + rw [L2.inner_def] + simpa only [Real.inner_apply] using integral_indicatorConstLp_mul μ s hs hfin.ne g + have hF : (∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ)=∫ x in s, F x ∂μ := by + simp only [mul_div_assoc] + exact integral_indicatorConstLp_mul μ s hs hfin.ne F + change (∫ x, w x*localGamma μ Q u u x/(ε+v x) ∂μ)-2*inner ℝ w d≤ + 2*(n:ℝ)*(ε*(∫ x, w x ∂μ)+inner ℝ w v)*(|K|+1/T) at hh + rw [hF,he d,he v,hmass] at hh + let : IsFiniteMeasure (μ.restrict s) := ⟨by simpa only [Measure.restrict_apply_univ] using hfin⟩ + have hvi := ((Lp.memLp v).restrict s).integrable (by norm_num) + have hdi := ((Lp.memLp d).restrict s).integrable (by norm_num) + have hR : (∫ x in s, R x ∂μ)=c*(ε*μ.real s+∫ x in s, v x ∂μ)+2*(∫ x in s, d x ∂μ) := by + have hadd := integral_add (((integrable_const ε).add hvi).const_mul c) (hdi.const_mul 2) + have hsum := integral_add (integrable_const ε) hvi + simp only [Pi.add_apply] at hadd hsum + change (∫ x in s, c*(ε+v x)+2*d x ∂μ)=_ + rw [hadd,integral_const_mul,integral_const_mul,hsum,integral_const] + simp only [Measure.restrict_apply_univ,smul_eq_mul,Measure.real] + ring + rw [integral_sub (hRi s hfin) hFi.integrableOn,hR] + dsimp only [c] + nlinarith only [hh] + filter_upwards [hp,hv] with x hx hy + have hden : 0<ε+v x := add_pos_of_pos_of_nonneg hε hy + have hle : F x≤R x := sub_nonneg.mp hx + have hb := (div_le_iff₀ hden).mp hle + dsimp only [F,R,c,u,v,d] at hb ⊢ + nlinarith only [hb] + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatNormalizationVolume.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatNormalizationVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfd66b934e7beb38531ce85fb3cd0ea33edb418b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatNormalizationVolume.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Heat.HeatGaussianRadius +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Volume factors at the Gaussian localization scale + +These estimates use the actual CD volume comparison already proved for +the space. There is no model-volume or Gaussian premise. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + +include hX hn + +theorem NoncollapsedRCD.ball_volume_ratio_exp (p q : X) {r R : ℝ} + (hr : 0 < r) (hrR : r ≤ R) (hq : dist q p ≤ R) : + (hausdorff n X).real (ball p R) ≤ + (2*R/r*Real.exp (4*Real.sqrt |K| *R))^n*(hausdorff n X).real (ball q r) := by + have hR : 0 < R := hr.trans_le hrR + have ha : 0 ≤ |K| *R^2 := mul_nonneg (abs_nonneg K) (sq_nonneg R) + have hcurv : -(|K| *R^2) ≤ K*R^2 := by + nlinarith only [mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg R)] + have hb := hX.rescaled_ball_volume_lower hn ha (div_pos hr hR) + ((div_le_one hR).mpr hrR) p R hR hcurv q hq + have hsqrt : Real.sqrt (|K| *R^2) = Real.sqrt |K| *R := by + rw [Real.sqrt_mul (abs_nonneg K),Real.sqrt_sq hR.le] + rw [hsqrt,div_mul_cancel₀ r hR.ne'] at hb + let a := 2*R/r*Real.exp (4*Real.sqrt |K| *R) + have ha0 : 0 ≤ a := by dsimp only [a]; positivity + have he : a*((r/R)/(2*Real.exp (4*(Real.sqrt |K| *R)))) = 1 := by + dsimp only [a] + rw [show 4*(Real.sqrt |K| *R) = 4*Real.sqrt |K| *R by ring] + field_simp + have hh := mul_le_mul_of_nonneg_left hb (pow_nonneg ha0 n) + rw [← mul_assoc,← mul_pow,he,one_pow,one_mul] at hh + exact hh + +theorem NoncollapsedRCD.gaussian_normalization_volume (y q : X) {t d : ℝ} + (ht : 0 < t) (hd : 0 ≤ d) (hq : dist q y ≤ d) : + (hausdorff n X).real (ball y (Real.sqrt t)) ≤ + (4^n*Real.exp ((n:ℝ)*(d/Real.sqrt t)+5*(n:ℝ)*Real.sqrt (|K| *t)+ + 4*(n:ℝ)*Real.sqrt |K| *d)) * + (hausdorff n X).real (ball q (gaussianRadius K t)) := by + let T := Real.sqrt t + let u := Real.sqrt (|K| *t) + let R := T+d + let r := gaussianRadius K t + have hT : 0 < T := Real.sqrt_pos.mpr ht + have hr : 0 < r := gaussianRadius_pos K ht + have hrR : r ≤ R := (gaussianRadius_le K ht).trans (by dsimp only [R,T]; linarith [Real.sqrt_nonneg t]) + have hqR : dist q y ≤ R := hq.trans (by dsimp only [R]; linarith) + have hh := hX.ball_volume_ratio_exp hn y q hr hrR hqR + have hV : (hausdorff n X).real (ball y T) ≤ (hausdorff n X).real (ball y R) := + measureReal_mono (ball_subset_ball (by dsimp only [R]; linarith)) + (hX.finiteOnBounded _ isBounded_ball).ne + have hbase : 2*R/r*Real.exp (4*Real.sqrt |K| *R) ≤ + 4*Real.exp (d/T+5*u+4*Real.sqrt |K| *d) := by + have he : 2*R/r = 4*(1+d/T)*(1+u) := by + dsimp only [R,r,gaussianRadius,T,u] + field_simp + ring + have hu0 : 0 ≤ u := Real.sqrt_nonneg _ + have hdt : 0 ≤ d/T := div_nonneg hd hT.le + have h1 : 1+d/T ≤ Real.exp (d/T) := by linarith only [Real.add_one_le_exp (d/T)] + have h2 : 1+u ≤ Real.exp u := by linarith only [Real.add_one_le_exp u] + have hs : Real.sqrt |K| *T = u := by + dsimp only [T,u] + rw [Real.sqrt_mul (abs_nonneg K)] + rw [he] + calc + _ ≤ (4*(Real.exp (d/T)*Real.exp u))*Real.exp (4*Real.sqrt |K| *R) := by + simpa only [mul_assoc] using mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (mul_le_mul h1 h2 (by positivity) (Real.exp_pos _).le) + (by norm_num : (0:ℝ) ≤ 4)) (Real.exp_pos (4*Real.sqrt |K| *R)).le + _ = _ := by + rw [mul_assoc (4:ℝ),← Real.exp_add,← Real.exp_add] + congr 2 + dsimp only [R] + nlinarith only [hs] + have hcoef := pow_le_pow_left₀ (by positivity : (0:ℝ) ≤ 2*R/r*Real.exp (4*Real.sqrt |K| *R)) hbase n + have he : (4*Real.exp (d/T+5*u+4*Real.sqrt |K| *d))^n = + 4^n*Real.exp ((n:ℝ)*(d/T)+5*(n:ℝ)*u+4*(n:ℝ)*Real.sqrt |K| *d) := by + rw [mul_pow,← Real.exp_nat_mul] + congr 2 + ring + rw [he] at hcoef + exact hV.trans (hh.trans (mul_le_mul_of_nonneg_right hcoef ENNReal.toReal_nonneg)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatRegularSourceGram.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatRegularSourceGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5e4ee9d1bfd98caea15bdb62e12cce7a865520a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatRegularSourceGram.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Heat.HeatGamma +import OAI.Geometry.RCD.Sobolev.GammaL2Bound + +namespace OAI + +/-! # Sobolev sources and Gram functions of a bounded-gradient heat state -/ + +open Set Filter MeasureTheory +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] + +theorem NoncollapsedRCD.heat_regular_source_gram {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + (f : Lp ℝ 2 (hausdorff n X)) {t : ℝ} (ht : 0 (SobolevSpace.minimalSlope μ Q U x)^2) =ᵐ[μ] H := + (localGamma_self μ Q U).symm.trans hHr.symm + have hHb : ∀ᵐ x ∂μ, |H x|≤(L:ℝ)^2 := by + filter_upwards [hHs,hL,(Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ Q U)] with x hx hl hn + rw [←hx,abs_of_nonneg (sq_nonneg _)] + exact pow_le_pow_left₀ hn hl 2 + have hE : energyLp μ H ≠ ∞ := hX.heat_gamma_finite_energy hn p f ht H (L^2) hHs + (by simpa only [NNReal.coe_pow] using hHb) + let D := heatSobolevMap μ Q (t/2) (half_pos ht) (-heatGeneratorAt μ Q (t-t/2) f) + exact ⟨D,⟨H,hE⟩,heatTail_weak_laplacian μ Q t ht f,hHr,hHb⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HeatRegularizedEntropy.lean b/lean/OAI/Geometry/RCD/Coordinates/HeatRegularizedEntropy.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ae4b3c68331d775c9f7d5ffa6844b34a3848297 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HeatRegularizedEntropy.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Transport.LocalSmoothEntropy +import OAI.Geometry.RCD.Heat.HeatNonlinearPairingDerivative + +namespace OAI + +/-! # Exact regularized entropy differentiation for the actual heat paths -/ + +open Set Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates + +def shiftedEntropy (ε a : ℝ) : ℝ := + (ε+a)*(Real.log (ε+a)-Real.log ε)-a + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + +theorem heat_shiftedEntropy_hasDerivAt {ε : ℝ} (hε : 0<ε) + (f w : Lp ℝ 2 μ) (hf0 : 0≤f) (A B : ℝ≥0) + (hf : ∀ᵐ x ∂μ, |f x|≤A) (hw : ∀ᵐ x ∂μ, |w x|≤B) + {T t : ℝ} (ht : 0 ∫ x, heatAt μ hQ s w x * + shiftedEntropy ε (heatAt μ hQ (T-s) f x) ∂μ) + (∫ x, heatAt μ hQ t w x * + (localGamma μ hQ (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) + (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) x / + (ε+heatAt μ hQ (T-t) f x)) ∂μ) t := by + obtain ⟨Φ,φ,ψ,C,D,M,N,hΦ,hφ,hψ,hΦ0,hφ0,hdΦ,hdφ,hM,hN,he⟩ := + exists_local_smooth_entropy hε A.coe_nonneg + have hval (s : ℝ) : ∀ᵐ x ∂μ, heatAt μ hQ (T-s) f x ∈ Icc 0 (A:ℝ) := by + filter_upwards [(Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ hQ (T-s) f hf0), + heatAt_abs_le_const μ hQ (T-s) A f hf] with x hx hb + exact ⟨hx,(le_abs_self _).trans hb⟩ + have hp (s : ℝ) : inner ℝ (heatAt μ hQ s w) (hΦ.compLp hΦ0 (heatAt μ hQ (T-s) f)) = + ∫ x, heatAt μ hQ s w x * shiftedEntropy ε (heatAt μ hQ (T-s) f x) ∂μ := by + rw [L2.inner_def] + apply integral_congr_ae + filter_upwards [hΦ.coeFn_compLp hΦ0 (heatAt μ hQ (T-s) f),hval s] with x hx hv + simp only [Real.inner_apply,Function.comp_apply,hx, (he _ hv).2.2,shiftedEntropy] + have hh := heat_nonlinear_pairing_hasDerivAt μ hQ hΦ hΦ0 hφ hφ0 hψ hdΦ hdφ + M N hM hN f w B hw ht htT L hL + simp_rw [hp] at hh + have heq : (∫ x, heatAt μ hQ t w x * (ψ (heatAt μ hQ (T-t) f x) * + localGamma μ hQ (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) + (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) x) ∂μ) = + ∫ x, heatAt μ hQ t w x * + (localGamma μ hQ (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) + (heatSobolev μ hQ (T-t) (sub_pos.mpr htT) f) x / + (ε+heatAt μ hQ (T-t) f x)) ∂μ := by + apply integral_congr_ae + filter_upwards [hval t] with x hx + rw [(he _ hx).1,div_eq_mul_inv] + ring + rwa [heq] at hh + +theorem heat_shiftedEntropy_continuous {ε : ℝ} (hε : 0<ε) + (f w : Lp ℝ 2 μ) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂μ, |f x|≤A) (T : ℝ) : + Continuous (fun s => ∫ x, heatAt μ hQ s w x * + shiftedEntropy ε (heatAt μ hQ (T-s) f x) ∂μ) := by + obtain ⟨Φ,φ,ψ,C,D,M,N,hΦ,hφ,hψ,hΦ0,hφ0,hdΦ,hdφ,hM,hN,he⟩ := + exists_local_smooth_entropy hε A.coe_nonneg + have hp (s : ℝ) : (∫ x, heatAt μ hQ s w x * + shiftedEntropy ε (heatAt μ hQ (T-s) f x) ∂μ) = + inner ℝ (heatAt μ hQ s w) (hΦ.compLp hΦ0 (heatAt μ hQ (T-s) f)) := by + rw [L2.inner_def] + apply integral_congr_ae + filter_upwards [hΦ.coeFn_compLp hΦ0 (heatAt μ hQ (T-s) f), + (Lp.coeFn_nonneg _).mpr (heatAt_nonneg μ hQ (T-s) f hf0), + heatAt_abs_le_const μ hQ (T-s) A f hf] with x hx hn hb + have hv : heatAt μ hQ (T-s) f x ∈ Icc 0 (A:ℝ) := ⟨hn,(le_abs_self _).trans hb⟩ + simp only [Real.inner_apply,Function.comp_apply,hx,(he _ hv).2.2,shiftedEntropy] + simp_rw [hp] + exact (heatAt_continuous μ hQ w).inner + ((hΦ.continuous_compLp hΦ0).comp ((heatAt_continuous μ hQ f).comp (continuous_const.sub continuous_id))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/HessianCoordinateForm.lean b/lean/OAI/Geometry/RCD/Coordinates/HessianCoordinateForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..52b2d4c60bdc7d51f03454b93689b06bcfb5c8af --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/HessianCoordinateForm.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Coordinates.GammaCoordinateForm +import OAI.Geometry.RCD.Sobolev.HessianActionLocality + +namespace OAI + +/-! # Finite bilinear representatives of the actual Hessian action -/ + +open Set Filter MeasureTheory +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +theorem gamma_bilinear_right_rep (f : SobolevSpace μ hQ) + (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) (a b : Euclidean m) : + localGamma μ hQ f (B a b) =ᵐ[μ] fun x => + coordinateBilinear (fun i j => localGamma μ hQ f + (B (EuclideanSpace.single i 1) (EuclideanSpace.single j 1)) x) a b := by + classical + let e (i : Fin m) : Euclidean m := EuclideanSpace.single i 1 + have he : coordinateBilinear (fun i j => B (e i) (e j))=B := by + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro i + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro j + simp [coordinateBilinear,EuclideanSpace.basisFun_apply,e] + have hb : B a b=∑ i : Fin m, ∑ j : Fin m, (a i*b j) • B (e i) (e j) := by + have hh := congrArg (fun T : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ => T a b) he + rw [coordinateBilinear_apply] at hh + exact hh.symm + have hout := localGamma_finset_sum_right μ hQ Finset.univ f + (fun i => ∑ j : Fin m, (a i*b j) • B (e i) (e j)) + have hin (i : Fin m) := localGamma_finset_sum_right μ hQ Finset.univ f + (fun j => (a i*b j) • B (e i) (e j)) + have hs (i j : Fin m) := localGamma_smul_right μ hQ (a i*b j) f (B (e i) (e j)) + rw [hb] + filter_upwards [hout,ae_all_iff.mpr hin,ae_all_iff.mpr (fun i => ae_all_iff.mpr (hs i))] + with x ho hi hs + rw [ho] + simp only [coordinateBilinear_apply,smul_eq_mul] + apply Finset.sum_congr rfl + intro i _ + rw [hi i] + exact Finset.sum_congr rfl (fun j _ => hs i j) + +def hessianCoordinateForm (f : SobolevSpace μ hQ) + (U G : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) (x : X) : + Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ := + (1/2:ℝ) • (gammaCoordinateForm μ hQ U G x+(gammaCoordinateForm μ hQ U G x).flip- + coordinateBilinear (fun i j => localGamma μ hQ f + (B (EuclideanSpace.single i 1) (EuclideanSpace.single j 1)) x)) + +/-- Finite bilinear representatives preserve the full three-term action. -/ +theorem hessianCoordinateForm_rep (f : SobolevSpace μ hQ) + (U G : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) (a b : Euclidean m) : + localHessianAction μ hQ f (U a) (U b) (G a) (G b) (B a b) =ᵐ[μ] + fun x => hessianCoordinateForm μ hQ f U G B x a b := by + filter_upwards [gammaCoordinateForm_rep μ hQ U G a b,gammaCoordinateForm_rep μ hQ U G b a, + gamma_bilinear_right_rep μ hQ f B a b] with x h₁ h₂ h₃ + change (localGamma μ hQ (U a) (G b) x+localGamma μ hQ (U b) (G a) x- + localGamma μ hQ f (B a b) x)/2 = (1/2:ℝ)*_ + rw [h₁,h₂,h₃] + simp only [LinearMap.sub_apply,LinearMap.add_apply,LinearMap.flip_apply] + ring + +omit [ProperSpace X] in +theorem hessianCoordinateForm_symmetric (f : SobolevSpace μ hQ) + (U G : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (hB : ∀ a b, B a b=B b a) (x : X) (a b : Euclidean m) : + hessianCoordinateForm μ hQ f U G B x a b=hessianCoordinateForm μ hQ f U G B x b a := by + have hc := coordinateBilinear_symmetric + (fun i j => localGamma μ hQ f (B (EuclideanSpace.single i 1) (EuclideanSpace.single j 1)) x) + (fun i j => by rw [hB]) a b + change (1/2:ℝ)*(gammaCoordinateForm μ hQ U G x a b+gammaCoordinateForm μ hQ U G x b a-_) = + (1/2:ℝ)*(gammaCoordinateForm μ hQ U G x b a+gammaCoordinateForm μ hQ U G x a b-_) + rw [hc] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InitialAnalyticBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/InitialAnalyticBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..98805c113dee8dacf39ee9666c4d306242444db9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InitialAnalyticBounds.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.WorkingNormalizerBound +import OAI.Geometry.RCD.Sobolev.HarmonicBochnerConstruction + +namespace OAI + +/-! # Fixed analytic bounds from a capped initial splitting error -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A local volume ratio and the raw initial splitting error bound any +chosen exact normalizer on a smaller working set. This applies in particular +to the root member of the all-scale normalized family. -/ +theorem initial_normalizer_norm_sq_le_two (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + {p : X} {r ε C : ℝ} {w : X → Euclidean n} + (hfirst : FirstOrderSplittingOn μ hQ p r ε u w) + (s : Set X) (hs : MeasurableSet s) (hsub : s ⊆ ball p r) + (hsne : μ s ≠ 0) (hsfin : μ s ≠ ∞) + (hrne : μ (ball p r) ≠ 0) (hrfin : μ (ball p r) ≠ ∞) + (hC : 1 ≤ C) (hε : 0 ≤ ε) + (hratio : μ.real (ball p r) ≤ C * μ.real s) + (hsmall : (n : ℝ) ^ 2 * (C * ε) ≤ 1 / 2) + (A : Euclidean n ≃L[ℝ] Euclidean n) + (hA : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) s hs A) : + ‖(A : Euclidean n →L[ℝ] Euclidean n)‖ ^ 2 ≤ 2 := by + apply normalizer_norm_sq_le_two_of_sub_id μ hQ _ s hs A hA + exact (meanGram_sub_id_norm_le_of_subset μ hQ u hs hsub hsne hsfin hrne hrfin + (zero_le_one.trans hC) hε hratio hfirst.gram).trans hsmall + +/-- Capping the initial error by one gives a fixed all-direction gradient +bound, independent of the eventual normalized splitting tolerance. -/ +theorem splittingDirectionBound_sq_le {n : ℕ} {ε : ℝ} (hε : 0 ≤ ε) (hε1 : ε ≤ 1) : + ((splittingDirectionBound n ε hε : ℝ≥0) : ℝ) ^ 2 ≤ 4 * (n : ℝ) ^ 2 := by + have h : (n : ℝ) * (1 + ε) ≤ 2 * n := by + nlinarith [Nat.cast_nonneg (α := ℝ) n] + change ((n : ℝ) * (1 + ε)) ^ 2 ≤ _ + nlinarith [mul_nonneg (Nat.cast_nonneg (α := ℝ) n) (show 0 ≤ 1 + ε by linarith)] + +omit [BorelSpace X] [ProperSpace X] in +/-- The common half-error volume regime bounds the loss from the initial +ball to the smaller root ball by a fixed dimensional factor. -/ +theorem initial_working_volume_ratio (μ : Measure X) (n : ℕ) (p q : X) + {T omega : ℝ} (hT : 0 < T) (homega : 0 < omega) + (hlarge : |μ.real (ball p (2 * T)) / (omega * (2 * T) ^ n) - 1| ≤ 1 / 2) + (hsmall : |μ.real (ball q (T / 16)) / (omega * (T / 16) ^ n) - 1| ≤ 1 / 2) : + μ.real (ball p (2 * T)) ≤ (3 * (32 : ℝ) ^ n) * μ.real (ball q (T / 16)) := by + have hup : μ.real (ball p (2 * T)) ≤ (3 / 2 : ℝ) * (omega * (2 * T) ^ n) := by + apply (div_le_iff₀ (by positivity : 0 < omega * (2 * T) ^ n)).mp + linarith [(abs_le.mp hlarge).2] + have hlo : (1 / 2 : ℝ) * (omega * (T / 16) ^ n) ≤ μ.real (ball q (T / 16)) := by + apply (le_div_iff₀ (by positivity : 0 < omega * (T / 16) ^ n)).mp + linarith [(abs_le.mp hsmall).1] + calc + _ ≤ (3 / 2 : ℝ) * (omega * (2 * T) ^ n) := hup + _ = (3 * (32 : ℝ) ^ n) * ((1 / 2 : ℝ) * (omega * (T / 16) ^ n)) := by + rw [show 2 * T = 32 * (T / 16) by ring, mul_pow] + ring + _ ≤ _ := mul_le_mul_of_nonneg_left hlo (by positivity) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InitialHarmonicCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/InitialHarmonicCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e0de75169946163c6d936e3943ed142cf9c7024 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InitialHarmonicCoordinates.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Metric.MeasuredApproximation + +namespace OAI + +/-! # Initial harmonic coordinates at arbitrarily small regular scales -/ + +open Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_initial_splitting_at_all_small_scales {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {p : X} + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff n X) n p) + (hinitial : LocalInitialSplittingInput hX) {β : ℝ} (hβ : 0 < β) : + ∃ s : ℝ, 0 < s ∧ ∀ r : ℝ, 0 < r → r < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * r) β u v := by + obtain ⟨ε, hε, happly⟩ := hinitial hn β hβ + obtain ⟨d, hd, happrox⟩ := regular_small_scale_measured_approximation hcompact hregular hmeasured + (by norm_num : (0 : ℝ) < 16) hε + let s := min d (min 1 (ε / (|K| + 1))) + have hs : 0 < s := lt_min hd (lt_min zero_lt_one (div_pos hε (by positivity))) + refine ⟨s, hs, ?_⟩ + intro r hr hrs + have hrd : r < d := hrs.trans_le (min_le_left _ _) + have hr1 : r ≤ 1 := hrs.le.trans ((min_le_right _ _).trans (min_le_left _ _)) + have hre : r ≤ ε / (|K| + 1) := hrs.le.trans ((min_le_right _ _).trans (min_le_right _ _)) + have hbound : r * (|K| + 1) ≤ ε := (le_div_iff₀ (by positivity)).mp hre + have hsquare : r ^ 2 ≤ r := by nlinarith + have hm := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + have hK := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + have hcurv : -ε ≤ K * r ^ 2 := by nlinarith + exact happly p r hr hcurv (happrox r hr hrd) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingConstruction.lean b/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3b75ccbc12f60f358f18e92ffbddc41a74b7f02 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingConstruction.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Coordinates.InitialSplittingSequence + +namespace OAI + +/-! # The local initial splitting input from the actual RCD constructions + +This proves the specialization of Huang--Huang, Theorem 2.9(1), retained +by `LocalInitialSplittingInput`. The contradiction sequence keeps the +original measured approximations and the original physical radii. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.initialSplittingInput {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] : LocalInitialSplittingInput hX := by + intro hn β hβ + by_contra hnot + push Not at hnot + let ε := fun k : ℕ => (1/256:ℝ)*(1/((k:ℝ)+1)) + have hε (k : ℕ) : 0<ε k := by dsimp only [ε]; positivity + have hεsmall (k : ℕ) : ε k≤1/256 := by + have hh : (1:ℝ)/((k:ℝ)+1)≤1 := (div_le_one (by positivity)).mpr (by + linarith [Nat.cast_nonneg (α:=ℝ) k]) + exact (mul_le_mul_of_nonneg_left hh (by norm_num : (0:ℝ)≤1/256)).trans_eq (mul_one _) + have hεlim : Tendsto ε atTop (𝓝 0) := by + simpa only [ε,mul_zero] using tendsto_one_div_add_atTop_nhds_zero_nat.const_mul (1/256:ℝ) + have hbad (k : ℕ) : ∃ (p : X) (r : ℝ) (V : X → Euclidean n), + 0 (hε k).le) (fun k => (hεsmall k).trans (by norm_num)) hεlim hV + obtain ⟨k,u,v,huv⟩ := (hgood β hβ).exists + exact hfail (α k) u v huv + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingSequence.lean b/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..c90f38a0665cf1fe93f1a12c1ec9dde89a506399 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InitialSplittingSequence.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicCoordinateGram +import OAI.Geometry.RCD.Harmonic.FirstOrderFromScaledFamily + +namespace OAI + +/-! # The actual first-order splitting maps along a measured Euclidean sequence -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.initial_splitting_sequence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*(16*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 16 (ε k) (V k)) : + ∃ α : ℕ → ℕ, StrictMono α ∧ ∀ β : ℝ, 0<β → ∀ᶠ k in atTop, + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic (p (α k)) (2*r (α k)) β u v := by + obtain ⟨α,hα,w,hV₀,hw,hnorm,hconv⟩ := hX.finite_measured_harmonic_sequence hn + p r ε V hr hcurv hε hε1 hεlim hV + let η := fun k : ℕ => 1/((k:ℝ)+1) + have hη : Tendsto η atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + have hη0 (k : ℕ) : 0≤η k := by dsimp only [η]; positivity + have hη1 (k : ℕ) : η k≤1 := by + dsimp only [η] + apply (div_le_one (by positivity)).mpr + linarith [Nat.cast_nonneg (α:=ℝ) k] + have hsmall (k : ℕ) {t : ℝ} (ht : 0≤t) (ht16 : t≤16) : -1≤K*(t*r (α k))^2 := by + by_cases hK : 0≤K + · exact (by norm_num : (-1:ℝ)≤0).trans (mul_nonneg hK (sq_nonneg _)) + · exact (hcurv (α k)).trans (mul_le_mul_of_nonpos_left + (pow_le_pow_left₀ (mul_nonneg ht (hr (α k)).le) + (mul_le_mul_of_nonneg_right ht16 (hr (α k)).le) 2) (le_of_not_ge hK)) + have hc1 (k : ℕ) : -1≤K*(r (α k))^2 := by + simpa using hsmall k (t:=1) (by norm_num) (by norm_num) + have hc5 (k : ℕ) : -1≤K*(5*r (α k))^2 := hsmall k (by norm_num) (by norm_num) + obtain ⟨hgrad,hgram⟩ := hX.harmonic_coordinate_gram hn (p∘α) (r∘α) η (V∘α) + (fun k => hr (α k)) hc1 hc5 hη0 hη1 hη hV₀ w hw hnorm hconv + refine ⟨α,hα,?_⟩ + intro β hβ + have hgrad' : ∀ᶠ k in atTop, ∀ i : Fin n, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (α k)) (3*r (α k))), + r (α k)^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w i k) x≤1+β := + eventually_all.mpr (fun i => hgrad i β hβ) + have hgram' : ∀ᶠ k in atTop, ∀ i j : Fin n, + ((hausdorff n X).real (ball (p (α k)) (2*r (α k))))⁻¹* + (∫ x in ball (p (α k)) (2*r (α k)), + |r (α k)^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w j k) x-(if i=j then 1 else 0)| + ∂hausdorff n X)≤β := by + apply eventually_all.mpr + intro i + apply eventually_all.mpr + intro j + exact ((hgram i j).eventually (eventually_lt_nhds hβ)).mono (fun _ h => h.le) + filter_upwards [hgrad',hgram'] with k hg hm + exact hX.first_order_splitting_of_scaled_family hn (p (α k)) (hr (α k)) hβ (hc5 k) + (fun i => w i k) (fun i => hw i k) (fun i => hnorm i k) hg hm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InnerCoordinateSequence.lean b/lean/OAI/Geometry/RCD/Coordinates/InnerCoordinateSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..222bd814c8c39404e2680452462bc12409e3fc5d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InnerCoordinateSequence.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateTargetNorm +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # A normalized actual harmonic coordinate sequence on one common inner ball -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.inner_coordinate_sequence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) {S R T : ℝ} + (hS : 0 d.subsequence k+d.shift + have ha₀ : StrictMono a₀ := fun _ _ hij => Nat.add_lt_add_right (d.strictMono hij) d.shift + have hTS : T≤S := by linarith + have hnorm := hX.coordinate_target_norm_eventually hT hTS (p∘a₀) (r∘a₀) (ε∘a₀) (V∘a₀) + (fun k => hr (a₀ k)) (hεlim.comp ha₀.tendsto_atTop) (fun k => hV (a₀ k)) + (fun k => d.target (d.subsequence k)) i (hc T hT hTR 1 zero_lt_one) + obtain ⟨N,hN⟩ := eventually_atTop.mp hnorm + let a₁ := fun k => a₀ (k+N) + have hadd : StrictMono (fun k : ℕ => k+N) := fun _ _ hij => Nat.add_lt_add_right hij N + have ha₁ : StrictMono a₁ := ha₀.comp hadd + obtain ⟨b,hb,hbV⟩ := inner_measured_subsequence hS hT hTS + (p:=p∘a₁) (r:=r∘a₁) (ε:=ε∘a₁) (V:=V∘a₁) (η:=fun k => 1/((k:ℝ)+1)) + (fun k => hr (a₁ k)) (fun k => hε (a₁ k)) (fun k => hV (a₁ k)) + (fun _ => (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr (a₁ k)))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) + (hεlim.comp ha₁.tendsto_atTop) (fun k => by positivity) + refine ⟨a₁∘b,ha₁.comp hb,(fun k => d.target (d.subsequence (b k+N))),hbV,?_,?_,?_⟩ + · intro k + exact (d.harmonic (d.subsequence (b k+N))).mono (hausdorff n X) hX.quadratic + (ball_subset_ball (mul_le_mul_of_nonneg_right hTR.le (hr _).le)) + · intro k + exact hN (b k+N) (Nat.le_add_left N (b k)) + · intro W hW hWT δ hδ + exact (hadd.comp hb).tendsto_atTop.eventually (hc W hW (hWT.trans hTR) δ hδ) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/IntervalBilinearEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/IntervalBilinearEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..06bca05d9187502ee4ceefa865f71a07ed579f62 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/IntervalBilinearEnergy.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Coordinates.PositiveBilinearIntegralLower +import Mathlib.MeasureTheory.Integral.Bochner.Set +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic + +namespace OAI + +/-! # Real-time integrals of a bounded measurable Sobolev quadratic form -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates + +def intervalExtension {a b : ℝ} (f : Ioo a b → ℝ) (t : ℝ) : ℝ := + if ht : t ∈ Ioo a b then f ⟨t,ht⟩ else 0 + +theorem intervalExtension_eq {a b : ℝ} (f : Ioo a b → ℝ) (t : Ioo a b) : + intervalExtension f t = f t := by simp only [intervalExtension,dite_eq_left t.property] + +theorem integral_intervalExtension {a b : ℝ} (f : Ioo a b → ℝ) (θ : ℝ → ℝ) : + (∫ t in Ioo a b, θ t*intervalExtension f t) = + ∫ t : Ioo a b, θ t*f t ∂volume.comap Subtype.val := by + rw [← integral_subtype_comap measurableSet_Ioo (fun t => θ t*intervalExtension f t)] + apply integral_congr_ae + exact Eventually.of_forall fun t => by + change θ t*intervalExtension f t = θ t*f t + rw [intervalExtension_eq] + +theorem interval_bilinear_energy_integrable {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] {a b : ℝ} (P : E →L[ℝ] E →L[ℝ] ℝ) + (v : Ioo a b → E) (hv : AEStronglyMeasurable v (volume.comap Subtype.val)) + {C : ℝ} (hC : 0 ≤ C) (hb : ∀ t, ‖v t‖ ≤ C) : + IntegrableOn (intervalExtension (fun t => P (v t) (v t))) (Ioo a b) := by + have hfin : volume (Ioo a b) ≠ ∞ := + ((measure_mono Ioo_subset_Icc_self).trans_lt isCompact_Icc.measure_lt_top).ne + have hi : IntegrableOn (fun _ : ℝ => (1:ℝ)) (Ioo a b) := integrableOn_const hfin + have hi' : Integrable (fun _ : Ioo a b => (1:ℝ)) (volume.comap Subtype.val) := + (integrableOn_iff_comap_subtypeVal measurableSet_Ioo).mp hi + have hp : Integrable (fun t => P (v t) (v t)) (volume.comap Subtype.val) := by + have hh := hi'.mul_bdd (P.aestronglyMeasurable_comp₂ hv hv) + (Eventually.of_forall fun t => (P.le_opNorm₂ _ _).trans (show + ‖P‖*‖v t‖*‖v t‖ ≤ ‖P‖*C*C from by gcongr <;> exact hb t)) + simpa only [one_mul] using hh + apply (integrableOn_iff_comap_subtypeVal measurableSet_Ioo).mpr + simpa only [Function.comp_def,intervalExtension_eq] using hp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/IntervalVectorExtension.lean b/lean/OAI/Geometry/RCD/Coordinates/IntervalVectorExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e15c2edd5420439ebcb053d5496dea8b740159a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/IntervalVectorExtension.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Coordinates.IntervalBilinearEnergy +import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic + +namespace OAI + +/-! # Integrating the actual Sobolev time family on the real line -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates + +def intervalVectorExtension {E : Type*} [Zero E] {a b : ℝ} + (u : Ioo a b → E) (t : ℝ) : E := + if ht : t ∈ Ioo a b then u ⟨t,ht⟩ else 0 + +theorem intervalVectorExtension_eq {E : Type*} [Zero E] {a b : ℝ} + (u : Ioo a b → E) (t : Ioo a b) : intervalVectorExtension u t = u t := by + simp only [intervalVectorExtension,dite_eq_left t.property] + +theorem intervalVectorExtension_integrable + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {a b : ℝ} + (u : Ioo a b → E) (hu : AEStronglyMeasurable u (volume.comap Subtype.val)) + {C : ℝ} (hb : ∀ t, ‖u t‖ ≤ C) : Integrable (intervalVectorExtension u) := by + have hfin : volume (Ioo a b) ≠ ∞ := + ((measure_mono Ioo_subset_Icc_self).trans_lt isCompact_Icc.measure_lt_top).ne + have hi : Integrable (fun _ : Ioo a b => C) (volume.comap Subtype.val) := + (integrableOn_iff_comap_subtypeVal measurableSet_Ioo).mp (integrableOn_const hfin) + have hiu : Integrable u (volume.comap Subtype.val) := + hi.mono' hu (Eventually.of_forall hb) + have he : IntegrableOn (intervalVectorExtension u) (Ioo a b) := by + apply (integrableOn_iff_comap_subtypeVal measurableSet_Ioo).mpr + simpa only [Function.comp_def,intervalVectorExtension_eq] using hiu + apply (integrableOn_iff_integrable_of_support_subset ?_).mp he + intro t ht + by_contra hn + exact ht (by simp only [intervalVectorExtension,dite_eq_right hn]) + +theorem bilinear_intervalVectorExtension + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {a b : ℝ} + (P : E →L[ℝ] E →L[ℝ] ℝ) (u : Ioo a b → E) (t : ℝ) : + P (intervalVectorExtension u t) (intervalVectorExtension u t) = + intervalExtension (fun q => P (u q) (u q)) t := by + by_cases ht : t ∈ Ioo a b + · simp only [intervalVectorExtension,intervalExtension,dite_eq_left ht] + · simp only [intervalVectorExtension,intervalExtension,dite_eq_right ht,map_zero] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InverseDerivative.lean b/lean/OAI/Geometry/RCD/Coordinates/InverseDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..951295e7bd9028625333828774381758f9c40541 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InverseDerivative.lean @@ -0,0 +1,138 @@ +import Mathlib.Analysis.Calculus.FDeriv.Mul +import Mathlib.Analysis.InnerProductSpace.Adjoint +import Mathlib.Tactic.Ring + +namespace OAI + +/-! +# Inverse-transpose differentiation and contraction + +The metric iteration uses cancellation before estimating the derivative of +an inverse transpose. These identities work with bounded operators on any +real Hilbert space; no matrix coordinates or condition-number bounds enter +the cancellation itself. +-/ + +noncomputable section + +open ContinuousLinearMap +open scoped InnerProduct InnerProductSpace + +namespace RegularPointCoordinates + +variable {E X : Type*} +variable [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] +variable [NormedAddCommGroup X] [NormedSpace ℝ X] + +/-- The adjoint of the inverse of a bounded linear equivalence. -/ +def inverseTranspose (J : E ≃L[ℝ] E) : E →L[ℝ] E := + (J.symm : E →L[ℝ] E).adjoint + +/-- The inverse transpose cancels the undifferentiated Jacobian in an inner product. -/ +theorem inner_apply_inverseTranspose (J : E ≃L[ℝ] E) (ξ w : E) : + ⟪J ξ, inverseTranspose J w⟫_ℝ = ⟪ξ, w⟫_ℝ := by + rw [inverseTranspose, adjoint_inner_right] + simp + +/-- The first variation of an inverse transpose. -/ +def inverseTransposeVariation (J : E ≃L[ℝ] E) (dJ : E →L[ℝ] E) : E →L[ℝ] E := + -(inverseTranspose J ∘L dJ.adjoint ∘L inverseTranspose J) + +/-- Exact cancellation in the differentiated inverse-transpose term. +This is the operator form of `re:inverse-transpose-contraction`. -/ +theorem inner_apply_inverseTransposeVariation (J : E ≃L[ℝ] E) + (dJ : E →L[ℝ] E) (ξ w : E) : + ⟪J ξ, inverseTransposeVariation J dJ w⟫_ℝ = + -⟪dJ ξ, inverseTranspose J w⟫_ℝ := by + simp only [inverseTransposeVariation, neg_apply, comp_apply, inner_neg_right] + rw [inner_apply_inverseTranspose, adjoint_inner_right] + +/-- The differentiated-inverse error is controlled by the diagonal +Jacobian derivative, with no operator norm of that derivative. -/ +theorem abs_inner_apply_inverseTransposeVariation_le (J : E ≃L[ℝ] E) + (dJ : E →L[ℝ] E) (ξ w : E) : + |⟪J ξ, inverseTransposeVariation J dJ w⟫_ℝ| ≤ + ‖dJ ξ‖ * ‖inverseTranspose J w‖ := by + rw [inner_apply_inverseTransposeVariation, abs_neg] + exact abs_real_inner_le_norm _ _ + +/-- The exact metric increment splits into the principal term, the +diagonal differentiated-inverse error, and the squared increment. -/ +theorem norm_sq_inverseTranspose_increment (J : E ≃L[ℝ] E) + (dJ : E →L[ℝ] E) (ξ dv v : E) : + ‖J ξ + (inverseTranspose J dv + inverseTransposeVariation J dJ v)‖ ^ 2 - + ‖J ξ‖ ^ 2 = + 2 * ⟪ξ, dv⟫_ℝ - 2 * ⟪dJ ξ, inverseTranspose J v⟫_ℝ + + ‖inverseTranspose J dv + inverseTransposeVariation J dJ v‖ ^ 2 := by + rw [norm_add_sq_real, inner_add_right, inner_apply_inverseTranspose, + inner_apply_inverseTransposeVariation] + ring + +/-- Fréchet derivative of inversion at a bounded linear equivalence. -/ +theorem hasFDerivAt_operator_inverse (J : E ≃L[ℝ] E) : + HasFDerivAt (Ring.inverse : (E →L[ℝ] E) → E →L[ℝ] E) + (-mulLeftRight ℝ (E →L[ℝ] E) (J.symm : E →L[ℝ] E) + (J.symm : E →L[ℝ] E)) (J : E →L[ℝ] E) := by + exact hasFDerivAt_ringInverse J.toUnit + +/-- The adjoint operation, viewed as a real continuous linear map. -/ +def adjointOperator : (E →L[ℝ] E) →L[ℝ] (E →L[ℝ] E) := + ((ContinuousLinearMap.adjoint (𝕜 := ℝ) (E := E) (F := E)).toContinuousLinearEquiv).toContinuousLinearMap + +/-- The inverse-transpose operation on all bounded operators. Only its +behavior at an invertible operator is used. -/ +def operatorInverseTranspose (J : E →L[ℝ] E) : E →L[ℝ] E := + (Ring.inverse J).adjoint + +@[simp] theorem operatorInverseTranspose_equiv (J : E ≃L[ℝ] E) : + operatorInverseTranspose (J : E →L[ℝ] E) = inverseTranspose J := by + change (Ring.inverse (J.toUnit : E →L[ℝ] E)).adjoint = _ + rw [Ring.inverse_unit] + rfl + +/-- Differentiating the inverse transpose of a varying Jacobian. -/ +theorem hasFDerivAt_operator_inverseTranspose (J : E ≃L[ℝ] E) : + HasFDerivAt (operatorInverseTranspose : (E →L[ℝ] E) → E →L[ℝ] E) + (adjointOperator ∘L + (-mulLeftRight ℝ (E →L[ℝ] E) (J.symm : E →L[ℝ] E) + (J.symm : E →L[ℝ] E))) (J : E →L[ℝ] E) := by + exact adjointOperator.hasFDerivAt.comp _ (hasFDerivAt_operator_inverse J) + +/-- The derivative above is exactly the inverse-transpose variation. -/ +theorem inverseTranspose_derivative_apply (J : E ≃L[ℝ] E) (dJ : E →L[ℝ] E) : + (adjointOperator ∘L + (-mulLeftRight ℝ (E →L[ℝ] E) (J.symm : E →L[ℝ] E) + (J.symm : E →L[ℝ] E))) dJ = inverseTransposeVariation J dJ := by + simp [adjointOperator, inverseTransposeVariation, inverseTranspose, + mulLeftRight_apply, mul_def, comp_assoc] + +/-- The cancellation for the actual directional Fréchet derivative of +a variable inverse transpose. -/ +theorem inverseTranspose_fderiv_contraction + {J : X → E →L[ℝ] E} {J' : X →L[ℝ] (E →L[ℝ] E)} {x : X} + (e : E ≃L[ℝ] E) (he : J x = (e : E →L[ℝ] E)) + (hJ : HasFDerivAt J J' x) (u : X) (ξ w : E) : + ⟪e ξ, (fderiv ℝ (fun y => operatorInverseTranspose (J y)) x u) w⟫_ℝ = + -⟪J' u ξ, inverseTranspose e w⟫_ℝ := by + have hi := hasFDerivAt_operator_inverseTranspose e + rw [← he] at hi + have hd := (hi.comp x hJ).fderiv + change fderiv ℝ (fun y => operatorInverseTranspose (J y)) x = _ at hd + rw [hd, comp_apply, inverseTranspose_derivative_apply] + exact inner_apply_inverseTransposeVariation e (J' u) ξ w + +/-- The same diagonal bound for the actual directional derivative. -/ +theorem abs_inverseTranspose_fderiv_contraction_le + {J : X → E →L[ℝ] E} {J' : X →L[ℝ] (E →L[ℝ] E)} {x : X} + (e : E ≃L[ℝ] E) (he : J x = (e : E →L[ℝ] E)) + (hJ : HasFDerivAt J J' x) (u : X) (ξ w : E) : + |⟪e ξ, (fderiv ℝ (fun y => operatorInverseTranspose (J y)) x u) w⟫_ℝ| ≤ + ‖J' u ξ‖ * ‖inverseTranspose e w‖ := by + rw [inverseTranspose_fderiv_contraction e he hJ, abs_neg] + exact abs_real_inner_le_norm _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InverseJetBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/InverseJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..58e3a175da718e660c555ab2c689ba6a3450a1ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InverseJetBounds.lean @@ -0,0 +1,431 @@ +import OAI.Geometry.RCD.Coordinates.FactorialMajorant +import OAI.Geometry.RCD.Coordinates.InverseDerivative +import Mathlib.Analysis.Calculus.ContDiff.Bounds + +namespace OAI + +/-! +# Higher derivatives of inverse fields + +The resolvent identity subtracts the value of the original field at the +base point before the higher product estimate is applied. Its zeroth +derivative is then zero, so the inverse recurrence has no occurrence of +the current unknown derivative on the right. These are actual iterated +Fréchet derivatives in a real Banach algebra, including bounded operators. +-/ + +open Finset Filter +open scoped BigOperators ContDiff Topology + +noncomputable section + +namespace RegularPointCoordinates + +variable {X A : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] +variable [NormedRing A] [NormedAlgebra ℝ A] + +omit [NormedAddCommGroup X] [NormedSpace ℝ X] [NormedAlgebra ℝ A] in +/-- The resolvent identity in the order needed for a one-sided inverse. -/ +theorem inverse_field_resolvent {J K : X → A} {s : Set X} {x : X} + (hleft : K x * J x = 1) + (hright : ∀ y ∈ s, J y * K y = 1) : + Set.EqOn K (fun y => K x - K x * ((J y - J x) * K y)) s := by + intro y hy + change K y = K x - K x * ((J y - J x) * K y) + rw [sub_mul, mul_sub, hright y hy, mul_one, + ← mul_assoc (K x) (J x) (K y), hleft, one_mul] + abel + +/-- At positive orders, subtracting the value at the base point does not +change the iterated derivative. -/ +theorem iteratedFDerivWithin_sub_basepoint {J : X → A} {s : Set X} {x : X} + {n : ℕ} (hJ : ContDiffWithinAt ℝ n J s x) + (hs : UniqueDiffOn ℝ s) (hx : x ∈ s) (hn : n ≠ 0) : + iteratedFDerivWithin ℝ n (fun y => J y - J x) s x = + iteratedFDerivWithin ℝ n J s x := by + rw [show (fun y => J y - J x) = J - (fun _ => J x) from rfl, + iteratedFDerivWithin_sub_apply hJ contDiffWithinAt_const hs hx, + iteratedFDerivWithin_const_of_ne hn] + simp + +/-- A higher inverse derivative is bounded by strictly lower inverse +derivatives. The smoothness and inverse identities are explicit. -/ +theorem norm_iteratedFDerivWithin_inverse_field_le + {J K : X → A} {s : Set X} {x : X} {n : ℕ} + (hJ : ContDiffOn ℝ n J s) (hK : ContDiffOn ℝ n K s) + (hs : UniqueDiffOn ℝ s) (hx : x ∈ s) (hn : 0 < n) + (hleft : K x * J x = 1) (hright : ∀ y ∈ s, J y * K y = 1) : + ‖iteratedFDerivWithin ℝ n K s x‖ ≤ ‖K x‖ * + ∑ i ∈ Finset.Icc 1 n, (n.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i J s x‖ * + ‖iteratedFDerivWithin ℝ (n - i) K s x‖ := by + let f : X → A := fun y => J y - J x + let g : X → A := fun y => f y * K y + let L : A →L[ℝ] A := ContinuousLinearMap.mul ℝ A (K x) + have hf : ContDiffOn ℝ n f s := hJ.sub contDiffOn_const + have hg : ContDiffOn ℝ n g s := hf.mul hK + have hLg : ContDiffOn ℝ n (L ∘ g) s := L.contDiff.comp_contDiffOn hg + have hres : Set.EqOn K ((fun _ => K x) - (L ∘ g)) s := + inverse_field_resolvent hleft hright + have hnorm : ‖iteratedFDerivWithin ℝ n K s x‖ ≤ + ‖K x‖ * ‖iteratedFDerivWithin ℝ n g s x‖ := by + rw [iteratedFDerivWithin_congr hres hx n, + iteratedFDerivWithin_sub_apply contDiffWithinAt_const (hLg x hx) hs hx, + iteratedFDerivWithin_const_of_ne (Nat.ne_of_gt hn)] + simp only [Pi.zero_apply, zero_sub, norm_neg] + exact (L.norm_iteratedFDerivWithin_comp_left (hg x hx) hs hx le_rfl).trans + (mul_le_mul_of_nonneg_right (ContinuousLinearMap.opNorm_mul_apply_le ℝ A (K x)) + (norm_nonneg _)) + have hsum : + (∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i f s x‖ * + ‖iteratedFDerivWithin ℝ (n - i) K s x‖) = + ∑ i ∈ Finset.Icc 1 n, (n.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i J s x‖ * + ‖iteratedFDerivWithin ℝ (n - i) K s x‖ := by + symm + calc + _ = ∑ i ∈ Finset.Icc 1 n, (n.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i f s x‖ * + ‖iteratedFDerivWithin ℝ (n - i) K s x‖ := by + apply Finset.sum_congr rfl + intro i hi + rw [iteratedFDerivWithin_sub_basepoint + ((hJ x hx).of_le (by exact_mod_cast (Finset.mem_Icc.mp hi).2)) hs hx + (by have := (Finset.mem_Icc.mp hi).1; omega)] + _ = _ := by + apply Finset.sum_subset + · intro i hi + exact Finset.mem_range.mpr (by have := (Finset.mem_Icc.mp hi).2; omega) + · intro i hi hnot + have hi0 : i = 0 := by + have := Finset.mem_range.mp hi + simp only [Finset.mem_Icc, not_and_or, not_le] at hnot + omega + subst i + simp [norm_iteratedFDerivWithin_zero, f] + exact hnorm.trans (mul_le_mul_of_nonneg_left + ((norm_iteratedFDerivWithin_mul_le hf hK hs hx le_rfl).trans_eq hsum) + (norm_nonneg _)) + +/-- A unit-valued smooth field has a smooth inverse field on the same set. -/ +theorem contDiffOn_ringInverse_field [CompleteSpace A] + {J : X → A} {s : Set X} {n : ℕ∞ω} + (hJ : ContDiffOn ℝ n J s) (hunit : ∀ y ∈ s, IsUnit (J y)) : + ContDiffOn ℝ n (fun y => Ring.inverse (J y)) s := by + intro y hy + obtain ⟨u, hu⟩ := hunit y hy + have hi := contDiffAt_ringInverse ℝ (n := n) u + rw [hu] at hi + exact hi.comp_contDiffWithinAt y (hJ y hy) + +/-- The preceding recurrence for the genuine inverse in a Banach algebra. -/ +theorem norm_iteratedFDerivWithin_ringInverse_le [CompleteSpace A] + {J : X → A} {s : Set X} {x : X} {n : ℕ} + (hJ : ContDiffOn ℝ n J s) (hunit : ∀ y ∈ s, IsUnit (J y)) + (hs : UniqueDiffOn ℝ s) (hx : x ∈ s) (hn : 0 < n) : + ‖iteratedFDerivWithin ℝ n (fun y => Ring.inverse (J y)) s x‖ ≤ + ‖Ring.inverse (J x)‖ * ∑ i ∈ Finset.Icc 1 n, (n.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i J s x‖ * + ‖iteratedFDerivWithin ℝ (n - i) (fun y => Ring.inverse (J y)) s x‖ := by + exact norm_iteratedFDerivWithin_inverse_field_le hJ + (contDiffOn_ringInverse_field hJ hunit) hs hx hn + (Ring.inverse_mul_cancel _ (hunit x hx)) + (fun y hy => Ring.mul_inverse_cancel _ (hunit y hy)) + +/-- The pointwise recurrence requires invertibility only at the base +point: continuity supplies an invertible neighborhood. -/ +theorem norm_iteratedFDeriv_ringInverse_le [CompleteSpace A] + {J : X → A} {x : X} {n : ℕ} + (hJ : ContDiffAt ℝ n J x) (hunit : IsUnit (J x)) (hn : 0 < n) : + ‖iteratedFDeriv ℝ n (fun y => Ring.inverse (J y)) x‖ ≤ + ‖Ring.inverse (J x)‖ * ∑ i ∈ Finset.Icc 1 n, (n.choose i : ℝ) * + ‖iteratedFDeriv ℝ i J x‖ * + ‖iteratedFDeriv ℝ (n - i) (fun y => Ring.inverse (J y)) x‖ := by + obtain ⟨u, hu, hJu⟩ := hJ.contDiffOn le_rfl (by simp) + have hv : {y | IsUnit (J y)} ∈ nhds x := + hJ.continuousAt.preimage_mem_nhds (Units.isOpen.mem_nhds hunit) + obtain ⟨s, hsu, hs, hx⟩ := mem_nhds_iff.mp (inter_mem hu hv) + have hJs : ContDiffOn ℝ n J s := hJu.mono (fun y hy => (hsu hy).1) + have hus : ∀ y ∈ s, IsUnit (J y) := fun y hy => (hsu hy).2 + have h := norm_iteratedFDerivWithin_ringInverse_le hJs hus hs.uniqueDiffOn hx hn + have heq (m : ℕ) (f : X → A) : iteratedFDerivWithin ℝ m f s x = + iteratedFDeriv ℝ m f x := iteratedFDerivWithin_of_isOpen m hs hx + simpa only [heq] using h + +/-- Exponential and factorial scaling for the coefficient of order `m`. -/ +def jetCoefficientScale (B : ℝ) (m : ℕ) : ℝ := + B ^ m * (m.factorial : ℝ) + +theorem jetCoefficientScale_pos {B : ℝ} (hB : 0 < B) (m : ℕ) : + 0 < jetCoefficientScale B m := by + unfold jetCoefficientScale + positivity + +@[simp] theorem jetCoefficientScale_zero (B : ℝ) : jetCoefficientScale B 0 = 1 := by + simp [jetCoefficientScale] + +/-- Binomial coefficients exactly cancel the factorial scaling; there +is no loss in the exponential base. -/ +theorem choose_mul_jetCoefficientScale {B : ℝ} {m i : ℕ} (hi : i ≤ m) : + (m.choose i : ℝ) * jetCoefficientScale B i * jetCoefficientScale B (m - i) = + jetCoefficientScale B m := by + have hfactorial : (m.choose i : ℝ) * (i.factorial : ℝ) * + ((m - i).factorial : ℝ) = (m.factorial : ℝ) := by + exact_mod_cast Nat.choose_mul_factorial_mul_factorial hi + have hp : B ^ i * B ^ (m - i) = B ^ m := by + rw [← pow_add, Nat.add_sub_of_le hi] + unfold jetCoefficientScale + calc + _ = ((m.choose i : ℝ) * (i.factorial : ℝ) * ((m - i).factorial : ℝ)) * + (B ^ i * B ^ (m - i)) := by ring + _ = _ := by rw [hfactorial, hp]; ring + +/-- A binomial inverse recurrence becomes the convolution recurrence +after division by its exact exponential-factorial scaling. -/ +theorem normalized_inverse_jet_recurrence {B H : ℝ} {j k : ℕ → ℝ} + (hB : 0 < B) (hH : 0 ≤ H) (hk : ∀ m, 0 ≤ k m) + (hj : ∀ m, 0 < m → j m ≤ factorialMajorant m * jetCoefficientScale B m) + (hrec : ∀ m, 0 < m → k m ≤ H * ∑ i ∈ Finset.Icc 1 m, + (m.choose i : ℝ) * j i * k (m - i)) + {m : ℕ} (hm : 0 < m) : + k m / jetCoefficientScale B m ≤ H * ∑ i ∈ Finset.Icc 1 m, + factorialMajorant i * (k (m - i) / jetCoefficientScale B (m - i)) := by + apply (div_le_iff₀ (jetCoefficientScale_pos hB m)).mpr + calc + _ ≤ H * ∑ i ∈ Finset.Icc 1 m, (m.choose i : ℝ) * j i * k (m - i) := hrec m hm + _ ≤ H * ∑ i ∈ Finset.Icc 1 m, jetCoefficientScale B m * + (factorialMajorant i * (k (m - i) / jetCoefficientScale B (m - i))) := by + apply mul_le_mul_of_nonneg_left _ hH + apply Finset.sum_le_sum + intro i hi + have hi' := Finset.mem_Icc.mp hi + have hkm : 0 ≤ k (m - i) := hk (m - i) + calc + _ ≤ (m.choose i : ℝ) * (factorialMajorant i * jetCoefficientScale B i) * + k (m - i) := by + gcongr + exact hj i (by omega) + _ = _ := by + rw [← choose_mul_jetCoefficientScale (B := B) hi'.2] + field_simp [ne_of_gt (jetCoefficientScale_pos hB (m - i))] + _ = _ := by rw [← Finset.mul_sum]; ring + +/-- The normalized inverse recurrence has the form required by the +factorial majorant, including its zeroth-order endpoint. -/ +theorem normalized_inverse_jet_hasMajorant {B D : ℝ} {j k : ℕ → ℝ} + (hB : 0 < B) (hD : 0 ≤ D) (hk : ∀ m, 0 ≤ k m) + (hkzero : k 0 ≤ Real.sqrt D) + (hj : ∀ m, 0 < m → j m ≤ factorialMajorant m * jetCoefficientScale B m) + (hrec : ∀ m, 0 < m → k m ≤ Real.sqrt D * ∑ i ∈ Finset.Icc 1 m, + (m.choose i : ℝ) * j i * k (m - i)) : + HasInverseMajorantRecurrence factorialMajorant + (fun m => k m / jetCoefficientScale B m) D := by + intro m hm + have hsplit : Finset.Icc 1 m = insert m (Finset.Icc 1 (m - 1)) := by + ext i + simp only [Finset.mem_Icc, Finset.mem_insert] + omega + have hmnot : m ∉ Finset.Icc 1 (m - 1) := by simp; omega + have h := normalized_inverse_jet_recurrence hB (Real.sqrt_nonneg D) hk hj hrec hm + rw [hsplit, Finset.sum_insert hmnot, Nat.sub_self, jetCoefficientScale_zero, div_one] at h + calc + _ ≤ Real.sqrt D * (factorialMajorant m * k 0 + + ∑ i ∈ Finset.Icc 1 (m - 1), + factorialMajorant i * (k (m - i) / jetCoefficientScale B (m - i))) := h + _ ≤ D * factorialMajorant m + Real.sqrt D * + ∑ i ∈ Finset.Icc 1 (m - 1), + factorialMajorant i * (k (m - i) / jetCoefficientScale B (m - i)) := by + have he := mul_le_mul_of_nonneg_left hkzero + (mul_nonneg (Real.sqrt_nonneg D) (factorialMajorant_pos m).le) + have hsq : Real.sqrt D * factorialMajorant m * Real.sqrt D = + D * factorialMajorant m := by + calc + _ = Real.sqrt D ^ 2 * factorialMajorant m := by ring + _ = _ := by rw [Real.sq_sqrt hD] + nlinarith + +/-- Uniform inverse bounds for every order, with exactly the original +exponential base and one order-independent constant. -/ +theorem inverse_jet_uniform_bound {D : ℝ} (hD : 1 ≤ D) : + ∃ C : ℝ, Real.sqrt D ≤ C ∧ 2 * D ≤ C ∧ ∀ B : ℝ, 0 < B → ∀ j k : ℕ → ℝ, + (∀ m, 0 ≤ k m) → k 0 ≤ Real.sqrt D → + (∀ m, 0 < m → j m ≤ factorialMajorant m * jetCoefficientScale B m) → + (∀ m, 0 < m → k m ≤ Real.sqrt D * ∑ i ∈ Finset.Icc 1 m, + (m.choose i : ℝ) * j i * k (m - i)) → + ∀ m, k m ≤ C * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨C, hC0, hCD, hC⟩ := factorial_inverse_coefficients_uniform_bound hD + refine ⟨C, hC0, hCD, ?_⟩ + intro B hB j k hk hkzero hj hrec m + have ha0 : k 0 / jetCoefficientScale B 0 ≤ Real.sqrt D := by simpa using hkzero + have hbound := hC (fun m => k m / jetCoefficientScale B m) ha0 + (normalized_inverse_jet_hasMajorant hB (zero_le_one.trans hD) hk hkzero hj hrec) m + exact (div_le_iff₀ (jetCoefficientScale_pos hB m)).mp hbound + +/-- Applying a field of operators preserves the same factorial weights. +This is the product estimate used for the coordinate increment. -/ +theorem clm_apply_factorialMajorant_bound + {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] + {f : X → F →L[ℝ] G} {g : X → F} {s : Set X} {x : X} + {B C D : ℝ} {m : ℕ} (hB : 0 < B) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ m f s) (hg : ContDiffOn ℝ m g s) + (hs : UniqueDiffOn ℝ s) (hx : x ∈ s) + (hfbound : ∀ i, i ≤ m → ‖iteratedFDerivWithin ℝ i f s x‖ ≤ + C * factorialMajorant i * jetCoefficientScale B i) + (hgbound : ∀ i, i ≤ m → ‖iteratedFDerivWithin ℝ i g s x‖ ≤ + D * factorialMajorant i * jetCoefficientScale B i) : + ‖iteratedFDerivWithin ℝ m (fun y => f y (g y)) s x‖ ≤ + (10 * C * D) * factorialMajorant m * jetCoefficientScale B m := by + calc + _ ≤ ∑ i ∈ Finset.range (m + 1), (m.choose i : ℝ) * + ‖iteratedFDerivWithin ℝ i f s x‖ * + ‖iteratedFDerivWithin ℝ (m - i) g s x‖ := + norm_iteratedFDerivWithin_clm_apply hf hg hs hx le_rfl + _ ≤ ∑ i ∈ Finset.range (m + 1), + (C * D * jetCoefficientScale B m) * + (factorialMajorant i * factorialMajorant (m - i)) := by + apply Finset.sum_le_sum + intro i hi + have hi' : i ≤ m := by have := Finset.mem_range.mp hi; omega + calc + _ ≤ (m.choose i : ℝ) * + (C * factorialMajorant i * jetCoefficientScale B i) * + (D * factorialMajorant (m - i) * jetCoefficientScale B (m - i)) := by + apply mul_le_mul + · exact mul_le_mul_of_nonneg_left (hfbound i hi') (Nat.cast_nonneg _) + · exact hgbound (m - i) (Nat.sub_le _ _) + · exact norm_nonneg _ + · exact mul_nonneg (Nat.cast_nonneg _) + (mul_nonneg (mul_nonneg hC (factorialMajorant_pos i).le) + (jetCoefficientScale_pos hB i).le) + _ = _ := by rw [← choose_mul_jetCoefficientScale (B := B) hi']; ring + _ = (C * D * jetCoefficientScale B m) * + ∑ i ∈ Finset.range (m + 1), factorialMajorant i * factorialMajorant (m - i) := by + rw [Finset.mul_sum] + _ ≤ (C * D * jetCoefficientScale B m) * (10 * factorialMajorant m) := + mul_le_mul_of_nonneg_left (factorialMajorant_full_convolution_le m) + (mul_nonneg (mul_nonneg hC hD) (jetCoefficientScale_pos hB m).le) + _ = _ := by ring + +/-- Actual higher derivatives of the inverse of a unit-valued Banach +algebra field satisfy the factorial majorant without changing `B`. +The same constant works for every field, set, and base point. -/ +theorem ringInverse_iteratedFDerivWithin_uniform_bound [CompleteSpace A] + {D : ℝ} (hD : 1 ≤ D) : + ∃ C : ℝ, Real.sqrt D ≤ C ∧ 2 * D ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (J : X → A) (s : Set X) (x : X), + (∀ m : ℕ, ContDiffOn ℝ m J s) → (∀ y ∈ s, IsUnit (J y)) → + UniqueDiffOn ℝ s → x ∈ s → ‖Ring.inverse (J x)‖ ≤ Real.sqrt D → + (∀ m, 0 < m → ‖iteratedFDerivWithin ℝ m J s x‖ ≤ + factorialMajorant m * jetCoefficientScale B m) → + ∀ m, ‖iteratedFDerivWithin ℝ m (fun y => Ring.inverse (J y)) s x‖ ≤ + C * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨C, hC0, hCD, hC⟩ := inverse_jet_uniform_bound hD + refine ⟨C, hC0, hCD, ?_⟩ + intro B hB J s x hJ hunit hs hx hInv hbound + apply hC B hB (fun m => ‖iteratedFDerivWithin ℝ m J s x‖) + (fun m => ‖iteratedFDerivWithin ℝ m (fun y => Ring.inverse (J y)) s x‖) + · exact fun _ => norm_nonneg _ + · simpa only [norm_iteratedFDerivWithin_zero] using hInv + · exact hbound + · intro m hm + apply (norm_iteratedFDerivWithin_ringInverse_le (hJ m) hunit hs hx hm).trans + apply mul_le_mul_of_nonneg_right hInv + apply Finset.sum_nonneg + intro i _ + positivity + +/-- Pointwise form of the manuscript's inverse majorant: only smoothness +and invertibility at the point are assumed, and the constant is uniform +in both the order and the exponential base. -/ +theorem ringInverse_iteratedFDeriv_uniform_bound [CompleteSpace A] + {D : ℝ} (hD : 1 ≤ D) : + ∃ C : ℝ, Real.sqrt D ≤ C ∧ 2 * D ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (J : X → A) (x : X), + (∀ m : ℕ, ContDiffAt ℝ m J x) → IsUnit (J x) → + ‖Ring.inverse (J x)‖ ≤ Real.sqrt D → + (∀ m, 0 < m → ‖iteratedFDeriv ℝ m J x‖ ≤ + factorialMajorant m * jetCoefficientScale B m) → + ∀ m, ‖iteratedFDeriv ℝ m (fun y => Ring.inverse (J y)) x‖ ≤ + C * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨C, hC0, hCD, hC⟩ := inverse_jet_uniform_bound hD + refine ⟨C, hC0, hCD, ?_⟩ + intro B hB J x hJ hunit hInv hbound + apply hC B hB (fun m => ‖iteratedFDeriv ℝ m J x‖) + (fun m => ‖iteratedFDeriv ℝ m (fun y => Ring.inverse (J y)) x‖) + · exact fun _ => norm_nonneg _ + · simpa only [norm_iteratedFDeriv_zero] using hInv + · exact hbound + · intro m hm + apply (norm_iteratedFDeriv_ringInverse_le (hJ m) hunit hm).trans + apply mul_le_mul_of_nonneg_right hInv + apply Finset.sum_nonneg + intro i _ + positivity + +section InverseTranspose + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Taking the transpose preserves every iterated derivative norm. -/ +theorem norm_iteratedFDerivWithin_inverseTranspose + (J : X → E →L[ℝ] E) {s : Set X} {x : X} + (hs : UniqueDiffOn ℝ s) (hx : x ∈ s) (m : ℕ) : + ‖iteratedFDerivWithin ℝ m (fun y => operatorInverseTranspose (J y)) s x‖ = + ‖iteratedFDerivWithin ℝ m (fun y => Ring.inverse (J y)) s x‖ := by + let adj : (E →L[ℝ] E) ≃ₗᵢ[ℝ] (E →L[ℝ] E) := ContinuousLinearMap.adjoint + exact adj.norm_iteratedFDerivWithin_comp_left (fun y => Ring.inverse (J y)) hs hx m + +theorem norm_iteratedFDeriv_inverseTranspose + (J : X → E →L[ℝ] E) (x : X) (m : ℕ) : + ‖iteratedFDeriv ℝ m (fun y => operatorInverseTranspose (J y)) x‖ = + ‖iteratedFDeriv ℝ m (fun y => Ring.inverse (J y)) x‖ := by + let adj : (E →L[ℝ] E) ≃ₗᵢ[ℝ] (E →L[ℝ] E) := ContinuousLinearMap.adjoint + exact adj.norm_iteratedFDeriv_comp_left (fun y => Ring.inverse (J y)) x m + +/-- The all-order inverse-transpose estimate uses the same constant and +the same exponential base as the inverse estimate. -/ +theorem inverseTranspose_iteratedFDerivWithin_uniform_bound + {D : ℝ} (hD : 1 ≤ D) : + ∃ C : ℝ, Real.sqrt D ≤ C ∧ 2 * D ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (J : X → E →L[ℝ] E) (s : Set X) (x : X), + (∀ m : ℕ, ContDiffOn ℝ m J s) → (∀ y ∈ s, IsUnit (J y)) → + UniqueDiffOn ℝ s → x ∈ s → ‖Ring.inverse (J x)‖ ≤ Real.sqrt D → + (∀ m, 0 < m → ‖iteratedFDerivWithin ℝ m J s x‖ ≤ + factorialMajorant m * jetCoefficientScale B m) → + ∀ m, ‖iteratedFDerivWithin ℝ m (fun y => operatorInverseTranspose (J y)) s x‖ ≤ + C * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨C, hC0, hCD, hC⟩ := + ringInverse_iteratedFDerivWithin_uniform_bound (X := X) (A := E →L[ℝ] E) hD + refine ⟨C, hC0, hCD, ?_⟩ + intro B hB J s x hJ hunit hs hx hInv hbound m + rw [norm_iteratedFDerivWithin_inverseTranspose J hs hx m] + exact hC B hB J s x hJ hunit hs hx hInv hbound m + +/-- Pointwise inverse-transpose majorant, with the same constant as the +inverse and no loss of exponential base. -/ +theorem inverseTranspose_iteratedFDeriv_uniform_bound + {D : ℝ} (hD : 1 ≤ D) : + ∃ C : ℝ, Real.sqrt D ≤ C ∧ 2 * D ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (J : X → E →L[ℝ] E) (x : X), + (∀ m : ℕ, ContDiffAt ℝ m J x) → IsUnit (J x) → + ‖Ring.inverse (J x)‖ ≤ Real.sqrt D → + (∀ m, 0 < m → ‖iteratedFDeriv ℝ m J x‖ ≤ + factorialMajorant m * jetCoefficientScale B m) → + ∀ m, ‖iteratedFDeriv ℝ m (fun y => operatorInverseTranspose (J y)) x‖ ≤ + C * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨C, hC0, hCD, hC⟩ := + ringInverse_iteratedFDeriv_uniform_bound (X := X) (A := E →L[ℝ] E) hD + refine ⟨C, hC0, hCD, ?_⟩ + intro B hB J x hJ hunit hInv hbound m + rw [norm_iteratedFDeriv_inverseTranspose J x m] + exact hC B hB J x hJ hunit hInv hbound m + +end InverseTranspose + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InverseMajorant.lean b/lean/OAI/Geometry/RCD/Coordinates/InverseMajorant.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9dfef0f4c987e05a76846df3eca1dd7af659b88 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InverseMajorant.lean @@ -0,0 +1,156 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Topology.Algebra.Order.Field +import Mathlib.Tactic + +namespace OAI + +/-! +# An inverse-coefficient majorant without exponential loss + +The normalized interior convolution of a positive weight sequence tends +to zero. This makes the inverse recurrence contractive at large orders. +Finite initial orders are bounded uniformly over every sequence satisfying +the recurrence. The final constant is independent of the sequence and +the order, so it introduces no new exponential base. +-/ + +open Finset Filter +open scoped BigOperators Topology + +noncomputable section + +namespace RegularPointCoordinates + +/-- The convolution with the two endpoint terms omitted. -/ +def interiorConvolution (L : ℕ → ℝ) (m : ℕ) : ℝ := + ∑ l ∈ Finset.Icc 1 (m - 1), L l * L (m - l) + +/-- Normalized interior convolution from `re:convolution-decay`. -/ +def normalizedInteriorConvolution (L : ℕ → ℝ) (m : ℕ) : ℝ := + interiorConvolution L m / L m + +/-- The positive-order recurrence after removing the exponential jet base. -/ +def HasInverseMajorantRecurrence (L a : ℕ → ℝ) (A : ℝ) : Prop := + ∀ m, 0 < m → a m ≤ A * L m + Real.sqrt A * + ∑ l ∈ Finset.Icc 1 (m - 1), L l * a (m - l) + +theorem interiorConvolution_nonneg {L : ℕ → ℝ} (hL : ∀ m, 0 ≤ L m) (m : ℕ) : + 0 ≤ interiorConvolution L m := by + exact Finset.sum_nonneg fun l _ => mul_nonneg (hL l) (hL (m - l)) + +theorem normalizedInteriorConvolution_mul {L : ℕ → ℝ} + (hL : ∀ m, 0 < L m) (m : ℕ) : + normalizedInteriorConvolution L m * L m = interiorConvolution L m := + div_mul_cancel₀ _ (ne_of_gt (hL m)) + +/-- A bound at smaller orders controls the convolution in the recurrence. -/ +theorem inverse_recurrence_step {L a : ℕ → ℝ} {A C : ℝ} + (hL : ∀ m, 0 < L m) (hrec : HasInverseMajorantRecurrence L a A) + {m : ℕ} (hm : 0 < m) (hprev : ∀ j < m, a j ≤ C * L j) : + a m ≤ (A + Real.sqrt A * C * normalizedInteriorConvolution L m) * L m := by + have hsum : (∑ l ∈ Finset.Icc 1 (m - 1), L l * a (m - l)) ≤ + C * interiorConvolution L m := by + calc + _ ≤ ∑ l ∈ Finset.Icc 1 (m - 1), L l * (C * L (m - l)) := by + apply Finset.sum_le_sum + intro l hl + have hlone : 1 ≤ l := (Finset.mem_Icc.mp hl).1 + exact mul_le_mul_of_nonneg_left (hprev (m - l) (by omega)) (hL l).le + _ = _ := by + unfold interiorConvolution + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro l _ + ring + calc + a m ≤ A * L m + Real.sqrt A * + ∑ l ∈ Finset.Icc 1 (m - 1), L l * a (m - l) := hrec m hm + _ ≤ A * L m + Real.sqrt A * (C * interiorConvolution L m) := + add_le_add le_rfl (mul_le_mul_of_nonneg_left hsum (Real.sqrt_nonneg A)) + _ = _ := by rw [← normalizedInteriorConvolution_mul hL m]; ring + +/-- All orders below a finite cutoff have a common bound derived from +the recurrence itself, uniform over every admissible sequence. -/ +theorem inverse_majorant_finite_prefix {L : ℕ → ℝ} {A initial : ℝ} + (hL : ∀ m, 0 < L m) (hinitial : 0 ≤ initial) (N : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ a : ℕ → ℝ, + a 0 ≤ initial * L 0 → HasInverseMajorantRecurrence L a A → + ∀ m < N, a m ≤ C * L m := by + induction N with + | zero => exact ⟨initial, hinitial, fun _ _ _ m hm => (Nat.not_lt_zero m hm).elim⟩ + | succ N ih => + obtain ⟨C, hC, hbound⟩ := ih + let D := max C (max initial + (A + Real.sqrt A * C * normalizedInteriorConvolution L N)) + refine ⟨D, hC.trans (le_max_left _ _), ?_⟩ + intro a ha0 hrec m hm + by_cases hmN : m < N + · exact (hbound a ha0 hrec m hmN).trans + (mul_le_mul_of_nonneg_right (le_max_left _ _) (hL m).le) + · have hmEq : m = N := by omega + subst m + by_cases hN : N = 0 + · subst N + exact ha0.trans (mul_le_mul_of_nonneg_right + ((le_max_left initial _).trans (le_max_right C _)) (hL 0).le) + · exact (inverse_recurrence_step hL hrec (Nat.pos_of_ne_zero hN) + (hbound a ha0 hrec)).trans (mul_le_mul_of_nonneg_right + ((le_max_right initial _).trans (le_max_right C _)) (hL N).le) + +/-- Vanishing normalized convolution implies a uniform inverse majorant. +The same constant works for every admissible sequence. -/ +theorem inverse_majorant_uniform {L : ℕ → ℝ} {A initial : ℝ} + (hL : ∀ m, 0 < L m) (hA : 0 ≤ A) (hinitial : 0 ≤ initial) + (hdecay : Tendsto (normalizedInteriorConvolution L) atTop (𝓝 0)) : + ∃ C : ℝ, initial ≤ C ∧ 2 * A ≤ C ∧ 0 ≤ C ∧ + ∀ a : ℕ → ℝ, a 0 ≤ initial * L 0 → + HasInverseMajorantRecurrence L a A → ∀ m, a m ≤ C * L m := by + have hlim : Tendsto (fun m => Real.sqrt A * normalizedInteriorConvolution L m) + atTop (𝓝 0) := by + simpa using tendsto_const_nhds.mul hdecay + have hsmall : ∀ᶠ m in atTop, + Real.sqrt A * normalizedInteriorConvolution L m ≤ 1 / 2 := by + exact (hlim.eventually (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1 / 2))).mono + fun _ h => h.le + obtain ⟨M₀, hM₀⟩ := Filter.eventually_atTop.mp hsmall + let M := max M₀ 1 + obtain ⟨D, _, hprefix⟩ := inverse_majorant_finite_prefix hL hinitial M + let C := max initial (max (2 * A) D) + have hIC : initial ≤ C := le_max_left _ _ + have hAC : 2 * A ≤ C := (le_max_left _ _).trans (le_max_right _ _) + have hDC : D ≤ C := (le_max_right _ _).trans (le_max_right _ _) + have hC : 0 ≤ C := (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) hA).trans hAC + refine ⟨C, hIC, hAC, hC, ?_⟩ + intro a ha0 hrec m + induction m using Nat.strong_induction_on with + | h m ih => + by_cases hm : m < M + · exact (hprefix a ha0 hrec m hm).trans + (mul_le_mul_of_nonneg_right hDC (hL m).le) + · have hmM : M ≤ m := Nat.le_of_not_gt hm + have hmpos : 0 < m := lt_of_lt_of_le (by dsimp [M]; omega) hmM + have hsmallm := hM₀ m ((le_max_left M₀ 1).trans hmM) + have hcontract : A + Real.sqrt A * C * normalizedInteriorConvolution L m ≤ C := by + have hmul := mul_le_mul_of_nonneg_left hsmallm hC + nlinarith + exact (inverse_recurrence_step hL hrec hmpos ih).trans + (mul_le_mul_of_nonneg_right hcontract (hL m).le) + +/-- Specialization to the initial inverse norm `√A` used by the manuscript. -/ +theorem inverse_coefficients_uniform_bound {L : ℕ → ℝ} {A : ℝ} + (hL : ∀ m, 0 < L m) (hLzero : L 0 = 1) (hA : 1 ≤ A) + (hdecay : Tendsto (normalizedInteriorConvolution L) atTop (𝓝 0)) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ a : ℕ → ℝ, a 0 ≤ Real.sqrt A → + HasInverseMajorantRecurrence L a A → ∀ m, a m ≤ C * L m := by + obtain ⟨C, hIC, hAC, _, hbound⟩ := inverse_majorant_uniform hL + (zero_le_one.trans hA) (Real.sqrt_nonneg A) hdecay + refine ⟨C, hIC, hAC, ?_⟩ + intro a ha0 hrec + exact hbound a (by simpa [hLzero] using ha0) hrec + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/InverseMetricFrames.lean b/lean/OAI/Geometry/RCD/Coordinates/InverseMetricFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b65972f858f1e2abfcb08b9a25818202235fb33 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/InverseMetricFrames.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.LinearNormalization +import OAI.Geometry.RCD.Coordinates.WeightedInverse + +namespace OAI + +/-! # Exact Euclidean frames for the inverse heat metrics -/ + +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ E] in +/-- An invertible positive form is strictly positive on nonzero vectors. -/ +theorem positive_equiv_strict (Q : E ≃L[ℝ] E) + (hQ : Q.toContinuousLinearMap.IsPositive) {v : E} (hv : v ≠ 0) : + 0 < ⟪v, Q v⟫_ℝ := by + have hn := hQ.inner_nonneg_right v + apply lt_of_le_of_ne hn + intro hz + have h := positive_form_cauchy_schwarz hQ (Q v) v + simp only [ContinuousLinearEquiv.coe_coe] at h hz + rw [← hz, mul_zero, real_inner_self_eq_norm_sq] at h + have hs : ‖Q v‖ ^ 2 = 0 := by nlinarith [sq_nonneg (‖Q v‖ ^ 2)] + have hzero : Q v = 0 := norm_eq_zero.mp (sq_eq_zero_iff.mp hs) + exact hv (Q.injective (by simpa only [map_zero] using hzero)) + +/-- A finite-dimensional inverse metric represented by an actual linear frame. -/ +def inverseMetricFrame (Q : E ≃L[ℝ] E) + (hQ : Q.toContinuousLinearMap.IsPositive) : E ≃L[ℝ] E := + (Classical.choose (exists_exact_operator_normalization Q.symm.toContinuousLinearMap + (positive_equiv_symm Q hQ).isSymmetric + (fun _ hv => positive_equiv_strict Q.symm (positive_equiv_symm Q hQ) hv))).symm + +@[simp] theorem inverseMetricFrame_norm_sq (Q : E ≃L[ℝ] E) + (hQ : Q.toContinuousLinearMap.IsPositive) (v : E) : + ‖inverseMetricFrame Q hQ v‖ ^ 2 = ⟪v, Q.symm v⟫_ℝ := by + let A := (inverseMetricFrame Q hQ).symm + have he : A.toContinuousLinearMap.adjoint.comp + (Q.symm.toContinuousLinearMap.comp A.toContinuousLinearMap) = + ContinuousLinearMap.id ℝ E := + Classical.choose_spec (exists_exact_operator_normalization Q.symm.toContinuousLinearMap + (positive_equiv_symm Q hQ).isSymmetric + (fun _ hv => positive_equiv_strict Q.symm (positive_equiv_symm Q hQ) hv)) + have h := congrArg (fun T : E →L[ℝ] E => ⟪A.symm v, T (A.symm v)⟫_ℝ) he + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply, + ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] at h + exact h.symm + +/-- Decreasing positive forms have increasing inverse-frame norms. -/ +theorem inverseMetricFrame_mono (P Q : E ≃L[ℝ] E) + (hP : P.toContinuousLinearMap.IsPositive) (hQ : Q.toContinuousLinearMap.IsPositive) + (hD : (P.toContinuousLinearMap - Q.toContinuousLinearMap).IsPositive) (v : E) : + ‖inverseMetricFrame P hP v‖ ≤ ‖inverseMetricFrame Q hQ v‖ := by + have h := (inverse_increment_isPositive P Q hP hQ hD).inner_nonneg_right v + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] at h + apply (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + simp only [inverseMetricFrame_norm_sq] + linarith only [h] + +/-- Slow heat decay gives a uniform comparison of successive frozen frames. -/ +theorem inverseMetricFrame_step (P Q : E ≃L[ℝ] E) + (hP : P.toContinuousLinearMap.IsPositive) (hQ : Q.toContinuousLinearMap.IsPositive) + (hstep : ∀ v, ⟪v, P v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q v⟫_ℝ) (v : E) : + ‖inverseMetricFrame Q hQ v‖ ≤ 2 * ‖inverseMetricFrame P hP v‖ := by + have hc (w : E) : (8 / 9 : ℝ) * ⟪w, P w⟫_ℝ ≤ ⟪w, Q w⟫_ℝ := by + have h := hstep w + linarith + have h := (relative_inverse_bounds P Q hP hQ (by norm_num : (0 : ℝ) < 8 / 9) hc v).1 + rw [← inverseMetricFrame_norm_sq Q hQ, ← inverseMetricFrame_norm_sq P hP] at h + nlinarith [sq_nonneg (‖inverseMetricFrame P hP v‖), norm_nonneg (inverseMetricFrame Q hQ v), + norm_nonneg (inverseMetricFrame P hP v)] + +omit [FiniteDimensional ℝ E] in +/-- A relative half-small decrement controls the inverse discrepancy in +both endpoint metrics, including the finer metric used by patch assembly. -/ +theorem inverse_difference_energy_le (P Q : E ≃L[ℝ] E) + (hP : P.toContinuousLinearMap.IsPositive) (hQ : Q.toContinuousLinearMap.IsPositive) + (hD : (P.toContinuousLinearMap - Q.toContinuousLinearMap).IsPositive) + (hstep : ∀ v, ⟪v, P v⟫_ℝ ≤ 2 * ⟪v, Q v⟫_ℝ) (xi : E) : + let d := Q.symm xi - P.symm xi + ⟪d, Q d⟫_ℝ ≤ ⟪xi, Q.symm xi⟫_ℝ - ⟪xi, P.symm xi⟫_ℝ := by + intro d + have hsmall (v : E) : ⟪v, (P.toContinuousLinearMap - Q.toContinuousLinearMap) v⟫_ℝ ≤ + (1 / 2 : ℝ) * ⟪v, P v⟫_ℝ := by + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] + linarith only [hstep v] + have h := inverse_increment_weighted_square_le P Q hP hQ hD hsmall xi + have hm := hD.inner_nonneg_right d + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] at h hm + change ⟪d, P d⟫_ℝ ≤ ⟪xi, Q.symm xi⟫_ℝ - ⟪xi, P.symm xi⟫_ℝ at h + linarith only [h, hm] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/IterationLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/IterationLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..b16b843e547b09aa732de205bde0eb7f1216cb2b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/IterationLimit.lean @@ -0,0 +1,392 @@ +import OAI.Geometry.RCD.Coordinates.MetricIteration +import OAI.Geometry.RCD.Coordinates.LimitChart + +namespace OAI + +/-! +# The metric iteration produces the limiting chart estimates + +Finite-stage differential estimates imply geometric increment and Taylor +bounds. Pair geometry controls the original coordinates, the selected +scale, and the frozen metrics along each coordinate-value segment. +-/ + +open Filter Set +open scoped Topology ContDiff BigOperators + +noncomputable section + +namespace RegularPointCoordinates + +section Analytic + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +namespace AnalyticIterationData + +theorem energy_le {Ω : Set E} {r0 T F B epsilon : ℝ} + (d : AnalyticIterationData Ω r0 T F B epsilon) (i : ℕ) (x : E) (hx : x ∈ Ω) : + d.energy i x ≤ epsilon := by + exact (Finset.single_le_sum (fun j _ => d.energy_nonneg j x hx) + (Finset.mem_range.mpr (Nat.lt_succ_self i))).trans (d.energy_budget (i + 1) x hx) + +/-- Increasing the permitted defect changes no maps or metrics. -/ +def withLargerParameter {Ω : Set E} {r0 T F B epsilon delta : ℝ} + (d : AnalyticIterationData Ω r0 T F B epsilon) (hr0 : 0 < r0) + (hF : 0 ≤ F) (hB : 0 < B) (hed : epsilon ≤ delta) : + AnalyticIterationData Ω r0 T F B delta where + frozen := d.frozen + correction := d.correction + principal := d.principal + mass := d.mass + energy := d.energy + frozen_mono := d.frozen_mono + correction_smooth := d.correction_smooth + energy_nonneg := d.energy_nonneg + energy_budget := fun k x hx => (d.energy_budget k x hx).trans hed + mass_nonneg := d.mass_nonneg + principal_nonneg := d.principal_nonneg + principal_le_mass := d.principal_le_mass + mass_budget := d.mass_budget + principal_budget := d.principal_budget + value_bound := by + intro i x hx + have hr := iterationRadius_pos hr0 i + exact (d.value_bound i x hx).trans (by gcongr) + first_bound := by + intro i x hx xi + exact (d.first_bound i x hx xi).trans (by gcongr) + second_bound := d.second_bound + linear_bound := d.linear_bound + correction_jets := by + intro i x hx m + exact (d.correction_jets i x hx m).trans + (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hed hF) + (factorialMajorant_pos m).le) (jetCoefficientScale_pos hB m).le) + +end AnalyticIterationData + +/-- Only the second normalized jet is needed for the final pair estimate. -/ +structure FiniteIterationControl {Ω : Set E} {r0 T F B epsilon : ℝ} + (d : AnalyticIterationData Ω r0 T F B epsilon) : Prop where + smooth : ∀ i x, x ∈ Ω → ∀ m : ℕ, ContDiffAt ℝ m (metricIterate d.correction i) x + metric : ∀ i x, x ∈ Ω → ∀ xi, + (4 * T)⁻¹ * ‖d.frozen i x xi‖ ^ 2 ≤ ‖fderiv ℝ (metricIterate d.correction i) x xi‖ ^ 2 ∧ + ‖fderiv ℝ (metricIterate d.correction i) x xi‖ ^ 2 ≤ (4 * T) * ‖d.frozen i x xi‖ ^ 2 + second_jet : ∀ i x, x ∈ Ω → + ‖iteratedFDeriv ℝ 2 (normalizedCoordinates (iterationRadius r0 i) + (d.frozen i x) x (metricIterate d.correction i)) 0‖ ≤ 8 * B + +omit [CompleteSpace E] in +/-- Recover the actual second directional derivative from the normalized +second jet, without an ambient operator norm or condition-number loss. -/ +theorem second_derivative_le_of_normalized_jet + {h : E → E} {x : E} {r B : ℝ} (hr : 0 < r) (T : E ≃L[ℝ] E) + (hh : ContDiffAt ℝ 2 h x) + (hjet : ‖iteratedFDeriv ℝ 2 (normalizedCoordinates r T x h) 0‖ ≤ 8 * B) + (xi : E) : + ‖fderiv ℝ (fderiv ℝ h) x xi xi‖ ≤ 8 * B / r * ‖T xi‖ ^ 2 := by + have ht := normalized_jet_apply T h x 0 r (by norm_num : 0 < (2 : ℕ)) + (by simpa using hh) (fun _ => T xi) + have hfactor : r⁻¹ * r ^ 2 = r := by field_simp + change iteratedFDeriv ℝ 2 (normalizedCoordinates r T x h) 0 (fun _ => T xi) = _ at ht + simp only [map_zero, smul_zero, add_zero, ContinuousLinearEquiv.symm_apply_apply, + hfactor, iteratedFDeriv_two_apply] at ht + have hn : ‖iteratedFDeriv ℝ 2 (normalizedCoordinates r T x h) 0 (fun _ => T xi)‖ ≤ + 8 * B * ‖T xi‖ ^ 2 := by + calc + _ ≤ ‖iteratedFDeriv ℝ 2 (normalizedCoordinates r T x h) 0‖ * ‖T xi‖ ^ 2 := by + simpa using (iteratedFDeriv ℝ 2 (normalizedCoordinates r T x h) 0).le_opNorm + (fun _ => T xi) + _ ≤ _ := mul_le_mul_of_nonneg_right hjet (sq_nonneg _) + rw [iteratedFDeriv_two_apply, ht, norm_smul, Real.norm_eq_abs, abs_of_pos hr] at hn + calc + _ ≤ (8 * B * ‖T xi‖ ^ 2) / r := (le_div_iff₀ hr).mpr (by nlinarith) + _ = _ := by ring + +/-- The correction value and coercivity give a genuine geometric increment +bound for the recursively defined maps. -/ +theorem metricIterate_step_le [FiniteDimensional ℝ E] + {Ω : Set E} {r0 T F B epsilon : ℝ} (d : AnalyticIterationData Ω r0 T F B epsilon) + (hT : 1 ≤ T) (hF : 0 ≤ F) (hepsilon : 0 ≤ epsilon) (hr0 : 0 < r0) + (hc : FiniteIterationControl d) (i : ℕ) (x : E) (hx : x ∈ Ω) : + dist (metricIterate d.correction i x) (metricIterate d.correction (i + 1) x) ≤ + (4 * T) * F * epsilon * iterationRadius r0 i := by + have hA : 1 ≤ 4 * T := by linarith + have hA0 : 0 ≤ 4 * T := by linarith + obtain ⟨e, he, hinv⟩ := exists_equiv_inverseTranspose_bound + (d.frozen i x) (fderiv ℝ (metricIterate d.correction i) x) hA + (fun xi => (hc.metric i x hx xi).1) + have hsqrt : Real.sqrt (4 * T) ≤ 4 * T := by + nlinarith [Real.sq_sqrt hA0, Real.sqrt_nonneg (4 * T)] + have henergy : Real.sqrt (d.energy i x) ≤ Real.sqrt epsilon := + Real.sqrt_le_sqrt (d.energy_le i x hx) + have hr := iterationRadius_pos hr0 i + rw [metricIterate_succ, dist_eq_norm] + simp only [sub_add_eq_sub_sub, sub_self, zero_sub, norm_neg] + rw [← he, operatorInverseTranspose_equiv] + calc + _ ≤ Real.sqrt (4 * T) * + ‖(d.frozen i x).symm.toContinuousLinearMap.adjoint (d.correction i x)‖ := hinv _ + _ ≤ Real.sqrt (4 * T) * + (F * Real.sqrt epsilon * iterationRadius r0 i * Real.sqrt (d.energy i x)) := + mul_le_mul_of_nonneg_left (d.value_bound i x hx) (Real.sqrt_nonneg _) + _ ≤ (4 * T) * (F * Real.sqrt epsilon * iterationRadius r0 i * Real.sqrt epsilon) := by + gcongr + _ = (4 * T) * F * (Real.sqrt epsilon * Real.sqrt epsilon) * iterationRadius r0 i := by ring + _ = _ := by rw [Real.mul_self_sqrt hepsilon] + +end Analytic + +section Pairs + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- A convenient non-sharp constant for converting metric squares to linear +separation. It avoids introducing a square root into the final chart ratio. -/ +theorem linear_comparison_of_frozen_metric + (T : E ≃L[ℝ] E) (J : E →L[ℝ] E) {A G t : ℝ} (hA : 1 ≤ A) (hG : 1 ≤ G) + (ht : 0 ≤ t) (w : E) + (hmetric : ∀ xi, A⁻¹ * ‖T xi‖ ^ 2 ≤ ‖J xi‖ ^ 2 ∧ + ‖J xi‖ ^ 2 ≤ A * ‖T xi‖ ^ 2) + (hlower : G⁻¹ * t ≤ ‖T w‖) (hupper : ‖T w‖ ≤ G * t) : + (2 * (A * G))⁻¹ * t ≤ ‖J w‖ ∧ ‖J w‖ ≤ 2 * (A * G) * t := by + have hA0 : 0 < A := by linarith + have hG0 : 0 < G := by linarith + have hsqrt : Real.sqrt A ≤ A := by + nlinarith [Real.sq_sqrt hA0.le, Real.sqrt_nonneg A] + have hlow := norm_le_sqrt_mul_of_metric_lower T J hA (fun xi => (hmetric xi).1) w + have hlow' : ‖T w‖ ≤ A * ‖J w‖ := + hlow.trans (mul_le_mul_of_nonneg_right hsqrt (norm_nonneg _)) + have hnorm : ‖J w‖ ≤ Real.sqrt A * ‖T w‖ := by + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + simpa only [mul_pow, Real.sq_sqrt hA0.le] using (hmetric w).2 + have hnorm' : ‖J w‖ ≤ A * (G * t) := hnorm.trans + ((mul_le_mul_of_nonneg_right hsqrt (norm_nonneg _)).trans + (mul_le_mul_of_nonneg_left hupper hA0.le)) + have ht' : t ≤ G * ‖T w‖ := by + rw [← div_eq_inv_mul] at hlower + exact (div_le_iff₀ hG0).mp hlower |>.trans_eq (mul_comm _ _) + constructor + · rw [← div_eq_inv_mul] + apply (div_le_iff₀ (by positivity : 0 < 2 * (A * G))).mpr + have hh := ht'.trans (mul_le_mul_of_nonneg_left hlow' hG0.le) + nlinarith [mul_nonneg hA0.le (mul_nonneg hG0.le (norm_nonneg (J w)))] + · nlinarith [mul_nonneg hA0.le (mul_nonneg hG0.le ht)] + +end Pairs + +/-- The chart ratio and pair radius are fixed before the final smallness +parameter is chosen. -/ +def iterationChartRatio (T G : ℝ) : ℝ := (4 * T) * G + +def iterationPairMultiplier (T B G : ℝ) : ℝ := + 64 * iterationChartRatio T G * B * G ^ 4 + +/-- A diameter restriction supplies the required dyadic pair scale. -/ +theorem exists_iteration_pair_scale {r0 L t : ℝ} (hr0 : 0 < r0) (hL : 0 < L) + (ht : 0 < t) (hdiam : L * t ≤ r0) : + ∃ i, L * t ≤ iterationRadius r0 i ∧ iterationRadius r0 i ≤ 2 * L * t := by + obtain ⟨i, hi, hi'⟩ := exists_dyadic_scale (div_pos (mul_pos hL ht) hr0) + ((div_le_one hr0).mpr hdiam) + have hri : iterationRadius r0 i = r0 * (1 / 2 : ℝ) ^ i := by + unfold iterationRadius + rw [one_div_pow] + ring + have hl := (div_le_iff₀ hr0).mp hi + have hu' : (1 / 2 : ℝ) ^ i < (2 * L * t) / r0 := by convert hi' using 1; ring + have hu := (lt_div_iff₀ hr0).mp hu' + exact ⟨i, by rw [hri]; nlinarith, by rw [hri]; nlinarith⟩ + +/-- Raw geometric information about the original coordinates and frozen +metrics. No derivative, increment, or Taylor estimate occurs here. -/ +def IterationPairGeometry {X E : Type*} [MetricSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + (u : X → E) (Ω : Set E) (frozen : ℕ → E → E ≃L[ℝ] E) + (r0 T B G : ℝ) : Prop := + ∀ x z, x ≠ z → ∃ i, + iterationPairMultiplier T B G * dist x z ≤ iterationRadius r0 i ∧ + iterationRadius r0 i ≤ 2 * iterationPairMultiplier T B G * dist x z ∧ + G⁻¹ * dist x z ≤ ‖frozen i (u x) (u z - u x)‖ ∧ + ‖frozen i (u x) (u z - u x)‖ ≤ G * dist x z ∧ + segment ℝ (u x) (u z) ⊆ Ω ∧ + ∀ y ∈ segment ℝ (u x) (u z), + ‖frozen i y (u z - u x)‖ ≤ G * ‖frozen i (u x) (u z - u x)‖ + +/-- Uniform geometric estimates at comparable scales, together with a +diameter bound, construct the pair-selected data. -/ +theorem iterationPairGeometry_of_all_scales {X E : Type*} [MetricSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + (u : X → E) (Ω : Set E) (frozen : ℕ → E → E ≃L[ℝ] E) + {r0 T B G : ℝ} (hr0 : 0 < r0) (hT : 1 ≤ T) (hB : 1 ≤ B) (hG : 1 ≤ G) + (hdiam : ∀ x z : X, iterationPairMultiplier T B G * dist x z ≤ r0) + (hgeometry : ∀ i x z, x ≠ z → + iterationPairMultiplier T B G * dist x z ≤ iterationRadius r0 i → + iterationRadius r0 i ≤ 2 * iterationPairMultiplier T B G * dist x z → + G⁻¹ * dist x z ≤ ‖frozen i (u x) (u z - u x)‖ ∧ + ‖frozen i (u x) (u z - u x)‖ ≤ G * dist x z ∧ + segment ℝ (u x) (u z) ⊆ Ω ∧ + ∀ y ∈ segment ℝ (u x) (u z), + ‖frozen i y (u z - u x)‖ ≤ G * ‖frozen i (u x) (u z - u x)‖) : + IterationPairGeometry u Ω frozen r0 T B G := by + intro x z hxz + have hL : 0 < iterationPairMultiplier T B G := by + unfold iterationPairMultiplier iterationChartRatio + positivity + obtain ⟨i, hi, hi'⟩ := exists_iteration_pair_scale hr0 hL (dist_pos.mpr hxz) (hdiam x z) + exact ⟨i, hi, hi', hgeometry i x z hxz hi hi'⟩ + +section Limit + +variable {X : Type*} [MetricSpace X] {n : ℕ} + +/-- Analytic iteration bounds and pair geometry supply scale-selected Taylor +estimates for the limit. -/ +theorem exists_limit_dist_bounds_of_analytic_iteration + {Ω : Set (Euclidean n)} {r0 T F B G epsilon : ℝ} + (d : AnalyticIterationData Ω r0 T F B epsilon) + (hT : 1 ≤ T) (hF : 1 ≤ F) (hB : 1 ≤ B) (hG : 1 ≤ G) + (hr0 : 0 < r0) (hepsilon : 0 ≤ epsilon) (hc : FiniteIterationControl d) + (u : X → Euclidean n) (hu : ∀ x, u x ∈ Ω) + (hgeometry : IterationPairGeometry u Ω d.frozen r0 T B G) + (hsmall : 8 * (4 * T) * F * epsilon * iterationPairMultiplier T B G ≤ + (8 * iterationChartRatio T G)⁻¹) : + ∃ H : X → Euclidean n, + (∀ x, Tendsto (fun i => metricIterate d.correction i (u x)) atTop (𝓝 (H x))) ∧ + ∀ x z, (4 * iterationChartRatio T G)⁻¹ * dist x z ≤ dist (H x) (H z) ∧ + dist (H x) (H z) ≤ (4 * iterationChartRatio T G) * dist x z := by + let q := iterationChartRatio T G + let L := iterationPairMultiplier T B G + let C := (4 * T) * F * epsilon * r0 + have hq : 1 ≤ q := by dsimp [q, iterationChartRatio]; nlinarith + have hq0 : 0 < q := by linarith + have hL : 0 < L := by dsimp [L, iterationPairMultiplier, iterationChartRatio]; positivity + have hstep (i : ℕ) (x : X) : + dist (metricIterate d.correction i (u x)) + (metricIterate d.correction (i + 1) (u x)) ≤ C * (1 / 2 : ℝ) ^ i := by + have hi := metricIterate_step_le d hT (by linarith) hepsilon hr0 hc i (u x) (hu x) + convert hi using 1 + dsimp [C, iterationRadius] + rw [one_div_pow] + ring + apply exists_limit_dist_bounds_of_taylor u (metricIterate d.correction) + (fun i => fderiv ℝ (metricIterate d.correction i)) + (fun i => fderiv ℝ (fderiv ℝ (metricIterate d.correction i))) hq hstep + intro x z hxz + obtain ⟨i, hscale, hscale', hlower, hupper, hsegment, hnear⟩ := hgeometry x z hxz + let w := u z - u x + let M := 8 * B / iterationRadius r0 i * G ^ 4 * (dist x z) ^ 2 + have hr := iterationRadius_pos hr0 i + have hdist : 0 < dist x z := dist_pos.mpr hxz + have hM : 0 ≤ M := by dsimp [M]; positivity + have hlinear := linear_comparison_of_frozen_metric (d.frozen i (u x)) + (fderiv ℝ (metricIterate d.correction i) (u x)) (by linarith : 1 ≤ 4 * T) + hG hdist.le w (hc.metric i (u x) (hu x)) hlower hupper + refine ⟨i, M, hM, ?_, ?_, ?_, hlinear.1, hlinear.2, ?_, ?_⟩ + · intro y hy + exact ((hc.smooth i y (hsegment hy) 1).differentiableAt (by norm_num)).hasFDerivAt + · intro y hy + exact (((hc.smooth i y (hsegment hy) 2).fderiv_right (m := 1) + (by norm_num)).differentiableAt (by norm_num)).hasFDerivAt + · intro y hy + have hnorm : ‖d.frozen i y w‖ ≤ G ^ 2 * dist x z := by + calc + _ ≤ G * ‖d.frozen i (u x) w‖ := hnear y hy + _ ≤ G * (G * dist x z) := mul_le_mul_of_nonneg_left hupper (by linarith) + _ = _ := by ring + calc + _ ≤ 8 * B / iterationRadius r0 i * ‖d.frozen i y w‖ ^ 2 := + second_derivative_le_of_normalized_jet hr (d.frozen i y) + (hc.smooth i y (hsegment hy) 2) (hc.second_jet i y (hsegment hy)) w + _ ≤ 8 * B / iterationRadius r0 i * (G ^ 2 * dist x z) ^ 2 := by gcongr + _ = M := by dsimp [M]; ring + · have hcoeff : (8 * q)⁻¹ * L = 8 * B * G ^ 4 := by + dsimp [L, iterationPairMultiplier] + change (8 * q)⁻¹ * (64 * q * B * G ^ 4) = _ + field_simp + ring + change 8 * B / iterationRadius r0 i * G ^ 4 * dist x z ^ 2 ≤ (8 * q)⁻¹ * dist x z + have heq : 8 * B / iterationRadius r0 i * G ^ 4 * dist x z ^ 2 = + (8 * B * G ^ 4 * dist x z ^ 2) / iterationRadius r0 i := by ring + rw [heq] + apply (div_le_iff₀ hr).mpr + calc + _ = ((8 * q)⁻¹ * dist x z) * (L * dist x z) := by rw [← hcoeff]; ring + _ ≤ _ := mul_le_mul_of_nonneg_left hscale (by positivity) + · have hrad : C * (1 / 2 : ℝ) ^ i = (4 * T) * F * epsilon * iterationRadius r0 i := by + dsimp [C, iterationRadius] + rw [one_div_pow] + ring + calc + 4 * C * (1 / 2 : ℝ) ^ i = 4 * (C * (1 / 2 : ℝ) ^ i) := by ring + _ = 4 * ((4 * T) * F * epsilon * iterationRadius r0 i) := by rw [hrad] + _ ≤ 4 * ((4 * T) * F * epsilon * (2 * L * dist x z)) := by + gcongr + _ = (8 * (4 * T) * F * epsilon * L) * dist x z := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right hsmall hdist.le + +end Limit + +section FinalChart + +variable {X : Type*} [MetricSpace X] {n : ℕ} + +/-- One small parameter controls the analytic iteration, Taylor errors, and +limiting tails; invariance of domain gives the open image. -/ +theorem exists_analytic_iteration_limit_chart + (hIOD : EuclideanInvarianceOfDomain n) {T F B G : ℝ} + (hT : 1 ≤ T) (hF : 1 ≤ F) (hB : 1 ≤ B) (hG : 1 ≤ G) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ (p : X) (Ω : Set (Euclidean n)), IsOpen Ω → + ∀ (U : Set X), IsOpen U → p ∈ U → + ∀ (O : Set (Euclidean n)), IsOpen O → O ⊆ Ω → ∀ u : U ≃ₜ O, + ∀ (r0 : ℝ), 0 < r0 → ∀ d : AnalyticIterationData Ω r0 T F B epsilon, + IterationPairGeometry (fun x : U => (u x : Euclidean n)) Ω d.frozen r0 T B G → + HasOpenBilipschitzChart n p := by + obtain ⟨delta, hdelta, hdelta1, hcontrol⟩ := + exists_analytic_metric_iteration (E := Euclidean n) hT hF hB + let q := iterationChartRatio T G + let L := iterationPairMultiplier T B G + have hq : 1 ≤ q := by dsimp [q, iterationChartRatio]; nlinarith + have hq0 : 0 < q := by linarith + have hA0 : 0 < 4 * T := by linarith + have hF0 : 0 < F := by linarith + have hL0 : 0 < L := by dsimp [L, iterationPairMultiplier, iterationChartRatio]; positivity + let epsilon := min delta (64 * q * (4 * T) * F * L)⁻¹ + have hepsilon : 0 < epsilon := by dsimp [epsilon]; positivity + have hed : epsilon ≤ delta := min_le_left _ _ + have hes : epsilon ≤ (64 * q * (4 * T) * F * L)⁻¹ := min_le_right _ _ + have hsmall : 8 * (4 * T) * F * epsilon * L ≤ (8 * q)⁻¹ := by + calc + _ ≤ 8 * (4 * T) * F * (64 * q * (4 * T) * F * L)⁻¹ * L := by gcongr + _ = _ := by field_simp; ring + refine ⟨epsilon, hepsilon, hed.trans hdelta1, ?_⟩ + intro p Ω hΩ U hU hp O hO hOΩ u r0 hr0 d hgeometry + let d' := d.withLargerParameter hr0 (by linarith : 0 ≤ F) (by linarith : 0 < B) hed + have hc : FiniteIterationControl d := by + constructor + · intro i x hx m + exact (hcontrol Ω hΩ r0 hr0 d' i x hx).1 m + · intro i x hx xi + exact (hcontrol Ω hΩ r0 hr0 d' i x hx).2.1 xi + · intro i x hx + have hh := (hcontrol Ω hΩ r0 hr0 d' i x hx).2.2 2 (by norm_num) + change ‖iteratedFDeriv ℝ 2 (normalizedCoordinates (iterationRadius r0 i) + (d.frozen i x) x (metricIterate d.correction i)) 0‖ ≤ + B ^ (2 - 1) * ((2 : ℕ).factorial : ℝ) ^ 3 at hh + norm_num at hh + nlinarith + obtain ⟨H, _, hbound⟩ := exists_limit_dist_bounds_of_analytic_iteration d hT hF hB hG + hr0 hepsilon.le hc (fun x : U => (u x : Euclidean n)) (fun x => hOΩ (u x).property) + hgeometry hsmall + exact hasOpenBilipschitzChart_of_coordinates_and_bounds hIOD hU hp hO u + (by change 1 ≤ 4 * q; linarith) hbound + +end FinalChart + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/IterationOpenness.lean b/lean/OAI/Geometry/RCD/Coordinates/IterationOpenness.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7ff86a4c426d701b1e9ade68b6f61884f3a1e6d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/IterationOpenness.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Coordinates.IterationLimit +import OAI.Geometry.RCD.Coordinates.OpenLimitChart + +namespace OAI + +/-! # Direct openness of the analytic coordinate limit + +The frozen metrics increase, and the zeroth iterate is the identity. +Consequently every finite iterate has the same lower differential bound. +The uniform tail bound then passes the open-image property to the limit. +-/ + +open Set Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {n : ℕ} + +/-- The lower bound on the derivative is uniform in the iteration index. -/ +theorem FiniteIterationControl.inverse_differential_bound + {Ω : Set (Euclidean n)} {r0 T F B epsilon : ℝ} + {d : AnalyticIterationData Ω r0 T F B epsilon} + (hc : FiniteIterationControl d) (hT : 1 ≤ T) + (i : ℕ) (x : Euclidean n) (hx : x ∈ Ω) (v : Euclidean n) : + ‖v‖ ≤ (4*T)*‖fderiv ℝ (metricIterate d.correction i) x v‖ := by + have hA : 0 < 4*T := by linarith + have hzero := (hc.metric 0 x hx v).2 + simp only [metricIterate_zero, fderiv_id, ContinuousLinearMap.id_apply] at hzero + have hmono : ‖d.frozen 0 x v‖ ≤ ‖d.frozen i x v‖ := + monotone_nat_of_le_succ (fun j => d.frozen_mono j x hx v) (Nat.zero_le i) + have hlower := (hc.metric i x hx v).1 + have hmul := mul_le_mul_of_nonneg_left hlower hA.le + rw [← mul_assoc, mul_inv_cancel₀ hA.ne', one_mul] at hmul + have hs : ‖v‖^2 ≤ ((4*T)*‖fderiv ℝ (metricIterate d.correction i) x v‖)^2 := by + calc + _ ≤ (4*T)*‖d.frozen 0 x v‖^2 := hzero + _ ≤ (4*T)*‖d.frozen i x v‖^2 := by gcongr + _ ≤ (4*T)*((4*T)*‖fderiv ℝ (metricIterate d.correction i) x v‖^2) := + mul_le_mul_of_nonneg_left hmul hA.le + _ = _ := by ring + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hA.le (norm_nonneg _))).mp hs + +/-- The analytic iteration produces an open limit without a separate +invariance-of-domain premise. -/ +theorem exists_analytic_iteration_open_limit_chart + {X : Type*} [MetricSpace X] {T F B G : ℝ} + (hT : 1 ≤ T) (hF : 1 ≤ F) (hB : 1 ≤ B) (hG : 1 ≤ G) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ (p : X) (Ω : Set (Euclidean n)), IsOpen Ω → + ∀ (U : Set X), IsOpen U → p ∈ U → + ∀ (O : Set (Euclidean n)), IsOpen O → O ⊆ Ω → ∀ u : U ≃ₜ O, + ∀ (r0 : ℝ), 0 < r0 → ∀ d : AnalyticIterationData Ω r0 T F B epsilon, + IterationPairGeometry (fun x : U => (u x : Euclidean n)) Ω d.frozen r0 T B G → + HasOpenBilipschitzChart n p := by + obtain ⟨delta, hdelta, hdelta1, hcontrol⟩ := + exists_analytic_metric_iteration (E := Euclidean n) hT hF hB + let q := iterationChartRatio T G + let L := iterationPairMultiplier T B G + have hq : 1 ≤ q := by dsimp [q, iterationChartRatio]; nlinarith + have hq0 : 0 < q := by linarith + have hA0 : 0 < 4*T := by linarith + have hF0 : 0 < F := by linarith + have hL0 : 0 < L := by dsimp [L, iterationPairMultiplier, iterationChartRatio]; positivity + let epsilon := min delta (64*q*(4*T)*F*L)⁻¹ + have hepsilon : 0 < epsilon := by dsimp [epsilon]; positivity + have hed : epsilon ≤ delta := min_le_left _ _ + have hes : epsilon ≤ (64*q*(4*T)*F*L)⁻¹ := min_le_right _ _ + have hsmall : 8*(4*T)*F*epsilon*L ≤ (8*q)⁻¹ := by + calc + _ ≤ 8*(4*T)*F*(64*q*(4*T)*F*L)⁻¹*L := by gcongr + _ = _ := by field_simp; ring + refine ⟨epsilon, hepsilon, hed.trans hdelta1, ?_⟩ + intro p Ω hΩ U hU hp O hO hOΩ u r0 hr0 d hgeometry + let d' := d.withLargerParameter hr0 (by linarith : 0 ≤ F) (by linarith : 0 < B) hed + have hc : FiniteIterationControl d := by + constructor + · intro i x hx m + exact (hcontrol Ω hΩ r0 hr0 d' i x hx).1 m + · intro i x hx xi + exact (hcontrol Ω hΩ r0 hr0 d' i x hx).2.1 xi + · intro i x hx + have hh := (hcontrol Ω hΩ r0 hr0 d' i x hx).2.2 2 (by norm_num) + change ‖iteratedFDeriv ℝ 2 (normalizedCoordinates (iterationRadius r0 i) + (d.frozen i x) x (metricIterate d.correction i)) 0‖ ≤ + B^(2-1)*((2:ℕ).factorial:ℝ)^3 at hh + norm_num at hh + nlinarith + obtain ⟨H,hlim,hbound⟩ := exists_limit_dist_bounds_of_analytic_iteration d hT hF hB hG + hr0 hepsilon.le hc (fun x : U => (u x : Euclidean n)) (fun x => hOΩ (u x).property) + hgeometry hsmall + let C := (4*T)*F*epsilon*r0 + have hstep (i : ℕ) (x : U) : + dist (metricIterate d.correction i (u x)) + (metricIterate d.correction (i+1) (u x)) ≤ C*(1/2:ℝ)^i := by + have hh := metricIterate_step_le d hT (by linarith) hepsilon.le hr0 hc i + (u x) (hOΩ (u x).property) + convert hh using 1 + dsimp [C, iterationRadius] + rw [one_div_pow] + ring + apply hasOpenBilipschitzChart_of_coercive_limit hU hp hO u hA0 + (show 1 ≤ 4*iterationChartRatio T G by change 1≤4*q; linarith) + (f := metricIterate d.correction) (H := H) + (e := fun i => C*(1/2:ℝ)^i/(1-1/2)) + · intro i z hz + exact (hc.smooth i z (hOΩ hz) 1).differentiableAt (by norm_num) + · intro i z hz v + exact hc.inverse_differential_bound hT i z (hOΩ hz) v + · have hh := (tendsto_pow_atTop_nhds_zero_of_lt_one + (by norm_num : (0:ℝ)≤1/2) (by norm_num : (1/2:ℝ)<1)).const_mul C + simpa using hh.div_const (1-1/2) + · intro i x + exact dist_le_of_le_geometric_of_tendsto (1/2:ℝ) C (by norm_num) + (fun j => hstep j x) (hlim x) i + · exact hbound + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/JetStep.lean b/lean/OAI/Geometry/RCD/Coordinates/JetStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..e192b2d6096a3c6e2b8572dfa902738760bf5cf2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/JetStep.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.RCD.Coordinates.FactorialMajorant + +namespace OAI + +/-! +# Scalar all-order jet step + +At Gevrey exponent `σ = 2`, the factorial weights in an increment leave +only the factor `(m + 1)^3` relative to the allowed jet size. The next +dyadic scale contributes `2 / 2^m`. A single small parameter controls +every order `m ≥ 2`. The differential estimates producing the old jet +and increment are explicit premises of the scalar theorem below. +-/ + +namespace RegularPointCoordinates + +noncomputable section + +/-- The polynomial growth is dominated by the dyadic factor, including +the largest case at order three. -/ +theorem cubic_le_eight_mul_two_pow (m : ℕ) : + ((m : ℝ) + 1) ^ 3 ≤ 8 * (2 : ℝ) ^ m := by + induction m using Nat.strong_induction_on with + | h m ih => + by_cases hm : m ≤ 3 + · interval_cases m <;> norm_num + have hm4 : (4 : ℝ) ≤ (m : ℝ) := by exact_mod_cast (by omega : 4 ≤ m) + have hmone : 1 ≤ m := by omega + have hprev : (m : ℝ) ^ 3 ≤ 8 * (2 : ℝ) ^ (m - 1) := by + have h := ih (m - 1) (by omega) + have hcast : ((m - 1 : ℕ) : ℝ) + 1 = m := by + exact_mod_cast (Nat.sub_add_cancel hmone) + simpa only [hcast] using h + have hfactor : (0 : ℝ) ≤ ((m : ℝ) - 4) * ((m : ℝ) ^ 2 + m + 1) := + mul_nonneg (sub_nonneg.mpr hm4) (by positivity) + have hstep : ((m : ℝ) + 1) ^ 3 ≤ 2 * (m : ℝ) ^ 3 := by + nlinarith only [hfactor] + have hpow : (2 : ℝ) ^ m = 2 * (2 : ℝ) ^ (m - 1) := by + calc + _ = (2 : ℝ) ^ ((m - 1) + 1) := by rw [Nat.sub_add_cancel hmone] + _ = _ := by rw [pow_succ]; ring + calc + _ ≤ 2 * (m : ℝ) ^ 3 := hstep + _ ≤ 2 * (8 * (2 : ℝ) ^ (m - 1)) := mul_le_mul_of_nonneg_left hprev (by norm_num) + _ = _ := by rw [hpow]; ring + +theorem dyadic_cubic_le_sixteen (m : ℕ) : + (2 / (2 : ℝ) ^ m) * ((m : ℝ) + 1) ^ 3 ≤ 16 := by + rw [div_mul_eq_mul_div, div_le_iff₀ (by positivity : (0 : ℝ) < (2 : ℝ) ^ m)] + nlinarith only [cubic_le_eight_mul_two_pow m] + +theorem dyadic_jet_factor_le_half {m : ℕ} (hm : 2 ≤ m) : + 2 / (2 : ℝ) ^ m ≤ 1 / 2 := by + have hpow : (4 : ℝ) ≤ (2 : ℝ) ^ m := by + convert pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hm using 1 + norm_num + apply (div_le_iff₀ (by positivity : (0 : ℝ) < (2 : ℝ) ^ m)).mpr + nlinarith + +/-- Cancellation of factorials and the old exponential base. -/ +theorem jet_increment_factorization {B : ℝ} {m : ℕ} (hm : 1 ≤ m) : + B ^ m * factorialMajorant m * (m.factorial : ℝ) = + (B * ((m : ℝ) + 1) ^ 3) * + (B ^ (m - 1) * (m.factorial : ℝ) ^ 3) := by + have hpow : B ^ m = B ^ (m - 1) * B := by + calc + _ = B ^ ((m - 1) + 1) := by rw [Nat.sub_add_cancel hm] + _ = _ := by rw [pow_succ] + rw [hpow] + unfold factorialMajorant + rw [Nat.factorial_succ] + push_cast + ring + +/-- The all-order scalar jet step with an explicit smallness condition. -/ +theorem scalar_jet_step {B C epsilon old increment : ℝ} {m : ℕ} + (hB : 0 ≤ B) (hm : 2 ≤ m) (hsmall : epsilon * C * B ≤ 1 / 32) + (hold : old ≤ B ^ (m - 1) * (m.factorial : ℝ) ^ 3) + (hincrement : increment ≤ epsilon * C * B ^ m * + factorialMajorant m * (m.factorial : ℝ)) : + (2 / (2 : ℝ) ^ m) * (old + increment) ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + let allowance := B ^ (m - 1) * (m.factorial : ℝ) ^ 3 + have hallowance : 0 ≤ allowance := by dsimp [allowance]; positivity + have hincrement' : increment ≤ + (epsilon * C * B * ((m : ℝ) + 1) ^ 3) * allowance := by + calc + _ ≤ epsilon * C * B ^ m * factorialMajorant m * (m.factorial : ℝ) := hincrement + _ = _ := by + have h := jet_increment_factorization (B := B) (m := m) (by omega) + dsimp [allowance] + calc + _ = (epsilon * C) * (B ^ m * factorialMajorant m * (m.factorial : ℝ)) := by ring + _ = _ := by rw [h]; ring + have hproduct : epsilon * C * B * + ((2 / (2 : ℝ) ^ m) * ((m : ℝ) + 1) ^ 3) ≤ 1 / 2 := by + have h := mul_le_mul hsmall (dyadic_cubic_le_sixteen m) + (by positivity : (0 : ℝ) ≤ (2 / (2 : ℝ) ^ m) * ((m : ℝ) + 1) ^ 3) + (by norm_num : (0 : ℝ) ≤ 1 / 32) + norm_num at h ⊢ + exact h + have hcoefficient : 2 / (2 : ℝ) ^ m + epsilon * C * B * + ((2 / (2 : ℝ) ^ m) * ((m : ℝ) + 1) ^ 3) ≤ 1 := by + linarith [dyadic_jet_factor_le_half hm] + calc + _ ≤ (2 / (2 : ℝ) ^ m) * + (allowance + (epsilon * C * B * ((m : ℝ) + 1) ^ 3) * allowance) := + mul_le_mul_of_nonneg_left (add_le_add hold hincrement') (by positivity) + _ = (2 / (2 : ℝ) ^ m + epsilon * C * B * + ((2 / (2 : ℝ) ^ m) * ((m : ℝ) + 1) ^ 3)) * allowance := by ring + _ ≤ 1 * allowance := mul_le_mul_of_nonneg_right hcoefficient hallowance + _ = _ := by simp [allowance] + +/-- A positive parameter can be fixed once, after fixing the constants, +so that the scalar jet step holds at every positive order above one. -/ +theorem exists_uniform_scalar_jet_step {B C : ℝ} (hB : 0 ≤ B) (hC : 0 ≤ C) : + ∃ epsilon : ℝ, 0 < epsilon ∧ ∀ (m : ℕ) (old increment : ℝ), 2 ≤ m → + old ≤ B ^ (m - 1) * (m.factorial : ℝ) ^ 3 → + increment ≤ epsilon * C * B ^ m * factorialMajorant m * (m.factorial : ℝ) → + (2 / (2 : ℝ) ^ m) * (old + increment) ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + let epsilon := 1 / (32 * (C * B + 1)) + have hCB : 0 ≤ C * B := mul_nonneg hC hB + have hepsilon : 0 < epsilon := by dsimp [epsilon]; positivity + have hsmall : epsilon * C * B ≤ 1 / 32 := by + have hden : 0 < 32 * (C * B + 1) := by positivity + calc + _ = (C * B) / (32 * (C * B + 1)) := by dsimp [epsilon]; ring + _ ≤ 1 / 32 := (div_le_iff₀ hden).mpr (by nlinarith) + exact ⟨epsilon, hepsilon, fun m old increment hm hold hincrement => + scalar_jet_step hB hm hsmall hold hincrement⟩ + +end + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/KernelBridgeNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/KernelBridgeNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..80e18daab752c2db14cc06979023c399044368ec --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/KernelBridgeNormalization.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Heat.NonnegativeKernelBridgeMass +import Mathlib.MeasureTheory.Measure.WithDensity +import Mathlib.MeasureTheory.Measure.Typeclasses.Probability + +namespace OAI + +/-! # Exact normalization of an intermediate kernel bridge + +The composed kernel and one endpoint marginal fix the intermediate mass. +This is the normalization identity for the entropic interpolation. +-/ + +open Set Filter MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {A B Z : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace Z] + (μ : Measure A) (ν : Measure B) (σ : Measure Z) + [IsProbabilityMeasure μ] [SFinite ν] [SFinite σ] + +theorem kernel_bridge_normalized {F : A → ℝ≥0∞} {G : B → ℝ≥0∞} + {L : A × Z → ℝ≥0∞} {R : Z × B → ℝ≥0∞} {K : A × B → ℝ≥0∞} + (hF : Measurable F) (hG : Measurable G) (hL : Measurable L) (hR : Measurable R) + (hconv : ∀ a b, (∫⁻ z, L (a,z)*R (z,b) ∂σ)=K (a,b)) + (hrow : ∀ a, F a*(∫⁻ b, K (a,b)*G b ∂ν)=1) : + (∫⁻ z, (∫⁻ a, F a*L (a,z) ∂μ)*(∫⁻ b, R (z,b)*G b ∂ν) ∂σ)=1 := by + rw [nonnegative_kernel_bridge_mass μ ν σ + (L := fun z => F z.1 * L z) (R := fun z => R z * G z.2) + ((hF.comp measurable_fst).mul hL) (hR.mul (hG.comp measurable_snd))] + have hinner (a : A) (b : B) : + (∫⁻ z, (F a*L (a,z))*(R (z,b)*G b) ∂σ)=F a*(K (a,b)*G b) := by + have he : (fun z => (F a*L (a,z))*(R (z,b)*G b)) = + fun z => F a*((L (a,z)*R (z,b))*G b) := by + funext z + ac_rfl + rw [he,lintegral_const_mul (F a) (f := fun z => (L (a,z)*R (z,b))*G b) + (((hL.comp (measurable_const.prodMk measurable_id)).mul + (hR.comp (measurable_id.prodMk measurable_const))).mul_const (G b)), + lintegral_mul_const (G b) (f := fun z => L (a,z)*R (z,b)) + ((hL.comp (measurable_const.prodMk measurable_id)).mul + (hR.comp (measurable_id.prodMk measurable_const))),hconv] + simp_rw [hinner] + have hKrow (a : A) : Measurable (fun b => K (a,b)) := by + have hm : Measurable (fun z : B × Z => L (a,z.2)*R (z.2,z.1)) := + (hL.comp (measurable_const.prodMk measurable_snd)).mul + (hR.comp (measurable_snd.prodMk measurable_fst)) + have hh : Measurable (fun b => ∫⁻ z, L (a,z)*R (z,b) ∂σ) := hm.lintegral_prod_right' + simpa only [hconv] using hh + have hout (a : A) : (∫⁻ b, F a*(K (a,b)*G b) ∂ν)=1 := by + rw [lintegral_const_mul (F a) (f := fun b => K (a,b)*G b) ((hKrow a).mul hG),hrow] + simp_rw [hout] + simp + +theorem kernel_bridge_probability {F : A → ℝ≥0∞} {G : B → ℝ≥0∞} + {L : A × Z → ℝ≥0∞} {R : Z × B → ℝ≥0∞} {K : A × B → ℝ≥0∞} + (hF : Measurable F) (hG : Measurable G) (hL : Measurable L) (hR : Measurable R) + (hconv : ∀ a b, (∫⁻ z, L (a,z)*R (z,b) ∂σ)=K (a,b)) + (hrow : ∀ a, F a*(∫⁻ b, K (a,b)*G b ∂ν)=1) : + IsProbabilityMeasure (σ.withDensity + (fun z => (∫⁻ a, F a*L (a,z) ∂μ)*(∫⁻ b, R (z,b)*G b ∂ν))) := by + constructor + rw [withDensity_apply _ MeasurableSet.univ,Measure.restrict_univ] + exact kernel_bridge_normalized μ ν σ hF hG hL hR hconv hrow + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/KernelHeatBoundedRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/KernelHeatBoundedRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..22e3ba4d9f621c3386318b2cac724e0b14f76066 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/KernelHeatBoundedRegularity.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.RCD.Heat.KernelHeatL2Representation +import OAI.Geometry.RCD.Heat.BoundedHeatOrder + +namespace OAI + +/-! # Bounded heat regularity for the canonical kernel representative -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn p in +theorem kernelHeat_bounded_regularity {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (f : Lp ℝ 2 (hausdorff n X)) (C : ℝ≥0) + (hC : ∀ᵐ x ∂hausdorff n X, |f x| ≤ C) (t : ℝ) (ht : 0 < t) : + LipschitzWith ⟨Real.sqrt ((C:ℝ)^2/(2*t*Real.exp (-2 * |K| * t))),Real.sqrt_nonneg _⟩ + (kernelHeat (hausdorff n X) hX.quadratic hk t f) ∧ + ∀ x, |kernelHeat (hausdorff n X) hX.quadratic hk t f x| ≤ C := by + have hf : HasBoundedAmplitude f := ⟨C,hC⟩ + have he : hX.boundedHeat hn p f hf t ht = kernelHeat (hausdorff n X) hX.quadratic hk t f := + hX.boundedHeat_unique hn p f hf t ht + (kernelHeat_continuous (hausdorff n X) hX.quadratic hk ht f) + (kernelHeat_represents_L2 (hausdorff n X) hX.quadratic hk ht f).symm + rw [← he] + exact ⟨hX.boundedHeat_lipschitz hn p f hf t ht C hC, + hX.boundedHeat_abs_le hn p f hf t ht C hC⟩ + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LaplacianCoordinateForm.lean b/lean/OAI/Geometry/RCD/Coordinates/LaplacianCoordinateForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..ed62491c09b4a644fd0f62567c3ef578f01a90cf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LaplacianCoordinateForm.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Coordinates.RegularSquareLaplacian +import OAI.Geometry.RCD.Coordinates.CoordinateBilinear + +namespace OAI + +/-! # Pointwise linear representatives of the actual finite Laplacian map -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) {m : ℕ} + +/-- Evaluation of the finitely many L² source coordinates defines a +pointwise linear form without choosing representatives for each direction. -/ +def laplacianCoordinateForm (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) (x : X) : + Euclidean m →ₗ[ℝ] ℝ := + (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.constr ℝ + (fun i => D (EuclideanSpace.single i 1) x) + +theorem laplacianCoordinateForm_apply (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (x : X) (a : Euclidean m) : + laplacianCoordinateForm μ D x a=∑ i, a i*D (EuclideanSpace.single i 1) x := by + simp only [laplacianCoordinateForm,Module.Basis.constr_apply_fintype,smul_eq_mul] + rfl + +theorem laplacianCoordinateForm_rep (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) (a : Euclidean m) : + D a =ᵐ[μ] fun x => laplacianCoordinateForm μ D x a := by + let b := (EuclideanSpace.basisFun (Fin m) ℝ).toBasis + have he : b.constr ℝ (fun i => D (EuclideanSpace.single i 1))=D.toLinearMap := by + apply b.ext + intro i + simp [b,EuclideanSpace.basisFun_apply] + have hs : D a=∑ i, a i • D (EuclideanSpace.single i 1) := by + have h := congrArg (fun F : Euclidean m →ₗ[ℝ] Lp ℝ 2 μ => F a) he + rw [Module.Basis.constr_apply_fintype] at h + exact h.symm + rw [hs] + filter_upwards [Lp.coeFn_fun_finsetSum Finset.univ + (fun i : Fin m => a i • D (EuclideanSpace.single i 1)), + ae_all_iff.mpr (fun i : Fin m => Lp.coeFn_smul (a i) (D (EuclideanSpace.single i 1)))] + with x hx hy + rw [laplacianCoordinateForm_apply, hx] + exact Finset.sum_congr rfl (fun i _ => hy i) + +variable [MetricSpace X] [BorelSpace X] [ProperSpace X] + (hQ : QuadraticCheegerEnergy μ) [μ.Regular] + +/-- The source of an actual squared direction is the exact linear source +correction used by the shifted quadratic-perturbation argument. -/ +theorem laplacianCoordinateForm_square + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (w z : Euclidean m) (A L : ℝ≥0) + (hA : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U w) x|≤A) + (hL : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L:ℝ)^2) + (hz : U z=SobolevSpace.product μ hQ (U w) (U w) A A) : + ∀ᵐ x ∂μ, laplacianCoordinateForm μ D x z = + 2*SobolevSpace.toLp μ hQ (U w) x*laplacianCoordinateForm μ D x w+ + 2*localGamma μ hQ (U w) (U w) x := by + obtain ⟨q,hq,hqr⟩ := (hD w).product μ hQ (U w) (U w) (D w) (D w) + (hD w) A A L hA hA hL + have hqz : D z=q := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD z) hq + filter_upwards [hqr,laplacianCoordinateForm_rep μ D z,laplacianCoordinateForm_rep μ D w] + with x hq hz hw + rw [← hz,hqz,hq,hw] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LimitChart.lean b/lean/OAI/Geometry/RCD/Coordinates/LimitChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..670e10fceab7ca5230b01a2cd663a480f5f9a061 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LimitChart.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.RCD.Coordinates.ChartTopology +import OAI.Geometry.RCD.Coordinates.TaylorControl + +namespace OAI + +/-! +# From finite-scale Taylor estimates to the limiting chart + +Geometric increments, derivative bounds on scale-selected value-space +segments, and linear separation give two-sided distance bounds for the +limit. Euclidean invariance of domain gives its open image, as in +Hatcher, *Algebraic Topology* (2002), Theorem 2B.3. +-/ + +open Set Filter +open scoped Topology + +namespace RegularPointCoordinates + +private theorem quarter_scale_arithmetic {q t v : ℝ} (hq : 1 ≤ q) + (ht : 0 ≤ t) + (hl : ((2 * q)⁻¹ - (8 * q)⁻¹ - (8 * q)⁻¹) * t ≤ v) + (hu : v ≤ (2 * q + (8 * q)⁻¹ + (8 * q)⁻¹) * t) : + (4 * q)⁻¹ * t ≤ v ∧ v ≤ (4 * q) * t := by + have heq : (2 * q)⁻¹ - (8 * q)⁻¹ - (8 * q)⁻¹ = (4 * q)⁻¹ := by + field_simp; ring + have hinv : (8 * q)⁻¹ ≤ 1 := inv_le_one_of_one_le₀ (by linarith) + have hcoeff : 2 * q + (8 * q)⁻¹ + (8 * q)⁻¹ ≤ 4 * q := by + linarith + exact ⟨heq ▸ hl, hu.trans (mul_le_mul_of_nonneg_right hcoeff ht)⟩ + +/-- The all-pairs metric conclusion from scale-selected Taylor estimates +and a geometric increment bound. All source distances are ambient ones. -/ +theorem exists_limit_dist_bounds_of_taylor + {X : Type*} [MetricSpace X] {n : ℕ} + (u : X → Euclidean n) (h : ℕ → Euclidean n → Euclidean n) + (dh : ℕ → Euclidean n → Euclidean n →L[ℝ] Euclidean n) + (ddh : ℕ → Euclidean n → Euclidean n →L[ℝ] + (Euclidean n →L[ℝ] Euclidean n)) + {q C : ℝ} (hq : 1 ≤ q) + (hstep : ∀ i x, dist (h i (u x)) (h (i + 1) (u x)) ≤ C * (1 / 2 : ℝ) ^ i) + (hpairs : ∀ x z : X, x ≠ z → ∃ i M, + 0 ≤ M ∧ + (∀ y ∈ segment ℝ (u x) (u z), HasFDerivAt (h i) (dh i y) y) ∧ + (∀ y ∈ segment ℝ (u x) (u z), HasFDerivAt (dh i) (ddh i y) y) ∧ + (∀ y ∈ segment ℝ (u x) (u z), ‖ddh i y (u z - u x) (u z - u x)‖ ≤ M) ∧ + (2 * q)⁻¹ * dist x z ≤ ‖dh i (u x) (u z - u x)‖ ∧ + ‖dh i (u x) (u z - u x)‖ ≤ (2 * q) * dist x z ∧ + M ≤ (8 * q)⁻¹ * dist x z ∧ + 4 * C * (1 / 2 : ℝ) ^ i ≤ (8 * q)⁻¹ * dist x z) : + ∃ F : X → Euclidean n, + (∀ x, Tendsto (fun i => h i (u x)) atTop (𝓝 (F x))) ∧ + ∀ x z, (4 * q)⁻¹ * dist x z ≤ dist (F x) (F z) ∧ + dist (F x) (F z) ≤ (4 * q) * dist x z := by + obtain ⟨F, hlim, htail⟩ := exists_limit_of_geometric_step + (by norm_num : (1 / 2 : ℝ) < 1) hstep + refine ⟨F, hlim, ?_⟩ + intro x z + by_cases hxz : x = z + · subst z + simp + obtain ⟨i, M, hM, hd, hdd, hnorm, hl, hu, hrem, ht⟩ := hpairs x z hxz + have happrox := dist_bounds_of_directional_taylor hM hd hdd hnorm hl hu hrem + rw [dist_comm (h i (u z)) (h i (u x))] at happrox + have htailx : dist (F x) (h i (u x)) ≤ 2 * C * (1 / 2 : ℝ) ^ i := by + have hh := htail i x + rw [dist_comm] at hh + norm_num at hh ⊢ + nlinarith + have htailz : dist (F z) (h i (u z)) ≤ 2 * C * (1 / 2 : ℝ) ^ i := by + have hh := htail i z + rw [dist_comm] at hh + norm_num at hh ⊢ + nlinarith + have herror : dist (F x) (h i (u x)) + dist (F z) (h i (u z)) ≤ + (8 * q)⁻¹ * dist x z := by linarith + have hbound := dist_bounds_of_approximation + (f := fun x => h i (u x)) (F := F) x z happrox.1 happrox.2 herror + apply quarter_scale_arithmetic hq dist_nonneg + · exact hbound.1 + · exact hbound.2 + +/-- Scale-selected Taylor bounds and geometric increment estimates give an open +bi-Lipschitz chart by Euclidean invariance of domain. -/ +theorem hasOpenBilipschitzChart_of_taylor_data + {X : Type*} [MetricSpace X] {n : ℕ} {p : X} + (hIOD : EuclideanInvarianceOfDomain n) + {U : Set X} (hU : IsOpen U) (hp : p ∈ U) + {O : Set (Euclidean n)} (hO : IsOpen O) (u : U ≃ₜ O) + (h : ℕ → Euclidean n → Euclidean n) + (dh : ℕ → Euclidean n → Euclidean n →L[ℝ] Euclidean n) + (ddh : ℕ → Euclidean n → Euclidean n →L[ℝ] + (Euclidean n →L[ℝ] Euclidean n)) + {q C : ℝ} (hq : 1 ≤ q) + (hstep : ∀ i (x : U), + dist (h i (u x)) (h (i + 1) (u x)) ≤ C * (1 / 2 : ℝ) ^ i) + (hpairs : ∀ x z : U, x ≠ z → ∃ i M, + 0 ≤ M ∧ + (∀ y ∈ segment ℝ (u x : Euclidean n) (u z : Euclidean n), + HasFDerivAt (h i) (dh i y) y) ∧ + (∀ y ∈ segment ℝ (u x : Euclidean n) (u z : Euclidean n), + HasFDerivAt (dh i) (ddh i y) y) ∧ + (∀ y ∈ segment ℝ (u x : Euclidean n) (u z : Euclidean n), + ‖ddh i y ((u z : Euclidean n) - u x) ((u z : Euclidean n) - u x)‖ ≤ M) ∧ + (2 * q)⁻¹ * dist x z ≤ ‖dh i (u x) ((u z : Euclidean n) - u x)‖ ∧ + ‖dh i (u x) ((u z : Euclidean n) - u x)‖ ≤ (2 * q) * dist x z ∧ + M ≤ (8 * q)⁻¹ * dist x z ∧ + 4 * C * (1 / 2 : ℝ) ^ i ≤ (8 * q)⁻¹ * dist x z) : + HasOpenBilipschitzChart n p := by + obtain ⟨F, _, hF⟩ := exists_limit_dist_bounds_of_taylor + (fun x : U => (u x : Euclidean n)) h dh ddh hq hstep hpairs + exact hasOpenBilipschitzChart_of_coordinates_and_bounds hIOD hU hp hO u + (by linarith : 1 ≤ 4 * q) hF + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LinearNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/LinearNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0ab3baf02431bdb260bc3462620f36fdd27f9fb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LinearNormalization.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Coordinates.GramNormalization + +namespace OAI + +/-! # Construction of exact normalizers for positive definite Gram operators -/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] + +/-- A positive definite symmetric operator admits an exact congruence +normalization. The proof constructs it in an orthonormal eigenbasis. -/ +theorem exists_exact_operator_normalization (Q : E →L[ℝ] E) + (hQ : Q.IsSymmetric) (hpos : ∀ v : E, v ≠ 0 → 0 < ⟪v, Q v⟫_ℝ) : + ∃ A : E ≃L[ℝ] E, + (A : E →L[ℝ] E).adjoint.comp (Q.comp (A : E →L[ℝ] E)) = + ContinuousLinearMap.id ℝ E := by + let b := hQ.eigenvectorBasis rfl + let lam := hQ.eigenvalues rfl + have hlam (i : Fin (Module.finrank ℝ E)) : 0 < lam i := by + have hn : b i ≠ 0 := b.orthonormal.ne_zero i + have hp := hpos (b i) hn + have he : Q (b i) = lam i • b i := hQ.apply_eigenvectorBasis rfl i + rw [he, inner_smul_right] at hp + simpa only [real_inner_self_eq_norm_sq, b.norm_eq_one, one_pow, mul_one] using hp + let L : E →L[ℝ] E := ∑ i : Fin (Module.finrank ℝ E), + ((EuclideanSpace.proj i).comp (b.repr.toContinuousLinearEquiv : + E →L[ℝ] Euclidean (Module.finrank ℝ E))).smulRight + ((Real.sqrt (lam i))⁻¹ • b i) + have hL (v : E) (i : Fin (Module.finrank ℝ E)) : + b.repr (L v) i = (Real.sqrt (lam i))⁻¹ * b.repr v i := by + simp [L, map_sum, map_smul, b.repr_self, Pi.single_apply, mul_comm] + have hQL (v : E) (i : Fin (Module.finrank ℝ E)) : + b.repr (Q (L v)) i = lam i * ((Real.sqrt (lam i))⁻¹ * b.repr v i) := by + have he := hQ.eigenvectorBasis_apply_self_apply rfl (L v) i + change b.repr (Q (L v)) i = lam i * b.repr (L v) i at he + rw [he, hL] + have henergy (v : E) : ⟪L v, Q (L v)⟫_ℝ = ‖v‖ ^ 2 := by + rw [← b.repr.inner_map_map] + simp only [PiLp.inner_apply, RCLike.inner_apply, conj_trivial] + rw [← b.repr.norm_map v, EuclideanSpace.real_norm_sq_eq] + apply Finset.sum_congr rfl + intro i _ + rw [hL, hQL] + have hs : Real.sqrt (lam i) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (hlam i)) + have hs2 := Real.sq_sqrt (hlam i).le + field_simp + nlinarith + have hinj : Function.Injective L := by + apply (LinearMap.ker_eq_bot).mp + apply LinearMap.ker_eq_bot'.mpr + intro v hv + change L v = 0 at hv + have he := henergy v + rw [hv, inner_zero_left] at he + exact norm_eq_zero.mp (sq_eq_zero_iff.mp he.symm) + let A : E ≃L[ℝ] E := (LinearEquiv.ofInjectiveEndo L.toLinearMap hinj).toContinuousLinearEquiv + refine ⟨A, ?_⟩ + apply ContinuousLinearMap.ext + intro v + apply ext_inner_right ℝ + intro w + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_left, + ContinuousLinearMap.id_apply] + have hpair : ∀ v w : E, ⟪L v, Q (L w)⟫_ℝ = ⟪v, w⟫_ℝ := by + intro v w + have hplus := henergy (v + w) + have hv := henergy v + have hw := henergy w + have hsym : ⟪L w, Q (L v)⟫_ℝ = ⟪L v, Q (L w)⟫_ℝ := by + calc + _ = ⟪Q (L v), L w⟫_ℝ := real_inner_comm _ _ + _ = _ := hQ _ _ + simp only [map_add, inner_add_left, inner_add_right, hsym] at hplus + rw [norm_add_sq_real] at hplus + linarith + change ⟪Q (L v), L w⟫_ℝ = ⟪v, w⟫_ℝ + exact (hQ _ _).trans (hpair v w) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : MeasureTheory.Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) + +/-- Positive definiteness of the actual mean energy suffices to construct +the exact normalizer; the normalizer itself need not be assumed. -/ +theorem exists_exact_mean_normalization (s : Set X) (hs : MeasurableSet s) + (hpos : ∀ v : E, v ≠ 0 → 0 < ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ) : + ∃ A : E ≃L[ℝ] E, IsExactMeanNormalization μ hQ U s hs A := by + obtain ⟨A, hA⟩ := exists_exact_operator_normalization + (sobolevMeanGram μ hQ U s hs) (sobolevMeanGram_isPositive μ hQ U s hs).isSymmetric hpos + refine ⟨A, ?_⟩ + unfold IsExactMeanNormalization + rw [sobolevMeanGram_comp, hA] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LinearRadialFits.lean b/lean/OAI/Geometry/RCD/Coordinates/LinearRadialFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3a5ede07024602ff257f66135f1cf0ac0a76149 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LinearRadialFits.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Sobolev.FiniteColumnEnergy +import OAI.Geometry.RCD.Sobolev.CenteredAffineSobolev +import OAI.Geometry.RCD.Harmonic.CenteredColumns + +namespace OAI + +/-! # Linear assembly of the actual centered radial fits -/ + +open Set MeasureTheory +open scoped BigOperators InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The original affine coefficients, extended linearly from basis rows. -/ +def finiteCoefficientMap {n : ℕ} (coeff : Fin n → Euclidean n) : + Euclidean n →L[ℝ] Euclidean n := + ∑ j, (EuclideanSpace.proj j).smulRight (coeff j) + +theorem finiteCoefficientMap_apply {n : ℕ} (coeff : Fin n → Euclidean n) (b : Euclidean n) : + finiteCoefficientMap coeff b = ∑ j, b j • coeff j := by + simp [finiteCoefficientMap] + +theorem finiteCoefficientMap_single {n : ℕ} (coeff : Fin n → Euclidean n) (j : Fin n) : + finiteCoefficientMap coeff (EuclideanSpace.single j 1) = coeff j := by + classical + simp [finiteCoefficientMap_apply, PiLp.single_apply] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Centering preserves the linear dependence on the affine covector. -/ +def centeredSobolevMap {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (η : SobolevSpace μ hQ) (v : Euclidean n) : Euclidean n →L[ℝ] SobolevSpace μ hQ := + sobolevColumnMap μ hQ u - (innerSL ℝ v).smulRight η + +omit [BorelSpace X] [ProperSpace X] in +theorem centeredSobolevMap_apply {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (η : SobolevSpace μ hQ) (v a : Euclidean n) : + centeredSobolevMap μ hQ u η v a = centeredAffineSobolev μ hQ u η v a := by + change sobolevColumnMap μ hQ u a - ⟪v, a⟫_ℝ • η = + (-⟪v, a⟫_ℝ) • η + sobolevColumnMap μ hQ u a + module + +omit [BorelSpace X] [ProperSpace X] in +/-- Combining centered row fits is exactly the centered fit with the +combined coefficient, so the value and gradient estimates use one residual. -/ +theorem centered_radial_residual_column {n : ℕ} + (u g : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) (v : Euclidean n) + (coeff : Fin n → Euclidean n) (b : Euclidean n) : + sobolevColumnMap μ hQ (fun j => g j - centeredAffineSobolev μ hQ u η v (coeff j)) b = + sobolevColumnMap μ hQ g b - centeredAffineSobolev μ hQ u η v (finiteCoefficientMap coeff b) := by + let R := sobolevColumnMap μ hQ g - (centeredSobolevMap μ hQ u η v).comp (finiteCoefficientMap coeff) + have hrow : (fun j => g j - centeredAffineSobolev μ hQ u η v (coeff j)) = + (fun j => R (EuclideanSpace.single j 1)) := by + funext j + simp only [R, sub_apply, ContinuousLinearMap.comp_apply, + sobolevColumnMap_single, finiteCoefficientMap_single, centeredSobolevMap_apply] + rw [hrow, sobolevColumnMap_of_linear] + simp only [R, sub_apply, ContinuousLinearMap.comp_apply, centeredSobolevMap_apply] + +/-- All rowwise W12 bounds from the actual dyadic radial construction +extend to every covector with the same combined affine coefficient. -/ +theorem linear_centered_radial_bounds {n : ℕ} + (u g : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) (v : Euclidean n) + (coeff : Fin n → Euclidean n) (Ω Ω' : Set X) (hfin : μ Ω ≠ ∞) {E D : ℝ} (hE : 0 ≤ E) + (hvalue : ∀ j, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (g j - centeredAffineSobolev μ hQ u η v (coeff j)))‖ ^ 2 ≤ E) + (henergy : ∀ j, (∫ x in Ω', localGamma μ hQ + (g j - centeredAffineSobolev μ hQ u η v (coeff j)) + (g j - centeredAffineSobolev μ hQ u η v (coeff j)) x ∂μ) ≤ D) + (b : Euclidean n) : + let R := sobolevColumnMap μ hQ g b - centeredAffineSobolev μ hQ u η v (finiteCoefficientMap coeff b) + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω R)‖ ^ 2 ≤ (n : ℝ) ^ 2 * E * ‖b‖ ^ 2 ∧ + (∫ x in Ω', localGamma μ hQ R R x ∂μ) ≤ (n : ℝ) ^ 2 * D * ‖b‖ ^ 2 := by + dsimp only + constructor + · have hh := normalized_column_sq_le μ hQ + (fun j => g j - centeredAffineSobolev μ hQ u η v (coeff j)) Ω hfin hE hvalue b + rwa [centered_radial_residual_column μ hQ] at hh + · have hh := column_energy_bound μ hQ + (fun j => g j - centeredAffineSobolev μ hQ u η v (coeff j)) Ω' henergy b + rwa [centered_radial_residual_column μ hQ] at hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalConstantRepresentative.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalConstantRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..748e95a4bcb07126369b5cd1dee4d32341d30508 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalConstantRepresentative.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Coordinates.OpenRegularCutoff +import OAI.Geometry.RCD.Sobolev.FiniteEnergyRepresentatives + +namespace OAI + +/-! # Bounded Sobolev representatives of constants on a fixed ball -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A compact regular plateau represents the local constant without +requiring a globally square-integrable constant function. -/ +theorem NoncollapsedRCD.local_constant_representative {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) (p : X) (R c : ℝ) : + ∃ d : SobolevSpace (hausdorff n X) hX.quadratic, + (∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic d x|≤‖c‖₊) ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic d + =ᵐ[(hausdorff n X).restrict (ball p R)] fun _ => c := by + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + obtain ⟨χ,-,hχ1⟩ := hX.exists_open_regular_cutoff hn isOpen_univ (isCompact_closedBall p R) (subset_univ _) + have hrep := sobolev_smul_representative μ hX.quadratic c + (Ω := univ) (by simpa only [Measure.restrict_univ] using χ.representative) + have hr : SobolevSpace.toLp μ hX.quadratic (c • χ.sobolev) + =ᵐ[μ] fun x => c*χ.weight x := by simpa only [Measure.restrict_univ] using hrep + refine ⟨c • χ.sobolev,?_,?_⟩ + · filter_upwards [hr] with x hx + rw [hx,abs_mul,coe_nnnorm,Real.norm_eq_abs] + calc + |c| * |χ.weight x| ≤ |c| * 1 := mul_le_mul_of_nonneg_left (χ.abs_le x) (abs_nonneg c) + _ = |c| := mul_one _ + · filter_upwards [ae_restrict_of_ae hr,ae_restrict_mem measurableSet_ball] with x hx hm + rw [hx,hχ1 x (ball_subset_closedBall hm),mul_one] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateExtension.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..78de778c88c3418a1a2c67bf182ba45c286af583 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateExtension.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # Measurable extensions preserving the local metric approximation -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] + +/-- Only values on the closed testing ball enter a pointed approximation. -/ +theorem IsPointedApproximation.congr_on_ball {Y : Type*} [MetricSpace Y] + {p : X} {q : Y} {r R ε : ℝ} {f g : X → Y} + (hRr : 0 ≤ R * r) (hf : IsPointedApproximation p q r R ε f) + (hfg : EqOn f g (closedBall p (R * r))) : + IsPointedApproximation p q r R ε g := by + have hp : f p = g p := hfg (by simpa only [mem_closedBall, dist_self] using hRr) + refine ⟨by simpa only [hp] using hf.1, ?_, ?_⟩ + · intro x y hx hy + rw [← hfg hx, ← hfg hy] + exact hf.2.1 x y hx hy + · intro y hy + obtain ⟨x, hx, hxy⟩ := hf.2.2 y hy + exact ⟨x, hx, by rwa [← hfg hx]⟩ + +/-- A continuous local coordinate map has a measurable extension which +agrees pointwise throughout its open domain. -/ +theorem exists_measurable_local_extension [MeasurableSpace X] [BorelSpace X] + {n : ℕ} {s : Set X} (hs : MeasurableSet s) {v : X → Euclidean n} + (hv : ContinuousOn v s) : + ∃ v' : X → Euclidean n, Measurable v' ∧ EqOn v v' s := by + classical + refine ⟨s.piecewise v (fun _ => 0), + hv.measurable_piecewise continuous_const.continuousOn hs, ?_⟩ + intro x hx + simp only [piecewise_eq_of_mem s v (fun _ => 0) hx] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateImageMass.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateImageMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..41f9d0403940efe71d461a72f089115ca0870eb2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalCoordinateImageMass.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateImageMass + +namespace OAI + +/-! # Localizing image mass to its actual source preimage -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem local_source_mass_of_image_defect {n : ℕ} + (hEuclidean : hausdorff n (Euclidean n) = volume) + {v : X → Euclidean n} {U S : Set X} {C : ℝ≥0} + (hU : IsCompact U) (hv : LipschitzOnWith C v U) (hfin : hausdorff n X S ≠ ⊤) + (z : Euclidean n) (R δ : ℝ) + (hpreimage : ∀ x ∈ U, v x ∈ ball z R → x ∈ S) + (hdefect : volume.real (ball z R \ v '' U) ≤ δ*volume.real (ball z R)) : + (1-δ)*volume.real (ball z R) ≤ (C:ℝ)^n*(hausdorff n X).real S := by + have himage : IsCompact (v '' U) := hU.image_of_continuousOn hv.continuousOn + have hsplit := measureReal_inter_add_sdiff (μ := (volume : Measure (Euclidean n))) + himage.measurableSet (s := ball z R) measure_ball_ne_top + have hcap : hausdorff n X (U ∩ S) ≠ ⊤ := measure_ne_top_of_subset inter_subset_right hfin + have hv' := hv.mono (inter_subset_left : U ∩ S ⊆ U) + have htargetfin : hausdorff n (Euclidean n) (v '' (U ∩ S)) ≠ ⊤ := + ne_top_of_le_ne_top (ENNReal.mul_ne_top (ENNReal.pow_ne_top ENNReal.coe_ne_top) hcap) + (normalized_hausdorff_image_le hv') + have hsub : ball z R ∩ v '' U ⊆ v '' (U ∩ S) := by + rintro y ⟨hy,x,hx,rfl⟩ + exact ⟨x,⟨hx,hpreimage x hx hy⟩,rfl⟩ + have hinter := measureReal_mono hsub (show volume (v '' (U ∩ S)) ≠ ⊤ by + rwa [hEuclidean] at htargetfin) + have hmass := normalized_hausdorff_real_image_le hv' hcap + rw [hEuclidean] at hmass + have hcapmass : (hausdorff n X).real (U ∩ S) ≤ (hausdorff n X).real S := + measureReal_mono inter_subset_right hfin + have hbound := mul_le_mul_of_nonneg_left hcapmass (pow_nonneg C.coe_nonneg n) + nlinarith only [hsplit,hdefect,hinter,hmass,hbound] + +theorem local_source_mass_of_image_error {n : ℕ} + (hEuclidean : hausdorff n (Euclidean n) = volume) + {v : X → Euclidean n} {U S : Set X} {C : ℝ≥0} + (hU : IsCompact U) (hv : LipschitzOnWith C v U) (hfin : hausdorff n X S ≠ ⊤) + (z : Euclidean n) {R : ℝ} (hR : 0 < R) (E : ℝ) + (hpreimage : ∀ x ∈ U, v x ∈ ball z R → x ∈ S) + (herror : volume.real (ball z R \ v '' U) ≤ E) : + volume.real (ball z R)-E ≤ (C:ℝ)^n*(hausdorff n X).real S := by + have hpos : 0 < volume.real (ball z R) := ENNReal.toReal_pos + (measure_ball_pos volume z hR).ne' measure_ball_ne_top + have hh := local_source_mass_of_image_defect hEuclidean hU hv hfin z R + (E/volume.real (ball z R)) hpreimage (by + rwa [div_mul_cancel₀ E hpos.ne']) + have he : (1-E/volume.real (ball z R))*volume.real (ball z R)= + volume.real (ball z R)-E := by field_simp + rwa [he] at hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalFramePathVelocity.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalFramePathVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cf8ca75eed83d89baddf21e57d2af9064e5943a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalFramePathVelocity.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Coordinates.FrameTestPlanVelocityDefect +import OAI.Geometry.RCD.Coordinates.FrameVelocityErrorLocality + +namespace OAI + +/-! # Scalar path derivatives for local coordinate representatives -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped ENNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem local_frame_path_velocity (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (u U : Fin n → SobolevSpace μ Q) (g : SobolevSpace μ Q) + (v W : X → Euclidean n) (φ : X → ℝ) (hW : Continuous W) (hφ : Continuous φ) + (hU : ∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ] fun x => W x i) + (hg : SobolevSpace.toLp μ Q g =ᵐ[μ] φ) + {Ω : Set X} (hΩ : MeasurableSet Ω) + (hu : ∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ Q (u i)) + (hv : EqOn W v Ω) + (π : Measure C(Time,X)) [IsFiniteMeasure π] + (hgeo : ∀ᵐ γ ∂π, IsGeodesic γ) {C : ℝ≥0∞} (hC : C≠∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π) + (hstay : ∀ᵐ γ ∂π, ∀ t : Time, γ t∈Ω) : + ∀ᵐ γ ∂π, + AbsolutelyContinuousOnInterval (fun t => φ (geodesicExtension γ t)) 0 1 ∧ + (∀ i, AbsolutelyContinuousOnInterval (fun t => v (geodesicExtension γ t) i) 0 1) ∧ + ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv (fun s => φ (geodesicExtension γ s)) t- + ∑ i, localGamma μ Q (u i) g (geodesicExtension γ t)* + deriv (fun s => v (geodesicExtension γ s) i) t)^2≤ + (dist (γ 0) (γ 1))^2*frameVelocityError μ Q u g (geodesicExtension γ t) := by + have hvel := frame_testPlan_velocity_defect μ Q U g W φ hW hφ hU hg π hgeo hC hcomp hD + have hf := (SobolevSpace.minimalSlope_isRelaxed μ Q g).testPlan_ae_absolutelyContinuous + μ π hgeo hC hcomp hD hφ hg + have hc (i : Fin n) := (SobolevSpace.minimalSlope_isRelaxed μ Q (U i)).testPlan_ae_absolutelyContinuous + μ π hgeo hC hcomp hD ((EuclideanSpace.proj i).continuous.comp hW) (hU i) + have hG (i : Fin n) := localGamma_pair_congr_ae μ Q (hu i) + (show SobolevSpace.toLp μ Q g =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ Q g + from Eventually.of_forall (fun _ => rfl)) + have hloc : ∀ᵐ x ∂μ.restrict Ω, + frameVelocityError μ Q U g x=frameVelocityError μ Q u g x ∧ + ∀ i, localGamma μ Q (U i) g x=localGamma μ Q (u i) g x := + (frameVelocityError_frame_congr_ae μ Q g hu).and (ae_all_iff.mpr hG) + have hp := testPlan_eval_property_on μ π hcomp hΩ hstay hloc + filter_upwards [hvel,hf,ae_all_iff.mpr hc,hstay,hp] with γ hvel hf hc hstay hp + have heq : (fun t => W (geodesicExtension γ t))=(fun t => v (geodesicExtension γ t)) := by + funext t + exact hv (hstay (Set.projIcc 0 1 zero_le_one t)) + refine ⟨hf.1,?_,?_⟩ + · intro i + have heqi := congrArg (fun F : ℝ → Euclidean n => fun t => F t i) heq + exact heqi ▸ (hc i).1 + · have hp' := (ae_restrict_iff' measurableSet_Icc).mp hp + filter_upwards [hvel,hp'] with t ht hp htI + have hb := (ht htI).2 + change _≤(dist (γ 0) (γ 1))^2*frameVelocityError μ Q U g (geodesicExtension γ t) at hb + rw [(hp (Ioo_subset_Icc_self htI)).1] at hb + have hvect : gradientFrameCoefficients μ Q U g (geodesicExtension γ t)= + gradientFrameCoefficients μ Q u g (geodesicExtension γ t) := + congrArg (WithLp.toLp 2) (funext (hp (Ioo_subset_Icc_self htI)).2) + rw [hvect] at hb + have hder : coordinateDerivative (fun s => W (geodesicExtension γ s)) t= + coordinateDerivative (fun s => v (geodesicExtension γ s)) t := congrArg (fun F => coordinateDerivative F t) heq + rw [hder] at hb + simpa only [gradientFrameCoefficients,coordinateDerivative,PiLp.inner_apply, + RCLike.inner_apply,conj_trivial,mul_comm] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalHarmonicFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalHarmonicFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d59ed45cac574f07eb471c9f3d31d88d878b829 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalHarmonicFrameDefect.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.RCD.Coordinates.RegularFrameDefect +import OAI.Geometry.RCD.Coordinates.LocalPoissonRegularExtension + +namespace OAI + +/-! # Quantitative gradient expansion in the original local harmonic coordinates -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.local_harmonic_frame_defect {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) (p : X) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + {R b : ℝ} (hR : 0 0) d + let Af : Fin (n+1) → ℝ≥0 := Fin.snoc (fun _ => 0) A + have hqf (j : Fin (n+1)) : IsWeakLaplacian μ hQ (f j).val (qf j) := by + refine Fin.lastCases ?_ (fun i => ?_) j + · simpa only [f,qf,Fin.snoc_last] using hq + · simpa only [f,qf,Fin.snoc_castSucc] using hU i + have hz : SobolevSpace.toLp μ hQ (0 : SobolevSpace μ hQ) =ᵐ[μ] fun _ => (0:ℝ) := by + simpa only [map_zero] using! (Lp.coeFn_zero ℝ 2 μ) + have hdz : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (0 : SobolevSpace μ hQ) x|≤(0:ℝ≥0) := by + filter_upwards [hz] with x hx + simp only [hx,abs_zero,NNReal.coe_zero,le_refl] + have hdf (j : Fin (n+1)) : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (df j) x|≤Af j := by + refine Fin.lastCases ?_ (fun i => ?_) j + · simpa only [df,Af,Fin.snoc_last] using hd + · simpa only [df,Af,Fin.snoc_castSucc] using hdz + have hqfr (j : Fin (n+1)) : qf j =ᵐ[μ.restrict (ball p (2*R))] SobolevSpace.toLp μ hQ (df j) := by + refine Fin.lastCases ?_ (fun i => ?_) j + · simpa only [qf,df,Fin.snoc_last] using hqr + · simpa only [qf,df,Fin.snoc_castSucc] using + (hQzero i).trans (Filter.EventuallyEq.symm (ae_restrict_of_ae hz)) + have hsmall : ball p (2*R)⊆ball p b := ball_subset_ball (by linarith) + have hpairs (i j : Fin n) : localGamma μ hQ (f i.castSucc).val (f j.castSucc).val + =ᵐ[μ.restrict (ball p R)] localGamma μ hQ (u i) (u j) := by + have hh := localGamma_pair_congr_ae μ hQ (hrep i) (hrep j) + simpa only [f,Fin.snoc_castSucc] using! ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : R≤2*R)) hh + have ht : ∀ᵐ x ∂μ.restrict (ball p ((2*R)/2)), + |∑ i : Fin n, localGamma μ hQ (f i.castSucc).val (f i.castSucc).val x-(n:ℝ)|≤δ x := by + rw [show (2*R)/2=R by ring] + filter_upwards [htrace,ae_all_iff.mpr (fun i => ae_all_iff.mpr (hpairs i))] with x hx hp + simpa only [hp] using hx + have hs : ∀ᵐ x ∂μ.restrict (ball p ((2*R)/2)), + |∑ i : Fin n, ∑ j : Fin n, (localGamma μ hQ (f i.castSucc).val (f j.castSucc).val x)^2-(n:ℝ)|≤δ x := by + rw [show (2*R)/2=R by ring] + filter_upwards [hsquare,ae_all_iff.mpr (fun i => ae_all_iff.mpr (hpairs i))] with x hx hp + simpa only [hp] using hx + have hf (j : Fin (n+1)) : ∃ F : X →ᵇ ℝ, SobolevSpace.toLp μ hQ (f j).val =ᵐ[μ] F := by + obtain ⟨v,C,hv,hvc,-,hvr⟩ := (f j).property.1 + exact ⟨ofCompactSupport v hv.continuous hvc,hvr⟩ + choose F hF using hf + have hd' : ∀ᵐ x ∂μ.restrict (ball p ((2*R)/2)), 0≤δ x := by + simpa only [show (2*R)/2=R by ring] using hδ + have hh := hX.regular_frame_defect hn hK p f (show 0<2*R by positivity) + F hF qf hqf df Af hdf hqfr δ hd' ht hs + rw [show (2*R)/2=R by ring] at hh + have hpair (i : Fin n) : localGamma μ hQ (U i).val g.val + =ᵐ[μ.restrict (ball p R)] localGamma μ hQ (u i) g.val := + ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith)) + (localGamma_pair_congr_ae μ hQ (hrep i) EventuallyEq.rfl) + filter_upwards [hh,ae_all_iff.mpr hpair] with x hx hp + simp only [f,Fin.snoc_last,Fin.snoc_castSucc] at hx + change δ x≤1 → + |localGamma μ hQ g.val g.val x-∑ i, (localGamma μ hQ (U i).val g.val x)^2|≤ + Real.sqrt (6*δ x)*|localGamma μ hQ g.val g.val x| at hx + have heq : (∑ i, (localGamma μ hQ (U i).val g.val x)^2)= + ∑ i, (localGamma μ hQ (u i) g.val x)^2 := + Finset.sum_congr rfl (fun i _ => congrArg (fun a : ℝ => a^2) (hp i)) + rw [heq] at hx + exact hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LocalPoissonRegularExtension.lean b/lean/OAI/Geometry/RCD/Coordinates/LocalPoissonRegularExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..3135a602181a1a35dd279d9fd235a62e77111230 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LocalPoissonRegularExtension.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Sobolev.LocalPoissonCompactExtension +import OAI.Geometry.RCD.Coordinates.RegularDirichletCore + +namespace OAI + +/-! # Regular-core extensions retaining the local Poisson source -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The compact extension belongs to the actual regular core, and its +L² Laplacian retains the original constant on the entire plateau. -/ +theorem NoncollapsedRCD.local_poisson_regular_extension {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (f : SobolevSpace (hausdorff n X) hX.quadratic) (c : ℝ) + {p : X} {R b : ℝ} (hR : 0 c := by + let μ := hausdorff n X + let a := (2*R+b)/2 + have hab : a ν.restrict S) (hQ v w) + nonneg v := signedMeasure_nonneg_restrict_of_tests (Q v v) hS χ hχ hχc hχΩ hχ0 hχ1 (hpos v) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/LongBoundedSource.lean b/lean/OAI/Geometry/RCD/Coordinates/LongBoundedSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc1a38d92e4af56e984fc27a45183bdd4f88ba74 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/LongBoundedSource.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.BoundedSourceHeatBounds + +namespace OAI + +/-! # Long-time displacement bound for the bounded curvature source -/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- On each long-time block the bounded source gains the displacement +ratio r/s. The volume bound is only needed on the working ball. -/ +theorem exists_long_bounded_source_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) + (n : ℕ) {A V W : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) : + ∃ C : ℝ, 0 < C ∧ ∀ (R : ℝ), 0 < R → R ≤ 1 → ∀ (i : ℕ) (r : ℝ) (x q : X), + 0 < r → r ≤ (R / 2 ^ i) / 2 → μ (ball q r) ≠ ∞ → 0 < μ.real (ball q r) → + dist x q ≤ A * r → + (∀ j ≤ i, μ.real (ball x (2 ^ j * (R / 2 ^ i))) ≤ W * (2 ^ j * (R / 2 ^ i)) ^ n) → + ∀ (t : ℝ), 0 < t → t ∈ Icc ((R / 2 ^ i) ^ 2 / 4) ((R / 2 ^ i) ^ 2) → + (∀ z ∈ ball x R, V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + ∀ (g : X → ℝ) (B : ℝ), 0 ≤ B → (∀ᵐ z ∂μ, |g z| ≤ B) → + (∀ᵐ z ∂μ, z ∉ ball x R → g z = 0) → + |∫ z, (kernelAverage μ ker t (ball q r) z - ker t x z) * g z ∂μ| ≤ + C * B * (r / (R / 2 ^ i)) := by + obtain ⟨C₀, D, hC₀, hD, hb⟩ := exists_long_average_difference_bound μ hQ hk hg hdiff n hA hV + let H := C₀ * (2 : ℝ) ^ (n + 1) + let G := gaussianVolumeMomentConstant n D⁻¹ + have hH : 0 < H := by dsimp [H]; positivity + have hG : 0 ≤ G := gaussianVolumeMomentConstant_nonneg _ _ + refine ⟨H * W * G + 1, by positivity, ?_⟩ + intro R hR hR1 i r x q hr hrs hfinite hvol hcenter hupper t ht htime hsource g B hB hgb hgzero + let s := R / (2 : ℝ) ^ i + have hs : 0 < s := div_pos hR (by positivity) + have hsR : s ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsqrt : s / 2 ≤ Real.sqrt t := by + have hsq := Real.sq_sqrt ht.le + have hn := Real.sqrt_nonneg t + change s ^ 2 / 4 ≤ t ∧ t ≤ s ^ 2 at htime + nlinarith + have hsqrtpos := Real.sqrt_pos.mpr ht + have ht1 : t ≤ 1 := htime.2.trans (by nlinarith) + have hrtime : r ^ 2 ≤ t := by + have hh := (sq_le_sq₀ hr.le (half_pos hs).le).mpr hrs + nlinarith [htime.1] + have hinv : (Real.sqrt t)⁻¹ ≤ 2 * s⁻¹ := by + have h := one_div_le_one_div_of_le (half_pos hs) hsqrt + simpa only [one_div, div_eq_mul_inv, mul_inv_rev, inv_inv, one_mul] using h + have hpow := pow_le_pow_left₀ (inv_pos.mpr hsqrtpos).le hinv (n + 1) + let α := H * (r / s) + have hα : 0 ≤ α := by dsimp only [α]; positivity + have hcoef : C₀ * r * (Real.sqrt t)⁻¹ ^ (n + 1) ≤ α / s ^ n := by + apply (mul_le_mul_of_nonneg_left hpow (mul_pos hC₀ hr).le).trans_eq + dsimp only [α, H] + rw [mul_pow, pow_succ (s⁻¹)] + simp only [inv_pow] + field_simp [hs.ne'] + have hpoint : ∀ z ∈ ball x R, + |kernelAverage μ ker t (ball q r) z - ker t x z| ≤ + α / s ^ n * Real.exp (-(dist x z) ^ 2 / (D * s ^ 2)) := by + intro z hz + have hraw := hb r t x q z hr ht ht1 hrtime hfinite hvol hcenter (hsource z hz) + have he : Real.exp (-(dist x z) ^ 2 / (D * t)) ≤ + Real.exp (-(dist x z) ^ 2 / (D * s ^ 2)) := by + apply Real.exp_le_exp.mpr + have h := div_le_div_of_nonneg_left (sq_nonneg (dist x z)) (mul_pos hD ht) + (mul_le_mul_of_nonneg_left htime.2 hD.le) + simpa only [neg_div] using neg_le_neg h + exact hraw.trans (mul_le_mul hcoef he (Real.exp_pos _).le (div_nonneg hα (pow_pos hs n).le)) + have hroot : (2 : ℝ) ^ i * s = R := by dsimp only [s]; field_simp + have he := integral_bounded_density_gaussian_le μ n x hs hα hD hW hB i hroot hgb hgzero hpoint hupper + change _ ≤ α * B * W * G at he + have hrnonneg : 0 ≤ r / s := (div_pos hr hs).le + change _ ≤ (H * W * G + 1) * B * (r / s) + dsimp only [α] at he + nlinarith only [he, mul_nonneg hB hrnonneg] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MatrixNormConversion.lean b/lean/OAI/Geometry/RCD/Coordinates/MatrixNormConversion.lean new file mode 100644 index 0000000000000000000000000000000000000000..040f37a239325c96248fa098603f3db4796a94b3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MatrixNormConversion.lean @@ -0,0 +1,118 @@ +import OAI.Analysis.RCDHeat.Foundations +import Mathlib.Analysis.CStarAlgebra.Matrix + +namespace OAI + +/-! # Entry bounds and the Euclidean norm of coordinate transformations + +Huang--Huang (2024), Theorem 4.1 uses the maximum of the absolute matrix +entries. The elementary dimension factor below converts that bound into +an operator bound before it is used in the coordinate construction. +-/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +/-- A deliberately non-sharp dimension factor suffices: all smallness +parameters in the transformation theorem can be chosen after dimension. -/ +theorem euclidean_operator_norm_le_of_entries {n : ℕ} + (A : Euclidean n →L[ℝ] Euclidean n) {C : ℝ} (hC : 0 ≤ C) + (hentry : ∀ i j, |A (EuclideanSpace.single j 1) i| ≤ C) : + ‖A‖ ≤ (n : ℝ) ^ 2 * C := by + let b := EuclideanSpace.basisFun (Fin n) ℝ + have hcolumn (j : Fin n) : ‖A (b j)‖ ≤ (n : ℝ) * C := by + calc + ‖A (b j)‖ = ‖∑ i, (A (b j)) i • b i‖ := by + congr 1 + simpa only [b, EuclideanSpace.basisFun_repr] using (b.sum_repr (A (b j))).symm + _ ≤ ∑ i, ‖(A (b j)) i • b i‖ := norm_sum_le _ _ + _ = ∑ i : Fin n, |A (EuclideanSpace.single j 1) i| := by + simp [norm_smul, b] + _ ≤ ∑ _i : Fin n, C := Finset.sum_le_sum fun i _ => hentry i j + _ = (n : ℝ) * C := by simp + apply ContinuousLinearMap.opNorm_le_bound _ (mul_nonneg (sq_nonneg _) hC) + intro v + calc + ‖A v‖ = ‖∑ j, v j • A (b j)‖ := by + have hv : v = ∑ j, v j • b j := by + simpa only [b, EuclideanSpace.basisFun_repr] using (b.sum_repr v).symm + calc + ‖A v‖ = ‖A (∑ j, v j • b j)‖ := congrArg (fun x => ‖A x‖) hv + _ = _ := by simp only [map_sum, map_smul] + _ ≤ ∑ j, ‖v j • A (b j)‖ := norm_sum_le _ _ + _ ≤ ∑ _j : Fin n, ‖v‖ * ((n : ℝ) * C) := by + apply Finset.sum_le_sum + intro j _ + rw [norm_smul] + exact mul_le_mul (PiLp.norm_apply_le v j) (hcolumn j) + (norm_nonneg _) (norm_nonneg _) + _ = (n : ℝ) ^ 2 * C * ‖v‖ := by simp; ring + +/-- An entrywise estimate on a published transformation matrix gives the +operator norm bound required by the metric iteration. -/ +theorem matrix_euclidean_norm_le_of_entries {n : ℕ} + (A : Matrix (Fin n) (Fin n) ℝ) {C : ℝ} (hC : 0 ≤ C) + (hentry : ∀ i j, |A i j| ≤ C) : + ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) A‖ ≤ (n : ℝ) ^ 2 * C := by + apply euclidean_operator_norm_le_of_entries _ hC + intro i j + simpa [Matrix.toEuclideanCLM_toLp, Matrix.mulVec, dotProduct] using hentry i j + +/-- Near identity in the source's entry norm implies near identity in +Euclidean operator norm, with the dimension factor kept explicit. -/ +theorem matrix_sub_id_norm_le_of_entries {n : ℕ} + (A : Matrix (Fin n) (Fin n) ℝ) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hentry : ∀ i j, |(A - 1) i j| ≤ epsilon) : + ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) A - ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ + (n : ℝ) ^ 2 * epsilon := by + simpa only [map_sub, map_one, + show (1 : Euclidean n →L[ℝ] Euclidean n) = ContinuousLinearMap.id ℝ _ from rfl] using + matrix_euclidean_norm_le_of_entries (A - 1) hepsilon hentry + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- A near-identity invertible transformation has a controlled inverse; +no inverse bound needs to be separately supplied by the application. -/ +theorem equiv_inverse_norm_le_of_sub_id (A : E ≃L[ℝ] E) + {delta : ℝ} (hdelta1 : delta < 1) + (hA : ‖(A : E →L[ℝ] E) - ContinuousLinearMap.id ℝ E‖ ≤ delta) : + ‖(A.symm : E →L[ℝ] E)‖ ≤ (1 - delta)⁻¹ := by + apply ContinuousLinearMap.opNorm_le_bound _ (inv_nonneg.mpr (by linarith)) + intro v + have he := ((A : E →L[ℝ] E) - ContinuousLinearMap.id ℝ E).le_opNorm (A.symm v) + simp only [sub_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply, ContinuousLinearMap.id_apply] at he + have he' : ‖v - A.symm v‖ ≤ delta * ‖A.symm v‖ := + he.trans (mul_le_mul_of_nonneg_right hA (norm_nonneg _)) + have ht := norm_sub_le v (v - A.symm v) + rw [sub_sub_cancel] at ht + have hh : (1 - delta) * ‖A.symm v‖ ≤ ‖v‖ := by linarith + exact (le_inv_mul_iff₀ (by linarith : 0 < 1 - delta)).mpr hh + +/-- The forward operator has the matching elementary bound. -/ +theorem equiv_norm_le_of_sub_id (A : E ≃L[ℝ] E) + {delta : ℝ} (hdelta : 0 ≤ delta) + (hA : ‖(A : E →L[ℝ] E) - ContinuousLinearMap.id ℝ E‖ ≤ delta) : + ‖(A : E →L[ℝ] E)‖ ≤ 1 + delta := by + apply ContinuousLinearMap.opNorm_le_bound _ (by linarith) + intro v + have he := ((A : E →L[ℝ] E) - ContinuousLinearMap.id ℝ E).le_opNorm v + simp only [sub_apply, ContinuousLinearMap.id_apply] at he + have he' := he.trans (mul_le_mul_of_nonneg_right hA (norm_nonneg v)) + change ‖A v - v‖ ≤ delta * ‖v‖ at he' + have ht := norm_sub_le v (v - A v) + rw [sub_sub_cancel, norm_sub_rev] at ht + change ‖A v‖ ≤ (1 + delta) * ‖v‖ + calc + ‖A v‖ ≤ ‖v‖ + ‖A v - v‖ := ht + _ ≤ ‖v‖ + delta * ‖v‖ := add_le_add le_rfl he' + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MatrixTransverseDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/MatrixTransverseDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..d91ea52dc1fab141ac3381e1a2b97de4ab60ac7a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MatrixTransverseDefect.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Harmonic.GramQuadraticDefect + +namespace OAI + +/-! # The same finite Gram defect controls the transverse derivative -/ + +open Finset +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem matrix_gram_row_defect {n : ℕ} (G : Fin n → Fin n → ℝ) + (a : Euclidean n) (ha : ‖a‖=1) (i : Fin n) : + |(∑ j, a j*G i j)-a i| ≤ matrixGramDefect G := by + classical + have hai (j : Fin n) : |a j| ≤ 1 := by + simpa only [Real.norm_eq_abs,ha] using PiLp.norm_apply_le a j + have hid : (∑ j, a j*(if i=j then (1:ℝ) else 0))=a i := by simp [mul_ite] + have he : (∑ j, a j*G i j)-a i= + ∑ j, a j*(G i j-(if i=j then 1 else 0)) := by + simp only [mul_sub,sum_sub_distrib,hid] + rw [he] + calc + _ ≤ ∑ j, |a j*(G i j-(if i=j then 1 else 0))| := abs_sum_le_sum_abs _ _ + _ ≤ ∑ j, |G i j-(if i=j then 1 else 0)| := by + apply sum_le_sum + intro j _ + rw [abs_mul] + exact (mul_le_mul_of_nonneg_right (hai j) (abs_nonneg _)).trans_eq (one_mul _) + _ ≤ matrixGramDefect G := by + exact single_le_sum (s := univ) + (f := fun l => ∑ j, |G l j-(if l=j then 1 else 0)|) + (fun _ _ => sum_nonneg (fun _ _ => abs_nonneg _)) (mem_univ i) + +theorem matrix_transverse_defect {n : ℕ} (G : Fin n → Fin n → ℝ) + (a z : Euclidean n) (ha : ‖a‖=1) {M : ℝ} (hz : ‖z‖ ≤ M) : + |2*(∑ i, z i*(∑ j, a j*G i j))- + 2*⟪z,a⟫_ℝ * (∑ i, ∑ j, a i*a j*G i j)| ≤ + 2*((n:ℝ)+1)*M*matrixGramDefect G := by + classical + let E := matrixGramDefect G + let q := ∑ i, ∑ j, a i*a j*G i j + have hE : 0 ≤ E := matrixGramDefect_nonneg G + have hq : |q-1| ≤ E := by + simpa only [q,ha,one_pow,mul_one] using matrix_gram_quadratic_defect G a + have hw : |⟪z,a⟫_ℝ| ≤ M := by + exact ((abs_real_inner_le_norm z a).trans_eq (by rw [ha,mul_one])).trans hz + have hzi (i : Fin n) : |z i| ≤ M := by + have hh : |z i|≤‖z‖ := by simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le z i + exact hh.trans hz + have hs : |∑ i, z i*((∑ j, a j*G i j)-a i)| ≤ (n:ℝ)*M*E := by + calc + _ ≤ ∑ i, |z i*((∑ j, a j*G i j)-a i)| := abs_sum_le_sum_abs _ _ + _ ≤ ∑ _i : Fin n, M*E := by + apply sum_le_sum + intro i _ + rw [abs_mul] + exact mul_le_mul (hzi i) (matrix_gram_row_defect G a ha i) + (abs_nonneg _) ((norm_nonneg z).trans hz) + _=_ := by simp only [sum_const,card_univ,Fintype.card_fin,nsmul_eq_mul]; ring + have hid : (∑ i, z i*a i)=⟪z,a⟫_ℝ := by + simp only [PiLp.inner_apply,RCLike.inner_apply,conj_trivial] + apply sum_congr rfl + intro i _ + ring + have he : 2*(∑ i, z i*(∑ j, a j*G i j))-2*⟪z,a⟫_ℝ * q = + 2*((∑ i, z i*((∑ j, a j*G i j)-a i))-⟪z,a⟫_ℝ * (q-1)) := by + simp only [mul_sub,sum_sub_distrib,hid] + ring + change |2*(∑ i, z i*(∑ j, a j*G i j))-2*⟪z,a⟫_ℝ * q| ≤ _ + rw [he,abs_mul,abs_of_pos (by norm_num : (0:ℝ)<2)] + calc + _ ≤ 2*(|∑ i, z i*((∑ j, a j*G i j)-a i)|+|⟪z,a⟫_ℝ * (q-1)|) := + mul_le_mul_of_nonneg_left (abs_sub _ _) (by norm_num) + _ ≤ 2*((n:ℝ)*M*E+M*E) := by + apply mul_le_mul_of_nonneg_left (add_le_add hs ?_) (by norm_num) + rw [abs_mul] + exact mul_le_mul hw hq (abs_nonneg _) ((norm_nonneg z).trans hz) + _=_ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinateInput.lean b/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinateInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..638aa92b6fd2e3ff8da2c90edb665fa7af621290 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinateInput.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.RCD.Metric.MeasuredApproximation + +namespace OAI + +/-! # Measuring the actual coordinate approximations + +De Philippis--Gigli (2018), Theorems1.2--1.3, specialize noncollapsed +measured convergence to Euclidean metric limits. On balls with Euclidean +boundary of zero measure, every measurable metric approximation has the +same normalized weak-measure limit. This fixed-radius bounded-Lipschitz +form retains the actual coordinate map used by the affine-fit argument. +-/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Quantitative Euclidean specialization of noncollapsed measured +convergence. The input is metric approximation on a larger ball; the +output adds normalized test-integral control on the smaller ball. -/ +def LocalMeasuredCoordinateInput {K : ℝ} {n : ℕ} (_hX : NoncollapsedRCD K n X) : Prop := + 2 ≤ n → ∀ S ε : ℝ, 0 < S → 0 < ε → ∃ δ : ℝ, 0 < δ ∧ + ∀ (p : X) (r : ℝ), 0 < r → -δ ≤ K * r ^ 2 → + ∀ f : X → Euclidean n, Measurable f → + IsPointedApproximation p 0 r (2 * S) δ f → + IsMeasuredEuclideanApproximation (hausdorff n X) n p r S ε f + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..cea88b567381f307211bc097e179c09b90e81d18 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MeasuredCoordinates.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Sobolev.UniformMetricMeasureTests +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinateInput +import OAI.Geometry.RCD.Metric.LowerCurvatureVolume + +namespace OAI + +/-! # Measured coordinate estimates from the RCD structure -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.measuredCoordinateInput_nonpos {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hK : K ≤ 0) : LocalMeasuredCoordinateInput hX := by + intro hn S η hS hη + obtain ⟨δ,hδ,hmeasure⟩ := hX.uniform_metric_measure_tests hn hK S η hS hη + refine ⟨min δ (η/3),lt_min hδ (by positivity),?_⟩ + intro p r hr hcurv V hVm hV + have hδcurv : -δ ≤ K*r^2 := (neg_le_neg (min_le_left _ _)).trans hcurv + have hδV := hV.mono_error (min_le_left δ (η/3)) + refine ⟨?_,hVm,hmeasure p r hr hδcurv V hVm hδV⟩ + have hsmall := hV.restrict_radius hr hS.le (by linarith : S ≤ 2*S) + (le_of_lt (lt_min hδ (by positivity))) + exact hsmall.mono_error (by linarith [min_le_right δ (η/3)]) + +theorem NoncollapsedRCD.measuredCoordinateInput {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) : LocalMeasuredCoordinateInput hX := by + intro hn + by_cases hK : K ≤ 0 + · exact hX.measuredCoordinateInput_nonpos hK hn + · let hX0 := hX.zero_of_nonneg_curvature hn (le_of_lt (lt_of_not_ge hK)) + intro S η hS hη + obtain ⟨δ,hδ,hmeasure⟩ := hX0.measuredCoordinateInput_nonpos le_rfl hn S η hS hη + refine ⟨δ,hδ,?_⟩ + intro p r hr _ V hVm hV + exact hmeasure p r hr (by simpa only [zero_mul] using (neg_nonpos.mpr hδ.le)) V hVm hV + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MeasuredRescalingFromCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/MeasuredRescalingFromCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d08f223484647bb966a38670598a8cd107d453e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MeasuredRescalingFromCoordinates.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Metric.MeasurablePointedApproximation + +namespace OAI + +/-! # Measured rescaling convergence from fixed-ball estimates + +The quantitative measured-coordinate input already controls every +measurable pointed approximation. Measurable net replacement and the +vanishing rescaled curvature therefore give its sequential formulation. +-/ + +open Set Metric MeasureTheory Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The fixed-ball measured-coordinate theorem supplies the separately +stated measured rescaling convergence, with no additional measure input. -/ +theorem LocalMeasuredCoordinateInput.euclideanMeasuredRescalingConvergence + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalMeasuredCoordinateInput hX) (hn : 2 ≤ n) (p : X) : + EuclideanMeasuredRescalingConvergence (hausdorff n X) n p := by + intro r hr hrzero hconv R ε hR hε + obtain ⟨δ, hδ, happly⟩ := hinput hn R ε hR hε + have hcurvzero : Tendsto (fun i => K*(r i)^2) atTop (𝓝 0) := by + simpa only [mul_zero, zero_pow (by norm_num : (2:ℕ) ≠ 0)] using + hrzero.pow 2 |>.const_mul K + filter_upwards [hconv (2*R) (by positivity) (δ/5) (by positivity), + hcurvzero.eventually (lt_mem_nhds (neg_lt_zero.mpr hδ))] with i hi hcurv + obtain ⟨f, hf⟩ := hi + obtain ⟨g, hgm, hg⟩ := hf.exists_measurable (hr i) (by positivity) (by positivity) + have hg' : IsPointedApproximation p 0 (r i) (2*R) δ g := by + convert hg using 1; ring + exact ⟨g, happly p (r i) (hr i) hcurv.le g hgm hg'⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MetricDyadicNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/MetricDyadicNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0179bfedbd0bbef672fd2b4fe9f4f728df838f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MetricDyadicNormalization.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Coordinates.DyadicNormalizedFamily +import OAI.Geometry.RCD.Coordinates.ScaledCoordinates + +namespace OAI + +/-! # Metric approximation in the exact dyadic normalizing frame -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +/-- The half-ball output of almost splitting covers four radial testing +radii after changing the physical unit by eight. -/ +theorem IsPointedApproximation.rescale_eight {X : Type*} [MetricSpace X] {n : ℕ} + {p : X} {r ε : ℝ} (hr : 0 < r) {f : X → Euclidean n} + (hf : IsPointedApproximation p 0 (8 * r) (1 / 2) ε f) : + IsPointedApproximation p 0 r 4 (8 * ε) (fun x => (8 : ℝ) • f x) := by + have hdist (v w : Euclidean n) : dist ((8 : ℝ) • v) ((8 : ℝ) • w) = 8 * dist v w := by + rw [dist_smul₀] + norm_num + have hrad : (1 / 2 : ℝ) * (8 * r) = 4 * r := by ring + refine ⟨?_, ?_, ?_⟩ + · have h := mul_le_mul_of_nonneg_left hf.1 (by norm_num : (0 : ℝ) ≤ 8) + simpa only [← hdist, smul_zero] using h + · intro x y hx hy + have h := mul_le_mul_of_nonneg_left (hf.2.1 x y (by rwa [hrad]) (by rwa [hrad])) + (by norm_num : (0 : ℝ) ≤ 8) + have h' : |(8 : ℝ) * (dist (f x) (f y) - dist x y / (8 * r))| ≤ 8 * ε := by + simpa only [abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 8)] using h + have he : (8 : ℝ) * (dist (f x) (f y) - dist x y / (8 * r)) = + dist ((8 : ℝ) • f x) ((8 : ℝ) • f y) - dist x y / r := by + rw [hdist] + field_simp + rwa [he] at h' + · intro y hy + have hy' : dist ((1 / 8 : ℝ) • y) 0 ≤ 1 / 2 - ε := by + rw [dist_zero_right, norm_smul] + norm_num + have h := hy + rw [dist_zero_right] at h + linarith + obtain ⟨x, hx, hxy⟩ := hf.2.2 ((1 / 8 : ℝ) • y) hy' + refine ⟨x, by rwa [hrad] at hx, ?_⟩ + have h := mul_le_mul_of_nonneg_left hxy (by norm_num : (0 : ℝ) ≤ 8) + rw [← hdist, smul_smul] at h + norm_num at h + exact h + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Choose each dyadic frame once, retaining its exact mean, splitting +data and metric approximation together. The testing radius is 1/128 of +the mean-normalization radius, or 1/64 of the distance-source radius. -/ +theorem exists_metric_dyadic_normalized_family (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (p : X) {R T β ρ : ℝ} (hR : 0 < R) (hRT : 4 * R ≤ T) + (hfamily : ∀ r : ℝ, 0 < r → 64 * r ≤ T → + ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn μ hQ p (16 * r) β (transformedColumn μ hQ u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsPointedApproximation p 0 r (1 / 2) ρ (fun x => r⁻¹ • + ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)))) : + ∃ S : ℕ → Euclidean n ≃L[ℝ] Euclidean n, + (∀ i, IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn μ hQ p (R / 2 ^ i) β (transformedColumn μ hQ u (S i)) + (fun x => (S i : Euclidean n →L[ℝ] Euclidean n).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation p 0 ((R / 2 ^ i) / 128) 4 (8 * ρ) + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (S i : Euclidean n →L[ℝ] Euclidean n).adjoint (v p))) := by + have hchoose (i : ℕ) : ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p (R / 2 ^ i)) measurableSet_ball A ∧ + FirstOrderSplittingOn μ hQ p (R / 2 ^ i) β (transformedColumn μ hQ u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsPointedApproximation p 0 ((R / 2 ^ i) / 128) 4 (8 * ρ) + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p))) := by + let d := R / (2 : ℝ) ^ i + have hd : 0 < d := div_pos hR (by positivity) + have hdR : d ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + obtain ⟨A, hA, hfirst, happ⟩ := hfamily (d / 16) (by positivity) (by linarith) + refine ⟨A, by simpa only [show 16 * (d / 16) = d by ring] using hA, + by simpa only [show 16 * (d / 16) = d by ring] using hfirst, ?_⟩ + have he : d / 16 = 8 * (d / 128) := by ring + rw [he] at happ + have hs := happ.rescale_eight (by positivity : 0 < d / 128) + have hscale : (8 : ℝ) * (8 * (d / 128))⁻¹ = (d / 128)⁻¹ := by + field_simp + simpa only [smul_smul, hscale] using hs + choose S hS using hchoose + exact ⟨S, fun i => (hS i).1, fun i => (hS i).2.1, fun i => (hS i).2.2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MetricIteration.lean b/lean/OAI/Geometry/RCD/Coordinates/MetricIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3c360e3ba9f43f2ec224a540ac932a692dd1482 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MetricIteration.lean @@ -0,0 +1,488 @@ +import OAI.Geometry.RCD.Coordinates.FrozenInverseCosts +import OAI.Geometry.RCD.Coordinates.NormalizedJetStep +import OAI.Geometry.RCD.Coordinates.PointwiseMetricIteration + +namespace OAI + +/-! +# Finite analytic coordinate iteration + +The maps are defined everywhere. Smoothness and metric estimates are +local statements on a fixed open set, derived from analytic field bounds. +-/ + +open Filter Set +open scoped Topology ContDiff BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- The actual coordinate iteration, starting from the identity. -/ +def metricIterate (v : ℕ → E → E) : ℕ → E → E + | 0 => id + | i + 1 => fun x => metricIterate v i x + + operatorInverseTranspose (fderiv ℝ (metricIterate v i) x) (v i x) + +@[simp] theorem metricIterate_zero (v : ℕ → E → E) : metricIterate v 0 = id := rfl + +@[simp] theorem metricIterate_succ (v : ℕ → E → E) (i : ℕ) : + metricIterate v (i + 1) = fun x => metricIterate v i x + + operatorInverseTranspose (fderiv ℝ (metricIterate v i) x) (v i x) := rfl + +omit [CompleteSpace E] in +/-- Local smoothness is preserved by frozen normalization. -/ +theorem contDiffAt_normalizedCoordinates {m : ℕ} {r : ℝ} (T : E ≃L[ℝ] E) + (x : E) {h : E → E} (hh : ContDiffAt ℝ m h x) : + ContDiffAt ℝ m (normalizedCoordinates r T x h) 0 := by + have hh' : ContDiffAt ℝ m h (frozenSource r T x 0) := by + simpa [frozenSource] using hh + have hs : ContDiffAt ℝ m (frozenSource r T x) 0 := by + unfold frozenSource + fun_prop + exact ((hh'.comp 0 hs).sub contDiffAt_const).const_smul r⁻¹ + +/-- Local smoothness is preserved by the dual frozen normalization. -/ +theorem contDiffAt_normalizedCovector {m : ℕ} {r : ℝ} (T : E ≃L[ℝ] E) + (x : E) {v : E → E} (hv : ContDiffAt ℝ m v x) : + ContDiffAt ℝ m (normalizedCovector r T x v) 0 := by + have hv' : ContDiffAt ℝ m v (frozenSource r T x 0) := by + simpa [frozenSource] using hv + have hs : ContDiffAt ℝ m (frozenSource r T x) 0 := by + unfold frozenSource + fun_prop + exact (((T.symm : E →L[ℝ] E).adjoint.contDiff.contDiffAt).comp 0 + (hv'.comp 0 hs)).const_smul r⁻¹ + +omit [CompleteSpace E] in +/-- The same map at the next radius is obtained by a contracting metric +change and dyadic output scaling. -/ +theorem normalizedCoordinates_dyadic {r : ℝ} (hr : r ≠ 0) + (T U : E ≃L[ℝ] E) (x : E) (h : E → E) : + normalizedCoordinates (r / 2) U x h = fun z => (2 : ℝ) • + normalizedCoordinates r T x h + ((1 / 2 : ℝ) • (((T : E →L[ℝ] E) ∘L (U.symm : E →L[ℝ] E)) z)) := by + funext z + have hsource : frozenSource r T x + ((1 / 2 : ℝ) • (((T : E →L[ℝ] E) ∘L (U.symm : E →L[ℝ] E)) z)) = + frozenSource (r / 2) U x z := by + simp [frozenSource, smul_smul, div_eq_mul_inv] + unfold normalizedCoordinates + rw [hsource, smul_smul] + congr 1 + field_simp + +/-- Positive-order jets of the actual normalized update agree with +those of the normalized inverse-transpose update. The centering error +is a constant and the covariance identity is needed only locally. -/ +theorem iteratedFDeriv_normalized_update {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (x : E) (h v : E → E) (e : E → E ≃L[ℝ] E) + {m : ℕ} (hm : 0 < m) (hh : ContDiffAt ℝ (m + 1) h x) + (hv : ContDiffAt ℝ m v x) + (he : ∀ᶠ y in 𝓝 x, fderiv ℝ h y = (e y : E →L[ℝ] E)) : + iteratedFDeriv ℝ m (normalizedCoordinates r T x + (fun y => h y + operatorInverseTranspose (fderiv ℝ h y) (v y))) 0 = + iteratedFDeriv ℝ m (fun z => normalizedCoordinates r T x h z + + operatorInverseTranspose (fderiv ℝ (normalizedCoordinates r T x h) z) + (normalizedCovector r T x v z)) 0 := by + let g := normalizedCoordinates r T x h + let w := normalizedCovector r T x v + let f := fun y => h y + operatorInverseTranspose (fderiv ℝ h y) (v y) + let u := fun z => g z + operatorInverseTranspose (fderiv ℝ g z) (w z) + have he0 : fderiv ℝ h x = (e x : E →L[ℝ] E) := Filter.EventuallyEq.eq_of_nhds he + have hg : ContDiffAt ℝ (m + 1) g 0 := contDiffAt_normalizedCoordinates (r := r) T x hh + have hw : ContDiffAt ℝ m w 0 := contDiffAt_normalizedCovector (r := r) T x hv + have hgJ : fderiv ℝ g 0 = (T.symm.trans (e x) : E →L[ℝ] E) := by + change fderiv ℝ (normalizedCoordinates r T x h) 0 = _ + rw [fderiv_normalizedCoordinates hr T x 0 h] + · simp only [frozenSource, map_zero, smul_zero, add_zero, he0] + rfl + · simpa [frozenSource] using hh.differentiableAt (by norm_cast) + have hunit : IsUnit (fderiv ℝ g 0) := by + rw [hgJ] + exact (T.symm.trans (e x)).toUnit.isUnit + have hu : ContDiffAt ℝ m u 0 := + (hg.of_le (by exact_mod_cast Nat.le_succ m)).add + ((contDiffAt_inverseTranspose_field (hg.fderiv_right (by simp)) hunit).clm_apply hw) + have htend : Tendsto (frozenSource r T x) (𝓝 0) (𝓝 x) := by + have hc : Continuous (frozenSource r T x) := by unfold frozenSource; fun_prop + simpa [frozenSource] using hc.tendsto (0 : E) + have hd : ∀ᶠ y in 𝓝 x, DifferentiableAt ℝ h y := + (hh.eventually (by simp)).mono fun _ hy => hy.differentiableAt (by norm_cast) + let b := -(r⁻¹ • operatorInverseTranspose (fderiv ℝ h x) (v x)) + have heq : normalizedCoordinates r T x f =ᶠ[𝓝 0] (fun z => u z + b) := by + filter_upwards [htend.eventually he, htend.eventually hd] with z hez hdz + have hid := normalized_update_identity hr T x z h v hdz (e (frozenSource r T x z)) hez + change r⁻¹ • (f (frozenSource r T x z) - f x) = u z + b + change r⁻¹ • (f (frozenSource r T x z) - h x) = u z at hid + dsimp only [f, b] + rw [← hid] + module + rw [(heq.iteratedFDeriv ℝ m).eq_of_nhds] + change iteratedFDeriv ℝ m (u + fun _ => b) 0 = _ + rw [iteratedFDeriv_add_apply hu contDiffAt_const] + simp [iteratedFDeriv_const_of_ne (Nat.ne_of_gt hm), u, g, w] + +/-- The next frozen metric preserves a requested jet order, from only +source orders through `m+1`. The small parameter is independent of `m`. -/ +theorem exists_frozen_normalized_jet_step + {A B Cv : ℝ} (hA : 1 ≤ A) (hB : 0 < B) (hCv : 0 ≤ Cv) : + ∃ epsilon : ℝ, 0 < epsilon ∧ + ∀ (r : ℝ), 0 < r → ∀ (T U : E ≃L[ℝ] E) (x : E) (h v : E → E) + (e : E → E ≃L[ℝ] E) (m : ℕ), 2 ≤ m → + ContDiffAt ℝ (m + 1) h x → ContDiffAt ℝ m v x → + (∀ᶠ y in 𝓝 x, fderiv ℝ h y = (e y : E →L[ℝ] E)) → + (∀ xi, A⁻¹ * ‖T xi‖ ^ 2 ≤ ‖fderiv ℝ h x xi‖ ^ 2) → + (∀ xi, ‖T xi‖ ≤ ‖U xi‖) → + (∀ q, 2 ≤ q → q ≤ m + 1 → + ‖iteratedFDeriv ℝ q (normalizedCoordinates r T x h) 0‖ ≤ + B ^ (q - 1) * (q.factorial : ℝ) ^ 3) → + (∀ q, q ≤ m → ‖iteratedFDeriv ℝ q (normalizedCovector r T x v) 0‖ ≤ + epsilon * Cv * factorialMajorant q * jetCoefficientScale B q) → + ‖iteratedFDeriv ℝ m (normalizedCoordinates (r / 2) U x + (fun y => h y + operatorInverseTranspose (fderiv ℝ h y) (v y))) 0‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + obtain ⟨epsilon, hepsilon, hstep⟩ := exists_normalized_jet_step_finite (E := E) hA hB hCv + refine ⟨epsilon, hepsilon, ?_⟩ + intro r hr T U x h v e m hm hh hv he hlower hmetric hjets hvjets + let g := normalizedCoordinates r T x h + let w := normalizedCovector r T x v + let f := fun y => h y + operatorInverseTranspose (fderiv ℝ h y) (v y) + have he0 : fderiv ℝ h x = (e x : E →L[ℝ] E) := Filter.EventuallyEq.eq_of_nhds he + have hg : ContDiffAt ℝ (m + 1) g 0 := contDiffAt_normalizedCoordinates (r := r) T x hh + have hw : ContDiffAt ℝ m w 0 := contDiffAt_normalizedCovector (r := r) T x hv + have hgJ : fderiv ℝ g 0 = (T.symm.trans (e x) : E →L[ℝ] E) := by + change fderiv ℝ (normalizedCoordinates r T x h) 0 = _ + rw [fderiv_normalizedCoordinates hr.ne' T x 0 h] + · simp only [frozenSource, map_zero, smul_zero, add_zero, he0] + rfl + · simpa [frozenSource] using hh.differentiableAt (by norm_cast) + have hunit : IsUnit (fderiv ℝ g 0) := by rw [hgJ]; exact (T.symm.trans (e x)).toUnit.isUnit + have hginv : ‖Ring.inverse (fderiv ℝ g 0)‖ ≤ Real.sqrt A := by + have heLower : ∀ xi, A⁻¹ * ‖T xi‖ ^ 2 ≤ ‖e x xi‖ ^ 2 := by + simpa only [he0, ContinuousLinearEquiv.coe_coe] using hlower + have hinv : Ring.inverse (fderiv ℝ g 0) = + (T : E →L[ℝ] E) ∘L ((e x).symm : E →L[ℝ] E) := by + rw [hgJ] + change Ring.inverse ((T.symm.trans (e x)).toUnit : E →L[ℝ] E) = _ + rw [Ring.inverse_unit] + rfl + rw [hinv] + exact norm_frozen_comp_inverse_le T (e x) hA heLower + have hbound := hstep m hm g w 0 hg hw hunit hginv hjets hvjets + have hf : ContDiffAt ℝ m f x := + (hh.of_le (by norm_cast; omega)).add + ((contDiffAt_inverseTranspose_field (hh.fderiv_right (by simp)) + (by rw [he0]; exact (e x).toUnit.isUnit)).clm_apply hv) + have hnorm := norm_iteratedFDeriv_dyadic_metric_change_le + ((T : E →L[ℝ] E) ∘L (U.symm : E →L[ℝ] E)) + (normalizedCoordinates r T x f) 0 (by omega : 0 < m) + (norm_metric_change_le_one T U hmetric) (contDiffAt_normalizedCoordinates T x hf) + have heq := normalizedCoordinates_dyadic hr.ne' T U x f + simp only [add_zero] at hnorm + rw [← heq, iteratedFDeriv_normalized_update hr.ne' T x h v e (by omega) hh hv he] at hnorm + exact hnorm.trans hbound + +/-- Dyadic radii, written without integer exponents. -/ +def iterationRadius (r0 : ℝ) (i : ℕ) : ℝ := r0 / (2 : ℝ) ^ i + +theorem iterationRadius_pos {r0 : ℝ} (hr0 : 0 < r0) (i : ℕ) : + 0 < iterationRadius r0 i := by unfold iterationRadius; positivity + +theorem iterationRadius_succ (r0 : ℝ) (i : ℕ) : + iterationRadius r0 (i + 1) = iterationRadius r0 i / 2 := by + unfold iterationRadius + rw [pow_succ] + ring + +/-- Explicit analytic inputs for the finite iteration. The mass and +principal comparisons come before construction of the coordinate maps; +none of the fields below assumes a coordinate metric or a scalar error +recurrence. -/ +structure AnalyticIterationData (Ω : Set E) (r0 T F B epsilon : ℝ) where + frozen : ℕ → E → E ≃L[ℝ] E + correction : ℕ → E → E + principal : ℕ → E → E →L[ℝ] E + mass : ℕ → E → E →L[ℝ] E + energy : ℕ → E → ℝ + frozen_mono : ∀ i x, x ∈ Ω → ∀ xi, ‖frozen i x xi‖ ≤ ‖frozen (i + 1) x xi‖ + correction_smooth : ∀ i x, x ∈ Ω → ∀ m : ℕ, ContDiffAt ℝ m (correction i) x + energy_nonneg : ∀ i x, x ∈ Ω → 0 ≤ energy i x + energy_budget : ∀ k x, x ∈ Ω → (∑ i ∈ Finset.range k, energy i x) ≤ epsilon + mass_nonneg : ∀ i x, x ∈ Ω → ∀ xi, 0 ≤ ⟪xi, mass i x xi⟫_ℝ + principal_nonneg : ∀ i x, x ∈ Ω → ∀ xi, 0 ≤ ⟪xi, principal i x xi⟫_ℝ + principal_le_mass : ∀ i x, x ∈ Ω → ∀ xi, ⟪xi, principal i x xi⟫_ℝ ≤ ⟪xi, mass i x xi⟫_ℝ + mass_budget : ∀ k x, x ∈ Ω → ∀ xi, + ‖xi‖ ^ 2 + (∑ i ∈ Finset.range k, ⟪xi, mass i x xi⟫_ℝ) ≤ T * ‖frozen k x xi‖ ^ 2 + principal_budget : ∀ k x, x ∈ Ω → ∀ xi, + ‖frozen k x xi‖ ^ 2 ≤ T * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ⟪xi, principal i x xi⟫_ℝ) + value_bound : ∀ i x, x ∈ Ω → + ‖(frozen i x).symm.toContinuousLinearMap.adjoint (correction i x)‖ ≤ + F * Real.sqrt epsilon * iterationRadius r0 i * Real.sqrt (energy i x) + first_bound : ∀ i x, x ∈ Ω → ∀ xi, + ‖(frozen i x).symm.toContinuousLinearMap.adjoint (fderiv ℝ (correction i) x xi)‖ ≤ + F * Real.sqrt epsilon * (Real.sqrt ⟪xi, mass i x xi⟫_ℝ + Real.sqrt (energy i x) * ‖frozen i x xi‖) + second_bound : ∀ i x, x ∈ Ω → ∀ xi, + ‖(frozen i x).symm.toContinuousLinearMap.adjoint (diagonalSecond (correction i) x xi)‖ ≤ + F / iterationRadius r0 i * (Real.sqrt ⟪xi, mass i x xi⟫_ℝ * ‖frozen i x xi‖ + + Real.sqrt (energy i x) * ‖frozen i x xi‖ ^ 2) + linear_bound : ∀ i x, x ∈ Ω → ∀ xi, + |⟪xi, fderiv ℝ (correction i) x xi - principal i x xi⟫_ℝ| ≤ + F * Real.sqrt ⟪xi, mass i x xi⟫_ℝ * Real.sqrt (energy i x) * ‖frozen i x xi‖ + correction_jets : ∀ i x, x ∈ Ω → ∀ m, + ‖iteratedFDeriv ℝ m (normalizedCovector (iterationRadius r0 i) (frozen i x) x (correction i)) 0‖ ≤ + epsilon * F * factorialMajorant m * jetCoefficientScale B m + +omit [CompleteSpace E] in +/-- An invertible Jacobian representative may be selected locally from +coercivity on an open set. No smoothness of the selected representative +is needed: it agrees with the actual Jacobian throughout the set. -/ +theorem exists_local_jacobian_family [FiniteDimensional ℝ E] + {Ω : Set E} (hΩ : IsOpen Ω) (h : E → E) (T : E → E ≃L[ℝ] E) + {A : ℝ} (hA : 1 ≤ A) + (hlower : ∀ x ∈ Ω, ∀ xi, A⁻¹ * ‖T x xi‖ ^ 2 ≤ ‖fderiv ℝ h x xi‖ ^ 2) : + ∃ e : E → E ≃L[ℝ] E, ∀ x ∈ Ω, + ∀ᶠ y in 𝓝 x, fderiv ℝ h y = (e y : E →L[ℝ] E) := by + classical + have hex : ∀ y, ∃ e : E ≃L[ℝ] E, y ∈ Ω → fderiv ℝ h y = (e : E →L[ℝ] E) := by + intro y + by_cases hy : y ∈ Ω + · obtain ⟨e, he⟩ := exists_equiv_of_metric_lower (T y) (fderiv ℝ h y) hA (hlower y hy) + exact ⟨e, fun _ => he.symm⟩ + · exact ⟨ContinuousLinearEquiv.refl ℝ E, fun hy' => (hy hy').elim⟩ + choose e he using hex + exact ⟨e, fun x hx => Filter.Eventually.mono (hΩ.mem_nhds hx) (fun y hy => he y hy)⟩ + +omit [CompleteSpace E] in +/-- The identity starts the iteration with all higher jets zero. -/ +theorem norm_iteratedFDeriv_id_of_two_le {m : ℕ} (hm : 2 ≤ m) (x : E) : + ‖iteratedFDeriv ℝ m (id : E → E) x‖ = 0 := by + have heq : m = (m - 1) + 1 := by omega + rw [heq, ← norm_iteratedFDeriv_fderiv] + have hid : fderiv ℝ (id : E → E) = fun _ => ContinuousLinearMap.id ℝ E := by + funext y + exact fderiv_id + rw [hid, iteratedFDeriv_const_of_ne (by omega)] + simp + +/-- Both the all-order jet threshold and the metric error threshold can +be met by a single positive parameter. -/ +theorem exists_small_metric_iteration_parameter {C T delta : ℝ} + (hT : 0 < T) (hdelta : 0 < delta) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ epsilon ≤ delta ∧ + scalarMetricErrorCoefficient (pointwiseIterationCoefficient C) T epsilon ≤ (2 * T)⁻¹ := by + have htarget : 0 < (2 * T)⁻¹ := by positivity + obtain ⟨d, hd, hclose⟩ := Metric.tendsto_nhds_nhds.mp + (scalarMetricErrorCoefficient_tendsto_zero (pointwiseIterationCoefficient C) T) + _ htarget + let epsilon := min (d / 2) (min delta 1) + have hepsilon : 0 < epsilon := by dsimp [epsilon]; positivity + have hed : epsilon ≤ d / 2 := min_le_left _ _ + have he1 : epsilon ≤ 1 := (min_le_right _ _).trans (min_le_right _ _) + have hedelta : epsilon ≤ delta := (min_le_right _ _).trans (min_le_left _ _) + have hdist : dist epsilon 0 < d := by + rw [Real.dist_eq, sub_zero, abs_of_pos hepsilon] + linarith + have hsmall := hclose hdist + rw [Real.dist_eq, sub_zero] at hsmall + exact ⟨epsilon, hepsilon, he1, hedelta, (le_abs_self _).trans hsmall.le⟩ + +/-- All finite stages are smooth on the given open set, coercive, and +have the same normalized higher-jet bounds. The constants are chosen in +order: metric bootstrap `4T`, inverse constant, fixed jet base, then a +single positive defect parameter. -/ +theorem exists_analytic_metric_iteration [FiniteDimensional ℝ E] + {T F B : ℝ} (hT : 1 ≤ T) (hF : 1 ≤ F) (hB : 1 ≤ B) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ (Ω : Set E), IsOpen Ω → ∀ (r0 : ℝ), 0 < r0 → + ∀ d : AnalyticIterationData (E := E) Ω r0 T F B epsilon, + ∀ k x, x ∈ Ω → + (∀ m : ℕ, ContDiffAt ℝ m (metricIterate d.correction k) x) ∧ + (∀ xi, (4 * T)⁻¹ * ‖d.frozen k x xi‖ ^ 2 ≤ + ‖fderiv ℝ (metricIterate d.correction k) x xi‖ ^ 2 ∧ + ‖fderiv ℝ (metricIterate d.correction k) x xi‖ ^ 2 ≤ + (4 * T) * ‖d.frozen k x xi‖ ^ 2) ∧ + (∀ m, 2 ≤ m → + ‖iteratedFDeriv ℝ m (normalizedCoordinates (iterationRadius r0 k) + (d.frozen k x) x (metricIterate d.correction k)) 0‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) := by + have hA : 1 ≤ 4 * T := by linarith + have hBpos : 0 < B := by linarith + have hFnonneg : 0 ≤ F := by linarith + obtain ⟨Ci, hCi0, hCiA, hcost⟩ := exists_frozen_inverse_derivative_cost (E := E) hA + have hCinonneg : 0 ≤ Ci := (Real.sqrt_nonneg _).trans hCi0 + let C := 1 + F + Real.sqrt (4 * T) + 8 * Ci * B + 216 * Ci * B ^ 2 + have hC : 1 ≤ C := by dsimp [C]; nlinarith [Real.sqrt_nonneg (4 * T)] + have hCF : F ≤ C := by dsimp [C]; nlinarith [Real.sqrt_nonneg (4 * T)] + have hCroot : Real.sqrt (4 * T) ≤ C := by dsimp [C]; nlinarith + have hCfirst : 8 * Ci * B ≤ C := by dsimp [C]; nlinarith [Real.sqrt_nonneg (4 * T)] + have hCsecond : 216 * Ci * B ^ 2 ≤ C := by dsimp [C]; nlinarith [Real.sqrt_nonneg (4 * T)] + obtain ⟨delta, hdelta, hjetstep⟩ := exists_frozen_normalized_jet_step (E := E) hA hBpos hFnonneg + obtain ⟨epsilon, hepsilon, he1, hedelta, hesmall⟩ := + exists_small_metric_iteration_parameter (C := C) (by linarith : 0 < T) hdelta + refine ⟨epsilon, hepsilon, he1, ?_⟩ + intro Ω hΩ r0 hr0 d + have hr : ∀ i, 0 < iterationRadius r0 i := iterationRadius_pos hr0 + have hsmoothstep {i : ℕ} {x : E} (hx : x ∈ Ω) + (hi : ∀ m : ℕ, ContDiffAt ℝ m (metricIterate d.correction i) x) + (hmetric : ∀ xi, (4 * T)⁻¹ * ‖d.frozen i x xi‖ ^ 2 ≤ + ‖fderiv ℝ (metricIterate d.correction i) x xi‖ ^ 2) : + ∀ m : ℕ, ContDiffAt ℝ m (metricIterate d.correction (i + 1)) x := by + intro m + rw [metricIterate_succ] + exact (hi m).add ((contDiffAt_inverseTranspose_field ((hi (m + 1)).fderiv_right (by simp)) + (isUnit_of_metric_lower (d.frozen i x) _ hA hmetric)).clm_apply (d.correction_smooth i x hx m)) + intro k + induction k using Nat.strong_induction_on with + | h k ih => + have hequiv : ∀ i, ∃ e : E → E ≃L[ℝ] E, ∀ x ∈ Ω, i < k → + ∀ᶠ y in 𝓝 x, fderiv ℝ (metricIterate d.correction i) y = (e y : E →L[ℝ] E) := by + intro i + by_cases hi : i < k + · obtain ⟨e, he⟩ := exists_local_jacobian_family hΩ (metricIterate d.correction i) + (d.frozen i) hA (fun x hx xi => ((ih i hi x hx).2.1 xi).1) + exact ⟨e, fun x hx _ => he x hx⟩ + · exact ⟨fun _ => ContinuousLinearEquiv.refl ℝ E, fun _ _ hi' => (hi hi').elim⟩ + choose e he using hequiv + intro x hx + cases k with + | zero => + refine ⟨fun _ => contDiffAt_id, ?_, ?_⟩ + · intro xi + simp only [metricIterate_zero, fderiv_id, ContinuousLinearMap.id_apply] + have hlower : ‖d.frozen 0 x xi‖ ^ 2 ≤ T * ‖xi‖ ^ 2 := by + simpa using d.principal_budget 0 x hx xi + have hupper : ‖xi‖ ^ 2 ≤ T * ‖d.frozen 0 x xi‖ ^ 2 := by + simpa using d.mass_budget 0 x hx xi + constructor + · rw [← div_eq_inv_mul] + apply (div_le_iff₀ (by linarith : 0 < 4 * T)).2 + have hnonneg : 0 ≤ T * ‖xi‖ ^ 2 := by positivity + nlinarith only [hlower, hnonneg] + · have hnonneg : 0 ≤ T * ‖d.frozen 0 x xi‖ ^ 2 := by positivity + nlinarith only [hupper, hnonneg] + · intro m hm + have hzero := normalized_jet_norm_le (d.frozen 0 x) (id : E → E) x 0 + (iterationRadius r0 0) (by omega : 0 < m) contDiffAt_id + rw [norm_iteratedFDeriv_id_of_two_le hm, mul_zero, zero_mul] at hzero + exact hzero.trans (by positivity) + | succ n => + have hn : n < n + 1 := Nat.lt_succ_self n + have hprev := ih n hn x hx + refine ⟨hsmoothstep hx hprev.1 (fun xi => (hprev.2.1 xi).1), ?_, ?_⟩ + · intro xi + by_cases hxi : xi = 0 + · simp [hxi] + have hq : ∀ i, 0 < ‖d.frozen i x xi‖ := by + intro i + exact norm_pos_iff.mpr (fun hz => hxi ((d.frozen i x).injective (by simpa using hz))) + have hmono : Monotone (fun i => ‖d.frozen i x xi‖) := + monotone_nat_of_le_succ (fun i => d.frozen_mono i x hx xi) + have hleading := leading_metric_comparison (sq_nonneg ‖xi‖) (by linarith : 0 < T) + (fun i => d.principal_nonneg i x hx xi) (n + 1) + (fun i _ => d.principal_le_mass i x hx xi) + (d.principal_budget (n + 1) x hx xi) (d.mass_budget (n + 1) x hx xi) + have hcosts (i : ℕ) (hi : i < n + 1) : + ∀ w : E, + ‖fderiv ℝ (fun y => operatorInverseTranspose + (fderiv ℝ (metricIterate d.correction i) y)) x xi w‖ ≤ + 8 * Ci * B / iterationRadius r0 i * ‖d.frozen i x xi‖ * + ‖(d.frozen i x).symm.toContinuousLinearMap.adjoint w‖ ∧ + ‖diagonalSecond (fun y => operatorInverseTranspose + (fderiv ℝ (metricIterate d.correction i) y)) x xi w‖ ≤ + 216 * Ci * B ^ 2 / (iterationRadius r0 i) ^ 2 * ‖d.frozen i x xi‖ ^ 2 * + ‖(d.frozen i x).symm.toContinuousLinearMap.adjoint w‖ := by + exact hcost B (iterationRadius r0 i) hBpos (hr i) (d.frozen i x) x + (metricIterate d.correction i) (e i) ((ih i hi x hx).1 3) + (he i x hx hi) (fun y => ((ih i hi x hx).2.1 y).1) + (fun m hm _ => (ih i hi x hx).2.2 m hm) xi + apply pointwise_metric_iteration (metricIterate d.correction) d.correction + (fun i => e i x) (fun i => d.principal i x) + (fun i w => ‖(d.frozen i x).symm.toContinuousLinearMap.adjoint w‖) + x xi (fun i => ‖d.frozen i x xi‖) (iterationRadius r0) + (fun i => ⟪xi, d.mass i x xi⟫_ℝ) (fun i => d.energy i x) (n + 1) + hC hT hepsilon.le he1 (sq_nonneg _) hq hr + (fun i => d.mass_nonneg i x hx xi) (fun i => d.energy_nonneg i x hx) + (fun i hi => (ih i hi x hx).1 3) (fun i _ => d.correction_smooth i x hx 2) + (fun i hi => Filter.EventuallyEq.eq_of_nhds (he i x hx hi)) + (fun _ _ => rfl) (fun i _ => iterationRadius_succ r0 i) + (fun i _ => d.frozen_mono i x hx xi) + · simp [metricIterate, diagonalSecond] + · intro i hi w + have he0 := Filter.EventuallyEq.eq_of_nhds (he i x hx hi) + rw [he0, operatorInverseTranspose_equiv] + have hlower : ∀ y, (4 * T)⁻¹ * ‖d.frozen i x y‖ ^ 2 ≤ ‖e i x y‖ ^ 2 := by + simpa only [he0, ContinuousLinearEquiv.coe_coe] using + (fun y => ((ih i hi x hx).2.1 y).1) + exact (inverseTranspose_norm_le_frozen (d.frozen i x) (e i x) hA hlower w).trans + (mul_le_mul_of_nonneg_right hCroot (norm_nonneg _)) + · intro i hi w + exact ((hcosts i hi w).1).trans (by + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + calc + _ = (8 * Ci * B) * (‖d.frozen i x xi‖ / iterationRadius r0 i) := by ring + _ ≤ C * (‖d.frozen i x xi‖ / iterationRadius r0 i) := + mul_le_mul_of_nonneg_right hCfirst (div_nonneg (norm_nonneg _) (hr i).le) + _ = _ := by ring) + · intro i hi w + exact ((hcosts i hi w).2).trans (by + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + calc + _ = (216 * Ci * B ^ 2) * (‖d.frozen i x xi‖ ^ 2 / (iterationRadius r0 i) ^ 2) := by ring + _ ≤ C * (‖d.frozen i x xi‖ ^ 2 / (iterationRadius r0 i) ^ 2) := + mul_le_mul_of_nonneg_right hCsecond (by positivity) + _ = _ := by ring) + · intro i _ + have hri := (hr i).le + exact (d.value_bound i x hx).trans (by gcongr) + · intro i _ + exact (d.first_bound i x hx xi).trans (by gcongr) + · intro i _ + have hri := (hr i).le + exact (d.second_bound i x hx xi).trans (by gcongr) + · intro i _ + exact (d.linear_bound i x hx xi).trans (by gcongr) + · nlinarith [d.mass_budget (n + 1) x hx xi, sq_nonneg ‖xi‖] + · exact weighted_defect_sum_le (fun i => d.energy_nonneg i x hx) (sq_nonneg _) (n + 1) + (fun i hi => by + nlinarith [hmono (Nat.le_of_lt hi), norm_nonneg (d.frozen i x xi), + norm_nonneg (d.frozen (n + 1) x xi)]) (d.energy_budget (n + 1) x hx) + · simpa only [metricIterate_zero, fderiv_id, ContinuousLinearMap.id_apply] using hleading.1 + · simpa only [metricIterate_zero, fderiv_id, ContinuousLinearMap.id_apply] using hleading.2 + · exact hesmall + · intro m hm + rw [metricIterate_succ, iterationRadius_succ] + apply hjetstep (iterationRadius r0 n) (hr n) (d.frozen n x) (d.frozen (n + 1) x) + x (metricIterate d.correction n) (d.correction n) (e n) m hm + (hprev.1 (m + 1)) (d.correction_smooth n x hx m) (he n x hx hn) + (fun xi => (hprev.2.1 xi).1) (d.frozen_mono n x hx) + (fun q hq _ => hprev.2.2 q hq) + intro q _ + exact (d.correction_jets n x hx q).trans (by + apply mul_le_mul_of_nonneg_right _ (jetCoefficientScale_pos hBpos q).le + apply mul_le_mul_of_nonneg_right _ (factorialMajorant_pos q).le + exact mul_le_mul_of_nonneg_right hedelta hFnonneg) + +/-- Every Jacobian produced by the analytic iteration is a unit. In +finite dimension this is a consequence of the proved metric lower +bound, rather than an additional input to the construction. -/ +theorem exists_analytic_metric_iteration_invertible [FiniteDimensional ℝ E] + {T F B : ℝ} (hT : 1 ≤ T) (hF : 1 ≤ F) (hB : 1 ≤ B) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ (Ω : Set E), IsOpen Ω → ∀ (r0 : ℝ), 0 < r0 → + ∀ d : AnalyticIterationData (E := E) Ω r0 T F B epsilon, + ∀ k x, x ∈ Ω → IsUnit (fderiv ℝ (metricIterate d.correction k) x) := by + obtain ⟨epsilon, hepsilon, he1, hcontrol⟩ := + exists_analytic_metric_iteration (E := E) hT hF hB + refine ⟨epsilon, hepsilon, he1, ?_⟩ + intro Ω hΩ r0 hr0 d k x hx + exact isUnit_of_metric_lower (d.frozen k x) _ (by linarith : 1 ≤ 4 * T) + (fun xi => ((hcontrol Ω hΩ r0 hr0 d k x hx).2.1 xi).1) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/MetricLimitHausdorffNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/MetricLimitHausdorffNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..20fc2047a20ce27328d905ff5ada61a6f75efa65 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/MetricLimitHausdorffNormalization.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Metric.MetricLimitIsodiametric +import OAI.Geometry.RCD.Coordinates.HausdorffLowerNormalization +import OAI.Geometry.RCD.Coordinates.HausdorffUpperNormalization + +namespace OAI + +/-! # Exact Euclidean Hausdorff normalization from the actual RCD limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.metric_limit_hausdorff_normalization {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hK : K ≤ 0) + {S : ℝ} (hS : 0 < S) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -ε k ≤ K*(r k)^2) (hVm : ∀ k, Measurable (V k)) + (hV : ∀ k, IsPointedApproximation (p k) 0 (r k) S (ε k) (V k)) + (hfin : ∀ k, hausdorff n X (ball (p k) (S*r k)) ≠ ⊤) + {Q : ProbabilityMeasure (Euclidean n)} + (hlim : Tendsto (fun k => normalizedBallPushforward (hausdorff n X) + (p k) (r k) S (V k) (hfin k)) atTop (𝓝 Q)) + (hpositive : ∀ x ∈ ball (0 : Euclidean n) S, ∀ t : ℝ, 0 < t → + 0 < (Q : Measure (Euclidean n)).real (ball x t)) : + hausdorff n (Euclidean n) = volume := by + have hn0 : 0 < n := by omega + have hl := hX.metric_limit_isodiametric hn hK (a := S/4) (by positivity) + (by linarith only [hS]) p r ε V hr hε hcurv hVm hV hfin hlim hpositive + exact le_antisymm (normalized_hausdorff_le_volume hn0) + (volume_le_normalized_hausdorff_of_isodiametric hn0 + (compact_isodiametric_of_local (by positivity : 0 < S/4) hl)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NearRegularDistanceSources.lean b/lean/OAI/Geometry/RCD/Coordinates/NearRegularDistanceSources.lean new file mode 100644 index 0000000000000000000000000000000000000000..de1c3da30ddc643c8c20ff41596472ca27864ff8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NearRegularDistanceSources.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Metric.NearMaximalDistanceSources +import OAI.Geometry.RCD.Coordinates.RegularMovingVolume + +namespace OAI + +/-! # Vanishing actual distance sources near a regular point + +The absolute volume limits are constructed from regularity, rather than +assumed for the selected centers and radii. +-/ + +open Set Filter Metric MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_moving_distance_sources {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) (hK : K≤0) + {o : X} (ho : IsRegular n o) + (p : ℕ → X) (r : ℕ → ℝ) (hp : Tendsto p atTop (𝓝 o)) + (hr : ∀ k, 0 (r k)^(-(n:ℝ))*(σ k).real (ball (p k) (r k))) atTop (𝓝 0) := by + have hv (s : ℕ → ℝ) (hs : ∀ k, 0 (s k)^(-(n:ℝ))*(hausdorff n X).real (ball (p k) (s k))) + atTop (𝓝 (euclideanUnitVolume n)) := by + convert hX.regular_moving_volume_limit hn ho p s hp hs hs0 using 1 + funext k + rw [Real.rpow_neg (hs k).le,Real.rpow_natCast,div_eq_inv_mul] + have ht : Tendsto (fun k => 2*r k) atTop (𝓝 0) := by + simpa only [mul_zero] using hr0.const_mul 2 + exact hX.distance_sources_from_volume_limits hn hK p r hr hr0 (hv r hr hr0) + (hv (fun k => 2*r k) (fun k => mul_pos (by norm_num) (hr k)) ht) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NearRegularPoissonFamily.lean b/lean/OAI/Geometry/RCD/Coordinates/NearRegularPoissonFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7e70f1c3bd2a63fd6a0c79cf52d2ecbd74fdaa9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NearRegularPoissonFamily.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Coordinates.NearRegularDistanceSources +import OAI.Geometry.RCD.Sobolev.DistancePoissonFamily +import OAI.Geometry.RCD.Metric.AnnularVolume + +namespace OAI + +/-! # Constructed Poisson families along every near-regular shrinking sequence + +One finite initial segment is discarded. Thereafter the actual positive +sources have vanishing relative mass and the replacement constants are fixed. +-/ + +open Set Metric MeasureTheory Filter +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.near_regular_poisson_family {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) (hK : K≤0) {o : X} (ho : IsRegular n o) + (p : ℕ → X) (r : ℕ → ℝ) (hp : Tendsto p atTop (𝓝 o)) + (hr : ∀ k, 0 p (k+N)) (fun k => r (k+N)) (fun k => hr (k+N)), + (∀ k, r (k+N)≤1 ∧ -1≤K*(64*r (k+N))^2 ∧ + 0<(hausdorff n X).real (ball (p (k+N)) (r (k+N))) ∧ + 2*(hausdorff n X).real (ball (p (k+N)) (r (k+N)))≤ + (hausdorff n X).real (ball (p (k+N)) (2*r (k+N)))) ∧ + Tendsto (fun k => (r (k+N))^(-(n:ℝ))*(F.source k).real (ball (p (k+N)) (r (k+N)))) + atTop (𝓝 0) ∧ + Tendsto (fun k => (F.source k).real (ball (p (k+N)) (r (k+N)))/ + (hausdorff n X).real (ball (p (k+N)) (r (k+N)))) atTop (𝓝 0) ∧ + Tendsto (fun k => ‖normalizeLocalL2 (hausdorff n X) (ball (p (k+N)) (r (k+N))) + (hX.finiteOnBounded _ isBounded_ball).ne + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball (p (k+N)) (r (k+N))) + (((r (k+N))^2)⁻¹ • (F.datum k-F.replacement k)))‖) atTop (𝓝 0) := by + let _ := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + dsimp only + obtain ⟨σ,hσ,heik,hsource,hmass⟩ := hX.regular_moving_distance_sources hn hK ho p r hp hr hr0 + obtain ⟨B,J,C,hB,hJ,hC,hsolve⟩ := hX.uniform_distance_poisson_replacement hn (neg_nonneg.mpr hK) + let ω := euclideanUnitVolume n + have hω : 0<ω := euclideanUnitVolume_pos n + have hv := hX.regular_moving_volume_limit hn ho p r hp hr hr0 + have ht : Tendsto (fun k => 2*r k) atTop (𝓝 0) := by + simpa only [mul_zero] using hr0.const_mul 2 + have hw := hX.regular_moving_volume_limit hn ho p (fun k => 2*r k) hp + (fun k => mul_pos (by norm_num) (hr k)) ht + have hvr : Tendsto (fun k => (hausdorff n X).real (ball (p k) (r k))/(ω*(r k)^n)) + atTop (𝓝 1) := by + convert hv.div_const ω using 1 + · funext k + ring + · simp only [ω,div_self hω.ne'] + have hwr : Tendsto (fun k => (hausdorff n X).real (ball (p k) (2*r k))/(ω*(2*r k)^n)) + atTop (𝓝 1) := by + convert hw.div_const ω using 1 + · funext k + ring + · simp only [ω,div_self hω.ne'] + have hvsmall : ∀ᶠ k in atTop, + |(hausdorff n X).real (ball (p k) (r k))/(ω*(r k)^n)-1|<1/4 := by + simpa only [Metric.mem_ball,Real.dist_eq] using hvr.eventually (ball_mem_nhds 1 (by norm_num : (0:ℝ)<1/4)) + have hwsmall : ∀ᶠ k in atTop, + |(hausdorff n X).real (ball (p k) (2*r k))/(ω*(2*r k)^n)-1|<1/4 := by + simpa only [Metric.mem_ball,Real.dist_eq] using hwr.eventually (ball_mem_nhds 1 (by norm_num : (0:ℝ)<1/4)) + have hcurv0 : Tendsto (fun k => K*(64*r k)^2) atTop (𝓝 0) := by + simpa only [mul_zero,zero_pow (by norm_num : 2≠0)] using ((hr0.const_mul 64).pow 2).const_mul K + have hc : ∀ᶠ k in atTop, -1 p (k+N)) (fun k => r (k+N)) (fun k => hr (k+N)) := { + source := fun k => σ (k+N) + finite := fun k => hσ (k+N) + cutoff := χ + replacement := f + eikonal := fun k => heik (k+N) + defect := fun k => hsource (k+N) C (χ k) + boundary := hf + laplacian := hlap + height := hheight + energy_error := henergy + density_error := hdensity } + refine ⟨B,J,C,hB,hJ,hC,N,F,hgood,?_,?_⟩ + · exact hmass.comp (tendsto_add_atTop_nat N) + · have hnum : Tendsto (fun k => (σ k).real (ball (p k) (r k))/(r k)^n) atTop (𝓝 0) := by + convert hmass using 1 + funext k + rw [Real.rpow_neg (hr k).le,Real.rpow_natCast,div_eq_inv_mul] + have hquot := hnum.div hv hω.ne' + have heq : (fun k => (σ k).real (ball (p k) (r k))/(hausdorff n X).real (ball (p k) (r k))) =ᶠ[atTop] + fun k => ((σ k).real (ball (p k) (r k))/(r k)^n)/ + ((hausdorff n X).real (ball (p k) (r k))/(r k)^n) := by + exact Eventually.of_forall fun k => by field_simp [(pow_pos (hr k) n).ne'] + have hratio := (hquot.congr' heq.symm).comp (tendsto_add_atTop_nat N) + have hrF : Tendsto (fun k => (F.source k).real (ball (p (k+N)) (r (k+N)))/ + (hausdorff n X).real (ball (p (k+N)) (r (k+N)))) atTop (𝓝 0) := by + simpa only [zero_div,Function.comp_def,F] using hratio + refine ⟨hrF,?_⟩ + exact F.normalized_value_error_tendsto_zero (annularPoincareConstant_pos K n).le + (fun k => (hgood k).2.2.1) + (fun k => hX.annular_dirichlet_poincare hn (p (k+N)) (hr (k+N)) + (hgood k).1 (hgood k).2.2.1 (hgood k).2.2.2) hrF + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NearbyExactFrames.lean b/lean/OAI/Geometry/RCD/Coordinates/NearbyExactFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..dedcd255220b24a7b4959dab08990d06e4689a1d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NearbyExactFrames.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.OverlappingExactFrames +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # Exact frame comparison for nearby radial centers -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The quarter-error volume regime supplies the overlap ratio for two +nearby same-scale exact frames. The bound has no dependence on the scale. -/ +theorem nearby_exact_frames {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p q : X) {s ε : ℝ} (hs : 0 < s) (hε : 0 ≤ ε) (hdist : dist p q ≤ s / 4) + (Np Nq : Euclidean n ≃L[ℝ] Euclidean n) (vp vq : X → Euclidean n) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * ε) ≤ 1 / 3) + (hp : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * s) ε (transformedColumn (hausdorff n X) hX.quadratic u Np) vp) + (hq : FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (2 * s) ε (transformedColumn (hausdorff n X) hX.quadratic u Nq) vq) + (hep : IsExactMeanNormalization (hausdorff n X) hX.quadratic (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p (2 * s)) measurableSet_ball Np) + (heq : IsExactMeanNormalization (hausdorff n X) hX.quadratic (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball q (2 * s)) measurableSet_ball Nq) + (hVp : |(hausdorff n X).real (ball p (2 * s)) / (euclideanUnitVolume n * (2 * s) ^ n) - 1| ≤ 1 / 4) + (hVq : |(hausdorff n X).real (ball q (2 * s)) / (euclideanUnitVolume n * (2 * s) ^ n) - 1| ≤ 1 / 4) + (hVs : |(hausdorff n X).real (ball q s) / (euclideanUnitVolume n * s ^ n) - 1| ≤ 1 / 4) : + ‖Np.symm.toContinuousLinearMap.comp Nq.toContinuousLinearMap‖ ≤ Real.sqrt 2 ∧ + ‖Nq.symm.toContinuousLinearMap.comp Np.toContinuousLinearMap‖ ≤ Real.sqrt 2 := by + let μ := hausdorff n X + let C := (5 / 3 : ℝ) * (2 : ℝ) ^ n + have hC : 0 ≤ C := by dsimp only [C]; positivity + have hω := euclideanUnitVolume_pos n + have hlo := (quarter_volume_bounds hs hω hVs).2.1 + have hvolume (y : X) + (hy : |μ.real (ball y (2 * s)) / (euclideanUnitVolume n * (2 * s) ^ n) - 1| ≤ 1 / 4) : + μ.real (ball y (2 * s)) ≤ C * μ.real (ball q s) := by + have hhi := (quarter_volume_bounds (by positivity : 0 < 2 * s) hω hy).2.2 + have hcomp := mul_le_mul_of_nonneg_left hlo hC + have hid : C * ((3 / 4 : ℝ) * euclideanUnitVolume n * s ^ n) = + (5 / 4 : ℝ) * euclideanUnitVolume n * (2 * s) ^ n := by + rw [mul_pow] + dsimp only [C] + ring + rw [hid] at hcomp + exact hhi.trans hcomp + apply overlapping_exact_frames μ hX.quadratic u p q (2 * s) Np Nq hε hC hsmall vp vq hp hq hep heq + (ball q s) measurableSet_ball + · apply ball_subset_ball' + rw [dist_comm q p] + linarith + · exact ball_subset_ball (by linarith) + · exact ne_of_gt (hX.fullSupport q s hs) + · exact ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + · exact ne_of_gt (hX.fullSupport p (2 * s) (by positivity)) + · exact ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + · exact ne_of_gt (hX.fullSupport q (2 * s) (by positivity)) + · exact ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + · exact hvolume p hVp + · exact hvolume q hVq + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NearbyNormalizedPlan.lean b/lean/OAI/Geometry/RCD/Coordinates/NearbyNormalizedPlan.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b593970d4514dc64fb6030fc96e69d4876bc03f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NearbyNormalizedPlan.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Transport.NearbyEndpointPlan +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Nearby endpoint plans with compression normalized on the working ball -/ + +open Set Filter MeasureTheory Metric +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.nearby_normalized_plan {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hK : K ≤ 0) : + ∃ D : ℝ, 0 < D ∧ ∀ {p x y : X} {r δ : ℝ}, 0 < r → + -1 ≤ K*(16*r)^2 → 0 < δ → δ ≤ 1/2 → + dist x p ≤ r/48 → dist y p ≤ r/48 → + ∃ π : Measure C(Time,X), IsProbabilityMeasure π ∧ + (∀ᵐ γ ∂π, IsGeodesic γ) ∧ + IsOptimalCoupling (π.map (fun γ => γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1))) ∧ + (∀ t : Time, π.map (fun γ => γ t) ≤ + ENNReal.ofReal ((D/δ^n)/(hausdorff n X).real (ball p (4*r))) • hausdorff n X) ∧ + (∀ᵐ γ ∂π, dist (γ 0) x < δ*r/24 ∧ dist (γ 1) y < δ*r/24 ∧ + (∀ t : Time, dist (γ t) p ≤ r/8)) := by + let μ := hausdorff n X + obtain ⟨V,hV,hvol⟩ := hX.rescaled_ball_volume_factor hn (by norm_num : (0:ℝ) ≤ 1) + (by norm_num : (0:ℝ) < 1/96) (by norm_num : (1/96:ℝ) ≤ 1) + have hC : 0 < segmentCost n := by unfold segmentCost; positivity + refine ⟨segmentCost n*V,mul_pos hC (by linarith),?_⟩ + intro p x y r δ hr hcurv hδ hδ1 hx hy + have hR : 0 < r/24 := by positivity + have hc4 : -1 ≤ K*(4*(r/24))^2 := by nlinarith + obtain ⟨π,hπ,hgeo,hopt,hcomp,hends⟩ := hX.nearby_endpoint_plan (p:=p) (x:=x) (y:=y) hn hK hR + (mul_pos hδ hR) (by nlinarith) (by linarith) (by linarith) hc4 + have hm : 0 < μ.real (ball p (r/24)) := ENNReal.toReal_pos + (hX.fullSupport _ _ hR).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hm4 : 0 < μ.real (ball p (4*r)) := ENNReal.toReal_pos + (hX.fullSupport _ _ (by positivity)).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hv : μ.real (ball p (4*r)) ≤ V*μ.real (ball p (r/24)) := by + have hh := hvol p (4*r) (by positivity) (by nlinarith : -1 ≤ K*(4*r)^2) p + (by simpa only [dist_self] using (show 0 ≤ 4*r by positivity)) + simpa only [show (1/96:ℝ)*(4*r)=r/24 by ring] using hh + have hc : segmentCost n*(r/24)^n/(μ.real (ball p (r/24))*(δ*(r/24))^n) ≤ + ((segmentCost n*V)/δ^n)/μ.real (ball p (4*r)) := by + have he : segmentCost n*(r/24)^n/(μ.real (ball p (r/24))*(δ*(r/24))^n)= + (segmentCost n/δ^n)/μ.real (ball p (r/24)) := by + rw [mul_pow] + field_simp [hR.ne',hδ.ne',hm.ne'] + rw [he,div_le_div_iff₀ hm hm4] + have hh := mul_le_mul_of_nonneg_left hv (div_nonneg hC.le (pow_pos hδ n).le) + convert hh using 1 + ring + refine ⟨π,hπ,hgeo,hopt,?_,?_⟩ + · intro t + apply (hcomp t).trans + apply Measure.le_iff.mpr + intro S _hS + simpa only [Measure.smul_apply,smul_eq_mul] using + mul_le_mul' (ENNReal.ofReal_le_ofReal hc) (le_refl (μ S)) + · filter_upwards [hends] with γ he + simpa only [show δ*(r/24)=δ*r/24 by ring,show 3*(r/24)=r/8 by ring] using he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NonlinearIteration.lean b/lean/OAI/Geometry/RCD/Coordinates/NonlinearIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec2a7b269528d5c5628febd3e7a2185d61e984cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NonlinearIteration.lean @@ -0,0 +1,90 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Analysis.SpecificLimits.Basic + +namespace OAI + +/-! # The numerical decay step in the harmonic level-set iteration -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- A superlinear recurrence stays below a geometric barrier whenever +the two scalar barrier inequalities hold. -/ +theorem superlinear_geometric_barrier {Y : ℕ → ℝ} {C b ε A q : ℝ} + (hY : ∀ i, 0 ≤ Y i) (hC : 0 ≤ C) (hb : 0 ≤ b) (hε : 0 < ε) + (hA : 0 < A) (hq : 0 < q) (hstart : Y 0 ≤ A) + (hAq : C*A^ε ≤ q) (hbq : b*q^ε ≤ 1) + (hrec : ∀ i, Y (i+1) ≤ C*b^i*(Y i)^(1+ε)) : + ∀ i, Y i ≤ A*q^i := by + intro i + induction i with + | zero => simpa only [pow_zero,mul_one] using hstart + | succ i hi => + calc + Y (i+1) ≤ C*b^i*(Y i)^(1+ε) := hrec i + _ ≤ C*b^i*(A*q^i)^(1+ε) := mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow (hY i) hi (by linarith)) (mul_nonneg hC (pow_nonneg hb _)) + _ = A*(C*A^ε)*q^i*(b*q^ε)^i := by + rw [Real.rpow_add (mul_pos hA (pow_pos hq _)),Real.rpow_one, + Real.mul_rpow hA.le (pow_nonneg hq.le _), + ← Real.rpow_pow_comm hq.le ε i,mul_pow] + ring + _ ≤ A*q*q^i*1 := by + apply mul_le_mul + · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hAq hA.le) + (pow_nonneg hq.le _) + · exact pow_le_one₀ (mul_nonneg hb (Real.rpow_nonneg hq.le _)) hbq + · positivity + · positivity + _ = A*q^(i+1) := by rw [pow_succ]; ring + +/-- For each superlinear recurrence there is a positive starting threshold +which forces convergence to zero. -/ +theorem exists_superlinear_decay_threshold {C b ε : ℝ} + (hC : 0 < C) (hb : 0 < b) (hε : 0 < ε) : + ∃ A : ℝ, 0 < A ∧ ∀ Y : ℕ → ℝ, + (∀ i, 0 ≤ Y i) → Y 0 ≤ A → + (∀ i, Y (i+1) ≤ C*b^i*(Y i)^(1+ε)) → Tendsto Y atTop (𝓝 0) := by + let t := 1/(2*b+2) + have ht : 0 < t := by dsimp only [t]; positivity + have ht1 : t < 1 := (div_lt_one (by positivity)).mpr (by linarith) + let q := t^(1/ε) + have hq : 0 < q := Real.rpow_pos_of_pos ht _ + have hq1 : q < 1 := Real.rpow_lt_one ht.le ht1 (by positivity) + have hqε : q^ε = t := by + rw [← Real.rpow_mul ht.le] + have he : (1/ε)*ε = 1 := by field_simp + rw [he,Real.rpow_one] + have hbq : b*q^ε ≤ 1 := by + rw [hqε] + dsimp only [t] + rw [mul_one_div] + exact (div_le_one (by positivity)).mpr (by linarith) + let A := (q/(C+1))^(1/ε) + have hA : 0 < A := Real.rpow_pos_of_pos (by positivity) _ + have hAε : A^ε = q/(C+1) := by + rw [← Real.rpow_mul (by positivity : 0 ≤ q/(C+1))] + have he : (1/ε)*ε = 1 := by field_simp + rw [he,Real.rpow_one] + have hAq : C*A^ε ≤ q := by + rw [hAε] + calc + C*(q/(C+1)) = (C/(C+1))*q := by ring + _ ≤ 1*q := mul_le_mul_of_nonneg_right + ((div_le_one (by positivity)).mpr (by linarith)) hq.le + _ = q := one_mul q + refine ⟨A,hA,?_⟩ + intro Y hY hstart hrec + have hbound := superlinear_geometric_barrier hY hC.le hb.le hε hA hq hstart hAq hbq hrec + apply squeeze_zero hY hbound + simpa only [mul_zero] using + (tendsto_pow_atTop_nhds_zero_of_lt_one hq.le hq1).const_mul A + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizationComposition.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizationComposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a15c3ed7b0285b98875d51108cc7705039c5901 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizationComposition.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Coordinates.NormalizationRebase + +namespace OAI + +/-! # Composing exact coordinate normalizations -/ + +open Set MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +theorem transformedColumn_comp {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A B : Euclidean n ≃L[ℝ] Euclidean n) : + transformedColumn μ hQ (transformedColumn μ hQ u A) B = + transformedColumn μ hQ u (B.trans A) := by + funext i + simp only [transformedColumn, sobolevColumnMap_transformed, + ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.trans_apply] + +theorem exact_mean_normalization_comp {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A B : Euclidean n ≃L[ℝ] Euclidean n) (s : Set X) (hs : MeasurableSet s) + (hB : IsExactMeanNormalization μ hQ + (sobolevColumnMap μ hQ (transformedColumn μ hQ u A)) s hs B) : + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) s hs (B.trans A) := by + change sobolevMeanGram μ hQ + ((sobolevColumnMap μ hQ u).comp (B.trans A : Euclidean n →L[ℝ] Euclidean n)) s hs = _ + change sobolevMeanGram μ hQ + ((sobolevColumnMap μ hQ (transformedColumn μ hQ u A)).comp + (B : Euclidean n →L[ℝ] Euclidean n)) s hs = _ at hB + rw [sobolevColumnMap_transformed] at hB + exact hB + +omit [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] in +theorem normalization_values_comp {n : ℕ} (A B : Euclidean n ≃L[ℝ] Euclidean n) + (v : X → Euclidean n) : + (fun x => (B : Euclidean n →L[ℝ] Euclidean n).adjoint + ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x))) = + (fun x => (B.trans A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) := by + have he : (B.trans A : Euclidean n →L[ℝ] Euclidean n) = + (A : Euclidean n →L[ℝ] Euclidean n).comp (B : Euclidean n →L[ℝ] Euclidean n) := rfl + rw [he, ContinuousLinearMap.adjoint_comp] + rfl + +omit [ProperSpace X] in +theorem firstOrderSplitting_comp {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A B : Euclidean n ≃L[ℝ] Euclidean n) (v : X → Euclidean n) (p : X) (r ε : ℝ) + (h : FirstOrderSplittingOn μ hQ p r ε + (transformedColumn μ hQ (transformedColumn μ hQ u A) B) + (fun x => (B : Euclidean n →L[ℝ] Euclidean n).adjoint + ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)))) : + FirstOrderSplittingOn μ hQ p r ε (transformedColumn μ hQ u (B.trans A)) + (fun x => (B.trans A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) := by + rwa [transformedColumn_comp, normalization_values_comp] at h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizationCumulative.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizationCumulative.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5a9c93b5337de643460cb55de7f779840923abd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizationCumulative.lean @@ -0,0 +1,147 @@ +import OAI.Geometry.RCD.Heat.HeatCumulative + +namespace OAI + +/-! # Finite families of changing mean normalizations -/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Summing the proved inverse-normalization estimate over at most `J` +centers per scale preserves its weighted heat total. -/ +theorem inverse_normalization_errors_sum_le + (Q : ℕ → E ≃L[ℝ] E) (R : ℕ → ι → E ≃L[ℝ] E) + (F : ℕ → E →L[ℝ] E) (s : ℕ → Finset ι) + (hQ : ∀ i, (Q i : E →L[ℝ] E).IsPositive) + (hR : ∀ i y, y ∈ s i → (R i y : E →L[ℝ] E).IsPositive) + (hF : ∀ i, (F i).IsPositive) {c C : ℝ} (hc : 0 < c) (hC : 0 ≤ C) + (hcompare : ∀ i y, y ∈ s i → ∀ v, c * ⟪v, Q i v⟫_ℝ ≤ ⟪v, R i y v⟫_ℝ) + (hbilinear : ∀ i y, y ∈ s i → ∀ u v, + ⟪v, ((R i y : E →L[ℝ] E) - (Q i : E →L[ℝ] E)) u⟫_ℝ ^ 2 ≤ + (C * ⟪u, F i u⟫_ℝ) * ⟪v, Q i v⟫_ℝ) + (J : ℕ) (hcard : ∀ i, (s i).card ≤ J) (xi : E) (k : ℕ) : + (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪(R i y).symm xi - (Q i).symm xi, + Q i ((R i y).symm xi - (Q i).symm xi)⟫_ℝ) ≤ + (J : ℝ) * (C / c ^ 2) * + ∑ i ∈ Finset.range k, ⟪(Q i).symm xi, F i ((Q i).symm xi)⟫_ℝ := by + have hscale : 0 ≤ C / c ^ 2 := div_nonneg hC (sq_nonneg c) + calc + _ ≤ ∑ i ∈ Finset.range k, (J : ℝ) * (C / c ^ 2) * + ⟪(Q i).symm xi, F i ((Q i).symm xi)⟫_ℝ := by + apply Finset.sum_le_sum + intro i _ + calc + _ ≤ ∑ y ∈ s i, (C / c ^ 2) * ⟪(Q i).symm xi, F i ((Q i).symm xi)⟫_ℝ := + Finset.sum_le_sum fun y hy => inverse_normalization_error_le + (Q i) (R i y) (hQ i) (hR i y hy) (F i) (hF i) hc hC + (hcompare i y hy) (hbilinear i y hy) xi + _ = ((s i).card : ℝ) * ((C / c ^ 2) * ⟪(Q i).symm xi, F i ((Q i).symm xi)⟫_ℝ) := by + rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ (J : ℝ) * ((C / c ^ 2) * ⟪(Q i).symm xi, F i ((Q i).symm xi)⟫_ℝ) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hcard i) + (mul_nonneg hscale ((hF i).inner_nonneg_right _)) + _ = _ := by ring + _ = _ := by rw [Finset.mul_sum] + +/-- A small positive mass form charges a normalization error by at most +`epsilon` times its energy in the reference metric. -/ +theorem normalization_mass_errors_sum_le + (Q : ℕ → E →L[ℝ] E) (C : ℕ → ι → E →L[ℝ] E) + (s : ℕ → Finset ι) (e : ℕ → ι → E) {epsilon : ℝ} + (hsmall : ∀ i y, y ∈ s i → ∀ v, ⟪v, C i y v⟫_ℝ ≤ epsilon * ⟪v, Q i v⟫_ℝ) + (k : ℕ) : + (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪e i y, C i y (e i y)⟫_ℝ) ≤ + epsilon * ∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪e i y, Q i (e i y)⟫_ℝ := by + calc + _ ≤ ∑ i ∈ Finset.range k, ∑ y ∈ s i, epsilon * ⟪e i y, Q i (e i y)⟫_ℝ := + Finset.sum_le_sum fun i _ => Finset.sum_le_sum fun y hy => hsmall i y hy (e i y) + _ = _ := by simp only [Finset.mul_sum] + +/-- Changing inverse normalization preserves the small pointwise mass bound. -/ +theorem inverse_normalized_mass_le (Q R : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) (hR : (R : E →L[ℝ] E).IsPositive) + (D : E →L[ℝ] E) {c epsilon : ℝ} (hc : 0 < c) (hepsilon : 0 ≤ epsilon) + (hcompare : ∀ v, c * ⟪v, Q v⟫_ℝ ≤ ⟪v, R v⟫_ℝ) + (hsmall : ∀ v, ⟪v, D v⟫_ℝ ≤ epsilon * ⟪v, Q v⟫_ℝ) (xi : E) : + ⟪R.symm xi, D (R.symm xi)⟫_ℝ ≤ epsilon / c ^ 2 * ⟪xi, Q.symm xi⟫_ℝ := by + calc + _ ≤ epsilon * ⟪R.symm xi, Q (R.symm xi)⟫_ℝ := hsmall _ + _ ≤ epsilon * (⟪xi, Q.symm xi⟫_ℝ / c ^ 2) := + mul_le_mul_of_nonneg_left (relative_inverse_bounds Q R hQ hR hc hcompare xi).2 hepsilon + _ = _ := by ring + +/-- The finite-family part of the cumulative comparison. Its inputs are +weighted totals and the central estimate proved from the heat decrements; +all changes of normalization and the reverse covering argument are proved +here. The vectors `z i y` may be the actual local inverse images. -/ +theorem local_mass_cumulative_comparison + (N : ℕ → E →L[ℝ] E) (C : ℕ → ι → E →L[ℝ] E) + (s : ℕ → Finset ι) (theta : ℕ → ι → ℝ) + (a : ℕ → E) (z : ℕ → ι → E) + (hC : ∀ i y, y ∈ s i → (C i y).IsPositive) + (htheta : ∀ i y, y ∈ s i → 0 ≤ theta i y) + (hcover : ∀ i, ∃ y ∈ s i, theta i y = 1 ∧ + ∀ v, ⟪v, N i v⟫_ℝ ≤ ⟪v, C i y v⟫_ℝ) + {H t U V K epsilon : ℝ} (hH : 0 ≤ H) (hK : 0 ≤ K) (k : ℕ) + (hupper : (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪a i, C i y (a i)⟫_ℝ) ≤ U * H) + (herror : (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z i y - a i, C i y (z i y - a i)⟫_ℝ) ≤ V * epsilon * H) + (hcentral : H ≤ K * (t + ∑ i ∈ Finset.range k, ⟪a i, N i (a i)⟫_ℝ)) + (habsorb : 2 * K * V * epsilon ≤ 1 / 2) : + (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪z i y, C i y (z i y)⟫_ℝ) ≤ + 2 * (U + V * epsilon) * H ∧ + H ≤ 2 * K * t + 4 * K * + (∑ i ∈ Finset.range k, ∑ y ∈ s i, theta i y * ⟪z i y, C i y (z i y)⟫_ℝ) := by + classical + let err := ∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z i y - a i, C i y (z i y - a i)⟫_ℝ + let weighted := ∑ i ∈ Finset.range k, ∑ y ∈ s i, + theta i y * ⟪z i y, C i y (z i y)⟫_ℝ + have herr : err ≤ V * epsilon * H := herror + constructor + · have hp := Finset.sum_le_sum (fun i (_ : i ∈ Finset.range k) => + Finset.sum_le_sum (fun y (hy : y ∈ s i) => + positive_form_add_le_two (hC i y hy) (a i) (z i y - a i))) + simp only [add_sub_cancel, Finset.sum_add_distrib, ← Finset.mul_sum] at hp + have hu := hupper + change _ ≤ 2 * _ + 2 * err at hp + nlinarith + · have hpoint (i : ℕ) : ⟪a i, N i (a i)⟫_ℝ ≤ + 2 * (∑ y ∈ s i, theta i y * ⟪z i y, C i y (z i y)⟫_ℝ) + + 2 * (∑ y ∈ s i, ⟪z i y - a i, C i y (z i y - a i)⟫_ℝ) := by + obtain ⟨y, hy, hweight, hdom⟩ := hcover i + have hmain : ⟪z i y, C i y (z i y)⟫_ℝ ≤ + ∑ j ∈ s i, theta i j * ⟪z i j, C i j (z i j)⟫_ℝ := by + have hh := Finset.single_le_sum (fun j (hj : j ∈ s i) => + mul_nonneg (htheta i j hj) ((hC i j hj).inner_nonneg_right (z i j))) hy + simpa only [hweight, one_mul] using hh + have he : ⟪z i y - a i, C i y (z i y - a i)⟫_ℝ ≤ + ∑ j ∈ s i, ⟪z i j - a i, C i j (z i j - a i)⟫_ℝ := + Finset.single_le_sum (fun j (hj : j ∈ s i) => + (hC i j hj).inner_nonneg_right (z i j - a i)) hy + have htwo := positive_form_add_le_two (hC i y hy) (z i y) (-(z i y - a i)) + have heq : z i y + -(z i y - a i) = a i := by abel + rw [heq] at htwo + simp only [map_neg, inner_neg_left, inner_neg_right, neg_neg] at htwo + have hd := hdom (a i) + linarith + have hs := Finset.sum_le_sum (fun i (_ : i ∈ Finset.range k) => hpoint i) + simp only [Finset.sum_add_distrib, ← Finset.mul_sum] at hs + change _ ≤ 2 * weighted + 2 * err at hs + have hc := hcentral + have hns := mul_le_mul_of_nonneg_left hs hK + have he := mul_le_mul_of_nonneg_left herr (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) hK) + have ha := mul_le_mul_of_nonneg_right habsorb hH + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizationRebase.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizationRebase.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5576127e440b580ee443c87330da56854d06f35 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizationRebase.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Coordinates.FiniteNormalizerGrowth + +namespace OAI + +/-! # Rebasing all exact normalizers in one working-scale frame -/ + +open Set MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] [CompleteSpace E] in +/-- Changing the original working frame does not change any of the +subsequently normalized scalar functions. -/ +theorem normalized_column_rebase (U : E →L[ℝ] SobolevSpace μ hQ) + (T S : E ≃L[ℝ] E) : + (U.comp (T : E →L[ℝ] E)).comp (S.trans T.symm : E →L[ℝ] E) = + U.comp (S : E →L[ℝ] E) := by + ext v + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.trans_apply, ContinuousLinearEquiv.apply_symm_apply] + +/-- Exact mean normalization transports through a working-frame change. -/ +theorem exact_mean_normalization_rebase (U : E →L[ℝ] SobolevSpace μ hQ) + (T S : E ≃L[ℝ] E) (s : Set X) (hs : MeasurableSet s) + (hS : IsExactMeanNormalization μ hQ U s hs S) : + IsExactMeanNormalization μ hQ (U.comp (T : E →L[ℝ] E)) s hs (S.trans T.symm) := by + change sobolevMeanGram μ hQ ((U.comp (T : E →L[ℝ] E)).comp + (S.trans T.symm : E →L[ℝ] E)) s hs = ContinuousLinearMap.id ℝ E + rw [normalized_column_rebase] + exact hS + +omit [BorelSpace X] [ProperSpace X] [CompleteSpace E] in +/-- The operation agrees componentwise with the actual transformed columns. -/ +theorem transformedColumn_rebase {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (T S : Euclidean n ≃L[ℝ] Euclidean n) : + transformedColumn μ hQ (transformedColumn μ hQ u T) (S.trans T.symm) = + transformedColumn μ hQ u S := by + funext i + simp only [transformedColumn, sobolevColumnMap_transformed, + ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.trans_apply, ContinuousLinearEquiv.apply_symm_apply] + +omit [ProperSpace X] in +/-- First-order splitting bounds are exactly preserved in every rebased +normalizer, including the same scalar representatives. -/ +theorem firstOrderSplitting_rebase {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (T S : Euclidean n ≃L[ℝ] Euclidean n) (p : X) (r ε : ℝ) (w : X → Euclidean n) + (h : FirstOrderSplittingOn μ hQ p r ε (transformedColumn μ hQ u S) w) : + FirstOrderSplittingOn μ hQ p r ε + (transformedColumn μ hQ (transformedColumn μ hQ u T) (S.trans T.symm)) w := by + rw [transformedColumn_rebase] + exact h + +/-- The scalar regularizer has a uniform bound over the complete finite +range whenever its outer dyadic radius lies inside the working radius. -/ +theorem dyadic_regularizer_le_working_radius {r R lambda : ℝ} (hr : 0 ≤ r) + (k : ℕ) (hR : (2 : ℝ) ^ k * r ≤ R) : + |lambda * r ^ 2| * (2 : ℝ) ^ k ≤ |lambda| * R ^ 2 := by + have hp : (1 : ℝ) ≤ 2 ^ k := one_le_pow₀ (by norm_num) + have hrR : r ≤ R := by nlinarith + have hRR : 0 ≤ R := hr.trans hrR + have hprod := mul_le_mul hR hrR hr hRR + rw [abs_mul, abs_of_nonneg (sq_nonneg r)] + nlinarith [mul_le_mul_of_nonneg_left hprod (abs_nonneg lambda)] + +/-- Keeping the dyadic room in the estimate makes the regularizer vanish +at fine scales even when the working radius and regularizer are fixed. -/ +theorem dyadic_regularizer_le_geometric {r R lambda : ℝ} (hr : 0 ≤ r) + (k : ℕ) (hR : (2 : ℝ) ^ k * r ≤ R) : + |lambda * r ^ 2| * (2 : ℝ) ^ k ≤ + (|lambda| * R ^ 2) * (1 / 2 : ℝ) ^ k := by + have hp : 0 < (2 : ℝ) ^ k := by positivity + have hR0 : 0 ≤ R := (mul_nonneg hp.le hr).trans hR + have hs : ((2 : ℝ) ^ k * r) ^ 2 ≤ R ^ 2 := + (sq_le_sq₀ (mul_nonneg hp.le hr) hR0).mpr hR + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg lambda) + have hd := (div_le_div_iff_of_pos_right hp).mpr hm + calc + _ = |lambda| * ((2 : ℝ) ^ k * r) ^ 2 / (2 : ℝ) ^ k := by + rw [abs_mul, abs_of_nonneg (sq_nonneg r)] + field_simp + _ ≤ |lambda| * R ^ 2 / (2 : ℝ) ^ k := hd + _ = _ := by rw [div_pow]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedBochnerMass.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedBochnerMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9ce9749891289048b38980956b2003c92f5bfab --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedBochnerMass.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Sobolev.GoodLaplacianCutoff + +namespace OAI + +/-! +# Scaled Bochner mass from a first-order splitting map + +This connects the actual averaged component errors in the splitting +hypothesis to the dimensionless full mass used in the metric iteration. +-/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- Restricting the averaged error on the large harmonic ball controls +the unnormalized error on every closed interior ball. -/ +theorem FirstOrderSplittingOn.closed_error_le {n : ℕ} {p : X} {r ε R : ℝ} + {u : Fin n → SobolevSpace μ hQ} {w : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ p r ε u w) (hR : R < r) + (hvol : 0 < μ.real (ball p r)) (hfinite : μ (ball p r) ≠ ∞) (i j : Fin n) : + (∫ x in closedBall p R, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ) ≤ + ε * μ.real (ball p r) := by + have havg : (∫ x in ball p r, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ) ≤ + ε * μ.real (ball p r) := by + apply (div_le_iff₀ hvol).mp + simpa only [div_eq_inv_mul] using h.gram i j + have hsub : closedBall p R ⊆ ball p r := fun x hx => lt_of_le_of_lt hx hR + have hi : IntegrableOn (fun x => + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)|) (ball p r) μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const hfinite)).abs + exact (setIntegral_mono_set hi (Filter.Eventually.of_forall fun x => abs_nonneg _) + (Filter.Eventually.of_forall hsub)).trans havg + +/-- The normalized full Bochner mass is small when the splitting error +and the rescaled curvature are small. -/ +theorem splitting_normalized_bochner_mass_le [IsFiniteMeasureOnCompacts μ] + {n : ℕ} {p : X} {r ε C κ : ℝ} {L : ℝ≥0} + {u : Fin n → SobolevSpace μ hQ} {w : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ p (8 * r) ε u w) + (hr : 0 < r) (hε : 0 ≤ ε) (hC : 0 ≤ C) (hκ : 0 ≤ κ) + (hvol : 0 < μ.real (ball p (8 * r))) + (χ : GoodLaplacianCutoff μ hQ p (r / 2) C) + (M : PositiveBilinearMeasure X (Euclidean n)) + (G : ∀ v, LocalHarmonicEnergy μ hQ (sobolevColumnMap μ hQ u) M κ p r L v) + (v : Euclidean n) : + (r ^ 2 / μ.real (ball p (8 * r))) * ⟪v, M.massOperator (ball p (r / 2)) v⟫_ℝ ≤ + (2 * C * (n : ℝ) ^ 2 * ε + κ * r ^ 2 * ((n : ℝ) ^ 2 * ε + 1)) * ‖v‖ ^ 2 := by + let V := μ.real (ball p (8 * r)) + have hfinite' : μ (ball p (8 * r)) ≠ ∞ := + ne_of_lt ((measure_mono ball_subset_closedBall).trans_lt + (isCompact_closedBall p (8 * r)).measure_lt_top) + have herr : ∀ i j : Fin n, ∫ x in closedBall p (2 * (r / 2)), + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ ε * V := by + intro i j + exact h.closed_error_le μ hQ (by linarith) hvol hfinite' i j + have hb := χ.harmonic_mass_le μ hQ (half_pos hr) (by linarith) hC hκ u M G + (mul_nonneg hε hvol.le) herr v + have hrad : 2 * (r / 2) = r := by ring + rw [hrad] at hb + have hsub : closedBall p r ⊆ ball p (8 * r) := by + intro x hx + change dist x p < 8 * r + have hd : dist x p ≤ r := hx + linarith + have hW : μ.real (closedBall p r) ≤ V := measureReal_mono hsub hfinite' + have hcoef : (C / (r / 2) ^ 2) * ((n : ℝ) ^ 2 * (ε * V)) / 2 + + κ * ((n : ℝ) ^ 2 * (ε * V) + μ.real (closedBall p r)) ≤ + (C / (r / 2) ^ 2) * ((n : ℝ) ^ 2 * (ε * V)) / 2 + + κ * ((n : ℝ) ^ 2 * (ε * V) + V) := by + nlinarith [mul_le_mul_of_nonneg_left hW hκ] + have hB := hb.trans (mul_le_mul_of_nonneg_right hcoef (sq_nonneg ‖v‖)) + have hscale := mul_le_mul_of_nonneg_left hB (div_nonneg (sq_nonneg r) hvol.le) + refine hscale.trans_eq ?_ + change (r ^ 2 / V) * (_ * ‖v‖ ^ 2) = _ + have hV : V ≠ 0 := ne_of_gt hvol + field_simp [hV, ne_of_gt hr] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedCoordinateFrames.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedCoordinateFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c81f37c129894f78679d911b8f1902101f600ce --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedCoordinateFrames.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Coordinates.GramNormalization +import Mathlib.Analysis.InnerProductSpace.Adjoint + +namespace OAI + +/-! # Adjoint coordinate frames from exact mean normalization -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- The pointwise coordinate change associated to a coefficient frame. -/ +def coordinateFrame (A : E ≃L[ℝ] E) : E ≃L[ℝ] E := + ContinuousLinearEquiv.equivOfInverse' A.toContinuousLinearMap.adjoint + A.symm.toContinuousLinearMap.adjoint + (by rw [← ContinuousLinearMap.adjoint_comp]; simp [ContinuousLinearMap.adjoint_id]) + (by rw [← ContinuousLinearMap.adjoint_comp]; simp [ContinuousLinearMap.adjoint_id]) + +@[simp] theorem coordinateFrame_apply (A : E ≃L[ℝ] E) (v : E) : + coordinateFrame A v = A.toContinuousLinearMap.adjoint v := rfl + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) (U : E →L[ℝ] SobolevSpace μ hQ) + +/-- A relative mean bound controls the adjoint coordinate frames without +an absolute lower eigenvalue assumption. -/ +theorem coordinateFrame_le_of_mean_comparison + (s t : Set X) (hs : MeasurableSet s) (ht : MeasurableSet t) + (A B : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) + (hB : IsExactMeanNormalization μ hQ U t ht B) + (hcompare : ∀ v, (1 / 4 : ℝ) * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ ≤ + ⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ) (w : E) : + ‖coordinateFrame B w‖ ≤ 2 * ‖coordinateFrame A w‖ := by + let T : E →L[ℝ] E := A.symm.toContinuousLinearMap.comp B.toContinuousLinearMap + have hT : ‖T‖ ≤ 2 := by + apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num) + intro v + have h := hcompare (B v) + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA, + meanGram_energy_of_exact_normalization μ hQ U t ht B hB, + B.symm_apply_apply] at h + change ‖A.symm (B v)‖ ≤ 2 * ‖v‖ + nlinarith only [h, norm_nonneg (A.symm (B v)), norm_nonneg v, + sq_nonneg (‖A.symm (B v)‖ - 2 * ‖v‖)] + have hid : T.adjoint.comp A.toContinuousLinearMap.adjoint = B.toContinuousLinearMap.adjoint := by + rw [← ContinuousLinearMap.adjoint_comp] + congr 1 + ext v + simp [T] + change ‖B.toContinuousLinearMap.adjoint w‖ ≤ 2 * ‖A.toContinuousLinearMap.adjoint w‖ + rw [← hid, ContinuousLinearMap.comp_apply] + exact (T.adjoint.le_opNorm _).trans + (mul_le_mul_of_nonneg_right (by simpa using hT) (norm_nonneg _)) + +/-- A uniform upper bound for raw mean energy gives a uniform lower bound +for every exact adjoint coordinate frame. -/ +theorem norm_le_coordinateFrame_of_mean_upper + (s : Set X) (hs : MeasurableSet s) (A : E ≃L[ℝ] E) + (hA : IsExactMeanNormalization μ hQ U s hs A) + {C : ℝ} (hC : 0 ≤ C) + (hupper : ∀ v, ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ ≤ C ^ 2 * ‖v‖ ^ 2) + (w : E) : ‖w‖ ≤ C * ‖coordinateFrame A w‖ := by + have hn : ‖A.symm.toContinuousLinearMap‖ ≤ C := by + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro v + have h := hupper v + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] at h + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hC (norm_nonneg _))).mp + (by simpa only [mul_pow, ContinuousLinearEquiv.coe_coe] using h) + have hid : A.symm.toContinuousLinearMap.adjoint.comp A.toContinuousLinearMap.adjoint = + ContinuousLinearMap.id ℝ E := by + rw [← ContinuousLinearMap.adjoint_comp] + simp [ContinuousLinearMap.adjoint_id] + have h := A.symm.toContinuousLinearMap.adjoint.le_opNorm (coordinateFrame A w) + have hcancel : A.symm.toContinuousLinearMap.adjoint (coordinateFrame A w) = w := by + simpa only [coordinateFrame_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.id_apply] using congrArg (fun L : E →L[ℝ] E => L w) hid + rw [hcancel] at h + exact h.trans (mul_le_mul_of_nonneg_right (by simpa using hn) (norm_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedCutoffDifference.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedCutoffDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..38e65aad49111680cb397e28afe78e63ad0f870b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedCutoffDifference.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Sobolev.CutoffDifferenceEnergy + +namespace OAI + +/-! # The exact cutoff comparison in normalized physical units -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem normalized_cutoff_difference_energy (w q η : SobolevSpace μ hQ) + {v : X → ℝ} {L B A : ℝ≥0} (hv : LipschitzWith L v) + (hs : HasCompactSupport v) (hb : ∀ x, |v x|≤B) (hn : ∀ x, 0≤v x) + (hrep : SobolevSpace.toLp μ hQ η=ᵐ[μ] v) + (hgrad : ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ η x≤A) + {Ω : Set X} (hsupp : tsupport v⊆Ω) {a r : ℝ} (hr : 0 hx (hsupp h)) + have hres (F : X → ℝ) : (∫ x, v x*F x ∂μ)=∫ x in Ω, v x*F x ∂μ := by + symm + exact setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx => by rw [hz x hx,zero_mul]) + have hres2 (F : X → ℝ) : (∫ x, (v x)^2*F x ∂μ)=∫ x in Ω, (v x)^2*F x ∂μ := by + symm + exact setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx => by rw [hz x hx,zero_pow (by decide : 2≠0),zero_mul]) + have hid := cutoff_difference_energy μ hQ w q η hv hs hb hn hrep hgrad hsupp hw + rw [hres2,hres2,hres2] at hid + have hc : (∫ x, v x*SobolevSpace.toLp μ hQ (w-q) x*localGamma μ hQ w η x ∂μ)= + ∫ x in Ω, v x*SobolevSpace.toLp μ hQ (w-q) x*localGamma μ hQ w η x ∂μ := by + simpa only [mul_assoc] using hres (fun x => SobolevSpace.toLp μ hQ (w-q) x*localGamma μ hQ w η x) + rw [hc] at hid + have he := congrArg (fun y : ℝ => r^2*(μ.real Ω)⁻¹*y) hid + convert he using 1 + field_simp [hr.ne',hmass.ne'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedDensityLaw.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDensityLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6ad74670d42c49f8ecede5e117d3ff25333869c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDensityLaw.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedProbabilityLaw +import OAI.Analysis.RCDHeat.ProbabilityCutoff + +namespace OAI + +/-! # Exact probability laws from nonnegative densities + +The normalizing integral is retained explicitly, including for measurable +pullbacks to the original metric space. +-/ + +open Set MeasureTheory Filter +open scoped ENNReal Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +def normalizedDensityLaw (μ : Measure X) {f : X → ℝ} + (hi : Integrable f μ) (hn : ∀ x, 0≤f x) (hp : 0<∫ x, f x ∂μ) : ProbabilityMeasure X := by + refine ⟨μ.withDensity (fun x => ENNReal.ofReal ((∫ y, f y ∂μ)⁻¹*f x)),?_⟩ + apply realDensity_probability μ (hi.const_mul _) + · exact Eventually.of_forall fun x => mul_nonneg (inv_nonneg.mpr hp.le) (hn x) + · rw [integral_const_mul,inv_mul_cancel₀ hp.ne'] + +theorem normalizedDensityLaw_integral (μ : Measure X) {f : X → ℝ} (hf : Measurable f) + (hi : Integrable f μ) (hn : ∀ x, 0≤f x) (hp : 0<∫ x, f x ∂μ) (g : X → ℝ) : + (∫ x, g x ∂(normalizedDensityLaw μ hi hn hp : Measure X))= + (∫ x, f x ∂μ)⁻¹*(∫ x, f x*g x ∂μ) := by + change (∫ x, g x ∂μ.withDensity (fun x => ENNReal.ofReal ((∫ y, f y ∂μ)⁻¹*f x)))=_ + rw [integral_withDensity_eq_integral_toReal_smul (hf.const_mul _).ennreal_ofReal + (Eventually.of_forall fun _ => ENNReal.ofReal_lt_top)] + simp_rw [ENNReal.toReal_ofReal (mul_nonneg (inv_nonneg.mpr hp.le) (hn _)), + smul_eq_mul,mul_assoc] + exact integral_const_mul _ _ + +theorem normalizedDensityLaw_le (μ : Measure X) {f : X → ℝ} + (hi : Integrable f μ) (hn : ∀ x, 0≤f x) (hp : 0<∫ x, f x ∂μ) + {B : ℝ} (hB : ∀ x, f x≤B) : + (normalizedDensityLaw μ hi hn hp : Measure X)≤ + ENNReal.ofReal ((∫ x, f x ∂μ)⁻¹*B) • μ := by + change μ.withDensity _≤_ + rw [← withDensity_const] + apply withDensity_mono + exact Eventually.of_forall fun x => ENNReal.ofReal_le_ofReal + (mul_le_mul_of_nonneg_left (hB x) (inv_nonneg.mpr hp.le)) + +theorem normalizedDensityLaw_tendsto {Y : Type*} [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + (μs : ℕ → ProbabilityMeasure Y) (μ : ProbabilityMeasure Y) + (hμ : Tendsto μs atTop (𝓝 μ)) (f : Y →ᵇ ℝ) (hn : ∀ y, 0≤f y) + (hpos : 0<∫ y, f y ∂(μ : Measure Y)) + (hposs : ∀ k, 0<∫ y, f y ∂(μs k : Measure Y)) : + Tendsto (fun k => normalizedDensityLaw (μs k : Measure Y) + (f.integrable _) hn (hposs k)) atTop + (𝓝 (normalizedDensityLaw (μ : Measure Y) (f.integrable _) hn hpos)) := by + apply ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mpr + intro g + simp_rw [normalizedDensityLaw_integral _ f.continuous.measurable] + have ha := ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mp hμ f + have hb := ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mp hμ (f*g) + exact ha.inv₀ hpos.ne' |>.mul hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirectionError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirectionError.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca37e8a4bb3c491f2854ae7c7660668adc707040 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirectionError.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.RCD.Coordinates.DyadicMeanControl +import OAI.Geometry.RCD.Harmonic.GramDirectionalError + +namespace OAI + +/-! # Directional Gram errors after changing the exact normalizing frame -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [MetricSpace X] [BorelSpace X] [ProperSpace X] in +/-- Shifting the constant in an L1 error costs the measure times the shift. -/ +theorem integral_abs_sub_const_le {f : X → ℝ} {s : Set X} + (hf : IntegrableOn f s μ) (hs : μ s ≠ ∞) (a b : ℝ) : + (∫ x in s, |f x - b| ∂μ) ≤ + (∫ x in s, |f x - a| ∂μ) + μ.real s * |a - b| := by + have hc (c : ℝ) : IntegrableOn (fun _ : X => c) s μ := integrableOn_const hs + have hb := integral_mono_ae (hf.sub (hc b)).abs + ((hf.sub (hc a)).abs.add (hc |a - b|)) + (Filter.Eventually.of_forall fun x => abs_sub_le (f x) a b) + have he := integral_add (hf.sub (hc a)).abs (hc |a - b|) + simp only [Pi.sub_apply] at he + simp only [Pi.add_apply, Pi.sub_apply] at hb + rw [he] at hb + simpa only [integral_const, Measure.real, Measure.restrict_apply_univ, smul_eq_mul] using hb + +/-- Express the length in the local exact frame using the working-frame mean. -/ +theorem changed_frame_norm_sq {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (p : X) (r : ℝ) + (S : Euclidean n ≃L[ℝ] Euclidean n) (A : Euclidean n →L[ℝ] Euclidean n) + (hexact : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p r) measurableSet_ball S) (v : Euclidean n) : + ‖S.symm (A v)‖ ^ 2 = + ⟪v, sobolevMeanGram μ hQ ((sobolevColumnMap μ hQ u).comp A) + (ball p r) measurableSet_ball v⟫_ℝ := by + rw [sobolevMeanGram_comp, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.adjoint_inner_right, ContinuousLinearMap.comp_apply] + exact exact_mean_inverse_norm_sq μ hQ (sobolevColumnMap μ hQ u) + (ball p r) measurableSet_ball S hexact (A v) + +/-- The first-order splitting estimate expressed in arbitrary coordinates. -/ +theorem changed_frame_local_error {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (p : X) (r : ℝ) + (S : Euclidean n ≃L[ℝ] Euclidean n) (A : Euclidean n →L[ℝ] Euclidean n) + {ε : ℝ} {w : X → Euclidean n} (hε : 0 ≤ ε) + (hfirst : FirstOrderSplittingOn μ hQ p r ε (transformedColumn μ hQ u S) w) + (hvolume : 0 < μ.real (ball p r)) (hfinite : μ (ball p r) ≠ ∞) + (v : Euclidean n) : + (∫ x in ball p r, |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x - ‖S.symm (A v)‖ ^ 2| ∂μ) ≤ + (n : ℝ) ^ 2 * (ε * μ.real (ball p r)) * ‖S.symm (A v)‖ ^ 2 := by + have herror : ∀ i j : Fin n, ∫ x in ball p r, + |localGamma μ hQ (transformedColumn μ hQ u S i) (transformedColumn μ hQ u S j) x - + (if i = j then 1 else 0)| ∂μ ≤ ε * μ.real (ball p r) := by + intro i j + apply (div_le_iff₀ hvolume).mp + simpa only [div_eq_inv_mul] using hfirst.gram i j + have herr := directional_gram_error_le μ hQ (transformedColumn μ hQ u S) + (ball p r) hfinite (mul_nonneg hε hvolume.le) herror (S.symm (A v)) + rw [sobolevColumnMap_transformed] at herr + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply] using herr + +/-- An exact frame on the current ball and an operator estimate for the +working frame give the L1 directional error needed in a Gaussian shell. -/ +theorem changed_frame_directional_error {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (p : X) (r : ℝ) + (S : Euclidean n ≃L[ℝ] Euclidean n) (A : Euclidean n →L[ℝ] Euclidean n) + {ε δ : ℝ} {w : X → Euclidean n} (hε : 0 ≤ ε) + (hfirst : FirstOrderSplittingOn μ hQ p r ε (transformedColumn μ hQ u S) w) + (hexact : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball p r) measurableSet_ball S) + (hvolume : 0 < μ.real (ball p r)) (hfinite : μ (ball p r) ≠ ∞) + (hnorm : ‖sobolevMeanGram μ hQ ((sobolevColumnMap μ hQ u).comp A) + (ball p r) measurableSet_ball - ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ δ) + (v : Euclidean n) : + (∫ x in ball p r, |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x - ‖v‖ ^ 2| ∂μ) ≤ + (((n : ℝ) ^ 2 * ε) * (1 + δ) + δ) * μ.real (ball p r) * ‖v‖ ^ 2 := by + let U := sobolevColumnMap μ hQ u + let z := S.symm (A v) + have herr := changed_frame_local_error μ hQ u p r S A hε hfirst hvolume hfinite v + have hz := changed_frame_norm_sq μ hQ u p r S A hexact v + have hupper : ‖z‖ ^ 2 ≤ (1 + δ) * ‖v‖ ^ 2 := by + rw [hz] + exact inner_upper_of_sub_id_norm _ hnorm v + have hdelta : |‖z‖ ^ 2 - ‖v‖ ^ 2| ≤ δ * ‖v‖ ^ 2 := by + have hl := inner_lower_of_sub_id_norm _ hnorm v + have hu := inner_upper_of_sub_id_norm _ hnorm v + rw [← hz] at hl hu + exact abs_le.mpr ⟨by nlinarith, by nlinarith⟩ + have htri := integral_abs_sub_const_le μ + (localGamma_memL1 μ hQ (U (A v)) (U (A v))).integrableOn hfinite (‖z‖ ^ 2) (‖v‖ ^ 2) + have hnormterm := mul_le_mul_of_nonneg_left hupper + (mul_nonneg (sq_nonneg (n : ℝ)) (mul_nonneg hε hvolume.le)) + have hconstant := mul_le_mul_of_nonneg_left hdelta hvolume.le + change (∫ x in ball p r, |localGamma μ hQ (U (A v)) (U (A v)) x - ‖v‖ ^ 2| ∂μ) ≤ _ + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirichletError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirichletError.lean new file mode 100644 index 0000000000000000000000000000000000000000..19e884ca7b6b3354cf6ae4024839d5ac5bb82c55 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDirichletError.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedPairing +import OAI.Geometry.RCD.Sobolev.DirichletPoincare + +namespace OAI + +/-! # Dimensionless Poisson value error from the actual Dirichlet energy -/ + +open Set MeasureTheory Filter +open scoped ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A physical energy error of order `E * r² * volume` yields a +squared mean value error at most `C * E` after division by `r²`. +This is the L2 value estimate for the genuine Poisson replacement. -/ +theorem normalized_dirichlet_error (Ω : Set X) (hfin : μ Ω ≠ ∞) + (hvol : 0 < μ.real Ω) {r C E : ℝ} (hr : 0 < r) (hC : 0 ≤ C) + (w : SobolevSpace μ hQ) (hw : w ∈ SobolevSpace.dirichlet μ hQ Ω) + (hpoin : ∀ v : SobolevSpace.dirichlet μ hQ Ω, + ‖SobolevSpace.toLp μ hQ v.val‖ ^ 2 ≤ C * r ^ 2 * energyForm μ hQ v.val v.val) + (he : ∫ x, (SobolevSpace.minimalSlope μ hQ w x) ^ 2 ∂μ ≤ E * r ^ 2 * μ.real Ω) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω ((r ^ 2)⁻¹ • w))‖ ^ 2 ≤ C * E := by + have henergy : energyForm μ hQ w w ≤ E * r ^ 2 * μ.real Ω := by + rw [energyForm_self, ← SobolevSpace.minimalSlope_norm_sq, ← lp_integral_square_eq_norm_square] + exact he + have hp := (hpoin ⟨w, hw⟩).trans + (mul_le_mul_of_nonneg_left henergy (mul_nonneg hC (sq_nonneg r))) + have hl : (∫ x in Ω, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) ≤ + C * r ^ 2 * (E * r ^ 2 * μ.real Ω) := by + calc + _ ≤ ∫ x, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ := + setIntegral_le_integral (Lp.memLp _).integrable_sq + (Filter.Eventually.of_forall fun _ => sq_nonneg _) + _ = ‖SobolevSpace.toLp μ hQ w‖ ^ 2 := lp_integral_square_eq_norm_square μ _ + _ ≤ _ := hp + rw [map_smul, normalizeLocalL2_smul, norm_smul, mul_pow, + Real.norm_eq_abs, abs_inv, abs_of_nonneg (sq_nonneg r)] + rw [normalized_sobolev_mean_sq] + calc + _ ≤ ((r ^ 2)⁻¹) ^ 2 * ((μ.real Ω)⁻¹ * (C * r ^ 2 * (E * r ^ 2 * μ.real Ω))) := by + exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hl (by positivity)) (sq_nonneg _) + _ = C * E := by field_simp [hr.ne', hvol.ne'] + +/-- The preceding estimate tends to zero with the normalized source mass. -/ +theorem normalized_dirichlet_error_tendsto_zero + (Ω : ℕ → Set X) (hfin : ∀ i, μ (Ω i) ≠ ∞) (hvol : ∀ i, 0 < μ.real (Ω i)) + (r E : ℕ → ℝ) {C : ℝ} (hC : 0 ≤ C) (hr : ∀ i, 0 < r i) + (w : ℕ → SobolevSpace μ hQ) (hw : ∀ i, w i ∈ SobolevSpace.dirichlet μ hQ (Ω i)) + (hpoin : ∀ i, ∀ v : SobolevSpace.dirichlet μ hQ (Ω i), + ‖SobolevSpace.toLp μ hQ v.val‖ ^ 2 ≤ C * r i ^ 2 * energyForm μ hQ v.val v.val) + (he : ∀ i, ∫ x, (SobolevSpace.minimalSlope μ hQ (w i) x) ^ 2 ∂μ ≤ + E i * r i ^ 2 * μ.real (Ω i)) + (hE : Tendsto E atTop (𝓝 0)) : + Tendsto (fun i => ‖normalizeLocalL2 μ (Ω i) (hfin i) + (SobolevSpace.restrictLp μ hQ (Ω i) ((r i ^ 2)⁻¹ • w i))‖) atTop (𝓝 0) := by + apply squeeze_zero (fun _ => norm_nonneg _) + (fun i => Real.le_sqrt_of_sq_le + (normalized_dirichlet_error μ hQ (Ω i) (hfin i) (hvol i) (hr i) hC + (w i) (hw i) (hpoin i) (he i))) + simpa using ((tendsto_const_nhds (x := C)).mul hE).sqrt + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistancePoisson.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistancePoisson.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac8a8d53fa6d47793ef9f8c74f58cf67685f270a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistancePoisson.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Sobolev.PositiveDistancePoisson +import OAI.Geometry.RCD.Coordinates.NormalizedPoissonEstimates +import OAI.Geometry.RCD.Coordinates.NormalizedTorsion + +namespace OAI + +/-! # Uniform scale-correct Poisson replacement of squared distance -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- One torsion constant works for every center, radius and full positive +source. The height, gradient and energy-density errors have the exact +radius factors needed by the dyadic radial argument. -/ +theorem normalized_distance_poisson_estimates {d C : ℝ} (hd : 1 < d) (hC : 0 < C) : + ∃ H : ℝ, 0 < H ∧ ∀ (p : X) (r R D : ℝ) (hR : 0 ≤ R), + ∀ χ : GoodLaplacianCutoff μ hQ p R D, + 0 < r → r ≤ R → μ (ball p r) ≠ ∞ → 0 < μ.real (ball p r) → + ∀ P : ℝ, 0 ≤ P → + (∀ φ : SobolevSpace.dirichlet μ hQ (ball p r), + ‖SobolevSpace.toLp μ hQ φ.val‖ ^ 2 ≤ P * energyForm μ hQ φ.val φ.val) → + (∀ φ : SobolevSpace.dirichlet μ hQ (ball p r), + (∫ x in ball p r, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * r ^ 2 * (μ.real (ball p r)) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) → + (∀ᵐ x ∂μ.restrict (ball p R), + localGamma μ hQ (inwardSobolev μ hQ p R) (inwardSobolev μ hQ p R) x = 1) → + ∀ (a : ℝ), 0 ≤ a → ∀ (σ : Measure X), ∀ _hσ : IsFiniteMeasure σ, + let q := positiveSquaredDistance μ hQ hR χ + (∀ (ψ : SobolevSpace μ hQ) (v : X → ℝ) (L : ℝ≥0), + LipschitzWith L v → HasCompactSupport v → tsupport v ⊆ ball p r → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] v → + energyForm μ hQ q ψ + a * (∫ x in ball p r, v x ∂μ) = ∫ x, v x ∂σ) → + ∃ f : SobolevSpace μ hQ, + f - q ∈ SobolevSpace.dirichlet μ hQ (ball p r) ∧ + IsConstantLaplacianOn μ hQ (ball p r) f a ∧ + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ (q - f) x ∧ + SobolevSpace.toLp μ hQ (q - f) x ≤ (1 / 2 + a * H) * r ^ 2) ∧ + (∫ x in ball p r, SobolevSpace.minimalSlope μ hQ (q - f) x ∂μ) ≤ + σ.real (ball p r) * r * Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C) ∧ + (∫ x, (SobolevSpace.minimalSlope μ hQ (q - f) x) ^ 2 ∂μ) ≤ + σ.real (ball p r) * ((1 / 2 + a * H) * r ^ 2) ∧ + (∫ x in ball p r, |(1 / 2 : ℝ) * localGamma μ hQ f f x - + (1 / 2 : ℝ) * localGamma μ hQ q q x| ∂μ) ≤ + (Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C) + + (1 / 2 + a * H) / 2) * r ^ 2 * σ.real (ball p r) := by + obtain ⟨H, hH, htor⟩ := exists_uniform_normalized_bounded_torsion μ hQ hd hC.le + refine ⟨H, hH, ?_⟩ + intro p r R D hR χ hr hrR hfin hvol P hP hpoin hsob heik a ha σ hσ q hsource + let _ := hσ + have hsub : ball p r ⊆ ball p R := ball_subset_ball hrR + obtain ⟨τ, hτ, hτbound⟩ := htor (ball p r) measurableSet_ball hfin hvol (r ^ 2) + (sq_pos_of_pos hr) P hP hpoin hsob + obtain ⟨f, hfq, hsolve⟩ := exists_constant_laplacian_replacement μ hQ (ball p r) + measurableSet_ball hfin hP hpoin a q + obtain ⟨L, hL⟩ := positiveSquaredDistanceValue_lipschitz μ hQ hR χ + have hrep := positiveSquaredDistance_representative μ hQ hR χ + have hnonneg : ∀ x, 0 ≤ positiveSquaredDistanceValue μ hQ χ x := + fun x => (positiveSquaredDistanceValue_bounds μ hQ hR χ x).1 + have hqbound : ∀ᵐ x ∂μ.restrict (ball p r), positiveSquaredDistanceValue μ hQ χ x ≤ r ^ 2 / 2 := by + filter_upwards [ae_restrict_mem measurableSet_ball] with x hx + rw [positiveSquaredDistanceValue_on_ball μ hQ χ (hsub hx)] + have hdist : dist p x < r := by simpa only [mem_ball, dist_comm] using hx + nlinarith [dist_nonneg (x := p) (y := x)] + have hgrad : ∀ᵐ x ∂μ.restrict (ball p r), SobolevSpace.minimalSlope μ hQ q x ≤ r := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub + (positiveSquaredDistance_gradient μ hQ hR χ heik), + ae_restrict_of_ae (localGamma_self μ hQ q), ae_restrict_mem measurableSet_ball] + with x hγ hself hx + change localGamma μ hQ q q x = dist p x ^ 2 at hγ + have hdist : dist p x < r := by simpa only [mem_ball, dist_comm] using hx + rw [hself] at hγ + nlinarith [dist_nonneg (x := p) (y := x)] + have hb := normalized_poisson_source_estimates μ hQ (ball p r) measurableSet_ball hfin hvol + hP hpoin q f (positiveSquaredDistanceValue μ hQ χ) hL hnonneg hrep ha + (by positivity) (mul_nonneg hH.le (sq_nonneg r)) hr.le hd hC (sq_pos_of_pos hr) + hqbound hgrad τ hτ (hτbound.mono fun _ hx => hx.2) hfq hsolve σ hsource hsob + have hheight : r ^ 2 / 2 + a * (H * r ^ 2) = (1 / 2 + a * H) * r ^ 2 := by ring + have hroot : Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C * r ^ 2) = + r * Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C) := by + rw [Real.sqrt_mul (mul_nonneg (balancedGradientConstant_pos (by linarith) (by linarith)).le hC.le), + Real.sqrt_sq_eq_abs, abs_of_pos hr, mul_comm] + dsimp only at hb + rw [hheight, hroot] at hb + refine ⟨f, hfq, ?_, hb.1, ?_, hb.2.2.2.1, ?_⟩ + · intro φ hφ + exact hsolve ⟨φ, hφ⟩ + · simpa only [mul_assoc] using hb.2.2.1 + · exact hb.2.2.2.2.trans_eq (by congr 1; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistanceSourceLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistanceSourceLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..45f20195cd2c1ea06e0f100c4abab727488f63ee --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedDistanceSourceLimit.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Harmonic.RadialDyadicBudget + +namespace OAI + +/-! # Vanishing normalized distance-source mass from equal volume limits -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem radial_mass_normalized_tendsto_zero {n κ ω : ℝ} + (hn : 0 (r k)^(-n)*V k) atTop (𝓝 ω)) + (hW : Tendsto (fun k => (2*r k)^(-n)*W k) atTop (𝓝 ω)) + (hmass : ∀ k, (((r k)^(-n)-(2*r k)^(-n))/n)*M k≤ + (r k)^(-n)*V k-(2*r k)^(-n)*W k+ + (κ*(4*r k)^2)*(((r k)^(-n)-(2*r k)^(-n))/n)*W k) : + Tendsto (fun k => (r k)^(-n)*M k) atTop (𝓝 0) := by + let C k := (2*r k)^(-n)*W k + have hbound k : W k≤C k*(2*r k)^n := by + apply le_of_eq + dsimp only [C] + have hp : 0<2*r k := mul_pos (by norm_num) (hr k) + rw [Real.rpow_neg hp.le] + calc + W k = W k*((2*r k)^n)⁻¹*(2*r k)^n := by + rw [mul_assoc, inv_mul_cancel₀ (Real.rpow_pos_of_pos hp n).ne', mul_one] + _ = _ := by ring + have hb k := radial_mass_normalized_le hn (hr k) (by positivity : 0≤κ*(4*r k)^2) + (hbound k) (hmass k) + have hcurv : Tendsto (fun k => κ*(4*r k)^2) atTop (𝓝 0) := by + simpa only [mul_zero,zero_pow (by norm_num : 2≠0)] using ((hr0.const_mul 4).pow 2).const_mul κ + have hlim : Tendsto (fun k => (radialCutoffCoefficient n)⁻¹* + ((r k)^(-n)*V k-(2*r k)^(-n)*W k)+(κ*(4*r k)^2)*C k*2^n) atTop (𝓝 0) := by + simpa only [sub_self,mul_zero,zero_mul,add_zero] using + ((hV.sub hW).const_mul (radialCutoffCoefficient n)⁻¹).add ((hcurv.mul hW).mul_const (2^n)) + exact squeeze_zero (fun k => mul_nonneg (Real.rpow_nonneg (hr k).le _) (hM k)) hb hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedExponentialTilt.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedExponentialTilt.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3b0097ff9e275f538bc06f0771d117efb5283b2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedExponentialTilt.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Heat.CompactExponentialMultiplier + +namespace OAI + +/-! # Normalized positive Sobolev perturbations with controlled mass -/ + +open Set Filter MeasureTheory +open scoped ENNReal NNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + + theorem SobolevSpace.exists_normalized_exp_tilt (ρ : SobolevSpace μ hQ) + (hρ : ∀ᵐ x ∂μ, 0 < SobolevSpace.toLp μ hQ ρ x) + (hi : Integrable (SobolevSpace.toLp μ hQ ρ) μ) + (hm : (∫ x, SobolevSpace.toLp μ hQ ρ x ∂μ)=1) + {g : X → ℝ} {C M : ℝ≥0} (hg : LipschitzWith C g) (hgs : HasCompactSupport g) + (hgb : ∀ x, |g x| ≤ M) (t : ℝ) : + ∃ Z : ℝ, 0 < Z ∧ Real.exp (-|t| *M) ≤ Z ∧ Z ≤ Real.exp (|t| *M) ∧ + ∃ σ : SobolevSpace μ hQ, + (SobolevSpace.toLp μ hQ σ =ᵐ[μ] fun x => + Z⁻¹*(Real.exp (t*g x)*SobolevSpace.toLp μ hQ ρ x)) ∧ + (∀ᵐ x ∂μ, 0 < SobolevSpace.toLp μ hQ σ x) ∧ + Integrable (SobolevSpace.toLp μ hQ σ) μ ∧ + (∫ x, SobolevSpace.toLp μ hQ σ x ∂μ)=1 := by + obtain ⟨u,hu⟩ := ρ.exists_exp_mul μ hQ hg hgs hgb t + have hbounds (x : X) : Real.exp (-|t| *M) ≤ Real.exp (t*g x) ∧ + Real.exp (t*g x) ≤ Real.exp (|t| *M) := by + have hb : |t*g x| ≤ |t| *M := by rw [abs_mul]; gcongr; exact hgb x + exact ⟨Real.exp_le_exp.mpr (by linarith [(abs_le.mp hb).1]), + Real.exp_le_exp.mpr (abs_le.mp hb).2⟩ + have hui : Integrable (SobolevSpace.toLp μ hQ u) μ := by + apply (hi.const_mul (Real.exp (|t| *M))).mono' (Lp.aestronglyMeasurable _) + filter_upwards [hu,hρ] with x hx hp + rw [hx,Real.norm_eq_abs,abs_of_pos (mul_pos (Real.exp_pos _) hp)] + exact mul_le_mul_of_nonneg_right (hbounds x).2 hp.le + have hlo : Real.exp (-|t| *M) ≤ ∫ x, SobolevSpace.toLp μ hQ u x ∂μ := by + calc + _ = ∫ x, Real.exp (-|t| *M)*SobolevSpace.toLp μ hQ ρ x ∂μ := by rw [integral_const_mul,hm,mul_one] + _ ≤ _ := by + apply integral_mono_ae (hi.const_mul _) hui + filter_upwards [hu,hρ] with x hx hp + rw [hx] + exact mul_le_mul_of_nonneg_right (hbounds x).1 hp.le + have hhi : (∫ x, SobolevSpace.toLp μ hQ u x ∂μ) ≤ Real.exp (|t| *M) := by + calc + _ ≤ ∫ x, Real.exp (|t| *M)*SobolevSpace.toLp μ hQ ρ x ∂μ := by + apply integral_mono_ae hui (hi.const_mul _) + filter_upwards [hu,hρ] with x hx hp + rw [hx] + exact mul_le_mul_of_nonneg_right (hbounds x).2 hp.le + _ = _ := by rw [integral_const_mul,hm,mul_one] + let Z := ∫ x, SobolevSpace.toLp μ hQ u x ∂μ + have hZ : 0 < Z := (Real.exp_pos _).trans_le hlo + let σ := Z⁻¹ • u + have hs : SobolevSpace.toLp μ hQ σ =ᵐ[μ] fun x => Z⁻¹*SobolevSpace.toLp μ hQ u x := by + exact Lp.coeFn_smul Z⁻¹ (SobolevSpace.toLp μ hQ u) + have hsi : Integrable (SobolevSpace.toLp μ hQ σ) μ := (hui.const_mul Z⁻¹).congr hs.symm + refine ⟨Z,hZ,hlo,hhi,σ,hs.trans ?_,?_,hsi,?_⟩ + · exact hu.fun_comp (fun a => Z⁻¹*a) + · filter_upwards [hs,hu,hρ] with x hs hu hp + rw [hs,hu] + exact mul_pos (inv_pos.mpr hZ) (mul_pos (Real.exp_pos _) hp) + · rw [integral_congr_ae hs,integral_const_mul] + exact inv_mul_cancel₀ hZ.ne' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedFitEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFitEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..147399d64755f6c2ae5cc5150f6fa29aba19c8ef --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFitEnergy.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # Converting the normalized radial fit to its integral budget -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem norm_sq_le_of_normalized_fit (s : Set X) (hs : μ s ≠ ∞) (hs0 : μ s ≠ 0) + (f : Lp ℝ 2 (μ.restrict s)) {A : ℝ} (hA : 0 ≤ A) + (hfit : ‖normalizeLocalL2 μ s hs f‖ ≤ A) : + ‖f‖ ^ 2 ≤ μ.real s * A ^ 2 := by + have hmass : 0 < μ.real s := ENNReal.toReal_pos hs0 hs + have he := normalizeLocalL2_norm_sq μ s hs f + rw [← l2_norm_sq_eq_integral μ s f] at he + have hb := (sq_le_sq₀ (norm_nonneg _) hA).mpr hfit + rw [he] at hb + calc + _ = μ.real s * ((μ.real s)⁻¹ * ‖f‖ ^ 2) := by field_simp + _ ≤ μ.real s * A ^ 2 := mul_le_mul_of_nonneg_left hb hmass.le + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameDerivative.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..75b32507dc65e10dba2e4b872cb553b9f6911dd8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameDerivative.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.RCD.Coordinates.FramePathEndpointEnergy + +namespace OAI + +/-! # The scalar velocity residual in radius-normalized coordinates -/ + +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_frame_derivative {n : ℕ} {f : ℝ → ℝ} {c : Fin n → ℝ → ℝ} + (b : Fin n → ℝ) {t r D E : ℝ} (hr : 0 f s/r) t-∑ i, b i*deriv (fun s => c i s/r) t)^2≤E := by + rw [(hf.hasDerivAt.div_const r).deriv] + simp_rw [fun i => ((hc i).hasDerivAt.div_const r).deriv] + have heq : deriv f t/r-∑ i, b i*(deriv (c i) t/r)= + (deriv f t-∑ i, b i*deriv (c i) t)/r := by + simp only [mul_div_assoc,Finset.sum_div,sub_div] + rw [heq,div_pow] + apply (div_le_iff₀ (sq_pos_of_pos hr)).mpr + have hh := mul_le_mul_of_nonneg_right (pow_le_pow_left₀ hD hDr 2) hE + exact he.trans (by simpa only [mul_comm] using hh) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameEndpoint.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..737c1d4ea82f6e27f241a10747714f439fd02355 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameEndpoint.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedFrameDerivative + +namespace OAI + +/-! # Radius-normalized endpoints with one spatial frame error -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_frame_endpoint {n : ℕ} {f : ℝ → ℝ} {b c : Fin n → ℝ → ℝ} + {r L D η : ℝ} (hr : 0 b i t) : Euclidean n)‖^2≤L^2+E t) + (hd : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv f t-∑ i, b i t*deriv (c i) t)^2≤D^2*E t) : + |f 1-f 0|/r≤Real.sqrt (L^2+∫ t in Icc (0:ℝ) 1, E t)* + ‖(WithLp.toLp 2 (fun i => (c i 1-c i 0)/r) : Euclidean n)‖+ + η*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)+ + Real.sqrt (∫ t in Icc (0:ℝ) 1, E t) := by + have hf' : AbsolutelyContinuousOnInterval (fun t => f t/r) 0 1 := by + simpa only [div_eq_mul_inv,mul_comm] using hf.const_mul r⁻¹ + have hc' (i : Fin n) : AbsolutelyContinuousOnInterval (fun t => c i t/r) 0 1 := by + simpa only [div_eq_mul_inv,mul_comm] using (hc i).const_mul r⁻¹ + have haff' (i : Fin n) (t : ℝ) (ht : t∈Icc (0:ℝ) 1) : + |c i t/r-((1-t)*(c i 0/r)+t*(c i 1/r))|≤η := by + convert haff i t ht using 1 + congr 1 + ring + have hd' : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv (fun s => f s/r) t-∑ i, b i t*deriv (fun s => c i s/r) t)^2≤(1:ℝ)^2*E t := by + filter_upwards [hd,hf.ae_differentiableAt,ae_all_iff.mpr (fun i => (hc i).ae_differentiableAt)] + with t ht hf hc htin + have hi : t∈uIcc (0:ℝ) 1 := by simpa only [uIcc_of_le zero_le_one] using Ioo_subset_Icc_self htin + simpa only [one_pow,one_mul] using normalized_frame_derivative (fun i => b i t) hr hD hDr (hE t) + (hf hi) (fun i => hc i hi) (ht htin) + have hh := ac_coordinate_endpoint_energy hf' hb hc' haff' (by norm_num : (0:ℝ)≤1) + E hE hEI hbN E hE hEI hd' + simpa only [← sub_div,abs_div,abs_of_pos hr,one_mul] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameRadialSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameRadialSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..7970f078c69a4e7676acd22527895eaf95b4d65c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedFrameRadialSmallness.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.RCD.Coordinates.FramedRadialSmallness +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # The qualitative estimate at the actual normalization radius -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +def radialNormalizationRestrictionConstant (n : ℕ) : ℝ := (5 / 3 : ℝ) * (32 : ℝ) ^ n + +theorem radialNormalizationRestrictionConstant_ge_one (n : ℕ) : + 1 ≤ radialNormalizationRestrictionConstant n := by + have hh : (1 : ℝ) ≤ 32 ^ n := one_le_pow₀ (by norm_num) + dsimp only [radialNormalizationRestrictionConstant] + linarith + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- The normalizing ball has radius twice the distance-source radius. +Its first-order and metric estimates control the original radial fit on +the testing ball with an explicit, scale-independent coefficient. -/ +theorem DyadicDistanceReplacements.normalized_frame_fit_smallness + {n : ℕ} {κ r0 B J C omega δ Cχ : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + (homega : 0 < omega) (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant n * δ ≤ 1) (hCχ : 0 ≤ Cχ) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ 2 * distanceSourceRadius r0 i → + |μ.real (ball p t) / (omega * t ^ n) - 1| ≤ 1 / 4) + (u : Fin n → SobolevSpace μ hQ) (A : Euclidean n ≃L[ℝ] Euclidean n) + (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (2 * distanceSourceRadius r0 i) δ + (transformedColumn μ hQ u A) v) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v x - v p))) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (b : Euclidean n) {L : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ L) : + let r := distanceSourceRadius r0 i / 64 + let hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + (radialFitError μ hQ u p r hfin (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) ha) ^ 2 ≤ + ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * + radialNormalizationRestrictionConstant n * ((5 / 3 : ℝ) * (4 : ℝ) ^ n) * δ * ‖A.symm b‖ ^ 2 := by + dsimp only + let s := distanceSourceRadius r0 i + let r := s / 64 + let D := radialNormalizationRestrictionConstant n + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hD : 1 ≤ D := radialNormalizationRestrictionConstant_ge_one n + have hε : 0 ≤ D * δ := mul_nonneg (zero_le_one.trans hD) hδ + have hv (t : ℝ) (ht : 0 < t) (hts : t ≤ 2 * s) : + 0 < μ.real (ball p t) := (quarter_volume_bounds ht homega (hquarter t ht hts)).1 + have hfin (t : ℝ) : μ (ball p t) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p t).measure_lt_top) + have hzero (t : ℝ) (ht : 0 < t) (hts : t ≤ 2 * s) : μ (ball p t) ≠ 0 := by + intro hz + have hp := hv t ht hts + rw [Measure.real, hz, ENNReal.toReal_zero] at hp + exact (lt_irrefl 0) hp + have hratio : μ.real (ball p (2 * s)) / μ.real (ball p (4 * r)) ≤ D := by + have h := radial_fraction_volume_ratio (show 0 < 2 * s by positivity) + (by norm_num : (0 : ℝ) < 1 / 32) homega + (hquarter (2 * s) (by positivity) le_rfl) + (hquarter ((1 / 32 : ℝ) * (2 * s)) (by positivity) (by linarith)) + have hrad : (1 / 32 : ℝ) * (2 * s) = 4 * r := by dsimp only [r]; ring + rw [hrad] at h + have hp : (((1 / 32 : ℝ) ^ n)⁻¹) = (32 : ℝ) ^ n := by rw [← inv_pow]; norm_num + simpa only [D, radialNormalizationRestrictionConstant, hp] using h + have hsub : ball p (4 * r) ⊆ ball p (2 * s) := ball_subset_ball (by dsimp only [r]; linarith) + have hlocal := hfirst.restrict_ball μ hQ hsub hδ hD + (hzero (4 * r) (by positivity) (by dsimp only [r]; linarith)) (hfin _) + (hzero (2 * s) (by positivity) le_rfl) (hfin _) + ((div_le_iff₀ (hv (4 * r) (by positivity) (by dsimp only [r]; linarith))).mp hratio) + have hη : SobolevSpace.toLp μ hQ (T.cutoff i).sobolev =ᵐ[μ.restrict (ball p (4 * r))] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff i).representative, + ae_restrict_mem measurableSet_ball] with x hx hxr + exact hx.trans ((T.cutoff i).one x + ((ball_subset_ball (show 4 * r ≤ 4 * s by dsimp only [r]; linarith)) hxr)) + have hmetric' := hmetric.mono_error (show δ ≤ D * δ by nlinarith) + have hsmall := T.framed_covector_fit_smallness μ hQ i hε hδ1 hCχ u A v + hlocal hmetric' (T.cutoff i).sobolev hη χ + (hv (4 * r) (by positivity) (by dsimp only [r]; linarith)) b ha + dsimp only at hsmall + have hratio4 : μ.real (ball p (4 * r)) / μ.real (ball p r) ≤ (5 / 3 : ℝ) * (4 : ℝ) ^ n := by + have h := radial_fraction_volume_ratio (show 0 < 4 * r by positivity) + (by norm_num : (0 : ℝ) < 1 / 4) homega + (hquarter (4 * r) (by positivity) (by dsimp only [r]; linarith)) + (hquarter ((1 / 4 : ℝ) * (4 * r)) (by positivity) (by dsimp only [r]; linarith)) + rw [show (1 / 4 : ℝ) * (4 * r) = r by ring] at h + have hp : (((1 / 4 : ℝ) ^ n)⁻¹) = (4 : ℝ) ^ n := by rw [← inv_pow]; norm_num + simpa only [hp] using h + apply hsmall.trans + have hcoef : 0 ≤ ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * (D * δ) := by positivity + have hh := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hratio4 hcoef) (sq_nonneg ‖A.symm b‖) + convert hh using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicHeatMass.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicHeatMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..992925f8e5b52b8f7cd3b7b2a1380905dd2f4d64 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicHeatMass.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Heat.SelectedHarmonicHeatMass +import OAI.Geometry.RCD.Coordinates.NormalizedHeatMassLimit + +namespace OAI + +/-! # Vanishing scaled Bochner mass for the selected actual harmonic heat sequence -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2 ≤ n) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn in +theorem normalized_harmonic_heat_mass (hK : K ≤ 0) + (p : ℕ → X) (r : ℕ → ℝ) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) {C : ℝ} (hC : 0 ≤ C) + (χ : ∀ k, GoodLaplacianCutoff (hausdorff n X) hX.quadratic (p k) (2*r k) C) + (u : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (d : ℕ → Lp ℝ 2 (hausdorff n X)) + (hd : ∀ k, IsWeakLaplacian (hausdorff n X) hX.quadratic (u k) (d k)) + (U : ℕ → X → ℝ) (L A : ℕ → ℝ≥0) + (hU : ∀ k, LipschitzWith (L k) (U k)) (hUc : ∀ k, HasCompactSupport (U k)) + (hu : ∀ k, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) =ᵐ[hausdorff n X] U k) + (hA : ∀ k, ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) x| ≤ A k) + (hd0 : ∀ k, d k =ᵐ[(hausdorff n X).restrict (ball (p k) (8*r k))] fun _ => 0) + (hE0 : Tendsto (fun k => + (∫ x in closedBall (p k) (4*r k), + |localGamma (hausdorff n X) hX.quadratic (u k) (u k) x-1| ∂hausdorff n X)/ + (hausdorff n X).real (ball (p k) (8*r k))) atTop (𝓝 0)) : + let m := hausdorff n X + let q := hX.quadratic + ∃ (s : ℕ → ℝ) (hs : ∀ k, 0 < s k), + (∀ k, s k ≤ 1) ∧ Tendsto s atTop (𝓝 0) ∧ + (let w k := heatSobolev m q (s k) (hs k) (SobolevSpace.toLp m q (u k)) + let D k := heatSobolevMap m q (s k/2) (half_pos (hs k)) + (-heatGeneratorAt m q (s k-s k/2) (SobolevSpace.toLp m q (u k))) + Tendsto (fun k => ‖w k-u k‖/r k) atTop (𝓝 0) ∧ + Tendsto (fun k => ‖w k-u k‖/(r k*Real.sqrt (m.real (ball (p k) (8*r k))))) atTop (𝓝 0) ∧ + ∃ (G : ℕ → SobolevSpace m q) (σ : ℕ → Measure X), + (∀ k, IsFiniteMeasure (σ k)) ∧ + (∀ k, SobolevSpace.toLp m q (G k) =ᵐ[m] localGamma m q (w k) (w k)) ∧ + (∀ k (ψ : SobolevSpace m q) (v : X → ℝ), Continuous v → HasCompactSupport v → + tsupport v ⊆ ball (p k) (6*r k) → SobolevSpace.toLp m q ψ =ᵐ[m] v → + (∫ x, v x ∂σ k)=-(1/2:ℝ)*energyForm m q (G k) ψ- + weightedGamma m q (SobolevSpace.toLp m q ψ) (w k) (D k)- + K*weightedGamma m q v (w k) (w k)) ∧ + Tendsto (fun k => (r k)^2*(σ k).real (closedBall (p k) (r k))/ + m.real (ball (p k) (8*r k))) atTop (𝓝 0)) := by + intro m q + obtain ⟨s,hs,hs1,hs0,hval,hvalnorm,G,σ,hσ,hG,hrep,hmass⟩ := + hX.selected_harmonic_heat_mass hn hK p r hr hC χ u d hd U L A hU hUc hu hA hd0 + refine ⟨s,hs,hs1,hs0,hval,hvalnorm,G,σ,hσ,hG,hrep,?_⟩ + have hm (k : ℕ) : 0 < m.real (ball (p k) (8*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (by linarith [hr k])).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + exact normalized_heat_mass_limit r (fun k => m.real (ball (p k) (8*r k))) + (fun k => ∫ x in closedBall (p k) (4*r k), |localGamma m q (u k) (u k) x-1| ∂m) + (fun k => m.real (closedBall (p k) (4*r k))) + (fun k => (σ k).real (closedBall (p k) (r k))) hr hm (fun _ => measureReal_nonneg) + (fun k => measureReal_mono (closedBall_subset_ball (by linarith [hr k])) + (hX.finiteOnBounded _ isBounded_ball).ne) hK hr0 hE0 hmass + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicLinearLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicLinearLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..707fe0601e90e3a47519ae5523a1d961d3f0caf8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHarmonicLinearLimit.lean @@ -0,0 +1,172 @@ +import OAI.Geometry.RCD.Harmonic.ScaledHarmonicValueConvergence +import OAI.Geometry.RCD.Sobolev.HarmonicLinearEnergyL1 +import OAI.Geometry.RCD.Harmonic.MeanGramControl + +namespace OAI + +/-! # Exact energy normalization fixes the norm of a harmonic linear limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.normalized_harmonic_linear_limit_ne_zero {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*r k^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w k)) + {M : ℝ} (hM : 0 < M) (hnorm : ∀ k, harmonicTargetNorm hX (p k) (5*r k) (w k) ≤ M) + (hmean : ∀ k, ((hausdorff n X).real (ball (p k) (r k)))⁻¹* + ∫ x in ball (p k) (r k), r k^2*localGamma (hausdorff n X) hX.quadratic (w k) (w k) x + ∂hausdorff n X = 1) + (L : Euclidean n →L[ℝ] ℝ) + (hconv : ∀ W : ℝ, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w k) x-L (V k x)| ≤ δ) : L ≠ 0 := by + intro hzero + let μ := hausdorff n X + have hnorm' (k : ℕ) : harmonicTargetNorm hX (p k) (5*r k) ((2 : ℝ) • w k) ≤ 2*M := by + rw [harmonicTargetNorm_smul] + simpa only [abs_of_pos (by norm_num : (0:ℝ)<2)] using + mul_le_mul_of_nonneg_left (hnorm k) (by norm_num : (0:ℝ)≤2) + have hsharp := hX.harmonic_linear_sharp hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + (fun k => (2 : ℝ) • w k) (fun k => (hw k).smul μ hX.quadratic 2) + (mul_pos (by norm_num) hM) hnorm' ((2 : ℝ) • L) (by simp [hzero]) + (sobolev_linear_value_convergence_smul μ hX.quadratic p r V w L (by norm_num) hconv) + 1 (by norm_num) + obtain ⟨k,hk⟩ := hsharp.exists + have hs : ball (p k) (r k) ⊆ ball (p k) (3*r k) := + ball_subset_ball (by linarith [hr k]) + have hb : ∀ᵐ x ∂μ.restrict (ball (p k) (r k)), + r k^2*localGamma μ hX.quadratic (w k) (w k) x ≤ 1/2 := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hs hk, + ae_restrict_of_ae (localGamma_smul_left μ hX.quadratic 2 (w k) ((2 : ℝ) • w k)), + ae_restrict_of_ae (localGamma_smul_right μ hX.quadratic 2 (w k) (w k))] with x hx hl hr' + change r k^2*localGamma μ hX.quadratic ((2 : ℝ) • w k) ((2 : ℝ) • w k) x ≤ 1+1 at hx + rw [hl,hr'] at hx + nlinarith + have hfin : μ (ball (p k) (r k)) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hm : 0 < μ.real (ball (p k) (r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (hr k)).ne' hfin + have hi := integral_mono_ae + ((localGamma_memL1 μ hX.quadratic (w k) (w k)).const_mul (r k^2)).integrableOn + (integrableOn_const hfin) hb + rw [setIntegral_const] at hi + simp only [smul_eq_mul] at hi + have hh := mul_le_mul_of_nonneg_left hi (inv_nonneg.mpr hm.le) + rw [hmean k] at hh + have he : (μ.real (ball (p k) (r k)))⁻¹*(μ.real (ball (p k) (r k))*(1/2)) = 1/2 := by + field_simp + rw [he] at hh + norm_num at hh + +theorem NoncollapsedRCD.normalized_harmonic_linear_limit_norm {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*r k^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w k)) + {M : ℝ} (hM : 0 < M) (hnorm : ∀ k, harmonicTargetNorm hX (p k) (5*r k) (w k) ≤ M) + (hmean : ∀ k, ((hausdorff n X).real (ball (p k) (r k)))⁻¹* + ∫ x in ball (p k) (r k), r k^2*localGamma (hausdorff n X) hX.quadratic (w k) (w k) x + ∂hausdorff n X = 1) + (L : Euclidean n →L[ℝ] ℝ) + (hconv : ∀ W : ℝ, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w k) x-L (V k x)| ≤ δ) : ‖L‖ = 1 := by + let μ := hausdorff n X + have hL : 0 < ‖L‖ := norm_pos_iff.mpr + (hX.normalized_harmonic_linear_limit_ne_zero hn p r ε V hr hcurv hcurv5 hε hε1 hεlim + hV w hw hM hnorm hmean L hconv) + let c : ℝ := ‖L‖⁻¹ + have hc : 0 < c := inv_pos.mpr hL + let u := fun k => c • w k + have hu (k : ℕ) : harmonicTargetNorm hX (p k) (5*r k) (u k) ≤ c*M := by + rw [harmonicTargetNorm_smul,abs_of_pos hc] + exact mul_le_mul_of_nonneg_left (hnorm k) hc.le + have hunit : ‖c • L‖ = 1 := by + rw [norm_smul,Real.norm_of_nonneg hc.le] + exact inv_mul_cancel₀ hL.ne' + have he := hX.harmonic_linear_energy_l1 hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + u (fun k => (hw k).smul μ hX.quadratic c) (mul_pos hc hM) hu (c • L) hunit + (sobolev_linear_value_convergence_smul μ hX.quadratic p r V w L hc hconv) + let e := fun k x => |r k^2*localGamma μ hX.quadratic (u k) (u k) x-1| + have hfin (k : ℕ) : μ (ball (p k) (5*r k)) ≠ ⊤ := + (hX.finiteOnBounded _ isBounded_ball).ne + have hm (k : ℕ) : 0 < μ.real (ball (p k) (5*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos (by norm_num) (hr k))).ne' (hfin k) + have hmass₁ := measured_ball_mass_tendsto (by norm_num : (0:ℝ)<5) (by norm_num : (0:ℝ)<1) + (by norm_num) hr hV hfin hm hεlim + have hmass₂ := measured_ball_mass_tendsto (by norm_num : (0:ℝ)<5) (by norm_num : (0:ℝ)<2) + (by norm_num) hr hV hfin hm hεlim + have hv (R : ℝ) (hR : 0 < R) : 0 < volume.real (ball (0 : Euclidean n) R) := + ENNReal.toReal_pos (measure_ball_pos volume 0 hR).ne' measure_ball_lt_top.ne + have hmass := hmass₁.div hmass₂ (ne_of_gt (mul_pos (inv_pos.mpr (hv 5 (by norm_num))) + (hv 2 (by norm_num)))) + have hmass' : Tendsto (fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + μ.real (ball (p k) (r k))) atTop + (𝓝 (volume.real (ball (0 : Euclidean n) 1)/volume.real (ball (0 : Euclidean n) 2))) := by + convert hmass using 1 + · funext k + dsimp only [Pi.div_apply,μ] + simp only [one_mul] + have hm' : (hausdorff n X).real (ball (p k) (r k*5)) ≠ 0 := by + simpa only [μ,mul_comm] using (hm k).ne' + field_simp [hm'] + · congr 1 + field_simp [(hv 5 (by norm_num)).ne'] + have hei (k : ℕ) : IntegrableOn (e k) (ball (p k) (2*r k)) μ := + (((localGamma_memL1 μ hX.quadratic (u k) (u k)).const_mul (r k^2)).integrableOn.sub + (integrableOn_const (hX.finiteOnBounded _ isBounded_ball).ne)).abs + have hinner := normalized_weighted_core_convergence μ + (fun k => ball (p k) (r k)) (fun k => ball (p k) (2*r k)) + (fun k => (μ.real (ball (p k) (2*r k)))⁻¹) + (fun k => inv_pos.mpr (ENNReal.toReal_pos + (hX.fullSupport _ _ (mul_pos (by norm_num) (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne)) + (fun _ _ => 1) e (fun k => by simpa only [one_mul] using hei k) + (fun _ => Eventually.of_forall (fun _ => abs_nonneg _)) + (fun _ => Eventually.of_forall (fun _ => zero_le_one)) + (fun k => ball_subset_ball (by linarith [hr k])) + (Eventually.of_forall (fun _ => Eventually.of_forall (fun _ => rfl))) + (div_ne_zero (hv 1 (by norm_num)).ne' (hv 2 (by norm_num)).ne') hmass' + (by simpa only [one_mul] using he) + have hbound (k : ℕ) : |c^2-1| ≤ (μ.real (ball (p k) (r k)))⁻¹* + ∫ x in ball (p k) (r k), e k x ∂μ := by + have hg : ∀ᵐ x ∂μ.restrict (ball (p k) (r k)), + r k^2*localGamma μ hX.quadratic (u k) (u k) x = + c^2*(r k^2*localGamma μ hX.quadratic (w k) (w k) x) := by + filter_upwards [ae_restrict_of_ae (localGamma_smul_left μ hX.quadratic c (w k) (c • w k)), + ae_restrict_of_ae (localGamma_smul_right μ hX.quadratic c (w k) (w k))] with x hl hr' + change r k^2*localGamma μ hX.quadratic (c • w k) (c • w k) x = _ + rw [hl,hr'] + ring + have hmean' : (μ.real (ball (p k) (r k)))⁻¹* + (∫ x in ball (p k) (r k), r k^2*localGamma μ hX.quadratic (u k) (u k) x ∂μ) = c^2 := by + rw [integral_congr_ae hg,integral_const_mul] + calc _ = c^2*((μ.real (ball (p k) (r k)))⁻¹* + ∫ x in ball (p k) (r k), r k^2*localGamma μ hX.quadratic (w k) (w k) x ∂μ) := by ring + _ = c^2 := by rw [hmean k,mul_one] + have hb := abs_average_sub_const_le μ (ball (p k) (r k)) + (hX.fullSupport _ _ (hr k)).ne' (hX.finiteOnBounded _ isBounded_ball).ne + ((localGamma_memL1 μ hX.quadratic (u k) (u k)).const_mul (r k^2)).integrableOn 1 + rwa [hmean'] at hb + have hcz : |c^2-1| ≤ 0 := ge_of_tendsto hinner (Eventually.of_forall hbound) + have hcunit : c = 1 := by nlinarith [abs_nonneg (c^2-1),le_abs_self (c^2-1),neg_le_abs (c^2-1)] + change ‖L‖⁻¹ = 1 at hcunit + exact inv_injective (by simpa using hcunit) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHausdorffImage.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHausdorffImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c00e03484ef20dbbbef913c0adb4b9c18af96a8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHausdorffImage.lean @@ -0,0 +1,40 @@ +import OAI.Analysis.RCDHeat.Foundations + +namespace OAI + +/-! # Image bounds for the exact normalized Hausdorff measure + +The normalization factor is the same in source and target. This does not +identify the Euclidean target measure with Lebesgue measure. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + +theorem normalized_hausdorff_image_le {n : ℕ} {C : ℝ≥0} {u : X → Y} {A : Set X} + (hu : LipschitzOnWith C u A) : + hausdorff n Y (u '' A) ≤ (C : ℝ≥0∞)^n * hausdorff n X A := by + have hh := hu.hausdorffMeasure_image_le (d := (n:ℝ)) (by positivity) + rw [ENNReal.rpow_natCast] at hh + simp only [hausdorff,Measure.smul_apply,smul_eq_mul] + calc + _ ≤ (volume (ball (0 : Euclidean n) 1)/(2:ℝ≥0∞)^n)* + ((C:ℝ≥0∞)^n*Measure.hausdorffMeasure (n:ℝ) A) := mul_le_mul' le_rfl hh + _ = _ := by ac_rfl + +theorem normalized_hausdorff_real_image_le {n : ℕ} {C : ℝ≥0} {u : X → Y} {A : Set X} + (hu : LipschitzOnWith C u A) (hA : hausdorff n X A ≠ ⊤) : + (hausdorff n Y).real (u '' A) ≤ (C:ℝ)^n*(hausdorff n X).real A := by + have hh := ENNReal.toReal_mono (ENNReal.mul_ne_top + (ENNReal.pow_ne_top ENNReal.coe_ne_top) hA) (normalized_hausdorff_image_le hu) + simpa only [ENNReal.toReal_mul,ENNReal.toReal_pow,ENNReal.coe_toReal,Measure.real] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatEntropy.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatEntropy.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9268430f15bd24b16f39c0dbc9a31cf637377ee --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatEntropy.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Heat.HeatEntropyVariation +import OAI.Geometry.RCD.Coordinates.NormalizedTiltLpVariation + +namespace OAI + +/-! # The entropy response of the normalized heat perturbation -/ + +open Set Filter MeasureTheory +open scoped NNReal Topology +noncomputable section +namespace RegularPointCoordinates + +theorem entropy_density_mul {a r : ℝ} (ha : 0 by + rw [Real.norm_eq_abs,abs_of_pos (Real.exp_pos _)] + apply Real.exp_le_exp.mpr + exact (le_abs_self _).trans (by rw [abs_mul]; gcongr; exact hgb x) + exact (hi.bdd_mul (hg.const_mul t |>.exp.aestronglyMeasurable) hb).congr + (exponentialTiltLp_coe μ r hg hgb t).symm + +theorem integral_entropy_mul {a : ℝ} {r : X → ℝ} (ha : 0 r x*Real.log (r x)) μ) : + (∫ x, (a*r x)*Real.log (a*r x) ∂μ)= + a*(∫ x, r x*Real.log (r x) ∂μ)+(a*Real.log a)*(∫ x, r x ∂μ) := by + rw [integral_congr_ae (hr.mono fun x hx => entropy_density_mul ha hx), + integral_add (he.const_mul _) (hi.const_mul _),integral_const_mul,integral_const_mul] + +variable [MetricSpace X] [BorelSpace X] [ProperSpace X] [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) + +theorem heat_normalized_entropy_hasDerivAt_zero (r : Lp ℝ 2 μ) (hr : 0≤r) + (hri : Integrable r μ) (hm : (∫ x, r x ∂μ)=1) + {g : X → ℝ} (hg : Measurable g) {M : ℝ≥0} (hgb : ∀ x, |g x|≤M) + (s : ℝ) + (he : Integrable (fun x => heatAt μ hQ s r x*Real.log (heatAt μ hQ s r x)) μ) + (hmass : ∀ t : ℝ, (∫ x, heatAt μ hQ s (exponentialTiltLp μ r hg hgb t) x ∂μ)= + ∫ x, Real.exp (t*g x)*r x ∂μ) : + HasDerivAt (fun t : ℝ => ∫ x, heatAt μ hQ s (normalizedTiltLp μ r hg hgb t) x* + Real.log (heatAt μ hQ s (normalizedTiltLp μ r hg hgb t) x) ∂μ) + ((∫ x, (1+Real.log (heatAt μ hQ s r x))* + heatAt μ hQ s (lpMultiplier μ (boundedMultiplier μ g hg M hgb) r) x ∂μ)- + (∫ x, g x*r x ∂μ)*((∫ x, heatAt μ hQ s r x*Real.log (heatAt μ hQ s r x) ∂μ)+1)) 0 := by + let Z := fun t : ℝ => ∫ x, Real.exp (t*g x)*r x ∂μ + have hZ : HasDerivAt Z (∫ x, g x*r x ∂μ) 0 := + exponential_tilt_integral_hasDerivAt_zero μ hri hg hgb + have hZ0 : Z 0=1 := by simpa only [Z,zero_mul,Real.exp_zero,one_mul] using hm + have hZn : Z 0≠0 := by rw [hZ0]; exact one_ne_zero + have hW := heat_exponential_entropy_hasDerivAt_zero μ hQ r hr hri hg hgb s he + have hD := ((hZ.inv hZn).mul hW).sub (hZ.log hZn) + have hD' : HasDerivAt + (fun t : ℝ => (Z t)⁻¹*(∫ x, heatAt μ hQ s (exponentialTiltLp μ r hg hgb t) x* + Real.log (heatAt μ hQ s (exponentialTiltLp μ r hg hgb t) x) ∂μ)-Real.log (Z t)) + ((∫ x, (1+Real.log (heatAt μ hQ s r x))* + heatAt μ hQ s (lpMultiplier μ (boundedMultiplier μ g hg M hgb) r) x ∂μ)- + (∫ x, g x*r x ∂μ)*((∫ x, heatAt μ hQ s r x*Real.log (heatAt μ hQ s r x) ∂μ)+1)) 0 := by + convert hD using 1 + simp only [Pi.inv_apply,hZ0,inv_one,one_pow,div_one,one_mul,exponentialTiltLp_zero] + ring + apply hD'.congr_of_eventuallyEq + have hnear : ∀ᶠ t : ℝ in 𝓝 0, 0 ((Z t)⁻¹ • heatAt μ hQ s (exponentialTiltLp μ r hg hgb t)) x* + Real.log (((Z t)⁻¹ • heatAt μ hQ s (exponentialTiltLp μ r hg hgb t)) x)) =ᵐ[μ] + fun x => ((Z t)⁻¹*heatAt μ hQ s (exponentialTiltLp μ r hg hgb t) x)* + Real.log ((Z t)⁻¹*heatAt μ hQ s (exponentialTiltLp μ r hg hgb t) x) := by + filter_upwards [hrep] with x hx + simp only [Pi.smul_apply,smul_eq_mul] at hx + rw [hx] + rw [integral_congr_ae hrep'] + rw [integral_entropy_mul μ (inv_pos.mpr ht) + ((Lp.coeFn_nonneg _).mpr (heat_exponential_nonneg μ hQ r hr hg hgb s t)) hi + (heat_exponential_entropy_integrable μ hQ r hr hg hgb s t (heatAt_integrable μ hQ s r hri) he),hmass] + change (Z t)⁻¹*_+((Z t)⁻¹*Real.log (Z t)⁻¹)*(Z t)=_ + rw [Real.log_inv] + field_simp + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMassLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMassLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..c890e1fbc8239cb09354bbe79b5ba0d6e4edf392 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMassLimit.lean @@ -0,0 +1,40 @@ +import Mathlib.Analysis.SpecificLimits.Basic + +namespace OAI + +/-! # The heat cutoff mass estimate vanishes after physical normalization -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_heat_mass_limit + (r m E v M : ℕ → ℝ) {C K : ℝ} + (hr : ∀ k, 0 < r k) (hm : ∀ k, 0 < m k) + (hM : ∀ k, 0 ≤ M k) (hv : ∀ k, v k ≤ m k) + (hK : K ≤ 0) (hr0 : Tendsto r atTop (𝓝 0)) + (hE0 : Tendsto (fun k => E k/m k) atTop (𝓝 0)) + (hb : ∀ k, M k ≤ (C/(2*r k)^2)/2*E k+ + (-K)*(E k+v k)+m k/((r k)^2*((k:ℝ)+1))) : + Tendsto (fun k => (r k)^2*M k/m k) atTop (𝓝 0) := by + have hlim : Tendsto (fun k => C/8*(E k/m k)+ + (-K)*(r k)^2*(E k/m k+1)+1/((k:ℝ)+1)) atTop (𝓝 0) := by + have hh := ((hE0.const_mul (C/8)).add + (((hr0.pow 2).const_mul (-K)).mul (hE0.add_const 1))).add + tendsto_one_div_add_atTop_nhds_zero_nat + simpa only [zero_pow (by decide : (2:ℕ)≠0),zero_add,mul_zero,zero_mul] using hh + apply squeeze_zero (fun k => div_nonneg (mul_nonneg (sq_nonneg _) (hM k)) (hm k).le) _ hlim + intro k + have hb' : M k ≤ (C/(2*r k)^2)/2*E k+ + (-K)*(E k+m k)+m k/((r k)^2*((k:ℝ)+1)) := by + have hc := mul_le_mul_of_nonneg_left (hv k) (neg_nonneg.mpr hK) + linarith only [hb k,hc] + have hh := mul_le_mul_of_nonneg_left hb' (div_nonneg (sq_nonneg (r k)) (hm k).le) + convert hh using 1 <;> field_simp [(hr k).ne',(hm k).ne']; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMeanLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMeanLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3ce99273afa6f4af2c15e74bb07de5d58162eb3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedHeatMeanLimit.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.RCD.Harmonic.L2ProbabilityPairing +import OAI.Geometry.RCD.Heat.KernelHeatL2Representation + +namespace OAI + +/-! # Heat mean errors at shrinking physical and volume scales -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MeasurableSpace X] + +theorem normalized_l2_probability_pairing (μ : Measure X) + (r m : ℕ → ℝ) (hr : ∀ k, 0 < r k) (hm : ∀ k, 0 < m k) + (ν : ℕ → Y → Measure X) [∀ k y, IsProbabilityMeasure (ν k y)] + {C : ℝ} (hC : 0 ≤ C) + (hν : ∀ k y, ν k y ≤ ENNReal.ofReal (C/m k) • μ) + (F f : ℕ → Lp ℝ 2 μ) + (hF : Tendsto (fun k => ‖F k-f k‖/(r k*Real.sqrt (m k))) atTop (𝓝 0)) : + TendstoUniformly (fun k y => ((∫ x, F k x ∂ν k y)-(∫ x, f k x ∂ν k y))/r k) + (fun _ => 0) atTop := by + have hn : Tendsto (fun k => Real.sqrt C*(‖F k-f k‖/(r k*Real.sqrt (m k)))) + atTop (𝓝 0) := by simpa only [mul_zero] using hF.const_mul (Real.sqrt C) + apply Metric.tendstoUniformly_iff.mpr + intro e he + filter_upwards [(tendsto_order.mp hn).2 e he] with k hk y + have hi (g : Lp ℝ 2 μ) : Integrable g (ν k y) := + (((Lp.memLp g).of_measure_le_smul ENNReal.ofReal_ne_top (hν k y)).mono_exponent + (by norm_num : (1:ℝ≥0∞) ≤ 2)).integrable (by norm_num) + have hbound := integral_abs_le_l2_of_domination μ (ν k y) ENNReal.ofReal_ne_top + (hν k y) (fun x => (F k-f k : Lp ℝ 2 μ) x) (Lp.memLp (F k-f k)) + have hae : F k-f k =ᵐ[ν k y] fun x => F k x-f k x := + (Measure.absolutelyContinuous_of_le_smul (hν k y)).ae_eq (Lp.coeFn_sub (F k) (f k)) + have heq : (∫ x, |(F k-f k : Lp ℝ 2 μ) x| ∂ν k y)=∫ x, |F k x-f k x| ∂ν k y := + integral_congr_ae (by filter_upwards [hae] with x hx; rw [hx]) + have hcoef : (ENNReal.ofReal (C/m k)^(1/2:ℝ)).toReal=Real.sqrt C/Real.sqrt (m k) := by + rw [← ENNReal.toReal_rpow,ENNReal.toReal_ofReal (div_nonneg hC (hm k).le), + ← Real.sqrt_eq_rpow,Real.sqrt_div hC] + rw [heq,hcoef] at hbound + change (∫ x, |F k x-f k x| ∂ν k y) ≤ Real.sqrt C/Real.sqrt (m k)*‖F k-f k‖ at hbound + have habs := abs_integral_le_integral_abs (f := fun x => F k x-f k x) (μ := ν k y) + rw [integral_sub (hi (F k)) (hi (f k))] at habs + have hfinal : |((∫ x, F k x ∂ν k y)-(∫ x, f k x ∂ν k y))/r k| ≤ + Real.sqrt C*(‖F k-f k‖/(r k*Real.sqrt (m k))) := by + rw [abs_div,abs_of_pos (hr k)] + apply (div_le_div_of_nonneg_right (habs.trans hbound) (hr k).le).trans_eq + ring + simpa only [dist_zero_left,Real.norm_eq_abs] using hfinal.trans_lt hk + +end RegularPointCoordinates + +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] (Q : QuadraticCheegerEnergy μ) + +theorem normalized_heat_means_limit {ker : ℕ → ℝ → X → X → ℝ} + (hk : ∀ k, IsContinuousHeatKernel μ Q (ker k)) + (r m : ℕ → ℝ) (hr : ∀ k, 0 < r k) (hm : ∀ k, 0 < m k) + (ν : ℕ → Y → Measure X) [∀ k y, IsProbabilityMeasure (ν k y)] + {C : ℝ} (hC : 0 ≤ C) + (hν : ∀ k y, ν k y ≤ ENNReal.ofReal (C/m k) • μ) + (u : ℕ → SobolevSpace μ Q) (U : ℕ → X → ℝ) + (hU : ∀ k, SobolevSpace.toLp μ Q (u k) =ᵐ[μ] U k) + (s : ℕ → ℝ) (hs : ∀ k, 0 < s k) + (hval : Tendsto (fun k => + ‖heatSobolev μ Q (s k) (hs k) (SobolevSpace.toLp μ Q (u k))-u k‖/ + (r k*Real.sqrt (m k))) atTop (𝓝 0)) : + TendstoUniformly (fun k y => + ((∫ x, kernelHeat μ Q (hk k) (s k) (SobolevSpace.toLp μ Q (u k)) x ∂ν k y)- + (∫ x, U k x ∂ν k y))/r k) (fun _ => 0) atTop := by + have hnorm : Tendsto (fun k => + ‖heatAt μ Q (s k) (SobolevSpace.toLp μ Q (u k))-SobolevSpace.toLp μ Q (u k)‖/ + (r k*Real.sqrt (m k))) atTop (𝓝 0) := by + apply squeeze_zero (fun k => div_nonneg (norm_nonneg _) + (mul_pos (hr k) (Real.sqrt_pos.mpr (hm k))).le) _ hval + intro k + apply div_le_div_of_nonneg_right _ (mul_pos (hr k) (Real.sqrt_pos.mpr (hm k))).le + simpa only [map_sub,heatSobolev_toLp] using + SobolevSpace.norm_toLp_le μ Q + (heatSobolev μ Q (s k) (hs k) (SobolevSpace.toLp μ Q (u k))-u k) + have hlim := normalized_l2_probability_pairing μ r m hr hm ν hC hν + (fun k => heatAt μ Q (s k) (SobolevSpace.toLp μ Q (u k))) + (fun k => SobolevSpace.toLp μ Q (u k)) hnorm + have hheat (k : ℕ) (y : Y) : + (∫ x, kernelHeat μ Q (hk k) (s k) (SobolevSpace.toLp μ Q (u k)) x ∂ν k y)= + ∫ x, heatAt μ Q (s k) (SobolevSpace.toLp μ Q (u k)) x ∂ν k y := + integral_congr_ae ((Measure.absolutelyContinuous_of_le_smul (hν k y)).ae_eq + (kernelHeat_represents_L2 μ Q (hk k) (hs k) _)) + have horig (k : ℕ) (y : Y) : + (∫ x, U k x ∂ν k y)=∫ x, SobolevSpace.toLp μ Q (u k) x ∂ν k y := + integral_congr_ae ((Measure.absolutelyContinuous_of_le_smul (hν k y)).ae_eq (hU k).symm) + simpa only [hheat,horig] using hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedJetStep.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedJetStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b44e4d03e3619a9201a125eb878d84db7bc3e47 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedJetStep.lean @@ -0,0 +1,312 @@ +import OAI.Geometry.RCD.Coordinates.InverseJetBounds +import OAI.Geometry.RCD.Coordinates.JetStep + +namespace OAI + +/-! +# The normalized coordinate update + +The update is `h + (Dh)⁻ᵀ v`. Inverse-transpose bounds, the bilinear +product estimate, and scalar dyadic contraction control iterated +Fréchet derivatives with one positive parameter for every order. +-/ + +open Filter +open scoped ContDiff Topology + +noncomputable section + +namespace RegularPointCoordinates + +variable {X F G : Type*} +variable [NormedAddCommGroup X] [NormedSpace ℝ X] +variable [NormedAddCommGroup F] [NormedSpace ℝ F] +variable [NormedAddCommGroup G] [NormedSpace ℝ G] + +/-- The factorial product bound also holds for smoothness only at the +base point. Each finite order uses a common open neighborhood. -/ +theorem clm_apply_factorialMajorant_bound_at + {f : X → F →L[ℝ] G} {g : X → F} {x : X} + {B C D : ℝ} {m : ℕ} (hB : 0 < B) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffAt ℝ m f x) (hg : ContDiffAt ℝ m g x) + (hfbound : ∀ i, i ≤ m → ‖iteratedFDeriv ℝ i f x‖ ≤ + C * factorialMajorant i * jetCoefficientScale B i) + (hgbound : ∀ i, i ≤ m → ‖iteratedFDeriv ℝ i g x‖ ≤ + D * factorialMajorant i * jetCoefficientScale B i) : + ‖iteratedFDeriv ℝ m (fun y => f y (g y)) x‖ ≤ + (10 * C * D) * factorialMajorant m * jetCoefficientScale B m := by + obtain ⟨u, hu, hfu⟩ := hf.contDiffOn le_rfl (by simp) + obtain ⟨v, hv, hgv⟩ := hg.contDiffOn le_rfl (by simp) + obtain ⟨s, hsu, hs, hx⟩ := mem_nhds_iff.mp (inter_mem hu hv) + have heqF (i : ℕ) : iteratedFDerivWithin ℝ i f s x = iteratedFDeriv ℝ i f x := + iteratedFDerivWithin_of_isOpen i hs hx + have heqG (i : ℕ) : iteratedFDerivWithin ℝ i g s x = iteratedFDeriv ℝ i g x := + iteratedFDerivWithin_of_isOpen i hs hx + have hbound := clm_apply_factorialMajorant_bound hB hC hD + (hfu.mono (fun y hy => (hsu hy).1)) (hgv.mono (fun y hy => (hsu hy).2)) + hs.uniqueDiffOn hx + (fun i hi => by simpa only [heqF] using hfbound i hi) + (fun i hi => by simpa only [heqG] using hgbound i hi) + rwa [iteratedFDerivWithin_of_isOpen m hs hx] at hbound + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Smoothness of the inverse-transpose field is automatic at each +point at which the Jacobian is invertible. -/ +theorem contDiffAt_inverseTranspose_field + {J : X → E →L[ℝ] E} {x : X} {m : ℕ} + (hJ : ContDiffAt ℝ m J x) (hunit : IsUnit (J x)) : + ContDiffAt ℝ m (fun y => operatorInverseTranspose (J y)) x := by + obtain ⟨u, hu⟩ := hunit + have hi := contDiffAt_ringInverse ℝ (n := (m : ℕ∞ω)) u + rw [hu] at hi + exact adjointOperator.contDiff.contDiffAt.comp x (hi.comp x hJ) + +omit [CompleteSpace E] in +/-- The source jet bound supplies precisely the Jacobian weight used by +the inverse-majorant theorem, with no enlargement of the base. -/ +theorem jacobian_jet_bound_of_source_jet_bound + {h : E → E} {x : E} {B : ℝ} + (hbound : ∀ m, 2 ≤ m → ‖iteratedFDeriv ℝ m h x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) + {m : ℕ} (hm : 0 < m) : + ‖iteratedFDeriv ℝ m (fderiv ℝ h) x‖ ≤ + factorialMajorant m * jetCoefficientScale B m := by + rw [norm_iteratedFDeriv_fderiv] + calc + _ ≤ B ^ ((m + 1) - 1) * ((m + 1).factorial : ℝ) ^ 3 := hbound (m + 1) (by omega) + _ = _ := by + simp only [Nat.add_sub_cancel] + unfold factorialMajorant jetCoefficientScale + rw [Nat.factorial_succ] + push_cast + ring + +/-- With explicit Jacobian jets, the actual inverse-transpose update +preserves every normalized jet of order at least two. -/ +theorem exists_normalized_jet_step_of_jacobian_bounds + {A B Cv : ℝ} (hA : 1 ≤ A) (hB : 0 < B) (hCv : 0 ≤ Cv) : + ∃ epsilon : ℝ, 0 < epsilon ∧ + ∀ (h : E → E) (J : E → E →L[ℝ] E) (v : E → E) (x : E), + (∀ m : ℕ, ContDiffAt ℝ m h x) → + (∀ m : ℕ, ContDiffAt ℝ m J x) → + (∀ m : ℕ, ContDiffAt ℝ m v x) → IsUnit (J x) → + ‖Ring.inverse (J x)‖ ≤ Real.sqrt A → + (∀ m, 2 ≤ m → ‖iteratedFDeriv ℝ m h x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) → + (∀ m, 0 < m → ‖iteratedFDeriv ℝ m J x‖ ≤ + factorialMajorant m * jetCoefficientScale B m) → + (∀ m, ‖iteratedFDeriv ℝ m v x‖ ≤ + epsilon * Cv * factorialMajorant m * jetCoefficientScale B m) → + ∀ m, 2 ≤ m → + (2 / (2 : ℝ) ^ m) * + ‖iteratedFDeriv ℝ m (fun y => h y + operatorInverseTranspose (J y) (v y)) x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + obtain ⟨C, hC0, _, hinverse⟩ := + inverseTranspose_iteratedFDeriv_uniform_bound (E := E) (X := E) hA + have hC : 0 ≤ C := (Real.sqrt_nonneg A).trans hC0 + have htotal : 0 ≤ 10 * C * Cv := mul_nonneg (mul_nonneg (by norm_num) hC) hCv + obtain ⟨epsilon, hepsilon, hstep⟩ := exists_uniform_scalar_jet_step hB.le htotal + refine ⟨epsilon, hepsilon, ?_⟩ + intro h J v x hh hJ hv hunit hInv hsource hJacobian hfield m hm + let K : E → E →L[ℝ] E := fun y => operatorInverseTranspose (J y) + have hK : ∀ i : ℕ, ContDiffAt ℝ i K x := + fun i => contDiffAt_inverseTranspose_field (hJ i) hunit + have hKbound : ∀ i, ‖iteratedFDeriv ℝ i K x‖ ≤ + C * factorialMajorant i * jetCoefficientScale B i := + hinverse B hB J x hJ hunit hInv hJacobian + have hproduct : ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖ ≤ + epsilon * (10 * C * Cv) * B ^ m * factorialMajorant m * (m.factorial : ℝ) := by + have hp := clm_apply_factorialMajorant_bound_at hB hC + (mul_nonneg hepsilon.le hCv) (hK m) (hv m) + (fun i _ => hKbound i) (fun i _ => hfield i) + calc + _ ≤ (10 * C * (epsilon * Cv)) * factorialMajorant m * jetCoefficientScale B m := hp + _ = _ := by unfold jetCoefficientScale; ring + have hadd : ‖iteratedFDeriv ℝ m (fun y => h y + K y (v y)) x‖ ≤ + ‖iteratedFDeriv ℝ m h x‖ + ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖ := by + rw [show (fun y => h y + K y (v y)) = h + (fun y => K y (v y)) from rfl, + iteratedFDeriv_add_apply (hh m) ((hK m).clm_apply (hv m))] + exact norm_add_le _ _ + calc + _ ≤ (2 / (2 : ℝ) ^ m) * + (‖iteratedFDeriv ℝ m h x‖ + ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖) := + mul_le_mul_of_nonneg_left hadd (by positivity) + _ ≤ _ := hstep m _ _ hm (hsource m hm) hproduct + +/-- The normalized coordinate update with the genuine derivative field. +There is one positive `epsilon` for all orders, all maps, and all base +points satisfying the stated source and correction jet bounds. -/ +theorem exists_normalized_jet_step + {A B Cv : ℝ} (hA : 1 ≤ A) (hB : 0 < B) (hCv : 0 ≤ Cv) : + ∃ epsilon : ℝ, 0 < epsilon ∧ + ∀ (h v : E → E) (x : E), + (∀ m : ℕ, ContDiffAt ℝ m h x) → + (∀ m : ℕ, ContDiffAt ℝ m v x) → IsUnit (fderiv ℝ h x) → + ‖Ring.inverse (fderiv ℝ h x)‖ ≤ Real.sqrt A → + (∀ m, 2 ≤ m → ‖iteratedFDeriv ℝ m h x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3) → + (∀ m, ‖iteratedFDeriv ℝ m v x‖ ≤ + epsilon * Cv * factorialMajorant m * jetCoefficientScale B m) → + ∀ m, 2 ≤ m → + (2 / (2 : ℝ) ^ m) * + ‖iteratedFDeriv ℝ m (fun y => h y + + operatorInverseTranspose (fderiv ℝ h y) (v y)) x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + obtain ⟨epsilon, hepsilon, hstep⟩ := + exists_normalized_jet_step_of_jacobian_bounds (E := E) hA hB hCv + refine ⟨epsilon, hepsilon, ?_⟩ + intro h v x hh hv hunit hInv hsource hfield + exact hstep h (fderiv ℝ h) v x hh + (fun m => (hh (m + 1)).fderiv_right (by simp)) hv hunit hInv hsource + (fun _ hm => jacobian_jet_bound_of_source_jet_bound hsource hm) hfield + +/-- The universal inverse constant also controls every finite prefix. +Zero extension beyond the requested order supplies an admissible full +recurrence; it does not assume any derivative bound at higher orders. -/ +theorem inverse_jet_finite_uniform_bound {A : ℝ} (hA : 1 ≤ A) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (N : ℕ) (j k : ℕ → ℝ), + (∀ q ≤ N, 0 ≤ j q) → (∀ q ≤ N, 0 ≤ k q) → k 0 ≤ Real.sqrt A → + (∀ q, 0 < q → q ≤ N → j q ≤ factorialMajorant q * jetCoefficientScale B q) → + (∀ q, 0 < q → q ≤ N → k q ≤ Real.sqrt A * + ∑ i ∈ Finset.Icc 1 q, (q.choose i : ℝ) * j i * k (q - i)) → + ∀ q ≤ N, k q ≤ C * factorialMajorant q * jetCoefficientScale B q := by + obtain ⟨C, hC0, hCA, hC⟩ := inverse_jet_uniform_bound hA + refine ⟨C, hC0, hCA, ?_⟩ + intro B hB N j k hj hk hkzero hjbound hrec + let j' : ℕ → ℝ := fun q => if q ≤ N then j q else 0 + let k' : ℕ → ℝ := fun q => if q ≤ N then k q else 0 + have hjnonneg : ∀ q, 0 ≤ j' q := by + intro q + by_cases hq : q ≤ N + · simpa only [j', ite_eq_left hq] using hj q hq + · simp only [j', ite_eq_right hq, le_refl] + have hknonneg : ∀ q, 0 ≤ k' q := by + intro q + by_cases hq : q ≤ N + · simpa only [k', ite_eq_left hq] using hk q hq + · simp only [k', ite_eq_right hq, le_refl] + have hjbound' : ∀ q, 0 < q → j' q ≤ factorialMajorant q * jetCoefficientScale B q := by + intro q hqpos + by_cases hq : q ≤ N + · simpa only [j', ite_eq_left hq] using hjbound q hqpos hq + · simp only [j', ite_eq_right hq] + exact mul_nonneg (factorialMajorant_pos q).le (jetCoefficientScale_pos hB q).le + have hrec' : ∀ q, 0 < q → k' q ≤ Real.sqrt A * + ∑ i ∈ Finset.Icc 1 q, (q.choose i : ℝ) * j' i * k' (q - i) := by + intro q hqpos + by_cases hq : q ≤ N + · have hsum : (∑ i ∈ Finset.Icc 1 q, (q.choose i : ℝ) * j' i * k' (q - i)) = + ∑ i ∈ Finset.Icc 1 q, (q.choose i : ℝ) * j i * k (q - i) := by + apply Finset.sum_congr rfl + intro i hi + have hiN : i ≤ N := (Finset.mem_Icc.mp hi).2.trans hq + have hsubN : q - i ≤ N := (Nat.sub_le _ _).trans hq + simp only [j', k', ite_eq_left hiN, ite_eq_left hsubN] + rw [hsum] + simpa only [k', ite_eq_left hq] using hrec q hqpos hq + · simp only [k', ite_eq_right hq] + apply mul_nonneg (Real.sqrt_nonneg A) + apply Finset.sum_nonneg + intro i _ + exact mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (hjnonneg i)) (hknonneg (q - i)) + have hbound := hC B hB j' k' hknonneg (by simpa [k'] using hkzero) hjbound' hrec' + intro q hq + simpa only [k', ite_eq_left hq] using hbound q + +/-- Actual inverse-transpose derivatives through a finite order use only +Jacobian derivatives through that same order. The constant does not +depend on the finite cutoff. -/ +theorem inverseTranspose_iteratedFDeriv_finite_uniform_bound {A : ℝ} (hA : 1 ≤ A) : + ∃ C : ℝ, Real.sqrt A ≤ C ∧ 2 * A ≤ C ∧ + ∀ (B : ℝ), 0 < B → ∀ (N : ℕ) (J : E → E →L[ℝ] E) (x : E), + ContDiffAt ℝ N J x → IsUnit (J x) → ‖Ring.inverse (J x)‖ ≤ Real.sqrt A → + (∀ q, 0 < q → q ≤ N → ‖iteratedFDeriv ℝ q J x‖ ≤ + factorialMajorant q * jetCoefficientScale B q) → + ∀ q ≤ N, ‖iteratedFDeriv ℝ q (fun y => operatorInverseTranspose (J y)) x‖ ≤ + C * factorialMajorant q * jetCoefficientScale B q := by + obtain ⟨C, hC0, hCA, hC⟩ := inverse_jet_finite_uniform_bound hA + refine ⟨C, hC0, hCA, ?_⟩ + intro B hB N J x hJ hunit hInv hJacobian q hq + rw [norm_iteratedFDeriv_inverseTranspose] + apply hC B hB N (fun i => ‖iteratedFDeriv ℝ i J x‖) + (fun i => ‖iteratedFDeriv ℝ i (fun y => Ring.inverse (J y)) x‖) + · exact fun _ _ => norm_nonneg _ + · exact fun _ _ => norm_nonneg _ + · simpa only [norm_iteratedFDeriv_zero] using hInv + · exact hJacobian + · intro i hipos hiN + apply (norm_iteratedFDeriv_ringInverse_le + (hJ.of_le (by exact_mod_cast hiN)) hunit hipos).trans + apply mul_le_mul_of_nonneg_right hInv + apply Finset.sum_nonneg + intro l _ + positivity + · exact hq + +/-- Finite-order form of the genuine coordinate update. To preserve +order `m`, only source jets through `m + 1` and correction jets through +`m` are needed. The positive parameter is independent of `m`. -/ +theorem exists_normalized_jet_step_finite + {A B Cv : ℝ} (hA : 1 ≤ A) (hB : 0 < B) (hCv : 0 ≤ Cv) : + ∃ epsilon : ℝ, 0 < epsilon ∧ + ∀ (m : ℕ), 2 ≤ m → ∀ (h v : E → E) (x : E), + ContDiffAt ℝ (m + 1) h x → ContDiffAt ℝ m v x → + IsUnit (fderiv ℝ h x) → ‖Ring.inverse (fderiv ℝ h x)‖ ≤ Real.sqrt A → + (∀ q, 2 ≤ q → q ≤ m + 1 → ‖iteratedFDeriv ℝ q h x‖ ≤ + B ^ (q - 1) * (q.factorial : ℝ) ^ 3) → + (∀ q, q ≤ m → ‖iteratedFDeriv ℝ q v x‖ ≤ + epsilon * Cv * factorialMajorant q * jetCoefficientScale B q) → + (2 / (2 : ℝ) ^ m) * + ‖iteratedFDeriv ℝ m (fun y => h y + + operatorInverseTranspose (fderiv ℝ h y) (v y)) x‖ ≤ + B ^ (m - 1) * (m.factorial : ℝ) ^ 3 := by + obtain ⟨C, hC0, _, hinverse⟩ := + inverseTranspose_iteratedFDeriv_finite_uniform_bound (E := E) hA + have hC : 0 ≤ C := (Real.sqrt_nonneg A).trans hC0 + have htotal : 0 ≤ 10 * C * Cv := mul_nonneg (mul_nonneg (by norm_num) hC) hCv + obtain ⟨epsilon, hepsilon, hstep⟩ := exists_uniform_scalar_jet_step hB.le htotal + refine ⟨epsilon, hepsilon, ?_⟩ + intro m hm h v x hh hv hunit hInv hsource hfield + let J : E → E →L[ℝ] E := fderiv ℝ h + let K : E → E →L[ℝ] E := fun y => operatorInverseTranspose (J y) + have hJ : ContDiffAt ℝ m J x := hh.fderiv_right (by simp) + have hK : ContDiffAt ℝ m K x := contDiffAt_inverseTranspose_field hJ hunit + have hJacobian : ∀ q, 0 < q → q ≤ m → ‖iteratedFDeriv ℝ q J x‖ ≤ + factorialMajorant q * jetCoefficientScale B q := by + intro q hqpos hqm + rw [norm_iteratedFDeriv_fderiv] + calc + _ ≤ B ^ ((q + 1) - 1) * ((q + 1).factorial : ℝ) ^ 3 := + hsource (q + 1) (by omega) (by omega) + _ = _ := by + simp only [Nat.add_sub_cancel] + unfold factorialMajorant jetCoefficientScale + rw [Nat.factorial_succ] + push_cast + ring + have hKbound := hinverse B hB m J x hJ hunit hInv hJacobian + have hproduct : ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖ ≤ + epsilon * (10 * C * Cv) * B ^ m * factorialMajorant m * (m.factorial : ℝ) := by + have hp := clm_apply_factorialMajorant_bound_at hB hC + (mul_nonneg hepsilon.le hCv) hK hv hKbound hfield + calc + _ ≤ (10 * C * (epsilon * Cv)) * factorialMajorant m * jetCoefficientScale B m := hp + _ = _ := by unfold jetCoefficientScale; ring + have hadd : ‖iteratedFDeriv ℝ m (fun y => h y + K y (v y)) x‖ ≤ + ‖iteratedFDeriv ℝ m h x‖ + ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖ := by + rw [show (fun y => h y + K y (v y)) = h + (fun y => K y (v y)) from rfl, + iteratedFDeriv_add_apply (hh.of_le (by norm_cast; omega)) (hK.clm_apply hv)] + exact norm_add_le _ _ + calc + _ ≤ (2 / (2 : ℝ) ^ m) * + (‖iteratedFDeriv ℝ m h x‖ + ‖iteratedFDeriv ℝ m (fun y => K y (v y)) x‖) := + mul_le_mul_of_nonneg_left hadd (by positivity) + _ ≤ _ := hstep m _ _ hm (hsource m hm (by omega)) hproduct + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedL1FromL2.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL1FromL2.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ab37b364de6602dc53565829bfc478f4a60c2a3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL1FromL2.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Sobolev.LocalScaledGammaL2 + +namespace OAI + +/-! # Vanishing normalized quadratic error controls normalized absolute error -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_l1_tendsto_of_l2 {X : Type*} [MeasurableSpace X] + (μ : Measure X) (Ω : ℕ → Set X) (c : ℕ → ℝ) (hc : ∀ k, 0 ≤ c k) + (hmass : ∀ k, c k*μ.real (Ω k) ≤ 1) (f : ℕ → X → ℝ) + (hf : ∀ k, IntegrableOn (f k) (Ω k) μ) + (hf2 : ∀ᶠ k in atTop, IntegrableOn (fun x => (f k x)^2) (Ω k) μ) + (hfin : ∀ k, μ (Ω k) ≠ ⊤) + (hlim : Tendsto (fun k => c k*∫ x in Ω k, (f k x)^2 ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => c k*∫ x in Ω k, |f k x| ∂μ) atTop (𝓝 0) := by + apply tendsto_order.mpr + constructor + · intro a ha + exact Eventually.of_forall (fun k => ha.trans_le + (mul_nonneg (hc k) (integral_nonneg (fun _ => abs_nonneg _)))) + · intro b hb + let δ := b/2 + have hδ : 0 < δ := half_pos hb + have he : ∀ x : ℝ, |x| ≤ δ+δ⁻¹*x^2 := by + intro x + calc + |x| ≤ (δ^2+x^2)/δ := (le_div_iff₀ hδ).mpr (by + nlinarith [sq_nonneg (|x|-δ),sq_abs x,mul_nonneg (abs_nonneg x) hδ.le]) + _ = δ+δ⁻¹*x^2 := by field_simp + filter_upwards [hf2,hlim.eventually (Iio_mem_nhds (sq_pos_of_pos hδ))] with k hk hs + have hi0 : IntegrableOn (fun _ : X => δ) (Ω k) μ := integrableOn_const (hfin k) + have hi := integral_mono_ae (hf k).abs + (hi0.add (hk.const_mul δ⁻¹)) + (Eventually.of_forall (fun x => he (f k x))) + simp only [Pi.add_apply] at hi + rw [integral_add hi0 (hk.const_mul δ⁻¹), + integral_const,integral_const_mul] at hi + simp only [measureReal_restrict_apply_univ,smul_eq_mul] at hi + have hmul := mul_le_mul_of_nonneg_left hi (hc k) + have hsmall : δ⁻¹*(c k*∫ x in Ω k, (f k x)^2 ∂μ) < δ := by + calc + _ < δ⁻¹*δ^2 := mul_lt_mul_of_pos_left hs (inv_pos.mpr hδ) + _ = δ := by field_simp + have hm := mul_le_mul_of_nonneg_left (hmass k) hδ.le + dsimp only [δ] at hmul hsmall hm ⊢ + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2LimitBound.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2LimitBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8e1b9a57cfa8ae142c38cb8654f120e40e819f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2LimitBound.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedUniformL2 + +namespace OAI + +/-! # Retaining the exact normalized L2 bound in a value limit -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem square_add_le_weighted {t : ℝ} (ht : 0 ((μ k).real univ)⁻¹* + (∫ x, (f k x-u k x)^2 ∂μ k)) atTop (𝓝 0)) + {V : ℝ} (hvalue : Tendsto (fun k => ((μ k).real univ)⁻¹* + (∫ x, (f k x)^2 ∂μ k)) atTop (𝓝 V)) : V≤1 := by + apply le_of_forall_pos_le_add + intro t ht + have hi (k : ℕ) : ((μ k).real univ)⁻¹*(∫ x, (f k x)^2 ∂μ k)≤ + 1+t+(1+t⁻¹)*(((μ k).real univ)⁻¹*(∫ x, (f k x-u k x)^2 ∂μ k)) := by + have he := (hf k).sub (hu k) + have hI := integral_mono_ae (hf k).integrable_sq + (((hu k).integrable_sq.const_mul (1+t)).add (he.integrable_sq.const_mul (1+t⁻¹))) + (Eventually.of_forall fun x => by + simpa only [Pi.add_apply,Pi.sub_apply,add_sub_cancel] using + square_add_le_weighted ht (u k x) (f k x-u k x)) + simp only [Pi.add_apply] at hI + rw [integral_add ((hu k).integrable_sq.const_mul (1+t)) (he.integrable_sq.const_mul (1+t⁻¹)), + integral_const_mul,integral_const_mul] at hI + calc + _ ≤ ((μ k).real univ)⁻¹*((1+t)*(∫ x, (u k x)^2 ∂μ k)+ + (1+t⁻¹)*(∫ x, (f k x-u k x)^2 ∂μ k)) := + mul_le_mul_of_nonneg_left hI (inv_nonneg.mpr (hmass k).le) + _ = (1+t)*(((μ k).real univ)⁻¹*(∫ x, (u k x)^2 ∂μ k))+ + (1+t⁻¹)*(((μ k).real univ)⁻¹*(∫ x, (f k x-u k x)^2 ∂μ k)) := by ring + _ ≤ _ := by nlinarith only [mul_le_mul_of_nonneg_left (hub k) (show 0≤1+t by linarith)] + have hright : Tendsto (fun k => 1+t+(1+t⁻¹)*(((μ k).real univ)⁻¹* + (∫ x, (f k x-u k x)^2 ∂μ k))) atTop (𝓝 (1+t)) := by + simpa only [mul_zero,add_zero] using (herror.const_mul (1+t⁻¹)).const_add (1+t) + exact le_of_tendsto_of_tendsto hvalue hright (Eventually.of_forall hi) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2ProductError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2ProductError.lean new file mode 100644 index 0000000000000000000000000000000000000000..2571b583aea93ebd065c5633fe8257fa2de4cc01 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedL2ProductError.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Heat.HeatOffDiagonalL2 + +namespace OAI + +/-! # Normalized L2 value errors against uniformly bounded factors -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_l2_product_error_tendsto (μ : ℕ → Measure X) + [∀ k, IsFiniteMeasure (μ k)] (hmass : ∀ k, 0<(μ k).real univ) + (z b : ℕ → X → ℝ) (hz : ∀ k, MemLp (z k) 2 (μ k)) + (hbmeas : ∀ k, AEStronglyMeasurable (b k) (μ k)) {C : ℝ} + (hb : ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |b k x|≤C) + (hlim : Tendsto (fun k => ((μ k).real univ)⁻¹*∫ x, (z k x)^2 ∂μ k) atTop (𝓝 0)) : + Tendsto (fun k => ((μ k).real univ)⁻¹*∫ x, z k x*b k x ∂μ k) atTop (𝓝 0) := by + apply Metric.tendsto_nhds.mpr + intro δ hδ + have hd : 0<δ^2/(C^2+1) := div_pos (sq_pos_of_pos hδ) (by positivity) + filter_upwards [hb,hlim.eventually (Iio_mem_nhds hd)] with k hbk hzk + have hbm : MemLp (b k) 2 (μ k) := MemLp.of_bound (hbmeas k) C + (hbk.mono fun x hx => by simpa only [Real.norm_eq_abs] using hx) + have hbsq : (∫ x, (b k x)^2 ∂μ k)≤C^2*(μ k).real univ := by + have hh := integral_mono_ae hbm.integrable_sq (integrable_const (C^2)) + (hbk.mono fun x hx => by simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg _) hx 2) + simpa only [integral_const,smul_eq_mul,mul_comm] using hh + have hcs := integral_mul_sq_le_integral_sq (μ k) (z k) (b k) (hz k) hbm + have hs : |((μ k).real univ)⁻¹*∫ x, z k x*b k x ∂μ k|^2≤ + (((μ k).real univ)⁻¹*∫ x, (z k x)^2 ∂μ k)*C^2 := by + calc + _ = ((μ k).real univ)⁻¹^2*|∫ x, z k x*b k x ∂μ k|^2 := by rw [abs_mul,mul_pow,sq_abs] + _ ≤ ((μ k).real univ)⁻¹^2*((∫ x, (z k x)^2 ∂μ k)*(∫ x, (b k x)^2 ∂μ k)) := + mul_le_mul_of_nonneg_left hcs (sq_nonneg _) + _ ≤ ((μ k).real univ)⁻¹^2*((∫ x, (z k x)^2 ∂μ k)*(C^2*(μ k).real univ)) := by + apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) + exact mul_le_mul_of_nonneg_left hbsq (integral_nonneg fun _ => sq_nonneg _) + _ = _ := by field_simp [(hmass k).ne'] + have hsmall : (((μ k).real univ)⁻¹*∫ x, (z k x)^2 ∂μ k)*C^2<δ^2 := by + have hzn : 0≤((μ k).real univ)⁻¹*∫ x, (z k x)^2 ∂μ k := + mul_nonneg (inv_nonneg.mpr (hmass k).le) (integral_nonneg fun _ => sq_nonneg _) + have hh := (lt_div_iff₀ (show 0 |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p) + (ball x R) (hausdorff n X) ∧ + (∫ y in ball x R, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p + ∂hausdorff n X) ≤ C*(hausdorff n X).real (ball x R) := by + obtain ⟨C₀, D, hC₀, hD, htail⟩ := hX.dyadic_tail_bound hn + let P : ℝ := 1 + have hP : 0 < P := zero_lt_one + let b := Real.sqrt D + have hDpos : 0 < D := by linarith + have hb0 : 0 < b := Real.sqrt_pos.mpr hDpos + have hb2 : b^2 = D := Real.sq_sqrt hDpos.le + have hb : 1 < b := by nlinarith + let p := 2 + Real.logb b 2 + have hp : 2 < p := by + have hl : 0 < Real.logb b 2 := by + unfold Real.logb + exact div_pos (Real.log_pos (by norm_num)) (Real.log_pos hb) + dsimp only [p] + linarith + have hp0 : 0 < p := by linarith + have hbpow : b^p = 2*D := by + dsimp only [p] + rw [Real.rpow_add hb0, Real.rpow_two, + Real.rpow_logb hb0 (ne_of_gt hb) (by norm_num), hb2] + ring + let σ := Real.sqrt (2*D*P) + have hσ : 0 < σ := Real.sqrt_pos.mpr (by positivity) + have hσ2 : σ^2 = 2*D*P := Real.sq_sqrt (by positivity) + let S := 2*σ + let q := 1/(4*D) + have hq : 0 < q := by dsimp only [q]; positivity + have hdecay : b^p*q = 1/2 := by rw [hbpow]; dsimp only [q]; field_simp; ring + let C := (S*b)^p + 2*(C₀/σ^2)*(S*b^2)^p + have hC : 0 < C := by + have ha : 0 < (S*b)^p := Real.rpow_pos_of_pos (by dsimp only [S]; positivity) _ + have hh : 0 < 2*(C₀/σ^2)*(S*b^2)^p := by positivity + exact add_pos ha hh + refine ⟨p, C, hp, hC, ?_⟩ + intro x R hR hcurv w hl2norm hnorm + let μ := hausdorff n X + let u := SobolevSpace.toLp μ hX.quadratic w.val + let V := μ.real (ball x R) + let E := energyForm μ hX.quadratic w.val w.val + have hV : 0 < V := ENNReal.toReal_pos (hX.fullSupport x R hR).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hE : 0 ≤ E := by + dsimp only [E] + rw [energyForm_self] + exact mul_nonneg (by norm_num) (SobolevSpace.energy_nonneg μ hX.quadratic w.val) + have hnorm' : R^2*E ≤ V := hnorm + have hl2 : ‖u‖^2 ≤ P*V := by simpa only [P, one_mul] using hl2norm + have hcurvR : -1 ≤ K*R^2 := hcurv + have ht2 (k : ℕ) : (σ*b^k)^2 = (2*D*P)*D^k := by + rw [mul_pow, hσ2, ← pow_mul, Nat.mul_comm k 2, pow_mul, hb2] + have hfour (k : ℕ) : ((2:ℝ)^k)^2 = (4:ℝ)^k := by + rw [← pow_mul, Nat.mul_comm k 2, pow_mul] + norm_num + have hlevels (k : ℕ) : (μ.restrict (ball x R)).real {y | S*b^k < |u y|} ≤ + ((C₀/σ^2)*V)*q^k := by + let t := σ*b^k + have ht : 0 < t := mul_pos hσ (pow_pos hb0 _) + have hparam : 2*D^(k+1)*‖u‖^2 ≤ V*t^2 := by + calc + _ ≤ 2*D^(k+1)*(P*V) := mul_le_mul_of_nonneg_left hl2 (by positivity) + _ = _ := by dsimp only [t]; rw [ht2, pow_succ]; ring + have hh := htail x R hR hcurvR w t ht k hparam + change t^2 * μ.real (ball x R ∩ {y | 2*t < |u y|}) ≤ C₀*(R/2^k)^2*E at hh + have hparam' : C₀*(R/2^k)^2*E ≤ C₀*V/(4:ℝ)^k := by + rw [div_pow, hfour] + have hmul := mul_le_mul_of_nonneg_left hnorm' hC₀.le + apply (le_div_iff₀ (pow_pos (by norm_num : (0:ℝ)<4) k)).mpr + field_simp at * + nlinarith + have halg : t^2 * (((C₀/σ^2)*V)*q^k) = C₀*V/(4:ℝ)^k := by + dsimp only [t, q] + rw [ht2, hσ2, div_pow, one_pow, mul_pow] + field_simp + have hmeasure : μ.real (ball x R ∩ {y | 2*t < |u y|}) ≤ ((C₀/σ^2)*V)*q^k := by + apply (mul_le_mul_iff_right₀ (sq_pos_of_pos ht)).mp + rw [halg] + exact hh.trans hparam' + rw [measureReal_restrict_apply (measurableSet_lt measurable_const + (Lp.stronglyMeasurable u).measurable.abs)] + simpa only [S, t, mul_assoc, inter_comm] using hmeasure + let : IsFiniteMeasure (μ.restrict (ball x R)) := + ⟨by simpa using hX.finiteOnBounded (ball x R) isBounded_ball⟩ + obtain ⟨hi, hbnd⟩ := geometric_tail_moment (μ.restrict (ball x R)) + (Lp.stronglyMeasurable u).measurable.abs (fun _ => abs_nonneg _) + (show 0 < S by dsimp only [S]; positivity) hb + (show 0 ≤ (C₀/σ^2)*V by positivity) hq.le hp0 + (by rw [hdecay]; norm_num) hlevels + refine ⟨hi, ?_⟩ + have hunit : (μ.restrict (ball x R)).real univ = V := by + simp only [Measure.real, Measure.restrict_apply_univ, V] + rw [hunit, hdecay] at hbnd + calc + _ ≤ (S*b)^p*V + ((C₀/σ^2)*V)*(S*b^2)^p/(1-1/2) := hbnd + _ = C*V := by dsimp only [C]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedLawCompression.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLawCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..22fc25c28218aa45f9b91051b1720d65698f69d0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLawCompression.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedProbabilityLaw + +namespace OAI + +/-! # Exact measure and support of normalized finite laws -/ + +open Set MeasureTheory Filter +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] [Nonempty X] + +theorem normalizedProbabilityLaw_measure (μ : Measure X) [IsFiniteMeasure μ] (hμ : μ≠0) : + (normalizedProbabilityLaw μ : Measure X)=(μ univ)⁻¹ • μ := by + let F : FiniteMeasure X := ⟨μ,inferInstance⟩ + have hF : F≠0 := by + intro hh + exact hμ (congrArg FiniteMeasure.toMeasure hh) + change (F.normalize : Measure X)=(μ univ)⁻¹ • μ + rw [F.toMeasure_normalize_eq_of_nonzero hF,← Measure.coe_nnreal_smul, + ENNReal.coe_inv (F.mass_nonzero_iff.mpr hF),FiniteMeasure.ennreal_mass] + rfl + +theorem normalized_restriction_ae_mem (μ : Measure X) {U : Set X} + (hU : MeasurableSet U) [IsFiniteMeasure (μ.restrict U)] (hμ : μ.restrict U≠0) : + ∀ᵐ x ∂(normalizedProbabilityLaw (μ.restrict U) : Measure X), x∈U := by + rw [normalizedProbabilityLaw_measure _ hμ] + apply ae_iff.mpr + change (((μ.restrict U) univ)⁻¹ • μ.restrict U) Uᶜ=0 + simp only [Measure.smul_apply,Measure.restrict_apply hU.compl, + compl_inter_self,measure_empty,smul_zero] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedLevelAlgebra.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLevelAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..81f7abf4eb5f77e07d74e7d1705bef406cde822c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLevelAlgebra.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.RCD.Coordinates.NonlinearIteration + +namespace OAI + +/-! # Normalization algebra for the harmonic level recurrence -/ + +namespace RegularPointCoordinates + +/-- Scaling the level energy by the outer volume removes that volume +from the superlinear recurrence. -/ +theorem normalized_level_identity {V J C d a b α : ℝ} + (hV : 0 < V) (hJ : 0 ≤ J) (ha : 0 < a) (hb : 0 < b) (hα : 0 < α) (i : ℕ) : + (C*V^(-α)*(d*b^i)*J*(a*b^i*J)^α)/V = + (C*d*a^α)*(b^(1+α))^i*(J/V)^(1+α) := by + by_cases hJ0 : J = 0 + · simp only [hJ0,mul_zero,zero_div,Real.zero_rpow hα.ne', + Real.zero_rpow (by linarith : 1+α ≠ 0)] + have hJp : 0 < J := lt_of_le_of_ne hJ (Ne.symm hJ0) + rw [Real.div_rpow hJ hV.le,Real.rpow_add hJp,Real.rpow_add hV, + Real.rpow_one,Real.rpow_one,Real.rpow_neg hV.le, + Real.mul_rpow (mul_nonneg ha.le (pow_nonneg hb.le _)) hJ, + Real.mul_rpow ha.le (pow_nonneg hb.le _), + ← Real.rpow_pow_comm hb.le α i,Real.rpow_add hb,Real.rpow_one,mul_pow] + field_simp + +/-- The dyadic radii stay between one half and three quarters of R. -/ +theorem dyadic_inner_radii {R : ℝ} (hR : 0 < R) (i : ℕ) : + 0 ≤ R/2+R/(4*2^(i+1)) ∧ + R/2+R/(4*2^(i+1)) < R/2+R/(4*2^i) ∧ + R/2+R/(4*2^i) < R := by + have hp : (0:ℝ) < 2^i := by positivity + have hge : (1:ℝ) ≤ 2^i := one_le_pow₀ (by norm_num) + constructor + · positivity + constructor + · rw [pow_succ] + have hh : R/(4*(2^i*2)) < R/(4*2^i) := + div_lt_div_of_pos_left hR (by positivity) (by nlinarith) + linarith + · have hh : R/(4*2^i) ≤ R/4 := by + apply div_le_div_of_nonneg_left hR.le (by norm_num) + nlinarith + linarith + +/-- The reciprocal squared level gap and the cutoff energy grow by four. -/ +theorem dyadic_level_gap_bounds {R : ℝ} (hR : 0 < R) (i : ℕ) : + 0 ≤ 1-(2^i:ℝ)⁻¹ ∧ + 1-(2^i:ℝ)⁻¹ < 1-(2^(i+1):ℝ)⁻¹ ∧ + ((1-(2^(i+1):ℝ)⁻¹)-(1-(2^i:ℝ)⁻¹))⁻¹^2 = 4*4^i ∧ + 10*R^2*(((R/2+R/(4*2^i))-(R/2+R/(4*2^(i+1))))⁻¹)^2+1 ≤ 641*4^i := by + have hp : (0:ℝ) < 2^i := by positivity + have hn : (2^i:ℝ) ≠ 0 := hp.ne' + have hge : (1:ℝ) ≤ 2^i := one_le_pow₀ (by norm_num) + have hf : (4:ℝ)^i = (2^i:ℝ)^2 := by + calc + (4:ℝ)^i = (2*2:ℝ)^i := by norm_num + _ = (2^i:ℝ)^2 := by rw [mul_pow,pow_two] + have hk : 0 ≤ 1-(2^i:ℝ)⁻¹ := by + have hh : (2^i:ℝ)⁻¹ ≤ 1 := inv_le_one_of_one_le₀ hge + linarith + have hd : (1-(2^(i+1):ℝ)⁻¹)-(1-(2^i:ℝ)⁻¹) = 1/(2*2^i) := by + rw [pow_succ] + field_simp + ring + have hδ : 0 < (1-(2^(i+1):ℝ)⁻¹)-(1-(2^i:ℝ)⁻¹) := hd ▸ (by positivity) + refine ⟨hk,by linarith,?_,?_⟩ + · rw [hd,hf] + field_simp + ring + · have hr : (R/2+R/(4*2^i))-(R/2+R/(4*2^(i+1))) = R/(8*2^i) := by + rw [pow_succ] + field_simp + ring + rw [hr,hf] + have he : 10*R^2*(R/(8*2^i))⁻¹^2 = 640*(2^i:ℝ)^2 := by + field_simp + ring + rw [he] + nlinarith [sq_nonneg ((2^i:ℝ)-1)] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..12d0f8e7b0aad3d061a51daac9244d13f956dc97 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalEnergy.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Sobolev.LocalEnergyMeasure +import OAI.Geometry.RCD.Coordinates.NormalizedLawCompression + +namespace OAI + +/-! # The exact normalized domination of a local energy measure -/ + +open Set Filter MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [Nonempty X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem normalized_local_energy_le (w : SobolevSpace μ hQ) {A U : Set X} + (hAU : A⊆U) [IsFiniteMeasure (μ.restrict U)] (hfin : μ U≠⊤) + (hpos : 0<μ.real U) (r M : ℝ) (hM : 0≤M) + (hb : ∀ᵐ x ∂μ.restrict A, r^2*localGamma μ hQ w w x≤M) : + (localEnergyMeasure μ hQ w A (r^2/μ.real U) : Measure X)≤ + ENNReal.ofReal M • (normalizedProbabilityLaw (μ.restrict U) : Measure X) := by + have hμ : μ.restrict U≠0 := by + intro he + have hh := congrArg (fun ν : Measure X => ν.real univ) he + simp only [Measure.real,Measure.restrict_apply_univ,Measure.coe_zero,Pi.zero_apply, + ENNReal.toReal_zero] at hh + exact hpos.ne' hh + rw [normalizedProbabilityLaw_measure _ hμ,Measure.restrict_apply_univ,smul_smul] + have he : ENNReal.ofReal (M/μ.real U)=ENNReal.ofReal M*(μ U)⁻¹ := by + rw [div_eq_mul_inv,ENNReal.ofReal_mul hM,ENNReal.ofReal_inv_of_pos hpos, + show ENNReal.ofReal (μ.real U)=μ U from ENNReal.ofReal_toReal hfin] + rw [← he] + have hbound := localEnergyMeasure_le μ hQ w A (r^2/μ.real U) (M/μ.real U) (by + filter_upwards [hb] with x hx + calc (r^2/μ.real U)*localGamma μ hQ w w x=(r^2*localGamma μ hQ w w x)/μ.real U := by ring + _ ≤ M/μ.real U := div_le_div_of_nonneg_right hx hpos.le) + apply hbound.trans + intro B + simpa only [Measure.smul_apply,smul_eq_mul] using + mul_le_mul' (le_refl (ENNReal.ofReal (M/μ.real U))) ((Measure.restrict_mono hAU le_rfl) B) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL1Domination.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL1Domination.lean new file mode 100644 index 0000000000000000000000000000000000000000..f41a12e895f8beed67015d7e8e6c47dc395e607c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL1Domination.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.RCD.Metric.ProbabilityDominationL1 + +namespace OAI + +/-! # Vanishing local errors under normalized bounded compression -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_local_L1_domination (μ : Measure X) (S : ℕ → Set X) + (ν : ℕ → Measure X) (f : ℕ → X → ℝ) {C : ℝ} (hC : 0≤C) + (hpos : ∀ k, 0<μ.real (S k)) + (hν : ∀ k, ν k≤ENNReal.ofReal (C/μ.real (S k)) • μ.restrict (S k)) + (hf : ∀ k, IntegrableOn (f k) (S k) μ) + (hlim : Tendsto (fun k => (μ.real (S k))⁻¹* + ∫ x in S k, |f k x| ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => ∫ x, f k x ∂ν k) atTop (𝓝 0) := by + apply squeeze_zero_norm + · intro k + have hh := integral_difference_le_of_domination (μ.restrict (S k)) (ν k) + ENNReal.ofReal_ne_top (hν k) (hf k) (integrable_zero X ℝ _) + simp only [Pi.zero_apply,integral_zero,dist_zero_right,Real.norm_eq_abs,sub_zero, + ENNReal.toReal_ofReal (div_nonneg hC (hpos k).le)] at hh + calc + ‖∫ x, f k x ∂ν k‖=|∫ x, f k x ∂ν k| := Real.norm_eq_abs _ + _≤(C/μ.real (S k))*(∫ x in S k, |f k x| ∂μ) := hh + _=C*((μ.real (S k))⁻¹*(∫ x in S k, |f k x| ∂μ)) := by ring + · simpa only [mul_zero] using hlim.const_mul C + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL2.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL2.lean new file mode 100644 index 0000000000000000000000000000000000000000..e475242ecbae3844e0f773ba9088d646a4b309f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedLocalL2.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Harmonic.LocalAffineMoments + +namespace OAI + +/-! # The normalized local L² norm and its actual integral -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [MetricSpace X] in +theorem l2_norm_sq_eq_integral (s : Set X) (f : Lp ℝ 2 (μ.restrict s)) : + ‖f‖ ^ 2 = ∫ x in s, (f x) ^ 2 ∂μ := by + rw [← real_inner_self_eq_norm_sq, L2.inner_def] + simp only [inner_self_eq_norm_sq_to_K, Real.norm_eq_abs, RCLike.ofReal_real_eq_id, id_eq, sq_abs] + +omit [MetricSpace X] in +/-- This identifies the normalization with the usual mean square, +including the zero-measure convention. -/ +theorem normalizeLocalL2_norm_sq (s : Set X) (hfin : μ s ≠ ∞) + (f : Lp ℝ 2 (μ.restrict s)) : + ‖normalizeLocalL2 μ s hfin f‖ ^ 2 = + (μ.real s)⁻¹ * ∫ x in s, (f x) ^ 2 ∂μ := by + rw [normalizeLocalL2, norm_smul, Real.norm_eq_abs, abs_inv, abs_norm, mul_pow, + inv_pow, restrictedOne_norm, Real.sq_sqrt (by positivity : 0 ≤ μ.real s), + l2_norm_sq_eq_integral] + +theorem normalized_sobolev_mean_sq (s : Set X) (hfin : μ s ≠ ∞) + (w : SobolevSpace μ hQ) : + ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ ^ 2 = + (μ.real s)⁻¹ * ∫ x in s, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ := by + rw [normalizeLocalL2_norm_sq] + congr 1 + apply integral_congr_ae + filter_upwards [SobolevSpace.restrictLp_coe μ hQ s w] with x hx + rw [hx] + +/-- A normalized harmonic function has mean square at most one, with no +pointwise value bound assumed. -/ +theorem sobolev_mean_sq_le_one_of_normalized (s : Set X) (hfin : μ s ≠ ∞) + (w : SobolevSpace μ hQ) + (h : ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ ≤ 1) : + (μ.real s)⁻¹ * ∫ x in s, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ ≤ 1 := by + rw [← normalized_sobolev_mean_sq μ hQ s hfin w] + nlinarith [norm_nonneg (normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w))] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedMeanDirectionError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedMeanDirectionError.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9e71c56a4052ca658ee2eb91f9858fcdcd8e8dc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedMeanDirectionError.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedDirectionError + +namespace OAI + +/-! # Quantitative directional error for the constructed exact normalizer -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem normalized_mean_direction_error (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (S : Set X) (hS : MeasurableSet S) + (hz : μ S≠0) (hf : μ S≠⊤) {ε : ℝ} (hε : 0≤ε) (hsmall : (n:ℝ)^2*ε≤1/2) + (herr : ∀ i j : Fin n, (μ.real S)⁻¹*∫ x in S, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ≤ε) + (A : Euclidean n ≃L[ℝ] Euclidean n) + (hA : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) S hS A) + (v : Euclidean n) : + (μ.real S)⁻¹*(∫ x in S, + |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x-‖v‖^2| ∂μ)≤4*(n:ℝ)^2*ε*‖v‖^2 := by + have hm : 0<μ.real S := ENNReal.toReal_pos hz hf + have hraw (i j : Fin n) : (∫ x in S, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ)≤ε*μ.real S := by + apply (div_le_iff₀ hm).mp + simpa only [div_eq_inv_mul] using herr i j + have hdir := directional_gram_error_le μ hQ u S hf (mul_nonneg hε hm.le) hraw (A v) + let Q := sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) S hS + have hQerr := meanGram_sub_id_norm_le μ hQ u S hS hz hf hε herr + have hnorm := exact_mean_normalizer_bounds μ hQ u S hS hz hf hε herr A hA v + have hAv : ‖A v‖^2≤2*‖v‖^2 := by + have hb := mul_le_mul_of_nonneg_right hsmall (sq_nonneg ‖A v‖) + nlinarith [hnorm.1] + have he : ⟪A v,Q (A v)⟫_ℝ=‖v‖^2 := by + dsimp only [Q] + rw [meanGram_energy_of_exact_normalization μ hQ (sobolevColumnMap μ hQ u) S hS A hA, + A.symm_apply_apply] + have hdelta : |‖A v‖^2-‖v‖^2|≤(n:ℝ)^2*ε*‖A v‖^2 := by + have hlo := inner_lower_of_sub_id_norm Q hQerr (A v) + have hup := inner_upper_of_sub_id_norm Q hQerr (A v) + rw [he] at hlo hup + exact abs_le.mpr ⟨by nlinarith,by nlinarith⟩ + have htri := integral_abs_sub_const_le μ + (localGamma_memL1 μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v))).integrableOn hf (‖A v‖^2) (‖v‖^2) + have hdel := mul_le_mul_of_nonneg_left hdelta hm.le + have hnormterm := mul_le_mul_of_nonneg_left hAv + (mul_nonneg (mul_nonneg (sq_nonneg (n:ℝ)) hε) hm.le) + have hbound : (∫ x in S, + |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x-‖v‖^2| ∂μ)≤4*(n:ℝ)^2*ε*μ.real S*‖v‖^2 := by + nlinarith only [htri,hdir,hdel,hnormterm] + calc + _ ≤ (μ.real S)⁻¹*(4*(n:ℝ)^2*ε*μ.real S*‖v‖^2) := + mul_le_mul_of_nonneg_left hbound (inv_nonneg.mpr hm.le) + _ = _ := by field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedOptimalSubplan.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedOptimalSubplan.lean new file mode 100644 index 0000000000000000000000000000000000000000..553ac832adebf89d66d7b1d6e5734802d6ff2c7c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedOptimalSubplan.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Transport.OptimalMidpointSplice + +namespace OAI + +/-! # Normalizing a nonzero component of an optimal geodesic plan -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem normalized_optimal_subplan + (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (hg : ∀ᵐ γ ∂π, IsGeodesic γ) + (hp : IsOptimalCoupling (π.map (fun γ => γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1)))) + (hfin : transportCost (π.map (fun γ => (γ 0,γ 1)))≠∞) + (κ : Measure C(Time,X)) (hκ : κ≤π) (hκ0 : κ univ≠0) : + let πn := (κ univ)⁻¹ • κ + IsProbabilityMeasure πn ∧ (∀ᵐ γ ∂πn, IsGeodesic γ) ∧ + IsOptimalCoupling (πn.map (fun γ => γ 0)) (πn.map (fun γ => γ 1)) + (πn.map (fun γ => (γ 0,γ 1))) ∧ + transportCost (πn.map (fun γ => (γ 0,γ 1)))≠∞ := by + let : IsFiniteMeasure κ := isFiniteMeasure_of_le π hκ + let : NeZero κ := ⟨by intro he; apply hκ0; rw [he]; rfl⟩ + have hc : κ univ≠∞ := measure_ne_top κ univ + have hi0 : (κ univ)⁻¹≠0 := ENNReal.inv_ne_zero.mpr hc + have hit : (κ univ)⁻¹≠∞ := ENNReal.inv_ne_top.mpr hκ0 + let πn := (κ univ)⁻¹ • κ + have hm := (measurable_path_eval (X:=X) 0).prodMk (measurable_path_eval 1) + have hle := Measure.map_mono hκ hm + have hcost : transportCost (κ.map (fun γ => (γ 0,γ 1)))≠∞ := + ne_top_of_le_ne_top hfin (lintegral_mono' hle le_rfl) + have hoptκ : IsOptimalCoupling (κ.map (fun γ => γ 0)) (κ.map (fun γ => γ 1)) + (κ.map (fun γ => (γ 0,γ 1))) := by + simpa only [Measure.map_map measurable_fst hm,Measure.map_map measurable_snd hm,Function.comp_def] + using hp.subcoupling hfin hle + refine ⟨inferInstance,?_,?_,?_⟩ + · exact (hg.filter_mono hκ.absolutelyContinuous.ae_le).filter_mono Measure.smul_absolutelyContinuous.ae_le + · rw [Measure.map_smul _ (measurable_path_eval 0).aemeasurable, + Measure.map_smul _ (measurable_path_eval 1).aemeasurable,Measure.map_smul _ hm.aemeasurable] + exact hoptκ.smul hi0 hit + · rw [Measure.map_smul _ hm.aemeasurable,transportCost_smul] + exact ENNReal.mul_ne_top hit hcost + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedOuterDirectionError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedOuterDirectionError.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce666a15fdd96a5c2b6703f816b5857b270a5422 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedOuterDirectionError.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedMeanDirectionError + +namespace OAI + +/-! # Outer-ball errors for a frame normalized on an inner set -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem normalized_outer_direction_error (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (S Ω : Set X) (hS : MeasurableSet S) + (hz : μ S ≠ 0) (hf : μ S ≠ ⊤) (hΩz : μ Ω ≠ 0) (hΩf : μ Ω ≠ ⊤) + {ε δ : ℝ} (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (hsmall : (n : ℝ)^2*δ ≤ 1/2) + (hinner : ∀ i j : Fin n, (μ.real S)⁻¹*∫ x in S, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ ≤ δ) + (houter : ∀ i j : Fin n, (μ.real Ω)⁻¹*∫ x in Ω, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ ≤ ε) + (A : Euclidean n ≃L[ℝ] Euclidean n) + (hA : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) S hS A) + (v : Euclidean n) : + (μ.real Ω)⁻¹*(∫ x in Ω, + |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x-‖v‖^2| ∂μ) + ≤ 2*(n : ℝ)^2*(ε+δ)*‖v‖^2 := by + have hm : 0 < μ.real Ω := ENNReal.toReal_pos hΩz hΩf + have hraw (i j : Fin n) : (∫ x in Ω, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ) ≤ ε*μ.real Ω := by + apply (div_le_iff₀ hm).mp + simpa only [div_eq_inv_mul] using houter i j + have hdir := directional_gram_error_le μ hQ u Ω hΩf (mul_nonneg hε hm.le) hraw (A v) + let Q := sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) S hS + have hQerr := meanGram_sub_id_norm_le μ hQ u S hS hz hf hδ hinner + have hnorm := exact_mean_normalizer_bounds μ hQ u S hS hz hf hδ hinner A hA v + have hAv : ‖A v‖^2 ≤ 2*‖v‖^2 := by + have hb := mul_le_mul_of_nonneg_right hsmall (sq_nonneg ‖A v‖) + nlinarith [hnorm.1] + have he : ⟪A v,Q (A v)⟫_ℝ = ‖v‖^2 := by + dsimp only [Q] + rw [meanGram_energy_of_exact_normalization μ hQ (sobolevColumnMap μ hQ u) S hS A hA, + A.symm_apply_apply] + have hshift : |‖A v‖^2-‖v‖^2| ≤ (n : ℝ)^2*δ*‖A v‖^2 := by + have hlo := inner_lower_of_sub_id_norm Q hQerr (A v) + have hup := inner_upper_of_sub_id_norm Q hQerr (A v) + rw [he] at hlo hup + exact abs_le.mpr ⟨by nlinarith,by nlinarith⟩ + have htri := integral_abs_sub_const_le μ + (localGamma_memL1 μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v))).integrableOn hΩf (‖A v‖^2) (‖v‖^2) + have hdel := mul_le_mul_of_nonneg_left hshift hm.le + have hnormterm := mul_le_mul_of_nonneg_left hAv + (mul_nonneg (mul_nonneg (sq_nonneg (n : ℝ)) (add_nonneg hε hδ)) hm.le) + have hbound : (∫ x in Ω, + |localGamma μ hQ (sobolevColumnMap μ hQ u (A v)) + (sobolevColumnMap μ hQ u (A v)) x-‖v‖^2| ∂μ) + ≤ 2*(n : ℝ)^2*(ε+δ)*μ.real Ω*‖v‖^2 := by + nlinarith only [htri,hdir,hdel,hnormterm] + calc + _ ≤ (μ.real Ω)⁻¹*(2*(n : ℝ)^2*(ε+δ)*μ.real Ω*‖v‖^2) := + mul_le_mul_of_nonneg_left hbound (inv_nonneg.mpr hm.le) + _ = _ := by field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPairing.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb83851c18592e48a5f5af02deb321a0320ea1c7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPairing.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # Identifying normalized Hilbert pairings with local test integrals -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem normalizeLocalL2_smul (s : Set X) (hfin : μ s ≠ ∞) + (a : ℝ) (f : Lp ℝ 2 (μ.restrict s)) : + normalizeLocalL2 μ s hfin (a • f) = a • normalizeLocalL2 μ s hfin f := by + exact smul_comm _ _ _ + +theorem normalized_inner (s : Set X) (hfin : μ s ≠ ∞) + (f g : Lp ℝ 2 (μ.restrict s)) : + ⟪normalizeLocalL2 μ s hfin f, normalizeLocalL2 μ s hfin g⟫_ℝ = + (μ.real s)⁻¹ * ∫ x in s, f x * g x ∂μ := by + have hscalar : (‖restrictedOne μ s hfin‖⁻¹) ^ 2 = (μ.real s)⁻¹ := by + rw [inv_pow, restrictedOne_norm, Real.sq_sqrt (by positivity)] + simp only [normalizeLocalL2, real_inner_smul_left, real_inner_smul_right] + rw [← mul_assoc, ← pow_two, hscalar, L2.inner_def] + congr 1 + apply integral_congr_ae + filter_upwards [] with x + exact mul_comm _ _ + +theorem normalized_inner_of_representatives (s : Set X) (hfin : μ s ≠ ∞) + (f g : Lp ℝ 2 (μ.restrict s)) (F G : X → ℝ) + (hf : f =ᵐ[μ.restrict s] F) (hg : g =ᵐ[μ.restrict s] G) : + ⟪normalizeLocalL2 μ s hfin f, normalizeLocalL2 μ s hfin g⟫_ℝ = + (μ.real s)⁻¹ * ∫ x in s, F x * G x ∂μ := by + rw [normalized_inner] + congr 1 + exact integral_congr_ae (hf.mul hg) + +theorem normalized_norm_le_of_bound (s : Set X) (hfin : μ s ≠ ∞) + (f : Lp ℝ 2 (μ.restrict s)) {C : ℝ} (hC : 0 ≤ C) + (hf : ∀ᵐ x ∂μ.restrict s, |f x| ≤ C) : + ‖normalizeLocalL2 μ s hfin f‖ ≤ C := by + let : IsFiniteMeasure (μ.restrict s) := + ⟨by simpa only [Measure.restrict_apply_univ] using hfin.lt_top⟩ + have hi : (∫ x in s, (f x) ^ 2 ∂μ) ≤ C ^ 2 * μ.real s := by + have hb : ∀ᵐ x ∂μ.restrict s, (f x) ^ 2 ≤ C ^ 2 := by + filter_upwards [hf] with x hx + nlinarith [abs_le.mp hx, sq_nonneg (f x)] + have hh := integral_mono_ae (Lp.memLp f).integrable_sq (integrable_const (C ^ 2)) hb + simpa only [integral_const, smul_eq_mul, Measure.real, Measure.restrict_apply_univ, mul_comm] using hh + apply (sq_le_sq₀ (norm_nonneg _) hC).mp + rw [normalizeLocalL2_norm_sq] + by_cases hz : μ.real s = 0 + · simp only [hz, inv_zero, zero_mul] + positivity + · calc + _ ≤ (μ.real s)⁻¹ * (C ^ 2 * μ.real s) := + mul_le_mul_of_nonneg_left hi (by positivity) + _ = C ^ 2 := by field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanLocalMass.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanLocalMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..73f27538dbfa879f6d9935c401ec991b33bc656d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanLocalMass.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.RCD.Sobolev.LocalEnergyMap +import OAI.Geometry.RCD.Coordinates.NormalizedPlanMeanEnergy + +namespace OAI + +/-! # Mean-energy control by the exact localized image-measure mass -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MeasurableSpace Y] +attribute [local instance] pathBorel pathBorelSpace + +theorem SobolevSpace.normalized_plan_local_mass (μ : Measure X) [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) (w : SobolevSpace μ hQ) + (P : ProbabilityMeasure C(Time,X)) + (hgeo : ∀ᵐ γ ∂(P : Measure C(Time,X)), IsGeodesic γ) + {r a : ℝ} (hr : 0 γ t)≤ + (ENNReal.ofReal a*V⁻¹) • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 (P : Measure C(Time,X))) + (A : Set X) {v : X → Y} (hv : Measurable v) {B : Set Y} (hB : MeasurableSet B) + (hstay : ∀ t : Time, ∀ᵐ x ∂(P : Measure C(Time,X)).map (fun γ => γ t), + x∈v ⁻¹' B∩A) : + ((∫ γ : C(Time,X), SobolevSpace.toLp μ hQ w (γ 1) ∂(P : Measure C(Time,X)))- + (∫ γ : C(Time,X), SobolevSpace.toLp μ hQ w (γ 0) ∂(P : Measure C(Time,X))))^2≤ + (∫ γ : C(Time,X), (dist (γ 0) (γ 1)/r)^2 ∂(P : Measure C(Time,X)))*a* + ((localEnergyMeasure μ hQ w A (r^2/V.toReal)).map v : Measure Y).real B := by + rw [localEnergyMeasure_map_apply μ hQ w A (div_nonneg (sq_nonneg _) hV.le) hv hB] + exact w.normalized_plan_mean_energy μ hQ P hgeo hr ha hV hcomp hD hstay + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanMeanEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanMeanEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f2b58edd28fe9be740afcb158614dca6db4db9b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPlanMeanEnergy.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Transport.PlanMeanEnergy + +namespace OAI + +/-! # The scale-invariant mean-energy inequality for the actual plan -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem SobolevSpace.normalized_plan_mean_energy (μ : Measure X) [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) (w : SobolevSpace μ hQ) + (P : ProbabilityMeasure C(Time,X)) + (hgeo : ∀ᵐ γ ∂(P : Measure C(Time,X)), IsGeodesic γ) + {r a : ℝ} (hr : 0 γ t)≤ + (ENNReal.ofReal a*V⁻¹) • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 (P : Measure C(Time,X))) + {Ω : Set X} (hstay : ∀ t : Time, ∀ᵐ x ∂(P : Measure C(Time,X)).map (fun γ => γ t), x∈Ω) : + ((∫ γ : C(Time,X), SobolevSpace.toLp μ hQ w (γ 1) ∂(P : Measure C(Time,X)))- + (∫ γ : C(Time,X), SobolevSpace.toLp μ hQ w (γ 0) ∂(P : Measure C(Time,X))))^2≤ + (∫ γ : C(Time,X), (dist (γ 0) (γ 1)/r)^2 ∂(P : Measure C(Time,X)))*a* + (r^2/V.toReal*(∫ x in Ω, localGamma μ hQ w w x ∂μ)) := by + have hV0 : V≠0 := by + intro hh + simp only [hh,ENNReal.toReal_zero,lt_self_iff_false] at hV + have hC : ENNReal.ofReal a*V⁻¹≠⊤ := + ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.inv_ne_top.mpr hV0) + have hb := w.plan_mean_energy μ hQ P hgeo hC hcomp hD hstay + have hcap : (ENNReal.ofReal a*V⁻¹).toReal=a/V.toReal := by + rw [ENNReal.toReal_mul,ENNReal.toReal_ofReal ha,ENNReal.toReal_inv,div_eq_mul_inv] + rw [hcap] at hb + convert hb using 1 + simp_rw [div_pow,integral_div] + field_simp [hr.ne',hV.ne'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonCommutator.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonCommutator.lean new file mode 100644 index 0000000000000000000000000000000000000000..d27277a48d0c74cb8a24eabaf27f94c4049ba4fb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonCommutator.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Sobolev.ActualPoissonCommutator +import OAI.Geometry.RCD.Sobolev.PoissonPairDefect +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # The actual two-center commutator in normalized defect units -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The coefficient is independent of the center and scale. -/ +def poissonCommutatorConstant (n : ℕ) (A epsilon B J Cχ : ℝ) : ℝ := + 12 * A ^ 2 * ((n : ℝ) * (1 + epsilon)) ^ 2 * + (4096 * Cχ * (J + B / 2) + A ^ 2) * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Averaging preserves the radius-squared gain. The error is controlled +by the two original summable defects, with one scale-independent coefficient. -/ +theorem normalized_poisson_commutator_error {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + {κ B J C A Cχ epsilon r0 : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) + (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (p₁ p₂ z : X) + (S₁ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₁ r0) + (S₂ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₂ r0) + (T₁ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₁ B J C) + (T₂ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₂ B J C) + (i : ℕ) + (hroom₁ : dist z p₁ ≤ distanceSourceRadius r0 i / 4) + (hroom₂ : dist z p₂ ≤ distanceSourceRadius r0 i / 4) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball z (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf₁ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₁.replacement i) (T₁.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (hf₂ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) (T₂.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic z (distanceSourceRadius r0 i / 64) Cχ) + (hvolume : |(hausdorff n X).real (ball z (distanceSourceRadius r0 i / 64)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 64) ^ n) - 1| ≤ 1 / 4) : + ∀ b : Euclidean n, ∃ g h : SobolevSpace (hausdorff n X) hX.quadratic, + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let Ω := ball z (s / 64) + let v := T₂.replacement i - T₁.replacement i + let a := sobolevColumnMap μ hX.quadratic u b + (SobolevSpace.toLp μ hX.quadratic g =ᵐ[μ.restrict Ω] localGamma μ hX.quadratic (T₂.replacement i) a) ∧ + (SobolevSpace.toLp μ hX.quadratic h =ᵐ[μ.restrict Ω] localGamma μ hX.quadratic v a) ∧ + (μ.real Ω)⁻¹ * (∫ x in Ω, (localGamma μ hX.quadratic v g x - + localGamma μ hX.quadratic (T₂.replacement i) h x - localGamma μ hX.quadratic v a x) ^ 2 ∂μ) ≤ + poissonCommutatorConstant n A epsilon B J Cχ * s ^ 2 * ‖b‖ ^ 2 * + (normalizedPoissonDefect μ hX.quadratic S₁ i + normalizedPoissonDefect μ hX.quadratic S₂ i) := by + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + let W := μ.real (ball z (s / 64)) + let P := normalizedPoissonDefect μ hQ S₁ i + normalizedPoissonDefect μ hQ S₂ i + let H := 4096 * Cχ * (J + B / 2) + A ^ 2 + let Q := 4096 * Cχ * (J + B / 2) * + ((S₁.source i).real (ball p₁ s) + (S₂.source i).real (ball p₂ s)) + + κ * A ^ 2 * s ^ 2 * (μ.real (ball p₁ s) + μ.real (ball p₂ s)) + have hs : 0 < s := distanceSourceRadius_pos S₁.radius_pos i + have hW : 0 < W := (quarter_volume_bounds (n := n) (by positivity : 0 < s / 64) + (euclideanUnitVolume_pos n) hvolume).1 + have hP : 0 ≤ P := add_nonneg (normalizedPoissonDefect_nonneg μ hQ S₁ hκ i) + (normalizedPoissonDefect_nonneg μ hQ S₂ hκ i) + have hH : 0 ≤ H := by dsimp only [H]; positivity + have hmass : Q ≤ H * s ^ (n : ℝ) * P := + poisson_pair_defect_bound μ hQ S₁ S₂ i hκ (by positivity) + have hratio : s ^ (n : ℝ) / W ≤ (4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n := + radial_testing_volume_ratio hs (euclideanUnitVolume_pos n) hvolume + intro b + obtain ⟨g, h, hg, hh, he⟩ := actual_poisson_commutator_error hX hhessian hκ hK hB hJ hCχ + hA hepsilon p₁ p₂ z S₁ S₂ T₁ T₂ i hroom₁ hroom₂ u hu hgrad hf₁ hf₂ χ b + refine ⟨g, h, hg, hh, ?_⟩ + have hm := mul_le_mul_of_nonneg_left hmass + (show 0 ≤ 12 * A ^ 2 * s ^ 2 * ((n : ℝ) * (1 + epsilon)) ^ 2 * ‖b‖ ^ 2 by positivity) + have havg := mul_le_mul_of_nonneg_left (he.trans hm) (inv_nonneg.mpr hW.le) + have hr := mul_le_mul_of_nonneg_left hratio + (show 0 ≤ 12 * A ^ 2 * ((n : ℝ) * (1 + epsilon)) ^ 2 * H * s ^ 2 * ‖b‖ ^ 2 * P by positivity) + apply havg.trans + convert hr using 1 <;> dsimp only [poissonCommutatorConstant, H, s, P] <;> ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEstimates.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..841051ee88d3d57b7aff3c4f04a35e6394e86ae5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEstimates.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedSourceGradient +import OAI.Geometry.RCD.Sobolev.PoissonSourceEstimates + +namespace OAI + +/-! # Scale-correct source and energy estimates for Poisson replacement -/ + +open Set MeasureTheory Filter +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The normalized Sobolev inequality yields a linear gradient error, a +mass-times-height energy error, and the corresponding energy-density error. -/ +theorem normalized_poisson_source_estimates (Ω : Set X) (hΩ : MeasurableSet Ω) + (hfin : μ Ω ≠ ∞) (hvol : 0 < μ.real Ω) {P : ℝ} (hP : 0 ≤ P) + (hpoin : ∀ v : SobolevSpace.dirichlet μ hQ Ω, + ‖SobolevSpace.toLp μ hQ v.val‖ ^ 2 ≤ P * energyForm μ hQ v.val v.val) + (q f : SobolevSpace μ hQ) (Q : X → ℝ) {L : ℝ≥0} + (hQlip : LipschitzWith L Q) (hQ0 : ∀ x, 0 ≤ Q x) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ] Q) + {a B K A d C s : ℝ} (ha : 0 ≤ a) (hB : 0 ≤ B) (hK : 0 ≤ K) + (hA : 0 ≤ A) (hd : 1 < d) (hC : 0 < C) (hs : 0 < s) + (hQB : ∀ᵐ x ∂μ.restrict Ω, Q x ≤ B) + (hgradq : ∀ᵐ x ∂μ.restrict Ω, SobolevSpace.minimalSlope μ hQ q x ≤ A) + (τ : SobolevSpace.dirichlet μ hQ Ω) + (hτ : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + energyForm μ hQ τ.val φ.val = ∫ x in Ω, SobolevSpace.toLp μ hQ φ.val x ∂μ) + (hτK : ∀ᵐ x ∂μ, SobolevSpace.toLp μ hQ τ.val x ≤ K) + (hfq : f - q ∈ SobolevSpace.dirichlet μ hQ Ω) + (hsolve : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + energyForm μ hQ f φ.val = -a * ∫ x in Ω, SobolevSpace.toLp μ hQ φ.val x ∂μ) + (σ : Measure X) [IsFiniteMeasure σ] + (hdefect : ∀ (ψ : SobolevSpace μ hQ) (v : X → ℝ) (D : ℝ≥0), + LipschitzWith D v → HasCompactSupport v → tsupport v ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] v → + energyForm μ hQ q ψ + a * (∫ x in Ω, v x ∂μ) = ∫ x, v x ∂σ) + (hsob : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * s * (μ.real Ω) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) : + let D := Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C * s) + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ (q - f) x ∧ + SobolevSpace.toLp μ hQ (q - f) x ≤ B + a * K) ∧ + IntegrableOn (fun x => SobolevSpace.minimalSlope μ hQ (q - f) x) Ω μ ∧ + (∫ x in Ω, SobolevSpace.minimalSlope μ hQ (q - f) x ∂μ) ≤ σ.real Ω * D ∧ + (∫ x, (SobolevSpace.minimalSlope μ hQ (q - f) x) ^ 2 ∂μ) ≤ σ.real Ω * (B + a * K) ∧ + (∫ x in Ω, |(1 / 2 : ℝ) * localGamma μ hQ f f x - + (1 / 2 : ℝ) * localGamma μ hQ q q x| ∂μ) ≤ + (A * D + (B + a * K) / 2) * σ.real Ω := by + dsimp only + let D := Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C * s) + have hsource := replacement_has_measure_source μ hQ Ω q f σ a hdefect hsolve + have hcomp := comparison_of_replacement_source μ hQ Ω q f σ a hsource hsolve + have hheight := poisson_replacement_height_le μ hQ Ω hΩ hfin hP hpoin q f Q + hQlip hQ0 hq ha hB hK hQB τ hτ hτK hfq hsolve hcomp + let H : SobolevSpace.dirichlet μ hQ Ω := + ⟨q - f, by simpa only [neg_sub] using (SobolevSpace.dirichlet μ hQ Ω).neg_mem hfq⟩ + have ht (φ : SobolevSpace.dirichlet μ hQ Ω) (t : ℝ) (ht : 0 ≤ t) + (hφ : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ φ.val x ∧ + SobolevSpace.toLp μ hQ φ.val x ≤ t) : + energyForm μ hQ H.val φ.val ≤ σ.real Ω * t := + hsource.bounded_test_bound μ hQ Ω H.val σ hΩ φ ht hφ + have hg := normalized_source_gradient μ hQ Ω hfin hvol H + (hheight.mono fun _ hx => hx.1) (q := (1 + d) / 2) + (by linarith) (by linarith) hC hs measureReal_nonneg hsob ht + have hheight0 : 0 ≤ B + a * K := add_nonneg hB (mul_nonneg ha hK) + have he := positive_source_energy μ hQ Ω H hheight0 hheight ht + have hsq : Integrable (fun x => (SobolevSpace.minimalSlope μ hQ H.val x) ^ 2) μ := + (localGamma_memL1 μ hQ H.val H.val).congr (localGamma_self μ hQ H.val) + have he' : (∫ x in Ω, (SobolevSpace.minimalSlope μ hQ H.val x) ^ 2 ∂μ) ≤ + σ.real Ω * (B + a * K) := + (setIntegral_le_integral hsq (Eventually.of_forall fun _ => sq_nonneg _)).trans he + refine ⟨hheight, hg.1, hg.2, he, ?_⟩ + have hident : q - H.val = f := by dsimp only [H]; module + have herr := poisson_energy_density_error_le μ hQ Ω q H.val hgradq hg.1 + rw [hident] at herr + calc + _ ≤ A * (∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ) + + (1 / 2 : ℝ) * ∫ x in Ω, (SobolevSpace.minimalSlope μ hQ H.val x) ^ 2 ∂μ := herr + _ ≤ A * (σ.real Ω * D) + (1 / 2 : ℝ) * (σ.real Ω * (B + a * K)) := + add_le_add (mul_le_mul_of_nonneg_left hg.2 hA) + (mul_le_mul_of_nonneg_left he' (by norm_num)) + _ = _ := by dsimp only [D]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEulerGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEulerGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..206151be38b2cc628bbe2aee4ed0c821d63f89ac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPoissonEulerGradient.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Sobolev.ActualPoissonEulerGradient +import OAI.Geometry.RCD.Sobolev.PoissonPairDefect +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # The actual Euler-gradient error in normalized defect units -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The coefficient is independent of the center and scale. -/ +def poissonEulerGradientConstant (n : ℕ) (A B J Cχ : ℝ) : ℝ := + 12 * A ^ 2 * + (4096 * Cχ * (J + B / 2) + A ^ 2) * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual gradient product rule gives a mean Euler-gradient error +controlled by the two original summable defects, at every dyadic scale. -/ +theorem normalized_poisson_euler_gradient {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + {κ B J C A Cχ epsilon r0 : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) + (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (p₁ p₂ z : X) + (S₁ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₁ r0) + (S₂ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₂ r0) + (T₁ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₁ B J C) + (T₂ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₂ B J C) + (i : ℕ) + (hroom₁ : dist z p₁ ≤ distanceSourceRadius r0 i / 4) + (hroom₂ : dist z p₂ ≤ distanceSourceRadius r0 i / 4) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball z (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf₁ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₁.replacement i) (T₁.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (hf₂ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) (T₂.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic z (distanceSourceRadius r0 i / 64) Cχ) + (hvolume : |(hausdorff n X).real (ball z (distanceSourceRadius r0 i / 64)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 64) ^ n) - 1| ≤ 1 / 4) : + ∃ g : SobolevSpace (hausdorff n X) hX.quadratic, + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let Ω := ball z (s / 64) + let v := T₂.replacement i - T₁.replacement i + (SobolevSpace.toLp μ hX.quadratic g =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (T₂.replacement i) v) ∧ + (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic (g - v) (g - v) x ∂μ) ≤ + poissonEulerGradientConstant n A B J Cχ * s ^ 2 * + (normalizedPoissonDefect μ hX.quadratic S₁ i + normalizedPoissonDefect μ hX.quadratic S₂ i) := by + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + let W := μ.real (ball z (s / 64)) + let P := normalizedPoissonDefect μ hQ S₁ i + normalizedPoissonDefect μ hQ S₂ i + let H := 4096 * Cχ * (J + B / 2) + A ^ 2 + let Q := 4096 * Cχ * (J + B / 2) * + ((S₁.source i).real (ball p₁ s) + (S₂.source i).real (ball p₂ s)) + + κ * A ^ 2 * s ^ 2 * (μ.real (ball p₁ s) + μ.real (ball p₂ s)) + have hs : 0 < s := distanceSourceRadius_pos S₁.radius_pos i + have hW : 0 < W := (quarter_volume_bounds (n := n) (by positivity : 0 < s / 64) + (euclideanUnitVolume_pos n) hvolume).1 + have hP : 0 ≤ P := add_nonneg (normalizedPoissonDefect_nonneg μ hQ S₁ hκ i) + (normalizedPoissonDefect_nonneg μ hQ S₂ hκ i) + have hH : 0 ≤ H := by dsimp only [H]; positivity + have hmass : Q ≤ H * s ^ (n : ℝ) * P := + poisson_pair_defect_bound μ hQ S₁ S₂ i hκ (by positivity) + have hratio : s ^ (n : ℝ) / W ≤ (4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n := + radial_testing_volume_ratio hs (euclideanUnitVolume_pos n) hvolume + obtain ⟨g, hg, he⟩ := actual_poisson_euler_gradient hX hhessian hproduct hκ hK hB hJ hCχ + hA hepsilon p₁ p₂ z S₁ S₂ T₁ T₂ i hroom₁ hroom₂ u hu hgrad hf₁ hf₂ χ + refine ⟨g, hg, ?_⟩ + have hm := mul_le_mul_of_nonneg_left hmass (show 0 ≤ 12 * A ^ 2 * s ^ 2 by positivity) + have havg := mul_le_mul_of_nonneg_left (he.trans hm) (inv_nonneg.mpr hW.le) + have hr := mul_le_mul_of_nonneg_left hratio (show 0 ≤ 12 * A ^ 2 * H * s ^ 2 * P by positivity) + apply havg.trans + convert hr using 1 <;> dsimp only [poissonEulerGradientConstant, H, s, P] <;> ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedPositiveWeights.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPositiveWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..aca57ed4836cfc28c023cc421f74f74edb65ee53 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedPositiveWeights.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Metric.CommonDensityMinorization + +namespace OAI + +/-! # Common minorization of normalized positive kernel rows + +Uniform lower and upper kernel bounds give a strict loss in the +oscillation of weighted means, independently of the positive base weight. +-/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +private theorem normalized_weight_lower {m M S Z k r : ℝ} + (hm : 0 < m) (hM : 0 < M) (hS : 0 < S) (hZ : 0 < Z) + (hZS : Z ≤ M*S) (hk : m ≤ k) (hr : 0 ≤ r) : + (m/M)*(r/S) ≤ k*r/Z := by + calc + _ = m*r/(M*S) := by ring + _ ≤ k*r/(M*S) := div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right hk hr) (mul_nonneg hM.le hS.le) + _ ≤ _ := div_le_div_of_nonneg_left (mul_nonneg (hm.le.trans hk) hr) hZ hZS + +variable {Y : Type*} [MeasurableSpace Y] (μ : Measure Y) + +theorem normalized_positive_weights_difference {r k v f : Y → ℝ} {m M a b : ℝ} + (hr : Integrable r μ) (hfr : Integrable (fun x => f x*r x) μ) + (hr0 : ∀ᵐ x ∂μ, 0 ≤ r x) (hS : 0 < ∫ x, r x ∂μ) + (hk : Measurable k) (hv : Measurable v) (hm : 0 < m) + (hkb : ∀ x, m ≤ k x ∧ k x ≤ M) (hvb : ∀ x, m ≤ v x ∧ v x ≤ M) + (hf : ∀ᵐ x ∂μ, a ≤ f x ∧ f x ≤ b) : + |(∫ x, f x*(k x*r x) ∂μ)/(∫ x, k x*r x ∂μ)- + (∫ x, f x*(v x*r x) ∂μ)/(∫ x, v x*r x ∂μ)| ≤ (1-m/M)*(b-a) := by + have hkn : ∀ᵐ x ∂μ, ‖k x‖ ≤ M := Eventually.of_forall fun x => by + rw [Real.norm_eq_abs,abs_of_nonneg (hm.le.trans (hkb x).1)] + exact (hkb x).2 + have hvn : ∀ᵐ x ∂μ, ‖v x‖ ≤ M := Eventually.of_forall fun x => by + rw [Real.norm_eq_abs,abs_of_nonneg (hm.le.trans (hvb x).1)] + exact (hvb x).2 + have hkr : Integrable (fun x => k x*r x) μ := hr.bdd_mul hk.aestronglyMeasurable hkn + have hvr : Integrable (fun x => v x*r x) μ := hr.bdd_mul hv.aestronglyMeasurable hvn + have hfkr : Integrable (fun x => f x*(k x*r x)) μ := by + convert hfr.bdd_mul hk.aestronglyMeasurable hkn using 1 + funext x + change f x * (k x * r x) = k x * (f x * r x) + ring + have hfvr : Integrable (fun x => f x*(v x*r x)) μ := by + convert hfr.bdd_mul hv.aestronglyMeasurable hvn using 1 + funext x + change f x * (v x * r x) = v x * (f x * r x) + ring + let S := ∫ x, r x ∂μ + let Zk := ∫ x, k x*r x ∂μ + let Zv := ∫ x, v x*r x ∂μ + have hZk : m*S ≤ Zk ∧ Zk ≤ M*S := by + constructor + · simpa only [integral_const_mul] using integral_mono_ae (hr.const_mul m) hkr + (hr0.mono fun x hx => mul_le_mul_of_nonneg_right (hkb x).1 hx) + · simpa only [integral_const_mul] using integral_mono_ae hkr (hr.const_mul M) + (hr0.mono fun x hx => mul_le_mul_of_nonneg_right (hkb x).2 hx) + have hZv : m*S ≤ Zv ∧ Zv ≤ M*S := by + constructor + · simpa only [integral_const_mul] using integral_mono_ae (hr.const_mul m) hvr + (hr0.mono fun x hx => mul_le_mul_of_nonneg_right (hvb x).1 hx) + · simpa only [integral_const_mul] using integral_mono_ae hvr (hr.const_mul M) + (hr0.mono fun x hx => mul_le_mul_of_nonneg_right (hvb x).2 hx) + have hZk0 : 0 < Zk := (mul_pos hm hS).trans_le hZk.1 + have hZv0 : 0 < Zv := (mul_pos hm hS).trans_le hZv.1 + have hM : 0 < M := by + have hh : 0 < M*S := hZk0.trans_le hZk.2 + exact (mul_pos_iff_of_pos_right hS).mp hh + let w0 := fun x => r x/S + let wk := fun x => k x*r x/Zk + let wv := fun x => v x*r x/Zv + have hw0 : Integrable w0 μ := hr.div_const S + have hwk : Integrable wk μ := hkr.div_const Zk + have hwv : Integrable wv μ := hvr.div_const Zv + have hfw0 : Integrable (fun x => f x*w0 x) μ := by + simpa only [w0,← mul_div_assoc] using hfr.div_const S + have hfwk : Integrable (fun x => f x*wk x) μ := by + simpa only [wk,← mul_div_assoc] using hfkr.div_const Zk + have hfwv : Integrable (fun x => f x*wv x) μ := by + simpa only [wv,← mul_div_assoc] using hfvr.div_const Zv + have hw01 : (∫ x, w0 x ∂μ)=1 := by rw [integral_div]; exact div_self hS.ne' + have hwk1 : (∫ x, wk x ∂μ)=1 := by rw [integral_div]; exact div_self hZk0.ne' + have hwv1 : (∫ x, wv x ∂μ)=1 := by rw [integral_div]; exact div_self hZv0.ne' + have hminK : ∀ᵐ x ∂μ, (m/M)*w0 x ≤ wk x := hr0.mono fun x hx => + normalized_weight_lower hm hM hS hZk0 hZk.2 (hkb x).1 hx + have hminV : ∀ᵐ x ∂μ, (m/M)*w0 x ≤ wv x := hr0.mono fun x hx => + normalized_weight_lower hm hM hS hZv0 hZv.2 (hvb x).1 hx + have hh := common_density_mean_difference μ hw0 hwk hwv hfw0 hfwk hfwv + hw01 hwk1 hwv1 hminK hminV hf + simpa only [wk,wv,← mul_div_assoc,integral_div] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedProbabilityLaw.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProbabilityLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..6874f2d0e86a144f8dceb1875a157f08dad9f0bb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProbabilityLaw.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Sobolev.MeasuredTestScaling +import Mathlib.MeasureTheory.Measure.Portmanteau + +namespace OAI + +/-! # Normalized finite laws and their exact test integrals -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] [Nonempty X] + +def normalizedProbabilityLaw (μ : Measure X) [IsFiniteMeasure μ] : ProbabilityMeasure X := + MeasureTheory.FiniteMeasure.normalize (⟨μ,inferInstance⟩ : MeasureTheory.FiniteMeasure X) + +theorem normalizedProbabilityLaw_integral (μ : Measure X) [IsFiniteMeasure μ] + (hμ : μ≠0) (f : X → ℝ) : + (∫ x, f x ∂(normalizedProbabilityLaw μ : Measure X))= + (μ.real univ)⁻¹*(∫ x, f x ∂μ) := by + have hfinite : (⟨μ,inferInstance⟩ : MeasureTheory.FiniteMeasure X)≠ + (⟨0,MeasureTheory.isFiniteMeasureZero⟩ : MeasureTheory.FiniteMeasure X) := by + intro he + exact hμ (congrArg MeasureTheory.FiniteMeasure.toMeasure he) + have h := MeasureTheory.FiniteMeasure.average_eq_integral_normalize + (⟨μ,inferInstance⟩ : MeasureTheory.FiniteMeasure X) hfinite f + simpa only [average_eq,smul_eq_mul,normalizedProbabilityLaw, + MeasureTheory.FiniteMeasure.toMeasure_mk] using h.symm + +theorem normalizedProbabilityLaw_map_integral {Y : Type*} [MeasurableSpace Y] + [TopologicalSpace Y] [OpensMeasurableSpace Y] + (μ : Measure X) [IsFiniteMeasure μ] (hμ : μ≠0) {v : X → Y} (hv : Measurable v) + {f : Y → ℝ} (hf : Continuous f) : + (∫ y, f y ∂((normalizedProbabilityLaw μ).map v : Measure Y))= + (μ.real univ)⁻¹*(∫ x, f (v x) ∂μ) := by + rw [ProbabilityMeasure.toMeasure_map,integral_map hv.aemeasurable hf.aestronglyMeasurable] + exact normalizedProbabilityLaw_integral μ hμ (f ∘ v) + +theorem normalizedProbabilityLaw_real (μ : Measure X) [IsFiniteMeasure μ] + (hμ : μ≠0) {s : Set X} (hs : MeasurableSet s) : + (normalizedProbabilityLaw μ : Measure X).real s=(μ.real univ)⁻¹*μ.real s := by + simpa only [integral_indicator hs,setIntegral_const,smul_eq_mul,mul_one] using + normalizedProbabilityLaw_integral μ hμ (s.indicator (fun _ => (1:ℝ))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedProductError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProductError.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ff581000cf14797b82a396b83cdcb5749a6e674 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProductError.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedUniformMean + +namespace OAI + +/-! # Vanishing value errors against uniformly bounded rescaled factors -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_product_error_tendsto (μ : ℕ → Measure X) + [∀ k, IsFiniteMeasure (μ k)] (hmass : ∀ k, 0<(μ k).real univ) + (z b : ℕ → X → ℝ) {C : ℝ} (hC : 0≤C) + (hb : ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |b k x|≤C) + (hz : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |z k x|≤δ) : + Tendsto (fun k => ((μ k).real univ)⁻¹*(∫ x, z k x*b k x ∂μ k)) atTop (𝓝 0) := by + apply normalized_mean_tendsto_zero μ hmass + intro δ hδ + have hden : 0 (s / 64)⁻¹ • V x) → + ∀ error : ℝ, 0 < error → + IsMeasuredEuclideanApproximation (hausdorff n X) n center s (1 / 1024) error + (fun x => s⁻¹ • V x) → + ∀ one : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic one =ᵐ[ + (hausdorff n X).restrict (ball center (2 * s))] fun _ => (1 : ℝ)) → + ∀ _cutoff : GoodLaplacianCutoff (hausdorff n X) hX.quadratic center (s / 64) Cχ, + (∀ᵐ x ∂(hausdorff n X).restrict (ball center (s / 4)), + localGamma (hausdorff n X) hX.quadratic (T1.replacement i) (T1.replacement i) x ≤ (A * s) ^ 2) → + (∀ᵐ x ∂(hausdorff n X).restrict (ball center (s / 4)), + localGamma (hausdorff n X) hX.quadratic (T2.replacement i) (T2.replacement i) x ≤ (A * s) ^ 2) → + ∀ source : ℝ, 0 < source → + normalizedPoissonDefect (hausdorff n X) hX.quadratic S1 i + + normalizedPoissonDefect (hausdorff n X) hX.quadratic S2 i ≤ source ^ 2 → + ∀ (g : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (coeff : Fin n → Euclidean n), + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (g j) =ᵐ[ + (hausdorff n X).restrict (ball center (s / 512))] + localGamma (hausdorff n X) hX.quadratic (T2.replacement i) (u j)) → + (∀ j, ‖normalizeLocalL2 (hausdorff n X) (ball center (s / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball center (s / 512)) + (g j - sobolevColumnMap (hausdorff n X) hX.quadratic u (coeff j)))‖ ^ 2 ≤ + Drow * s ^ 2 * source ^ 2) → + ∀ total : ℝ, 0 ≤ total → + Summable (normalizedPoissonDefect (hausdorff n X) hX.quadratic S2) → + (∑' j, normalizedPoissonDefect (hausdorff n X) hX.quadratic S2 j) ≤ total → + ∃ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H + ((n : ℝ) * Real.sqrt Drow) 1 1, + d.radius = s ∧ d.source = source ∧ d.totalSource = total ∧ + d.approximationError = error ∧ d.coordinates = u ∧ d.center = center ∧ + d.projectionNorm = + ‖normalizeLocalL2 (hausdorff n X) (ball center ((1 / 2048) * s)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic + (radiusScaledColumns (hausdorff n X) hX.quadratic s u) + (ball center ((1 / 2048) * s)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball center ((1 / 2048) * s)) + ((s ^ 2)⁻¹ • (T2.replacement i - T1.replacement i))))‖ := by + classical + obtain ⟨H, hH, haffine⟩ := projection_affine_bounds hgradient hmean hn hκ + refine ⟨H, hH, ?_⟩ + intro root first center S1 S2 T1 T2 i s hroot hroom hcurv hsmallcurv hlap hvolume hsphere + u V hfirst hnormal hcenter delta hdelta hmetric error herror hmeasured one hone cutoff + hgrad1 hgrad2 source hsource hpair g coeff hrep hfit total htotal hsum hbudget + let μ := hausdorff n X + let hQ := hX.quadratic + have hs : 0 < s := distanceSourceRadius_pos S2.radius_pos i + have hsub : ball center (s / 512) ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hsub4 : ball center (s / 4) ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hconstant := ae_restrict_of_ae_restrict_of_subset hsub hone + have hnormal' : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) + (ball center (2 * s)) measurableSet_ball (ContinuousLinearEquiv.refl ℝ (Euclidean n)) := by + simpa only [IsExactMeanNormalization, ContinuousLinearEquiv.coe_refl, + ContinuousLinearMap.comp_id] using hnormal + have hid : transformedColumn μ hQ u (ContinuousLinearEquiv.refl ℝ (Euclidean n)) = u := by + funext j + simp only [transformedColumn, ContinuousLinearEquiv.coe_refl, + ContinuousLinearMap.id_apply, sobolevColumnMap_single] + have hfirst' : FirstOrderSplittingOn μ hQ center (2 * s) epsilon + (transformedColumn μ hQ u (ContinuousLinearEquiv.refl ℝ (Euclidean n))) V := by + rw [hid] + exact hfirst + have hrootradius : 2 * s ≤ root := distanceSourceRadius_outer_le S2.radius_pos.le i + have haff (R : ℝ) (hRlo : s / 4096 ≤ R) (hRhi : R ≤ s) + (hRcurv : -κ ≤ K * R ^ 2) (c : ℝ) (a : Euclidean n) : + |c| + s * ‖a‖ ≤ H * ‖normalizeLocalL2 μ (ball center R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball center R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + simpa only [ContinuousLinearEquiv.refl_symm, ContinuousLinearEquiv.coe_refl', id_eq] using + haffine center s R hs hRlo hRhi hRcurv u V V + (ContinuousLinearEquiv.refl ℝ (Euclidean n)) epsilon hepsilon hsmall + hfirst.harmonic hfirst.continuous hcenter hfirst.representative hfirst' hnormal' + (fun t ht hts => hvolume t ht (hts.trans hrootradius)) one + (ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith)) hone) c a + have hcurvR (R : ℝ) (hR : 0 ≤ R) (hRle : R ≤ s / 512) : -κ ≤ K * R ^ 2 := by + by_cases hK : 0 ≤ K + · exact (neg_nonpos.mpr hκ).trans (mul_nonneg hK (sq_nonneg R)) + · have hK' := le_of_not_ge hK + have hsq : R ^ 2 ≤ (s / 512) ^ 2 := by nlinarith + exact hsmallcurv.trans (mul_le_mul_of_nonpos_left hsq hK') + have hcolumns := projection_coordinate_values μ hQ hs hdelta u V + (ContinuousLinearEquiv.refl ℝ (Euclidean n)) hcenter + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hfirst.representative j)) + (by simpa only [ContinuousLinearEquiv.coe_refl, + ContinuousLinearMap.adjoint_id, ContinuousLinearMap.id_apply] using hmetric) + have hradial (b : Euclidean n) : SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ g b) =ᵐ[ + μ.restrict (ball center (s / 512))] localGamma μ hQ (T2.replacement i) (sobolevColumnMap μ hQ u b) := by + have hh := localRadialDerivative_column μ hQ (ball center (s / 512)) (T2.replacement i) + (ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith : s / 512 ≤ s / 4)) hgrad2) + u g hrep b + exact (SobolevSpace.restrictLp_coe μ hQ _ _).symm.trans + (by rw [← hh]; exact localRadialDerivative_representative μ hQ _ _ _ _) + have hlinear (b : Euclidean n) : + sobolevColumnMap μ hQ (fun j => g j - sobolevColumnMap μ hQ u (coeff j)) b = + sobolevColumnMap μ hQ g b - sobolevColumnMap μ hQ u (finiteCoefficientMap coeff b) := by + have hh := centered_radial_residual_column μ hQ u g one 0 coeff b + simpa only [centeredAffineSobolev, inner_zero_left, neg_zero, zero_smul, zero_add] using hh + have hradialFit (b : Euclidean n) : + ‖normalizeLocalL2 μ (ball center (s / 512)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball center (s / 512)) + (sobolevColumnMap μ hQ g b - sobolevColumnMap μ hQ u (finiteCoefficientMap coeff b)))‖ ≤ + ((n : ℝ) * Real.sqrt Drow) * s * ‖b‖ * source := by + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + rw [← hlinear] + have hh := normalized_column_sq_le μ hQ + (fun j => g j - sobolevColumnMap μ hQ u (coeff j)) (ball center (s / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (by positivity : 0 ≤ Drow * s ^ 2 * source ^ 2) hfit b + convert hh using 1 + simp only [mul_pow, Real.sq_sqrt hDrow] + ring + let d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H + ((n : ℝ) * Real.sqrt Drow) 1 1 := { + root := root, root_le_one := hroot, first := first, center := center + firstSource := S1, secondSource := S2, firstReplacement := T1, secondReplacement := T2 + index := i, room := hroom, curvature := hcurv, smallCurvature := hsmallcurv, laplacianBound := hlap + coordinates := u, coordinateValues := fun x => s⁻¹ • V x + harmonic := fun j => (hfirst.harmonic j).mono μ hQ hsub4 + gradient := fun j => ae_restrict_of_ae_restrict_of_subset hsub4 (hfirst.gradient j) + firstGradient := hgrad1, secondGradient := hgrad2, cutoff := cutoff + one := one, oneRepresentative := hconstant, volume := hvolume, sphere := hsphere + frame := ContinuousLinearEquiv.refl ℝ (Euclidean n) + frameBound := ContinuousLinearMap.norm_id_le + source := source, source_pos := hsource, pairBudget := hpair + affineBound := fun c a => haff (s / 2048) (by linarith) (by linarith) + (hcurvR _ (by positivity) (by linarith)) c a + affineHalfBound := fun c a => haff (s / 4096) le_rfl (by linarith) + (hcurvR _ (by positivity) (by linarith)) c a + columnBound := by simpa only [ContinuousLinearEquiv.coe_refl', id_eq, one_mul] using hcolumns + radialColumns := sobolevColumnMap μ hQ g, radialMatrix := finiteCoefficientMap coeff + radialRepresentative := hradial + radialFit := by simpa only [ContinuousLinearEquiv.coe_refl', id_eq] using hradialFit + totalSource := total, totalSource_nonneg := htotal, summable := hsum, totalBudget := hbudget + approximationError := error, approximationError_pos := herror, measured := hmeasured + centered := by rw [hcenter, smul_zero] + representative := by + intro j + have hsub' : ball center ((1 / 1024) * s) ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub' (hfirst.representative j), + ae_restrict_of_ae (Lp.coeFn_smul s⁻¹ (SobolevSpace.toLp μ hQ (u j)))] with x hx hsmul + change SobolevSpace.toLp μ hQ (u j) x = V x j at hx + change (s⁻¹ • SobolevSpace.toLp μ hQ (u j)) x = _ + simp only [hsmul, Pi.smul_apply, smul_eq_mul, hx, PiLp.smul_apply] } + exact ⟨d, rfl, rfl, rfl, rfl, rfl, rfl, rfl⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedProjectionResidual.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProjectionResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7a62c4d9cedd590578597592d2ae70d7c33cea3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedProjectionResidual.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.FramedAffineProjection +import OAI.Geometry.RCD.Harmonic.LocalAffineMoments + +namespace OAI + +/-! # Normalizing the actual orthogonal projection residual -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Scaling a genuine projection residual preserves all affine +orthogonality, including the constant term. -/ +theorem normalized_projection_orthogonality {n : ℕ} + (s : Set X) (hfin : μ s ≠ ∞) (u : Fin n → SobolevSpace μ hQ) + (v w : SobolevSpace μ hQ) + (hw : SobolevSpace.restrictLp μ hQ s w = + affineResidual μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s v)) + (a : ℝ) (j : Option (Fin n)) : + ⟪localAffineMomentFamily μ hQ u (a • w) s hfin none, + localAffineMomentFamily μ hQ u (a • w) s hfin (some j)⟫_ℝ = 0 := by + cases j with + | none => + have ho := affineProjection_orthogonal μ hQ u s hfin + (SobolevSpace.restrictLp μ hQ s v) 1 0 + have ho' : ⟪affineResidual μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s v), + restrictedOne μ s hfin⟫_ℝ = 0 := by + simpa only [affineCoordinateMap_apply, map_zero, one_smul, add_zero, + affineResidual, sub_apply, ContinuousLinearMap.id_apply] using ho + change ⟪normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (a • w)), + normalizeLocalL2 μ s hfin (restrictedOne μ s hfin)⟫_ℝ = 0 + rw [map_smul, hw] + simp only [normalizeLocalL2, real_inner_smul_left, real_inner_smul_right, ho', mul_zero] + | some j => + have ho := affineResidual_coordinate_inner μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s v) j + change ⟪normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (a • w)), + normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (u j))⟫_ℝ = 0 + rw [map_smul, hw] + simp only [normalizeLocalL2, real_inner_smul_left, real_inner_smul_right, ho, mul_zero] + +/-- Dividing by the nonzero inner mean norm makes the same residual's +diagonal moment exactly one. -/ +theorem normalized_residual_unit_moment {n : ℕ} + (s : Set X) (hfin : μ s ≠ ∞) (u : Fin n → SobolevSpace μ hQ) + (w : SobolevSpace μ hQ) + (hpos : 0 < ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖) : + let α := ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ + ⟪localAffineMomentFamily μ hQ u (α⁻¹ • w) s hfin none, + localAffineMomentFamily μ hQ u (α⁻¹ • w) s hfin none⟫_ℝ = 1 := by + dsimp only + let α := ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)‖ + change ⟪normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (α⁻¹ • w)), + normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (α⁻¹ • w))⟫_ℝ = 1 + have hs : normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (α⁻¹ • w)) = + α⁻¹ • normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w) := by + rw [map_smul] + simp only [normalizeLocalL2, smul_comm α⁻¹] + rw [hs, real_inner_self_eq_norm_sq, norm_smul, Real.norm_eq_abs, abs_inv, + abs_of_pos hpos, inv_mul_cancel₀ hpos.ne', one_pow] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedQuotientError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedQuotientError.lean new file mode 100644 index 0000000000000000000000000000000000000000..62015a3b795a57796c518540681282a18143e296 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedQuotientError.lean @@ -0,0 +1,31 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Tactic + +namespace OAI + +/-! # Normalizing a bounded test by a convergent positive mass -/ + +namespace RegularPointCoordinates + +theorem normalized_quotient_error {a ak b bk : ℝ} (hb : 0 V x j) + (hfirst : FirstOrderSplittingOn μ hQ p (2 * distanceSourceRadius r0 i) δ + (transformedColumn μ hQ u N) W) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (W x - W p))) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (b : Euclidean n) {L : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ L) : + let r := distanceSourceRadius r0 i / 64 + let hfin : μ (ball p r) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p r).measure_lt_top) + ‖normalizeLocalL2 μ (ball p r) hfin + (radialPairingLp μ hQ (ball p r) (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ u b) ha - + SobolevSpace.restrictLp μ hQ (ball p r) + (centeredAffineSobolev μ hQ u (T.cutoff i).sobolev (V p) b))‖ ^ 2 ≤ + radialFitQualitativeConstant n Cχ * δ * r ^ 2 * ‖N.symm b‖ ^ 2 := by + dsimp only + let s := distanceSourceRadius r0 i + let r := s / 64 + let D := radialNormalizationRestrictionConstant n + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hD : 1 ≤ D := radialNormalizationRestrictionConstant_ge_one n + have hε : 0 ≤ D * δ := mul_nonneg (zero_le_one.trans hD) hδ + obtain ⟨hlocal, hvol, hratio⟩ := localize_radial_frame μ hQ hs homega hδ hquarter + (transformedColumn μ hQ u N) W hfirst + have hsub : ball p (4 * r) ⊆ ball p (2 * s) := ball_subset_ball (by dsimp only [r]; linarith) + have hη : SobolevSpace.toLp μ hQ (T.cutoff i).sobolev =ᵐ[μ.restrict (ball p (4 * r))] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff i).representative, + ae_restrict_mem measurableSet_ball] with x hx hxr + exact hx.trans ((T.cutoff i).one x + ((ball_subset_ball (show 4 * r ≤ 4 * s by dsimp only [r]; linarith)) hxr)) + have hmetric' := hmetric.mono_error (show δ ≤ D * δ by nlinarith) + have herr := T.framed_radial_candidate μ hQ i hε hδ1 hCχ u N V W + (hV.mono hsub) (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hu j)) hlocal hmetric' + (T.cutoff i).sobolev hη χ hvol b + dsimp only at herr + let q := T.distanceDatum μ hQ i + let H := centeredAffineSobolev μ hQ u (T.cutoff i).sobolev (V p) b + let t := radialPairingLp μ hQ (ball p r) q (sobolevColumnMap μ hQ u b) ha + let v := SobolevSpace.restrictLp μ hQ (ball p r) H + have heq : (fun x => ((t - v) x) ^ 2) =ᵐ[μ.restrict (ball p r)] + fun x => (localGamma μ hQ q (sobolevColumnMap μ hQ u b) x - SobolevSpace.toLp μ hQ H x) ^ 2 := by + filter_upwards [Lp.coeFn_sub t v, + radialPairingLp_representative μ hQ (ball p r) q (sobolevColumnMap μ hQ u b) ha, + SobolevSpace.restrictLp_coe μ hQ (ball p r) H] with x hsub ht hv + simp only [hsub, Pi.sub_apply] + change (t x - v x) ^ 2 = _ + rw [ht, hv] + rw [normalizeLocalL2_norm_sq, integral_congr_ae heq] + have hb := mul_le_mul_of_nonneg_left herr + (inv_nonneg.mpr (show 0 ≤ μ.real (ball p r) from measureReal_nonneg)) + apply hb.trans + have hcoef : 0 ≤ ((n : ℝ) * (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1))) * + (D * δ) * r ^ 2 * ‖N.symm b‖ ^ 2 := by positivity + have hh := mul_le_mul_of_nonneg_left hratio hcoef + convert hh using 1 <;> dsimp only [radialFitQualitativeConstant, D] <;> ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedRadialError.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedRadialError.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ed60258736717d1cad8d963d1515cb8fd134d23 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedRadialError.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.RCD.Harmonic.QuadraticInteriorError +import OAI.Geometry.RCD.Harmonic.QuadraticModelValues + +namespace OAI + +/-! # Quantitative radial smallness in normalized harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- The cutoff gradient bound follows from its actual Lipschitz representative. -/ +theorem GoodLaplacianCutoff.gradient_le {p : X} {r C : ℝ} (hr : 0 < r) (hC : 0 ≤ C) + (χ : GoodLaplacianCutoff μ hQ p r C) : + ∀ᵐ x ∂μ, localGamma μ hQ χ.sobolev χ.sobolev x ≤ (C / r) ^ 2 := by + filter_upwards [SobolevSpace.minimalSlope_le_lipschitz μ hQ χ.sobolev χ.lipschitz χ.representative, + localGamma_self μ hQ χ.sobolev, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ χ.sobolev)] with x hx he hn + rw [he] + have hx' : SobolevSpace.minimalSlope μ hQ χ.sobolev x ≤ C / r := by + simpa only [Real.coe_toNNReal _ (div_nonneg hC hr.le)] using hx + exact (sq_le_sq₀ hn (div_nonneg hC hr.le)).mpr hx' + +omit [IsFiniteMeasureOnCompacts μ] [ProperSpace X] in +private theorem gram_integral_bound {n : ℕ} {Ω : Set X} (hfin : μ Ω ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) {E : ℝ} + (hE : ∀ i j, (∫ x in Ω, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ) ≤ E) : + (∫ x in Ω, ∑ i, ∑ j, |localGamma μ hQ (u j) (u i) x - if j = i then 1 else 0| ∂μ) ≤ + (n : ℝ) ^ 2 * E := by + have hi (i j : Fin n) : IntegrableOn (fun x => + |localGamma μ hQ (u j) (u i) x - if j = i then 1 else 0|) Ω μ := + ((localGamma_memL1 μ hQ (u j) (u i)).integrableOn.sub (integrableOn_const hfin)).abs + rw [integral_finsetSum Finset.univ (fun i _ => integrable_finsetSum Finset.univ (fun j _ => hi i j))] + simp_rw [integral_finsetSum Finset.univ (fun j _ => hi _ j)] + have hh := Finset.sum_le_sum (fun i (_ : i ∈ (Finset.univ : Finset (Fin n))) => + Finset.sum_le_sum (fun j (_ : j ∈ (Finset.univ : Finset (Fin n))) => hE j i)) + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, pow_two, mul_assoc] using hh + +omit [IsFiniteMeasureOnCompacts μ] [ProperSpace X] in +private theorem gram_column_integral_bound {n : ℕ} {I Ω : Set X} + (hIΩ : I ⊆ Ω) (hfin : μ Ω ≠ ∞) (u : Fin n → SobolevSpace μ hQ) {E : ℝ} + (hE : ∀ i j, (∫ x in Ω, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ) ≤ E) + (j : Fin n) : + (∫ x in I, ∑ i, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ) ≤ + (n : ℝ) * E := by + have hi (i : Fin n) : IntegrableOn (fun x => + |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0|) Ω μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const hfin)).abs + have hmono := setIntegral_mono_set (integrable_finsetSum Finset.univ (fun i _ => hi i)) + (Filter.Eventually.of_forall fun x => Finset.sum_nonneg fun _ _ => abs_nonneg _) + (Filter.Eventually.of_forall hIΩ) + apply hmono.trans + rw [integral_finsetSum Finset.univ (fun i _ => hi i)] + have hh := Finset.sum_le_sum (fun i (_ : i ∈ (Finset.univ : Finset (Fin n))) => hE i j) + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] using hh + +/-- The manuscript's qualitative radial estimate, with an explicit modulus: +metric error epsilon and first-order Gram error epsilon give a squared +radial error at most a dimensional constant times epsilon*r^2*volume. +Global boundedness may be obtained by `boundedLocalVersion`; it preserves +all local quantities in this statement. -/ +theorem normalized_coordinate_radial_error {n : ℕ} {p : X} {r ε Cχ Q : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) (hQb : 0 ≤ Q) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * r) ε u v) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 r 4 ε (fun x => r⁻¹ • v x)) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ 5 * r) + (q : SobolevSpace μ hQ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (4 * r))] fun x => dist p x ^ 2 / 2) + (hqbound : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ q x| ≤ Q) + (heik : ∀ᵐ x ∂μ.restrict (ball p (4 * r)), localGamma μ hQ q q x = 2 * SobolevSpace.toLp μ hQ q x) + (χ : GoodLaplacianCutoff μ hQ p r Cχ) + (hvol : 0 < μ.real (ball p (4 * r))) (j : Fin n) : + (∫ x in ball p r, (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1)) * ε * r ^ 2 * μ.real (ball p (4 * r)) := by + let C : ℝ≥0 := ⟨5 * r, by positivity⟩ + let D : ℝ≥0 := ⟨Q + (n : ℝ) * (5 * r) ^ 2 / 2, by positivity⟩ + let V := μ.real (ball p (4 * r)) + have hfin : μ (ball p (4 * r)) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p (4 * r)).measure_lt_top) + have hb : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C := hub + have hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ D := by + filter_upwards [hqbound, coordinateQuadratic_bound μ hQ u C hb, + Lp.coeFn_sub (SobolevSpace.toLp μ hQ q) (SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C))] + with x hq' hH hs + change |(SobolevSpace.toLp μ hQ q - SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C)) x| ≤ _ + rw [hs, Pi.sub_apply] + exact (abs_sub _ _).trans (add_le_add hq' hH.2) + have hsmall := coordinateQuadratic_metric_value_error μ hQ hr (by norm_num : (0 : ℝ) ≤ 4) + hε u C v hb hfirst.representative hv hmetric q hq + have hgrad : ∀ i, ∀ᵐ x ∂μ.restrict (ball p (4 * r)), localGamma μ hQ (u i) (u i) x ≤ (2 : ℝ) ^ 2 := by + intro i + filter_upwards [hfirst.gradient i] with x hx + exact hx.trans (by nlinarith) + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have hsupport : tsupport (χ.weight : X → ℝ) ⊆ ball p (4 * r) := by + intro x hx + have hd : dist x p ≤ 2 * r := χ.tsupport_subset μ hQ hx + change dist x p < 4 * r + linarith + have hbound := coordinateQuadratic_interior_radial_error μ hQ measurableSet_ball hsub hfin + u C D (Cχ / r).toNNReal hfirst.harmonic hb χ.sobolev q χ.weight χ.lipschitz + (χ.hasCompactSupport μ hQ) + (fun x => by rw [abs_of_nonneg (χ.bounds x).1]; exact (χ.bounds x).2) + (fun x => (χ.bounds x).1) hsupport χ.representative χ.one hw + (by positivity : 0 ≤ r ^ 2 * (ε * (2 * 4 + ε) / 2)) (by norm_num : (0 : ℝ) ≤ 2) + (div_nonneg hCχ hr.le) hsmall heik hgrad (ae_restrict_of_ae (χ.gradient_le μ hQ hr hCχ)) j + have hgram (i k : Fin n) : + (∫ x in ball p (4 * r), |localGamma μ hQ (u i) (u k) x - if i = k then 1 else 0| ∂μ) ≤ ε * V := by + apply (div_le_iff₀ hvol).mp + simpa only [div_eq_inv_mul] using hfirst.gram i k + have hG := gram_integral_bound μ hQ hfin u hgram + have hGj := gram_column_integral_bound μ hQ hsub hfin u hgram j + have hbound' : (∫ x in ball p r, + (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + 8 * (2 * (r ^ 2 * (ε * (2 * 4 + ε) / 2)) * + (1 + (n : ℝ) * 4 + (n : ℝ) * (5 * r) * 2 * (Cχ / r)) * V + + (5 * r) ^ 2 * ((n : ℝ) ^ 2 * (ε * V))) + + 2 * ((n : ℝ) * (5 * r) ^ 2 * 5) * ((n : ℝ) * (ε * V)) := by + have hsum := add_le_add + (le_refl (2 * (r ^ 2 * (ε * (2 * 4 + ε) / 2)) * + (1 + (n : ℝ) * (2 : ℝ) ^ 2 + (n : ℝ) * (C : ℝ) * 2 * (Cχ / r)) * V)) + (mul_le_mul_of_nonneg_left hG (sq_nonneg (C : ℝ))) + have hh := add_le_add + (mul_le_mul_of_nonneg_left hsum (by norm_num : (0 : ℝ) ≤ 2 * 2 ^ 2)) + (mul_le_mul_of_nonneg_left hGj + (by positivity : 0 ≤ 2 * ((n : ℝ) * (C : ℝ) ^ 2 * ((2 : ℝ) ^ 2 + 1)))) + have hC : (C : ℝ) = 5 * r := rfl + simp only [hC] at hbound hh + convert hbound.trans hh using 1 + ring + have hcancel : (n : ℝ) * (5 * r) * 2 * (Cχ / r) = 10 * n * Cχ := by + field_simp + ring + rw [hcancel] at hbound' + have hδ : r ^ 2 * (ε * (2 * 4 + ε) / 2) ≤ (9 / 2 : ℝ) * ε * r ^ 2 := by + have hh := mul_le_mul_of_nonneg_left hε1 (by positivity : 0 ≤ ε * r ^ 2) + nlinarith + have hcoef : 72 + 288 * (n : ℝ) + 720 * n * Cχ + 450 * (n : ℝ) ^ 2 ≤ + 1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1) := by + have hn : (0 : ℝ) ≤ n := Nat.cast_nonneg _ + nlinarith [mul_nonneg (sq_nonneg (n : ℝ)) hCχ, mul_nonneg hn hCχ] + have hfactor : 0 ≤ 1 + (n : ℝ) * 4 + 10 * n * Cχ := by positivity + have hδ' := mul_le_mul_of_nonneg_right hδ (mul_nonneg hfactor hvol.le) + have hlast := mul_le_mul_of_nonneg_right hcoef (by positivity : 0 ≤ ε * r ^ 2 * V) + have hcoarse : (∫ x in ball p r, + (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + (72 + 288 * (n : ℝ) + 720 * n * Cχ + 450 * (n : ℝ) ^ 2) * (ε * r ^ 2 * V) := by + nlinarith only [hbound', hδ'] + apply hcoarse.trans + convert hlast using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedRecoveryRadialSwap.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedRecoveryRadialSwap.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ed33cc504f16a2209c0bfbd99730c6fd1ea403d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedRecoveryRadialSwap.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Harmonic.RecoveryHarmonicSwap +import OAI.Geometry.RCD.Sobolev.SupportedGradientL2Error +import OAI.Geometry.RCD.Coordinates.CompactRadialPullback +import OAI.Geometry.RCD.Sobolev.ScaledGradientGammaL2 + +namespace OAI + +/-! # Harmonicity replaces the Poisson gradient by its radial value limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.normalized_recovery_radial_swap {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + {S c T : ℝ} (hS : 0 ‖z‖^2/2) (closedBall 0 T)) + (hlim : Tendsto (fun k => ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (f k) x-‖V k x‖^2/2)^2 + ∂hausdorff n X) atTop (𝓝 0)) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) x* + localGamma (hausdorff n X) hX.quadratic (f k) (w k) x ∂hausdorff n X)+ + r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), F (V k x)* + localGamma (hausdorff n X) hX.quadratic (u k) (w k) x ∂hausdorff n X)) + atTop (𝓝 0) := by + let μ := hausdorff n X + let U := fun k => ball (p k) (S*r k) + let Ω := fun k => ball (p k) (T*r k) + let z := fun k x => SobolevSpace.toLp μ hX.quadratic (f k) x-‖V k x‖^2/2 + let : ∀ k, IsFiniteMeasure (μ.restrict (U k)) := fun k => + ⟨by rw [Measure.restrict_apply_univ]; exact hX.finiteOnBounded (U k) isBounded_ball⟩ + have hrad (k : ℕ) : MemLp (fun x => ‖V k x‖^2/2) 2 (μ.restrict (U k)) := + measured_radial_memLp μ (hr k) hS.le (V k) (hV k) + have hzL (k : ℕ) : MemLp (z k) 2 (μ.restrict (U k)) := + ((Lp.memLp (SobolevSpace.toLp μ hX.quadratic (f k))).restrict (U k)).sub (hrad k) + have huT : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), + r k^2*localGamma μ hX.quadratic (u k) (u k) x≤Q^2 := + hu.mono fun _ hk => ae_restrict_of_ae hk + have huz (k : ℕ) : ∀ᵐ x ∂μ, x∉Ω k → SobolevSpace.toLp μ hX.quadratic (u k) x=0 := + (hz k).mono fun x hx hy => hx (fun hh => hy + ((ball_subset_ball (mul_le_mul_of_nonneg_right hcT.le (hr k).le)) hh)) + have he := supported_gradient_l2_error μ hX.quadratic Ω U + (fun k => ball_subset_ball (mul_le_mul_of_nonneg_right hTS.le (hr k).le)) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) r (fun k => (hr k).le) + u w z hQ hM huT hwb huz hzL hlim + have hweight := compact_radial_pullback μ hX.quadratic hS hcT hTS p r ε V hr hε hV u w hz F hF + have heq : ∀ᶠ k in atTop, + r k^2*(μ.real (U k))⁻¹*(∫ x in U k, SobolevSpace.toLp μ hX.quadratic (u k) x* + localGamma μ hX.quadratic (f k) (w k) x ∂μ)+ + r k^2*(μ.real (U k))⁻¹*(∫ x in U k, F (V k x)* + localGamma μ hX.quadratic (u k) (w k) x ∂μ)= + -(r k^2*(μ.real (U k))⁻¹*∫ x in U k, z k x*localGamma μ hX.quadratic (u k) (w k) x ∂μ) := by + filter_upwards [hu,hweight] with k huk hwk + have hγ := scaled_gradient_gamma_memLp μ hX.quadratic (u k) (w k) (hr k) hQ huk + have hi := ((Lp.memLp (SobolevSpace.toLp μ hX.quadratic (f k))).restrict (U k)).integrable_mul + (hγ.restrict (U k)) + have hj := (hrad k).integrable_mul (hγ.restrict (U k)) + have hs := hX.recovery_harmonic_swap hn (f k) (w k) (u k) (p k) (hr k) + (hcT.trans hTS) hQ huk (hz k) (hw k) + change (∫ x in U k, _ ∂μ)=_ at hs + rw [hs] + have hrw : (∫ x in U k, F (V k x)*localGamma μ hX.quadratic (u k) (w k) x ∂μ)= + ∫ x in U k, (‖V k x‖^2/2)*localGamma μ hX.quadratic (u k) (w k) x ∂μ := + integral_congr_ae (ae_restrict_of_ae hwk.symm) + rw [hrw] + have hsub : (∫ x in U k, z k x*localGamma μ hX.quadratic (u k) (w k) x ∂μ)= + (∫ x in U k, SobolevSpace.toLp μ hX.quadratic (f k) x*localGamma μ hX.quadratic (u k) (w k) x ∂μ)- + (∫ x in U k, (‖V k x‖^2/2)*localGamma μ hX.quadratic (u k) (w k) x ∂μ) := by + simp only [z,sub_mul] + exact integral_sub hi hj + rw [hsub] + ring + simpa only [neg_zero] using he.neg.congr' (heq.mono fun _ hk => hk.symm) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedResidualOuter.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedResidualOuter.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4dc35bfd63f0f5765d8c45dcf8e1612d0134e07 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedResidualOuter.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Harmonic.LocalResidualOuterBound +import OAI.Geometry.RCD.Coordinates.NormalizedFitEnergy + +namespace OAI + +/-! # The transport estimate in normalized local L2 spaces -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [MetricSpace X] hQ in +theorem localL2_norm_eq_root_mul_normalized (s : Set X) (hfin : μ s ≠ ∞) + (hpos : 0 < μ.real s) (f : Lp ℝ 2 (μ.restrict s)) : + ‖f‖ = Real.sqrt (μ.real s) * ‖normalizeLocalL2 μ s hfin f‖ := by + rw [normalizeLocalL2, norm_smul, Real.norm_eq_abs, abs_inv, abs_norm, restrictedOne_norm] + field_simp [(Real.sqrt_pos.mpr hpos).ne'] + +variable [BorelSpace X] [ProperSpace X] [IsFiniteMeasureOnCompacts μ] + +/-- The outer normalized norm is bounded uniformly from the inner one. +Only a fixed four-to-one volume ratio is lost in the forcing coefficient. -/ +theorem normalized_residual_outer_bound (n : ℕ) {F E W : ℝ} + (hF : 0 ≤ F) (hW : 0 ≤ W) (C : ℝ≥0) : + ∃ T : ℝ, 0 ≤ T ∧ ∀ (R a : ℝ), 0 < R → 0 ≤ a → a ≤ (n : ℝ) + 1 → + ∀ (z : X) (f w q : SobolevSpace μ hQ) (σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn μ hQ (ball z (4 * R)) f a → + ∀ {B : ℝ} (hf : ∀ᵐ x ∂μ.restrict (ball z (4 * R)), localGamma μ hQ f f x ≤ B), + (∀ᵐ x ∂μ.restrict (ball z (4 * R)), |SobolevSpace.toLp μ hQ w x| ≤ C) → + ∀ e : X → ℝ, MemLp e 2 μ → + localRadialDerivative μ hQ (ball z (4 * R)) f hf w = + SobolevSpace.restrictLp μ hQ (ball z (4 * R)) (w + q) → + localGamma μ hQ f (inwardSobolev μ hQ z (3 * R)) =ᵐ[μ.restrict (ball z (3 * R))] + (fun x => e x - dist z x) → + μ (sphere z R) = 0 → + ∀ (hfin : ∀ t : ℝ, μ (ball z t) ≠ ∞), + 0 < μ.real (ball z R) → + μ.real (ball z (4 * R)) ≤ W ^ 2 * μ.real (ball z R) → + ‖normalizeLocalL2 μ (ball z (4 * R)) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z (4 * R)) q)‖ ≤ + F * (‖normalizeLocalL2 μ (ball z R) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z R) w)‖ + σ) → + (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ + E ^ 2 * R ^ 2 * μ.real (ball z R) * σ ^ 2 → + ‖normalizeLocalL2 μ (ball z (2 * R)) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w)‖ ≤ + T * (‖normalizeLocalL2 μ (ball z R) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z R) w)‖ + σ) := by + obtain ⟨T, hT, hb⟩ := local_uniform_residual_outer_bound μ hQ n (E := E) (mul_nonneg hF hW) C + refine ⟨T, hT, ?_⟩ + intro R a hR ha han z f w q σ hσ hlap B hf hw e he heuler hradial hsphere hfin hvol hratio hq herr + let α := ‖normalizeLocalL2 μ (ball z R) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z R) w)‖ + let v := Real.sqrt (μ.real (ball z R)) + let v₂ := Real.sqrt (μ.real (ball z (2 * R))) + let v₄ := Real.sqrt (μ.real (ball z (4 * R))) + have hv : 0 < v := Real.sqrt_pos.mpr hvol + have hvle : v ≤ v₂ := Real.sqrt_le_sqrt + (measureReal_mono (ball_subset_ball (by linarith)) (hfin _)) + have hvol₂ : 0 < μ.real (ball z (2 * R)) := + hvol.trans_le (measureReal_mono (ball_subset_ball (by linarith)) (hfin _)) + have hvol₄ : 0 < μ.real (ball z (4 * R)) := + hvol.trans_le (measureReal_mono (ball_subset_ball (by linarith)) (hfin _)) + have hv₄ : v₄ ≤ W * v := by + apply (sq_le_sq₀ (Real.sqrt_nonneg _) (mul_nonneg hW hv.le)).mp + dsimp only [v₄, v] + rw [mul_pow, Real.sq_sqrt hvol.le, Real.sq_sqrt hvol₄.le] + exact hratio + have hwraw : ‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ = v * α := + localL2_norm_eq_root_mul_normalized μ _ (hfin _) hvol _ + have hqraw : ‖SobolevSpace.restrictLp μ hQ (ball z (4 * R)) q‖ ≤ + (F * W) * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + v * σ) := by + rw [localL2_norm_eq_root_mul_normalized μ _ (hfin _) hvol₄] + calc + _ ≤ v₄ * (F * (α + σ)) := mul_le_mul_of_nonneg_left hq (Real.sqrt_nonneg _) + _ ≤ (W * v) * (F * (α + σ)) := mul_le_mul_of_nonneg_right hv₄ + (mul_nonneg hF (add_nonneg (norm_nonneg _) hσ)) + _ = _ := by rw [hwraw]; ring + have heraw : (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ E ^ 2 * R ^ 2 * (v * σ) ^ 2 := by + rw [mul_pow, show v ^ 2 = μ.real (ball z R) from Real.sq_sqrt hvol.le] + simpa only [mul_assoc] using herr + have hout := hb R a hR ha han z f w q (v * σ) (mul_nonneg hv.le hσ) + hlap hf hw e he heuler hradial hsphere hqraw heraw + rw [hwraw, localL2_norm_eq_root_mul_normalized μ _ (hfin _) hvol₂] at hout + have hscaled : v * ‖normalizeLocalL2 μ (ball z (2 * R)) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w)‖ ≤ v * (T * (α + σ)) := by + calc + _ ≤ v₂ * ‖normalizeLocalL2 μ (ball z (2 * R)) (hfin _) + (SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w)‖ := + mul_le_mul_of_nonneg_right hvle (norm_nonneg _) + _ ≤ _ := hout + _ = _ := by ring + exact (mul_le_mul_iff_right₀ hv).mp hscaled + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedSobolevMoment.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSobolevMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6a4436f0276ad03ad2661bc49bb87705967efc6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSobolevMoment.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.RCD.Sobolev.DyadicTailBound +import OAI.Geometry.RCD.Sobolev.UniformAnnularCoercivity +import OAI.Geometry.RCD.Sobolev.GeometricTailMoment +import Mathlib.Analysis.SpecialFunctions.Log.Base + +namespace OAI + +/-! # A superquadratic moment for normalized Dirichlet functions -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The dyadic support estimate improves the exponent above two. +Only the annulus, bounded rescaled curvature, and unit energy normalization +are needed; all constants precede the center and radius. -/ +theorem NoncollapsedRCD.normalized_dirichlet_moment {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) : + ∃ p C : ℝ, 2 < p ∧ 0 < C ∧ ∀ (x : X) (R : ℝ), 0 < R → -1 ≤ K*(2*R)^2 → + 2*(hausdorff n X).real (ball x R) ≤ (hausdorff n X).real (ball x (2*R)) → + ∀ w : SobolevSpace.dirichlet (hausdorff n X) hX.quadratic (ball x R), + R^2*energyForm (hausdorff n X) hX.quadratic w.val w.val ≤ + (hausdorff n X).real (ball x R) → + IntegrableOn (fun y => |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p) + (ball x R) (hausdorff n X) ∧ + (∫ y in ball x R, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p + ∂hausdorff n X) ≤ C*(hausdorff n X).real (ball x R) := by + obtain ⟨C₀, D, hC₀, hD, htail⟩ := hX.dyadic_tail_bound hn + obtain ⟨P, hP, hPoincare⟩ := hX.uniform_annular_coercivity hn + let b := Real.sqrt D + have hDpos : 0 < D := by linarith + have hb0 : 0 < b := Real.sqrt_pos.mpr hDpos + have hb2 : b^2 = D := Real.sq_sqrt hDpos.le + have hb : 1 < b := by nlinarith + let p := 2 + Real.logb b 2 + have hp : 2 < p := by + have hl : 0 < Real.logb b 2 := by + unfold Real.logb + exact div_pos (Real.log_pos (by norm_num)) (Real.log_pos hb) + dsimp only [p] + linarith + have hp0 : 0 < p := by linarith + have hbpow : b^p = 2*D := by + dsimp only [p] + rw [Real.rpow_add hb0, Real.rpow_two, + Real.rpow_logb hb0 (ne_of_gt hb) (by norm_num), hb2] + ring + let σ := Real.sqrt (2*D*P) + have hσ : 0 < σ := Real.sqrt_pos.mpr (by positivity) + have hσ2 : σ^2 = 2*D*P := Real.sq_sqrt (by positivity) + let S := 2*σ + let q := 1/(4*D) + have hq : 0 < q := by dsimp only [q]; positivity + have hdecay : b^p*q = 1/2 := by rw [hbpow]; dsimp only [q]; field_simp; ring + let C := (S*b)^p + 2*(C₀/σ^2)*(S*b^2)^p + have hC : 0 < C := by + have ha : 0 < (S*b)^p := Real.rpow_pos_of_pos (by dsimp only [S]; positivity) _ + have hh : 0 < 2*(C₀/σ^2)*(S*b^2)^p := by positivity + exact add_pos ha hh + refine ⟨p, C, hp, hC, ?_⟩ + intro x R hR hcurv hann w hnorm + let μ := hausdorff n X + let u := SobolevSpace.toLp μ hX.quadratic w.val + let V := μ.real (ball x R) + let E := energyForm μ hX.quadratic w.val w.val + have hV : 0 < V := ENNReal.toReal_pos (hX.fullSupport x R hR).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hE : 0 ≤ E := by + dsimp only [E] + rw [energyForm_self] + exact mul_nonneg (by norm_num) (SobolevSpace.energy_nonneg μ hX.quadratic w.val) + have hnorm' : R^2*E ≤ V := hnorm + have hl2 : ‖u‖^2 ≤ P*V := by + have hh := hPoincare x R hR hcurv hann w + have hm := mul_le_mul_of_nonneg_left hnorm' hP.le + change ‖u‖^2 ≤ P*R^2*E at hh + nlinarith + have hcurvR : -1 ≤ K*R^2 := by + by_cases hK : 0 ≤ K + · exact (by norm_num : (-1:ℝ)≤0).trans (mul_nonneg hK (sq_nonneg R)) + · have hh := mul_le_mul_of_nonpos_left (show R^2 ≤ (2*R)^2 by nlinarith) + (le_of_not_ge hK) + linarith + have ht2 (k : ℕ) : (σ*b^k)^2 = (2*D*P)*D^k := by + rw [mul_pow, hσ2, ← pow_mul, Nat.mul_comm k 2, pow_mul, hb2] + have hfour (k : ℕ) : ((2:ℝ)^k)^2 = (4:ℝ)^k := by + rw [← pow_mul, Nat.mul_comm k 2, pow_mul] + norm_num + have hlevels (k : ℕ) : (μ.restrict (ball x R)).real {y | S*b^k < |u y|} ≤ + ((C₀/σ^2)*V)*q^k := by + let t := σ*b^k + have ht : 0 < t := mul_pos hσ (pow_pos hb0 _) + have hparam : 2*D^(k+1)*‖u‖^2 ≤ V*t^2 := by + calc + _ ≤ 2*D^(k+1)*(P*V) := mul_le_mul_of_nonneg_left hl2 (by positivity) + _ = _ := by dsimp only [t]; rw [ht2, pow_succ]; ring + have hh := htail x R hR hcurvR w t ht k hparam + change t^2 * μ.real (ball x R ∩ {y | 2*t < |u y|}) ≤ C₀*(R/2^k)^2*E at hh + have hparam' : C₀*(R/2^k)^2*E ≤ C₀*V/(4:ℝ)^k := by + rw [div_pow, hfour] + have hmul := mul_le_mul_of_nonneg_left hnorm' hC₀.le + apply (le_div_iff₀ (pow_pos (by norm_num : (0:ℝ)<4) k)).mpr + field_simp at * + nlinarith + have halg : t^2 * (((C₀/σ^2)*V)*q^k) = C₀*V/(4:ℝ)^k := by + dsimp only [t, q] + rw [ht2, hσ2, div_pow, one_pow, mul_pow] + field_simp + have hmeasure : μ.real (ball x R ∩ {y | 2*t < |u y|}) ≤ ((C₀/σ^2)*V)*q^k := by + apply (mul_le_mul_iff_right₀ (sq_pos_of_pos ht)).mp + rw [halg] + exact hh.trans hparam' + rw [measureReal_restrict_apply (measurableSet_lt measurable_const + (Lp.stronglyMeasurable u).measurable.abs)] + simpa only [S, t, mul_assoc, inter_comm] using hmeasure + let : IsFiniteMeasure (μ.restrict (ball x R)) := + ⟨by simpa using hX.finiteOnBounded (ball x R) isBounded_ball⟩ + obtain ⟨hi, hbnd⟩ := geometric_tail_moment (μ.restrict (ball x R)) + (Lp.stronglyMeasurable u).measurable.abs (fun _ => abs_nonneg _) + (show 0 < S by dsimp only [S]; positivity) hb + (show 0 ≤ (C₀/σ^2)*V by positivity) hq.le hp0 + (by rw [hdecay]; norm_num) hlevels + refine ⟨hi, ?_⟩ + have hunit : (μ.restrict (ball x R)).real univ = V := by + simp only [Measure.real, Measure.restrict_apply_univ, V] + rw [hunit, hdecay] at hbnd + calc + _ ≤ (S*b)^p*V + ((C₀/σ^2)*V)*(S*b^2)^p/(1-1/2) := hbnd + _ = C*V := by dsimp only [C]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedSourceGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSourceGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..1895ab7bda023bcd3721de11a552ce99f6f6d309 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSourceGradient.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.RCD.Sobolev.BalancedSourceGradient + +namespace OAI + +/-! # Linear positive-source bounds in normalized ball units -/ + +open Set MeasureTheory Filter +open scoped ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A normalized Sobolev inequality gives a linear source-mass estimate +with a constant proportional to the square root of the length-squared scale. -/ +theorem normalized_source_gradient_of_pos (Ω : Set X) (hfin : μ Ω ≠ ∞) + (hvol : 0 < μ.real Ω) (H : SobolevSpace.dirichlet μ hQ Ω) + (hH : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ H.val x) + {d q C s P : ℝ} (hq : 1 < q) (hqd : q < d) (hC : 0 < C) (hs : 0 < s) (hP : 0 < P) + (hsob : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * s * (μ.real Ω) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) + (hsource : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, ∀ t : ℝ, 0 ≤ t → + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ φ.val x ∧ SobolevSpace.toLp μ hQ φ.val x ≤ t) → + energyForm μ hQ H.val φ.val ≤ P * t) : + IntegrableOn (fun x => SobolevSpace.minimalSlope μ hQ H.val x) Ω μ ∧ + (∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ) ≤ + P * Real.sqrt (balancedGradientConstant d q * C * s) := by + let V := μ.real Ω + let Cs := C * s * V ^ (1 / d - 1) + let PN := V / (C * s) + have hPN : 0 < PN := div_pos hvol (mul_pos hC hs) + let alpha := PN / P + have halpha : 0 < alpha := div_pos hPN hP + let N : SobolevSpace.dirichlet μ hQ Ω := alpha • H + have hN : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ N.val x := by + change ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ (alpha • H.val) x + rw [map_smul] + filter_upwards [hH, Lp.coeFn_smul alpha (SobolevSpace.toLp μ hQ H.val)] with x hx he + rw [he] + exact mul_nonneg halpha.le hx + have hNs : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, ∀ t : ℝ, 0 ≤ t → + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ φ.val x ∧ SobolevSpace.toLp μ hQ φ.val x ≤ t) → + energyForm μ hQ N.val φ.val ≤ PN * t := by + intro φ t ht hb + change energyForm μ hQ (alpha • H.val) φ.val ≤ _ + rw [energyForm_smul_left] + calc + _ ≤ alpha * (P * t) := mul_le_mul_of_nonneg_left (hsource φ t ht hb) halpha.le + _ = _ := by dsimp only [alpha]; field_simp + have hCs : 0 ≤ Cs := by dsimp only [Cs]; positivity + have hbalance : (Cs * PN) ^ d ≤ V := by + have he : Cs * PN = V ^ (1 / d) := by + calc + _ = V ^ (1 / d - 1) * V := by dsimp only [Cs, PN]; field_simp + _ = V ^ (1 / d) := by + calc + _ = V ^ (1 / d - 1) * V ^ (1 : ℝ) := by rw [Real.rpow_one] + _ = V ^ ((1 / d - 1) + 1) := (Real.rpow_add hvol _ _).symm + _ = _ := by congr 1; ring + rw [he, one_div, Real.rpow_inv_rpow hvol.le (ne_of_gt (zero_lt_one.trans (hq.trans hqd)))] + have hn := balanced_positive_source_gradient μ hQ Ω hfin N hN hq hqd hCs hPN.le hsob hNs hbalance + have he : (fun x => SobolevSpace.minimalSlope μ hQ N.val x) =ᵐ[μ] + fun x => alpha * SobolevSpace.minimalSlope μ hQ H.val x := by + change (fun x => SobolevSpace.minimalSlope μ hQ (alpha • H.val) x) =ᵐ[μ] _ + rw [SobolevSpace.minimalSlope_smul_nonneg μ hQ H.val halpha.le] + exact Lp.coeFn_smul alpha (SobolevSpace.minimalSlope μ hQ H.val) + have he' : (fun x => alpha⁻¹ * SobolevSpace.minimalSlope μ hQ N.val x) =ᵐ[μ] + fun x => SobolevSpace.minimalSlope μ hQ H.val x := by + filter_upwards [he] with x hx + rw [hx] + field_simp + have hi : IntegrableOn (fun x => SobolevSpace.minimalSlope μ hQ H.val x) Ω μ := + (hn.1.const_mul alpha⁻¹).congr (ae_restrict_of_ae he') + have hI : (∫ x in Ω, SobolevSpace.minimalSlope μ hQ N.val x ∂μ) = + alpha * ∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ := by + rw [integral_congr_ae (ae_restrict_of_ae he), integral_const_mul] + have hb := mul_le_mul_of_nonneg_left hn.2 (sq_nonneg (P / PN)) + have hleft : (P / PN) ^ 2 * (∫ x in Ω, SobolevSpace.minimalSlope μ hQ N.val x ∂μ) ^ 2 = + (∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ) ^ 2 := by + rw [hI] + dsimp only [alpha] + field_simp + have hright : (P / PN) ^ 2 * (PN * V * balancedGradientConstant d q) = + P ^ 2 * (balancedGradientConstant d q * C * s) := by + dsimp only [PN] + field_simp [ne_of_gt (show 0 < V from hvol)] + change (P / PN) ^ 2 * (∫ x in Ω, SobolevSpace.minimalSlope μ hQ N.val x ∂μ) ^ 2 ≤ + (P / PN) ^ 2 * (PN * V * balancedGradientConstant d q) at hb + rw [hleft, hright] at hb + have hD : 0 ≤ balancedGradientConstant d q * C * s := by + exact mul_nonneg (mul_nonneg (balancedGradientConstant_pos hq hqd).le hC.le) hs.le + have hsq := Real.sq_sqrt hD + refine ⟨hi, ?_⟩ + have hpbound : 0 ≤ P * Real.sqrt (balancedGradientConstant d q * C * s) := by positivity + apply le_of_sq_le_sq _ hpbound + simpa only [mul_pow, hsq] using hb + +/-- The scale-correct linear bound also includes zero source mass. -/ +theorem normalized_source_gradient (Ω : Set X) (hfin : μ Ω ≠ ∞) + (hvol : 0 < μ.real Ω) (H : SobolevSpace.dirichlet μ hQ Ω) + (hH : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ H.val x) + {d q C s P : ℝ} (hq : 1 < q) (hqd : q < d) (hC : 0 < C) (hs : 0 < s) (hP : 0 ≤ P) + (hsob : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * s * (μ.real Ω) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) + (hsource : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, ∀ t : ℝ, 0 ≤ t → + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ φ.val x ∧ SobolevSpace.toLp μ hQ φ.val x ≤ t) → + energyForm μ hQ H.val φ.val ≤ P * t) : + IntegrableOn (fun x => SobolevSpace.minimalSlope μ hQ H.val x) Ω μ ∧ + (∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ) ≤ + P * Real.sqrt (balancedGradientConstant d q * C * s) := by + have hb (r : ℝ) (hr : P < r) : + IntegrableOn (fun x => SobolevSpace.minimalSlope μ hQ H.val x) Ω μ ∧ + (∫ x in Ω, SobolevSpace.minimalSlope μ hQ H.val x ∂μ) ≤ + r * Real.sqrt (balancedGradientConstant d q * C * s) := by + apply normalized_source_gradient_of_pos μ hQ Ω hfin hvol H hH hq hqd hC hs + (hP.trans_lt hr) hsob + intro φ t ht hbound + exact (hsource φ t ht hbound).trans (mul_le_mul_of_nonneg_right hr.le ht) + refine ⟨(hb (P + 1) (by linarith)).1, ?_⟩ + have hlim : Tendsto (fun r : ℝ => r * Real.sqrt (balancedGradientConstant d q * C * s)) + (𝓝[>] P) (𝓝 (P * Real.sqrt (balancedGradientConstant d q * C * s))) := + (continuous_id.mul continuous_const).continuousAt.tendsto.mono_left nhdsWithin_le_nhds + apply ge_of_tendsto hlim + filter_upwards [self_mem_nhdsWithin] with r hr + exact (hb r hr).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanData.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..aea2da955ccc417dcfac33a7cdb5fa8f791f80ba --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanData.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Transport.CompressedSubplanNode + +namespace OAI + +/-! # The actual normalized subplan with its common compression and support -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [SeparableSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem normalized_subplan_data (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (hg : ∀ᵐ γ ∂π, IsGeodesic γ) + (hp : IsOptimalCoupling (π.map (fun γ => γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1)))) + (hfin : transportCost (π.map (fun γ => (γ 0,γ 1))) ≠ ∞) + (μ : Measure X) {C : ℝ≥0∞} (hc : ∀ t : Time, π.map (fun γ => γ t) ≤ C • μ) + (p : X) {R : ℝ} + (hs₀ : ∀ᵐ x ∂π.map (fun γ => γ 0), dist x p ≤ R) + (hs₁ : ∀ᵐ x ∂π.map (fun γ => γ 1), dist x p ≤ R) + (κ : Measure C(Time,X)) (hk : κ ≤ π) (hk0 : κ univ ≠ 0) : + let ρ := (κ univ)⁻¹ • κ + IsProbabilityMeasure ρ ∧ (∀ᵐ γ ∂ρ, IsGeodesic γ) ∧ + IsOptimalCoupling (ρ.map (fun γ => γ 0)) (ρ.map (fun γ => γ 1)) + (ρ.map (fun γ => (γ 0,γ 1))) ∧ + (∀ t : Time, ρ.map (fun γ => γ t) ≤ ((κ univ)⁻¹*C) • μ) ∧ + (∀ᵐ x ∂ρ.map (fun γ => γ 0), dist x p ≤ R) ∧ + (∀ᵐ x ∂ρ.map (fun γ => γ 1), dist x p ≤ R) := by + obtain ⟨hρ,hgρ,hpρ,_⟩ := normalized_optimal_subplan π hg hp hfin κ hk hk0 + refine ⟨hρ,hgρ,hpρ,normalized_subplan_compression π κ hk hc,?_,?_⟩ + · rw [Measure.map_smul _ (measurable_path_eval 0).aemeasurable] + exact (hs₀.filter_mono (Measure.map_mono hk (measurable_path_eval 0)).absolutelyContinuous.ae_le).filter_mono + Measure.smul_absolutelyContinuous.ae_le + · rw [Measure.map_smul _ (measurable_path_eval 1).aemeasurable] + exact (hs₁.filter_mono (Measure.map_mono hk (measurable_path_eval 1)).absolutelyContinuous.ae_le).filter_mono + Measure.smul_absolutelyContinuous.ae_le + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanNodes.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanNodes.lean new file mode 100644 index 0000000000000000000000000000000000000000..a07ac6827e5ed287872125b76447effdc709cc18 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSubplanNodes.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedOptimalSubplan +import OAI.Geometry.RCD.Transport.MaximalScalarMidpoint + +namespace OAI + +/-! # Bounded transport nodes for the actual normalized length components + +Uniform compression of the parent controls both half-nodes. Their +transport-distance bounds are inherited at exactly half the parent scale. +-/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [SeparableSpace X] [CompleteSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem exists_normalized_subplan_half_nodes {n : ℕ} (a : RenyiTransportNode n X) + (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (hg : ∀ᵐ γ ∂π, IsGeodesic γ) + (hp : IsOptimalCoupling a.left a.right (π.map (fun γ => (γ 0,γ 1)))) + {C : ℝ≥0∞} (hC : C≠∞) (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • hausdorff n X) + (κ : Measure C(Time,X)) (hκ : κ≤π) (hκ0 : κ univ≠0) : + ∃ a₀ a₁ : RenyiTransportNode n X, + a₀.left=(κ univ)⁻¹ • κ.map (fun γ => γ 0) ∧ + a₀.right=(κ univ)⁻¹ • κ.map (fun γ => γ midpointTime) ∧ + a₁.left=(κ univ)⁻¹ • κ.map (fun γ => γ midpointTime) ∧ + a₁.right=(κ univ)⁻¹ • κ.map (fun γ => γ 1) ∧ + a₀.distance=a.distance/2 ∧ a₁.distance=a.distance/2 := by + let : Nonempty X := ⟨a.center⟩ + let : IsProbabilityMeasure a.left := a.left_probability + let : IsProbabilityMeasure a.right := a.right_probability + let : IsFiniteMeasure κ := isFiniteMeasure_of_le π hκ + have hc : κ univ≠∞ := measure_ne_top κ univ + have hi : (κ univ)⁻¹≠∞ := ENNReal.inv_ne_top.mpr hκ0 + have he := optimalPlan_endpoints a.left a.right π hp + have hpp : IsOptimalCoupling (π.map (fun γ => γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1))) := by rw [he.1,he.2]; exact hp + have hfin := finite_second_moment_cost + (finiteSecondMoment_of_bounded a.left a.center a.left_support) + (finiteSecondMoment_of_bounded a.right a.center a.right_support) hp.1 hp.2.1 + let πn := (κ univ)⁻¹ • κ + obtain ⟨hπn,hgn,hpn,hfn⟩ := normalized_optimal_subplan π hg hpp hfin κ hκ hκ0 + let : IsProbabilityMeasure πn := hπn + have heval (t : Time) : πn.map (fun γ => γ t)=(κ univ)⁻¹ • κ.map (fun γ => γ t) := + Measure.map_smul _ (measurable_path_eval t).aemeasurable + have hDn : OptimalPlanDistanceBound (πn.map (fun γ => γ 0)) + (πn.map (fun γ => γ 1)) a.distance := by + rw [heval,heval] + exact a.distance_bound.normalized_subplan π hg hp κ hκ hκ0 + have hD := OptimalPlanDistanceBound.midpoint_halves πn hgn hpn hfn hDn + let c := (κ univ)⁻¹*C + have hcf : c≠∞ := ENNReal.mul_ne_top hi hC + have hcn (t : Time) : πn.map (fun γ => γ t)≤c • hausdorff n X := by + rw [heval] + intro B + change (κ univ)⁻¹ * (κ.map (fun γ => γ t)) B ≤ c * (hausdorff n X) B + calc + _ ≤ (κ univ)⁻¹ * (π.map (fun γ => γ t)) B := + mul_le_mul' le_rfl (Measure.map_mono hκ (measurable_path_eval t) B) + _ ≤ (κ univ)⁻¹ * (C*(hausdorff n X) B) := mul_le_mul' le_rfl (hcomp t B) + _ = _ := (mul_assoc _ _ _).symm + have hstay (t : Time) : ∀ᵐ x ∂πn.map (fun γ => γ t), dist x a.center≤3*a.radius := by + rw [heval] + have hs : ∀ᵐ x ∂π.map (fun γ => γ t), dist x a.center≤3*a.radius := by + apply (ae_map_iff (measurable_path_eval t).aemeasurable + (measurableSet_le (measurable_id.dist measurable_const) measurable_const)).mpr + exact (optimal_geodesic_plan_bounded a.left a.right π hg hp a.center a.radius_nonneg + a.left_support a.right_support).mono (fun γ hγ => hγ.2 t) + exact (hs.filter_mono (Measure.map_mono hκ (measurable_path_eval t)).absolutelyContinuous.ae_le).filter_mono + Measure.smul_absolutelyContinuous.ae_le + let a₀ : RenyiTransportNode n X := + ⟨πn.map (fun γ => γ 0),πn.map (fun γ => γ midpointTime),inferInstance,inferInstance, + a.center,3*a.radius,mul_nonneg (by norm_num) a.radius_nonneg,hstay 0,hstay midpointTime, + c,hcf,hcn 0,hcn midpointTime,a.distance/2,div_nonneg a.distance_nonneg (by norm_num),hD.1⟩ + let a₁ : RenyiTransportNode n X := + ⟨πn.map (fun γ => γ midpointTime),πn.map (fun γ => γ 1),inferInstance,inferInstance, + a.center,3*a.radius,mul_nonneg (by norm_num) a.radius_nonneg,hstay midpointTime,hstay 1, + c,hcf,hcn midpointTime,hcn 1,a.distance/2,div_nonneg a.distance_nonneg (by norm_num),hD.2⟩ + exact ⟨a₀,a₁,heval 0,heval midpointTime,heval midpointTime,heval 1,rfl,rfl⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedSupportedCompression.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSupportedCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..2efabd869ea25a260e662f9526c887ae01b3b2e2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedSupportedCompression.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL1Domination + +namespace OAI + +/-! # Restricting a normalized compression bound to its actual support -/ + +open Set Filter MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_supported_compression (μ ν : Measure X) {S : Set X} {B : ℝ≥0∞} {C : ℝ} + (hB : B≠∞) (hν : ν≤B • μ) (hs : ∀ᵐ x ∂ν, x∈S) + (hV : 0<μ.real S) (hC : B.toReal*μ.real S≤C) : + ν≤ENNReal.ofReal (C/μ.real S) • μ.restrict S := by + have hcoef : B≤ENNReal.ofReal (C/μ.real S) := by + rw [← ENNReal.ofReal_toReal hB] + exact ENNReal.ofReal_le_ofReal ((le_div_iff₀ hV).mpr hC) + calc + ν=ν.restrict S := (Measure.restrict_eq_self_of_ae_mem hs).symm + _ ≤ (B • μ).restrict S := Measure.restrict_mono_measure hν S + _ = B • μ.restrict S := Measure.restrict_smul _ _ _ + _ ≤ _ := by + apply Measure.le_iff.mpr + intro U _hU + simpa only [Measure.smul_apply,smul_eq_mul] using mul_le_mul' hcoef (le_refl (μ.restrict S U)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedTiltLpVariation.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTiltLpVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3246dcae2034e655e2400001ab80d0e121126bc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTiltLpVariation.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Transport.ExponentialTiltLpVariation + +namespace OAI + +/-! # The exact strong L² tangent to normalized density perturbations -/ + +open Set Filter MeasureTheory +open scoped ENNReal NNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + + def normalizedTiltLp (r : Lp ℝ 2 μ) {g : X → ℝ} (hg : Measurable g) + {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) (t : ℝ) : Lp ℝ 2 μ := + (∫ x, Real.exp (t*g x)*r x ∂μ)⁻¹ • exponentialTiltLp μ r hg hgb t + + def normalizedTiltTangent (r : Lp ℝ 2 μ) {g : X → ℝ} (hg : Measurable g) + {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) : Lp ℝ 2 μ := + lpMultiplier μ (boundedMultiplier μ g hg M hgb) r-(∫ x, g x*r x ∂μ) • r + + theorem normalizedTiltLp_coe (r : Lp ℝ 2 μ) {g : X → ℝ} (hg : Measurable g) + {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) (t : ℝ) : + normalizedTiltLp μ r hg hgb t =ᵐ[μ] fun x => + (∫ y, Real.exp (t*g y)*r y ∂μ)⁻¹*(Real.exp (t*g x)*r x) := by + filter_upwards [Lp.coeFn_smul (∫ x, Real.exp (t*g x)*r x ∂μ)⁻¹ + (exponentialTiltLp μ r hg hgb t),exponentialTiltLp_coe μ r hg hgb t] with x hs he + exact hs.trans (by change _*_= _; rw [he]) + + theorem normalizedTiltTangent_coe (r : Lp ℝ 2 μ) {g : X → ℝ} (hg : Measurable g) + {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) : + normalizedTiltTangent μ r hg hgb =ᵐ[μ] fun x => r x*(g x-∫ y, g y*r y ∂μ) := by + filter_upwards [Lp.coeFn_sub (lpMultiplier μ (boundedMultiplier μ g hg M hgb) r) + ((∫ x, g x*r x ∂μ) • r), + lpMultiplier_coe μ (boundedMultiplier μ g hg M hgb) r, + boundedMultiplier_coe μ g hg M hgb,Lp.coeFn_smul (∫ x, g x*r x ∂μ) r] with x hs hv hgx hm + change (lpMultiplier μ (boundedMultiplier μ g hg M hgb) r-(∫ y, g y*r y ∂μ) • r) x = _ + rw [hs,Pi.sub_apply,hv,hgx,hm,Pi.smul_apply] + change g x*r x-(∫ x, g x*r x ∂μ)*r x = _ + ring + + theorem normalizedTiltLp_zero (r : Lp ℝ 2 μ) (hm : (∫ x, r x ∂μ)=1) + {g : X → ℝ} (hg : Measurable g) {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) : + normalizedTiltLp μ r hg hgb 0=r := by + unfold normalizedTiltLp + simp only [zero_mul,Real.exp_zero,one_mul,hm,inv_one,one_smul,exponentialTiltLp_zero] + + theorem normalizedTiltLp_hasDerivAt_zero (r : Lp ℝ 2 μ) (hr : Integrable r μ) + (hm : (∫ x, r x ∂μ)=1) {g : X → ℝ} (hg : Measurable g) + {M : ℝ≥0} (hgb : ∀ x, |g x| ≤ M) : + HasDerivAt (normalizedTiltLp μ r hg hgb) (normalizedTiltTangent μ r hg hgb) 0 := by + have h0 : (∫ x, Real.exp ((0:ℝ)*g x)*r x ∂μ)=1 := by + simpa only [zero_mul,Real.exp_zero,one_mul] using hm + have hZ := (exponential_tilt_integral_hasDerivAt_zero μ hr hg hgb).inv (by rw [h0]; norm_num) + have hD := hZ.smul (exponentialTiltLp_hasDerivAt_zero μ r hg hgb) + convert hD using 1 + · rfl + · simp only [normalizedTiltTangent,Pi.inv_apply,h0,one_pow,div_one,inv_one,one_smul,exponentialTiltLp_zero, + neg_smul,sub_eq_add_neg,add_comm] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedTorsion.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTorsion.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a7914f2f3909202ff04ef9516358dba4207c62b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTorsion.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Sobolev.ScaledStampacchia +import OAI.Geometry.RCD.Sobolev.PoissonHeight + +namespace OAI + +/-! # Torsion bounds with the correct radius-squared scaling -/ + +open Set MeasureTheory Filter +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A normalized Sobolev inequality gives a torsion height proportional to +its length-squared parameter, uniformly as the volume tends to zero. -/ +theorem exists_normalized_torsion_bound {d C : ℝ} (hd : 1 < d) (hC : 0 ≤ C) : + ∃ K : ℝ, 0 < K ∧ ∀ (Ω : Set X), μ Ω ≠ ∞ → 0 < μ.real Ω → + ∀ s : ℝ, 0 < s → ∀ u : SobolevSpace.dirichlet μ hQ Ω, + (∀ φ : SobolevSpace.dirichlet μ hQ Ω, + energyForm μ hQ u.val φ.val = ∫ x in Ω, SobolevSpace.toLp μ hQ φ.val x ∂μ) → + (∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * s * (μ.real Ω) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) → + ∀ᵐ x ∂μ.restrict Ω, SobolevSpace.toLp μ hQ u.val x ≤ K * s := by + obtain ⟨K, hK, hExt⟩ := exists_scaled_extinction_level + (Real.rpow_nonneg hC (2 * d)) (by linarith : 2 < 2 * d) + refine ⟨K, hK, ?_⟩ + intro Ω hfin hvol s hs u hsolve hsob + let ν := μ.restrict Ω + let : IsFiniteMeasure ν := ⟨by simpa only [ν, Measure.restrict_apply_univ] using hfin.lt_top⟩ + let U := fun x => SobolevSpace.toLp μ hQ u.val x + let Y := fun t : ℝ => ν.real {x | t < U x} + let V := μ.real Ω + let Cs := C * s * V ^ (1 / d - 1) + have hCs : 0 ≤ Cs := mul_nonneg (mul_nonneg hC hs.le) (Real.rpow_nonneg hvol.le _) + have hY0 : Y 0 ≤ V := by + have hh := measureReal_mono (μ := ν) (subset_univ {x | 0 < U x}) (measure_ne_top ν univ) + simpa only [ν, measureReal_restrict_apply_univ, V, Y] using hh + have hmono (k l : ℝ) (_hk : 0 ≤ k) (hkl : k ≤ l) : Y l ≤ Y k := by + apply measureReal_mono _ (measure_ne_top ν _) + intro x hx + exact hkl.trans_lt hx + have hstep (k l : ℝ) (hk : 0 ≤ k) (hkl : k < l) : + Y l ≤ Cs ^ (2 * d) * Y k ^ (2 * d - 1) / (l - k) ^ (2 * d) := by + have hm : Y l ≤ ν.real {x | l ≤ U x} := by + apply measureReal_mono _ (measure_ne_top ν _) + intro x hx + exact (show l < U x from hx).le + exact hm.trans (torsion_superlevel_le μ hQ Ω hfin u hsolve hd hCs hsob hk hkl) + have hz : Y (K * s) = 0 := hExt (Cs ^ (2 * d)) V s hvol hs + (normalized_sobolev_coefficient hC hs hvol hd) Y + (fun _ _ => measureReal_nonneg) hY0 hmono hstep + have hz' : ν {x | K * s < U x} = 0 := + (ENNReal.toReal_eq_zero_iff _).mp hz |>.resolve_right (measure_ne_top ν _) + apply ae_iff.mpr + simpa only [not_le] using hz' + +/-- Coercivity constructs the torsion solution; normalized Sobolev controls +its height by a uniform multiple of the length-squared parameter. -/ +theorem exists_uniform_normalized_bounded_torsion {d C : ℝ} (hd : 1 < d) (hC : 0 ≤ C) : + ∃ K : ℝ, 0 < K ∧ ∀ (Ω : Set X), MeasurableSet Ω → μ Ω ≠ ∞ → 0 < μ.real Ω → + ∀ s : ℝ, 0 < s → ∀ P : ℝ, 0 ≤ P → + (∀ v : SobolevSpace.dirichlet μ hQ Ω, + ‖SobolevSpace.toLp μ hQ v.val‖ ^ 2 ≤ P * energyForm μ hQ v.val v.val) → + (∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + (C * s * (μ.real Ω) ^ (1 / d - 1)) * energyForm μ hQ φ.val φ.val) → + ∃ τ : SobolevSpace.dirichlet μ hQ Ω, + (∀ φ : SobolevSpace.dirichlet μ hQ Ω, + energyForm μ hQ τ.val φ.val = ∫ x in Ω, SobolevSpace.toLp μ hQ φ.val x ∂μ) ∧ + (∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ τ.val x ∧ + SobolevSpace.toLp μ hQ τ.val x ≤ K * s) := by + obtain ⟨K, hK, hb⟩ := exists_normalized_torsion_bound μ hQ hd hC + refine ⟨K, hK, ?_⟩ + intro Ω hΩ hfin hvol s hs P hP hpoin hsob + let F := dirichletSource μ hQ Ω (indicatorConstLp 2 hΩ hfin 1) + have hF (φ : SobolevSpace.dirichlet μ hQ Ω) : + F φ = ∫ x in Ω, SobolevSpace.toLp μ hQ φ.val x ∂μ := by + simpa only [F, one_mul] using dirichletSource_indicator μ hQ Ω hΩ hfin 1 φ + have hpos (φ : SobolevSpace.dirichlet μ hQ Ω) + (hφ : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ φ.val x) : 0 ≤ F φ := by + rw [hF] + exact integral_nonneg_of_ae (ae_restrict_of_ae hφ) + obtain ⟨τ, hτ, hτ0⟩ := exists_nonnegative_dirichlet_solution μ hQ Ω hP hpoin F hpos + have hsolve (φ : SobolevSpace.dirichlet μ hQ Ω) := (hτ φ).trans (hF φ) + have hτK := hb Ω hfin hvol s hs τ hsolve hsob + have hupper : ∀ᵐ x ∂μ, SobolevSpace.toLp μ hQ τ.val x ≤ K * s := by + apply ae_of_ae_restrict_of_ae_restrict_compl Ω hτK + filter_upwards [SobolevSpace.dirichlet_zero_off μ hQ Ω hΩ τ] with x hx + rw [hx] + exact mul_nonneg hK.le hs.le + exact ⟨τ, hsolve, hτ0.and hupper⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedTransportDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTransportDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..61e6738de54657b2e7853b0df0863a36688d77a1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedTransportDefect.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Transport.ActualRadialTransportDefect +import OAI.Geometry.RCD.Sobolev.PoissonDefectBudget +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # The actual transport error in the normalized source units -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- At the fixed projection radius, the full Poisson defect supplies +exactly the radial error budget required by normalized transport. -/ +theorem DyadicDistanceReplacements.normalized_transport_defect + {n : ℕ} {κ r0 B J C σ : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + (hκ : 0 ≤ κ) (hB : 0 ≤ B) + (hbudget : normalizedPoissonDefect μ hQ S i ≤ σ ^ 2) + (hvol : |μ.real (ball p (distanceSourceRadius r0 i / 2048)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 2048) ^ n) - 1| ≤ 1 / 4) : + let R := distanceSourceRadius r0 i / 2048 + ∃ g : X → ℝ, MemLp g 2 μ ∧ + (localGamma μ hQ (T.replacement i) (inwardSobolev μ hQ p (3 * R)) =ᵐ[ + μ.restrict (ball p (3 * R))] fun x => g x - dist p x) ∧ + (∫ x in ball p (4 * R), (g x) ^ 2 ∂μ) ≤ + (B * (2048 : ℝ) ^ 2 * ((4 / (3 * euclideanUnitVolume n)) * (2048 : ℝ) ^ n)) * + R ^ 2 * μ.real (ball p R) * σ ^ 2 := by + dsimp only + let s := distanceSourceRadius r0 i + let R := s / 2048 + let V := μ.real (ball p R) + let W := (4 / (3 * euclideanUnitVolume n)) * (2048 : ℝ) ^ n + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hR : 0 < R := by dsimp only [R]; positivity + obtain ⟨hV, hlo, _⟩ := quarter_volume_bounds hR (euclideanUnitVolume_pos n) hvol + have hunit : W * ((3 / 4 : ℝ) * euclideanUnitVolume n * R ^ n) = s ^ (n : ℝ) := by + dsimp only [W, R] + rw [Real.rpow_natCast, div_pow] + field_simp [(euclideanUnitVolume_pos n).ne'] + have hratio : s ^ (n : ℝ) ≤ W * V := by + rw [← hunit] + exact mul_le_mul_of_nonneg_left hlo (by + have homega := euclideanUnitVolume_pos n + dsimp only [W] + positivity) + have hmass : (S.source i).real (ball p s) ≤ s ^ (n : ℝ) * σ ^ 2 := by + have hsource : (S.source i).real (ball p s) ≤ + s ^ (n : ℝ) * normalizedPoissonDefect μ hQ S i := by + rw [normalizedPoissonDefect_units] + exact le_add_of_nonneg_right (by positivity) + exact hsource.trans (mul_le_mul_of_nonneg_left hbudget (Real.rpow_nonneg hs.le _)) + obtain ⟨g, hg, hradial, he⟩ := T.radial_transport_defect μ hQ i hR + (by dsimp only [R]; linarith : 3 * R ≤ 4 * s) + refine ⟨g, hg, hradial, ?_⟩ + have hsize : (S.source i).real (ball p s) ≤ W * V * σ ^ 2 := + hmass.trans (mul_le_mul_of_nonneg_right hratio (sq_nonneg _)) + calc + _ ≤ (W * V * σ ^ 2) * (B * s ^ 2) := + he.trans (mul_le_mul_of_nonneg_right hsize (mul_nonneg hB (sq_nonneg _))) + _ = (B * (2048 : ℝ) ^ 2 * W) * R ^ 2 * V * σ ^ 2 := by dsimp only [R]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformL2.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformL2.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a6e017d653144d90344094313442d82b2168bc2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformL2.lean @@ -0,0 +1,47 @@ +import OAI.Analysis.RCDHeat.Foundations + +namespace OAI + +/-! # Uniform almost-everywhere convergence gives normalized L2 convergence + +The measures may vary and their masses need not be bounded away from zero. +Only positivity and finiteness of each normalizing mass are used. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_sq_mean_tendsto_zero (μ : ℕ → Measure X) + [∀ k, IsFiniteMeasure (μ k)] (hmass : ∀ k, 0<(μ k).real univ) + (f : ℕ → X → ℝ) (hf : ∀ k, AEStronglyMeasurable (f k) (μ k)) + (hlim : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |f k x|≤η) : + Tendsto (fun k => ((μ k).real univ)⁻¹*(∫ x, (f k x)^2 ∂μ k)) atTop (𝓝 0) := by + apply tendsto_order.mpr + constructor + · intro a ha + exact Eventually.of_forall fun k => ha.trans_le (mul_nonneg + (inv_nonneg.mpr (hmass k).le) (integral_nonneg fun _ => sq_nonneg _)) + · intro b hb + let η := Real.sqrt (b/2) + have hη : 0<η := Real.sqrt_pos.mpr (half_pos hb) + have hηsq : η^2=b/2 := Real.sq_sqrt (half_pos hb).le + filter_upwards [hlim η hη] with k hk + have hsq : ∀ᵐ x ∂μ k, (f k x)^2≤η^2 := hk.mono fun x hx => + by simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg _) hx 2 + have hi : Integrable (fun x => (f k x)^2) (μ k) := + (integrable_const (η^2)).mono' ((hf k).pow 2) + (hsq.mono fun x hx => by simpa only [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (f k x))] using hx) + have hint := integral_mono_ae hi (integrable_const (η^2)) hsq + rw [integral_const,smul_eq_mul] at hint + have hbound := mul_le_mul_of_nonneg_left hint (inv_nonneg.mpr (hmass k).le) + rw [← mul_assoc,inv_mul_cancel₀ (hmass k).ne',one_mul,hηsq] at hbound + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformMean.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..272dec7decc98fb17f4cad549e0739107e0aff8d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUniformMean.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedUniformL2 + +namespace OAI + +/-! # Normalized integral convergence under varying finite measures -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem normalized_mean_tendsto_zero (μ : ℕ → Measure X) + [∀ k, IsFiniteMeasure (μ k)] (hmass : ∀ k, 0<(μ k).real univ) + (f : ℕ → X → ℝ) + (hlim : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |f k x|≤η) : + Tendsto (fun k => ((μ k).real univ)⁻¹*(∫ x, f k x ∂μ k)) atTop (𝓝 0) := by + apply Metric.tendsto_nhds.mpr + intro η hη + filter_upwards [hlim (η/2) (half_pos hη)] with k hk + have hi := norm_integral_le_of_norm_le_const (μ := μ k) (f := f k) (C := η/2) + (hk.mono fun x hx => by simpa only [Real.norm_eq_abs] using hx) + have hb := mul_le_mul_of_nonneg_left hi (inv_nonneg.mpr (hmass k).le) + rw [mul_comm (η/2),← mul_assoc,inv_mul_cancel₀ (hmass k).ne',one_mul] at hb + rw [Real.dist_eq,sub_zero,abs_mul,abs_of_nonneg (inv_nonneg.mpr (hmass k).le)] + have hb' : ((μ k).real univ)⁻¹*|∫ x, f k x ∂μ k|≤η/2 := by + simpa only [Real.norm_eq_abs] using hb + exact hb'.trans_lt (half_lt_self hη) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/NormalizedUpdate.lean b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUpdate.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad17d3c283d5b09126c9331d79cf7f073bd4712b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/NormalizedUpdate.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Coordinates.FrozenJetTransport +import OAI.Geometry.RCD.Sobolev.MetricCoercivity + +namespace OAI + +/-! +# The coordinate update in frozen coordinates + +The source coordinate and its dual covector are transformed together. +Consequently the inverse-transpose update has exactly the same form in +the normalized variables; no norm of the coordinate change occurs. +-/ + +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Affine coordinates frozen at a point and a scale. -/ +def frozenSource (r : ℝ) (T : E ≃L[ℝ] E) (x z : E) : E := x + r • T.symm z + +/-- The normalized coordinate map, with its value at the center removed. -/ +def normalizedCoordinates (r : ℝ) (T : E ≃L[ℝ] E) (x : E) (h : E → E) + (z : E) : E := r⁻¹ • (h (frozenSource r T x z) - h x) + +/-- The covector field uses the dual coordinate change. -/ +def normalizedCovector (r : ℝ) (T : E ≃L[ℝ] E) (x : E) (v : E → E) + (z : E) : E := + r⁻¹ • (T.symm : E →L[ℝ] E).adjoint (v (frozenSource r T x z)) + +omit [CompleteSpace E] in +/-- The scale cancels out of the normalized Jacobian. -/ +theorem fderiv_normalizedCoordinates {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (x z : E) (h : E → E) + (hh : DifferentiableAt ℝ h (frozenSource r T x z)) : + fderiv ℝ (normalizedCoordinates r T x h) z = + fderiv ℝ h (frozenSource r T x z) ∘L (T.symm : E →L[ℝ] E) := by + have hsource : HasFDerivAt (frozenSource r T x) + (r • (T.symm : E →L[ℝ] E)) z := by + change HasFDerivAt (fun y => x + r • T.symm y) _ z + convert (((T.symm : E →L[ℝ] E).hasFDerivAt.const_smul r).const_add x) using 1 + funext y + rfl + have hn := ((hh.hasFDerivAt.comp z hsource).sub_const (h x)).const_smul r⁻¹ + change HasFDerivAt (normalizedCoordinates r T x h) _ z at hn + rw [hn.fderiv] + ext ξ + simp [smul_smul, hr] + +/-- Exact covariance of the inverse transpose when the covector uses +the dual change of basis. -/ +theorem inverseTranspose_normalized_apply (T J : E ≃L[ℝ] E) (w : E) : + inverseTranspose (T.symm.trans J) ((T.symm : E →L[ℝ] E).adjoint w) = + inverseTranspose J w := by + have hinv : ((T.symm.trans J).symm : E →L[ℝ] E) = + (T : E →L[ℝ] E) ∘L (J.symm : E →L[ℝ] E) := by + ext y + rfl + change ((↑(T.symm.trans J).symm : E →L[ℝ] E).adjoint) + ((T.symm : E →L[ℝ] E).adjoint w) = inverseTranspose J w + rw [hinv] + exact (inverseTranspose_frozen_factor T J w).symm + +/-- The actual normalized update is the normalized old map plus its +inverse-transpose correction. Centering at the new map only changes +this expression by a constant, handled by the jet transport lemmas. -/ +theorem normalized_update_identity {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (x z : E) (h v : E → E) + (hh : DifferentiableAt ℝ h (frozenSource r T x z)) + (J : E ≃L[ℝ] E) + (hJ : fderiv ℝ h (frozenSource r T x z) = (J : E →L[ℝ] E)) : + r⁻¹ • (h (frozenSource r T x z) + + operatorInverseTranspose (fderiv ℝ h (frozenSource r T x z)) + (v (frozenSource r T x z)) - h x) = + normalizedCoordinates r T x h z + + operatorInverseTranspose (fderiv ℝ (normalizedCoordinates r T x h) z) + (normalizedCovector r T x v z) := by + have hnormalized : fderiv ℝ (normalizedCoordinates r T x h) z = + (T.symm.trans J : E ≃L[ℝ] E) := by + rw [fderiv_normalizedCoordinates hr T x z h hh, hJ] + rfl + rw [hnormalized, hJ, operatorInverseTranspose_equiv, operatorInverseTranspose_equiv] + unfold normalizedCoordinates normalizedCovector + rw [map_smul, inverseTranspose_normalized_apply] + module + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OpenCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/OpenCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..37ee0249ef5f2769eefcd99755b50b5a279ad818 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OpenCoordinates.lean @@ -0,0 +1,404 @@ +import OAI.Geometry.RCD.Metric.MetricLimit +import OAI.Analysis.RCDHeat.Foundations +import Mathlib.Analysis.Normed.Operator.ContinuousLinearMap +import Mathlib.Topology.Homeomorph.Lemmas +import Mathlib.Tactic.Abel + +namespace OAI + +/-! +# Constructive openness of approximate Euclidean coordinates + +The hypotheses below are the scale-dependent approximation and nearby-metric +estimates used in `co:open-coordinates`. Exact preimages and openness are proved +by a convergent correction process; neither is an input. +-/ + +open Filter Set +open scoped Topology + +namespace RegularPointCoordinates + +section Correction + +variable {X Y : Type*} [MetricSpace X] [CompleteSpace X] [MetricSpace Y] + +/-- A quarter-scale correction process stays strictly inside the working ball +and converges to an exact preimage. The predicate records the current residual +in a possibly changing norm. -/ +theorem exists_preimage_of_quarter_corrections + {f : X → Y} {x₀ : X} {P : Y} {r M : ℝ} (hr : 0 < r) + (control : ℕ → X → Prop) (hzero : control 0 x₀) + (hstep : ∀ n x, dist x x₀ < r / 2 → control n x → + ∃ y, dist y x ≤ r * (1 / 4 : ℝ) ^ n / 8 ∧ control (n + 1) y) + (hresidual : ∀ n x, dist x x₀ < r / 2 → control n x → + dist (f x) P ≤ M * (r * (1 / 4 : ℝ) ^ n)) + (hcont : ContinuousOn f (Metric.ball x₀ (r / 2))) : + ∃ y, dist y x₀ ≤ r / 6 ∧ f y = P := by + classical + let next (n : ℕ) (x : X) : X := + if h : dist x x₀ < r / 2 ∧ control n x then + Classical.choose (hstep n x h.1 h.2) else x + let a : ℕ → X := fun n => Nat.rec x₀ next n + have ha0 : a 0 = x₀ := rfl + have hasucc (n : ℕ) : a (n + 1) = next n (a n) := rfl + have hinv : ∀ n, dist (a n) x₀ ≤ r / 6 * (1 - (1 / 4 : ℝ) ^ n) ∧ + control n (a n) := by + intro n + induction n with + | zero => simpa only [ha0, pow_zero, sub_self, mul_zero, dist_self] using + And.intro (le_refl (0 : ℝ)) hzero + | succ n ih => + have hpow : 0 ≤ (1 / 4 : ℝ) ^ n := pow_nonneg (by norm_num) n + have hin : dist (a n) x₀ < r / 2 := by nlinarith [ih.1] + have hn := Classical.choose_spec (hstep n (a n) hin ih.2) + have hnext : a (n + 1) = Classical.choose (hstep n (a n) hin ih.2) := by + simp [hasucc, next, hin, ih.2] + rw [hnext] + refine ⟨?_, hn.2⟩ + have ht := dist_triangle (Classical.choose (hstep n (a n) hin ih.2)) (a n) x₀ + rw [pow_succ] + nlinarith [hn.1, ih.1] + have hin (n : ℕ) : dist (a n) x₀ < r / 2 := by + have hp : 0 ≤ (1 / 4 : ℝ) ^ n := pow_nonneg (by norm_num) n + nlinarith [(hinv n).1] + have hdist (n : ℕ) : dist (a n) (a (n + 1)) ≤ (r / 8) * (1 / 4 : ℝ) ^ n := by + have hn := Classical.choose_spec (hstep n (a n) (hin n) (hinv n).2) + have hnxt : a (n + 1) = Classical.choose (hstep n (a n) (hin n) (hinv n).2) := by + simp [hasucc, next, hin n, (hinv n).2] + rw [dist_comm, hnxt] + nlinarith [hn.1] + obtain ⟨y, hy⟩ := cauchySeq_tendsto_of_complete + (cauchySeq_of_le_geometric (1 / 4 : ℝ) (r / 8) (by norm_num) hdist) + have hybound : dist y x₀ ≤ r / 6 := by + have hb := dist_le_of_le_geometric_of_tendsto (1 / 4 : ℝ) (r / 8) + (by norm_num) hdist hy 0 + rw [dist_comm] + calc + dist x₀ y ≤ (r / 8) / (1 - 1 / 4 : ℝ) := by + simpa only [ha0, pow_zero, mul_one] using hb + _ = r / 6 := by ring + have hymem : y ∈ Metric.ball x₀ (r / 2) := by + exact lt_of_le_of_lt hybound (by linarith) + have hf : Tendsto (fun n => f (a n)) atTop (𝓝 (f y)) := + (hcont.continuousAt (Metric.isOpen_ball.mem_nhds hymem)).tendsto.comp hy + have hp : Tendsto (fun n => dist (f (a n)) P) atTop (𝓝 0) := by + apply squeeze_zero (fun n => dist_nonneg) (fun n => hresidual n (a n) (hin n) (hinv n).2) + simpa only [mul_zero] using (tendsto_const_nhds (x := M)).mul + ((tendsto_const_nhds (x := r)).mul + (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 4) + (by norm_num : (1 / 4 : ℝ) < 1))) + have heq : dist (f y) P = 0 := tendsto_nhds_unique (hf.dist tendsto_const_nhds) hp + exact ⟨y, hybound, dist_eq_zero.mp heq⟩ + +end Correction + +section Normalized + +variable {X E : Type*} [MetricSpace X] [CompleteSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +omit [CompleteSpace X] in +/-- Pointed metric approximation and uniform closeness of the normalized +coordinate map supply the Euclidean correspondence needed below. -/ +theorem euclidean_correspondence_of_pointed_approximation + {f g : X → E} {x : X} {r : ℝ} (hr : 0 < r) (N : E ≃L[ℝ] E) + (hg : IsPointedApproximation x 0 r 1 (1 / 1024) g) + (hclose : ∀ y, dist y x ≤ r → + ‖r⁻¹ • N (f y - f x) - g y‖ ≤ 1 / 1024) : + ∀ a : E, ‖a‖ < r / 16 → + ∃ y, dist y x ≤ ‖a‖ + r / 256 ∧ ‖N (f y - f x) - a‖ ≤ r / 256 := by + intro a ha + have hscale (b : E) : ‖r⁻¹ • b‖ = ‖b‖ / r := by + simp only [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos hr, div_eq_inv_mul] + have hat : ‖r⁻¹ • a‖ < 1 / 16 := by + rw [hscale, div_lt_iff₀ hr] + linarith + obtain ⟨y, hy, hgy⟩ := hg.2.2 (r⁻¹ • a) (by + rw [dist_zero_right] + linarith) + have hy' : dist y x ≤ r := by simpa only [one_mul] using hy + have hmetric := hg.2.1 y x hy (by simp only [dist_self, one_mul]; positivity) + have hbase := hg.1 + have htri := dist_triangle4 (g y) (r⁻¹ • a) 0 (g x) + rw [dist_zero_right, dist_zero_left, ← dist_zero_right (g x)] at htri + have hdist : dist y x / r ≤ ‖a‖ / r + 3 / 1024 := by + rw [hscale] at htri + linarith [(abs_le.mp hmetric).1] + have hdist' := mul_le_mul_of_nonneg_right hdist hr.le + rw [add_mul, div_mul_cancel₀ _ hr.ne', div_mul_cancel₀ _ hr.ne'] at hdist' + have hres : ‖r⁻¹ • (N (f y - f x) - a)‖ ≤ 2 / 1024 := by + rw [smul_sub] + have ht := dist_triangle (r⁻¹ • N (f y - f x)) (g y) (r⁻¹ • a) + simp only [dist_eq_norm] at ht hgy + linarith [hclose y hy'] + rw [hscale] at hres + have hres' := (div_le_iff₀ hr).mp hres + exact ⟨y, by linarith, by linarith⟩ + +omit [CompleteSpace X] in +/-- The approximate correction hypothesis follows directly from a normalized +Euclidean correspondence: test the correspondence at the normalized target. +The displacement error and coordinate error are both explicit. -/ +theorem approximate_preimage_of_euclidean_correspondence + {f : X → E} {x : X} {R : ℝ} (N : E ≃L[ℝ] E) + (hcorrespondence : ∀ a : E, ‖a‖ < R / 16 → + ∃ y, dist y x ≤ ‖a‖ + R / 256 ∧ ‖N (f y - f x) - a‖ ≤ R / 256) + {P : E} (hP : ‖N (P - f x)‖ < R / 16) : + ∃ y, dist y x ≤ 17 / 256 * R ∧ ‖N (P - f y)‖ ≤ R / 256 := by + obtain ⟨y, hy, herr⟩ := hcorrespondence (N (P - f x)) hP + refine ⟨y, by linarith, ?_⟩ + have hid : N (f y - f x) - N (P - f x) = -(N (P - f y)) := by + simp only [map_sub, neg_sub] + abel + simpa only [hid, norm_neg] using herr + +/-- Concrete constants for the correction argument. `N n x` represents the +inverse square root of the Gram matrix at the current scale and center. -/ +theorem exists_preimage_of_normalized_approximation + {f : X → E} {x₀ : X} {P : E} {r C : ℝ} (hr : 0 < r) (hC : 0 ≤ C) + (N : ℕ → X → E ≃L[ℝ] E) + (hzero : ‖N 0 x₀ (P - f x₀)‖ < r / 16) + (happrox : ∀ n x, dist x x₀ < r / 2 → + ‖N n x (P - f x)‖ < r * (1 / 4 : ℝ) ^ n / 16 → + ∃ y, dist y x ≤ 17 / 256 * (r * (1 / 4 : ℝ) ^ n) ∧ + ‖N n x (P - f y)‖ ≤ r * (1 / 4 : ℝ) ^ n / 256) + (hnear : ∀ n x y, dist x x₀ < r / 2 → dist y x ≤ r * (1 / 4 : ℝ) ^ n / 8 → + ∀ w, ‖N (n + 1) y w‖ ≤ 2 * ‖N n x w‖) + (hupper : ∀ n x, dist x x₀ < r / 2 → ∀ w, ‖w‖ ≤ C * ‖N n x w‖) + (hcont : ContinuousOn f (Metric.ball x₀ (r / 2))) : + ∃ y, dist y x₀ ≤ r / 6 ∧ f y = P := by + let control : ℕ → X → Prop := fun n x => + ‖N n x (P - f x)‖ < r * (1 / 4 : ℝ) ^ n / 16 + apply exists_preimage_of_quarter_corrections hr control (by simpa [control] using hzero) + (M := C / 16) ?_ ?_ hcont + · intro n x hx hc + obtain ⟨y, hxy, hy⟩ := happrox n x hx hc + have hrn : 0 < r * (1 / 4 : ℝ) ^ n := mul_pos hr (pow_pos (by norm_num) n) + have hxy' : dist y x ≤ r * (1 / 4 : ℝ) ^ n / 8 := by nlinarith + refine ⟨y, hxy', ?_⟩ + dsimp [control] + have hn := hnear n x y hx hxy' (P - f y) + rw [pow_succ] + nlinarith + · intro n x hx hc + have hu := hupper n x hx (P - f x) + have hm := mul_le_mul_of_nonneg_left hc.le hC + rw [dist_eq_norm, norm_sub_rev] + nlinarith + +end Normalized + +section OpenImage + +variable {X E : Type*} [MetricSpace X] [CompleteSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The quarter scales used in the constructive surjectivity argument. -/ +noncomputable def coordinateQuarterRadius (r : ℝ) (i : ℕ) : ℝ := r * (1 / 4 : ℝ) ^ i + +theorem coordinateQuarterRadius_add (r : ℝ) (i n : ℕ) : + coordinateQuarterRadius r (i + n) = + coordinateQuarterRadius r i * (1 / 4 : ℝ) ^ n := by + simp only [coordinateQuarterRadius, pow_add, mul_assoc] + +/-- Raw approximation data: small normalized targets have approximate +preimages, and changing the center and going down one quarter-scale costs at +most two in the residual norm. All conditions are local to the open domain. -/ +structure OpenCoordinateData (Ω : Set X) (f : X → E) (r C : ℝ) where + normalization : ℕ → X → E ≃L[ℝ] E + approximate : ∀ i x, x ∈ Ω → Metric.closedBall x (coordinateQuarterRadius r i) ⊆ Ω → + ∀ P, ‖normalization i x (P - f x)‖ < coordinateQuarterRadius r i / 16 → + ∃ y, dist y x ≤ 17 / 256 * coordinateQuarterRadius r i ∧ + ‖normalization i x (P - f y)‖ ≤ coordinateQuarterRadius r i / 256 + nearby : ∀ i x y, x ∈ Ω → y ∈ Ω → + dist y x ≤ coordinateQuarterRadius r i / 8 → + ∀ w, ‖normalization (i + 1) y w‖ ≤ 2 * ‖normalization i x w‖ + upper : ∀ i x, x ∈ Ω → ∀ w, ‖w‖ ≤ C * ‖normalization i x w‖ + +namespace OpenCoordinateData + +/-- Build the approximation data directly from pointed metric approximations +and uniform closeness of the normalized coordinate functions. -/ +def of_pointed_approximation {Ω : Set X} {f : X → E} {r C : ℝ} (hr : 0 < r) + (N : ℕ → X → E ≃L[ℝ] E) + (hcharts : ∀ i x, x ∈ Ω → Metric.closedBall x (coordinateQuarterRadius r i) ⊆ Ω → + ∃ g : X → E, + IsPointedApproximation x 0 (coordinateQuarterRadius r i) 1 (1 / 1024) g ∧ + ∀ y, dist y x ≤ coordinateQuarterRadius r i → + ‖(coordinateQuarterRadius r i)⁻¹ • N i x (f y - f x) - g y‖ ≤ 1 / 1024) + (hnear : ∀ i x y, x ∈ Ω → y ∈ Ω → + dist y x ≤ coordinateQuarterRadius r i / 8 → + ∀ w, ‖N (i + 1) y w‖ ≤ 2 * ‖N i x w‖) + (hupper : ∀ i x, x ∈ Ω → ∀ w, ‖w‖ ≤ C * ‖N i x w‖) : + OpenCoordinateData Ω f r C where + normalization := N + approximate := by + intro i x hx hb P hP + obtain ⟨g, hg, hclose⟩ := hcharts i x hx hb + exact approximate_preimage_of_euclidean_correspondence (N i x) + (euclidean_correspondence_of_pointed_approximation + (mul_pos hr (pow_pos (by norm_num) i)) (N i x) hg hclose) hP + nearby := hnear + upper := hupper + +/-- An exact ellipsoid is contained in the image of the interior ball. The +stronger one-sixth radius records the margin left by the Cauchy construction. -/ +theorem exists_preimage {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hcont : ContinuousOn f Ω) (i : ℕ) (x₀ : X) + (hball : Metric.ball x₀ (2 * coordinateQuarterRadius r i) ⊆ Ω) + {P : E} (hP : ‖d.normalization i x₀ (P - f x₀)‖ < + coordinateQuarterRadius r i / 16) : + ∃ y, dist y x₀ ≤ coordinateQuarterRadius r i / 6 ∧ f y = P := by + let R := coordinateQuarterRadius r i + have hR : 0 < R := mul_pos hr (pow_pos (by norm_num) i) + have hscale (n : ℕ) : coordinateQuarterRadius r (i + n) = R * (1 / 4 : ℝ) ^ n := + coordinateQuarterRadius_add r i n + have hle (n : ℕ) : coordinateQuarterRadius r (i + n) ≤ R := by + rw [hscale] + exact mul_le_of_le_one_right hR.le (pow_le_one₀ (by norm_num) (by norm_num)) + have hinside {x : X} (hx : dist x x₀ < R / 2) : x ∈ Ω := + hball (by change dist x x₀ < 2 * R; linarith) + apply exists_preimage_of_normalized_approximation hR hC + (fun n x => d.normalization (i + n) x) (by simpa using hP) ?_ ?_ ?_ ?_ + · intro n x hx ht + have hb : Metric.closedBall x (coordinateQuarterRadius r (i + n)) ⊆ Ω := by + intro z hz + apply hball + have htri := dist_triangle z x x₀ + change dist z x₀ < 2 * R + have hz' : dist z x ≤ coordinateQuarterRadius r (i + n) := hz + linarith [hle n] + simpa only [hscale] using d.approximate (i + n) x (hinside hx) hb P + (by simpa only [hscale] using ht) + · intro n x y hx hxy w + have hy : y ∈ Ω := by + apply hball + have htri := dist_triangle y x x₀ + have hxy' : dist y x ≤ coordinateQuarterRadius r (i + n) / 8 := by + simpa only [hscale] using hxy + change dist y x₀ < 2 * R + linarith [hle n] + simpa only [Nat.add_assoc] using d.nearby (i + n) x y (hinside hx) hy + (by simpa only [hscale] using hxy) w + · intro n x hx w + exact d.upper (i + n) x (hinside hx) w + · exact hcont.mono (fun x hx => hinside hx) + +/-- Approximation on all quarter-scales gives arbitrarily localized exact +preimages. The target neighborhood is an explicit frozen ellipsoid. -/ +theorem localized_surjectivity {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) {x : X} (hx : x ∈ Ω) + {δ : ℝ} (hδ : 0 < δ) : + ∃ i, ∀ P, ‖d.normalization i x (P - f x)‖ < coordinateQuarterRadius r i / 16 → + ∃ y ∈ Ω, dist y x < δ ∧ f y = P := by + obtain ⟨a, ha, hball⟩ := Metric.isOpen_iff.mp hΩ x hx + have hlim : Tendsto (fun i => coordinateQuarterRadius r i) atTop (𝓝 0) := by + simpa only [coordinateQuarterRadius, mul_zero] using (tendsto_const_nhds (x := r)).mul + (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 4) + (by norm_num : (1 / 4 : ℝ) < 1)) + have hev : ∀ᶠ i in atTop, coordinateQuarterRadius r i < min (a / 2) δ := + hlim.eventually (gt_mem_nhds (by positivity : 0 < min (a / 2) δ)) + obtain ⟨i, hi⟩ := hev.exists + have hR : 0 < coordinateQuarterRadius r i := mul_pos hr (pow_pos (by norm_num) i) + refine ⟨i, fun P hP => ?_⟩ + have hb : Metric.ball x (2 * coordinateQuarterRadius r i) ⊆ Ω := by + intro y hy + apply hball + have hy' : dist y x < 2 * coordinateQuarterRadius r i := hy + change dist y x < a + linarith [lt_of_lt_of_le hi (min_le_left _ _)] + obtain ⟨y, hy, hfy⟩ := d.exists_preimage hr hC hcont i x hb hP + refine ⟨y, hb ?_, ?_, hfy⟩ + · change dist y x < 2 * coordinateQuarterRadius r i + linarith + · linarith [lt_of_lt_of_le hi (min_le_right _ _)] + +/-- The restriction of the coordinates to the open working domain is an open +map. This uses exact preimages, without any invariance-of-domain input. -/ +theorem isOpenMap {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) : + IsOpenMap (fun x : Ω => f x) := by + intro U hU + apply isOpen_iff_mem_nhds.mpr + rintro P ⟨x, hx, rfl⟩ + obtain ⟨δ, hδ, hδU⟩ := Metric.isOpen_iff.mp hU x hx + obtain ⟨i, hi⟩ := d.localized_surjectivity hr hC hΩ hcont x.property hδ + let V := {P : E | ‖d.normalization i x (P - f x)‖ < coordinateQuarterRadius r i / 16} + have hVopen : IsOpen V := isOpen_lt + ((d.normalization i x).continuous.comp (continuous_id.sub continuous_const)).norm + continuous_const + have hxV : f x ∈ V := by + change ‖d.normalization i x (f x - f x)‖ < coordinateQuarterRadius r i / 16 + simp only [sub_self, map_zero, norm_zero] + exact div_pos (mul_pos hr (pow_pos (by norm_num) i)) (by norm_num) + apply Filter.mem_of_superset (hVopen.mem_nhds hxV) + intro P hP + obtain ⟨y, hy, hdist, hfy⟩ := hi P hP + exact ⟨⟨y, hy⟩, hδU hdist, hfy⟩ + +/-- Once separation has been proved, the constructive open map is an open +embedding, hence a homeomorphism onto its open image. -/ +theorem isOpenEmbedding {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) (hinj : Set.InjOn f Ω) : + Topology.IsOpenEmbedding (fun x : Ω => f x) := by + apply Topology.IsOpenEmbedding.of_continuous_injective_isOpenMap + · exact continuousOn_iff_continuous_domRestrict.mp hcont + · intro x y hxy + exact Subtype.ext (hinj x.property y.property hxy) + · exact d.isOpenMap hr hC hΩ hcont + +/-- The resulting homeomorphism retains the original coordinate values. -/ +noncomputable def homeomorph {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) (hinj : Set.InjOn f Ω) : + Ω ≃ₜ Set.range (fun x : Ω => f x) := + (d.isOpenEmbedding hr hC hΩ hcont hinj).toIsEmbedding.toHomeomorph + +theorem isOpen_range {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) : + IsOpen (Set.range (fun x : Ω => f x)) := by + simpa only [Set.image_univ] using d.isOpenMap hr hC hΩ hcont Set.univ isOpen_univ + +end OpenCoordinateData + +omit [CompleteSpace X] in +/-- A normalized distance approximation with error at most half the pair's +distance separates the pair. The scale may depend on both points. -/ +theorem injOn_of_normalized_separation {Ω : Set X} {f : X → E} + (N : ℕ → X → E ≃L[ℝ] E) + (hsep : ∀ x ∈ Ω, ∀ z ∈ Ω, x ≠ z → ∃ i, + |‖N i x (f z - f x)‖ - dist x z| ≤ dist x z / 2) : Set.InjOn f Ω := by + intro x hx z hz heq + by_contra hne + obtain ⟨i, hi⟩ := hsep x hx z hz hne + have hd : 0 < dist x z := dist_pos.mpr hne + rw [← heq, sub_self, map_zero, norm_zero, zero_sub, abs_neg, + abs_of_nonneg dist_nonneg] at hi + linarith + +/-- The complete constructive conclusion, with the homeomorphism equal to the +given coordinate map and its image proved open. -/ +theorem open_homeomorph_of_normalized_separation + {Ω : Set X} {f : X → E} {r C : ℝ} + (d : OpenCoordinateData Ω f r C) (hr : 0 < r) (hC : 0 ≤ C) + (hΩ : IsOpen Ω) (hcont : ContinuousOn f Ω) + (hsep : ∀ x ∈ Ω, ∀ z ∈ Ω, x ≠ z → ∃ i, + |‖d.normalization i x (f z - f x)‖ - dist x z| ≤ dist x z / 2) : + IsOpen (Set.range (fun x : Ω => f x)) ∧ + ∃ e : Ω ≃ₜ Set.range (fun x : Ω => f x), ∀ x, (e x).val = f x := by + refine ⟨d.isOpen_range hr hC hΩ hcont, + d.homeomorph hr hC hΩ hcont (injOn_of_normalized_separation d.normalization hsep), ?_⟩ + intro x + rfl + +end OpenImage + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OpenLimitChart.lean b/lean/OAI/Geometry/RCD/Coordinates/OpenLimitChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..b09fd1ce734ebf1540fd442715f26628caf56ac2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OpenLimitChart.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Sobolev.CoerciveOpenMapping +import OAI.Geometry.RCD.Coordinates.ChartTopology + +namespace OAI + +/-! # Openness of the coordinate limit from its actual approximating maps -/ + +open Set Filter Topology +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- Only the actual smooth approximants and their uniform lower differential +bound are needed for openness of the final bi-Lipschitz chart. -/ +theorem hasOpenBilipschitzChart_of_coercive_limit + {X : Type*} [MetricSpace X] {n : ℕ} {p : X} + {U : Set X} (hU : IsOpen U) (hp : p ∈ U) + {O : Set (Euclidean n)} (hO : IsOpen O) (u : U ≃ₜ O) + {f : ℕ → Euclidean n → Euclidean n} {H : U → Euclidean n} + {M L : ℝ} (hM : 0 < M) (hL : 1 ≤ L) + (hd : ∀ i z, z ∈ O → DifferentiableAt ℝ (f i) z) + (hb : ∀ i z, z ∈ O → ∀ v, ‖v‖ ≤ M*‖fderiv ℝ (f i) z v‖) + {e : ℕ → ℝ} (he : Tendsto e atTop (𝓝 0)) + (herr : ∀ i x, dist (f i (u x)) (H x) ≤ e i) + (hbound : ∀ x z : U, L⁻¹*dist (x:X) (z:X) ≤ dist (H x) (H z) ∧ + dist (H x) (H z) ≤ L*dist (x:X) (z:X)) : + HasOpenBilipschitzChart n p := by + classical + have hLpos : 0 < L := lt_of_lt_of_le zero_lt_one hL + obtain ⟨hLip,hAnti⟩ := lipschitz_antilipschitz_of_dist_bounds + (inv_pos.mpr hLpos) hLpos.le hbound + let F : Euclidean n → Euclidean n := fun z => if hz : z ∈ O then H (u.symm ⟨z,hz⟩) else 0 + have hFval (z : O) : F z = H (u.symm z) := by simp only [F, dite_eq_left z.property] + have hF : ContinuousOn F O := by + apply continuousOn_iff_continuous_domRestrict.mpr + convert hLip.continuous.comp u.symm.continuous using 1 + exact funext hFval + have hrange : F '' O = range H := by + ext y + constructor + · rintro ⟨z,hz,rfl⟩ + rw [hFval ⟨z,hz⟩] + exact mem_range_self _ + · rintro ⟨x,rfl⟩ + refine ⟨u x, (u x).property, ?_⟩ + rw [hFval, u.symm_apply_apply] + have hopen : IsOpen (range H) := by + rw [← hrange] + apply isOpen_image_of_uniform_limit_differential_bound hO hF hM hd hb he + intro i z hz + rw [hFval ⟨z,hz⟩] + simpa only [u.apply_symm_apply] using herr i (u.symm ⟨z,hz⟩) + have hEmb : IsEmbedding H := hAnti.isEmbedding hLip.continuous + exact ⟨U, range H, hU, hp, hopen, hEmb.toHomeomorph, L, hL, hbound⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OpenRegularCutoff.lean b/lean/OAI/Geometry/RCD/Coordinates/OpenRegularCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..884981b5e82c1a87917a3066e590e861df8ef167 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OpenRegularCutoff.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.RegularCompactCutoff + +namespace OAI + +/-! # Interior regular cutoffs around compact sets -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Every compact subset of an open set admits a compact Lipschitz plateau +with an actual L² weak Laplacian. Finite unions of the RCD ball cutoffs +supply the arbitrary shape without an additional analytic hypothesis. -/ +theorem NoncollapsedRCD.exists_open_regular_cutoff {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + {Ω S : Set X} (hΩ : IsOpen Ω) (hS : IsCompact S) (hsub : S ⊆ Ω) : + letI := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + ∃ χ : RegularCompactCutoff (hausdorff n X) hX.quadratic, + tsupport χ.weight ⊆ Ω ∧ ∀ x ∈ S, χ.weight x=1 := by + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + apply hS.induction_on (p := fun T => ∃ χ : RegularCompactCutoff μ hX.quadratic, + tsupport χ.weight ⊆ Ω ∧ ∀ x ∈ T, χ.weight x=1) + · refine ⟨RegularCompactCutoff.zero,?_,by simp⟩ + simp [RegularCompactCutoff.zero] + · intro T U hTU hU + obtain ⟨χ,hχ,hχ1⟩ := hU + exact ⟨χ,hχ,fun x hx => hχ1 x (hTU hx)⟩ + · intro T U hT hU + obtain ⟨χ,hχ,hχ1⟩ := hT + obtain ⟨η,hη,hη1⟩ := hU + refine ⟨χ.union η,(χ.union_support η).trans (union_subset hχ hη),?_⟩ + intro x hx + rcases hx with hx | hx + · exact χ.union_one_left η (hχ1 x hx) + · exact χ.union_one_right η (hη1 x hx) + · intro x hx + obtain ⟨ε,hε,hball⟩ := Metric.isOpen_iff.mp hΩ x (hsub hx) + have hr : 0 < ε/3 := by positivity + obtain ⟨C,-,⟨χ⟩⟩ := hX.goodCutoff_exists hn x hr + let η : RegularCompactCutoff μ hX.quadratic := { + weight := χ.weight + lip := (C/(ε/3)).toNNReal + lipschitz := χ.lipschitz + compact := χ.hasCompactSupport μ hX.quadratic + bounds := χ.bounds + sobolev := χ.sobolev + representative := χ.representative + laplacian := χ.laplacian + weak_laplacian := χ.weak_laplacian } + refine ⟨ball x (ε/3),mem_nhdsWithin_of_mem_nhds (ball_mem_nhds x hr),η,?_,χ.one⟩ + apply (χ.tsupport_subset μ hX.quadratic).trans + intro y hy + apply hball + have hd : dist y x ≤ 2*(ε/3) := hy + show dist y x < ε + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OuterNormalizedSquareLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/OuterNormalizedSquareLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..acd6ad5aca5a41ec6f61668c473144c496a0345f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OuterNormalizedSquareLimit.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Metric.InnerBallValueMoments +import OAI.Geometry.RCD.Metric.MeasuredAnnularMass +import OAI.Geometry.RCD.Coordinates.Proper + +namespace OAI + +/-! # Quadratic value limits with the original outer mass normalization -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +private theorem cancel_middle_inverse (a b c : ℝ) (hb : b≠0) : + a*b*(b⁻¹*c)=a*c := by + calc _ = a*(b*b⁻¹)*c := by ring + _ = _ := by rw [mul_inv_cancel₀ hb,mul_one] + +theorem NoncollapsedRCD.outer_normalized_square_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S ρ τ : ℝ} (hS : 0 ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (ρ*r k), (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) x)^2 + ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹*∫ z in ball 0 ρ, (g z)^2)) := by + have hρS := hρτ.le.trans hτS + have hfin (k : ℕ) := (hX.finiteOnBounded (ball (p k) (S*r k)) isBounded_ball).ne + have hpos (k : ℕ) : 0<(hausdorff n X).real (ball (p k) (S*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' (hfin k) + have hinner (k : ℕ) : 0<(hausdorff n X).real (ball (p k) (ρ*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hρ (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hi := inner_ball_value_moment_tendsto hS hρ hρτ hτS hr hV hfin hpos hinner hε + (fun k => SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k)) + (fun k => SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k)) g g hg hg + (fun k => by simpa only [← pow_two] using (Lp.memLp + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k))).integrable_sq.restrict) hu hu + have hm := measured_ball_mass_tendsto hS hρ hρS hr hV hfin hpos hε + have hVρ : volume.real (ball (0:Euclidean n) ρ)≠0 := + (ENNReal.toReal_pos (measure_ball_pos volume 0 hρ).ne' measure_ball_ne_top).ne' + have ht := hm.mul hi + simp only [← pow_two] at ht + convert ht using 1 + · funext k + have he := (hinner k).ne' + exact (cancel_middle_inverse _ _ _ he).symm + · congr 1 + exact (cancel_middle_inverse _ _ _ hVρ).symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OutwardCovectorGrowth.lean b/lean/OAI/Geometry/RCD/Coordinates/OutwardCovectorGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..804e6c44037ae70e84ad0fb100c012aaa7a11b6a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OutwardCovectorGrowth.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.DyadicCovectorGrowth + +namespace OAI + +/-! # The complementary growth bound for shrinking-scale covectors -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The other half of the same adjacent mean comparison bounds smaller +scale covectors by the original one. Together with shrinking radii this +makes the center values of the actual affine fits tend to zero. -/ +theorem dyadic_covector_norm_reverse_growth {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) {a R ε : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (p : X) (hR : 0 < R) (hscale : a * (3 * R) ≤ 1) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 64) + (S : ℕ → Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1)) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball p (R / 2 ^ i)) measurableSet_ball (S i)) + (hfirst : ∀ i, ∃ w : X → Euclidean (m + 1), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (R / 2 ^ i) ε + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) w) : + ∀ i k (b : Euclidean (m + 1)), + ‖(S (i + k)).symm b‖ ≤ (9 / 8 : ℝ) ^ k * ‖(S i).symm b‖ := by + let μ := hausdorff (m + 1) X + have hstep (i : ℕ) (b : Euclidean (m + 1)) : + ‖(S (i + 1)).symm b‖ ≤ (9 / 8 : ℝ) * ‖(S i).symm b‖ := by + have hr : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hrR : R / (2 : ℝ) ^ i ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hscaled : a * (3 * ((R / (2 : ℝ) ^ i) / 2)) ≤ 1 := by + exact (mul_le_mul_of_nonneg_left (show 3 * ((R / (2 : ℝ) ^ i) / 2) ≤ 3 * R by linarith) ha).trans hscale + obtain ⟨w, hw⟩ := hfirst i + have hh := (normalized_adjacent_mean_comparison m hX ha hBG u (S i) hr hscaled hε hw (hexact i) b).2 + have hnext : (R / (2 : ℝ) ^ i) / 2 = R / 2 ^ (i + 1) := by + rw [pow_succ] + field_simp + rw [hnext] at hh + rw [← exact_mean_inverse_norm_sq μ hX.quadratic _ _ measurableSet_ball (S i) (hexact i) b, + ← exact_mean_inverse_norm_sq μ hX.quadratic _ _ measurableSet_ball (S (i + 1)) (hexact (i + 1)) b] at hh + have hs := mul_le_mul_of_nonneg_right hsmall (sq_nonneg ‖(S i).symm b‖) + have hsq : ‖(S (i + 1)).symm b‖ ^ 2 ≤ ((9 / 8 : ℝ) * ‖(S i).symm b‖) ^ 2 := by + nlinarith [sq_nonneg ‖(S i).symm b‖] + exact (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp hsq + intro i k b + induction k with + | zero => simp + | succ k ih => + have hh := mul_le_mul_of_nonneg_left ih (by norm_num : (0 : ℝ) ≤ 9 / 8) + calc + _ ≤ (9 / 8 : ℝ) * ‖(S (i + k)).symm b‖ := by + simpa only [Nat.add_assoc] using hstep (i + k) b + _ ≤ (9 / 8 : ℝ) * ((9 / 8 : ℝ) ^ k * ‖(S i).symm b‖) := hh + _ = _ := by rw [pow_succ]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/OverlappingExactFrames.lean b/lean/OAI/Geometry/RCD/Coordinates/OverlappingExactFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..537dff6035b01c4364ff137f6333da3c05253131 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/OverlappingExactFrames.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.ExactNormalizationComparison + +namespace OAI + +/-! # Comparing two exact frames through their common overlap -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +private theorem overlap_square_comparison {a b g t : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (ht : t ≤ 1 / 3) + (hlo : (1 - t) * a ≤ g) (hhi : g ≤ (1 + t) * b) : a ≤ 2 * b := by + have hl := mul_le_mul_of_nonneg_right (show (2 / 3 : ℝ) ≤ 1 - t by linarith) ha + have hh := mul_le_mul_of_nonneg_right (show 1 + t ≤ (4 / 3 : ℝ) by linarith) hb + linarith + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The same positive overlap compares exact normalizers centered at two +points. Only the already controlled volume-ratio loss enters the bound. -/ +theorem overlapping_exact_frames {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (p q : X) (R : ℝ) + (Np Nq : Euclidean n ≃L[ℝ] Euclidean n) {ε C : ℝ} + (hε : 0 ≤ ε) (hC : 0 ≤ C) (hsmall : (n : ℝ) ^ 2 * (C * ε) ≤ 1 / 3) + (vp vq : X → Euclidean n) + (hp : FirstOrderSplittingOn μ hQ p R ε (transformedColumn μ hQ u Np) vp) + (hq : FirstOrderSplittingOn μ hQ q R ε (transformedColumn μ hQ u Nq) vq) + (hep : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) (ball p R) measurableSet_ball Np) + (heq : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) (ball q R) measurableSet_ball Nq) + (S : Set X) (hS : MeasurableSet S) (hSp : S ⊆ ball p R) (hSq : S ⊆ ball q R) + (hS0 : μ S ≠ 0) (hSfin : μ S ≠ ∞) + (hp0 : μ (ball p R) ≠ 0) (hpfin : μ (ball p R) ≠ ∞) + (hq0 : μ (ball q R) ≠ 0) (hqfin : μ (ball q R) ≠ ∞) + (hvp : μ.real (ball p R) ≤ C * μ.real S) + (hvq : μ.real (ball q R) ≤ C * μ.real S) : + ‖Np.symm.toContinuousLinearMap.comp Nq.toContinuousLinearMap‖ ≤ Real.sqrt 2 ∧ + ‖Nq.symm.toContinuousLinearMap.comp Np.toContinuousLinearMap‖ ≤ Real.sqrt 2 := by + have hforms (b : Euclidean n) : + ‖Np.symm b‖ ^ 2 ≤ 2 * ‖Nq.symm b‖ ^ 2 ∧ + ‖Nq.symm b‖ ^ 2 ≤ 2 * ‖Np.symm b‖ ^ 2 := by + have hp' := exact_normalization_subball_bounds μ hQ u Np hp hep S hS hSp + hS0 hSfin hp0 hpfin hC hε hvp b + have hq' := exact_normalization_subball_bounds μ hQ u Nq hq heq S hS hSq + hS0 hSfin hq0 hqfin hC hε hvq b + rw [← exact_mean_inverse_norm_sq μ hQ _ (ball p R) measurableSet_ball Np hep b] at hp' + rw [← exact_mean_inverse_norm_sq μ hQ _ (ball q R) measurableSet_ball Nq heq b] at hq' + exact ⟨overlap_square_comparison (sq_nonneg _) (sq_nonneg _) hsmall hp'.1 hq'.2, + overlap_square_comparison (sq_nonneg _) (sq_nonneg _) hsmall hq'.1 hp'.2⟩ + constructor + · apply ContinuousLinearMap.opNorm_le_bound _ (Real.sqrt_nonneg 2) + intro b + have hh := (hforms (Nq b)).1 + simp only [ContinuousLinearEquiv.symm_apply_apply] at hh + change ‖Np.symm (Nq b)‖ ≤ Real.sqrt 2 * ‖b‖ + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + simpa only [mul_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] using hh + · apply ContinuousLinearMap.opNorm_le_bound _ (Real.sqrt_nonneg 2) + intro b + have hh := (hforms (Np b)).2 + simp only [ContinuousLinearEquiv.symm_apply_apply] at hh + change ‖Nq.symm (Np b)‖ ≤ Real.sqrt 2 * ‖b‖ + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + simpa only [mul_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PairGeometry.lean b/lean/OAI/Geometry/RCD/Coordinates/PairGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..06f4c2699ef54bc703bbb0d55642efc82d16e332 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PairGeometry.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Coordinates.IterationLimit + +namespace OAI + +/-! +# Pair segments from harmonic-coordinate ellipsoids + +The final analytic argument only needs a coordinate segment to stay in the +larger working region, with comparable frozen metrics along it. Central +ellipsoid containment and the nearby-center comparison imply precisely +those facts. The source of the final chart may be a smaller open subset. +-/ + +open Set + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem norm_frozen_sub_le_of_mem_segment (T : E →L[ℝ] E) + {A B P : E} (hP : P ∈ segment ℝ A B) : + ‖T (P - A)‖ ≤ ‖T (B - A)‖ := by + obtain ⟨a, b, ha, hb, hab, rfl⟩ := hP + have haeq : a = 1 - b := by linarith + have hbeq : (a • A + b • B) - A = b • (B - A) := by + rw [haeq] + module + rw [hbeq, map_smul, norm_smul, Real.norm_eq_abs, abs_of_nonneg hb] + exact mul_le_of_le_one_left (norm_nonneg _) (by linarith) + +/-- Every point of the short coordinate segment has a preimage in the +nearby metric ball. Thus the nearby-center bound applies along the +whole segment, without any differentiability of the frozen metrics. -/ +theorem segment_geometry_of_ellipsoid + {X : Type*} [MetricSpace X] (u : X → E) (frozen : E → E ≃L[ℝ] E) + {Ω : Set E} {W : Set X} {x z : X} {r c G : ℝ} + (hend : ‖frozen (u x) (u z - u x)‖ < c * r) + (hball : ∀ P : E, ‖frozen (u x) (P - u x)‖ < c * r → + P ∈ Ω ∧ ∃ y ∈ W, dist x y < r ∧ u y = P) + (hnear : ∀ y ∈ W, dist x y < r → ∀ w : E, + ‖frozen (u y) w‖ ≤ G * ‖frozen (u x) w‖) : + segment ℝ (u x) (u z) ⊆ Ω ∧ ∀ P ∈ segment ℝ (u x) (u z), + ‖frozen P (u z - u x)‖ ≤ G * ‖frozen (u x) (u z - u x)‖ := by + have hinside (P : E) (hP : P ∈ segment ℝ (u x) (u z)) : + P ∈ Ω ∧ ∃ y ∈ W, dist x y < r ∧ u y = P := by + apply hball P + exact (norm_frozen_sub_le_of_mem_segment (frozen (u x)).toContinuousLinearMap hP).trans_lt hend + constructor + · intro P hP + exact (hinside P hP).1 + · intro P hP + obtain ⟨y, hy, hdist, rfl⟩ := (hinside P hP).2 + exact hnear y hy hdist _ + +/-- All ingredients of the final pair geometry follow from endpoint +separation, ellipsoid containment, nearby metric comparison, and a +diameter bound on the small source domain. -/ +theorem iterationPairGeometry_of_ellipsoids + {X : Type*} [MetricSpace X] (u : X → E) (D W : Set X) + (Ω : Set E) (frozen : ℕ → E → E ≃L[ℝ] E) + {r0 T B G c : ℝ} (hr0 : 0 < r0) (hT : 1 ≤ T) (hB : 1 ≤ B) (hG : 1 ≤ G) + (hc : 0 < c) (hmargin : G < c * iterationPairMultiplier T B G) + (hdiam : ∀ x ∈ D, ∀ z ∈ D, iterationPairMultiplier T B G * dist x z ≤ r0) + (hend : ∀ i x, x ∈ D → ∀ z, z ∈ D → x ≠ z → + iterationPairMultiplier T B G * dist x z ≤ iterationRadius r0 i → + iterationRadius r0 i ≤ 2 * iterationPairMultiplier T B G * dist x z → + G⁻¹ * dist x z ≤ ‖frozen i (u x) (u z - u x)‖ ∧ + ‖frozen i (u x) (u z - u x)‖ ≤ G * dist x z) + (hball : ∀ i x, x ∈ D → ∀ P : E, + ‖frozen i (u x) (P - u x)‖ < c * iterationRadius r0 i → + P ∈ Ω ∧ ∃ y ∈ W, dist x y < iterationRadius r0 i ∧ u y = P) + (hnear : ∀ i x, x ∈ D → ∀ y, y ∈ W → dist x y < iterationRadius r0 i → + ∀ w : E, ‖frozen i (u y) w‖ ≤ G * ‖frozen i (u x) w‖) : + IterationPairGeometry (fun x : D => u x) Ω frozen r0 T B G := by + apply iterationPairGeometry_of_all_scales (X := D) (fun x => u x) Ω frozen hr0 hT hB hG + (fun x z => hdiam x x.property z z.property) + intro i x z hxz hscale hscale' + have hxz' : (x : X) ≠ z := fun h => hxz (Subtype.ext h) + obtain ⟨hl, hu⟩ := hend i x x.property z z.property hxz' hscale hscale' + refine ⟨hl, hu, ?_⟩ + apply segment_geometry_of_ellipsoid u (frozen i) (x := x) (z := z) + · calc + ‖frozen i (u x) (u z - u x)‖ ≤ G * dist (x : X) z := hu + _ < (c * iterationPairMultiplier T B G) * dist (x : X) z := + mul_lt_mul_of_pos_right hmargin (dist_pos.mpr hxz') + _ = c * (iterationPairMultiplier T B G * dist (x : X) z) := by ring + _ ≤ c * iterationRadius r0 i := mul_le_mul_of_nonneg_left hscale hc.le + · exact hball i x x.property + · exact hnear i x x.property + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchAssembly.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ae66da32beca72f0c89f9e25aed00e72bb16867 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchAssembly.lean @@ -0,0 +1,540 @@ +import OAI.Geometry.RCD.Coordinates.MetricIteration +import OAI.Geometry.RCD.Coordinates.PatchJetBounds +import OAI.Geometry.RCD.Coordinates.PatchSecondDerivative + +namespace OAI + +/-! +# Patch fields as input to the analytic iteration + +The frozen covector transformation sends the actual patch field to an +actual cutoff-affine patch field with conjugated positive operators. +The estimates here use only patch geometry and cutoff derivatives; no +coordinate iterate or estimate for its derivatives is an input. +-/ + +open Filter Set +open scoped Topology ContDiff BigOperators InnerProductSpace + +noncomputable section + +attribute [local instance] Classical.propDecidable + +namespace RegularPointCoordinates + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Exact affine displacement under the frozen dual transformation. -/ +theorem frozenConjugate_normalized_displacement {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (D : E →L[ℝ] E) (x c z : E) : + frozenConjugate T D (z - r⁻¹ • T (c - x)) = + r⁻¹ • (T.symm : E →L[ℝ] E).adjoint (D (frozenSource r T x z - c)) := by + have harg : T.symm (z - r⁻¹ • T (c - x)) = + r⁻¹ • (frozenSource r T x z - c) := by + simp only [map_sub, map_smul, ContinuousLinearEquiv.symm_apply_apply, + frozenSource, smul_sub, smul_add, smul_smul, inv_mul_cancel₀ hr, one_smul] + module + simp only [frozenConjugate, ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + harg, map_smul] + +/-- Frozen normalization is an exact identity between finite patch fields. -/ +theorem normalizedCovector_patchField {r : ℝ} (hr : r ≠ 0) + (T : E ≃L[ℝ] E) (x : E) (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) : + normalizedCovector r T x (patchField s phi D c) = + patchField s (fun j z => phi j (frozenSource r T x z)) + (fun j => frozenConjugate T (D j)) (fun j => r⁻¹ • T (c j - x)) := by + funext z + simp only [normalizedCovector, patchField, map_sum, Finset.smul_sum, map_smul] + apply Finset.sum_congr rfl + intro j _ + rw [frozenConjugate_normalized_displacement hr] + module + +omit [CompleteSpace E] in +/-- A cutoff active after normalization was active at the original center. +Continuity alone gives the inclusion needed for an overlap bound. -/ +theorem mem_tsupport_frozen_cutoff {r : ℝ} (T : E ≃L[ℝ] E) (x : E) + (phi : E → ℝ) (hz : (0 : E) ∈ tsupport (fun z => phi (frozenSource r T x z))) : + x ∈ tsupport phi := by + have hs : Continuous (frozenSource r T x) := by unfold frozenSource; fun_prop + have h := tsupport_comp_subset_preimage phi hs hz + simpa [frozenSource] using h + +omit [CompleteSpace E] in +/-- The number of active cutoffs does not increase under normalization. -/ +theorem frozen_cutoff_active_card_le {r : ℝ} (T : E ≃L[ℝ] E) (x : E) + (s : Finset ι) (phi : ι → E → ℝ) : + (s.filter (fun j => (0 : E) ∈ tsupport (fun z => phi j (frozenSource r T x z)))).card ≤ + (s.filter (fun j => x ∈ tsupport (phi j))).card := by + classical + apply Finset.card_le_card + intro j hj + exact Finset.mem_filter.mpr ⟨(Finset.mem_filter.mp hj).1, + mem_tsupport_frozen_cutoff T x (phi j) (Finset.mem_filter.mp hj).2⟩ + +omit [CompleteSpace E] in +/-- Cutoff smoothness at the center transports through the frozen affine map. -/ +theorem contDiffAt_frozen_cutoff {r : ℝ} (T : E ≃L[ℝ] E) (x : E) + {phi : E → ℝ} {m : ℕ} (hphi : ContDiffAt ℝ m phi x) : + ContDiffAt ℝ m (fun z => phi (frozenSource r T x z)) 0 := by + have hp : ContDiffAt ℝ m phi (frozenSource r T x 0) := by + simpa [frozenSource] using hphi + apply hp.comp + unfold frozenSource + fun_prop + +/-- Small displacement energy gives the normalized affine value bound. +The local energy budget `energy ≤ epsilon` is what makes this linear in +`epsilon`, including when the positive mass operator is degenerate. -/ +theorem normalized_patch_displacement_le {r epsilon C energy : ℝ} + (hr : 0 < r) (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) + (henergy : 0 ≤ energy) (hbudget : energy ≤ epsilon) + (T : E ≃L[ℝ] E) (D : E →L[ℝ] E) (x c : E) + (hD : D.IsPositive) (hsmall : ∀ y, ⟪y, D y⟫_ℝ ≤ epsilon * ‖T y‖ ^ 2) + (hvalue : ⟪x - c, D (x - c)⟫_ℝ ≤ C * r ^ 2 * energy) : + ‖frozenConjugate T D ((0 : E) - r⁻¹ • T (c - x))‖ ≤ epsilon * Real.sqrt C := by + rw [frozenConjugate_normalized_displacement hr.ne'] + simp only [frozenSource, map_zero, smul_zero, add_zero, norm_smul, Real.norm_eq_abs, + abs_inv, abs_of_pos hr] + have hv := frozen_positive_form_value_le T hD hepsilon hC hr.le henergy hsmall (x - c) hvalue + calc + _ ≤ r⁻¹ * (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy) := + mul_le_mul_of_nonneg_left hv (inv_nonneg.mpr hr.le) + _ = Real.sqrt epsilon * Real.sqrt C * Real.sqrt energy := by field_simp + _ ≤ Real.sqrt epsilon * Real.sqrt C * Real.sqrt epsilon := + mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hbudget) (by positivity) + _ = (Real.sqrt epsilon) ^ 2 * Real.sqrt C := by ring + _ = _ := by rw [Real.sq_sqrt hepsilon] + +/-- The factorial target weight absorbs the Gevrey-two cutoff weight. -/ +theorem factorial_sq_le_majorant_scale (m : ℕ) : + (m.factorial : ℝ) ^ 2 ≤ factorialMajorant m * (m.factorial : ℝ) := by + have hm : (1 : ℝ) ≤ (m : ℝ) + 1 := by linarith [Nat.cast_nonneg (α := ℝ) m] + have hf : (1 : ℝ) ≤ (m.factorial : ℝ) := by exact_mod_cast Nat.succ_le_of_lt (Nat.factorial_pos m) + have hc : (1 : ℝ) ≤ ((m : ℝ) + 1) ^ 3 * (m.factorial : ℝ) := + one_le_mul_of_one_le_of_one_le (one_le_pow₀ hm) hf + calc + _ = 1 * (m.factorial : ℝ) ^ 2 := by ring + _ ≤ (((m : ℝ) + 1) ^ 3 * (m.factorial : ℝ)) * (m.factorial : ℝ) ^ 2 := + mul_le_mul_of_nonneg_right hc (sq_nonneg _) + _ = _ := by unfold factorialMajorant; rw [Nat.factorial_succ]; push_cast; ring + +/-- Actual normalized correction jets with a fixed base, independent of +order and of the full net size. Only active patches enter the estimate. -/ +theorem normalized_patchField_jet_le + (T : E ≃L[ℝ] E) (x : E) (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (m : ℕ) + {r epsilon C energy L N F B : ℝ} + (hr : 0 < r) (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) + (henergy : 0 ≤ energy) (hbudget : energy ≤ epsilon) (hL : 1 ≤ L) + (hcard : ((s.filter (fun j => x ∈ tsupport (phi j))).card : ℝ) ≤ N) + (hD : ∀ j ∈ s, x ∈ tsupport (phi j) → (D j).IsPositive) + (hsmall : ∀ j ∈ s, x ∈ tsupport (phi j) → ∀ y, + ⟪y, D j y⟫_ℝ ≤ epsilon * ‖T y‖ ^ 2) + (hvalue : ∀ j ∈ s, x ∈ tsupport (phi j) → + ⟪x - c j, D j (x - c j)⟫_ℝ ≤ C * r ^ 2 * energy) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) + (hcutoff : ∀ j ∈ s, x ∈ tsupport (phi j) → ∀ q ≤ m, + ‖iteratedFDeriv ℝ q (fun z => phi j (frozenSource r T x z)) 0‖ ≤ + L ^ (q + 1) * (q.factorial : ℝ) ^ 2) + (hF : patchJetBase N (Real.sqrt C) L ≤ F) + (hB : patchJetBase N (Real.sqrt C) L ≤ B) : + ‖iteratedFDeriv ℝ m (normalizedCovector r T x (patchField s phi D c)) 0‖ ≤ + epsilon * F * factorialMajorant m * jetCoefficientScale B m := by + let J := patchJetBase N (Real.sqrt C) L + have hJ : 1 ≤ J := patchJetBase_ge_one hL + have hJ0 : 0 ≤ J := zero_le_one.trans hJ + have hB0 : 0 ≤ B := hJ0.trans hB + have hF0 : 0 ≤ F := hJ0.trans hF + have hactive : ∀ j ∈ s, (0 : E) ∈ tsupport (fun z => phi j (frozenSource r T x z)) → + x ∈ tsupport (phi j) := fun j _ hj => mem_tsupport_frozen_cutoff T x (phi j) hj + rw [normalizedCovector_patchField hr.ne'] + have hb := patchField_scaled_gevrey_two_active s + (fun j z => phi j (frozenSource r T x z)) (fun j => frozenConjugate T (D j)) + (fun j => r⁻¹ • T (c j - x)) (0 : E) m + (r := 1) hepsilon (by norm_num) (Real.sqrt_nonneg C) hL + ((show ((s.filter (fun j => (0 : E) ∈ + tsupport (fun z => phi j (frozenSource r T x z)))).card : ℝ) ≤ + ((s.filter (fun j => x ∈ tsupport (phi j))).card : ℝ) by + exact_mod_cast frozen_cutoff_active_card_le T x s phi).trans hcard) + (fun j hj ha => frozen_positive_form_mixed_opNorm_le T (hD j hj (hactive j hj ha)) + hepsilon (hsmall j hj (hactive j hj ha))) + (fun j hj ha => by + simpa using normalized_patch_displacement_le hr hepsilon hC henergy hbudget T (D j) x (c j) + (hD j hj (hactive j hj ha)) (hsmall j hj (hactive j hj ha)) (hvalue j hj (hactive j hj ha))) + (fun j hj => contDiffAt_frozen_cutoff T x (hphi j hj)) + (fun j hj ha q hq => by simpa using hcutoff j hj (hactive j hj ha) q hq) + simp only [one_pow, one_mul, mul_one] at hb + calc + _ ≤ epsilon * J ^ (m + 1) * (m.factorial : ℝ) ^ 2 := hb + _ = epsilon * (J * J ^ m) * (m.factorial : ℝ) ^ 2 := by rw [pow_succ]; ring + _ ≤ epsilon * (F * B ^ m) * (factorialMajorant m * (m.factorial : ℝ)) := by + apply mul_le_mul + · exact mul_le_mul_of_nonneg_left + (mul_le_mul hF (pow_le_pow_left₀ hJ0 hB m) (by positivity) hF0) hepsilon + · exact factorial_sq_le_majorant_scale m + · positivity + · positivity + _ = _ := by unfold jetCoefficientScale; ring + +omit [CompleteSpace E] in +/-- Local smoothness of the full finite patch field. -/ +theorem contDiffAt_patchField (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) {m : ℕ} + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) : + ContDiffAt ℝ m (patchField s phi D c) x := by + apply ContDiffAt.sum + intro j hj + exact (hphi j hj).smul ((D j).contDiff.contDiffAt.comp x + (contDiffAt_id.sub contDiffAt_const)) + +omit [CompleteSpace E] in +/-- At the testing point the field is the sum over active patches. -/ +theorem patchField_eq_active_at (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) : + patchField s phi D c x = + patchField (s.filter (fun j => x ∈ tsupport (phi j))) phi D c x := by + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro j hj hnot + have hz : phi j x = 0 := image_eq_zero_of_notMem_tsupport + (fun hx => hnot (Finset.mem_filter.mpr ⟨hj, hx⟩)) + simp [hz] + +omit [CompleteSpace E] in +/-- The first derivative also restricts to active patches. -/ +theorem fderiv_patchField_eq_active_at (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x xi : E) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 1 (phi j) x) : + fderiv ℝ (patchField s phi D c) x xi = + fderiv ℝ (patchField (s.filter (fun j => x ∈ tsupport (phi j))) phi D c) x xi := by + have h := congrArg (fun A => A (fun _ => xi)) + (iteratedFDeriv_patchField_eq_active s phi D c x 1 hphi) + simpa only [iteratedFDeriv_one_apply] using h + +omit [CompleteSpace E] in +/-- The actual second directional derivative restricts to active patches. -/ +theorem diagonalSecond_patchField_eq_active_at (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x xi : E) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 2 (phi j) x) : + diagonalSecond (patchField s phi D c) x xi = + diagonalSecond (patchField (s.filter (fun j => x ∈ tsupport (phi j))) phi D c) x xi := by + rw [diagonalSecond_eq (contDiffAt_patchField s phi D c x hphi), + diagonalSecond_eq (contDiffAt_patchField _ phi D c x + (fun j hj => hphi j (Finset.mem_filter.mp hj).1)), + iteratedFDeriv_patchField_eq_active s phi D c x 2 hphi] + +/-- All four directional hypotheses of the analytic iteration follow +from the actual finite patches, with one common coefficient. -/ +theorem patchField_directional_bounds + (T : E ≃L[ℝ] E) (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x xi : E) {N : ℕ} + {epsilon C K r energy F : ℝ} + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hC : 0 ≤ C) (hK : 0 ≤ K) (hr : 0 < r) (henergy : 0 ≤ energy) + (hcard : (s.filter (fun j => x ∈ tsupport (phi j))).card ≤ N) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 2 (phi j) x) + (hD : ∀ j ∈ s, x ∈ tsupport (phi j) → (D j).IsPositive) + (hphi0 : ∀ j ∈ s, x ∈ tsupport (phi j) → 0 ≤ phi j x) + (hphi1 : ∀ j ∈ s, x ∈ tsupport (phi j) → phi j x ≤ 1) + (hZ : ∀ y, ⟪y, patchMass (s.filter (fun j => x ∈ tsupport (phi j))) D y⟫_ℝ ≤ + epsilon * ‖T y‖ ^ 2) + (hw : ∀ j ∈ s, x ∈ tsupport (phi j) → + ⟪x - c j, D j (x - c j)⟫_ℝ ≤ C * r ^ 2 * energy) + (hfirst : ∀ j ∈ s, x ∈ tsupport (phi j) → |fderiv ℝ (phi j) x xi| ≤ K / r * ‖T xi‖) + (hsecond : ∀ j ∈ s, x ∈ tsupport (phi j) → + |diagonalSecond (phi j) x xi| ≤ K / r ^ 2 * ‖T xi‖ ^ 2) + (hF1 : 1 ≤ F) (hFvalue : (N : ℝ) * Real.sqrt C ≤ F) + (hFerror : (N : ℝ) * K * Real.sqrt C ≤ F) + (hFsecond : 2 * K * Real.sqrt (N : ℝ) ≤ F) + (hFlinear : K * Real.sqrt ((N : ℝ) * C) ≤ F) : + let active := s.filter (fun j => x ∈ tsupport (phi j)) + let Z := ⟪xi, patchMass active D xi⟫_ℝ + let S := patchPrincipal active (fun j => phi j x) D + ‖(T.symm : E →L[ℝ] E).adjoint (patchField s phi D c x)‖ ≤ + F * Real.sqrt epsilon * r * Real.sqrt energy ∧ + ‖(T.symm : E →L[ℝ] E).adjoint (fderiv ℝ (patchField s phi D c) x xi)‖ ≤ + F * Real.sqrt epsilon * (Real.sqrt Z + Real.sqrt energy * ‖T xi‖) ∧ + ‖(T.symm : E →L[ℝ] E).adjoint (diagonalSecond (patchField s phi D c) x xi)‖ ≤ + F / r * (Real.sqrt Z * ‖T xi‖ + Real.sqrt energy * ‖T xi‖ ^ 2) ∧ + |⟪xi, fderiv ℝ (patchField s phi D c) x xi - S xi⟫_ℝ| ≤ + F * Real.sqrt Z * Real.sqrt energy * ‖T xi‖ := by + let active := s.filter (fun j => x ∈ tsupport (phi j)) + have hd : ∀ j ∈ active, (D j).IsPositive := + fun j hj => hD j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have hp : ∀ j ∈ active, ContDiffAt ℝ 2 (phi j) x := + fun j hj => hphi j (Finset.mem_filter.mp hj).1 + have hp0 : ∀ j ∈ active, 0 ≤ phi j x := + fun j hj => hphi0 j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have hp1 : ∀ j ∈ active, phi j x ≤ 1 := + fun j hj => hphi1 j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have hsmall : ∀ j ∈ active, ∀ y, ⟪y, D j y⟫_ℝ ≤ epsilon * ‖T y‖ ^ 2 := + fun j hj y => (patch_form_le_mass active D hd hj y).trans (hZ y) + have hv : ∀ j ∈ active, ⟪x - c j, D j (x - c j)⟫_ℝ ≤ C * r ^ 2 * energy := + fun j hj => hw j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have hdf : ∀ j ∈ active, |fderiv ℝ (phi j) x xi| ≤ K / r * ‖T xi‖ := + fun j hj => hfirst j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have hd2 : ∀ j ∈ active, |diagonalSecond (phi j) x xi| ≤ K / r ^ 2 * ‖T xi‖ ^ 2 := + fun j hj => hsecond j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2 + have heq := fderiv_patchField_eq_active_at s phi D c x xi + (fun j hj => (hphi j hj).of_le (by norm_num)) + have hdecomp := fderiv_patchField_apply active phi (fun j => fderiv ℝ (phi j) x) D c x xi + (fun j hj => (hp j hj).differentiableAt (by norm_num) |>.hasFDerivAt) + change fderiv ℝ (patchField s phi D c) x xi = _ at heq + have hvb := patchField_frozen_value_le T active phi D c x hcard hepsilon hC hr henergy hd + hsmall hv (fun j hj => abs_le.mpr ⟨by linarith [hp0 j hj], hp1 j hj⟩) + have hpb := patchPrincipal_frozen_norm_le T active (fun j => phi j x) D hepsilon hd hp0 hp1 hZ xi + have heb := patchCutoffError_frozen_norm_le T active D (fun j => x - c j) + (fun j => fderiv ℝ (phi j) x xi) xi hcard hepsilon hC hK hr henergy hd hsmall hv hdf + have hs2 := patchField_second_directional_frozen_le T active phi D c x xi hcard hepsilon + hepsilon1 hC hK hr henergy hp hd hZ hv hdf hd2 + have hl := patchCutoffError_diagonal_le T active D (fun j => x - c j) + (fun j => fderiv ℝ (phi j) x xi) xi hcard hC hK hr henergy hd hv hdf + dsimp only + constructor + · rw [patchField_eq_active_at s phi D c x] + have hraw := (div_le_iff₀ hr).1 hvb + have hcoeff := mul_le_mul_of_nonneg_right hFvalue + (by positivity : 0 ≤ Real.sqrt epsilon * r * Real.sqrt energy) + exact hraw.trans (by nlinarith [hcoeff]) + constructor + · rw [heq, hdecomp, map_add] + refine (norm_add_le _ _).trans ((add_le_add hpb heb).trans ?_) + calc + _ = (1 : ℝ) * (Real.sqrt epsilon * Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ) + + ((N : ℝ) * K * Real.sqrt C) * (Real.sqrt epsilon * Real.sqrt energy * ‖T xi‖) := by ring + _ ≤ F * (Real.sqrt epsilon * Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ) + + F * (Real.sqrt epsilon * Real.sqrt energy * ‖T xi‖) := + add_le_add (mul_le_mul_of_nonneg_right hF1 (by positivity)) + (mul_le_mul_of_nonneg_right hFerror (by positivity)) + _ = _ := by ring + constructor + · rw [diagonalSecond_patchField_eq_active_at s phi D c x xi hphi] + have hb : (N : ℝ) * K * Real.sqrt C * Real.sqrt energy * ‖T xi‖ ^ 2 + + 2 * K * Real.sqrt (N : ℝ) * Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ * ‖T xi‖ ≤ + F * (Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ * ‖T xi‖ + Real.sqrt energy * ‖T xi‖ ^ 2) := by + have hcoeff1 := mul_le_mul_of_nonneg_right hFerror + (by positivity : 0 ≤ Real.sqrt energy * ‖T xi‖ ^ 2) + have hcoeff2 := mul_le_mul_of_nonneg_right hFsecond + (by positivity : 0 ≤ Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ * ‖T xi‖) + nlinarith [hcoeff1, hcoeff2] + calc + _ ≤ F * (Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ * ‖T xi‖ + + Real.sqrt energy * ‖T xi‖ ^ 2) / r := + (le_div_iff₀ hr).2 (by simpa only [diagonalSecond, active, mul_comm] using hs2.trans hb) + _ = _ := by ring + · rw [heq, hdecomp, add_sub_cancel_left] + have hcoeff := mul_le_mul_of_nonneg_right hFlinear + (by positivity : 0 ≤ Real.sqrt ⟪xi, patchMass active D xi⟫_ℝ * Real.sqrt energy * ‖T xi‖) + exact hl.trans (by nlinarith [hcoeff]) + +/-- Only cutoffs whose closed support contains the point are active. -/ +def activePatches (s : Finset ι) (phi : ι → E → ℝ) (x : E) : Finset ι := + s.filter (fun j => x ∈ tsupport (phi j)) + +/-- Geometric patch data before the coordinate iteration. The assumptions +are on cutoffs, positive mass operators, displacement energies and their +cumulative budgets; no estimate on the resulting field is assumed. -/ +structure PatchIterationGeometry (Ω : Set E) (r0 Theta epsilon : ℝ) + (N : ℕ) (C K L : ℝ) where + patches : ℕ → Finset ι + cutoff : ℕ → ι → E → ℝ + operator : ℕ → ι → E →L[ℝ] E + center : ℕ → ι → E + frozen : ℕ → E → E ≃L[ℝ] E + energy : ℕ → E → ℝ + frozen_mono : ∀ i x, x ∈ Ω → ∀ xi, ‖frozen i x xi‖ ≤ ‖frozen (i + 1) x xi‖ + cutoff_smooth : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, ∀ m : ℕ, ContDiffAt ℝ m (cutoff i j) x + active_card : ∀ i x, x ∈ Ω → (activePatches (patches i) (cutoff i) x).card ≤ N + energy_nonneg : ∀ i x, x ∈ Ω → 0 ≤ energy i x + energy_budget : ∀ k x, x ∈ Ω → (∑ i ∈ Finset.range k, energy i x) ≤ epsilon + operator_positive : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → (operator i j).IsPositive + cutoff_nonneg : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → 0 ≤ cutoff i j x + cutoff_le_one : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → cutoff i j x ≤ 1 + mass_small : ∀ i x, x ∈ Ω → ∀ xi, + ⟪xi, patchMass (activePatches (patches i) (cutoff i) x) (operator i) xi⟫_ℝ ≤ + epsilon * ‖frozen i x xi‖ ^ 2 + center_energy : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → + ⟪x - center i j, operator i j (x - center i j)⟫_ℝ ≤ + C * (iterationRadius r0 i) ^ 2 * energy i x + cutoff_first : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → ∀ xi, + |fderiv ℝ (cutoff i j) x xi| ≤ K / iterationRadius r0 i * ‖frozen i x xi‖ + cutoff_second : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → ∀ xi, + |diagonalSecond (cutoff i j) x xi| ≤ + K / (iterationRadius r0 i) ^ 2 * ‖frozen i x xi‖ ^ 2 + cutoff_jets : ∀ i j, j ∈ patches i → ∀ x ∈ Ω, + x ∈ tsupport (cutoff i j) → ∀ m, + ‖iteratedFDeriv ℝ m + (fun z => cutoff i j (frozenSource (iterationRadius r0 i) (frozen i x) x z)) 0‖ ≤ + L ^ (m + 1) * (m.factorial : ℝ) ^ 2 + mass_budget : ∀ k x, x ∈ Ω → ∀ xi, + ‖xi‖ ^ 2 + (∑ i ∈ Finset.range k, + ⟪xi, patchMass (activePatches (patches i) (cutoff i) x) (operator i) xi⟫_ℝ) ≤ + Theta * ‖frozen k x xi‖ ^ 2 + principal_budget : ∀ k x, x ∈ Ω → ∀ xi, + ‖frozen k x xi‖ ^ 2 ≤ Theta * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, + ⟪xi, patchPrincipal (activePatches (patches i) (cutoff i) x) + (fun j => cutoff i j x) (operator i) xi⟫_ℝ) + +/-- One explicit coefficient covers all directional and higher-jet +bounds of the finite patch field. -/ +def patchAssemblyCoefficient (N : ℕ) (C K L : ℝ) : ℝ := + 1 + patchJetBase N (Real.sqrt C) L + (N : ℝ) * Real.sqrt C + + (N : ℝ) * K * Real.sqrt C + 2 * K * Real.sqrt (N : ℝ) + + K * Real.sqrt ((N : ℝ) * C) + +theorem patchAssemblyCoefficient_bounds (N : ℕ) {C K L : ℝ} + (hK : 0 ≤ K) (hL : 1 ≤ L) : + 1 ≤ patchAssemblyCoefficient N C K L ∧ + patchJetBase N (Real.sqrt C) L ≤ patchAssemblyCoefficient N C K L ∧ + (N : ℝ) * Real.sqrt C ≤ patchAssemblyCoefficient N C K L ∧ + (N : ℝ) * K * Real.sqrt C ≤ patchAssemblyCoefficient N C K L ∧ + 2 * K * Real.sqrt (N : ℝ) ≤ patchAssemblyCoefficient N C K L ∧ + K * Real.sqrt ((N : ℝ) * C) ≤ patchAssemblyCoefficient N C K L := by + have h0 : 0 ≤ patchJetBase N (Real.sqrt C) L := + zero_le_one.trans (patchJetBase_ge_one hL) + have h1 : 0 ≤ (N : ℝ) * Real.sqrt C := by positivity + have h2 : 0 ≤ (N : ℝ) * K * Real.sqrt C := by positivity + have h3 : 0 ≤ 2 * K * Real.sqrt (N : ℝ) := by positivity + have h4 : 0 ≤ K * Real.sqrt ((N : ℝ) * C) := by positivity + unfold patchAssemblyCoefficient + refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ <;> linarith + +namespace PatchIterationGeometry + +variable {Ω : Set E} {r0 Theta epsilon C K L : ℝ} {N : ℕ} + +omit [CompleteSpace E] in +/-- An individual nonnegative defect is bounded by the cumulative budget. -/ +theorem energy_le (p : PatchIterationGeometry (ι := ι) Ω r0 Theta epsilon N C K L) + (i : ℕ) (x : E) (hx : x ∈ Ω) : p.energy i x ≤ epsilon := by + have hi : i ∈ Finset.range (i + 1) := Finset.mem_range.mpr (Nat.lt_succ_self i) + exact (Finset.single_le_sum (fun j _ => p.energy_nonneg j x hx) hi).trans + (p.energy_budget (i + 1) x hx) + +/-- Assemble the analytic iteration inputs from genuine finite patch +fields. The four field bounds and every correction jet are conclusions +of the patch calculus, rather than fields of the geometric input. -/ +def toAnalyticIterationData + (p : PatchIterationGeometry (ι := ι) Ω r0 Theta epsilon N C K L) + (hr0 : 0 < r0) (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hC : 0 ≤ C) (hK : 0 ≤ K) (hL : 1 ≤ L) {F B : ℝ} + (hF1 : 1 ≤ F) (hFvalue : (N : ℝ) * Real.sqrt C ≤ F) + (hFerror : (N : ℝ) * K * Real.sqrt C ≤ F) + (hFsecond : 2 * K * Real.sqrt (N : ℝ) ≤ F) + (hFlinear : K * Real.sqrt ((N : ℝ) * C) ≤ F) + (hFjet : patchJetBase N (Real.sqrt C) L ≤ F) + (hB : patchJetBase N (Real.sqrt C) L ≤ B) : + AnalyticIterationData Ω r0 Theta F B epsilon := by + have hd (i : ℕ) (x : E) (hx : x ∈ Ω) : + ∀ j ∈ activePatches (p.patches i) (p.cutoff i) x, (p.operator i j).IsPositive := by + intro j hj + exact p.operator_positive i j (Finset.mem_filter.mp hj).1 x hx (Finset.mem_filter.mp hj).2 + have hb (i : ℕ) (x : E) (hx : x ∈ Ω) (xi : E) := + patchField_directional_bounds (p.frozen i x) (p.patches i) (p.cutoff i) (p.operator i) + (p.center i) x xi hepsilon hepsilon1 hC hK (iterationRadius_pos hr0 i) + (p.energy_nonneg i x hx) (p.active_card i x hx) + (fun j hj => p.cutoff_smooth i j hj x hx 2) + (fun j hj ha => p.operator_positive i j hj x hx ha) + (fun j hj ha => p.cutoff_nonneg i j hj x hx ha) + (fun j hj ha => p.cutoff_le_one i j hj x hx ha) (p.mass_small i x hx) + (fun j hj ha => p.center_energy i j hj x hx ha) + (fun j hj ha => p.cutoff_first i j hj x hx ha xi) + (fun j hj ha => p.cutoff_second i j hj x hx ha xi) + hF1 hFvalue hFerror hFsecond hFlinear + refine { + frozen := p.frozen + correction := fun i => patchField (p.patches i) (p.cutoff i) (p.operator i) (p.center i) + principal := fun i x => patchPrincipal (activePatches (p.patches i) (p.cutoff i) x) + (fun j => p.cutoff i j x) (p.operator i) + mass := fun i x => patchMass (activePatches (p.patches i) (p.cutoff i) x) (p.operator i) + energy := p.energy + frozen_mono := p.frozen_mono + correction_smooth := fun i x hx m => contDiffAt_patchField _ _ _ _ _ + (fun j hj => p.cutoff_smooth i j hj x hx m) + energy_nonneg := p.energy_nonneg + energy_budget := p.energy_budget + mass_nonneg := fun i x hx xi => (patchMass_isPositive _ _ (hd i x hx)).inner_nonneg_right xi + principal_nonneg := ?_ + principal_le_mass := ?_ + mass_budget := p.mass_budget + principal_budget := p.principal_budget + value_bound := fun i x hx => (hb i x hx 0).1 + first_bound := fun i x hx xi => (hb i x hx xi).2.1 + second_bound := fun i x hx xi => (hb i x hx xi).2.2.1 + linear_bound := fun i x hx xi => (hb i x hx xi).2.2.2 + correction_jets := ?_ } + · intro i x hx xi + exact (patch_principal_isPositive _ _ _ + (fun j hj => p.cutoff_nonneg i j (Finset.mem_filter.mp hj).1 x hx (Finset.mem_filter.mp hj).2) + (hd i x hx)).inner_nonneg_right xi + · intro i x hx xi + exact patchPrincipal_form_le_mass _ _ _ (hd i x hx) + (fun j hj => p.cutoff_le_one i j (Finset.mem_filter.mp hj).1 x hx (Finset.mem_filter.mp hj).2) xi + · intro i x hx m + apply normalized_patchField_jet_le (N := (N : ℝ)) (p.frozen i x) x (p.patches i) (p.cutoff i) + (p.operator i) (p.center i) m (iterationRadius_pos hr0 i) hepsilon hC + (p.energy_nonneg i x hx) (p.energy_le i x hx) hL + (by exact_mod_cast p.active_card i x hx) + (fun j hj ha => p.operator_positive i j hj x hx ha) + · intro j hj ha xi + exact (patch_form_le_mass _ _ (hd i x hx) (Finset.mem_filter.mpr ⟨hj, ha⟩) xi).trans + (p.mass_small i x hx xi) + · exact fun j hj ha => p.center_energy i j hj x hx ha + · exact fun j hj => p.cutoff_smooth i j hj x hx m + · exact fun j hj ha q _ => p.cutoff_jets i j hj x hx ha q + · exact hFjet + · exact hB + +/-- The explicit patch constants supply a canonical field coefficient +and jet base, with no dependence on a coordinate iterate. -/ +def toCanonicalAnalyticIterationData + (p : PatchIterationGeometry (ι := ι) Ω r0 Theta epsilon N C K L) + (hr0 : 0 < r0) (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hC : 0 ≤ C) (hK : 0 ≤ K) (hL : 1 ≤ L) : + AnalyticIterationData Ω r0 Theta (patchAssemblyCoefficient N C K L) + (patchJetBase N (Real.sqrt C) L) epsilon := by + have hb := patchAssemblyCoefficient_bounds N (C := C) hK hL + exact p.toAnalyticIterationData hr0 hepsilon hepsilon1 hC hK hL + hb.1 hb.2.2.1 hb.2.2.2.1 hb.2.2.2.2.1 hb.2.2.2.2.2 hb.2.1 le_rfl + +end PatchIterationGeometry + +/-- Geometric patches and cumulative budgets supply the field estimates and +correction jets for the finite analytic iteration. -/ +theorem exists_patch_metric_iteration [FiniteDimensional ℝ E] + (N : ℕ) {Theta C K L : ℝ} (hTheta : 1 ≤ Theta) + (hC : 0 ≤ C) (hK : 0 ≤ K) (hL : 1 ≤ L) : + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ (Ω : Set E), IsOpen Ω → ∀ (r0 : ℝ), 0 < r0 → + ∀ p : PatchIterationGeometry (ι := ι) Ω r0 Theta epsilon N C K L, + let v := fun i => patchField (p.patches i) (p.cutoff i) (p.operator i) (p.center i) + ∀ k x, x ∈ Ω → + (∀ m : ℕ, ContDiffAt ℝ m (metricIterate v k) x) ∧ + (∀ xi, (4 * Theta)⁻¹ * ‖p.frozen k x xi‖ ^ 2 ≤ ‖fderiv ℝ (metricIterate v k) x xi‖ ^ 2 ∧ + ‖fderiv ℝ (metricIterate v k) x xi‖ ^ 2 ≤ (4 * Theta) * ‖p.frozen k x xi‖ ^ 2) ∧ + (∀ m, 2 ≤ m → + ‖iteratedFDeriv ℝ m (normalizedCoordinates (iterationRadius r0 k) + (p.frozen k x) x (metricIterate v k)) 0‖ ≤ + (patchJetBase N (Real.sqrt C) L) ^ (m - 1) * (m.factorial : ℝ) ^ 3) := by + have hF := (patchAssemblyCoefficient_bounds N (C := C) hK hL).1 + have hB : 1 ≤ patchJetBase (N : ℝ) (Real.sqrt C) L := patchJetBase_ge_one hL + obtain ⟨epsilon, hepsilon, he1, hmain⟩ := exists_analytic_metric_iteration (E := E) hTheta hF hB + refine ⟨epsilon, hepsilon, he1, ?_⟩ + intro Ω hΩ r0 hr0 p + dsimp only + intro k x hx + exact hmain Ω hΩ r0 hr0 (p.toCanonicalAnalyticIterationData hr0 hepsilon.le he1 hC hK hL) k x hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchBudget.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..6433faab6b261c9d3f1a9a20f881d6fa82b79edf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchBudget.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.RCD.Coordinates.PatchAssembly + +namespace OAI + +/-! # A positive budget for finitely bounded scalar coefficients -/ + +namespace RegularPointCoordinates + +/-- A common positive budget controls every coefficient below a fixed +bound, both absolutely and relative to the desired iteration tolerance. -/ +theorem exists_uniform_patch_budget {P epsilon : ℝ} (hP : 0 ≤ P) (hepsilon : 0 < epsilon) : + ∃ b : ℝ, 0 < b ∧ b ≤ epsilon ∧ b ≤ 1 / 8192 ∧ + ∀ t : ℝ, 0 ≤ t → t ≤ P → t * b ≤ min epsilon (1 / 8192) := by + let s := min epsilon (1 / 8192) + have hs : 0 < s := lt_min hepsilon (by norm_num) + let b := s / (P + 1) + have hb : 0 < b := div_pos hs (by positivity) + have hbS : b ≤ s := div_le_self hs.le (by linarith) + refine ⟨b, hb, hbS.trans (min_le_left _ _), hbS.trans (min_le_right _ _), ?_⟩ + intro t _ht htP + calc + t * b ≤ P * b := mul_le_mul_of_nonneg_right htP hb.le + _ ≤ (P + 1) * b := mul_le_mul_of_nonneg_right (by linarith) hb.le + _ = s := by dsimp only [b]; field_simp + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchCenters.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchCenters.lean new file mode 100644 index 0000000000000000000000000000000000000000..c557e407f48c9363fc01784fb4a0fc71fa5c1566 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchCenters.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Coordinates.PositiveForms + +namespace OAI + +/-! +# Fixed centers for directional patch energies + +This is the selection in equation `re:fixed-center`: a positive lower +energy floor permits one fixed point in each patch with energy at most +twice every active point's energy. No continuity or measurability of the +energy function is used. Directional pair bounds then give the actual +fixed-center bound used to construct the correction fields. +-/ + +open Set +open scoped InnerProductSpace + +namespace RegularPointCoordinates + +theorem exists_energy_center {X : Type*} {s : Set X} (hs : s.Nonempty) + {energy : X → ℝ} {floor : ℝ} (hfloor : 0 < floor) + (hlower : ∀ x ∈ s, floor ≤ energy x) : + ∃ z ∈ s, ∀ x ∈ s, energy z ≤ 2 * energy x := by + have hne : (energy '' s).Nonempty := hs.image energy + have hbdd : BddBelow (energy '' s) := by + refine ⟨floor, ?_⟩ + rintro _ ⟨x, hx, rfl⟩ + exact hlower x hx + have hinf : floor ≤ sInf (energy '' s) := by + apply le_csInf hne + rintro _ ⟨x, hx, rfl⟩ + exact hlower x hx + obtain ⟨_, ⟨z, hz, rfl⟩, hnear⟩ := exists_lt_of_csInf_lt hne + (by linarith : sInf (energy '' s) < 2 * sInf (energy '' s)) + refine ⟨z, hz, ?_⟩ + intro x hx + have hxinf := csInf_le hbdd (mem_image_of_mem energy hx) + linarith + +theorem exists_patch_energy_centers {X ι : Type*} (patch : ι → Set X) + (energy : X → ℝ) (hne : ∀ j, (patch j).Nonempty) + (hfloor : ∀ j, ∃ floor : ℝ, 0 < floor ∧ ∀ x ∈ patch j, floor ≤ energy x) : + ∃ center : ι → X, ∀ j, center j ∈ patch j ∧ + ∀ x ∈ patch j, energy (center j) ≤ 2 * energy x := by + classical + have hc (j : ι) : ∃ z ∈ patch j, ∀ x ∈ patch j, energy z ≤ 2 * energy x := by + obtain ⟨floor, hf, hl⟩ := hfloor j + exact exists_energy_center (hne j) hf hl + choose center hmem henergy using hc + exact ⟨center, fun j => ⟨hmem j, henergy j⟩⟩ + +variable {X E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The pairwise directional estimate becomes a bound against the +energy at the testing point alone after the fixed-center selection. -/ +theorem centered_patch_energy_le (u : X → E) (D : E →L[ℝ] E) + {energy : X → ℝ} {C r : ℝ} {x z : X} (hC : 0 ≤ C) + (hz : energy z ≤ 2 * energy x) + (hpair : ⟪u x - u z, D (u x - u z)⟫_ℝ ≤ + C * r ^ 2 * (energy x + energy z)) : + ⟪u x - u z, D (u x - u z)⟫_ℝ ≤ (3 * C) * r ^ 2 * energy x := by + calc + _ ≤ C * r ^ 2 * (energy x + energy z) := hpair + _ ≤ C * r ^ 2 * (energy x + 2 * energy x) := + mul_le_mul_of_nonneg_left (by linarith) (mul_nonneg hC (sq_nonneg r)) + _ = _ := by ring + +/-- Simultaneous construction of the fixed affine centers for a family +of patches. The conclusion is the displacement-energy hypothesis used +by `PatchIterationGeometry`, without adding regularity to the energies. -/ +theorem exists_patch_centers_with_energy_bound + (patch : ι → Set X) (energy : X → ℝ) (u : X → E) + (D : ι → E →L[ℝ] E) {C r : ℝ} (hC : 0 ≤ C) + (hne : ∀ j, (patch j).Nonempty) + (hfloor : ∀ j, ∃ floor : ℝ, 0 < floor ∧ ∀ x ∈ patch j, floor ≤ energy x) + (hpair : ∀ j, ∀ x ∈ patch j, ∀ z ∈ patch j, + ⟪u x - u z, D j (u x - u z)⟫_ℝ ≤ C * r ^ 2 * (energy x + energy z)) : + ∃ center : ι → X, ∀ j, center j ∈ patch j ∧ ∀ x ∈ patch j, + ⟪u x - u (center j), D j (u x - u (center j))⟫_ℝ ≤ + (3 * C) * r ^ 2 * energy x := by + obtain ⟨center, hc⟩ := exists_patch_energy_centers patch energy hne hfloor + refine ⟨center, fun j => ⟨(hc j).1, ?_⟩⟩ + intro x hx + exact centered_patch_energy_le u (D j) hC ((hc j).2 x hx) + (hpair j x hx (center j) (hc j).1) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchCover.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..160d1d36f4328361bf82916210824d927c369e8e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchCover.lean @@ -0,0 +1,202 @@ +import Mathlib.Topology.MetricSpace.CoveringNumbers +import Mathlib.Topology.MetricSpace.Bounded +import Mathlib.MeasureTheory.Measure.Real +import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic +import Mathlib.Algebra.Order.Floor.Semiring +import Mathlib.Tactic + +namespace OAI + +/-! +# Finite patch nets and volume bounds for their active multiplicity + +The net is chosen by maximal cardinality inside a totally bounded domain. +The active cardinality estimate is proved by disjoint half-radius balls; +the distance of active centers from the testing point is kept explicit. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal BigOperators + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] + +/-- Total boundedness makes every positive-radius packing number finite. -/ +theorem packingNumber_ne_top_of_totallyBounded {A : Set X} (hA : TotallyBounded A) + {r : ℝ≥0} (hr : r ≠ 0) : Metric.packingNumber r A ≠ ⊤ := by + obtain ⟨C, _, hC, hcover⟩ := Metric.exists_finite_isCover_of_totallyBounded + (show r / 2 ≠ 0 by positivity) hA + have hp : Metric.packingNumber r A ≤ C.encard := by + calc + _ = Metric.packingNumber (2 * (r / 2)) A := by congr 1; ring + _ ≤ Metric.externalCoveringNumber (r / 2) A := + Metric.packingNumber_two_mul_le_externalCoveringNumber _ _ + _ ≤ _ := hcover.externalCoveringNumber_le_encard + exact ne_top_of_le_ne_top hC.encard_lt_top.ne hp + +/-- The standard maximal separated set is finite even in the fallback case. -/ +theorem finite_maximalSeparatedSet (r : ℝ≥0) (A : Set X) : + (Metric.maximalSeparatedSet r A).Finite := by + by_cases h : Metric.packingNumber r A = ⊤ + · simp [Metric.maximalSeparatedSet, h] + · apply Set.encard_ne_top_iff.mp + rwa [Metric.encard_maximalSeparatedSet h] + +/-- A concrete finite maximal-cardinality net. -/ +def maximalPatchNet (r : ℝ≥0) (A : Set X) : Finset X := + (finite_maximalSeparatedSet r A).toFinset + +@[simp] theorem coe_maximalPatchNet (r : ℝ≥0) (A : Set X) : + (maximalPatchNet r A : Set X) = Metric.maximalSeparatedSet r A := by + simp [maximalPatchNet] + +theorem maximalPatchNet_subset (r : ℝ≥0) (A : Set X) : + (maximalPatchNet r A : Set X) ⊆ A := by + rw [coe_maximalPatchNet] + exact Metric.maximalSeparatedSet_subset + +theorem maximalPatchNet_separated (r : ℝ≥0) (A : Set X) : + (maximalPatchNet r A : Set X).Pairwise (fun x y => (r : ℝ) < dist x y) := by + intro x hx y hy hxy + have hsep := Metric.isSeparated_maximalSeparatedSet (ε := r) (A := A) + rw [← coe_maximalPatchNet] at hsep + have hh := hsep hx hy hxy + have hd : r < nndist x y := by + simpa only [edist_nndist, ENNReal.coe_lt_coe] using hh + exact_mod_cast hd + +theorem maximalPatchNet_covers {r : ℝ≥0} {A : Set X} + (hr : r ≠ 0) (hA : TotallyBounded A) : + ∀ x ∈ A, ∃ y ∈ maximalPatchNet r A, dist x y ≤ r := by + intro x hx + have hc := Metric.isCover_maximalSeparatedSet + (packingNumber_ne_top_of_totallyBounded hA hr) + obtain ⟨y, hy, hd⟩ := hc hx + change edist x y ≤ (r : ℝ≥0∞) at hd + refine ⟨y, ?_, ?_⟩ + · simpa only [← coe_maximalPatchNet, Finset.mem_coe] using hy + · have hd' : nndist x y ≤ r := by + simpa only [edist_nndist, ENNReal.coe_le_coe] using hd + exact_mod_cast hd' + +/-- Maximality is by cardinality, and therefore also rules out adding any +new separated point from the original domain. -/ +theorem maximalPatchNet_card_maximal {r : ℝ≥0} {A : Set X} + (hr : r ≠ 0) (hA : TotallyBounded A) (s : Finset X) + (hsub : (s : Set X) ⊆ A) (hsep : Metric.IsSeparated r (s : Set X)) : + s.card ≤ (maximalPatchNet r A).card := by + have hh := Metric.encard_le_of_isSeparated hsub hsep + (packingNumber_ne_top_of_totallyBounded hA hr) + rw [← coe_maximalPatchNet] at hh + exact_mod_cast hh + +/-- In a proper metric space every bounded domain admits the finite net, +even when the domain is not closed. -/ +theorem maximalPatchNet_covers_bounded [ProperSpace X] {r : ℝ≥0} {A : Set X} + (hr : r ≠ 0) (hA : Bornology.IsBounded A) : + ∀ x ∈ A, ∃ y ∈ maximalPatchNet r A, dist x y ≤ r := + maximalPatchNet_covers hr (hA.isCompact_closure.totallyBounded.subset subset_closure) + +/-- Half-radius balls around separated centers are pairwise disjoint. -/ +theorem separated_half_balls_disjoint (s : Finset X) {r : ℝ} + (hsep : (s : Set X).Pairwise (fun x y => r ≤ dist x y)) : + Set.PairwiseDisjoint (s : Set X) (fun y => Metric.ball y (r / 2)) := by + intro x hx y hy hxy + apply Metric.ball_disjoint_ball + have hh := hsep hx hy hxy + linarith + +section Volume + +variable [MeasurableSpace X] [OpensMeasurableSpace X] + +/-- The disjoint-ball packing estimate, with no volume comparison hidden in +the statement. Finite measure is only required for the containing ball. -/ +theorem separated_card_mul_volume_le (μ : Measure X) (s : Finset X) (x : X) + {r R v : ℝ} + (hsep : (s : Set X).Pairwise (fun y z => r ≤ dist y z)) + (hnear : ∀ y ∈ s, dist y x ≤ R) + (hlower : ∀ y ∈ s, v ≤ μ.real (Metric.ball y (r / 2))) + (hfinite : μ (Metric.ball x (R + r / 2)) ≠ ∞) : + (s.card : ℝ) * v ≤ μ.real (Metric.ball x (R + r / 2)) := by + have hsub (y : X) (hy : y ∈ s) : Metric.ball y (r / 2) ⊆ + Metric.ball x (R + r / 2) := Metric.ball_subset_ball' (by linarith [hnear y hy]) + have hunion : (⋃ y ∈ s, Metric.ball y (r / 2)) ⊆ Metric.ball x (R + r / 2) := by + intro z hz + obtain ⟨y, hy, hz⟩ := Set.mem_iUnion₂.mp hz + exact hsub y hy hz + calc + _ = ∑ y ∈ s, v := by rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ ∑ y ∈ s, μ.real (Metric.ball y (r / 2)) := Finset.sum_le_sum hlower + _ = μ.real (⋃ y ∈ s, Metric.ball y (r / 2)) := + (measureReal_biUnion_finset (separated_half_balls_disjoint s hsep) + (fun _ _ => isOpen_ball.measurableSet) + (fun y hy => measure_ne_top_of_subset (hsub y hy) hfinite)).symm + _ ≤ _ := measureReal_mono hunion hfinite + +/-- Two-sided Euclidean volume bounds yield a radius-independent real +cardinality bound for centers within `C₀ * r` of the testing point. -/ +theorem separated_card_le_of_euclidean_volume (μ : Measure X) (s : Finset X) (x : X) + (n : ℕ) {r C₀ a b : ℝ} (hr : 0 < r) (ha : 0 < a) + (hsep : (s : Set X).Pairwise (fun y z => r ≤ dist y z)) + (hnear : ∀ y ∈ s, dist y x ≤ C₀ * r) + (hlower : ∀ y ∈ s, a * (r / 2) ^ n ≤ μ.real (Metric.ball y (r / 2))) + (hupper : μ.real (Metric.ball x (C₀ * r + r / 2)) ≤ b * (C₀ * r + r / 2) ^ n) + (hfinite : μ (Metric.ball x (C₀ * r + r / 2)) ≠ ∞) : + (s.card : ℝ) ≤ b / a * (2 * C₀ + 1) ^ n := by + have hp := (separated_card_mul_volume_le μ s x hsep hnear hlower hfinite).trans hupper + have hrad : C₀ * r + r / 2 = (2 * C₀ + 1) * (r / 2) := by ring + rw [hrad, mul_pow] at hp + have hpow : 0 < (r / 2) ^ n := pow_pos (by linarith) _ + have hc : (s.card : ℝ) * a ≤ b * (2 * C₀ + 1) ^ n := by + apply (mul_le_mul_iff_left₀ hpow).mp + convert hp using 1 <;> ring + have hd := (le_div_iff₀ ha).mpr hc + convert hd using 1 + ring + +/-- An integer uniform multiplicity constant extracted from the volume +ratio. No cardinal bound is supplied as a premise. -/ +theorem separated_card_le_ceil_of_euclidean_volume (μ : Measure X) (s : Finset X) (x : X) + (n : ℕ) {r C₀ a b : ℝ} (hr : 0 < r) (ha : 0 < a) + (hsep : (s : Set X).Pairwise (fun y z => r ≤ dist y z)) + (hnear : ∀ y ∈ s, dist y x ≤ C₀ * r) + (hlower : ∀ y ∈ s, a * (r / 2) ^ n ≤ μ.real (Metric.ball y (r / 2))) + (hupper : μ.real (Metric.ball x (C₀ * r + r / 2)) ≤ b * (C₀ * r + r / 2) ^ n) + (hfinite : μ (Metric.ball x (C₀ * r + r / 2)) ≠ ∞) : + s.card ≤ ⌈b / a * (2 * C₀ + 1) ^ n⌉₊ := by + have hh := separated_card_le_of_euclidean_volume μ s x n hr ha hsep hnear hlower hupper hfinite + exact_mod_cast hh.trans (Nat.le_ceil _) + +/-- The active subfamily of a net satisfies the same uniform cardinal +bound whenever active centers lie within `C₀ * r` of the point. -/ +theorem active_maximalPatchNet_card_le (μ : Measure X) (A : Set X) + (r : ℝ≥0) (x : X) (active : X → Prop) [DecidablePred active] (n : ℕ) + (hr : 0 < r) {C₀ a b : ℝ} (ha : 0 < a) + (hnear : ∀ y ∈ maximalPatchNet r A, active y → dist y x ≤ C₀ * r) + (hlower : ∀ y ∈ maximalPatchNet r A, active y → + a * ((r : ℝ) / 2) ^ n ≤ μ.real (Metric.ball y (r / 2))) + (hupper : μ.real (Metric.ball x (C₀ * r + r / 2)) ≤ b * (C₀ * r + r / 2) ^ n) + (hfinite : μ (Metric.ball x (C₀ * r + r / 2)) ≠ ∞) : + ((maximalPatchNet r A).filter active).card ≤ ⌈b / a * (2 * C₀ + 1) ^ n⌉₊ := by + apply separated_card_le_ceil_of_euclidean_volume μ _ x n (by exact_mod_cast hr) ha + · intro y hy z hz hne + exact (maximalPatchNet_separated r A (Finset.mem_filter.mp hy).1 + (Finset.mem_filter.mp hz).1 hne).le + · intro y hy + exact hnear y (Finset.mem_filter.mp hy).1 (Finset.mem_filter.mp hy).2 + · intro y hy + exact hlower y (Finset.mem_filter.mp hy).1 (Finset.mem_filter.mp hy).2 + · exact hupper + · exact hfinite + +end Volume + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchCoverData.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchCoverData.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2bae5126e693f0a7fc4c60b4be6ebaf398576ab --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchCoverData.lean @@ -0,0 +1,447 @@ +import OAI.Geometry.RCD.Coordinates.PatchLocalization +import OAI.Geometry.RCD.Coordinates.PatchCenters +import OAI.Geometry.RCD.Metric.VolumeRegime +import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct + +namespace OAI + +/-! +# Localized finite patch data from a uniform volume regime + +The centers form a maximal finite net. Cutoffs are affine pullbacks of a +fixed Euclidean cutoff. The half-error volume regime, coarse separation, +and slow normalization growth bound the overlap. The smooth cutoff has +core radius two and support radius three. +-/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal ContDiff BigOperators InnerProductSpace + +noncomputable section + +attribute [local instance] Classical.propDecidable + +namespace RegularPointCoordinates + +variable {X E F : Type*} [MetricSpace X] + +section Normed + +variable [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The coordinate cutoff centered at a point of the original metric space. -/ +def normalizedPatchCutoff (r : ℝ) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (y : X) (P : E) : ℝ := + psi (r⁻¹ • T y (P - u y)) + +/-- The original-space active domain for one actual normalized cutoff. -/ +def normalizedPatchDomain (A : Set X) (r : ℝ) (u : X → E) + (T : X → E →L[ℝ] F) (psi : F → ℝ) (y : X) : Set X := + {x | x ∈ A ∧ u x ∈ tsupport (normalizedPatchCutoff r u T psi y)} + +omit [MetricSpace X] in +/-- Every chosen net center belongs to its own active patch. -/ +theorem self_mem_normalizedPatchDomain (A : Set X) (r : ℝ) (u : X → E) + (T : X → E →L[ℝ] F) (psi : F → ℝ) {y : X} (hy : y ∈ A) + (hzero : psi 0 = 1) : y ∈ normalizedPatchDomain A r u T psi y := by + refine ⟨hy, ?_⟩ + apply subset_tsupport + simp only [Function.mem_support, normalizedPatchCutoff, sub_self, map_zero, + smul_zero, hzero, ne_eq] + norm_num + +/-- The metric radius forced by the normalized support and coarse separation. -/ +def patchLocalizationFactor (c M L : ℝ) : ℝ := max 1 ((M * L / c) ^ 2) + +theorem patchLocalizationFactor_ge_one (c M L : ℝ) : + 1 ≤ patchLocalizationFactor c M L := le_max_left _ _ + +/-- Undoing the physical scaling in a pointed coordinate approximation +gives the actual frozen displacement estimate. -/ +theorem normalized_pair_norm_estimate (u : X → E) (T : E →L[ℝ] F) + (x y : X) {t R delta : ℝ} (ht : 0 < t) (hR : 0 ≤ R) + (hpoint : IsPointedApproximation y (0 : F) t R delta + (fun z => t⁻¹ • T (u z - u y))) + (hxy : dist x y ≤ R * t) : + |‖T (u x - u y)‖ - dist x y| ≤ delta * t := by + have hh := hpoint.2.1 x y hxy (by simpa using mul_nonneg hR ht.le) + have hscaled : |t⁻¹ * ‖T (u x - u y)‖ - dist x y / t| ≤ delta := by + simpa only [sub_self, map_zero, smul_zero, dist_zero_right, norm_smul, + Real.norm_of_nonneg (inv_nonneg.mpr ht.le)] using hh + have hm := mul_le_mul_of_nonneg_right hscaled ht.le + calc + _ = |(t⁻¹ * ‖T (u x - u y)‖ - dist x y / t) * t| := by + congr 1 + field_simp [ht.ne'] + _ = |t⁻¹ * ‖T (u x - u y)‖ - dist x y / t| * t := by + rw [abs_mul, abs_of_pos ht] + _ ≤ _ := hm + +/-- Approximation at four times the fine radius supplies the core-two +near-pair hypothesis of the finite patch construction. -/ +theorem normalized_near_pair_le (u : X → E) (T : E →L[ℝ] F) + (x y : X) {r : ℝ} (hr : 0 < r) + (hpoint : IsPointedApproximation y (0 : F) (4 * r) (1 / 2) (1 / 4) + (fun z => (4 * r)⁻¹ • T (u z - u y))) + (hxy : dist x y ≤ r) : ‖T (u x - u y)‖ ≤ 2 * r := by + have hh := normalized_pair_norm_estimate u T x y (by positivity) + (by norm_num) hpoint (by linarith) + have hu := (abs_le.mp hh).2 + linarith + +/-- A coarse pointed approximation at the pair scale supplies a fixed +positive separation coefficient, independently of the pair distance. -/ +theorem normalized_coarse_pair_lower (u : X → E) (T : E →L[ℝ] F) + (x y : X) (hxy : x ≠ y) + (hpoint : IsPointedApproximation y (0 : F) (4 * dist x y) (1 / 2) (1 / 8) + (fun z => (4 * dist x y)⁻¹ • T (u z - u y))) : + (1 / 2) * dist x y ≤ ‖T (u x - u y)‖ := by + have hd := dist_pos.mpr hxy + have hh := normalized_pair_norm_estimate u T x y (by positivity) + (by norm_num) hpoint (by linarith) + have hl := (abs_le.mp hh).1 + linarith + +/-- A dimensional overlap bound in the half-error volume regime. -/ +def patchOverlapBound (n : ℕ) (c M L : ℝ) : ℕ := + ⌈3 * (2 * patchLocalizationFactor c M L + 1) ^ n⌉₊ + +/-- Concrete geometric and smoothness properties needed before assigning +positive operators and energy centers to the finite patches. -/ +structure IsLocalizedPatchCover (A : Set X) (r : ℝ≥0) (u : X → E) + (s : Finset X) (phi : X → E → ℝ) (N : ℕ) (C L : ℝ) : Prop where + center_mem : (s : Set X) ⊆ A + separated : (s : Set X).Pairwise (fun y z => (r : ℝ) < dist y z) + cutoff_smooth : ∀ y, ContDiff ℝ ∞ (phi y) + cutoff_nonneg : ∀ y P, 0 ≤ phi y P + cutoff_le_one : ∀ y P, phi y P ≤ 1 + active_localized : ∀ x ∈ A, ∀ y ∈ s, u x ∈ tsupport (phi y) → + dist x y ≤ C * r + active_card : ∀ x ∈ A, (s.filter (fun y => u x ∈ tsupport (phi y))).card ≤ N + weight_one_cover : ∀ x ∈ A, ∃ y ∈ s, + dist x y ≤ r ∧ phi y (u x) = 1 ∧ u x ∈ tsupport (phi y) ∧ + ball x r ⊆ ball y (L * r) + +namespace IsLocalizedPatchCover + +variable {A : Set X} {r : ℝ≥0} {u : X → E} {s : Finset X} + {phi : X → E → ℝ} {N : ℕ} {C L : ℝ} + +/-- The actual cutoff sum is positive throughout the covered domain. -/ +theorem one_le_cutoff_sum (d : IsLocalizedPatchCover A r u s phi N C L) + {x : X} (hx : x ∈ A) : 1 ≤ ∑ y ∈ s, phi y (u x) := by + obtain ⟨y, hy, _, hyone, _, _⟩ := d.weight_one_cover x hx + calc + 1 = phi y (u x) := hyone.symm + _ ≤ _ := Finset.single_le_sum (fun z _ => d.cutoff_nonneg z (u x)) hy + +/-- The same sum is bounded by the geometric overlap constant: inactive +terms vanish, so the total number of net points never enters the bound. -/ +theorem cutoff_sum_le (d : IsLocalizedPatchCover A r u s phi N C L) + {x : X} (hx : x ∈ A) : (∑ y ∈ s, phi y (u x)) ≤ N := by + let active := s.filter (fun y => u x ∈ tsupport (phi y)) + have heq : (∑ y ∈ active, phi y (u x)) = ∑ y ∈ s, phi y (u x) := by + apply Finset.sum_subset (Finset.filter_subset _ _) + intro y hy hnot + apply image_eq_zero_of_notMem_tsupport + intro ha + exact hnot (Finset.mem_filter.mpr ⟨hy, ha⟩) + calc + _ = ∑ y ∈ active, phi y (u x) := heq.symm + _ ≤ ∑ _y ∈ active, (1 : ℝ) := Finset.sum_le_sum (fun y _ => d.cutoff_le_one y _) + _ = (active.card : ℝ) := by simp + _ ≤ N := by exact_mod_cast d.active_card x hx + +/-- Active support, restricted to the actual coordinate image, comes +from points in a uniformly enlarged original metric ball. -/ +theorem support_inter_image_subset (d : IsLocalizedPatchCover A r u s phi N C L) + {y : X} (hy : y ∈ s) : + tsupport (phi y) ∩ u '' A ⊆ u '' (A ∩ closedBall y (C * r)) := by + rintro P ⟨hP, x, hx, rfl⟩ + exact ⟨x, ⟨hx, d.active_localized x hx y hy hP⟩, rfl⟩ + +/-- The overlap bound in the exact coordinate-domain form used by +`PatchIterationGeometry.active_card`. No injectivity is needed here. -/ +theorem active_card_of_mem_image (d : IsLocalizedPatchCover A r u s phi N C L) + {P : E} (hP : P ∈ u '' A) : + (s.filter (fun y => P ∈ tsupport (phi y))).card ≤ N := by + obtain ⟨x, hx, rfl⟩ := hP + exact d.active_card x hx + +end IsLocalizedPatchCover + +end Normed + +section EnergyCenters + +variable [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The actual active domains supply the nonemptiness needed to choose +fixed energy centers. They remain in the original bounded domain and the +localized metric ball, and their affine displacement obeys the required +three-times pair-energy bound at every active point. -/ +theorem exists_normalized_patch_energy_centers + (A : Set X) (r : ℝ≥0) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (s : Finset X) {N : ℕ} {C L D floor : ℝ} + (d : IsLocalizedPatchCover A r u s (normalizedPatchCutoff r u T psi) N C L) + (hzero : psi 0 = 1) (energy : X → ℝ) (hfloor : 0 < floor) + (hlower : ∀ x ∈ A, floor ≤ energy x) + (op : X → E →L[ℝ] E) (hD : 0 ≤ D) + (hpair : ∀ y ∈ s, ∀ x ∈ normalizedPatchDomain A r u T psi y, + ∀ z ∈ normalizedPatchDomain A r u T psi y, + ⟪u x - u z, op y (u x - u z)⟫_ℝ ≤ + D * (r : ℝ) ^ 2 * (energy x + energy z)) : + ∃ center : X → X, ∀ y ∈ s, + center y ∈ A ∧ u (center y) ∈ tsupport (normalizedPatchCutoff r u T psi y) ∧ + dist (center y) y ≤ C * r ∧ + ∀ x ∈ normalizedPatchDomain A r u T psi y, + ⟪u x - u (center y), op y (u x - u (center y))⟫_ℝ ≤ + (3 * D) * (r : ℝ) ^ 2 * energy x := by + have hc (y : X) : ∃ z : X, y ∈ s → + z ∈ normalizedPatchDomain A r u T psi y ∧ + ∀ x ∈ normalizedPatchDomain A r u T psi y, energy z ≤ 2 * energy x := by + by_cases hy : y ∈ s + · obtain ⟨z, hz, hb⟩ := exists_energy_center + ⟨y, self_mem_normalizedPatchDomain A r u T psi (d.center_mem hy) hzero⟩ + hfloor (fun x hx => hlower x hx.1) + exact ⟨z, fun _ => ⟨hz, hb⟩⟩ + · exact ⟨y, fun hy' => False.elim (hy hy')⟩ + choose center hcenter using hc + refine ⟨center, ?_⟩ + intro y hy + obtain ⟨hz, henergy⟩ := hcenter y hy + refine ⟨hz.1, hz.2, d.active_localized _ hz.1 y hy hz.2, ?_⟩ + intro x hx + exact centered_patch_energy_le u (op y) hD (henergy x hx) (hpair y hy x hx _ hz) + +end EnergyCenters + +/-- The half-error relative-volume estimate gives the two bounds used by +the packing argument, with their common Euclidean volume factor explicit. -/ +theorem half_volume_bounds {V omega r : ℝ} {n : ℕ} + (homega : 0 < omega) (hr : 0 < r) + (hvolume : |V / (omega * r ^ n) - 1| ≤ 1 / 2) : + (omega / 2) * r ^ n ≤ V ∧ V ≤ (3 * omega / 2) * r ^ n := by + have hden : 0 < omega * r ^ n := mul_pos homega (pow_pos hr _) + have hv := abs_le.mp hvolume + have hl : (1 / 2 : ℝ) ≤ V / (omega * r ^ n) := by linarith [hv.1] + have hu : V / (omega * r ^ n) ≤ (3 / 2 : ℝ) := by linarith [hv.2] + have hl' := (le_div_iff₀ hden).mp hl + have hu' := (div_le_iff₀ hden).mp hu + constructor <;> nlinarith + +section Volume + +variable [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [MeasurableSpace X] [OpensMeasurableSpace X] + +/-- The actual maximal net and affine cutoff satisfy localization, +weight-one covering and a scale-independent overlap bound. The measure +premise is only the uniform half-error ball-volume estimate. -/ +theorem maximal_normalized_patch_cover + (μ : Measure X) (A : Set X) (hA : TotallyBounded A) + (r : ℝ≥0) (hr : 0 < r) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (n : ℕ) {R omega c M L : ℝ} + (homega : 0 < omega) (hc : 0 < c) (hL : 2 ≤ L) + (hscale : (patchLocalizationFactor c M L + 1) * r ≤ R) + (hvolume : ∀ x ∈ A, ∀ t : ℝ, 0 < t → t ≤ R → + |μ.real (ball x t) / (omega * t ^ n) - 1| ≤ 1 / 2) + (hfinite : ∀ x t, μ (ball x t) ≠ (⊤ : ℝ≥0∞)) + (hsmooth : ContDiff ℝ ∞ psi) + (hzero : ∀ z, 0 ≤ psi z) (hone : ∀ z, psi z ≤ 1) + (hcore : ∀ z, ‖z‖ ≤ 2 → psi z = 1) + (hsupport : tsupport psi ⊆ closedBall 0 L) + (hnear : ∀ x ∈ A, ∀ y ∈ A, dist x y ≤ r → + ‖T y (u x - u y)‖ ≤ 2 * r) + (hseparate : ∀ x ∈ A, ∀ y ∈ A, (r : ℝ) < dist x y → + ∃ S : E →L[ℝ] F, c * dist x y ≤ ‖S (u x - u y)‖ ∧ + ‖S (u x - u y)‖ ^ 2 ≤ M ^ 2 * (dist x y / r) * ‖T y (u x - u y)‖ ^ 2) : + IsLocalizedPatchCover A r u (maximalPatchNet r A) + (normalizedPatchCutoff r u T psi) (patchOverlapBound n c M L) + (patchLocalizationFactor c M L) L := by + have hr' : 0 < (r : ℝ) := by exact_mod_cast hr + have hL0 : 0 ≤ L := by linarith + have hfac : 1 ≤ patchLocalizationFactor c M L := patchLocalizationFactor_ge_one _ _ _ + have hrR : (r : ℝ) / 2 ≤ R := by nlinarith + have houter : 0 < patchLocalizationFactor c M L * r + r / 2 := by nlinarith + have houterR : patchLocalizationFactor c M L * r + r / 2 ≤ R := by nlinarith + have hloc (x : X) (hx : x ∈ A) (y : X) (hy : y ∈ maximalPatchNet r A) + (ha : u x ∈ tsupport (normalizedPatchCutoff r u T psi y)) : + dist x y ≤ patchLocalizationFactor c M L * r := by + by_cases hd : dist x y ≤ r + · nlinarith + have hd' : (r : ℝ) < dist x y := lt_of_not_ge hd + obtain ⟨S, hs, hg⟩ := hseparate x hx y (maximalPatchNet_subset r A hy) hd' + exact active_cutoff_distance_le u (T y) S psi x y hr' hc hL0 hsupport ha + (fun _ => hs) (fun _ => hg) + refine { + center_mem := maximalPatchNet_subset r A + separated := maximalPatchNet_separated r A + cutoff_smooth := ?_ + cutoff_nonneg := fun y P => hzero _ + cutoff_le_one := fun y P => hone _ + active_localized := hloc + active_card := ?_ + weight_one_cover := ?_ } + · intro y + exact hsmooth.comp (((T y).contDiff.comp (contDiff_id.sub contDiff_const)).const_smul _) + · intro x hx + have hcount := active_maximalPatchNet_card_le μ A r x + (fun y => u x ∈ tsupport (normalizedPatchCutoff r u T psi y)) n hr + (show 0 < omega / 2 by positivity) + (fun y hy ha => by simpa only [dist_comm] using hloc x hx y hy ha) + (fun y hy _ => (half_volume_bounds homega (by positivity) + (hvolume y (maximalPatchNet_subset r A hy) _ (by positivity) hrR)).1) + (half_volume_bounds homega houter (hvolume x hx _ houter houterR)).2 + (hfinite x _) + have hratio : (3 * omega / 2) / (omega / 2) = 3 := by field_simp [homega.ne'] + simpa only [hratio, patchOverlapBound] using hcount + · intro x hx + exact exists_weight_one_covering_patch A hA r hr u T psi hcore + (fun x hx y hy hd => hnear x hx y (maximalPatchNet_subset r A hy) hd) x hx hL + +/-- Properness is only used to turn a bounded, possibly nonclosed domain +into the totally bounded set required for the actual finite net. -/ +theorem bounded_maximal_normalized_patch_cover [ProperSpace X] + (μ : Measure X) (A : Set X) (hA : Bornology.IsBounded A) + (r : ℝ≥0) (hr : 0 < r) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (n : ℕ) {R omega c M L : ℝ} + (homega : 0 < omega) (hc : 0 < c) (hL : 2 ≤ L) + (hscale : (patchLocalizationFactor c M L + 1) * r ≤ R) + (hvolume : ∀ x ∈ A, ∀ t : ℝ, 0 < t → t ≤ R → + |μ.real (ball x t) / (omega * t ^ n) - 1| ≤ 1 / 2) + (hfinite : ∀ x t, μ (ball x t) ≠ (⊤ : ℝ≥0∞)) + (hsmooth : ContDiff ℝ ∞ psi) + (hzero : ∀ z, 0 ≤ psi z) (hone : ∀ z, psi z ≤ 1) + (hcore : ∀ z, ‖z‖ ≤ 2 → psi z = 1) + (hsupport : tsupport psi ⊆ closedBall 0 L) + (hnear : ∀ x ∈ A, ∀ y ∈ A, dist x y ≤ r → ‖T y (u x - u y)‖ ≤ 2 * r) + (hseparate : ∀ x ∈ A, ∀ y ∈ A, (r : ℝ) < dist x y → + ∃ S : E →L[ℝ] F, c * dist x y ≤ ‖S (u x - u y)‖ ∧ + ‖S (u x - u y)‖ ^ 2 ≤ M ^ 2 * (dist x y / r) * ‖T y (u x - u y)‖ ^ 2) : + IsLocalizedPatchCover A r u (maximalPatchNet r A) + (normalizedPatchCutoff r u T psi) (patchOverlapBound n c M L) + (patchLocalizationFactor c M L) L := + maximal_normalized_patch_cover μ A (hA.isCompact_closure.totallyBounded.subset subset_closure) + r hr u T psi n homega hc hL hscale hvolume hfinite hsmooth hzero hone hcore hsupport hnear hseparate + +/-- The coordinate premises can be stated as actual pointed +approximations and slow norm growth. Their separation and near-pair +consequences are derived before constructing the localized patch cover. -/ +theorem normalized_patch_cover_of_pointed_approximations [ProperSpace X] + (μ : Measure X) (A : Set X) (hA : Bornology.IsBounded A) + (r : ℝ≥0) (hr : 0 < r) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (n : ℕ) {R omega M L exponent : ℝ} + (homega : 0 < omega) (hM : 0 ≤ M) (hL : 2 ≤ L) (hexponent : exponent ≤ 1 / 2) + (hscale : (patchLocalizationFactor (1 / 2) M L + 1) * r ≤ R) + (hvolume : ∀ x ∈ A, ∀ t : ℝ, 0 < t → t ≤ R → + |μ.real (ball x t) / (omega * t ^ n) - 1| ≤ 1 / 2) + (hfinite : ∀ x t, μ (ball x t) ≠ (⊤ : ℝ≥0∞)) + (hsmooth : ContDiff ℝ ∞ psi) + (hzero : ∀ z, 0 ≤ psi z) (hone : ∀ z, psi z ≤ 1) + (hcore : ∀ z, ‖z‖ ≤ 2 → psi z = 1) + (hsupport : tsupport psi ⊆ closedBall 0 L) + (hpoint : ∀ y ∈ A, IsPointedApproximation y (0 : F) (4 * r) (1 / 2) (1 / 4) + (fun z => (4 * r)⁻¹ • T y (u z - u y))) + (hcoarse : ∀ x ∈ A, ∀ y ∈ A, (r : ℝ) < dist x y → + ∃ S : E →L[ℝ] F, + IsPointedApproximation y (0 : F) (4 * dist x y) (1 / 2) (1 / 8) + (fun z => (4 * dist x y)⁻¹ • S (u z - u y)) ∧ + ‖S (u x - u y)‖ ≤ + M * (dist x y / r) ^ exponent * ‖T y (u x - u y)‖) : + IsLocalizedPatchCover A r u (maximalPatchNet r A) + (normalizedPatchCutoff r u T psi) (patchOverlapBound n (1 / 2) M L) + (patchLocalizationFactor (1 / 2) M L) L := by + have hr' : 0 < (r : ℝ) := by exact_mod_cast hr + apply bounded_maximal_normalized_patch_cover μ A hA r hr u T psi n homega + (by norm_num) hL hscale hvolume hfinite hsmooth hzero hone hcore hsupport + · intro x _ y hy hxy + exact normalized_near_pair_le u (T y) x y hr' (hpoint y hy) hxy + · intro x hx y hy hfar + obtain ⟨S, hS, hslow⟩ := hcoarse x hx y hy hfar + exact ⟨S, normalized_coarse_pair_lower u S x y (dist_pos.mp (hr'.trans hfar)) hS, + squared_growth_of_slow_norm_growth (T y) S (u x - u y) hr' hfar.le hM hexponent hslow⟩ + +end Volume + +section SmoothCutoff + +variable [NormedAddCommGroup F] [InnerProductSpace ℝ F] + +/-- An actual smooth core-two, support-three cutoff on the coordinate space. -/ +def patchCoreBump : ContDiffBump (0 : F) := ⟨2, 3, by norm_num, by norm_num⟩ + +theorem patchCoreBump_properties : + ContDiff ℝ ∞ (patchCoreBump (F := F)) ∧ + (∀ z, 0 ≤ patchCoreBump (F := F) z) ∧ + (∀ z, patchCoreBump (F := F) z ≤ 1) ∧ + (∀ z, ‖z‖ ≤ 2 → patchCoreBump (F := F) z = 1) ∧ + tsupport (patchCoreBump (F := F)) ⊆ closedBall 0 3 := by + refine ⟨ContDiffBump.contDiff _, fun _ => ContDiffBump.nonneg _, + fun _ => ContDiffBump.le_one _, ?_, ?_⟩ + · intro z hz + exact ContDiffBump.one_of_mem_closedBall _ (by simpa [patchCoreBump] using hz) + · rw [ContDiffBump.tsupport_eq] + exact Subset.rfl + +end SmoothCutoff + +section RegularVolume + +variable [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [InnerProductSpace ℝ F] + [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published volume convergence, Bishop--Gromov and density inputs +give one working neighborhood and one uniform overlap constant for every +smaller-scale normalized patch family. The remaining premises concern only +the coordinate normalizations: near-pair control and coarse separation +with slow growth. No patch conclusion is assumed. -/ +theorem exists_regular_patch_cover_radius + (μ : Measure X) (m : ℕ) {p : X} {a omega rho c M : ℝ} + (ha : 0 ≤ a) (homega : 0 < omega) (hrho : 0 < rho) (hc : 0 < c) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (hvolume : EuclideanRescalingVolumeConvergence μ (m + 1) p omega) + (hcomparison : BallVolumeComparison μ (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper μ (comparisonModelVolume m a) y omega) + (hfinite : ∀ y t, μ (ball y t) ≠ (⊤ : ℝ≥0∞)) : + ∃ R : ℝ, 0 < R ∧ R ≤ rho ∧ + ∀ (r : ℝ≥0), 0 < r → (patchLocalizationFactor c M 3 + 1) * r ≤ R → + ∀ (u : X → E) (T : X → E →L[ℝ] F), + (∀ x ∈ ball p R, ∀ y ∈ ball p R, dist x y ≤ r → + ‖T y (u x - u y)‖ ≤ 2 * r) → + (∀ x ∈ ball p R, ∀ y ∈ ball p R, (r : ℝ) < dist x y → + ∃ S : E →L[ℝ] F, c * dist x y ≤ ‖S (u x - u y)‖ ∧ + ‖S (u x - u y)‖ ^ 2 ≤ M ^ 2 * (dist x y / r) * ‖T y (u x - u y)‖ ^ 2) → + IsLocalizedPatchCover (ball p R) r u (maximalPatchNet r (ball p R)) + (normalizedPatchCutoff r u T (patchCoreBump (F := F))) + (patchOverlapBound (m + 1) c M 3) (patchLocalizationFactor c M 3) 3 := by + obtain ⟨R, hR, hRrho, hvol⟩ := exists_uniform_volume_neighborhood m ha homega + (epsilon := 1 / 2) (by norm_num) (by norm_num) hrho + hcompact hregular hvolume hcomparison hdensity hfinite + refine ⟨R, hR, hRrho, ?_⟩ + intro r hr hscale u T hnear hsep + have hp := patchCoreBump_properties (F := F) + apply bounded_maximal_normalized_patch_cover μ (ball p R) isBounded_ball + r hr u T (patchCoreBump (F := F)) (m + 1) homega hc (by norm_num) hscale + · intro x hx t ht htR + exact hvol x (by simpa only [dist_comm] using (mem_ball.mp hx).le) t ht htR + · exact hfinite + · exact hp.1 + · exact hp.2.1 + · exact hp.2.2.1 + · exact hp.2.2.2.1 + · exact hp.2.2.2.2 + · exact hnear + · exact hsep + +end RegularVolume + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchDirectionalBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchDirectionalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fec39c614adfcc747408ba1b102a2dc5eebb18f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchDirectionalBounds.lean @@ -0,0 +1,207 @@ +import OAI.Geometry.RCD.Coordinates.FrozenNorms +import OAI.Geometry.RCD.Coordinates.FieldEstimates + +namespace OAI + +/-! +# Directional estimates for finite patch fields + +The finite set is the set of active patches at the point under consideration. +All metric norms are frozen using a continuous linear equivalence `T`. +The hypotheses are the individual displacement energies, cutoff derivative +bounds, overlap bound, and positive mass bounds; no field estimate is assumed. +-/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The unweighted mass of the active patches. -/ +def patchMass (s : Finset ι) (D : ι → E →L[ℝ] E) : E →L[ℝ] E := + ∑ j ∈ s, D j + +/-- The principal part of the derivative of the patch field. -/ +def patchPrincipal (s : Finset ι) (phi : ι → ℝ) (D : ι → E →L[ℝ] E) : + E →L[ℝ] E := ∑ j ∈ s, phi j • D j + +/-- The error produced by differentiating the cutoff functions. -/ +def patchCutoffError (s : Finset ι) (D : ι → E →L[ℝ] E) + (w : ι → E) (a : ι → ℝ) : E := ∑ j ∈ s, a j • D j (w j) + +theorem patchMass_isPositive (s : Finset ι) (D : ι → E →L[ℝ] E) + (hD : ∀ j ∈ s, (D j).IsPositive) : (patchMass s D).IsPositive := by + exact ContinuousLinearMap.isPositive_sum s hD + +theorem inner_patchMass (s : Finset ι) (D : ι → E →L[ℝ] E) (x : E) : + ⟪x, patchMass s D x⟫_ℝ = ∑ j ∈ s, ⟪x, D j x⟫_ℝ := by + simp [patchMass, inner_sum] + +/-- Each positive patch is bounded above by the total positive mass. -/ +theorem patch_form_le_mass (s : Finset ι) (D : ι → E →L[ℝ] E) + (hD : ∀ j ∈ s, (D j).IsPositive) {j : ι} (hj : j ∈ s) (x : E) : + ⟪x, D j x⟫_ℝ ≤ ⟪x, patchMass s D x⟫_ℝ := by + rw [inner_patchMass] + exact Finset.single_le_sum (fun k hk => (hD k hk).inner_nonneg_right x) hj + +/-- Nonnegative cutoffs bounded by one give `0 ≤ S ≤ Z`. -/ +theorem patchPrincipal_form_le_mass (s : Finset ι) (phi : ι → ℝ) + (D : ι → E →L[ℝ] E) (hD : ∀ j ∈ s, (D j).IsPositive) + (hphi : ∀ j ∈ s, phi j ≤ 1) (x : E) : + ⟪x, patchPrincipal s phi D x⟫_ℝ ≤ ⟪x, patchMass s D x⟫_ℝ := by + simp only [patchPrincipal, patchMass, sum_apply, smul_apply, inner_sum, + inner_smul_right] + apply Finset.sum_le_sum + intro j hj + exact mul_le_of_le_one_left ((hD j hj).inner_nonneg_right x) (hphi j hj) + +variable [CompleteSpace E] + +/-- The cumulative smallness `Z ≤ epsilon H` gives the sharp principal bound. +Individual smallness of each patch alone is not used as a substitute for this +cumulative hypothesis. -/ +theorem patchPrincipal_frozen_norm_le (T : E ≃L[ℝ] E) (s : Finset ι) + (phi : ι → ℝ) (D : ι → E →L[ℝ] E) {epsilon : ℝ} + (hepsilon : 0 ≤ epsilon) (hD : ∀ j ∈ s, (D j).IsPositive) + (hphi0 : ∀ j ∈ s, 0 ≤ phi j) (hphi1 : ∀ j ∈ s, phi j ≤ 1) + (hZ : ∀ x, ⟪x, patchMass s D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) (xi : E) : + ‖(T.symm : E →L[ℝ] E).adjoint (patchPrincipal s phi D xi)‖ ≤ + Real.sqrt epsilon * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ := by + have hS := patch_principal_isPositive s phi D hphi0 hD + have hle := patchPrincipal_form_le_mass s phi D hD hphi1 + have h := frozen_positive_form_norm_le T hS hepsilon (fun x => (hle x).trans (hZ x)) xi + exact h.trans (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt (hle xi)) + (Real.sqrt_nonneg _)) + +/-- A weighted finite patch sum in the dual metric. -/ +theorem frozen_patch_weighted_value_le (T : E ≃L[ℝ] E) (s : Finset ι) + (D : ι → E →L[ℝ] E) (w : ι → E) (a : ι → ℝ) {N : ℕ} + {epsilon C r energy A : ℝ} (hN : s.card ≤ N) + (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) (hr : 0 ≤ r) + (henergy : 0 ≤ energy) (hA : 0 ≤ A) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hsmall : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (hw : ∀ j ∈ s, ⟪w j, D j (w j)⟫_ℝ ≤ C * r ^ 2 * energy) + (ha : ∀ j ∈ s, |a j| ≤ A) : + ‖(T.symm : E →L[ℝ] E).adjoint (patchCutoffError s D w a)‖ ≤ + (N : ℝ) * A * (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy) := by + rw [patchCutoffError, map_sum] + refine (norm_sum_le _ _).trans ?_ + calc + ∑ j ∈ s, ‖(T.symm : E →L[ℝ] E).adjoint (a j • D j (w j))‖ + ≤ ∑ _j ∈ s, A * (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy) := by + apply Finset.sum_le_sum + intro j hj + rw [map_smul, norm_smul, Real.norm_eq_abs] + exact mul_le_mul (ha j hj) + (frozen_positive_form_value_le T (hD j hj) hepsilon hC hr henergy + (hsmall j hj) (w j) (hw j hj)) (norm_nonneg _) hA + _ = (s.card : ℝ) * (A * (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy)) := by + simp + _ ≤ (N : ℝ) * (A * (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy)) := by + exact mul_le_mul_of_nonneg_right (by exact_mod_cast hN) (by positivity) + _ = _ := by ring + +/-- The normalized value estimate `re:field-value`. -/ +theorem patchField_frozen_value_le (T : E ≃L[ℝ] E) (s : Finset ι) + (phi : ι → E → ℝ) (D : ι → E →L[ℝ] E) (c : ι → E) (P : E) {N : ℕ} + {epsilon C r energy : ℝ} (hN : s.card ≤ N) + (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) (hr : 0 < r) (henergy : 0 ≤ energy) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hsmall : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (hw : ∀ j ∈ s, ⟪P - c j, D j (P - c j)⟫_ℝ ≤ C * r ^ 2 * energy) + (hphi : ∀ j ∈ s, |phi j P| ≤ 1) : + ‖(T.symm : E →L[ℝ] E).adjoint (patchField s phi D c P)‖ / r ≤ + (N : ℝ) * Real.sqrt C * Real.sqrt epsilon * Real.sqrt energy := by + apply (div_le_iff₀ hr).2 + have h := frozen_patch_weighted_value_le T s D (fun j => P - c j) + (fun j => phi j P) hN hepsilon hC hr.le henergy zero_le_one hD hsmall hw hphi + change ‖(T.symm : E →L[ℝ] E).adjoint (patchField s phi D c P)‖ ≤ _ at h + convert h using 1 + ring + +/-- The dual norm estimate for the linear cutoff error. -/ +theorem patchCutoffError_frozen_norm_le (T : E ≃L[ℝ] E) (s : Finset ι) + (D : ι → E →L[ℝ] E) (w : ι → E) (a : ι → ℝ) (xi : E) {N : ℕ} + {epsilon C K r energy : ℝ} (hN : s.card ≤ N) + (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) (hK : 0 ≤ K) + (hr : 0 < r) (henergy : 0 ≤ energy) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hsmall : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (hw : ∀ j ∈ s, ⟪w j, D j (w j)⟫_ℝ ≤ C * r ^ 2 * energy) + (ha : ∀ j ∈ s, |a j| ≤ K / r * ‖T xi‖) : + ‖(T.symm : E →L[ℝ] E).adjoint (patchCutoffError s D w a)‖ ≤ + (N : ℝ) * K * Real.sqrt C * Real.sqrt epsilon * Real.sqrt energy * ‖T xi‖ := by + have h := frozen_patch_weighted_value_le T s D w a hN hepsilon hC hr.le henergy + (A := K / r * ‖T xi‖) (by positivity) hD hsmall hw ha + convert h using 1 + field_simp [ne_of_gt hr] + +omit [CompleteSpace E] in +/-- Bounded overlap controls the total displacement energy. -/ +theorem sqrt_patch_energy_sum_le (s : Finset ι) (D : ι → E →L[ℝ] E) + (w : ι → E) {N : ℕ} {C r energy : ℝ} (hN : s.card ≤ N) + (hC : 0 ≤ C) (hr : 0 ≤ r) (henergy : 0 ≤ energy) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hw : ∀ j ∈ s, ⟪w j, D j (w j)⟫_ℝ ≤ C * r ^ 2 * energy) : + Real.sqrt (∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ) ≤ + Real.sqrt ((N : ℝ) * C) * r * Real.sqrt energy := by + have hsum0 : 0 ≤ ∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ := + Finset.sum_nonneg (fun j hj => (hD j hj).inner_nonneg_right _) + have hsum : (∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ) ≤ (N : ℝ) * C * r ^ 2 * energy := by + calc + _ ≤ ∑ _j ∈ s, C * r ^ 2 * energy := Finset.sum_le_sum hw + _ = (s.card : ℝ) * (C * r ^ 2 * energy) := by simp + _ ≤ (N : ℝ) * (C * r ^ 2 * energy) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hN) (by positivity) + _ = _ := by ring + have hroot : (Real.sqrt ((N : ℝ) * C) * r * Real.sqrt energy) ^ 2 = + (N : ℝ) * C * r ^ 2 * energy := by + rw [mul_pow, mul_pow, Real.sq_sqrt (by positivity), Real.sq_sqrt henergy] + have hnonneg : 0 ≤ Real.sqrt ((N : ℝ) * C) * r * Real.sqrt energy := by positivity + nlinarith [Real.sq_sqrt hsum0, Real.sqrt_nonneg + (∑ j ∈ s, ⟪w j, D j (w j)⟫_ℝ)] + +omit [CompleteSpace E] in +/-- The sharp diagonal estimate retains the directional mass `Z[xi]`. +It does not replace this mass by a bound in terms of the whole source metric. -/ +theorem patchCutoffError_diagonal_le (T : E ≃L[ℝ] E) (s : Finset ι) + (D : ι → E →L[ℝ] E) (w : ι → E) (a : ι → ℝ) (xi : E) {N : ℕ} + {C K r energy : ℝ} (hN : s.card ≤ N) (hC : 0 ≤ C) (hK : 0 ≤ K) + (hr : 0 < r) (henergy : 0 ≤ energy) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hw : ∀ j ∈ s, ⟪w j, D j (w j)⟫_ℝ ≤ C * r ^ 2 * energy) + (ha : ∀ j ∈ s, |a j| ≤ K / r * ‖T xi‖) : + |⟪xi, patchCutoffError s D w a⟫_ℝ| ≤ + K * Real.sqrt ((N : ℝ) * C) * + Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ * Real.sqrt energy * ‖T xi‖ := by + have h := patch_error_inner_le s D w a xi (K := K / r * ‖T xi‖) + (by positivity) hD ha + rw [← inner_patchMass] at h + have henergySum := sqrt_patch_energy_sum_le s D w hN hC hr.le henergy hD hw + have h' := h.trans (mul_le_mul_of_nonneg_left henergySum + (show 0 ≤ K / r * ‖T xi‖ * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ by positivity)) + change |⟪xi, patchCutoffError s D w a⟫_ℝ| ≤ _ at h' + convert h' using 1 + field_simp [ne_of_gt hr] + +omit [CompleteSpace E] in +/-- The bounds above apply to the actual derivative, with the exact principal +and cutoff-error decomposition supplied by differentiation. -/ +theorem fderiv_patchField_apply (s : Finset ι) (phi : ι → E → ℝ) + (dphi : ι → E →L[ℝ] ℝ) (D : ι → E →L[ℝ] E) (c : ι → E) (P xi : E) + (hphi : ∀ j ∈ s, HasFDerivAt (phi j) (dphi j) P) : + fderiv ℝ (patchField s phi D c) P xi = + patchPrincipal s (fun j => phi j P) D xi + + patchCutoffError s D (fun j => P - c j) (fun j => dphi j xi) := by + rw [(hasFDerivAt_patchField s phi dphi D c P hphi).fderiv] + simp [patchPrincipal, patchCutoffError, Finset.sum_add_distrib] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchGeometryMonotone.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchGeometryMonotone.lean new file mode 100644 index 0000000000000000000000000000000000000000..27e6b4a9ef21601a8e1b1a37c1723f24a3303818 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchGeometryMonotone.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.RCD.Coordinates.PatchAssembly + +namespace OAI + +/-! # Enlarging the permissible error of unchanged patch data -/ + +open Set +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Only the allowed mass and energy budget changes; all constructed +patches, operators and frozen frames are retained exactly. -/ +def PatchIterationGeometry.monoError {Ω : Set E} {r0 Theta epsilon delta : ℝ} + {N : ℕ} {C K L : ℝ} (g : PatchIterationGeometry (ι := ι) Ω r0 Theta epsilon N C K L) + (h : epsilon ≤ delta) : PatchIterationGeometry (ι := ι) Ω r0 Theta delta N C K L := + { g with + energy_budget := fun k x hx => (g.energy_budget k x hx).trans h + mass_small := fun i x hx xi => (g.mass_small i x hx xi).trans + (mul_le_mul_of_nonneg_right h (sq_nonneg ‖g.frozen i x xi‖)) } + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchJetBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..01c157285a6c786403d440b1fa3e0c3c37c52c6b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchJetBounds.lean @@ -0,0 +1,347 @@ +import OAI.Geometry.RCD.Coordinates.FieldEstimates +import OAI.Geometry.RCD.Coordinates.NormalizedJetStep + +namespace OAI + +/-! +# Higher jets of finite cutoff-affine patch fields + +Only two terms survive in a higher product derivative: all derivatives +on the cutoff, or one on the affine factor. Iterated Fréchet derivative +bounds follow from the cutoff jets. +-/ + +open Finset Filter +open scoped BigOperators ContDiff Topology + +noncomputable section + +attribute [local instance] Classical.propDecidable + +namespace RegularPointCoordinates + +section SinglePatch + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] +variable [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The derivative of an affine patch is the fixed patch operator. -/ +theorem fderiv_affine_patch (D : E →L[ℝ] F) (c : E) : + fderiv ℝ (fun y => D (y - c)) = fun _ => D := by + funext x + exact ((D.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const c))).fderiv + +/-- All derivatives of an affine patch above order one vanish. -/ +theorem norm_iteratedFDeriv_affine_patch (D : E →L[ℝ] F) (c x : E) (m : ℕ) : + ‖iteratedFDeriv ℝ m (fun y => D (y - c)) x‖ = + if m = 0 then ‖D (x - c)‖ else if m = 1 then ‖D‖ else 0 := by + cases m with + | zero => simp [norm_iteratedFDeriv_zero] + | succ m => + rw [← norm_iteratedFDeriv_fderiv, fderiv_affine_patch] + cases m with + | zero => simp [norm_iteratedFDeriv_zero] + | succ m => simp [iteratedFDeriv_succ_const] + +/-- Point-local version of the higher scalar-product bound. -/ +theorem norm_iteratedFDeriv_smul_le_at + {f : E → ℝ} {g : E → F} {x : E} {m : ℕ} + (hf : ContDiffAt ℝ m f x) (hg : ContDiffAt ℝ m g x) : + ‖iteratedFDeriv ℝ m (fun y => f y • g y) x‖ ≤ + ∑ i ∈ Finset.range (m + 1), (m.choose i : ℝ) * + ‖iteratedFDeriv ℝ i f x‖ * ‖iteratedFDeriv ℝ (m - i) g x‖ := by + obtain ⟨u, hu, hfu⟩ := hf.contDiffOn le_rfl (by simp) + obtain ⟨v, hv, hgv⟩ := hg.contDiffOn le_rfl (by simp) + obtain ⟨s, hsu, hs, hx⟩ := mem_nhds_iff.mp (inter_mem hu hv) + have h := norm_iteratedFDerivWithin_smul_le + (hfu.mono (fun y hy => (hsu hy).1)) (hgv.mono (fun y hy => (hsu hy).2)) + hs.uniqueDiffOn hx le_rfl + have heqf (q : ℕ) : iteratedFDerivWithin ℝ q f s x = iteratedFDeriv ℝ q f x := + iteratedFDerivWithin_of_isOpen q hs hx + have heqg (q : ℕ) : iteratedFDerivWithin ℝ q g s x = iteratedFDeriv ℝ q g x := + iteratedFDerivWithin_of_isOpen q hs hx + have heqfg : iteratedFDerivWithin ℝ m (fun y => f y • g y) s x = + iteratedFDeriv ℝ m (fun y => f y • g y) x := iteratedFDerivWithin_of_isOpen m hs hx + simpa only [heqf, heqg, heqfg] using h + +/-- The two surviving terms in a higher cutoff-affine derivative. -/ +theorem norm_iteratedFDeriv_cutoff_affine_le + (D : E →L[ℝ] F) (c x : E) {phi : E → ℝ} {m : ℕ} + (hphi : ContDiffAt ℝ (m + 1) phi x) : + ‖iteratedFDeriv ℝ (m + 1) (fun y => phi y • D (y - c)) x‖ ≤ + ‖iteratedFDeriv ℝ (m + 1) phi x‖ * ‖D (x - c)‖ + + (m + 1 : ℝ) * ‖iteratedFDeriv ℝ m phi x‖ * ‖D‖ := by + have ha : ContDiffAt ℝ (m + 1) (fun y => D (y - c)) x := + D.contDiff.contDiffAt.comp x (contDiffAt_id.sub contDiffAt_const) + have hp := norm_iteratedFDeriv_smul_le_at hphi ha + have hz : (∑ i ∈ Finset.range m, ((m + 1).choose i : ℝ) * + ‖iteratedFDeriv ℝ i phi x‖ * + ‖iteratedFDeriv ℝ (m + 1 - i) (fun y => D (y - c)) x‖) = 0 := by + apply Finset.sum_eq_zero + intro i hi + have hi' := Finset.mem_range.mp hi + have hzero : m + 1 - i ≠ 0 := by omega + have hone : m + 1 - i ≠ 1 := by omega + rw [norm_iteratedFDeriv_affine_patch] + simp only [ite_eq_right hzero, ite_eq_right hone, mul_zero] + rw [Finset.sum_range_succ, Finset.sum_range_succ, hz] at hp + simp only [Nat.sub_self, Nat.add_sub_cancel_left, Nat.choose_self, + Nat.choose_succ_self_right, Nat.cast_one, one_mul, zero_add, + norm_iteratedFDeriv_affine_patch] at hp + norm_num only [ite_true, ite_false, Nat.one_ne_zero, zero_ne_one] at hp + simpa only [add_comm, Nat.cast_add, Nat.cast_one] using hp + +/-- Multiplication by a cutoff cannot create derivative support outside +the cutoff support, including at its boundary. -/ +theorem iteratedFDeriv_cutoff_affine_eq_zero_of_not_mem_tsupport + (D : E →L[ℝ] F) (c x : E) (phi : E → ℝ) (m : ℕ) + (hx : x ∉ tsupport phi) : + iteratedFDeriv ℝ m (fun y => phi y • D (y - c)) x = 0 := by + by_contra hne + apply hx + exact tsupport_smul_subset_left phi (fun y => D (y - c)) + (support_iteratedFDeriv_subset (𝕜 := ℝ) m hne) + +/-- The derivative falling on the affine factor fits in the same +Gevrey-two weight as the term falling wholly on the cutoff. -/ +theorem cutoff_affine_gevrey_weight_le {C : ℝ} (hC : 1 ≤ C) (m : ℕ) : + (m + 1 : ℝ) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2 ≤ + C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2 := by + have hpow : C ^ (m + 1) ≤ C ^ (m + 2) := pow_le_pow_right₀ hC (by omega) + have hfac : (m + 1 : ℝ) * (m.factorial : ℝ) ^ 2 ≤ + ((m + 1).factorial : ℝ) ^ 2 := by + rw [Nat.factorial_succ] + push_cast + have hm : (m + 1 : ℝ) ≤ (m + 1 : ℝ) ^ 2 := by + nlinarith [Nat.cast_nonneg (α := ℝ) m] + convert mul_le_mul_of_nonneg_right hm (sq_nonneg (m.factorial : ℝ)) using 1 + ring + calc + _ = C ^ (m + 1) * ((m + 1 : ℝ) * (m.factorial : ℝ) ^ 2) := by ring + _ ≤ C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2 := + mul_le_mul hpow hfac (by positivity) (by positivity) + +/-- A cutoff-affine term obeys a uniform Gevrey-two estimate at every +order, including its value. The small operator and displacement bounds +are premises; the conclusion is derived from the actual product rule. -/ +theorem scaled_cutoff_affine_jet_le + (D : E →L[ℝ] F) (c x : E) {phi : E → ℝ} {m : ℕ} + {epsilon r L C : ℝ} (hepsilon : 0 ≤ epsilon) (hr : 0 < r) + (_hL : 0 ≤ L) (hC : 1 ≤ C) (hD : ‖D‖ ≤ epsilon) + (hvalue : ‖D (x - c)‖ ≤ epsilon * L * r) + (hphi : ContDiffAt ℝ m phi x) + (hcutoff : ∀ q ≤ m, r ^ q * ‖iteratedFDeriv ℝ q phi x‖ ≤ + C ^ (q + 1) * (q.factorial : ℝ) ^ 2) : + r ^ m * ‖iteratedFDeriv ℝ m (fun y => phi y • D (y - c)) x‖ ≤ + epsilon * r * (L + 1) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + have hCzero : 0 ≤ C := zero_le_one.trans hC + cases m with + | zero => + have hc : ‖phi x‖ ≤ C := by simpa [norm_iteratedFDeriv_zero] using hcutoff 0 (by omega) + simp only [pow_zero, one_mul, norm_iteratedFDeriv_zero, norm_smul, + zero_add, pow_one, Nat.factorial_zero, Nat.cast_one, one_pow, mul_one] + calc + _ ≤ C * (epsilon * L * r) := mul_le_mul hc hvalue (norm_nonneg _) hCzero + _ = epsilon * r * L * C := by ring + _ ≤ epsilon * r * (L + 1) * C := by gcongr; linarith + | succ m => + have hraw := norm_iteratedFDeriv_cutoff_affine_le D c x hphi + have htop := hcutoff (m + 1) (by omega) + have hprev := hcutoff m (by omega) + have hfirst : r ^ (m + 1) * + (‖iteratedFDeriv ℝ (m + 1) phi x‖ * ‖D (x - c)‖) ≤ + epsilon * r * L * (C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2) := by + calc + _ = (r ^ (m + 1) * ‖iteratedFDeriv ℝ (m + 1) phi x‖) * ‖D (x - c)‖ := by ring + _ ≤ (C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2) * (epsilon * L * r) := + mul_le_mul htop hvalue (norm_nonneg _) (by positivity) + _ = _ := by ring + have hsecond : r ^ (m + 1) * + ((m + 1 : ℝ) * ‖iteratedFDeriv ℝ m phi x‖ * ‖D‖) ≤ + epsilon * r * (C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2) := by + calc + _ = (r * (m + 1 : ℝ) * (r ^ m * ‖iteratedFDeriv ℝ m phi x‖)) * ‖D‖ := by + rw [pow_succ] + ring + _ ≤ (r * (m + 1 : ℝ) * (C ^ (m + 1) * (m.factorial : ℝ) ^ 2)) * epsilon := + mul_le_mul (mul_le_mul_of_nonneg_left hprev (by positivity)) hD + (norm_nonneg _) (by positivity) + _ = epsilon * r * ((m + 1 : ℝ) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (cutoff_affine_gevrey_weight_le hC m) + (mul_nonneg hepsilon hr.le) + calc + _ ≤ r ^ (m + 1) * + (‖iteratedFDeriv ℝ (m + 1) phi x‖ * ‖D (x - c)‖ + + (m + 1 : ℝ) * ‖iteratedFDeriv ℝ m phi x‖ * ‖D‖) := + mul_le_mul_of_nonneg_left hraw (by positivity) + _ ≤ epsilon * r * L * (C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2) + + epsilon * r * (C ^ (m + 2) * ((m + 1).factorial : ℝ) ^ 2) := by + rw [mul_add] + exact add_le_add hfirst hsecond + _ = _ := by ring + +end SinglePatch + +section FiniteField + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The finite patch field has the sum of its actual patch derivatives. -/ +theorem iteratedFDeriv_patchField (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) : + iteratedFDeriv ℝ m (patchField s phi D c) x = + ∑ j ∈ s, iteratedFDeriv ℝ m (fun y => phi j y • D j (y - c j)) x := by + apply iteratedFDeriv_fun_sum_apply + intro j hj + exact (hphi j hj).smul ((D j).contDiff.contDiffAt.comp x + (contDiffAt_id.sub contDiffAt_const)) + +/-- In a positive derivative order, only two cutoff orders are needed. -/ +theorem norm_iteratedFDeriv_patchField_le (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + (hphi : ∀ j ∈ s, ContDiffAt ℝ (m + 1) (phi j) x) : + ‖iteratedFDeriv ℝ (m + 1) (patchField s phi D c) x‖ ≤ + ∑ j ∈ s, (‖iteratedFDeriv ℝ (m + 1) (phi j) x‖ * ‖D j (x - c j)‖ + + (m + 1 : ℝ) * ‖iteratedFDeriv ℝ m (phi j) x‖ * ‖D j‖) := by + rw [iteratedFDeriv_patchField s phi D c x (m + 1) hphi] + exact (norm_sum_le _ _).trans (Finset.sum_le_sum fun j hj => + norm_iteratedFDeriv_cutoff_affine_le (D j) (c j) x (hphi j hj)) + +/-- Every higher field jet can be restricted to the active cutoffs. -/ +theorem iteratedFDeriv_patchField_eq_active (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) : + iteratedFDeriv ℝ m (patchField s phi D c) x = + iteratedFDeriv ℝ m (patchField (s.filter (fun j => x ∈ tsupport (phi j))) phi D c) x := by + classical + rw [iteratedFDeriv_patchField s phi D c x m hphi, + iteratedFDeriv_patchField _ phi D c x m + (fun j hj => hphi j (Finset.mem_filter.mp hj).1)] + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro j hj hnot + have hx : x ∉ tsupport (phi j) := by + intro hx + exact hnot (Finset.mem_filter.mpr ⟨hj, hx⟩) + exact iteratedFDeriv_cutoff_affine_eq_zero_of_not_mem_tsupport (D j) (c j) x (phi j) m hx + +/-- Summing the actual patch jets costs only the number of active terms. -/ +theorem scaled_patchField_jet_le (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + {epsilon r L C : ℝ} (hepsilon : 0 ≤ epsilon) (hr : 0 < r) + (hL : 0 ≤ L) (hC : 1 ≤ C) + (hD : ∀ j ∈ s, ‖D j‖ ≤ epsilon) + (hvalue : ∀ j ∈ s, ‖D j (x - c j)‖ ≤ epsilon * L * r) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) + (hcutoff : ∀ j ∈ s, ∀ q ≤ m, + r ^ q * ‖iteratedFDeriv ℝ q (phi j) x‖ ≤ C ^ (q + 1) * (q.factorial : ℝ) ^ 2) : + r ^ m * ‖iteratedFDeriv ℝ m (patchField s phi D c) x‖ ≤ + epsilon * r * (s.card : ℝ) * (L + 1) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + rw [iteratedFDeriv_patchField s phi D c x m hphi] + calc + _ ≤ r ^ m * ∑ j ∈ s, ‖iteratedFDeriv ℝ m (fun y => phi j y • D j (y - c j)) x‖ := + mul_le_mul_of_nonneg_left (norm_sum_le _ _) (by positivity) + _ = ∑ j ∈ s, r ^ m * ‖iteratedFDeriv ℝ m (fun y => phi j y • D j (y - c j)) x‖ := + Finset.mul_sum _ _ _ + _ ≤ ∑ _j ∈ s, epsilon * r * (L + 1) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2 := + Finset.sum_le_sum fun j hj => scaled_cutoff_affine_jet_le (D j) (c j) x + hepsilon hr hL hC (hD j hj) (hvalue j hj) (hphi j hj) (hcutoff j hj) + _ = _ := by simp only [Finset.sum_const, nsmul_eq_mul]; ring + +/-- A fixed base absorbs the overlap and center-displacement constants. -/ +def patchJetBase (N L C : ℝ) : ℝ := C * max 1 (N * (L + 1)) + +theorem patchJetBase_ge_one {N L C : ℝ} (hC : 1 ≤ C) : + 1 ≤ patchJetBase N L C := by + unfold patchJetBase + simpa using mul_le_mul hC (le_max_left 1 (N * (L + 1))) + zero_le_one (zero_le_one.trans hC) + +/-- Uniform all-order Gevrey-two field estimate, with base independent +of the derivative order and the size of the ambient net. -/ +theorem patchField_scaled_gevrey_two (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + {epsilon r L C N : ℝ} (hepsilon : 0 ≤ epsilon) (hr : 0 < r) + (hL : 0 ≤ L) (hC : 1 ≤ C) (hcard : (s.card : ℝ) ≤ N) + (hD : ∀ j ∈ s, ‖D j‖ ≤ epsilon) + (hvalue : ∀ j ∈ s, ‖D j (x - c j)‖ ≤ epsilon * L * r) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) + (hcutoff : ∀ j ∈ s, ∀ q ≤ m, + r ^ q * ‖iteratedFDeriv ℝ q (phi j) x‖ ≤ C ^ (q + 1) * (q.factorial : ℝ) ^ 2) : + r ^ m * ‖iteratedFDeriv ℝ m (patchField s phi D c) x‖ ≤ + epsilon * r * (patchJetBase N L C) ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + have hM : 1 ≤ max 1 (N * (L + 1)) := le_max_left _ _ + have hcoeff : (s.card : ℝ) * (L + 1) ≤ (max 1 (N * (L + 1))) ^ (m + 1) := + ((mul_le_mul_of_nonneg_right hcard (by linarith)).trans (le_max_right _ _)).trans + (le_self_pow₀ hM (by omega)) + have hweight : (s.card : ℝ) * (L + 1) * C ^ (m + 1) ≤ + (patchJetBase N L C) ^ (m + 1) := by + unfold patchJetBase + rw [mul_pow] + simpa only [mul_comm] using mul_le_mul_of_nonneg_right hcoeff + (pow_nonneg (zero_le_one.trans hC) _) + calc + _ ≤ epsilon * r * (s.card : ℝ) * (L + 1) * C ^ (m + 1) * (m.factorial : ℝ) ^ 2 := + scaled_patchField_jet_le s phi D c x m hepsilon hr hL hC hD hvalue hphi hcutoff + _ = (epsilon * r) * ((s.card : ℝ) * (L + 1) * C ^ (m + 1)) * (m.factorial : ℝ) ^ 2 := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hweight (mul_nonneg hepsilon hr.le)) (sq_nonneg _) + +/-- The uniform estimate for the full field counts only cutoffs whose +closed supports contain the testing point. -/ +theorem patchField_scaled_gevrey_two_active (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (x : E) (m : ℕ) + {epsilon r L C N : ℝ} (hepsilon : 0 ≤ epsilon) (hr : 0 < r) + (hL : 0 ≤ L) (hC : 1 ≤ C) + (hcard : ((s.filter (fun j => x ∈ tsupport (phi j))).card : ℝ) ≤ N) + (hD : ∀ j ∈ s, x ∈ tsupport (phi j) → ‖D j‖ ≤ epsilon) + (hvalue : ∀ j ∈ s, x ∈ tsupport (phi j) → ‖D j (x - c j)‖ ≤ epsilon * L * r) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) + (hcutoff : ∀ j ∈ s, x ∈ tsupport (phi j) → ∀ q ≤ m, + r ^ q * ‖iteratedFDeriv ℝ q (phi j) x‖ ≤ C ^ (q + 1) * (q.factorial : ℝ) ^ 2) : + r ^ m * ‖iteratedFDeriv ℝ m (patchField s phi D c) x‖ ≤ + epsilon * r * (patchJetBase N L C) ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + classical + rw [iteratedFDeriv_patchField_eq_active s phi D c x m hphi] + exact patchField_scaled_gevrey_two _ phi D c x m hepsilon hr hL hC hcard + (fun j hj => hD j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2) + (fun j hj => hvalue j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2) + (fun j hj => hphi j (Finset.mem_filter.mp hj).1) + (fun j hj => hcutoff j (Finset.mem_filter.mp hj).1 (Finset.mem_filter.mp hj).2) + +/-- Every repeated directional derivative obeys the same uniform field +bound, with the expected power of the direction norm. -/ +theorem patchField_scaled_directional_gevrey_two_active + (s : Finset ι) (phi : ι → E → ℝ) (D : ι → E →L[ℝ] E) + (c : ι → E) (x xi : E) (m : ℕ) + {epsilon r L C N : ℝ} (hepsilon : 0 ≤ epsilon) (hr : 0 < r) + (hL : 0 ≤ L) (hC : 1 ≤ C) + (hcard : ((s.filter (fun j => x ∈ tsupport (phi j))).card : ℝ) ≤ N) + (hD : ∀ j ∈ s, x ∈ tsupport (phi j) → ‖D j‖ ≤ epsilon) + (hvalue : ∀ j ∈ s, x ∈ tsupport (phi j) → ‖D j (x - c j)‖ ≤ epsilon * L * r) + (hphi : ∀ j ∈ s, ContDiffAt ℝ m (phi j) x) + (hcutoff : ∀ j ∈ s, x ∈ tsupport (phi j) → ∀ q ≤ m, + r ^ q * ‖iteratedFDeriv ℝ q (phi j) x‖ ≤ C ^ (q + 1) * (q.factorial : ℝ) ^ 2) : + r ^ m * ‖iteratedFDeriv ℝ m (patchField s phi D c) x (fun _ => xi)‖ ≤ + epsilon * r * (patchJetBase N L C) ^ (m + 1) * + (m.factorial : ℝ) ^ 2 * ‖xi‖ ^ m := by + have hd : ‖iteratedFDeriv ℝ m (patchField s phi D c) x (fun _ => xi)‖ ≤ + ‖iteratedFDeriv ℝ m (patchField s phi D c) x‖ * ‖xi‖ ^ m := by + simpa using (iteratedFDeriv ℝ m (patchField s phi D c) x).le_opNorm + (fun _ => xi) + calc + _ ≤ r ^ m * (‖iteratedFDeriv ℝ m (patchField s phi D c) x‖ * ‖xi‖ ^ m) := + mul_le_mul_of_nonneg_left hd (by positivity) + _ = (r ^ m * ‖iteratedFDeriv ℝ m (patchField s phi D c) x‖) * ‖xi‖ ^ m := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (patchField_scaled_gevrey_two_active s phi D c x m + hepsilon hr hL hC hcard hD hvalue hphi hcutoff) (by positivity) + +end FiniteField + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchLocalization.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..97f58efd70e767396aadcad035154f5609fcd101 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchLocalization.lean @@ -0,0 +1,217 @@ +import OAI.Geometry.RCD.Coordinates.PatchCover +import Mathlib.Topology.Algebra.Support +import Mathlib.Analysis.Normed.Operator.ContinuousLinearMap +import Mathlib.Analysis.SpecialFunctions.Pow.Real + +namespace OAI + +/-! +# Localization of active coordinate patches + +A cutoff support bounds the finely normalized displacement. Coarse harmonic +separation and sublinear growth of the normalizations then bound the original +metric distance. The squared growth hypothesis below is the exponent-one +bound for squared norms (equivalently, exponent one-half for norms). +-/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section + +attribute [local instance] Classical.propDecidable + +namespace RegularPointCoordinates + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- Membership in the actual topological support of a normalized cutoff +bounds its normalized displacement, including boundary support points. -/ +theorem normalized_cutoff_support_norm_le (T : E →L[ℝ] F) (c x : E) + (psi : F → ℝ) {r L : ℝ} (hr : 0 < r) + (hsupport : tsupport psi ⊆ Metric.closedBall 0 L) + (hx : x ∈ tsupport (fun P => psi (r⁻¹ • T (P - c)))) : + ‖T (x - c)‖ ≤ L * r := by + have hcont : Continuous (fun P => r⁻¹ • T (P - c)) := by fun_prop + have hm := tsupport_comp_subset_preimage psi hcont hx + have hb := hsupport hm + have hn : r⁻¹ * ‖T (x - c)‖ ≤ L := by + simpa only [Metric.mem_closedBall, dist_zero_right, norm_smul, + Real.norm_of_nonneg (inv_nonneg.mpr hr.le)] using hb + have hh := mul_le_mul_of_nonneg_left hn hr.le + rw [← mul_assoc, mul_inv_cancel₀ hr.ne', one_mul] at hh + simpa only [mul_comm] using hh + +/-- A coarse lower bound and sublinear normalization growth localize a +fine-scale displacement. The estimate is uniform in the scale `r`. -/ +theorem distance_le_of_normalization_growth {d r c M L A B : ℝ} + (hd : 0 ≤ d) (hr : 0 < r) (hc : 0 < c) (hL : 0 ≤ L) + (hA : 0 ≤ A) (hB : 0 ≤ B) + (hsmall : A ≤ L * r) (hseparate : c * d ≤ B) + (hgrowth : B ^ 2 ≤ M ^ 2 * (d / r) * A ^ 2) : + d ≤ (M * L / c) ^ 2 * r := by + by_cases hz : d = 0 + · rw [hz] + positivity + have hdpos : 0 < d := lt_of_le_of_ne hd (Ne.symm hz) + have hsep2 := (sq_le_sq₀ (mul_nonneg hc.le hd) hB).mpr hseparate + have hsmall2 := (sq_le_sq₀ hA (mul_nonneg hL hr.le)).mpr hsmall + have hcoef : 0 ≤ M ^ 2 * (d / r) := mul_nonneg (sq_nonneg _) (div_nonneg hd hr.le) + have hg := hgrowth.trans (mul_le_mul_of_nonneg_left hsmall2 hcoef) + have hid : M ^ 2 * (d / r) * (L * r) ^ 2 = (M * L) ^ 2 * r * d := by + field_simp [hr.ne'] + rw [hid] at hg + have hcancel : c ^ 2 * d ≤ (M * L) ^ 2 * r := by + apply (mul_le_mul_iff_left₀ hdpos).mp + calc + _ = (c * d) ^ 2 := by ring + _ ≤ B ^ 2 := hsep2 + _ ≤ _ := hg + have hquot : d ≤ ((M * L) ^ 2 * r) / c ^ 2 := by + apply (le_div_iff₀ (sq_pos_of_pos hc)).mpr + simpa only [mul_comm] using hcancel + convert hquot using 1 + ring + +variable {X : Type*} [MetricSpace X] + +/-- Any slow norm-growth exponent at most one-half gives the squared +growth bound used in localization, at all coarser scales. -/ +theorem squared_growth_of_slow_norm_growth (T S : E →L[ℝ] F) (w : E) + {d r M a : ℝ} (hr : 0 < r) (hdr : r ≤ d) (hM : 0 ≤ M) (ha : a ≤ 1 / 2) + (hslow : ‖S w‖ ≤ M * (d / r) ^ a * ‖T w‖) : + ‖S w‖ ^ 2 ≤ M ^ 2 * (d / r) * ‖T w‖ ^ 2 := by + have hratio : 1 ≤ d / r := (le_div_iff₀ hr).mpr (by simpa using hdr) + have hratio0 : 0 ≤ d / r := (by norm_num : (0 : ℝ) ≤ 1).trans hratio + have hpower : ((d / r) ^ a) ^ (2 : ℕ) ≤ d / r := by + rw [← Real.rpow_mul_natCast hratio0 a 2] + simpa only [Real.rpow_one] using + Real.rpow_le_rpow_of_exponent_le hratio (show a * (2 : ℕ) ≤ 1 by norm_num; linarith) + have hs := (sq_le_sq₀ (norm_nonneg _) + (mul_nonneg (mul_nonneg hM (Real.rpow_nonneg hratio0 _)) (norm_nonneg _))).mpr hslow + calc + _ ≤ (M * (d / r) ^ a * ‖T w‖) ^ 2 := hs + _ = M ^ 2 * (((d / r) ^ a) ^ (2 : ℕ)) * ‖T w‖ ^ 2 := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hpower (sq_nonneg M)) (sq_nonneg _) + +/-- Active support forces an original-metric distance bound. Separation +and comparison are only required when the distance exceeds the fine scale, +so nearby pairs need no coarse-scale selection. -/ +theorem active_cutoff_distance_le (u : X → E) (T S : E →L[ℝ] F) + (psi : F → ℝ) (x y : X) {r c M L : ℝ} + (hr : 0 < r) (hc : 0 < c) (hL : 0 ≤ L) + (hsupport : tsupport psi ⊆ Metric.closedBall 0 L) + (hactive : u x ∈ tsupport (fun P => psi (r⁻¹ • T (P - u y)))) + (hseparate : r < dist x y → c * dist x y ≤ ‖S (u x - u y)‖) + (hgrowth : r < dist x y → + ‖S (u x - u y)‖ ^ 2 ≤ M ^ 2 * (dist x y / r) * ‖T (u x - u y)‖ ^ 2) : + dist x y ≤ max 1 ((M * L / c) ^ 2) * r := by + by_cases hnear : dist x y ≤ r + · exact hnear.trans (by simpa only [one_mul] using + mul_le_mul_of_nonneg_right (le_max_left 1 ((M * L / c) ^ 2)) hr.le) + have hfar : r < dist x y := lt_of_not_ge hnear + have hloc := distance_le_of_normalization_growth dist_nonneg hr hc hL + (norm_nonneg _) (norm_nonneg _) + (normalized_cutoff_support_norm_le T (u y) (u x) psi hr hsupport hactive) + (hseparate hfar) (hgrowth hfar) + exact hloc.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hr.le) + +/-- The same localization, stated directly with the manuscript's slow +power growth instead of its squared consequence. -/ +theorem active_cutoff_distance_le_of_slow_growth (u : X → E) (T S : E →L[ℝ] F) + (psi : F → ℝ) (x y : X) {r c M L a : ℝ} + (hr : 0 < r) (hc : 0 < c) (hM : 0 ≤ M) (hL : 0 ≤ L) (ha : a ≤ 1 / 2) + (hsupport : tsupport psi ⊆ Metric.closedBall 0 L) + (hactive : u x ∈ tsupport (fun P => psi (r⁻¹ • T (P - u y)))) + (hseparate : r < dist x y → c * dist x y ≤ ‖S (u x - u y)‖) + (hslow : r < dist x y → + ‖S (u x - u y)‖ ≤ M * (dist x y / r) ^ a * ‖T (u x - u y)‖) : + dist x y ≤ max 1 ((M * L / c) ^ 2) * r := by + apply active_cutoff_distance_le u T S psi x y hr hc hL hsupport hactive hseparate + intro hfar + exact squared_growth_of_slow_norm_growth T S (u x - u y) hr hfar.le hM ha (hslow hfar) + +/-- The cutoff equals one on the fine normalized core. -/ +theorem normalized_cutoff_eq_one_of_norm_le (T : E →L[ℝ] F) (psi : F → ℝ) + (c P : E) {r L : ℝ} (hr : 0 < r) + (hcore : ∀ v, ‖v‖ ≤ L → psi v = 1) + (hnorm : ‖T (P - c)‖ ≤ L * r) : + psi (r⁻¹ • T (P - c)) = 1 := by + apply hcore + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hr.le)] + have h := mul_le_mul_of_nonneg_left hnorm (inv_nonneg.mpr hr.le) + calc + _ ≤ r⁻¹ * (L * r) := h + _ = L := by field_simp [hr.ne'] + +/-- Net covering produces an active weight-one patch. Its enlarged source +ball covers the testing ball, exactly as required for the lower cumulative +mass comparison. -/ +theorem exists_weight_one_covering_patch (A : Set X) (hA : TotallyBounded A) + (r : ℝ≥0) (hr : 0 < r) (u : X → E) (T : X → E →L[ℝ] F) + (psi : F → ℝ) (hcore : ∀ v, ‖v‖ ≤ 2 → psi v = 1) + (hnear : ∀ x ∈ A, ∀ y ∈ maximalPatchNet r A, dist x y ≤ r → + ‖T y (u x - u y)‖ ≤ 2 * r) + (x : X) (hx : x ∈ A) {L : ℝ} (hL : 2 ≤ L) : + ∃ y ∈ maximalPatchNet r A, + dist x y ≤ r ∧ psi ((r : ℝ)⁻¹ • T y (u x - u y)) = 1 ∧ + u x ∈ tsupport (fun P => psi ((r : ℝ)⁻¹ • T y (P - u y))) ∧ + Metric.ball x r ⊆ Metric.ball y (L * r) := by + obtain ⟨y, hy, hxy⟩ := maximalPatchNet_covers (ne_of_gt hr) hA x hx + have hr' : 0 < (r : ℝ) := by exact_mod_cast hr + have hvalue := normalized_cutoff_eq_one_of_norm_le (T y) psi (u y) (u x) + hr' hcore (hnear x hx y hy hxy) + refine ⟨y, hy, hxy, hvalue, ?_, ?_⟩ + · apply subset_tsupport + change psi ((r : ℝ)⁻¹ • T y (u x - u y)) ≠ 0 + rw [hvalue] + norm_num + · apply Metric.ball_subset_ball' + have hm := mul_le_mul_of_nonneg_right hL hr'.le + linarith + +section Volume + +variable [MeasurableSpace X] [OpensMeasurableSpace X] + +/-- The overlap bound for the actual normalized cutoffs: active-center +distance is derived from support, harmonic separation, and normalization +growth before the disjoint-ball volume count is applied. -/ +theorem active_normalized_cutoff_card_le (μ : Measure X) (A : Set X) + (r : ℝ≥0) (u : X → E) (T S : X → E →L[ℝ] F) (psi : F → ℝ) + (x : X) (n : ℕ) (hr : 0 < r) {c M L a b : ℝ} + (hc : 0 < c) (hL : 0 ≤ L) (ha : 0 < a) + (hsupport : tsupport psi ⊆ Metric.closedBall 0 L) + (hseparate : ∀ y ∈ maximalPatchNet r A, (r : ℝ) < dist x y → + c * dist x y ≤ ‖S y (u x - u y)‖) + (hgrowth : ∀ y ∈ maximalPatchNet r A, (r : ℝ) < dist x y → + ‖S y (u x - u y)‖ ^ 2 ≤ M ^ 2 * (dist x y / r) * ‖T y (u x - u y)‖ ^ 2) + (hlower : ∀ y ∈ maximalPatchNet r A, + a * ((r : ℝ) / 2) ^ n ≤ μ.real (Metric.ball y (r / 2))) + (hupper : μ.real (Metric.ball x (max 1 ((M * L / c) ^ 2) * r + r / 2)) ≤ + b * (max 1 ((M * L / c) ^ 2) * r + r / 2) ^ n) + (hfinite : μ (Metric.ball x (max 1 ((M * L / c) ^ 2) * r + r / 2)) ≠ ∞) : + ((maximalPatchNet r A).filter (fun y => + u x ∈ tsupport (fun P => psi ((r : ℝ)⁻¹ • T y (P - u y))))).card ≤ + ⌈b / a * (2 * max 1 ((M * L / c) ^ 2) + 1) ^ n⌉₊ := by + classical + apply active_maximalPatchNet_card_le μ A r x _ n hr ha + · intro y hy hactive + have hh := active_cutoff_distance_le u (T y) (S y) psi x y + (show 0 < (r : ℝ) by exact_mod_cast hr) hc hL hsupport hactive + (hseparate y hy) (hgrowth y hy) + simpa only [dist_comm] using hh + · intro y hy _ + exact hlower y hy + · exact hupper + · exact hfinite + +end Volume + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PatchSecondDerivative.lean b/lean/OAI/Geometry/RCD/Coordinates/PatchSecondDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..f63d9415cd580cdde9b10fa93b6b7e9717b35723 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PatchSecondDerivative.lean @@ -0,0 +1,216 @@ +import OAI.Geometry.RCD.Coordinates.PatchDirectionalBounds +import Mathlib.Analysis.Calculus.ContDiff.Operations + +namespace OAI + +/-! +# The second directional derivative of the patch field + +This proves the actual derivative formula and the frozen dual-norm bound +in `re:field-second`. The only nonzero terms differentiate the cutoff twice, +or differentiate the cutoff and the affine factor once each. +-/ + +open Filter +open scoped Topology BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +section Calculus + +variable {E F ι : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The second directional derivative of a cutoff times an affine map. -/ +theorem cutoff_affine_second_directional (phi : E → ℝ) (D : E →L[ℝ] F) + (c P xi : E) (hphi : ContDiffAt ℝ 2 phi P) : + fderiv ℝ (fun y => fderiv ℝ (fun z => phi z • D (z - c)) y xi) P xi = + fderiv ℝ (fun y => fderiv ℝ phi y xi) P xi • D (P - c) + + (2 * fderiv ℝ phi P xi) • D xi := by + have hdphi := hphi.differentiableAt (by norm_num) + have hddphi := (hphi.fderiv_right (m := 1) (by norm_num)).differentiableAt + (by norm_num) + have hdxi := hddphi.hasFDerivAt.clm_apply (hasFDerivAt_const xi P) + have hD : HasFDerivAt (fun y => D (y - c)) D P := by + simpa [Function.comp_def] using D.hasFDerivAt.comp P ((hasFDerivAt_id P).sub_const c) + have hterm := (hdphi.hasFDerivAt.smul_const (D xi)).add (hdxi.fun_smul hD) + have hevent : ∀ᶠ y in 𝓝 P, ContDiffAt ℝ 2 phi y := hphi.eventually (by norm_num) + have heq : (fun y => phi y • D xi + fderiv ℝ phi y xi • D (y - c)) =ᶠ[𝓝 P] + (fun y => fderiv ℝ (fun z => phi z • D (z - c)) y xi) := by + filter_upwards [hevent] with y hy + have hDy : HasFDerivAt (fun z => D (z - c)) D y := by + simpa [Function.comp_def] using D.hasFDerivAt.comp y ((hasFDerivAt_id y).sub_const c) + rw [((hy.differentiableAt (by norm_num)).hasFDerivAt.fun_smul hDy).fderiv] + simp + have hactual := hterm.congr_of_eventuallyEq heq.symm + rw [hactual.fderiv] + simp only [add_apply, ContinuousLinearMap.smulRight_apply, smul_apply, + ContinuousLinearMap.comp_apply, zero_apply, map_zero, + zero_add, ContinuousLinearMap.flip_apply] + have hdxi_apply : fderiv ℝ (fun y => fderiv ℝ phi y xi) P xi = + fderiv ℝ (fderiv ℝ phi) P xi xi := by + rw [hdxi.fderiv] + simp + rw [hdxi_apply] + module + +/-- Finite sums commute with the actual second directional derivative. -/ +theorem second_directional_finset_sum (s : Finset ι) (f : ι → E → F) (P xi : E) + (hf : ∀ j ∈ s, ContDiffAt ℝ 2 (f j) P) : + fderiv ℝ (fun y => fderiv ℝ (fun z => ∑ j ∈ s, f j z) y xi) P xi = + ∑ j ∈ s, fderiv ℝ (fun y => fderiv ℝ (f j) y xi) P xi := by + have hdiff : ∀ j ∈ s, DifferentiableAt ℝ (fun y => fderiv ℝ (f j) y xi) P := by + intro j hj + exact ((hf j hj).fderiv_right (m := 1) (by norm_num)).differentiableAt + (by norm_num) |>.clm_apply (differentiableAt_const xi) + have hevent : ∀ᶠ y in 𝓝 P, ∀ j ∈ s, ContDiffAt ℝ 2 (f j) y := + (eventually_all_finset s).2 (fun j hj => (hf j hj).eventually (by norm_num)) + have heq : (fun y => ∑ j ∈ s, fderiv ℝ (f j) y xi) =ᶠ[𝓝 P] + (fun y => fderiv ℝ (fun z => ∑ j ∈ s, f j z) y xi) := by + filter_upwards [hevent] with y hy + rw [fderiv_fun_sum (fun j hj => (hy j hj).differentiableAt (by norm_num))] + simp + have hactual := (HasFDerivAt.fun_sum (fun j hj => (hdiff j hj).hasFDerivAt)).congr_of_eventuallyEq + heq.symm + rw [hactual.fderiv] + simp + +end Calculus + +variable {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The full finite-patch formula from local twice continuous differentiability +of the cutoff functions. -/ +theorem patchField_second_directional (s : Finset ι) (phi : ι → E → ℝ) + (D : ι → E →L[ℝ] E) (c : ι → E) (P xi : E) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 2 (phi j) P) : + fderiv ℝ (fun y => fderiv ℝ (patchField s phi D c) y xi) P xi = + ∑ j ∈ s, (fderiv ℝ (fun y => fderiv ℝ (phi j) y xi) P xi • D j (P - c j) + + (2 * fderiv ℝ (phi j) P xi) • D j xi) := by + have hterm : ∀ j ∈ s, ContDiffAt ℝ 2 (fun z => phi j z • D j (z - c j)) P := by + intro j hj + exact (hphi j hj).smul ((D j).contDiff.contDiffAt.comp P + (contDiffAt_id.sub contDiffAt_const)) + change fderiv ℝ (fun y => fderiv ℝ + (fun z => ∑ j ∈ s, phi j z • D j (z - c j)) y xi) P xi = _ + rw [second_directional_finset_sum s _ P xi hterm] + exact Finset.sum_congr rfl (fun j hj => cutoff_affine_second_directional + (phi j) (D j) (c j) P xi (hphi j hj)) + +variable [CompleteSpace E] + +/-- A derivative-weighted sum of mass values retains the square root of +the total directional mass. -/ +theorem frozen_patch_directional_sum_le (T : E ≃L[ℝ] E) (s : Finset ι) + (D : ι → E →L[ℝ] E) (a : ι → ℝ) (xi : E) {N : ℕ} {epsilon A : ℝ} + (hN : s.card ≤ N) (hepsilon : 0 ≤ epsilon) (hA : 0 ≤ A) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hZ : ∀ x, ⟪x, patchMass s D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (ha : ∀ j ∈ s, |a j| ≤ A) : + ‖(T.symm : E →L[ℝ] E).adjoint (patchCutoffError s D (fun _ => xi) a)‖ ≤ + A * Real.sqrt epsilon * Real.sqrt (N : ℝ) * + Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ := by + have hsmall : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2 := + fun j hj x => (patch_form_le_mass s D hD hj x).trans (hZ x) + have hcs := Real.sum_mul_le_sqrt_mul_sqrt s (fun _ => (1 : ℝ)) + (fun j => Real.sqrt ⟪xi, D j xi⟫_ℝ) + have hsq : (∑ j ∈ s, (Real.sqrt ⟪xi, D j xi⟫_ℝ) ^ 2) = + ⟪xi, patchMass s D xi⟫_ℝ := by + rw [inner_patchMass] + exact Finset.sum_congr rfl (fun j hj => Real.sq_sqrt ((hD j hj).inner_nonneg_right xi)) + rw [hsq] at hcs + simp only [one_mul, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] at hcs + have hsum : (∑ j ∈ s, Real.sqrt ⟪xi, D j xi⟫_ℝ) ≤ + Real.sqrt (N : ℝ) * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ := + hcs.trans (mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt (by exact_mod_cast hN)) + (Real.sqrt_nonneg _)) + calc + _ ≤ ∑ j ∈ s, |a j| * (Real.sqrt epsilon * Real.sqrt ⟪xi, D j xi⟫_ℝ) := + frozen_positive_patch_sum_norm_le T s D (fun _ => xi) a hepsilon hD hsmall + _ ≤ ∑ j ∈ s, A * (Real.sqrt epsilon * Real.sqrt ⟪xi, D j xi⟫_ℝ) := by + exact Finset.sum_le_sum (fun j hj => mul_le_mul_of_nonneg_right (ha j hj) (by positivity)) + _ = A * Real.sqrt epsilon * ∑ j ∈ s, Real.sqrt ⟪xi, D j xi⟫_ℝ := by + simp only [mul_assoc, Finset.mul_sum] + _ ≤ A * Real.sqrt epsilon * (Real.sqrt (N : ℝ) * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ) := + mul_le_mul_of_nonneg_left hsum (by positivity) + _ = _ := by ring + +/-- The second derivative estimate with the small factor retained. -/ +theorem patchField_second_directional_frozen_le_sqrt (T : E ≃L[ℝ] E) (s : Finset ι) + (phi : ι → E → ℝ) (D : ι → E →L[ℝ] E) (c : ι → E) (P xi : E) {N : ℕ} + {epsilon C K r energy : ℝ} (hN : s.card ≤ N) + (hepsilon : 0 ≤ epsilon) (hC : 0 ≤ C) (hK : 0 ≤ K) + (hr : 0 < r) (henergy : 0 ≤ energy) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 2 (phi j) P) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hZ : ∀ x, ⟪x, patchMass s D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (hw : ∀ j ∈ s, ⟪P - c j, D j (P - c j)⟫_ℝ ≤ C * r ^ 2 * energy) + (hfirst : ∀ j ∈ s, |fderiv ℝ (phi j) P xi| ≤ K / r * ‖T xi‖) + (hsecond : ∀ j ∈ s, |fderiv ℝ (fun y => fderiv ℝ (phi j) y xi) P xi| ≤ + K / r ^ 2 * ‖T xi‖ ^ 2) : + r * ‖(T.symm : E →L[ℝ] E).adjoint + (fderiv ℝ (fun y => fderiv ℝ (patchField s phi D c) y xi) P xi)‖ ≤ + Real.sqrt epsilon * ((N : ℝ) * K * Real.sqrt C * Real.sqrt energy * ‖T xi‖ ^ 2 + + 2 * K * Real.sqrt (N : ℝ) * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ * ‖T xi‖) := by + let a : ι → ℝ := fun j => fderiv ℝ (phi j) P xi + let b : ι → ℝ := fun j => fderiv ℝ (fun y => fderiv ℝ (phi j) y xi) P xi + have hsmall : ∀ j ∈ s, ∀ x, ⟪x, D j x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2 := + fun j hj x => (patch_form_le_mass s D hD hj x).trans (hZ x) + have hb := frozen_patch_weighted_value_le T s D (fun j => P - c j) b hN + hepsilon hC hr.le henergy (A := K / r ^ 2 * ‖T xi‖ ^ 2) (by positivity) + hD hsmall hw hsecond + have ha := frozen_patch_directional_sum_le T s D a xi hN hepsilon + (A := K / r * ‖T xi‖) (by positivity) hD hZ hfirst + have hformula : fderiv ℝ (fun y => fderiv ℝ (patchField s phi D c) y xi) P xi = + patchCutoffError s D (fun j => P - c j) b + + (2 : ℝ) • patchCutoffError s D (fun _ => xi) a := by + rw [patchField_second_directional s phi D c P xi hphi] + simp [patchCutoffError, a, b, Finset.sum_add_distrib, Finset.smul_sum, mul_smul] + rw [hformula, map_add, map_smul] + calc + _ ≤ r * (‖(T.symm : E →L[ℝ] E).adjoint + (patchCutoffError s D (fun j => P - c j) b)‖ + + 2 * ‖(T.symm : E →L[ℝ] E).adjoint (patchCutoffError s D (fun _ => xi) a)‖) := by + apply mul_le_mul_of_nonneg_left _ hr.le + simpa only [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] + using norm_add_le ((T.symm : E →L[ℝ] E).adjoint + (patchCutoffError s D (fun j => P - c j) b)) + ((2 : ℝ) • (T.symm : E →L[ℝ] E).adjoint (patchCutoffError s D (fun _ => xi) a)) + _ ≤ r * ((N : ℝ) * (K / r ^ 2 * ‖T xi‖ ^ 2) * + (Real.sqrt epsilon * Real.sqrt C * r * Real.sqrt energy) + + 2 * ((K / r * ‖T xi‖) * Real.sqrt epsilon * Real.sqrt (N : ℝ) * + Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ)) := by + exact mul_le_mul_of_nonneg_left (add_le_add hb (mul_le_mul_of_nonneg_left ha (by norm_num))) hr.le + _ = _ := by field_simp [ne_of_gt hr] + +/-- With `epsilon ≤ 1`, the small factor may be dropped, giving the two +terms in `re:field-second` with explicit overlap and cutoff constants. -/ +theorem patchField_second_directional_frozen_le (T : E ≃L[ℝ] E) (s : Finset ι) + (phi : ι → E → ℝ) (D : ι → E →L[ℝ] E) (c : ι → E) (P xi : E) {N : ℕ} + {epsilon C K r energy : ℝ} (hN : s.card ≤ N) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) (hC : 0 ≤ C) (hK : 0 ≤ K) + (hr : 0 < r) (henergy : 0 ≤ energy) + (hphi : ∀ j ∈ s, ContDiffAt ℝ 2 (phi j) P) + (hD : ∀ j ∈ s, (D j).IsPositive) + (hZ : ∀ x, ⟪x, patchMass s D x⟫_ℝ ≤ epsilon * ‖T x‖ ^ 2) + (hw : ∀ j ∈ s, ⟪P - c j, D j (P - c j)⟫_ℝ ≤ C * r ^ 2 * energy) + (hfirst : ∀ j ∈ s, |fderiv ℝ (phi j) P xi| ≤ K / r * ‖T xi‖) + (hsecond : ∀ j ∈ s, |fderiv ℝ (fun y => fderiv ℝ (phi j) y xi) P xi| ≤ + K / r ^ 2 * ‖T xi‖ ^ 2) : + r * ‖(T.symm : E →L[ℝ] E).adjoint + (fderiv ℝ (fun y => fderiv ℝ (patchField s phi D c) y xi) P xi)‖ ≤ + (N : ℝ) * K * Real.sqrt C * Real.sqrt energy * ‖T xi‖ ^ 2 + + 2 * K * Real.sqrt (N : ℝ) * Real.sqrt ⟪xi, patchMass s D xi⟫_ℝ * ‖T xi‖ := by + have hsqrt : Real.sqrt epsilon ≤ 1 := by + nlinarith [Real.sq_sqrt hepsilon, Real.sqrt_nonneg epsilon] + exact (patchField_second_directional_frozen_le_sqrt T s phi D c P xi hN + hepsilon hC hK hr henergy hphi hD hZ hw hfirst hsecond).trans + (mul_le_of_le_one_left (by positivity) hsqrt) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PointwiseMetricIteration.lean b/lean/OAI/Geometry/RCD/Coordinates/PointwiseMetricIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ab192ab2bc155875ad896fa128b60f85f386d04 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PointwiseMetricIteration.lean @@ -0,0 +1,235 @@ +import OAI.Geometry.RCD.Coordinates.DifferentialStep +import OAI.Geometry.RCD.Coordinates.DifferentialBounds + +namespace OAI + +/-! +# Finite pointwise metric iteration + +At a fixed point and direction, the map update supplies the metric +increment and the diagonal second-derivative recurrence. Field estimates, +inverse costs, cumulative budgets, and a leading comparison then control +the coordinate metric. +-/ + +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- A common coefficient for the linear, inverse, squared, and recurrence errors. -/ +def pointwiseIterationCoefficient (C : ℝ) : ℝ := C + 2 * C ^ 2 + 5 * C ^ 4 + +theorem pointwiseIterationCoefficient_bounds {C : ℝ} (hC : 1 ≤ C) : + 0 ≤ pointwiseIterationCoefficient C ∧ C ≤ pointwiseIterationCoefficient C ∧ + C ^ 2 ≤ pointwiseIterationCoefficient C ∧ 2 * C ^ 2 ≤ pointwiseIterationCoefficient C ∧ + 5 * C ^ 4 ≤ pointwiseIterationCoefficient C := by + have hC0 : 0 ≤ C := by linarith + unfold pointwiseIterationCoefficient + constructor + · positivity + constructor + · nlinarith [sq_nonneg C, pow_nonneg hC0 4] + constructor + · nlinarith [sq_nonneg C, pow_nonneg hC0 4] + constructor <;> nlinarith [sq_nonneg C, pow_nonneg hC0 4] + +theorem sqrt_weighted_defect {energy q : ℝ} (henergy : 0 ≤ energy) (hq : 0 ≤ q) : + Real.sqrt (energy * q ^ 2) = Real.sqrt energy * q := by + rw [Real.sqrt_mul henergy, Real.sqrt_sq hq] + +omit [CompleteSpace E] in +/-- The first derivative increment of the actual operator-field update. -/ +theorem fderiv_clm_update_increment {h v : E → E} {K : E → E →L[ℝ] E} {x : E} + (hh : DifferentiableAt ℝ h x) (hK : DifferentiableAt ℝ K x) + (hv : DifferentiableAt ℝ v x) (xi : E) : + fderiv ℝ (fun y => h y + K y (v y)) x xi - fderiv ℝ h x xi = + K x (fderiv ℝ v x xi) + fderiv ℝ K x xi (v x) := by + have hd := hh.hasFDerivAt.fun_add (hK.hasFDerivAt.clm_apply hv.hasFDerivAt) + rw [hd.fderiv] + simp + +omit [CompleteSpace E] in +/-- The inverse linear error is measured by the normalized old diagonal +second derivative and the weighted defect. -/ +theorem inverse_diagonal_error_le (K : E →L[ℝ] E) (dual : E → ℝ) (old v : E) + {C epsilon r q energy : ℝ} (hC : 1 ≤ C) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) + (hr : 0 < r) (hq : 0 < q) (henergy : 0 ≤ energy) + (hK : ∀ w, ‖K w‖ ≤ C * dual w) + (hv : dual v ≤ C * Real.sqrt epsilon * r * Real.sqrt energy) : + |⟪old, K v⟫_ℝ| ≤ C ^ 2 * (r / q * ‖old‖) * Real.sqrt (energy * q ^ 2) := by + have hC0 : 0 ≤ C := by linarith + have hsqrt : Real.sqrt epsilon ≤ 1 := by + nlinarith [Real.sq_sqrt hepsilon, Real.sqrt_nonneg epsilon] + have hvalue : ‖K v‖ ≤ C ^ 2 * r * Real.sqrt energy := by + calc + _ ≤ C * (C * Real.sqrt epsilon * r * Real.sqrt energy) := + (hK v).trans (mul_le_mul_of_nonneg_left hv hC0) + _ = Real.sqrt epsilon * (C ^ 2 * r * Real.sqrt energy) := by ring + _ ≤ _ := mul_le_of_le_one_left (by positivity) hsqrt + calc + _ ≤ ‖old‖ * ‖K v‖ := abs_real_inner_le_norm _ _ + _ ≤ ‖old‖ * (C ^ 2 * r * Real.sqrt energy) := + mul_le_mul_of_nonneg_left hvalue (norm_nonneg _) + _ = _ := by + rw [sqrt_weighted_defect henergy hq.le] + field_simp [ne_of_gt hq] + +/-- The actual maps satisfy the finite metric comparison once their +explicit analytic estimates and geometric scalar budgets are supplied. -/ +theorem pointwise_metric_iteration + (h v : ℕ → E → E) (e : ℕ → E ≃L[ℝ] E) + (principal : ℕ → E →L[ℝ] E) (dual : ℕ → E → ℝ) + (x xi : E) (q r z energy : ℕ → ℝ) (k : ℕ) + {C T epsilon Q : ℝ} (hC : 1 ≤ C) (hT : 1 ≤ T) + (hepsilon : 0 ≤ epsilon) (hepsilon1 : epsilon ≤ 1) (hQ : 0 ≤ Q) + (hq : ∀ i, 0 < q i) (hr : ∀ i, 0 < r i) + (hz : ∀ i, 0 ≤ z i) (henergy : ∀ i, 0 ≤ energy i) + (hregular : ∀ i < k, ContDiffAt ℝ 3 (h i) x) + (vregular : ∀ i < k, ContDiffAt ℝ 2 (v i) x) + (hJacobian : ∀ i < k, fderiv ℝ (h i) x = (e i : E →L[ℝ] E)) + (hupdate : ∀ i < k, h (i + 1) = fun y => h i y + + operatorInverseTranspose (fderiv ℝ (h i) y) (v i y)) + (hradius : ∀ i < k, r (i + 1) = r i / 2) + (hmonotone : ∀ i < k, q i ≤ q (i + 1)) + (hinitial : diagonalSecond (h 0) x xi = 0) + (hK : ∀ i < k, ∀ w, + ‖operatorInverseTranspose (fderiv ℝ (h i) x) w‖ ≤ C * dual i w) + (hK1 : ∀ i < k, ∀ w, + ‖fderiv ℝ (fun y => operatorInverseTranspose (fderiv ℝ (h i) y)) x xi w‖ ≤ + C * q i / r i * dual i w) + (hK2 : ∀ i < k, ∀ w, + ‖diagonalSecond (fun y => operatorInverseTranspose (fderiv ℝ (h i) y)) x xi w‖ ≤ + C * (q i) ^ 2 / (r i) ^ 2 * dual i w) + (hv : ∀ i < k, dual i (v i x) ≤ + C * Real.sqrt epsilon * r i * Real.sqrt (energy i)) + (hv1 : ∀ i < k, dual i (fderiv ℝ (v i) x xi) ≤ + C * Real.sqrt epsilon * (Real.sqrt (z i) + Real.sqrt (energy i) * q i)) + (hv2 : ∀ i < k, dual i (diagonalSecond (v i) x xi) ≤ + C / r i * (Real.sqrt (z i) * q i + Real.sqrt (energy i) * (q i) ^ 2)) + (hlinear : ∀ i < k, |⟪xi, fderiv ℝ (v i) x xi - principal i xi⟫_ℝ| ≤ + C * Real.sqrt (z i) * Real.sqrt (energy i) * q i) + (hzbudget : (∑ i ∈ Finset.range k, z i) ≤ T * Q) + (hdbudget : (∑ i ∈ Finset.range k, energy i * (q i) ^ 2) ≤ epsilon * Q) + (hleadLower : T⁻¹ * Q ≤ ‖fderiv ℝ (h 0) x xi‖ ^ 2 + + 2 * ∑ i ∈ Finset.range k, ⟪xi, principal i xi⟫_ℝ) + (hleadUpper : ‖fderiv ℝ (h 0) x xi‖ ^ 2 + + 2 * ∑ i ∈ Finset.range k, ⟪xi, principal i xi⟫_ℝ ≤ 2 * T * Q) + (hsmall : scalarMetricErrorCoefficient (pointwiseIterationCoefficient C) T epsilon ≤ + (2 * T)⁻¹) : + (4 * T)⁻¹ * Q ≤ ‖fderiv ℝ (h k) x xi‖ ^ 2 ∧ + ‖fderiv ℝ (h k) x xi‖ ^ 2 ≤ (4 * T) * Q := by + let K : ℕ → E → E →L[ℝ] E := fun i y => operatorInverseTranspose (fderiv ℝ (h i) y) + let m : ℕ → ℝ := fun i => ‖fderiv ℝ (h i) x xi‖ ^ 2 + let s : ℕ → ℝ := fun i => ⟪xi, principal i xi⟫_ℝ + let d : ℕ → ℝ := fun i => energy i * (q i) ^ 2 + let b : ℕ → ℝ := fun i => r i / q i * ‖diagonalSecond (h i) x xi‖ + let linear : ℕ → ℝ := fun i => ⟪xi, fderiv ℝ (v i) x xi - principal i xi⟫_ℝ + let inverse : ℕ → ℝ := fun i => -⟪diagonalSecond (h i) x xi, K i x (v i x)⟫_ℝ + let square : ℕ → ℝ := fun i => ‖fderiv ℝ (h (i + 1)) x xi - fderiv ℝ (h i) x xi‖ ^ 2 + obtain ⟨hcoef, hcoef1, hcoef2, hcoefRec, hcoefSq⟩ := pointwiseIterationCoefficient_bounds hC + have hKregular (i : ℕ) (hi : i < k) : ContDiffAt ℝ 2 (K i) x := by + apply contDiffAt_inverseTranspose_field ((hregular i hi).fderiv_right (m := 2) (by norm_num)) + rw [hJacobian i hi] + exact (e i).toUnit.isUnit + have hdelta (i : ℕ) (hi : i < k) : + fderiv ℝ (h (i + 1)) x xi - fderiv ℝ (h i) x xi = + K i x (fderiv ℝ (v i) x xi) + fderiv ℝ (K i) x xi (v i x) := by + rw [hupdate i hi] + exact fderiv_clm_update_increment ((hregular i hi).differentiableAt (by norm_num)) + ((hKregular i hi).differentiableAt (by norm_num)) + ((vregular i hi).differentiableAt (by norm_num)) xi + have hsecond (i : ℕ) (hi : i < k) : diagonalSecond (h (i + 1)) x xi = + diagonalSecond (h i) x xi + (K i x (diagonalSecond (v i) x xi) + + (2 : ℝ) • fderiv ℝ (K i) x xi (fderiv ℝ (v i) x xi) + + diagonalSecond (K i) x xi (v i x)) := by + rw [hupdate i hi, diagonalSecond_add ((hregular i hi).of_le (by norm_num)) + ((hKregular i hi).clm_apply (vregular i hi)), + diagonalSecond_clm_apply (hKregular i hi) (vregular i hi)] + simp only [two_smul] + have hd : ∀ i, 0 ≤ d i := fun i => mul_nonneg (henergy i) (sq_nonneg _) + have hb : ∀ i, 0 ≤ b i := by + intro i + exact mul_nonneg (div_nonneg (hr i).le (hq i).le) (norm_nonneg _) + have hbzero : b 0 = 0 := by simp [b, hinitial] + have hrec : ∀ i < k, b (i + 1) ≤ b i / 2 + + pointwiseIterationCoefficient C * (Real.sqrt (z i) + Real.sqrt (d i)) := by + intro i hi + have hqi := hq i + have hbound := differential_diagonal_update_recurrence + (K i x) (fderiv ℝ (K i) x xi) (diagonalSecond (K i) x xi) (dual i) + (v i x) (fderiv ℝ (v i) x xi) (diagonalSecond (v i) x xi) + (diagonalSecond (h i) x xi) (diagonalSecond (h (i + 1)) x xi) + hC hepsilon hepsilon1 (hq i) (hr i) (hmonotone i hi) + (hK i hi) (hK1 i hi) (hK2 i hi) (hv i hi) (hv1 i hi) (hv2 i hi) (hsecond i hi) + have hroot : Real.sqrt (d i) = Real.sqrt (energy i) * q i := + sqrt_weighted_defect (henergy i) (hq i).le + dsimp [b] + rw [hradius i hi, hroot] + exact hbound.trans (add_le_add le_rfl + (mul_le_mul_of_nonneg_right hcoefRec (by positivity))) + have hlin : ∀ i < k, |linear i| ≤ pointwiseIterationCoefficient C * + Real.sqrt (z i) * Real.sqrt (d i) := by + intro i hi + have hqi := hq i + dsimp [linear, d] + rw [sqrt_weighted_defect (henergy i) (hq i).le] + calc + _ ≤ C * Real.sqrt (z i) * Real.sqrt (energy i) * q i := hlinear i hi + _ = C * (Real.sqrt (z i) * (Real.sqrt (energy i) * q i)) := by ring + _ ≤ pointwiseIterationCoefficient C * (Real.sqrt (z i) * (Real.sqrt (energy i) * q i)) := + mul_le_mul_of_nonneg_right hcoef1 (by positivity) + _ = _ := by ring + have hinv : ∀ i < k, |inverse i| ≤ pointwiseIterationCoefficient C * b i * Real.sqrt (d i) := by + intro i hi + have hqi := hq i + have hri := hr i + dsimp [inverse] + rw [abs_neg] + have hbound := inverse_diagonal_error_le (K i x) (dual i) (diagonalSecond (h i) x xi) + (v i x) hC hepsilon hepsilon1 (hr i) (hq i) (henergy i) (hK i hi) (hv i hi) + exact hbound.trans (by + dsimp [b, d] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hcoef2 (by positivity)) (Real.sqrt_nonneg _)) + have hsquare : ∀ i < k, |square i| ≤ pointwiseIterationCoefficient C * epsilon * (z i + d i) := by + intro i hi + have hzi := hz i + have hEi := henergy i + dsimp [square] + rw [abs_of_nonneg (sq_nonneg _), hdelta i hi] + have hbound := differential_first_increment_sq_le (K i x) (fderiv ℝ (K i) x xi) + (dual i) (v i x) (fderiv ℝ (v i) x xi) hC hepsilon (hq i) (hr i) + (hz i) (henergy i) (hK i hi) (hK1 i hi) (hv i hi) (hv1 i hi) + exact hbound.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hcoefSq hepsilon) (by positivity)) + have hmetricStep : ∀ i < k, m (i + 1) - m i = + 2 * s i + 2 * linear i + 2 * inverse i + square i := by + intro i hi + have hidentity := inverseTranspose_update_metric_increment + ((hregular i hi).of_le (by norm_num)) + ((vregular i hi).differentiableAt (by norm_num)) (e i) (hJacobian i hi) xi + dsimp only at hidentity + rw [← hupdate i hi] at hidentity + have hKvalue : K i x = inverseTranspose (e i) := by + dsimp [K] + rw [hJacobian i hi, operatorInverseTranspose_equiv] + have hJxi : (e i) xi = fderiv ℝ (h i) x xi := by + rw [hJacobian i hi] + rfl + rw [← hKvalue, hJxi] at hidentity + dsimp [m, s, linear, inverse, square] + rw [inner_sub_right] + nlinarith [hidentity] + exact scalar_metric_bootstrap hcoef hT hepsilon hQ hz hd hb hbzero k + hrec hlin hinv hsquare hmetricStep hzbudget hdbudget hleadLower hleadUpper hsmall + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PoissonBilinearMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/PoissonBilinearMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a10b71cf1c09de6a458414e3c40df64668517ea --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PoissonBilinearMeasure.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Sobolev.PoissonScalarFamily +import OAI.Geometry.RCD.Sobolev.FiniteEnergyRepresentatives +import OAI.Geometry.RCD.Sobolev.SignedTestFunctional +import OAI.Geometry.RCD.Coordinates.LocalPositiveBilinearMeasure +import OAI.Geometry.RCD.Sobolev.AnnularLipschitzCutoff + +namespace OAI + +/-! # One positive measure-valued form for the finite Poisson span + +Polarization of the actual scalar measures gives the coefficient measures. +Locality identifies their quadratic tests with each directional scalar +measure. Positivity is then retained on the common interior ball, including +the singular part. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.poisson_bilinear_energy_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (κ : ℝ) (hK : -κ ≤ K) (p : X) {r : ℝ} (hr : 0 < r) (L : ℝ≥0) + (U : Euclidean (n + 2) →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (ell : Euclidean (n + 2) →ₗ[ℝ] ℝ) + (hU : ∀ v, IsConstantLaplacianOn (hausdorff n X) hX.quadratic + (ball p (8 * r)) (U v) (ell v)) + (hL : ∀ v, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (8 * r)), + localGamma (hausdorff n X) hX.quadratic (U v) (U v) x ≤ (L : ℝ) ^ 2 * ‖v‖ ^ 2) : + ∃ M : PositiveBilinearMeasure X (Euclidean (n + 2)), + ∀ v, Nonempty (LocalHarmonicEnergy (hausdorff n X) hX.quadratic U M κ p r L v) := by + classical + let := hX.separable + let μ := hausdorff n X + let hQ := hX.quadratic + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + obtain ⟨G, σ, hσ, hGb, hGr, hGt⟩ := hX.poisson_scalar_energy_family hn κ hK p hr L U ell hU hL + let e (i : Fin (n + 2)) : Euclidean (n + 2) := EuclideanSpace.single i 1 + let H (i j : Fin (n + 2)) := (1 / 2 : ℝ) • (G (e i + e j) - G (e i) - G (e j)) + let s (v : Euclidean (n + 2)) : SignedMeasure X := @Measure.toSignedMeasure X _ (σ v) (hσ v) + let a (i j : Fin (n + 2)) := (1 / 2 : ℝ) • (s (e i + e j) - s (e i) - s (e j)) + let B := coordinateBilinear H + let Q := coordinateBilinear a + have hH (i j : Fin (n + 2)) : SobolevSpace.toLp μ hQ (H i j) + =ᵐ[μ.restrict (ball p (5 * r / 2))] localGamma μ hQ (U (e i)) (U (e j)) := by + apply polarized_energy_representative μ hQ _ _ _ _ _ (hGr (e i)) (hGr (e j)) + simpa only [map_add] using hGr (e i + e j) + have hB (v w : Euclidean (n + 2)) : SobolevSpace.toLp μ hQ (B v w) + =ᵐ[μ.restrict (ball p (5 * r / 2))] localGamma μ hQ (U v) (U w) := + coordinate_energy_representative μ hQ U H hH v w + have ha (i j : Fin (n + 2)) : a i j = a j i := by + dsimp only [a] + rw [add_comm (e i) (e j)] + congr 1 + abel + have hentry (i j : Fin (n + 2)) (ψ : SobolevSpace μ hQ) (f : X →ᵇ ℝ) + (hfc : HasCompactSupport (f : X → ℝ)) (hfs : tsupport f ⊆ ball p (5 * r / 2)) + (hψ : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] f) : + signedTestIntegral f (a i j) = bochnerTestForm μ hQ κ (H i j) ψ := by + have ht (v : Euclidean (n + 2)) : signedTestIntegral f (s v) = + bochnerTestForm μ hQ κ (G v) ψ := by + have : IsFiniteMeasure (σ v) := hσ v + change (∫ᵛ x, f x ∂<•(σ v).toSignedMeasure) = _ + rw [VectorMeasure.integral_toSignedMeasure] + exact (hGt v ψ f f.continuous hfc hfs hψ).symm + change signedTestIntegral f ((1 / 2 : ℝ) • (s (e i + e j) - s (e i) - s (e j))) = _ + simp only [map_smul, map_sub, ht, H, LinearMap.smul_apply, LinearMap.sub_apply, smul_eq_mul] + have htest (v : Euclidean (n + 2)) (ψ : SobolevSpace μ hQ) (f : X →ᵇ ℝ) + (hfc : HasCompactSupport (f : X → ℝ)) (hfs : tsupport f ⊆ ball p (5 * r / 2)) + (hψ : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] f) : + signedTestIntegral f (Q v v) = bochnerTestForm μ hQ κ (G v) ψ := by + have he : signedTestIntegral f (Q v v) = bochnerTestForm μ hQ κ (B v v) ψ := by + rw [signedTestIntegral_coordinate] + simp_rw [hentry _ _ ψ f hfc hfs hψ] + change _ = bochnerTestForm μ hQ κ (coordinateBilinear H v v) ψ + rw [coordinateBilinear_apply] + simp only [map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, smul_eq_mul] + exact he.trans (bochnerTestForm_congr_on μ hQ measurableSet_ball κ + ((hB v v).trans (hGr v).symm) ψ f hψ hfs) + have hpos (v : Euclidean (n + 2)) (f : compactLipschitzTests (ball p (5 * r / 2))) + (hf : 0 ≤ (f : X →ᵇ ℝ)) : 0 ≤ ∫ᵛ x, (f : X →ᵇ ℝ) x ∂<•(Q v v) := by + let ψ := compactTestSobolev μ hQ _ f + have hψ := compactTestSobolev_coe μ hQ _ f + change 0 ≤ signedTestIntegral (f : X →ᵇ ℝ) (Q v v) + rw [htest v ψ f f.property.choose_spec.2.1 f.property.choose_spec.2.2 hψ, + hGt v ψ f (f : X →ᵇ ℝ).continuous f.property.choose_spec.2.1 f.property.choose_spec.2.2 hψ] + exact integral_nonneg hf + obtain ⟨χ, C, hχ, hχc, hχs, hχb, hχ1⟩ := + exists_annular_lipschitz_cutoff p (a := 2 * r) (b := 9 * r / 4) (by linarith) + let M := positiveBilinearMeasure_of_local_tests Q + (coordinateBilinear_symmetric a ha) measurableSet_closedBall χ hχ hχc + (hχs.trans (closedBall_subset_ball (show 9 * r / 4 < 5 * r / 2 by linarith))) + (fun x => (hχb x).1) hχ1 hpos + refine ⟨M, ?_⟩ + intro v + have hsmall : ball p (2 * r) ⊆ ball p (5 * r / 2) := ball_subset_ball (by linarith) + have hrep := ae_restrict_of_ae_restrict_of_subset hsmall (hGr v) + refine ⟨{ energy := G v, representative := hrep, bounded := ?_, measure_laplacian := ?_ }⟩ + · filter_upwards [hGb v] with x hx + rw [abs_of_nonneg hx.1] + simpa only [NNReal.coe_mul, NNReal.coe_pow, coe_nnnorm] using hx.2 + · have hid (ψ : SobolevSpace μ hQ) (f : X → ℝ) (hfc : Continuous f) + (hfs : HasCompactSupport f) (hfsub : tsupport f ⊆ ball p (2 * r)) + (hψ : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] f) : + (∫ x, f x ∂M.measure v) = bochnerTestForm μ hQ κ (G v) ψ := by + let w : X →ᵇ ℝ := ofCompactSupport f hfc hfs + rw [← VectorMeasure.integral_toSignedMeasure, M.measure_toSignedMeasure] + change signedTestIntegral w ((Q v v).restrict (closedBall p (2 * r))) = _ + rw [signedTestIntegral_restrict w _ measurableSet_closedBall + (hfsub.trans ball_subset_closedBall)] + exact htest v ψ w hfs (hfsub.trans hsmall) hψ + have hlap := bochner_measure_laplacian μ hQ measurableSet_ball (U v) (G v) κ (M.measure v) hrep hid + simpa only [harmonicBochnerSource, M.measure_toSignedMeasure] using hlap + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PoissonSpanCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/PoissonSpanCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ce9034a9bd9286058e955234abd174c6f6cd8c9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PoissonSpanCoordinates.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Sobolev.PoissonSpan + +namespace OAI + +/-! # The actual coordinate directions in the finite Poisson span -/ + +open Set Metric MeasureTheory +open scoped BigOperators NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem poissonSpanMap_right {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (f : Fin 2 → SobolevSpace μ hQ) (j : Fin 2) : + sobolevColumnMap μ hQ (poissonSpan μ hQ u f) + (EuclideanSpace.single (Fin.natAdd n j) 1) = f j := by + rw [sobolevColumnMap_single] + exact Fin.append_right u f j + +theorem poissonSpanMap_left {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (f : Fin 2 → SobolevSpace μ hQ) (j : Fin n) : + sobolevColumnMap μ hQ (poissonSpan μ hQ u f) + (EuclideanSpace.single (Fin.castAdd 2 j) 1) = u j := by + rw [sobolevColumnMap_single] + exact Fin.append_left u f j + +omit [MetricSpace X] [MeasurableSpace X] in +theorem poissonSpanLaplacian_single {n : ℕ} (c : ℝ) (j : Fin (n + 2)) : + poissonSpanLaplacian n c (EuclideanSpace.single j 1) = + Fin.append (fun _ : Fin n => (0 : ℝ)) (fun _ : Fin 2 => c) j := by + simp [poissonSpanLaplacian, EuclideanSpace.projₗ, PiLp.projₗ_apply, PiLp.single_apply] + +omit [MetricSpace X] [MeasurableSpace X] in +theorem poissonSpanLaplacian_right {n : ℕ} (c : ℝ) (j : Fin 2) : + poissonSpanLaplacian n c (EuclideanSpace.single (Fin.natAdd n j) 1) = c := by + rw [poissonSpanLaplacian_single] + exact Fin.append_right _ _ _ + +omit [MetricSpace X] [MeasurableSpace X] in +theorem poissonSpanLaplacian_left {n : ℕ} (c : ℝ) (j : Fin n) : + poissonSpanLaplacian n c (EuclideanSpace.single (Fin.castAdd 2 j) 1) = 0 := by + rw [poissonSpanLaplacian_single] + exact Fin.append_left _ _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearIntegralLower.lean b/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearIntegralLower.lean new file mode 100644 index 0000000000000000000000000000000000000000..01942c1faa3135be5934069174437f883722f891 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearIntegralLower.lean @@ -0,0 +1,72 @@ +import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lemmas +import Mathlib.MeasureTheory.Integral.DominatedConvergence + +namespace OAI + +/-! # An integrated lower bound for positive quadratic forms + +Weak mixed-pairing convergence and a uniform norm bound suffice. Strong +convergence of vectors or convergence of pointwise energies is not needed. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {E Y : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace Y] + +theorem positive_bilinear_integral_lower + (P : E →L[ℝ] E →L[ℝ] ℝ) (hpos : ∀ x, 0 ≤ P x x) + (hsymm : ∀ x y, P x y = P y x) (ν : Measure Y) + (u : ℕ → Y → E) (v : Y → E) + (hu : ∀ k, AEStronglyMeasurable (u k) ν) (hv : AEStronglyMeasurable v ν) + {C : ℝ} (hC : 0 ≤ C) (hb : ∀ k, ∀ᵐ t ∂ν, ‖u k t‖ ≤ C) + (hvb : ∀ᵐ t ∂ν, ‖v t‖ ≤ C) + (hp : ∀ᵐ t ∂ν, Tendsto (fun k => P (u k t) (v t)) atTop (𝓝 (P (v t) (v t)))) + (θ : Y → ℝ) (hθ : Integrable θ ν) (hθ0 : ∀ᵐ t ∂ν, 0 ≤ θ t) + {A : ℝ} (he : Tendsto (fun k => ∫ t, θ t*P (u k t) (u k t) ∂ν) atTop (𝓝 A)) : + (∫ t, θ t*P (v t) (v t) ∂ν) ≤ A := by + let D := ‖P‖*C*C + have hbound {f g : Y → E} (hf : ∀ᵐ t ∂ν, ‖f t‖ ≤ C) + (hg : ∀ᵐ t ∂ν, ‖g t‖ ≤ C) : ∀ᵐ t ∂ν, ‖P (f t) (g t)‖ ≤ D := by + filter_upwards [hf,hg] with t ht hs + exact (P.le_opNorm₂ _ _).trans (by dsimp only [D]; gcongr) + have hInt {f g : Y → E} (hf : AEStronglyMeasurable f ν) (hg : AEStronglyMeasurable g ν) + (hfb : ∀ᵐ t ∂ν, ‖f t‖ ≤ C) (hgb : ∀ᵐ t ∂ν, ‖g t‖ ≤ C) : + Integrable (fun t => θ t*P (f t) (g t)) ν := + hθ.mul_bdd (P.aestronglyMeasurable_comp₂ hf hg) (hbound hfb hgb) + have hmix : Tendsto (fun k => ∫ t, θ t*P (u k t) (v t) ∂ν) atTop + (𝓝 (∫ t, θ t*P (v t) (v t) ∂ν)) := by + apply tendsto_integral_of_dominated_convergence (fun t => |θ t| *D) + · intro k + exact hθ.aestronglyMeasurable.mul (P.aestronglyMeasurable_comp₂ (hu k) hv) + · exact hθ.abs.mul_const D + · intro k + filter_upwards [hbound (hb k) hvb] with t ht + rw [norm_mul,Real.norm_eq_abs (θ t)] + exact mul_le_mul_of_nonneg_left ht (abs_nonneg _) + · filter_upwards [hp] with t ht + exact ht.const_mul (θ t) + have hi (k : ℕ) : + 2*(∫ t, θ t*P (u k t) (v t) ∂ν)-(∫ t, θ t*P (v t) (v t) ∂ν) ≤ + ∫ t, θ t*P (u k t) (u k t) ∂ν := by + rw [← integral_const_mul,← integral_sub ((hInt (hu k) hv (hb k) hvb).const_mul 2) + (hInt hv hv hvb hvb)] + apply integral_mono_ae ((hInt (hu k) hv (hb k) hvb).const_mul 2 |>.sub (hInt hv hv hvb hvb)) + (hInt (hu k) (hu k) (hb k) (hb k)) + filter_upwards [hθ0] with t ht + have hn := hpos (u k t-v t) + simp only [map_sub,sub_apply] at hn + rw [hsymm (v t) (u k t)] at hn + have hh := mul_nonneg ht hn + change 2*(θ t*P (u k t) (v t))-θ t*P (v t) (v t) ≤ θ t*P (u k t) (u k t) + nlinarith only [hh] + have hh := le_of_tendsto_of_tendsto + ((hmix.const_mul 2).sub_const (∫ t, θ t*P (v t) (v t) ∂ν)) he (Eventually.of_forall hi) + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..68dd7edba1fa1bf949a1aa26c2002fac122d1256 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PositiveBilinearMeasure.lean @@ -0,0 +1,177 @@ +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion +import OAI.Geometry.RCD.Coordinates.PositiveForms +import Mathlib.MeasureTheory.VectorMeasure.Order + +namespace OAI + +/-! +# Positive measure-valued forms on a finite coordinate span + +This constructs the real mass operators from a finite family of signed +measures, retaining singular mass. The existence and local Bochner +identification of that family are separate analytic obligations. +-/ + +open Set MeasureTheory +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +/-- The finite-dimensional restriction of a positive, symmetric, +measure-valued quadratic form, such as the local Bochner measure. -/ +structure PositiveBilinearMeasure (X E : Type*) [MeasurableSpace X] + [AddCommGroup E] [Module ℝ E] where + bilinear : E →ₗ[ℝ] E →ₗ[ℝ] SignedMeasure X + symmetric : ∀ v w, bilinear v w = bilinear w v + nonneg : ∀ v, 0 ≤ bilinear v v + +namespace PositiveBilinearMeasure + +variable {X E : Type*} [MeasurableSpace X] [NormedAddCommGroup E] + [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + (M : PositiveBilinearMeasure X E) + +def evaluated (s : Set X) : E →ₗ[ℝ] E →ₗ[ℝ] ℝ := + LinearMap.mk₂ ℝ (fun v w => M.bilinear v w s) + (by intro u v w; simp) + (by intro c v w; simp) + (by intro u v w; simp) + (by intro c v w; simp) + +def evaluatedContinuous (s : Set X) : E →L[ℝ] E →L[ℝ] ℝ := + ((LinearMap.toContinuousLinearMap : (E →ₗ[ℝ] ℝ) ≃ₗ[ℝ] (E →L[ℝ] ℝ)).toLinearMap.comp + (M.evaluated s)).toContinuousLinearMap + +def massOperator (s : Set X) : E →L[ℝ] E := + InnerProductSpace.continuousLinearMapOfBilin (M.evaluatedContinuous s) + +theorem massOperator_inner (s : Set X) (v w : E) : + ⟪M.massOperator s v, w⟫_ℝ = M.bilinear v w s := + InnerProductSpace.continuousLinearMapOfBilin_apply _ _ _ + +theorem massOperator_isPositive (s : Set X) (hs : MeasurableSet s) : + (M.massOperator s).IsPositive := by + constructor + · intro v w + change ⟪M.massOperator s v, w⟫_ℝ = ⟪v, M.massOperator s w⟫_ℝ + calc + _ = M.bilinear v w s := M.massOperator_inner s v w + _ = M.bilinear w v s := congrArg (fun m : SignedMeasure X => m s) (M.symmetric v w) + _ = ⟪M.massOperator s w, v⟫_ℝ := (M.massOperator_inner s w v).symm + _ = _ := real_inner_comm _ _ + · intro v + change 0 ≤ ⟪M.massOperator s v, v⟫_ℝ + rw [massOperator_inner] + simpa using M.nonneg v s hs + +/-- Every diagonal signed measure is converted to an actual positive +finite measure, rather than replaced by a density with respect to volume. -/ +def measure (v : E) : Measure X := + (M.bilinear v v).toMeasureOfZeroLE Set.univ MeasurableSet.univ + (by simpa only [VectorMeasure.le_restrict_univ_iff_le] using M.nonneg v) + +instance measure_finite (v : E) : IsFiniteMeasure (M.measure v) := + SignedMeasure.toMeasureOfZeroLE_finite _ _ _ + +theorem measure_real (v : E) (s : Set X) (hs : MeasurableSet s) : + (M.measure v).real s = ⟪v, M.massOperator s v⟫_ℝ := by + calc + _ = M.bilinear v v s := by + simpa only [measure, Set.univ_inter] using + SignedMeasure.toMeasureOfZeroLE_real_apply (M.bilinear v v) _ MeasurableSet.univ hs + _ = ⟪M.massOperator s v, v⟫_ℝ := (M.massOperator_inner s v v).symm + _ = _ := real_inner_comm _ _ + +/-- Change of coordinate columns acts on the full signed measures. -/ +def comap (A : E →ₗ[ℝ] E) : PositiveBilinearMeasure X E where + bilinear := M.bilinear.compl₁₂ A A + symmetric v w := M.symmetric (A v) (A w) + nonneg v := M.nonneg (A v) + +theorem comap_massOperator (A : E →L[ℝ] E) (s : Set X) : + (M.comap A.toLinearMap).massOperator s = + A.adjoint.comp ((M.massOperator s).comp A) := by + ext v + apply ext_inner_right ℝ + intro w + rw [massOperator_inner] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_left, + massOperator_inner] + rfl + +/-- The quadratic triangle bound holds for the full measure on every +measurable set, so singular mass is included. -/ +theorem measure_add_le (v w : E) (s : Set X) (hs : MeasurableSet s) : + (M.measure (v + w)).real s ≤ 2 * ((M.measure v).real s + (M.measure w).real s) := by + rw [measure_real M _ s hs, measure_real M _ s hs, measure_real M _ s hs] + have hD := M.massOperator_isPositive s hs + have hp := hD.inner_nonneg_right (v - w) + have hsym : ⟪w, M.massOperator s v⟫_ℝ = ⟪v, M.massOperator s w⟫_ℝ := by + rw [real_inner_comm, hD.inner_left_eq_inner_right] + simp only [map_sub, inner_sub_left, inner_sub_right, hsym] at hp + simp only [map_add, inner_add_left, inner_add_right, hsym] + linarith + +/-- Covariance for the actual positive diagonal measures. -/ +theorem comap_measure_real (A : E →L[ℝ] E) (v : E) (s : Set X) + (hs : MeasurableSet s) : + ((M.comap A.toLinearMap).measure v).real s = (M.measure (A v)).real s := by + rw [measure_real _ _ s hs, comap_massOperator, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.adjoint_inner_right, ContinuousLinearMap.comp_apply, + measure_real _ _ s hs] + +section Trace + +variable {n : ℕ} (N : PositiveBilinearMeasure X (Euclidean n)) + +def traceMass (s : Set X) : ℝ := + ∑ i : Fin n, (N.measure (EuclideanSpace.single i 1)).real s + +theorem traceMass_nonneg (s : Set X) : 0 ≤ N.traceMass s := + Finset.sum_nonneg fun _ _ => ENNReal.toReal_nonneg + +/-- Positivity bounds every matrix entry by its trace. -/ +theorem mass_entry_le_trace (s : Set X) (hs : MeasurableSet s) (i j : Fin n) : + |N.massOperator s (EuclideanSpace.single j 1) i| ≤ N.traceMass s := by + let ei : Euclidean n := EuclideanSpace.single i 1 + let ej : Euclidean n := EuclideanSpace.single j 1 + let D := N.massOperator s + have hD := N.massOperator_isPositive s hs + have hii : ⟪ei, D ei⟫_ℝ ≤ N.traceMass s := by + rw [← N.measure_real ei s hs] + change (N.measure (EuclideanSpace.single i 1)).real s ≤ + ∑ j : Fin n, (N.measure (EuclideanSpace.single j 1)).real s + exact Finset.single_le_sum + (f := fun k : Fin n => (N.measure (EuclideanSpace.single k 1)).real s) + (fun _ _ => ENNReal.toReal_nonneg) (Finset.mem_univ i) + have hjj : ⟪ej, D ej⟫_ℝ ≤ N.traceMass s := by + rw [← N.measure_real ej s hs] + change (N.measure (EuclideanSpace.single j 1)).real s ≤ + ∑ i : Fin n, (N.measure (EuclideanSpace.single i 1)).real s + exact Finset.single_le_sum + (f := fun k : Fin n => (N.measure (EuclideanSpace.single k 1)).real s) + (fun _ _ => ENNReal.toReal_nonneg) (Finset.mem_univ j) + have hp := positive_form_cauchy_schwarz hD ei ej + have habs : |⟪ei, D ej⟫_ℝ| ≤ (⟪ei, D ei⟫_ℝ + ⟪ej, D ej⟫_ℝ) / 2 := by + have hsum := add_nonneg (hD.inner_nonneg_right ei) (hD.inner_nonneg_right ej) + nlinarith [sq_abs ⟪ei, D ej⟫_ℝ, sq_nonneg (⟪ei, D ei⟫_ℝ - ⟪ej, D ej⟫_ℝ), + abs_nonneg ⟪ei, D ej⟫_ℝ] + have he := habs.trans (by linarith : + (⟪ei, D ei⟫_ℝ + ⟪ej, D ej⟫_ℝ) / 2 ≤ N.traceMass s) + simpa only [ei, ej, D, EuclideanSpace.inner_single_left, conj_trivial, one_mul] using he + +theorem massOperator_norm_le_trace (s : Set X) (hs : MeasurableSet s) : + ‖N.massOperator s‖ ≤ (n : ℝ) ^ 2 * N.traceMass s := + euclidean_operator_norm_le_of_entries _ (N.traceMass_nonneg s) (N.mass_entry_le_trace s hs) + +end Trace + +end PositiveBilinearMeasure + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PositiveForms.lean b/lean/OAI/Geometry/RCD/Coordinates/PositiveForms.lean new file mode 100644 index 0000000000000000000000000000000000000000..c37b6fb5738fb4e100ef356e3f5d273396c67df5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PositiveForms.lean @@ -0,0 +1,78 @@ +import Mathlib.Analysis.InnerProductSpace.Positive +import Mathlib.Algebra.QuadraticDiscriminant +import Mathlib.Tactic + +namespace OAI + +/-! +# Directional estimates for positive local mass forms + +These are the two positive-matrix inequalities in `re:positive-matrix-bound`, +in coordinates where the frozen metric is the identity. Positivity permits +singular mass forms; no inverse of a local mass matrix is used. +-/ + +open scoped InnerProductSpace + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Cauchy--Schwarz for a possibly degenerate positive quadratic form. -/ +theorem positive_form_cauchy_schwarz {D : E →L[ℝ] E} (hD : D.IsPositive) (x y : E) : + ⟪x, D y⟫_ℝ ^ 2 ≤ ⟪x, D x⟫_ℝ * ⟪y, D y⟫_ℝ := by + have hsym : ⟪y, D x⟫_ℝ = ⟪x, D y⟫_ℝ := by + rw [real_inner_comm, hD.inner_left_eq_inner_right] + have hpoly : ∀ t : ℝ, + 0 ≤ ⟪y, D y⟫_ℝ * (t * t) + (2 * ⟪x, D y⟫_ℝ) * t + ⟪x, D x⟫_ℝ := by + intro t + have h := hD.inner_nonneg_right (x + t • y) + simp only [map_add, map_smul, inner_add_left, inner_add_right, + inner_smul_left, inner_smul_right, conj_trivial, hsym] at h + nlinarith + have hdisc := discrim_le_zero hpoly + unfold discrim at hdisc + nlinarith + +/-- The directional Cauchy--Schwarz inequality in the form used for cutoffs. -/ +theorem positive_form_inner_abs_le {D : E →L[ℝ] E} (hD : D.IsPositive) (x y : E) : + |⟪x, D y⟫_ℝ| ≤ Real.sqrt ⟪x, D x⟫_ℝ * Real.sqrt ⟪y, D y⟫_ℝ := by + have h := positive_form_cauchy_schwarz hD x y + have hx := Real.sq_sqrt (hD.inner_nonneg_right x) + have hy := Real.sq_sqrt (hD.inner_nonneg_right y) + have hs : 0 ≤ Real.sqrt ⟪x, D x⟫_ℝ * Real.sqrt ⟪y, D y⟫_ℝ := by positivity + have habs := sq_abs ⟪x, D y⟫_ℝ + nlinarith + +/-- A small positive form controls the Euclidean norm of its value by its +own directional energy. -/ +theorem positive_form_norm_sq_le {D : E →L[ℝ] E} (hD : D.IsPositive) + {epsilon : ℝ} (hbound : ∀ v, ⟪v, D v⟫_ℝ ≤ epsilon * ‖v‖ ^ 2) (w : E) : + ‖D w‖ ^ 2 ≤ epsilon * ⟪w, D w⟫_ℝ := by + have henergy := hD.inner_nonneg_right w + have hcs := positive_form_cauchy_schwarz hD (D w) w + rw [real_inner_self_eq_norm_sq] at hcs + have hsmall := mul_le_mul_of_nonneg_right (hbound (D w)) henergy + by_cases hzero : ‖D w‖ = 0 + · rw [hzero] + have hDzero : D w = 0 := norm_eq_zero.mp hzero + simp [hDzero] + have hpos : 0 < ‖D w‖ ^ 2 := sq_pos_of_ne_zero hzero + nlinarith + +/-- The norm estimate in square-root form, as used for the patch field. -/ +theorem positive_form_norm_le {D : E →L[ℝ] E} (hD : D.IsPositive) + {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hbound : ∀ v, ⟪v, D v⟫_ℝ ≤ epsilon * ‖v‖ ^ 2) (w : E) : + ‖D w‖ ≤ Real.sqrt epsilon * Real.sqrt ⟪w, D w⟫_ℝ := by + have h := positive_form_norm_sq_le hD hbound w + have henergy := hD.inner_nonneg_right w + have hroot : (Real.sqrt epsilon * Real.sqrt ⟪w, D w⟫_ℝ) ^ 2 = + epsilon * ⟪w, D w⟫_ℝ := by + rw [mul_pow, Real.sq_sqrt hepsilon, Real.sq_sqrt henergy] + have hrootpos : 0 ≤ Real.sqrt epsilon * Real.sqrt ⟪w, D w⟫_ℝ := by positivity + nlinarith [norm_nonneg (D w)] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ProjectionAffineNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/ProjectionAffineNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..43e42d46f8020392c5761ea88bd72151d67b451e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ProjectionAffineNormalization.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Harmonic.ScaledHarmonicAffine +import OAI.Geometry.RCD.Coordinates.ExactNormalizationComparison +import OAI.Geometry.RCD.Coordinates.LinearNormalization +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Metric.VolumeRigidityInput +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # Affine nondegeneracy at the two actual projection radii -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A splitting frame normalized on the large ball gives both affine +bounds needed by the actual projection. The small-ball normalizer is +constructed from the positive Gram, then compared to that same large frame. -/ +theorem projection_affine_bounds {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ H : ℝ, 0 ≤ H ∧ ∀ (p : X) (s R : ℝ), 0 < s → s / 4096 ≤ R → R ≤ s → + -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (V W : X → Euclidean n) + (N : Euclidean n ≃L[ℝ] Euclidean n) (epsilon : ℝ), 0 ≤ epsilon → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (16384 : ℝ) ^ n) * epsilon) ≤ 1 / 2 → + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (2 * s)) (u j)) → + ContinuousOn V (ball p (2 * s)) → V p = 0 → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p (2 * s))] fun x => V x j) → + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * s) epsilon + (transformedColumn (hausdorff n X) hX.quadratic u N) W → + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) (ball p (2 * s)) measurableSet_ball N → + (∀ t : ℝ, 0 < t → t ≤ 2 * s → + |(hausdorff n X).real (ball p t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) → + ∀ eta : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic eta =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ c a, |c| + s * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + obtain ⟨Cg, Cm, hCg, hCm, hbound⟩ := scaled_harmonic_affine_nondegeneracy hgradient hmean hn hκ + refine ⟨8193 * (Cm + Cg), by linarith, ?_⟩ + intro p s R hs hRlo hRhi hcurv u V W N epsilon hepsilon hsmall hu hV hcenter hrep hfirst hN hvolume eta heta c a + let μ := hausdorff n X + let hQ := hX.quadratic + let Cvol := (5 / 3 : ℝ) * (16384 : ℝ) ^ n + have hCvol : 0 ≤ Cvol := by dsimp only [Cvol]; positivity + let U := sobolevColumnMap μ hQ u + have hR : 0 < R := lt_of_lt_of_le (by positivity : 0 < s / 4096) hRlo + have hsub : ball p (R / 2) ⊆ ball p (2 * s) := ball_subset_ball (by linarith) + have hpos : 0 < μ.real (ball p (R / 2)) := + (quarter_volume_bounds (by positivity : 0 < R / 2) (euclideanUnitVolume_pos n) + (hvolume (R / 2) (by positivity) (by linarith))).1 + have hsmallpos : 0 < μ.real (ball p (s / 8192)) := + (quarter_volume_bounds (by positivity : 0 < s / 8192) (euclideanUnitVolume_pos n) + (hvolume (s / 8192) (by positivity) (by linarith))).1 + have hvol : μ.real (ball p (2 * s)) ≤ Cvol * μ.real (ball p (R / 2)) := by + have hh := radial_fraction_volume_ratio (by positivity : 0 < 2 * s) + (by norm_num : (0 : ℝ) < 1 / 16384) (euclideanUnitVolume_pos n) + (hvolume (2 * s) (by positivity) le_rfl) + (hvolume ((1 / 16384) * (2 * s)) (by positivity) (by linarith)) + have heq : (1 / 16384 : ℝ) * (2 * s) = s / 8192 := by ring + have hpow : ((1 / 16384 : ℝ) ^ n)⁻¹ = (16384 : ℝ) ^ n := by simp + rw [heq, hpow] at hh + have hi := (div_le_iff₀ hsmallpos).mp hh + exact hi.trans (mul_le_mul_of_nonneg_left + (measureReal_mono (ball_subset_ball (by linarith : s / 8192 ≤ R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))) hCvol) + have hcompare (v : Euclidean n) : ‖N.symm v‖ ^ 2 ≤ + 2 * ⟪v, sobolevMeanGram μ hQ U (ball p (R / 2)) measurableSet_ball v⟫_ℝ := by + have hh := (exact_normalization_subball_bounds μ hQ u N hfirst hN + (ball p (R / 2)) measurableSet_ball hsub + (ne_of_gt (hX.fullSupport p (R / 2) (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport p (2 * s) (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + hCvol hepsilon hvol v).1 + rw [meanGram_energy_of_exact_normalization μ hQ U (ball p (2 * s)) measurableSet_ball N hN] at hh + have hmul := mul_le_mul_of_nonneg_right hsmall (sq_nonneg ‖N.symm v‖) + change (n : ℝ) ^ 2 * (Cvol * epsilon) * ‖N.symm v‖ ^ 2 ≤ (1 / 2) * ‖N.symm v‖ ^ 2 at hmul + nlinarith only [hh, hmul] + obtain ⟨Ninner, hinner⟩ := exists_exact_mean_normalization μ hQ U (ball p (R / 2)) + measurableSet_ball (by + intro v hv + have hnv : N.symm v ≠ 0 := by + intro hz + apply hv + have hh := congrArg N hz + simpa only [N.apply_symm_apply, map_zero] using hh + have hp := sq_pos_of_pos (norm_pos_iff.mpr hnv) + nlinarith only [hcompare v, hp]) + have hframe (v : Euclidean n) : ‖N.symm v‖ ≤ 2 * ‖Ninner.symm v‖ := by + have hh := hcompare v + rw [meanGram_energy_of_exact_normalization μ hQ U (ball p (R / 2)) measurableSet_ball Ninner hinner] at hh + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + nlinarith [sq_nonneg ‖Ninner.symm v‖] + have hRsub : ball p R ⊆ ball p (2 * s) := ball_subset_ball (by linarith) + have hh := hbound p R hR hcurv u V (fun j => (hu j).mono μ hQ hRsub) + (hV.mono hRsub) hcenter + (fun j => ae_restrict_of_ae_restrict_of_subset hRsub (hrep j)) Ninner hinner eta heta c a + let alpha := ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ + have hconstant : |c| ≤ (Cm + Cg) * alpha := by + change |c| + R * ‖Ninner.symm a‖ ≤ (Cm + Cg) * alpha at hh + nlinarith [mul_nonneg hR.le (norm_nonneg (Ninner.symm a))] + have hlinear : R * ‖Ninner.symm a‖ ≤ (Cm + Cg) * alpha := by + change |c| + R * ‖Ninner.symm a‖ ≤ (Cm + Cg) * alpha at hh + linarith [abs_nonneg c] + have hterm : s * ‖N.symm a‖ ≤ 8192 * (R * ‖Ninner.symm a‖) := by + have hx := mul_le_mul_of_nonneg_left (hframe a) hs.le + have hy := mul_le_mul_of_nonneg_right hRlo (norm_nonneg (Ninner.symm a)) + nlinarith only [hx, hy] + have hfinal := mul_le_mul_of_nonneg_left hlinear (by norm_num : (0 : ℝ) ≤ 8192) + change |c| + s * ‖N.symm a‖ ≤ 8193 * (Cm + Cg) * alpha + nlinarith only [hconstant, hterm, hfinal] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ProjectionCoordinateValues.lean b/lean/OAI/Geometry/RCD/Coordinates/ProjectionCoordinateValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1aaa03f4919e1c78bfd6fbe5d44cd56a5c15ed7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ProjectionCoordinateValues.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Harmonic.ProjectionResidualValues +import OAI.Geometry.RCD.Harmonic.MetricQuadraticError + +namespace OAI + +/-! # Actual centered coordinate bounds on the projection region -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- The existing metric approximation supplies the physical coordinate +value estimate used in the two-center projection. The bound is uniform +in the scale, frame, and covector. -/ +theorem projection_coordinate_values {n : ℕ} {p : X} {s epsilon : ℝ} + (hs : 0 < s) (hepsilon : epsilon ≤ 1) + (u : Fin n → SobolevSpace μ hQ) (V : X → Euclidean n) + (N : Euclidean n ≃L[ℝ] Euclidean n) (hcenter : V p = 0) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[ + μ.restrict (ball p (s / 512))] fun x => V x j) + (hmetric : IsPointedApproximation p 0 (s / 64) 4 epsilon + (fun x => (s / 64)⁻¹ • (N : Euclidean n →L[ℝ] Euclidean n).adjoint (V x))) : + ∀ b : Euclidean n, ∀ᵐ x ∂μ.restrict (ball p (s / 512)), + |SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)) x| ≤ s * ‖b‖ := by + have hvalue : ∀ᵐ x ∂μ.restrict (ball p (s / 512)), + ‖(N : Euclidean n →L[ℝ] Euclidean n).adjoint (V x)‖ ≤ 1 * s := by + filter_upwards [ae_restrict_mem measurableSet_ball] with x hx + have hdist : dist x p ≤ 4 * (s / 64) := by + have hx' := mem_ball.mp hx + linarith + have hn := (hmetric.centered_norm_error (by positivity : 0 < s / 64) + (by norm_num) (by rw [hcenter, map_zero, smul_zero]) hdist).2 + rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr (by positivity : 0 < s / 64))] at hn + have hh := mul_le_mul_of_nonneg_left hn (by positivity : 0 ≤ s / 64) + rw [← mul_assoc, mul_inv_cancel₀ (by positivity : s / 64 ≠ 0), one_mul] at hh + have hb := mul_le_mul_of_nonneg_left hepsilon hs.le + nlinarith only [hh, hb, hs] + intro b + simpa only [one_mul] using framed_coordinate_value_bound μ hQ (ball p (s / 512)) + u V N hrep hvalue b + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ProjectionMeasuredCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/ProjectionMeasuredCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..e625697c3fce7b748e3a07a033701d97edd0cb7d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ProjectionMeasuredCoordinates.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinateInput +import OAI.Geometry.RCD.Harmonic.MetricQuadraticError +import OAI.Geometry.RCD.Coordinates.MetricDyadicNormalization + +namespace OAI + +/-! # The actual metric coordinates on the projection ball -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] + +/-- The controlled-normalization theorem uses a half-ball in units s/8. +This is the same physical ball as the radial fit's radius-four ball in +units s/64, with the exact corresponding error conversion. -/ +theorem radial_metric_from_controlled {n : ℕ} {p : X} {s epsilon : ℝ} + (hs : 0 < s) (V : X → Euclidean n) + (hf : IsPointedApproximation p 0 (s / 8) (1 / 2) epsilon + (fun x => (s / 8)⁻¹ • V x)) : + IsPointedApproximation p 0 (s / 64) 4 (8 * epsilon) + (fun x => (s / 64)⁻¹ • V x) := by + have hrad : s / 8 = 8 * (s / 64) := by ring + rw [hrad] at hf + have hh := hf.rescale_eight (by positivity : 0 < s / 64) + have hscale : (8 : ℝ) * (8 * (s / 64))⁻¹ = (s / 64)⁻¹ := by field_simp + simpa only [smul_smul, hscale] using hh + +/-- Restrict the centered metric map used by the radial fits and express +it in the length units of the two-center projection. -/ +theorem projection_metric_rescale {n : ℕ} {p : X} {s delta : ℝ} + (hs : 0 < s) (hdelta : 0 ≤ delta) (f : X → Euclidean n) (hcenter : f p = 0) + (hf : IsPointedApproximation p 0 (s / 64) 4 delta f) : + IsPointedApproximation p 0 s (2 * (1 / 1024)) (delta / 32) + (fun x => (1 / 64 : ℝ) • f x) := by + have hr : 0 < s / 64 := by positivity + refine ⟨by simp only [hcenter, smul_zero, dist_self]; positivity, ?_, ?_⟩ + · intro x y hx hy + have hx' : dist x p ≤ 4 * (s / 64) := by linarith + have hy' : dist y p ≤ 4 * (s / 64) := by linarith + have hh := hf.2.1 x y hx' hy' + rw [dist_smul₀, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 64)] + have heq : (1 / 64 : ℝ) * dist (f x) (f y) - dist x y / s = + (1 / 64 : ℝ) * (dist (f x) (f y) - dist x y / (s / 64)) := by + field_simp + rw [heq, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 64)] + nlinarith + · intro y hy + have hy' : dist ((64 : ℝ) • y) (0 : Euclidean n) ≤ 4 - delta := by + rw [dist_zero_right, norm_smul, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 64)] + rw [dist_zero_right] at hy + nlinarith + obtain ⟨x, hx, hxy⟩ := hf.2.2 ((64 : ℝ) • y) hy' + have hnorm : ‖f x‖ ≤ 64 * ‖y‖ + delta := by + have hh := norm_le_norm_add_norm_sub ((64 : ℝ) • y) (f x) + rw [norm_sub_rev ((64 : ℝ) • y) (f x)] at hh + rw [norm_smul, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 64)] at hh + rw [dist_eq_norm] at hxy + linarith + have hdist := (hf.centered_norm_error hr (by norm_num) hcenter hx).1 + have hdist' : dist x p / (s / 64) ≤ 64 * ‖y‖ + 2 * delta := by + linarith [(abs_le.mp hdist).1] + have hxsmall : dist x p ≤ (2 * (1 / 1024 : ℝ)) * s := by + rw [dist_zero_right] at hy + have hh : dist x p / (s / 64) ≤ 1 / 8 := by nlinarith + have hh' := (div_le_iff₀ hr).mp hh + linarith + refine ⟨x, hxsmall, ?_⟩ + have hyid : y = (1 / 64 : ℝ) • ((64 : ℝ) • y) := by simp [smul_smul] + calc + dist ((1 / 64 : ℝ) • f x) y = + dist ((1 / 64 : ℝ) • f x) ((1 / 64 : ℝ) • ((64 : ℝ) • y)) := by rw [← hyid] + _ = (1 / 64 : ℝ) * dist (f x) ((64 : ℝ) • y) := by + rw [dist_smul₀, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 64)] + _ ≤ delta / 32 := by nlinarith + +variable [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +/-- The published measured-convergence input applies to the same centered +coordinates used by the radial argument, at the fixed projection radius. -/ +theorem projection_measured_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hmeasured : LocalMeasuredCoordinateInput hX) {epsilon : ℝ} (hepsilon : 0 < epsilon) : + ∃ delta : ℝ, 0 < delta ∧ ∀ (p : X) (s : ℝ), 0 < s → + -delta / 32 ≤ K * s ^ 2 → + ∀ f : X → Euclidean n, Measurable f → f p = 0 → + IsPointedApproximation p 0 (s / 64) 4 delta f → + IsMeasuredEuclideanApproximation (hausdorff n X) n p s (1 / 1024) epsilon + (fun x => (1 / 64 : ℝ) • f x) := by + obtain ⟨eta, heta, happly⟩ := hmeasured hn (1 / 1024) epsilon (by norm_num) hepsilon + refine ⟨32 * eta, by positivity, ?_⟩ + intro p s hs hcurv f hmeas hcenter hf + apply happly p s hs (by nlinarith) (fun x => (1 / 64 : ℝ) • f x) + ((continuous_const_smul (1 / 64 : ℝ)).measurable.comp hmeas) + simpa only [mul_div_cancel_left₀ eta (by norm_num : (32 : ℝ) ≠ 0)] using + projection_metric_rescale hs (by positivity : 0 ≤ 32 * eta) f hcenter hf + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/Proper.lean b/lean/OAI/Geometry/RCD/Coordinates/Proper.lean new file mode 100644 index 0000000000000000000000000000000000000000..c40cd57f16229c0e7cc7276f80fe15779d9a7de7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/Proper.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.RCD.Coordinates.PatchCover +import OAI.Analysis.RCDHeat.VolumeComparison + +namespace OAI + +/-! # Properness from the actual curvature-dimension volume bound + +The existing `FullCD.ball_ratio` theorem bounds the mass of every small +ball centered in a bounded region from below. Disjoint small balls therefore +bound every separated set. The resulting finite nets prove total boundedness; +completeness then gives properness. No compactness hypothesis is added. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +omit [MeasurableSpace X] [BorelSpace X] in +private theorem separated_encard_le_of_finset_bound {A : Set X} {r : ℝ≥0} {N : ℕ} + (hbound : ∀ s : Finset X, (s : Set X) ⊆ A → + (s : Set X).Pairwise (fun x y => (r : ℝ) ≤ dist x y) → s.card ≤ N) + {C : Set X} (hCA : C ⊆ A) (hC : Metric.IsSeparated r C) : C.encard ≤ N := by + classical + have hsbound (s : Finset X) (hsC : (s : Set X) ⊆ C) : s.card ≤ N := by + apply hbound s (hsC.trans hCA) + intro x hx y hy hxy + have hh := hC (hsC hx) (hsC hy) hxy + have hd : r < nndist x y := by + simpa only [edist_nndist, ENNReal.coe_lt_coe] using hh + exact_mod_cast hd.le + have hfin : C.Finite := by + by_contra hinf + obtain ⟨t, htC, htfin, htcard⟩ := Set.Infinite.exists_subset_ncard_eq hinf (N + 1) + have hh := hsbound htfin.toFinset (by simpa only [htfin.coe_toFinset] using htC) + rw [← Set.ncard_coe_finset, htfin.coe_toFinset, htcard] at hh + omega + rw [hfin.encard_eq_coe_toFinset_card] + exact_mod_cast hsbound hfin.toFinset (by simp) + +/-- Every bounded ball is totally bounded, directly from CD volume comparison. -/ +theorem NoncollapsedRCD.totallyBounded_closedBall {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) (R : ℝ) : + TotallyBounded (closedBall p R) := by + classical + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + by_cases hR : R < 0 + · simp only [closedBall_eq_empty.mpr hR] + exact totallyBounded_empty + have hR0 : 0 ≤ R := le_of_not_gt hR + apply Metric.totallyBounded_iff.mpr + intro epsilon hepsilon + let r : ℝ≥0 := ⟨min (epsilon / 2) 1, le_of_lt (lt_min (by positivity) zero_lt_one)⟩ + have hr : 0 < (r : ℝ) := lt_min (by positivity) zero_lt_one + have hr1 : (r : ℝ) ≤ 1 := min_le_right _ _ + have hre : (r : ℝ) < epsilon := (min_le_left _ _).trans_lt (by linarith) + let T := R + 1 + have hT : 0 < T := by dsimp only [T]; linarith only [hR0] + have hrT : (r : ℝ) / 2 ≤ T := by dsimp only [T]; linarith only [hr1, hR0] + let b := distortionFloor K n (2 * T) ((r : ℝ) / 2 / T) ^ n + have hb0 : b ≠ 0 := by + dsimp only [b, distortionFloor] + exact pow_ne_zero _ (ne_of_gt (ENNReal.ofReal_pos.mpr (by positivity))) + have hbt : b ≠ ∞ := by + dsimp only [b, distortionFloor] + exact ENNReal.pow_ne_top ENNReal.ofReal_ne_top + let v := (b * (hausdorff n X) (ball p 1)).toReal + have hv : 0 < v := ENNReal.toReal_pos + (mul_ne_zero hb0 (ne_of_gt (hX.fullSupport p 1 zero_lt_one))) + (ENNReal.mul_ne_top hbt (hX.finiteOnBounded _ isBounded_ball).ne) + have hlower (y : X) (hy : y ∈ closedBall p R) : + v ≤ (hausdorff n X).real (ball y ((r : ℝ) / 2)) := by + have hsub : ball p 1 ⊆ ball y T := by + apply Metric.ball_subset_ball' + change 1 + dist p y ≤ R + 1 + have hh : dist y p ≤ R := hy + rw [dist_comm] + linarith only [hh] + have hratio := hX.cd.ball_ratio (hausdorff n X) K n hX.fullSupport hX.finiteOnBounded + hn y ((r : ℝ) / 2) T (by positivity) hrT + have hh : b * (hausdorff n X) (ball p 1) ≤ + (hausdorff n X) (ball y ((r : ℝ) / 2)) := + (mul_le_mul' le_rfl (measure_mono hsub)).trans hratio + exact ENNReal.toReal_mono (hX.finiteOnBounded _ isBounded_ball).ne hh + let N : ℕ := ⌈(hausdorff n X).real (ball p (R + (r : ℝ) / 2)) / v⌉₊ + have hcard (s : Finset X) (hs : (s : Set X) ⊆ closedBall p R) + (hsep : (s : Set X).Pairwise (fun x y => (r : ℝ) ≤ dist x y)) : s.card ≤ N := by + have hh := separated_card_mul_volume_le (hausdorff n X) s p hsep + (fun y hy => hs hy) (fun y hy => hlower y (hs hy)) + (hX.finiteOnBounded _ isBounded_ball).ne + have hb := (le_div_iff₀ hv).mpr hh + exact_mod_cast hb.trans (Nat.le_ceil _) + have hpacking : Metric.packingNumber r (closedBall p R) ≠ ⊤ := by + apply ne_top_of_le_ne_top (by simp : (N : ℕ∞) ≠ ⊤) + exact iSup_le fun C => iSup_le fun hCA => iSup_le fun hC => + separated_encard_le_of_finset_bound hcard hCA hC + let C := Metric.maximalSeparatedSet r (closedBall p R) + have hfinite : C.Finite := finite_maximalSeparatedSet r _ + have hcover := Metric.isCover_maximalSeparatedSet hpacking + refine ⟨C, hfinite, ?_⟩ + intro x hx + obtain ⟨y, hy, hxy⟩ := hcover hx + change edist x y ≤ (r : ℝ≥0∞) at hxy + refine mem_iUnion₂.mpr ⟨y, hy, ?_⟩ + have hh : nndist x y ≤ r := by + simpa only [edist_nndist, ENNReal.coe_le_coe] using hxy + have hd : dist x y ≤ (r : ℝ) := by exact_mod_cast hh + exact hd.trans_lt hre + +/-- The proper-space assumption of the conditional chart theorem is itself +an RCD consequence in the manuscript's dimension range. -/ +theorem NoncollapsedRCD.properSpace {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) : ProperSpace X := by + let := hX.complete + refine ⟨fun p R => ?_⟩ + exact isCompact_iff_totallyBounded_isComplete.mpr + ⟨hX.totallyBounded_closedBall hn p R, isClosed_closedBall.isComplete⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/PullbackDensityLaws.lean b/lean/OAI/Geometry/RCD/Coordinates/PullbackDensityLaws.lean new file mode 100644 index 0000000000000000000000000000000000000000..17d72b11d5c61bf110abce820f86cf176625d647 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/PullbackDensityLaws.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedDensityLaw + +namespace OAI + +/-! # Actual source probability densities with prescribed Euclidean limits -/ + +open Set Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MeasurableSpace X] + [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + +private theorem pullback_density_integrable (P : ProbabilityMeasure X) + (v : X → Y) (hv : Measurable v) (f : Y →ᵇ ℝ) : + Integrable (fun x => f (v x)) (P : Measure X) := + (integrable_const ‖f‖).mono' (f.continuous.measurable.comp hv).aestronglyMeasurable + (Eventually.of_forall fun x => f.norm_coe_le_norm (v x)) + +def pullbackDensityLaw (P : ProbabilityMeasure X) (v : X → Y) (hv : Measurable v) + (f : Y →ᵇ ℝ) (hn : ∀ y, 0≤f y) (hp : 0<∫ x, f (v x) ∂(P : Measure X)) : + ProbabilityMeasure X := + normalizedDensityLaw (P : Measure X) + (pullback_density_integrable P v hv f) (fun x => hn (v x)) hp + +theorem pullbackDensityLaw_integral (P : ProbabilityMeasure X) (v : X → Y) (hv : Measurable v) + (f : Y →ᵇ ℝ) (hn : ∀ y, 0≤f y) (hp : 0<∫ x, f (v x) ∂(P : Measure X)) (g : X → ℝ) : + (∫ x, g x ∂(pullbackDensityLaw P v hv f hn hp : Measure X))= + (∫ x, f (v x) ∂(P : Measure X))⁻¹*(∫ x, f (v x)*g x ∂(P : Measure X)) := + normalizedDensityLaw_integral _ (f.continuous.measurable.comp hv) _ _ _ g + +theorem pullback_density_mass_tendsto (P : ℕ → ProbabilityMeasure X) (v : ℕ → X → Y) + (hv : ∀ k, Measurable (v k)) {ν : ProbabilityMeasure Y} + (hweak : Tendsto (fun k => (P k).map (v k)) atTop (𝓝 ν)) (f : Y →ᵇ ℝ) : + Tendsto (fun k => ∫ x, f (v k x) ∂(P k : Measure X)) atTop + (𝓝 (∫ y, f y ∂(ν : Measure Y))) := by + have ht := ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mp hweak f + simp_rw [ProbabilityMeasure.toMeasure_map,integral_map (hv _).aemeasurable + f.continuous.aestronglyMeasurable] at ht + exact ht + +theorem pullback_density_laws_tendsto (P : ℕ → ProbabilityMeasure X) (v : ℕ → X → Y) + (hv : ∀ k, Measurable (v k)) {ν : ProbabilityMeasure Y} + (hweak : Tendsto (fun k => (P k).map (v k)) atTop (𝓝 ν)) + (f : Y →ᵇ ℝ) (hn : ∀ y, 0≤f y) (hp : 0<∫ y, f y ∂(ν : Measure Y)) + (hps : ∀ k, 0<∫ x, f (v k x) ∂(P k : Measure X)) : + Tendsto (fun k => (pullbackDensityLaw (P k) (v k) (hv k) f hn (hps k)).map (v k)) atTop + (𝓝 (normalizedDensityLaw (ν : Measure Y) (f.integrable _) hn hp)) := by + apply ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mpr + intro g + have hnum := pullback_density_mass_tendsto P v hv hweak (f*g) + have hden := pullback_density_mass_tendsto P v hv hweak f + have ht := (hden.inv₀ hp.ne').mul hnum + simpa only [ProbabilityMeasure.toMeasure_map, + integral_map (hv _).aemeasurable g.continuous.aestronglyMeasurable, + pullbackDensityLaw_integral,normalizedDensityLaw_integral _ f.continuous.measurable, + BoundedContinuousFunction.mul_apply] using ht + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/QuadraticCoordinateGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/QuadraticCoordinateGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2adfea776245bbdb5c8693d0d9e0a5ccaa1f883 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/QuadraticCoordinateGradient.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicQuadraticPotential + +namespace OAI + +/-! # The actual gradient of the quadratic coordinate model -/ + +open Set MeasureTheory +open scoped NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +private theorem half_square_gamma (u a : SobolevSpace μ hQ) (C : ℝ≥0) + (hu : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x| ≤ C) : + localGamma μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ u C) a =ᵐ[μ] + fun x => SobolevSpace.toLp μ hQ u x * localGamma μ hQ u a x := by + filter_upwards [localGamma_smul_left μ hQ (1 / 2 : ℝ) (SobolevSpace.square μ hQ u C) a, + localGamma_square μ hQ u a C hu] with x hsm hsq + rw [hsm, hsq] + ring + +private theorem finite_half_square_gamma {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (C : ℝ≥0) (a : SobolevSpace μ hQ) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (s : Finset (Fin n)) : + localGamma μ hQ (∑ j ∈ s, (1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C) a =ᵐ[μ] + fun x => ∑ j ∈ s, SobolevSpace.toLp μ hQ (u j) x * localGamma μ hQ (u j) a x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty, zero_smul, zero_mul] using + localGamma_smul_left μ hQ 0 (0 : SobolevSpace μ hQ) a + | @insert j s hj ih => + simp only [Finset.sum_insert hj] + filter_upwards [localGamma_add_left μ hQ + ((1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C) + (∑ k ∈ s, (1 / 2 : ℝ) • SobolevSpace.square μ hQ (u k) C) a, + half_square_gamma μ hQ (u j) a C (hu j), ih] with x hadd hsingle hsum + rw [hadd, hsingle, hsum] + +theorem coordinateQuadratic_gradient {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (C : ℝ≥0) (a : SobolevSpace μ hQ) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) : + localGamma μ hQ (coordinateQuadratic μ hQ u C) a =ᵐ[μ] + fun x => ∑ j, SobolevSpace.toLp μ hQ (u j) x * localGamma μ hQ (u j) a x := + finite_half_square_gamma μ hQ u C a hu Finset.univ + +/-- The quadratic model has the expected energy density, with the actual +coordinate Gram entries. No Euclidean identity for that Gram is assumed. -/ +theorem coordinateQuadratic_gradient_self {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (C : ℝ≥0) (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) : + localGamma μ hQ (coordinateQuadratic μ hQ u C) (coordinateQuadratic μ hQ u C) =ᵐ[μ] + fun x => ∑ i, ∑ j, (SobolevSpace.toLp μ hQ (u i) x * SobolevSpace.toLp μ hQ (u j) x) * + localGamma μ hQ (u j) (u i) x := by + have hi (i : Fin n) : localGamma μ hQ (u i) (coordinateQuadratic μ hQ u C) =ᵐ[μ] + fun x => ∑ j, SobolevSpace.toLp μ hQ (u j) x * localGamma μ hQ (u j) (u i) x := + (localGamma_comm μ hQ (u i) _).trans (coordinateQuadratic_gradient μ hQ u C (u i) hu) + have hall := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun i _ => hi i) + filter_upwards [coordinateQuadratic_gradient μ hQ u C (coordinateQuadratic μ hQ u C) hu, + hall] with x hx hix + rw [hx] + apply Finset.sum_congr rfl + intro i hi + rw [hix i hi, Finset.mul_sum] + exact Finset.sum_congr rfl fun j _ => by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/QuadraticMetricError.lean b/lean/OAI/Geometry/RCD/Coordinates/QuadraticMetricError.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c936899c060ac99d4641ab8785ddf2cd22710a0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/QuadraticMetricError.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance + +namespace OAI + +/-! # Quantitative squared-distance errors for variational test recovery -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates + +theorem sq_error_of_abs_sub_le {a b B ε : ℝ} (ha : 0≤a) (hb : 0≤b) + (hbB : b≤B) (hε : 0≤ε) (he : |a-b|≤ε) : + |a^2-b^2|≤ε*(2*B+ε) := by + have hpm := abs_le.mp he + rw [sq_sub_sq,abs_mul] + have hab : 0≤a+b := add_nonneg ha hb + rw [abs_of_nonneg hab] + simpa only [mul_comm] using (mul_le_mul_of_nonneg_right he hab).trans + (mul_le_mul_of_nonneg_left (show a+b≤2*B+ε by linarith) hε) + +theorem pointed_square_distance_error {X : Type*} [MetricSpace X] + {n : ℕ} {p x y : X} {r S ε B : ℝ} {v : X → Euclidean n} + (hr : 0 (N.symm (coeff i)) j + +/-- The stacked coefficient matrix acts on normalized coordinate values +by the original scalar affine coefficients. -/ +theorem radialCoefficientMatrix_action {n : ℕ} + (N : Euclidean n ≃L[ℝ] Euclidean n) (coeff : Fin n → Euclidean n) + (x : Euclidean n) (i : Fin n) : + Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) (radialCoefficientMatrix N coeff) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint x) i = ⟪x, coeff i⟫_ℝ := by + have hi := ContinuousLinearMap.adjoint_inner_left (N : Euclidean n →L[ℝ] Euclidean n) + (N.symm (coeff i)) x + simp only [ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] at hi + rw [real_inner_comm] at hi + convert hi using 1 + simp only [Matrix.ofLp_toEuclideanCLM, Matrix.mulVec, dotProduct, + radialCoefficientMatrix, PiLp.inner_apply, Real.inner_apply] + +/-- The scalar coefficient errors give a near-identity matrix in the +operator norm, with only the fixed dimension loss. -/ +theorem radialCoefficientMatrix_sub_id_norm {n : ℕ} + (N : Euclidean n ≃L[ℝ] Euclidean n) (coeff : Fin n → Euclidean n) + {η : ℝ} (hη : 0 ≤ η) + (hcoeff : ∀ i, ‖N.symm (coeff i - N (EuclideanSpace.single i 1))‖ ≤ η) : + ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) (radialCoefficientMatrix N coeff) - + ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ (n : ℝ) ^ 2 * η := by + apply matrix_sub_id_norm_le_of_entries _ hη + intro i j + have hpoint := (PiLp.norm_apply_le (N.symm (coeff i - N (EuclideanSpace.single i 1))) j).trans + (hcoeff i) + simp only [map_sub, ContinuousLinearEquiv.symm_apply_apply, PiLp.sub_apply, Real.norm_eq_abs] at hpoint + simpa only [Matrix.sub_apply, Matrix.one_apply, radialCoefficientMatrix, + PiLp.single_apply, Pi.single_apply, eq_comm] using hpoint + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..36d2cd7bbb0515be8eb762aeaf642096d30bd82b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitCoordinates.lean @@ -0,0 +1,154 @@ +import OAI.Geometry.RCD.Coordinates.ActualCovectorFit +import OAI.Geometry.RCD.Harmonic.AffineChange + +namespace OAI + +/-! # Canonical local radial fits and their change of coordinates -/ + +open Set MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The actual radial pairing, as an element of the local L2 space. -/ +def radialPairingLp (s : Set X) (q a : SobolevSpace μ hQ) {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a a x ≤ B) : Lp ℝ 2 (μ.restrict s) := + (localGamma_memLp_two_of_bound μ hQ s q a ha).toLp (localGamma μ hQ q a) + +theorem radialPairingLp_representative (s : Set X) (q a : SobolevSpace μ hQ) {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a a x ≤ B) : + radialPairingLp μ hQ s q a ha =ᵐ[μ.restrict s] localGamma μ hQ q a := + MemLp.coeFn_toLp _ + +/-- Locality identifies the L2 targets even when their cutoffs and their +bounds were chosen at different scales. -/ +theorem radialPairingLp_congr (s : Set X) (q a q' a' : SobolevSpace μ hQ) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a a x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a' a' x ≤ B') + (h : localGamma μ hQ q a =ᵐ[μ.restrict s] localGamma μ hQ q' a') : + radialPairingLp μ hQ s q a ha = radialPairingLp μ hQ s q' a' ha' := by + apply Lp.ext + exact (radialPairingLp_representative μ hQ s q a ha).trans + (h.trans (radialPairingLp_representative μ hQ s q' a' ha').symm) + +/-- Restriction agrees with construction on the smaller testing region. -/ +theorem radialPairingLp_restrict {s t : Set X} (hst : t ⊆ s) + (q a : SobolevSpace μ hQ) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a a x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict t, localGamma μ hQ a a x ≤ B') : + localL2Restriction μ s t hst (radialPairingLp μ hQ s q a ha) = + radialPairingLp μ hQ t q a ha' := by + apply Lp.ext + filter_upwards [localL2Restriction_coe μ s t hst (radialPairingLp μ hQ s q a ha), + ae_restrict_of_ae_restrict_of_subset hst (radialPairingLp_representative μ hQ s q a ha), + radialPairingLp_representative μ hQ t q a ha'] with x h₁ h₂ h₃ + exact h₁.trans (h₂.trans h₃.symm) + +omit [BorelSpace X] [ProperSpace X] in +/-- Every invertible normalizing frame gives the SAME least-squares residual. -/ +theorem affineResidual_transformed {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hfin : μ s ≠ ∞) (A : Euclidean n ≃L[ℝ] Euclidean n) : + affineResidual μ hQ (transformedColumn μ hQ u A) s hfin = + affineResidual μ hQ u s hfin := by + apply affineResidual_eq_of_change μ hQ u _ s hfin A 0 + intro v + rw [sobolevColumnMap_transformed] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + zero_apply, zero_smul, add_zero] + +/-- Applying the inverse normalizing frame to a covector recovers its +original raw radial pairing in the local L2 space. -/ +theorem radialPairingLp_frame {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (q : SobolevSpace μ hQ) (A : Euclidean n ≃L[ℝ] Euclidean n) + (b : Euclidean n) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict s, + localGamma μ hQ (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) + (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict s, + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ B') : + radialPairingLp μ hQ s q (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) ha = + radialPairingLp μ hQ s q (sobolevColumnMap μ hQ u b) ha' := by + apply radialPairingLp_congr + rw [sobolevColumnMap_transformed] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply] + exact Filter.Eventually.of_forall fun _ => rfl + +/-- The dimensionless least-squares error of the actual radial derivative. -/ +def radialFitError {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) (r : ℝ) (hfin : μ (Metric.ball p r) ≠ ∞) + (q a : SobolevSpace μ hQ) {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a a x ≤ B) : ℝ := + ‖normalizeLocalL2 μ (Metric.ball p r) hfin + (affineResidual μ hQ u (Metric.ball p r) hfin + (radialPairingLp μ hQ (Metric.ball p r) q a ha))‖ / r + +theorem radialFitError_nonneg {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) {r : ℝ} (hr : 0 ≤ r) (hfin : μ (Metric.ball p r) ≠ ∞) + (q a : SobolevSpace μ hQ) {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a a x ≤ B) : + 0 ≤ radialFitError μ hQ u p r hfin q a ha := div_nonneg (norm_nonneg _) hr + +/-- Cutoff changes preserve the dimensionless fit whenever locality +identifies their actual radial derivatives on the testing ball. -/ +theorem radialFitError_congr {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) (r : ℝ) (hfin : μ (Metric.ball p r) ≠ ∞) + (q a q' a' : SobolevSpace μ hQ) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a a x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a' a' x ≤ B') + (h : localGamma μ hQ q a =ᵐ[μ.restrict (Metric.ball p r)] localGamma μ hQ q' a') : + radialFitError μ hQ u p r hfin q a ha = radialFitError μ hQ u p r hfin q' a' ha' := by + unfold radialFitError + rw [radialPairingLp_congr μ hQ _ q a q' a' ha ha' h] + +theorem radialFitError_radius_eq {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) {r t : ℝ} (hrt : r = t) + (hr : μ (Metric.ball p r) ≠ ∞) (ht : μ (Metric.ball p t) ≠ ∞) + (q a : SobolevSpace μ hQ) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a a x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict (Metric.ball p t), localGamma μ hQ a a x ≤ B') : + radialFitError μ hQ u p r hr q a ha = radialFitError μ hQ u p t ht q a ha' := by + subst t + apply radialFitError_congr + exact Filter.Eventually.of_forall fun _ => rfl + +/-- The same numerical fit is obtained in every invertible normalizing frame. -/ +theorem radialFitError_frame {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) (r : ℝ) (hfin : μ (Metric.ball p r) ≠ ∞) + (q : SobolevSpace μ hQ) (A : Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n) {B B' : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), + localGamma μ hQ (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) + (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) x ≤ B) + (ha' : ∀ᵐ x ∂μ.restrict (Metric.ball p r), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ B') : + radialFitError μ hQ (transformedColumn μ hQ u A) p r hfin q + (sobolevColumnMap μ hQ (transformedColumn μ hQ u A) (A.symm b)) ha = + radialFitError μ hQ u p r hfin q (sobolevColumnMap μ hQ u b) ha' := by + unfold radialFitError + rw [affineResidual_transformed μ hQ u _ hfin A, + radialPairingLp_frame μ hQ u _ q A b ha ha'] + +omit [ProperSpace X] in +/-- Harmonic affine improvement is a property of the affine span, so the +same improvement applies after every invertible normalization. -/ +theorem HasNormalizedAffineImprovement.transformed {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) + {u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic} {p : X} {r θ : ℝ} + (hfit : HasNormalizedAffineImprovement hX u p r θ) + (A : Euclidean n ≃L[ℝ] Euclidean n) : + HasNormalizedAffineImprovement hX (transformedColumn (hausdorff n X) hX.quadratic u A) p r θ := by + intro w hw hn + have h := hfit w hw hn + rw [affineResidual_transformed (hausdorff n X) hX.quadratic u _ + (ne_of_lt (hX.finiteOnBounded _ Metric.isBounded_ball)) A] + exact h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitEnvelope.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..2951cb41ee4df818d9eaf55432fade5942d63a85 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitEnvelope.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Coordinates.WeightedFitSmoothing + +namespace OAI + +/-! # Summable squared radial errors from the actual contraction -/ + +namespace RegularPointCoordinates + +/-- A weighted pointwise envelope bounds the total normalized squared +error by the total original defect and the qualitative error floor. -/ +theorem normalized_squared_fit_budget {σ η A : ℝ} (hσ : 0 ≤ σ) (hσ1 : σ < 1) + (hη : 0 ≤ η) (hA : 0 ≤ A) {P e w : ℕ → ℝ} + (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) (hw : ∀ i, 0 < w i) + (hbound : ∀ i, (e i) ^ 2 ≤ A * forwardDefect σ η P i * (w i) ^ 2) : + Summable (fun i => (e i / w i) ^ 2) ∧ + (∑' i, (e i / w i) ^ 2) ≤ A * (1 - σ)⁻¹ * (η + ∑' i, P i) := by + have hforward := forwardDefect_budget hσ hσ1 hη hP hPs + have hp (i : ℕ) : (e i / w i) ^ 2 ≤ A * forwardDefect σ η P i := by + rw [div_pow] + exact (div_le_iff₀ (sq_pos_of_pos (hw i))).mpr (hbound i) + have hs := Summable.of_nonneg_of_le (fun i => sq_nonneg (e i / w i)) hp + (hforward.1.mul_left A) + refine ⟨hs, ?_⟩ + calc + _ ≤ ∑' i, A * forwardDefect σ η P i := hs.tsum_le_tsum hp (hforward.1.mul_left A) + _ = A * ∑' i, forwardDefect σ η P i := tsum_mul_left + _ ≤ A * ((1 - σ)⁻¹ * (η + ∑' i, P i)) := mul_le_mul_of_nonneg_left hforward.2 hA + _ = _ := by ring + +/-- The fixed harmonic contraction dominates the slow change of +covector norm. The coefficient is chosen before the defect sequence and +the size of the qualitative error. -/ +theorem radial_fit_forward_envelope {m : ℕ} (hm : 0 < m) {C : ℝ} (hC : 0 ≤ C) : + ∃ A : ℝ, 0 < A ∧ ∀ {η : ℝ}, 0 ≤ η → ∀ {P e w : ℕ → ℝ}, + (∀ i, 0 ≤ P i) → (∀ i, 0 ≤ e i) → (∀ i, 0 < w i) → + (∀ i, (e i) ^ 2 ≤ η * (w i) ^ 2) → + (∀ i, w i ≤ (9 / 8 : ℝ) ^ m * w (i + m)) → + (∀ i, e (i + m) ≤ (1 / 2 : ℝ) * Real.sqrt ((1 / 2 : ℝ) ^ m) * e i + + C * w i * Real.sqrt (P i)) → + ∀ i, (e i) ^ 2 ≤ A * forwardDefect (3 / 4) η P i * (w i) ^ 2 := by + let σ : ℝ := 3 / 4 + let θ : ℝ := (1 / 2 : ℝ) ^ m + let a := (1 / 2 : ℝ) * Real.sqrt θ + let G : ℝ := (9 / 8 : ℝ) ^ m + let A := (2 + 4 * (C * G) ^ 2) / σ ^ m + have hσ : 0 < σ := by norm_num [σ] + have hσ1 : σ ≤ 1 := by norm_num [σ] + have hθ : 0 ≤ θ := pow_nonneg (by norm_num) _ + have hG : 0 ≤ G := pow_nonneg (by norm_num) _ + have ha : 0 ≤ a := by dsimp only [a]; positivity + have hA : 0 < A := by dsimp only [A]; positivity + have hscale : A * σ ^ m = 2 + 4 * (C * G) ^ 2 := + div_mul_cancel₀ _ (pow_ne_zero _ hσ.ne') + have hcontract : 2 * (a * G) ^ 2 ≤ (1 / 2 : ℝ) * σ ^ m := by + have hp : (81 / 128 : ℝ) ^ m ≤ σ ^ m := + pow_le_pow_left₀ (by norm_num) (by norm_num [σ]) _ + have he : 2 * (a * G) ^ 2 = (1 / 2 : ℝ) * (81 / 128 : ℝ) ^ m := by + dsimp only [a, G] + rw [mul_pow, mul_pow, Real.sq_sqrt hθ] + dsimp only [θ] + rw [← pow_mul, Nat.mul_comm m 2, pow_mul] + calc + _ = (1 / 2 : ℝ) * ((1 / 2 : ℝ) ^ m * ((9 / 8 : ℝ) ^ 2) ^ m) := by ring + _ = (1 / 2 : ℝ) * ((1 / 2 : ℝ) * (9 / 8 : ℝ) ^ 2) ^ m := by rw [mul_pow] + _ = _ := by norm_num + rw [he] + exact mul_le_mul_of_nonneg_left hp (by norm_num) + have hmargin : (2 * (a * G) ^ 2) * A + 2 * (C * G) ^ 2 ≤ σ ^ m * A := by + have hh := mul_le_mul_of_nonneg_right hcontract hA.le + nlinarith [sq_nonneg (C * G)] + refine ⟨A, hA, ?_⟩ + intro η hη P e w hP he hw hsmall hgrowth hstep + apply weighted_squared_fit_le_forwardDefect hσ.le hη hA.le ha hC hG hP he hw hm hmargin + · intro i hi + have hratio : (e i / w i) ^ 2 ≤ η := by + rw [div_pow] + exact (div_le_iff₀ (sq_pos_of_pos (hw i))).mpr (hsmall i) + have hp : σ ^ m ≤ σ ^ i := pow_le_pow_of_le_one hσ.le hσ1 hi.le + have hAi : 1 ≤ A * σ ^ i := by + have hh := mul_le_mul_of_nonneg_left hp hA.le + nlinarith [sq_nonneg (C * G)] + calc + _ ≤ η := hratio + _ ≤ A * (η * σ ^ i) := by nlinarith + · exact hgrowth + · exact hstep + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitFromCorrection.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitFromCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..a975ac2a08c7e81131935cb9a196a15adf1fdcb7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitFromCorrection.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Coordinates.HarmonicFitStep +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError + +namespace OAI + +/-! # Feeding an actual radial harmonic approximation into the affine fit -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + +/-- A proved integral error for the actual radial pairing yields its +least-squares contraction, with the exact restriction volume factor. -/ +theorem radial_fit_of_harmonic_correction + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) {r θ : ℝ} (hr : 0 < r) (hθ : 0 < θ) (hθ1 : θ ≤ 1) + (hu : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u i)) + (η : SobolevSpace (hausdorff n X) hX.quadratic) + (hη : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) η) + (hηone : SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) η = + restrictedOne (hausdorff n X) (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))) + (hfit : HasNormalizedAffineImprovement hX u p r θ) + (q a h : SobolevSpace (hausdorff n X) hX.quadratic) + {B error : ℝ} (he : 0 ≤ error) + (ha : ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic a a x ≤ B) + (hh : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) h) + (herror : (∫ x in ball p r, + (localGamma (hausdorff n X) hX.quadratic q a x - + SobolevSpace.toLp (hausdorff n X) hX.quadratic h x) ^ 2 ∂hausdorff n X) ≤ error) : + let μ := hausdorff n X + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + let raw := (localGamma_memLp_two_of_bound μ hX.quadratic (ball p r) q a ha).toLp + (localGamma μ hX.quadratic q a) + let C := (1 / 2 : ℝ) * θ * Real.sqrt θ + let V := Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + ‖normalizeLocalL2 μ (ball p (θ * r)) ht + (affineResidual μ hX.quadratic u (ball p (θ * r)) ht + (localL2Restriction μ (ball p r) (ball p (θ * r)) hsub raw))‖ ≤ + (V + C) * Real.sqrt ((μ.real (ball p r))⁻¹ * error) + + C * ‖normalizeLocalL2 μ (ball p r) hs + (affineResidual μ hX.quadratic u (ball p r) hs raw)‖ := by + let μ := hausdorff n X + let s := ball p r + let hs : μ s ≠ ∞ := ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + let rawmem := localGamma_memLp_two_of_bound μ hX.quadratic s q a ha + let raw := rawmem.toLp (localGamma μ hX.quadratic q a) + let hlocal := SobolevSpace.restrictLp μ hX.quadratic s h + have hnormsq : ‖normalizeLocalL2 μ s hs (raw - hlocal)‖ ^ 2 ≤ (μ.real s)⁻¹ * error := by + rw [normalizeLocalL2_norm_sq] + apply mul_le_mul_of_nonneg_left _ (by positivity) + have heq : (fun x => ((raw - hlocal) x) ^ 2) =ᵐ[μ.restrict s] + fun x => (localGamma μ hX.quadratic q a x - SobolevSpace.toLp μ hX.quadratic h x) ^ 2 := by + filter_upwards [Lp.coeFn_sub raw hlocal, MemLp.coeFn_toLp rawmem, + SobolevSpace.restrictLp_coe μ hX.quadratic s h] with x hsub hraw hloc + simp only [hsub, Pi.sub_apply] + exact congrArg (fun z : ℝ => z ^ 2) (congrArg₂ (fun x y : ℝ => x - y) hraw hloc) + exact (integral_congr_ae heq).trans_le herror + have hnorm : ‖normalizeLocalL2 μ s hs (raw - hlocal)‖ ≤ Real.sqrt ((μ.real s)⁻¹ * error) := by + have hn : 0 ≤ (μ.real s)⁻¹ * error := by positivity + nlinarith [Real.sq_sqrt hn, norm_nonneg (normalizeLocalL2 μ s hs (raw - hlocal)), + Real.sqrt_nonneg ((μ.real s)⁻¹ * error)] + have hstep := harmonic_affine_fit_step hX u p hr hθ hθ1 hu η hη hηone hfit raw h hh + have hcoef : 0 ≤ Real.sqrt (μ.real (ball p r)) / + Real.sqrt (μ.real (ball p (θ * r))) + (1 / 2 : ℝ) * θ * Real.sqrt θ := by positivity + exact hstep.trans (add_le_add (mul_le_mul_of_nonneg_left hnorm hcoef) le_rfl) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitRecurrence.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f0f0707460b15b343b11a2987f5e6aa765833de --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitRecurrence.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.RadialFitCoordinates + +namespace OAI + +/-! # The dimensionless recurrence for actual least-squares radial fits -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + +/-- The harmonic correction gives a recurrence for the canonical actual +fit errors, with the exact contraction and restriction-volume factors. -/ +theorem radialFitError_step_of_correction + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) {r θ : ℝ} (hr : 0 < r) (hθ : 0 < θ) (hθ1 : θ ≤ 1) + (hu : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u i)) + (η : SobolevSpace (hausdorff n X) hX.quadratic) + (hη : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) η) + (hηone : SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) η = + restrictedOne (hausdorff n X) (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))) + (hfit : HasNormalizedAffineImprovement hX u p r θ) + (q a h : SobolevSpace (hausdorff n X) hX.quadratic) + {B E : ℝ} (hE : 0 ≤ E) + (ha : ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic a a x ≤ B) + (hh : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) h) + (herror : (∫ x in ball p r, + (localGamma (hausdorff n X) hX.quadratic q a x - + SobolevSpace.toLp (hausdorff n X) hX.quadratic h x) ^ 2 ∂hausdorff n X) ≤ E) : + let μ := hausdorff n X + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + let hsub := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + let hat := ae_restrict_of_ae_restrict_of_subset hsub ha + let V := Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + radialFitError μ hX.quadratic u p (θ * r) ht q a hat ≤ + (V + (1 / 2 : ℝ) * θ * Real.sqrt θ) / (θ * r) * + Real.sqrt ((μ.real (ball p r))⁻¹ * E) + + (1 / 2 : ℝ) * Real.sqrt θ * radialFitError μ hX.quadratic u p r hs q a ha := by + dsimp only + let μ := hausdorff n X + let hs := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let ht := ne_of_lt (hX.finiteOnBounded (ball p (θ * r)) isBounded_ball) + have hsub : ball p (θ * r) ⊆ ball p r := ball_subset_ball (mul_le_of_le_one_left hr.le hθ1) + have hat := ae_restrict_of_ae_restrict_of_subset hsub ha + have hstep := radial_fit_of_harmonic_correction hX u p hr hθ hθ1 hu η hη hηone hfit + q a h hE ha hh herror + change ‖normalizeLocalL2 μ (ball p (θ * r)) ht + (affineResidual μ hX.quadratic u (ball p (θ * r)) ht + (localL2Restriction μ (ball p r) (ball p (θ * r)) hsub + (radialPairingLp μ hX.quadratic (ball p r) q a ha)))‖ ≤ + (Real.sqrt (μ.real (ball p r)) / Real.sqrt (μ.real (ball p (θ * r))) + + (1 / 2 : ℝ) * θ * Real.sqrt θ) * Real.sqrt ((μ.real (ball p r))⁻¹ * E) + + (1 / 2 : ℝ) * θ * Real.sqrt θ * + ‖normalizeLocalL2 μ (ball p r) hs + (affineResidual μ hX.quadratic u (ball p r) hs (radialPairingLp μ hX.quadratic (ball p r) q a ha))‖ at hstep + rw [radialPairingLp_restrict μ hX.quadratic hsub q a ha hat] at hstep + have hb := div_le_div_of_nonneg_right hstep (mul_pos hθ hr).le + unfold radialFitError + exact hb.trans_eq (by field_simp [hr.ne', hθ.ne']; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitRestriction.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..933cbc92804a041433a364670d6e6598a7919c40 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitRestriction.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Harmonic.NearbyMeanGrams +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # Restricting the value and energy bounds of an actual radial fit -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +/-- A normalized squared value error only pays the actual volume ratio +when the common commutator ball is smaller than the radial fitting ball. -/ +theorem normalized_fit_restrict_sq {s t : Set X} (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (hs0 : 0 < μ.real s) (ht0 : 0 < μ.real t) + (f : SobolevSpace μ hQ) {C E : ℝ} (hE : 0 ≤ E) + (hvol : μ.real s ≤ C * μ.real t) + (hfit : ‖normalizeLocalL2 μ s hs (SobolevSpace.restrictLp μ hQ s f)‖ ^ 2 ≤ E) : + ‖normalizeLocalL2 μ t ht (SobolevSpace.restrictLp μ hQ t f)‖ ^ 2 ≤ C * E := by + rw [normalized_sobolev_mean_sq] at hfit ⊢ + apply average_nonneg_le_of_subset μ hts ht0 hs0 + (Lp.memLp (SobolevSpace.toLp μ hQ f)).integrable_sq.integrableOn (fun x => sq_nonneg _) hE hvol hfit + +omit [ProperSpace X] in +/-- The identical volume-ratio loss applies to the squared gradient error. -/ +theorem normalized_fit_energy_restrict {s t : Set X} (hts : t ⊆ s) + (hs0 : 0 < μ.real s) (ht0 : 0 < μ.real t) + (f : SobolevSpace μ hQ) {C E : ℝ} (hE : 0 ≤ E) + (hvol : μ.real s ≤ C * μ.real t) + (hfit : (μ.real s)⁻¹ * (∫ x in s, localGamma μ hQ f f x ∂μ) ≤ E) : + (μ.real t)⁻¹ * (∫ x in t, localGamma μ hQ f f x ∂μ) ≤ C * E := by + have hself := localGamma_self μ hQ f + rw [integral_congr_ae (ae_restrict_of_ae hself)] at hfit ⊢ + apply average_nonneg_le_of_subset μ hts ht0 hs0 + (Lp.memLp (SobolevSpace.minimalSlope μ hQ f)).integrable_sq.integrableOn + (fun x => sq_nonneg _) hE hvol hfit + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFitSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFitSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bbec6bbb473ee94faf46feb0220e9c0f66efcea --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFitSmallness.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Coordinates.RadialFitCoordinates +import OAI.Geometry.RCD.Coordinates.NormalizedRadialError + +namespace OAI + +/-! # Passing the actual radial approximation to its least-squares error -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Any actual linear coordinate approximation bounds the affine fit. +This transfers the proved radial L2 smallness to the dimensionless errors +used in the dyadic recurrence. -/ +theorem radialFitError_sq_le_linear {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (p : X) (r : ℝ) (hfin : μ (Metric.ball p r) ≠ ∞) + (q a : SobolevSpace μ hQ) {B E : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (Metric.ball p r), localGamma μ hQ a a x ≤ B) + (b : Euclidean n) + (herror : (∫ x in Metric.ball p r, (localGamma μ hQ q a x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u b) x) ^ 2 ∂μ) ≤ E) : + (radialFitError μ hQ u p r hfin q a ha) ^ 2 ≤ + ((μ.real (Metric.ball p r))⁻¹ * E) / r ^ 2 := by + let s := Metric.ball p r + let f := radialPairingLp μ hQ s q a ha + let g := SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u b) + have hcand : affineCoordinateMap μ hQ u s hfin (0, b) = g := by + simp only [affineCoordinateMap_apply, zero_smul, zero_add, g] + have he : affineResidual μ hQ u s hfin (f - g) = affineResidual μ hQ u s hfin f := by + rw [← hcand] + exact affineResidual_sub_affine μ hQ u s hfin f 0 b + have hn := normalized_affineResidual_norm_le μ hQ u s hfin (f - g) + rw [he] at hn + have hn2 := (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mpr hn + have hfg : (fun x => ((f - g) x) ^ 2) =ᵐ[μ.restrict s] + fun x => (localGamma μ hQ q a x - SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u b) x) ^ 2 := by + filter_upwards [Lp.coeFn_sub f g, radialPairingLp_representative μ hQ s q a ha, + SobolevSpace.restrictLp_coe μ hQ s (sobolevColumnMap μ hQ u b)] with x hs hf hg + rw [hs, Pi.sub_apply, hf, hg] + have hi : ‖normalizeLocalL2 μ s hfin (f - g)‖ ^ 2 ≤ (μ.real s)⁻¹ * E := by + rw [normalizeLocalL2_norm_sq, integral_congr_ae hfg] + exact mul_le_mul_of_nonneg_left herror (by positivity) + have hsq := hn2.trans hi + change (‖normalizeLocalL2 μ s hfin (affineResidual μ hQ u s hfin f)‖ / r) ^ 2 ≤ _ + rw [div_pow] + exact div_le_div_of_nonneg_right hsq (sq_nonneg r) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFrameChange.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFrameChange.lean new file mode 100644 index 0000000000000000000000000000000000000000..c56422dab246f72a20da7df270dd2f1a66f9a88b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFrameChange.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion + +namespace OAI + +/-! # Transporting a radial coefficient operator to the common frame -/ + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- A bounded change of frame preserves smallness of a radial operator's +error from the identity, with the explicit two frame factors. -/ +theorem radial_frame_change_bound (P : E ≃L[ℝ] E) (A : E →L[ℝ] E) : + ‖P.symm.toContinuousLinearMap * A * P.toContinuousLinearMap - 1‖ ≤ + ‖P.symm.toContinuousLinearMap‖ * ‖A - 1‖ * ‖P.toContinuousLinearMap‖ := by + have hid : P.symm.toContinuousLinearMap * A * P.toContinuousLinearMap - 1 = + P.symm.toContinuousLinearMap * (A - 1) * P.toContinuousLinearMap := by + ext x + simp only [mul_apply_eq_comp, sub_apply, one_apply_eq_self, + ContinuousLinearEquiv.coe_coe, map_sub, + ContinuousLinearEquiv.symm_apply_apply] + rw [hid] + exact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialFrameLocalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialFrameLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..0704705146650aafb7b35e64f24edd3d3736bb47 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialFrameLocalization.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedFrameRadialSmallness + +namespace OAI + +/-! # Localizing the actual normalizing frame to the radial testing region -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +theorem localize_radial_frame {n : ℕ} {s omega δ : ℝ} {p : X} + (hs : 0 < s) (homega : 0 < omega) (hδ : 0 ≤ δ) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ 2 * s → + |μ.real (ball p t) / (omega * t ^ n) - 1| ≤ 1 / 4) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (2 * s) δ u v) : + FirstOrderSplittingOn μ hQ p (4 * (s / 64)) + (radialNormalizationRestrictionConstant n * δ) u v ∧ + 0 < μ.real (ball p (4 * (s / 64))) ∧ + μ.real (ball p (4 * (s / 64))) / μ.real (ball p (s / 64)) ≤ + (5 / 3 : ℝ) * (4 : ℝ) ^ n := by + let r := s / 64 + let D := radialNormalizationRestrictionConstant n + have hr : 0 < r := by dsimp only [r]; positivity + have hD : 1 ≤ D := radialNormalizationRestrictionConstant_ge_one n + have hv (t : ℝ) (ht : 0 < t) (hts : t ≤ 2 * s) : 0 < μ.real (ball p t) := + (quarter_volume_bounds ht homega (hquarter t ht hts)).1 + have hfin (t : ℝ) : μ (ball p t) ≠ ∞ := ne_of_lt + ((measure_mono ball_subset_closedBall).trans_lt (isCompact_closedBall p t).measure_lt_top) + have hzero (t : ℝ) (ht : 0 < t) (hts : t ≤ 2 * s) : μ (ball p t) ≠ 0 := by + intro hz + have hp := hv t ht hts + rw [Measure.real, hz, ENNReal.toReal_zero] at hp + exact (lt_irrefl 0) hp + have hratio : μ.real (ball p (2 * s)) / μ.real (ball p (4 * r)) ≤ D := by + have h := radial_fraction_volume_ratio (show 0 < 2 * s by positivity) + (by norm_num : (0 : ℝ) < 1 / 32) homega + (hquarter (2 * s) (by positivity) le_rfl) + (hquarter ((1 / 32 : ℝ) * (2 * s)) (by positivity) (by linarith)) + have hrad : (1 / 32 : ℝ) * (2 * s) = 4 * r := by dsimp only [r]; ring + rw [hrad] at h + have hp : (((1 / 32 : ℝ) ^ n)⁻¹) = (32 : ℝ) ^ n := by rw [← inv_pow]; norm_num + simpa only [D, radialNormalizationRestrictionConstant, hp] using h + have hsub : ball p (4 * r) ⊆ ball p (2 * s) := ball_subset_ball (by dsimp only [r]; linarith) + have hlocal := hfirst.restrict_ball μ hQ hsub hδ hD + (hzero (4 * r) (by positivity) (by dsimp only [r]; linarith)) (hfin _) + (hzero (2 * s) (by positivity) le_rfl) (hfin _) + ((div_le_iff₀ (hv (4 * r) (by positivity) (by dsimp only [r]; linarith))).mp hratio) + refine ⟨hlocal, hv (4 * r) (by positivity) (by dsimp only [r]; linarith), ?_⟩ + have h := radial_fraction_volume_ratio (show 0 < 4 * r by positivity) + (by norm_num : (0 : ℝ) < 1 / 4) homega + (hquarter (4 * r) (by positivity) (by dsimp only [r]; linarith)) + (hquarter ((1 / 4 : ℝ) * (4 * r)) (by positivity) (by dsimp only [r]; linarith)) + rw [show (1 / 4 : ℝ) * (4 * r) = r by ring] at h + have hp : (((1 / 4 : ℝ) ^ n)⁻¹) = (4 : ℝ) ^ n := by rw [← inv_pow]; norm_num + simpa only [hp] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RadialMatrixEstimates.lean b/lean/OAI/Geometry/RCD/Coordinates/RadialMatrixEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..4bd6618bf6c218c551b66b347bf44a5dda00d934 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RadialMatrixEstimates.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Harmonic.UniformRadialMatrices + +namespace OAI + +/-! # The simultaneous value, coefficient and energy estimates -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The estimates already proved for the actual Poisson radial matrices, +packaged only to retain their common choices of rows. -/ +def RadialMatrixEstimates {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [IsFiniteMeasureOnCompacts (hausdorff n X)] + {κ r0 B J C Cχ : ℝ} {p : X} + (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (V : X → Euclidean n) + (F : ℕ → Euclidean n ≃L[ℝ] Euclidean n) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (δ Cg D Ca A : ℝ) : Prop := + ∀ i, + ∃ coeff : Fin n → Euclidean n, + ∃ g : Fin n → SobolevSpace (hausdorff n X) hX.quadratic, + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let r := s / 64 + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * δ) + (normalizedPoissonDefect μ hX.quadratic S) i + ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) (radialCoefficientMatrix (F i) coeff) - + ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ + ((n : ℕ) : ℝ) ^ 2 * + Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant n Cχ * δ)) ∧ + ∀ j, + let H := centeredAffineSobolev μ hX.quadratic u (χ i).sobolev (V p) (coeff j) + (SobolevSpace.toLp μ hX.quadratic (g j) =ᵐ[μ.restrict (ball p r)] + localGamma μ hX.quadratic (T.replacement i) + (sobolevColumnMap μ hX.quadratic u (F i (EuclideanSpace.single j 1)))) ∧ + ‖normalizeLocalL2 μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball p r) (g j - H))‖ ^ 2 ≤ + (2 * D ^ 2 + 8192 * (((n : ℕ) : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n)) * r ^ 2 * E ∧ + (μ.real (ball p (r / 2)))⁻¹ * + (∫ x in ball p (r / 2), localGamma μ hX.quadratic (g j - H) (g j - H) x ∂μ) ≤ + radialEnergyConstant K n Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume n)) * (128 : ℝ) ^ n) * E + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RebasedRadialFits.lean b/lean/OAI/Geometry/RCD/Coordinates/RebasedRadialFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..902e3c37aef2668bf7cd77a7cd83fe9b318d7e6b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RebasedRadialFits.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Coordinates.LinearRadialFits +import OAI.Geometry.RCD.Coordinates.RadialFrameChange + +namespace OAI + +/-! # Rewriting the actual radial affine fits in one centered frame -/ + +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The covector coefficient of a radial fit after changing its input +frame from M to N. -/ +def rebasedRadialOperator {n : ℕ} (N M : Euclidean n ≃L[ℝ] Euclidean n) + (C : Euclidean n →L[ℝ] Euclidean n) : Euclidean n →L[ℝ] Euclidean n := + N.symm.toContinuousLinearMap.comp + (C.comp (M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap)) + +/-- The two frame factors are the only loss in the near-identity estimate. -/ +theorem rebased_radial_operator_bound {n : ℕ} + (N M : Euclidean n ≃L[ℝ] Euclidean n) (C : Euclidean n →L[ℝ] Euclidean n) : + ‖rebasedRadialOperator N M C - 1‖ ≤ + ‖N.symm.toContinuousLinearMap.comp M.toContinuousLinearMap‖ * + ‖M.symm.toContinuousLinearMap.comp C - 1‖ * + ‖M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap‖ := by + let P := N.trans M.symm + have heq : rebasedRadialOperator N M C = + P.symm.toContinuousLinearMap * (M.symm.toContinuousLinearMap.comp C) * P.toContinuousLinearMap := by + ext b + simp only [rebasedRadialOperator, P, ContinuousLinearMap.comp_apply, mul_apply_eq_comp, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.trans_apply, + ContinuousLinearEquiv.symm_trans_apply, ContinuousLinearEquiv.symm_symm, + ContinuousLinearEquiv.apply_symm_apply] + rw [heq] + exact radial_frame_change_bound P _ + +/-- The nearby exact frames lose at most a factor two in the actual +radial operator's near-identity error. -/ +theorem rebased_radial_operator_bound_two {n : ℕ} + (N M : Euclidean n ≃L[ℝ] Euclidean n) (C : Euclidean n →L[ℝ] Euclidean n) + {δ : ℝ} + (hN : ‖N.symm.toContinuousLinearMap.comp M.toContinuousLinearMap‖ ≤ Real.sqrt 2) + (hM : ‖M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap‖ ≤ Real.sqrt 2) + (hC : ‖M.symm.toContinuousLinearMap.comp C - 1‖ ≤ δ) : + ‖rebasedRadialOperator N M C - 1‖ ≤ 2 * δ := by + have hδ : 0 ≤ δ := (norm_nonneg _).trans hC + calc + _ ≤ ‖N.symm.toContinuousLinearMap.comp M.toContinuousLinearMap‖ * + ‖M.symm.toContinuousLinearMap.comp C - 1‖ * + ‖M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap‖ := + rebased_radial_operator_bound N M C + _ ≤ Real.sqrt 2 * δ * Real.sqrt 2 := by gcongr + _ = 2 * δ := by nlinarith [Real.sq_sqrt (by norm_num : 0 ≤ (2 : ℝ))] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : MeasureTheory.Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Recentering adds exactly the constant determined by the displacement +of the centers. No gradient or value error is introduced by this rewrite. -/ +theorem centered_radial_rebase {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (η : SobolevSpace μ hQ) + (x z : Euclidean n) (N M : Euclidean n ≃L[ℝ] Euclidean n) + (C : Euclidean n →L[ℝ] Euclidean n) (b : Euclidean n) : + centeredAffineSobolev μ hQ u η x (C (M.symm (N b))) = + (centeredSobolevMap μ hQ u η z).comp N.toContinuousLinearMap + (rebasedRadialOperator N M C b) + + ⟪z - x, C (M.symm (N b))⟫_ℝ • η := by + simp only [ContinuousLinearMap.comp_apply, rebasedRadialOperator, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply, + centeredSobolevMap_apply, centeredAffineSobolev, inner_sub_left, sub_smul, neg_smul] + module + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageGoodSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageGoodSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..26eb5fad563a3ebc930fd73fc850242f570b1173 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageGoodSets.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.RCD.Coordinates.RegularInnerGoodCoordinates +import OAI.Geometry.RCD.Coordinates.CoarseFineCoordinateDistance +import OAI.Geometry.RCD.Coordinates.SplittingCoordinateLipschitz +import OAI.Geometry.RCD.Metric.ApproximationRestriction + +namespace OAI + +/-! # Coarse and fine image data without the published product premise -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_actual_image_good_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + {p : X} (hp : IsRegular n p) {η ζ : ℝ} (hη : 0<η) (hζ : 0<ζ) : + ∃ s : ℝ, 0 (2*R)⁻¹ • (v x-v p)) ∧ + ∀ x∈U, ∀ r : ℝ, 0 r⁻¹ • (v z-v x)) := by + obtain ⟨D,hD,hvol⟩ := hX.rescaled_ball_volume_factor hn + (a:=1) (δ:=1/5120) (by norm_num) (by norm_num) (by norm_num) + have hD0 : 0 (2*R)⁻¹ • (v x-v p)) := by + have hsp : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + p (81920*(2*R)) ε u v := by + simpa only [show 2*(81920*R)=81920*(2*R) by ring] using + hsplit.mono_error _ _ ht.le htε + have hh := hcoarse p (2*R) (by positivity) + (by linarith [hRs.trans_le (min_le_right _ _)]) + (by simpa only [show 81920*(2*R)=163840*R by ring] using hcurv) u v hsp + simpa only [show 3*(η/12)=η/4 by ring] using + hh.restrict_radius (by positivity) (by norm_num : (0:ℝ)≤1/2) + (by norm_num : (1/2:ℝ)≤2) (by positivity : 0≤η/12) + have hf : ∀ x∈U, ∀ r : ℝ, 0 r⁻¹ • (v z-v x)) := by + intro x hx r hr hrR + exact hfine x hx.1 r hr (by linarith) + have hg := hX.splitting_coordinate_lipschitz hn + (show 0<(81920*R)/4 by positivity) ht.le + (by simpa only [show 8*((81920*R)/4)=2*(81920*R) by ring] using hsplit) + have hdistance := coarse_fine_coordinate_distance (show 0<2*R by positivity) hη.le + (show (η/4)*(2*R)≤η*R by nlinarith) + (fun x hx => by have hh := hUsub hx; change dist x p≤R at hh; linarith) hc hf + refine ⟨v,U,hU,hUsub,?_,LipschitzOnWith.of_dist_le_mul + (fun x hx y hy => (hdistance x hx y hy).2),?_,hc,hf⟩ + · have hsub : ball p R \ U⊆ball p (81920*R) \ V := by + intro x hx + refine ⟨ball_subset_ball (by linarith) hx.1,?_⟩ + intro hxV + exact hx.2 ⟨hxV,ball_subset_closedBall hx.1⟩ + have hcBig : -1≤K*(81920*R)^2 := by + have he : K*(163840*R)^2=4*(K*(81920*R)^2) := by ring + rw [he] at hcurv + nlinarith + have hmass := hvol p (81920*R) hbigR hcBig p (by simp; positivity) + have he : (1/5120:ℝ)*(81920*R)=16*R := by ring + rw [he] at hmass + calc + _≤(hausdorff n X).real (ball p (81920*R) \ V) := + measureReal_mono hsub (measure_ne_top_of_subset sdiff_subset + (hX.finiteOnBounded _ isBounded_ball).ne) + _≤(ζ/D)*(hausdorff n X).real (ball p (81920*R)) := hbad + _≤(ζ/D)*(D*(hausdorff n X).real (ball p (16*R))) := + mul_le_mul_of_nonneg_left hmass (by positivity) + _=ζ*(hausdorff n X).real (ball p (16*R)) := by field_simp + · apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + have hx' : x∈ball p ((81920*R)/4) := ball_subset_ball (by linarith) hx + have hy' : y∈ball p ((81920*R)/4) := ball_subset_ball (by linarith) hy + apply (hg.dist_le_mul x hx' y hy').trans + apply mul_le_mul_of_nonneg_right _ dist_nonneg + change (n:ℝ)*(1+t)≤2*n + nlinarith [Nat.cast_nonneg (α:=ℝ) n] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..40152c29618c426fc52814a272f843f361e0d877 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularActualImageMass.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.RegularActualImageGoodSets +import OAI.Geometry.RCD.Coordinates.RegularImageMassEstimate +import OAI.Geometry.RCD.Metric.CoarseFineSourceMass +import OAI.Geometry.RCD.Metric.GoodSetInteriorPoint + +namespace OAI + +/-! # Absolute mass from the constructed inner-radius coordinate maps -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_actual_image_mass_estimate {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hK : K≤0) {p : X} (hp : IsRegular n p) + {η ζ : ℝ} (hη : 0 < η) (hηsmall : η ≤ 1/8192) (hζ : 0 < ζ) + (hζsmall : ζ*((Real.cosh 1^(n-1)*2^n)*(16*16384)^n) < 1) : + ∃ s : ℝ, 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → -1 ≤ K*(163840*R)^2 → + volume.real (ball (0 : Euclidean n) (R/4096)) - + volume.real (ball (0 : Euclidean n) 1)*imageMassErrorConstant n*ζ*R^n ≤ + (1+32*η)^n*(hausdorff n X).real (ball p (R/4096+(2*R)*(η/4))) := by + obtain ⟨s,hs,hsets⟩ := hX.regular_actual_image_good_sets hn hK hp hη hζ + refine ⟨s,hs,?_⟩ + intro R hR hRs hcurvLarge + have hcurv : -1≤K*(32*R)^2 := by + have he : K*(163840*R)^2=(5120:ℝ)^2*(K*(32*R)^2) := by ring + rw [he] at hcurvLarge + nlinarith + obtain ⟨v,U,hU,hUsub,hbad,hgood,hglobal,hcoarse,hfine⟩ := hsets R hR hRs hcurvLarge + have hpoint := hX.good_set_inner_point hn hR hζ.le hζsmall hcurv hbad + have hf : ∀ z ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation z 0 r (1/16) (1/128) (fun x => r⁻¹ • (v x-v z)) := by + intro z hz r hr hrR + exact (hfine z hz r hr hrR).mono_error (by linarith only [hηsmall]) + have hh := hX.coarse_fine_source_mass hn (hX.regular_euclidean_hausdorff hn hp) + (ρ := R/4096) (C := ⟨2*(n:ℝ),by positivity⟩) (L := ⟨1+32*η,by positivity⟩) + hR (by positivity) (by linarith only [hR]) + (by change (1:ℝ)≤2*n + have hn0 : (2:ℝ)≤n := by exact_mod_cast hn + linarith only [hn0]) + hcurv (by nlinarith only [hηsmall,hR]) hU hUsub hgood hglobal hcoarse hf + (by simpa only [show R/4096/4=R/16384 by ring] using hpoint) + let M := (hausdorff n X).real (ball p (16*R)) + have hM : 0 < M := ENNReal.toReal_pos + (hX.fullSupport p _ (by positivity)).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hE : (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)* + (hausdorff n X).real (ball p R \ U)) ≤ + volume.real (ball (0 : Euclidean n) 1)*imageMassErrorConstant n*ζ*R^n := by + calc + _ ≤ (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)*(ζ*M)) := by + gcongr + _ = _ := by + dsimp only [imageMassErrorConstant] + rw [show (8:ℝ)=4*2 by norm_num] + simp only [mul_pow] + field_simp [hM.ne'] + change volume.real (ball (0 : Euclidean n) (R/4096)) - + (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)* + (hausdorff n X).real (ball p R \ U)) ≤ + (1+32*η)^n*(hausdorff n X).real (ball p (R/4096+(2*R)*(η/4))) at hh + linarith only [hh,hE] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularActualPatches.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularActualPatches.lean new file mode 100644 index 0000000000000000000000000000000000000000..256623b47d9fb5d4acdd18aae5f1d156ce511237 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularActualPatches.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Coordinates.RegularFinitePatchCover +import OAI.Geometry.RCD.Coordinates.RegularPatchCenters +import OAI.Geometry.RCD.Coordinates.EuclideanGevreyCutoff + +namespace OAI + +/-! # Fixed actual patches and energy centers at every scale -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ContDiff BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +def patchRadius (i : ℕ) : ℝ≥0 := + ⟨regularNetRadius d.radius d.shift i, (div_pos d.radius_pos (by positivity)).le⟩ + +def patchRegion : Set X := regularPatchRegion base d.radius d.shift + +def patchNet (i : ℕ) : Finset X := maximalPatchNet (d.patchRadius i) d.patchRegion + +def patchCutoff (psi : Euclidean n → ℝ) (i : ℕ) : X → Euclidean n → ℝ := + normalizedPatchCutoff (d.patchRadius i) d.values + (fun q => (d.frozenAt q i).toContinuousLinearMap) psi + +def patchDomain (psi : Euclidean n → ℝ) (i : ℕ) (y : X) : Set X := + {x | x ∈ d.patchRegion ∧ d.values x ∈ tsupport (d.patchCutoff psi i y)} + +end RegularBilinearData + +/-- The net is much finer than the directional pinching radius. -/ +theorem regular_net_pinching_diameter_le {R : ℝ} (hR : 0 < R) (shift i : ℕ) : + 2 * 144 * regularNetRadius R shift i ≤ distanceSourceRadius R (shift + i) / 512 := by + have hr : 0 < regularNetRadius R shift i := div_pos hR (by positivity) + have heq : distanceSourceRadius R (shift + i) = + 134217728 * regularNetRadius R shift i := by + unfold distanceSourceRadius regularNetRadius + rw [show shift + i + 28 = (shift + i + 1) + 27 by omega, pow_add] + norm_num + ring + rw [heq] + linarith + +theorem regular_actual_patch_cover {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : zeta ≤ 1 / 64) (psi : EuclideanGevreyCutoff n) (i : ℕ) : + IsLocalizedPatchCover e.heat.patchRegion (e.heat.patchRadius i) e.heat.values + (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) + (patchOverlapBound n (1 / 2) 2 3) 144 3 := + regular_finite_patch_cover hX e hzeta i psi.value psi.smooth psi.nonneg psi.le_one + psi.core psi.support + +/-- Each operator center is fixed once for the entire active patch. The +same center satisfies both the pinching estimate and the mass comparison +distance bound; it is independent of the subsequently tested vector. -/ +theorem exists_regular_actual_patch_centers {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : zeta ≤ 1 / 64) (psi : EuclideanGevreyCutoff n) + (f : RegularPinchingField e.heat Cpin budget) (hCpin : 0 ≤ Cpin) : + ∃ center : ∀ i, {y : X // y ∈ e.heat.patchNet i} → + {q : X // q ∈ ball base (e.heat.radius / 32)}, + ∀ i y, + (center i y).val ∈ e.heat.patchDomain psi.value i y.val ∧ + ∀ x : {q : X // q ∈ ball base (e.heat.radius / 32)}, + x.val ∈ e.heat.patchDomain psi.value i y.val → + dist (center i y).val x.val ≤ (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) / 12 ∧ + ⟪e.heat.values x.val - e.heat.values (center i y).val, + e.heat.pinchingMassMatrix (center i y).val (center i y).property (e.heat.shift + i) + (e.heat.values x.val - e.heat.values (center i y).val)⟫_ℝ ≤ + (3 * Cpin) * (distanceSourceRadius e.heat.radius (e.heat.shift + i)) ^ 2 * + f.energy x (e.heat.shift + i) := by + classical + have hcenters (i : ℕ) := f.exists_normalized_centers hCpin (e.heat.shift + i) + e.heat.patchRegion (e.heat.patchRadius i) + (fun q => (e.heat.frozenAt q i).toContinuousLinearMap) psi.value + (e.heat.patchNet i) (regular_actual_patch_cover hX e hzeta psi i) + (psi.core 0 (by simp)) (fun _ hx => e.heat.patch_region_subset hx) + (regular_net_pinching_diameter_le e.heat.radius_pos e.heat.shift i) + choose center hc using hcenters + refine ⟨center, fun i y => ⟨(hc i y).1, ?_⟩⟩ + intro x hx + refine ⟨?_, (hc i y).2 x hx⟩ + have hcover := regular_actual_patch_cover hX e hzeta psi i + have h1 := hcover.active_localized x.val hx.1 y.val y.property hx.2 + have h2 := hcover.active_localized (center i y).val (hc i y).1.1 + y.val y.property (hc i y).1.2 + have ht := dist_triangle (center i y).val y.val x.val + rw [dist_comm y.val x.val] at ht + have hdiam := regular_net_diameter_le e.heat.radius_pos e.heat.shift i + change dist x.val y.val ≤ 144 * regularNetRadius e.heat.radius e.heat.shift i at h1 + change dist (center i y).val y.val ≤ 144 * regularNetRadius e.heat.radius e.heat.shift i at h2 + linarith + +namespace RegularPinchingField + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta C budget : ℝ} + {d : RegularBilinearData hX base hk enlargement zeta} + +/-- Starting the iteration at the heat shift preserves the total budget. -/ +theorem shifted_energy_sum_le (f : RegularPinchingField d C budget) + (q : {q : X // q ∈ ball base (d.radius / 32)}) (shift k : ℕ) : + (∑ i ∈ Finset.range k, f.energy q (shift + i)) ≤ budget := by + have hp (i) : 0 ≤ f.energy q i := (f.floor_pos i).le.trans (f.energy_floor q i) + exact (nonnegative_shifted_sum_le (f.energy q) hp shift k).trans + (((f.summable q).sum_le_tsum (Finset.range (shift + k)) (fun i _ => hp i)).trans (f.total q)) + +end RegularPinchingField +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBilinearData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBilinearData.lean new file mode 100644 index 0000000000000000000000000000000000000000..da8b19731bb1ab172e0261878ad401965945125c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBilinearData.lean @@ -0,0 +1,188 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularNeighborhoodBilinear + +namespace OAI + +/-! # The constructed common harmonic and heat data -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A record of the already constructed heat and harmonic objects. No +chart, directional pinching, or metric-iteration conclusion is a field. -/ +structure RegularBilinearData {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [(hausdorff n X).Regular] + (p : X) {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (enlargement zeta : ℝ) where + radius : ℝ + radius_pos : 0 < radius + radius_le_one : radius ≤ 1 + lambda : ℝ + lambda_pos : 0 < lambda + coordinates : Fin n → SobolevSpace (hausdorff n X) hX.quadratic + values : X → Euclidean n + initialError : ℝ + initialError_pos : 0 < initialError + initialError_le_one : initialError ≤ 1 + mass : PositiveBilinearMeasure X (Euclidean n) + energyBound : ℝ≥0 + energyBound_sq : (energyBound : ℝ) ^ 2 ≤ 4 * (n : ℝ) ^ 2 + energy : ∀ z, LocalHarmonicEnergy (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) mass |K| p + (4 * radius) energyBound z + cutoffConstant : ℝ + cutoff : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (3 * radius / 8) cutoffConstant + shift : ℕ + degree : ℕ + degree_ge_three : 3 ≤ degree + envelopeConstant : ℝ + lowerConstant : ℝ + upperConstant : ℝ + comparisonConstant : ℝ + envelopeConstant_pos : 0 < envelopeConstant + lowerConstant_pos : 0 < lowerConstant + upperConstant_pos : 0 < upperConstant + comparisonConstant_pos : 0 < comparisonConstant + splitting : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (32 * radius) + initialError coordinates values + rootLower : ∀ q ∈ ball p (radius / 32), ∀ v, + ‖v‖ ^ 2 ≤ 2 * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) + (ball q radius) measurableSet_ball v⟫_ℝ + heatMeanComparison : ∀ q ∈ ball p (radius / 32), ∀ i, shift ≤ i → ∀ v, + let Q := dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) cutoff q radius_pos lambda_pos + (1 - 1 / 64 : ℝ) * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) + (ball q (radius / 2 ^ i)) measurableSet_ball v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (1 + 1 / 64 : ℝ) * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) + (ball q (radius / 2 ^ i)) measurableSet_ball v⟫_ℝ + heatOrder : ∀ q ∈ ball p (radius / 32), ∀ i, shift ≤ i → ∀ v, + let Q := dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) cutoff q radius_pos lambda_pos + ⟪v, Q (i + 1) v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ + localData : ∀ q ∈ ball p (radius / 32), + let Q := dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) cutoff q radius_pos lambda_pos + (∀ (xi : Euclidean n) (k : ℕ), + let h := ⟪xi, (Q (shift + k)).symm xi⟫_ℝ + let currentMass := ∑ i ∈ Finset.range k, + ⟪(Q (shift + i)).symm xi, dyadicBochnerMass mass n q radius (shift + i) ((Q (shift + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (shift + i)).symm xi, dyadicBochnerEnvelope mass n q radius (shift + i) ((Q (shift + i)).symm xi)⟫_ℝ) ≤ + envelopeConstant * h ∧ + ‖xi‖ ^ 2 + currentMass ≤ lowerConstant * h ∧ + h ≤ upperConstant * (‖xi‖ ^ 2 + currentMass)) ∧ + (∀ i, shift ≤ i → ∀ y, dist q y ≤ enlargement * (radius / 2 ^ i) → ∀ b w : Euclidean n, + ⟪b, (sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) + (ball y (radius / 2 ^ i)) measurableSet_ball - (Q i : Euclidean n →L[ℝ] Euclidean n)) w⟫_ℝ ^ 2 ≤ + comparisonConstant * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope mass n q radius i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ radius / 16 → + HasNormalizedAffineImprovement hX coordinates q r ((1 / 2 : ℝ) ^ degree)) ∧ + ∃ F : ℕ → Euclidean n ≃L[ℝ] Euclidean n, + (∀ i, IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates) + (ball q (radius / 2 ^ i)) measurableSet_ball (F i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (radius / 2 ^ i) zeta + (transformedColumn (hausdorff n X) hX.quadratic coordinates (F i)) + (fun x => (F i : Euclidean n →L[ℝ] Euclidean n).adjoint (values x))) ∧ + ∀ i, IsPointedApproximation q 0 ((radius / 2 ^ i) / 128) 4 zeta + (fun x => ((radius / 2 ^ i) / 128)⁻¹ • + ((F i : Euclidean n →L[ℝ] Euclidean n).adjoint (values x) - + (F i : Euclidean n →L[ℝ] Euclidean n).adjoint (values q))) + +/-- This bundles the proved capped construction, retaining the same +actual coordinate functions, Gram operators and positive measure. -/ +theorem exists_regular_bilinear_data_uniform_degree {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + : + ∃ degree : ℕ, 3 ≤ degree ∧ ∀ {radiusCap enlargement zeta : ℝ}, + 0 < radiusCap → 0 ≤ enlargement → 0 < zeta → + ∃ d : RegularBilinearData hX p hk enlargement zeta, + d.radius ≤ radiusCap ∧ d.degree = degree := by + obtain ⟨degree, hdegree, hconstruct⟩ := regular_neighborhood_bilinear_heat_with_energy + m hX ha hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + refine ⟨degree, hdegree, ?_⟩ + intro radiusCap enlargement zeta hcap henlargement hzeta + obtain ⟨R, hR, hRcap, lambda, hlambda, u, V, e, M, Ccut, chi, J, A, B, D, H, L, + hR1, hA, hB, hD, hH, he, he1, hu, hL, henergy, hlocal⟩ := + hconstruct hcap henlargement hzeta + exact ⟨{ + radius := R, radius_pos := hR, radius_le_one := hR1, lambda := lambda, lambda_pos := hlambda + coordinates := u, values := V, initialError := e, initialError_pos := he, initialError_le_one := he1 + mass := M, energyBound := L, energyBound_sq := hL + energy := fun z => Classical.choice (henergy z) + cutoffConstant := Ccut, cutoff := chi, shift := J, degree := degree, degree_ge_three := hdegree + envelopeConstant := A, lowerConstant := B, upperConstant := D, comparisonConstant := H + envelopeConstant_pos := hA, lowerConstant_pos := hB, upperConstant_pos := hD, comparisonConstant_pos := hH + splitting := hu + rootLower := fun q hq => (hlocal q hq).1.1 + heatMeanComparison := fun q hq => (hlocal q hq).1.2.1 + heatOrder := fun q hq => (hlocal q hq).1.2.2 + localData := fun q hq => (hlocal q hq).2 }, hRcap, rfl⟩ + +/-- Forget the fixed degree when only a single neighborhood is needed. -/ +theorem exists_regular_bilinear_data {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + {radiusCap enlargement zeta : ℝ} (hcap : 0 < radiusCap) + (henlargement : 0 ≤ enlargement) (hzeta : 0 < zeta) : + ∃ d : RegularBilinearData hX p hk enlargement zeta, d.radius ≤ radiusCap := by + obtain ⟨_, _, hconstruct⟩ := exists_regular_bilinear_data_uniform_degree m hX ha hcompact + hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity hbochner hcutoff + hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨d, hcap, _⟩ := hconstruct hcap henlargement hzeta + exact ⟨d, hcap⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerDirectional.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerDirectional.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d5a7333890857f37e72874bfc1c71498ab2ad56 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerDirectional.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquare +import OAI.Geometry.RCD.Sobolev.HessianActionLocality +import OAI.Geometry.RCD.Sobolev.BochnerDensityQuadratic + +namespace OAI + +/-! # Directional Hessian domination for actual regular Bochner families -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- The full product calculus and measure positivity give the sharp +pointwise diagonal-direction Hessian bound, with the same Bochner measure. -/ +theorem regularBochner_directional_bound [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (K : ℝ) (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hsym : ∀ a b, H a b=H b a) + {Ω S : Set X} (hΩ : MeasurableSet Ω) (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (v w z : Euclidean m) (G : X →ᵇ ℝ) + (hG : SobolevSpace.toLp μ hQ (U w) =ᵐ[μ] G) + (hz : U z=SobolevSpace.product μ hQ (U w) (U w) ‖G‖₊ ‖G‖₊) + (dv dw dz : SobolevSpace μ hQ) (A B C : ℝ≥0) + (hv : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dv x|≤A) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dw x|≤B) + (hzz : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dz x|≤C) + (hdv : D v =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dv) + (hdw : D w =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dw) + (hdz : D z =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dz) + (hS : MeasurableSet S) (hsub : S ⊆ Ω) + (χ : X →ᵇ ℝ) {Cχ : ℝ≥0} (hχ : LipschitzWith Cχ χ) + (hχc : HasCompactSupport (χ : X → ℝ)) (hχΩ : tsupport χ ⊆ Ω) + (hχ0 : ∀ x, 0≤χ x) (hχ1 : ∀ x ∈ S, χ x=1) : + ∀ᵐ x ∂μ.restrict S, + (localHessianAction μ hQ (U v) (U w) (U w) (H v w) (H v w) (H w w) x)^2 ≤ + bochnerRadonDensity μ M x v v*(localGamma μ hQ (U w) (U w) x)^2 := by + have h₁ := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + v w z G hG hz dv dw A B hv hw hdv hdw hS χ hχ hχc hχΩ hχ0 hχ1 + have h₂ := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + w w z G hG hz dw dw B B hw hw hdw hdw hS χ hχ hχc hχΩ hχ0 hχ1 + have h₃ := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + z w z G hG hz dz dw C B hzz hw hdz hdw hS χ hχ hχc hχΩ hχ0 hχ1 + have hgb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U w) x|≤‖G‖₊ := by + filter_upwards [hG] with x hx + rw [hx] + exact G.norm_coe_le_norm x + have hsq := localHessianAction_square_self μ hQ (Ω := Ω) (U w) (H w w) (H z w) + ‖G‖₊ (L w*L w) hgb (regularGram_abs_le μ hQ U H L hU hH w w) + (ae_restrict_of_ae (hH w w)) + (by rw [← hz]; exact ae_restrict_of_ae (hH z w)) + rw [← hz] at hsq + have hsq' : localHessianAction μ hQ (U z) (U w) (U w) (H z w) (H z w) (H w w) + =ᵐ[μ.restrict S] fun x => + 2*G x*localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w) x+ + 2*(localGamma μ hQ (U w) (U w) x)^2 := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub hsq, + ae_restrict_of_ae hG] with x hx hg + simpa only [hg] using hx + exact bochner_measure_quadratic_bound μ M v w z G + (localHessianAction μ hQ (U v) (U w) (U w) (H v w) (H v w) (H w w)) + (localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w)) + (localHessianAction μ hQ (U z) (U w) (U w) (H z w) (H z w) (H w w)) + (localGamma μ hQ (U w) (U w)) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS h₁ h₂ h₃ hsq' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerForm.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..75c535ebf43e366b9742014e3d76163e13e1c33c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerForm.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Sobolev.BochnerTestForm +import OAI.Geometry.RCD.Sobolev.WeightedGammaL2Algebra +import OAI.Geometry.RCD.Sobolev.WeightedLaplacianPair +import OAI.Geometry.RCD.Sobolev.CompactBochnerTest + +namespace OAI + +/-! # Polarized Bochner forms on a finite regular span -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- The full weak Bochner form retains both L² source terms. -/ +def regularBochnerForm (K : ℝ) + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (q : X →ᵇ ℝ) (ψ : SobolevSpace μ hQ) (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) : + Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ := + LinearMap.mk₂ ℝ + (fun a b => bochnerTestForm μ hQ (-K) (H a b) ψ+ + weightedLaplacianPair μ q (D a) (D b)+ + (1/2 : ℝ)*(weightedGamma μ hQ (D a) (U b) ψ+weightedGamma μ hQ (D b) (U a) ψ)) + (by + intro a b c + simp only [map_add,LinearMap.add_apply] + rw [weightedGamma_lp_add_weight μ hQ (D a) (D b) (U c) ψ (L c) (hU c), + weightedGamma_lp_add_left μ hQ (D c) (U a) (U b) ψ (L a) (L b) (hU a) (hU b)] + ring) + (by + intro c a b + simp only [map_smul,LinearMap.smul_apply,smul_eq_mul] + rw [weightedGamma_lp_smul_weight,weightedGamma_smul_left] + ring) + (by + intro a b c + simp only [map_add,LinearMap.add_apply] + rw [weightedGamma_lp_add_left μ hQ (D a) (U b) (U c) ψ (L b) (L c) (hU b) (hU c), + weightedGamma_lp_add_weight μ hQ (D b) (D c) (U a) ψ (L a) (hU a)] + ring) + (by + intro c a b + simp only [map_smul,LinearMap.smul_apply,smul_eq_mul] + rw [weightedGamma_smul_left,weightedGamma_lp_smul_weight] + ring) + +theorem regularBochnerForm_symmetric (K : ℝ) + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (q : X →ᵇ ℝ) (ψ : SobolevSpace μ hQ) (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hH : ∀ a b, H a b=H b a) (a b : Euclidean m) : + regularBochnerForm μ hQ K U D H q ψ L hU a b = + regularBochnerForm μ hQ K U D H q ψ L hU b a := by + change bochnerTestForm μ hQ (-K) (H a b) ψ+weightedLaplacianPair μ q (D a) (D b)+ + (1/2 : ℝ)*(weightedGamma μ hQ (D a) (U b) ψ+weightedGamma μ hQ (D b) (U a) ψ) = _ + rw [hH,weightedLaplacianPair_symmetric μ q (D a) (D b)] + change _ = bochnerTestForm μ hQ (-K) (H b a) ψ+weightedLaplacianPair μ q (D b) (D a)+ + (1/2 : ℝ)*(weightedGamma μ hQ (D b) (U a) ψ+weightedGamma μ hQ (D a) (U b) ψ) + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrame.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..37c9df5f55f65cc57beec9a411f52303ec1d420c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrame.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquarePair +import OAI.Geometry.RCD.Coordinates.RegularSquareSourceData +import OAI.Geometry.RCD.Coordinates.BochnerFrameCompletion +import OAI.Geometry.RCD.Coordinates.LaplacianCoordinateForm + +namespace OAI + +/-! # An orthonormal family exhausts the gradient energy in its dimension + +All square sources and densities are those of the original regular +finite family. Pointwise centering is performed inside its linear span, +after taking a single common full-measure set. +-/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m n : ℕ} + +theorem regularBochner_frame_completion [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (hn : 0 if i=j then 1 else 0) : + ∀ᵐ x ∂μ.restrict S, + localGamma μ hQ (U (w (Fin.last n))) (U (w (Fin.last n))) x= + ∑ i : Fin n, (localGamma μ hQ (U (w i.castSucc)) (U (w (Fin.last n))) x)^2 := by + let G (i j : Fin (n+1)) := localGamma μ hQ (U (w i)) (U (w j)) + let T (i j : Fin (n+1)) := + localHessianAction μ hQ (U (w i)) (U (w j)) (U (w j)) (H (w i) (w j)) + (H (w i) (w j)) (H (w j) (w j)) + have hgrad (i : Fin (n+1)) : ∀ᵐ x ∂μ, G i i x≤(L (w i):ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U (w i)),hU (w i), + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U (w i)))] with x he hb h0 + change localGamma μ hQ (U (w i)) (U (w i)) x≤_ + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + have hfb (i : Fin (n+1)) : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U (w i)) x|≤‖F i‖₊ := by + filter_upwards [hF i] with x hx + rw [hx] + exact (F i).norm_coe_le_norm x + have hsource (i : Fin (n+1)) := regular_square_source_data μ hQ U D H L hU hD hH + (w i) (z i) (F i) (hF i) (hz i) (d i) (A i) (hd i) (hDr i) + choose dz B hdz hDz using hsource + have hlinear (i j : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + bochnerRadonDensity μ M x (w i) (z j)= + 2*F j x*bochnerRadonDensity μ M x (w i) (w j)+2*T i j x := by + have hp := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + (w i) (w j) (z j) (F j) (hF j) (hz j) (d i) (d j) (A i) (A j) + (hd i) (hd j) (hDr i) (hDr j) hS χ hχ hχc hχΩ hχ0 hχ1 + have hh := signed_rnDeriv_local_product μ (M.bilinear (w i) (w j)) + (M.bilinear (w i) (w j)) (M.bilinear (w i) (z j)) (F j) (F j) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS hp + filter_upwards [hh,ae_restrict_of_ae (bochnerRadonDensity_rep μ M (w i) (z j)), + ae_restrict_of_ae (bochnerRadonDensity_rep μ M (w i) (w j))] with x hx he hf + rw [he,hf] at hx + change _=2*F j x*bochnerRadonDensity μ M x (w i) (w j)+2* + localHessianAction μ hQ (U (w i)) (U (w j)) (U (w j)) + (H (w i) (w j)) (H (w i) (w j)) (H (w j) (w j)) x + linarith only [hx] + have hpairs (i j : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + bochnerRadonDensity μ M x (z i) (z j)= + 2*F j x*bochnerRadonDensity μ M x (z i) (w j)+4*F i x*T i j x+4*(G i j x)^2 := + regularBochner_square_pair μ hQ K U D H L hU hD hH hsym hΩ M hM + (w i) (w j) (z i) (z j) (F i) (F j) (hF i) (hF j) (hz i) (hz j) + (dz i) (d j) (B i) (A j) (hdz i) (hd j) (hDz i) (hDr j) + hS hsub χ hχ hχc hχΩ hχ0 hχ1 + have hlap (i : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + laplacianCoordinateForm μ D x (z i)= + 2*F i x*laplacianCoordinateForm μ D x (w i)+2*G i i x := by + have hh := laplacianCoordinateForm_square μ hQ U D hD (w i) (z i) + ‖F i‖₊ (L (w i)) (hfb i) (hgrad i) (hz i) + filter_upwards [ae_restrict_of_ae hh,ae_restrict_of_ae (hF i)] with x hx hf + simpa only [hf] using hx + have hfull := ae_finite_bochner_bound (μ.restrict S) (bochnerRadonDensity μ M) + (laplacianCoordinateForm μ D) (n:ℝ) hBE + filter_upwards [hfull,ae_all_iff.mpr hlap, + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hlinear i)), + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hpairs i)), + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hgram i))] with x hbe hl hp hpp hg + let C (i : Fin (n+1)) := z i-(2*F i x) • w i + have hCs (i : Fin (n+1)) : laplacianCoordinateForm μ D x (C i)=2*G i i x := + centered_square_source (laplacianCoordinateForm μ D x) (w i) (z i) (F i x) (G i i x) (hl i) + have hCb (i j : Fin (n+1)) : bochnerRadonDensity μ M x (C i) (C j)=4*(G i j x)^2 := + centered_square_bochner_pair (bochnerRadonDensity μ M x) (w i) (w j) (z i) (z j) + (F i x) (F j x) (T i j x) (G i j x) (hpp i j) (hp i j) + apply bochner_frame_completion hn (bochnerRadonDensity μ M x) (laplacianCoordinateForm μ D x) + (bochnerRadonDensity_symmetric μ M x) hbe (fun i => C i.castSucc) (C (Fin.last n)) + (G (Fin.last n) (Fin.last n) x) (fun i => G i.castSucc (Fin.last n) x) + · intro i + rw [hCs] + change 2*localGamma μ hQ (U (w i.castSucc)) (U (w i.castSucc)) x=2 + rw [hg i i] + norm_num + · intro i j + rw [hCb] + change 4*(localGamma μ hQ (U (w i.castSucc)) (U (w j.castSucc)) x)^2=_ + rw [hg i j] + split_ifs <;> norm_num + · exact hCs _ + · exact hCb _ _ + · intro i + exact hCb _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..69a2c91e37f00621a17f87f63885692a03ad8bbc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerFrameDefect.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquareFamily +import OAI.Geometry.RCD.Coordinates.BochnerFrameDefect + +namespace OAI + +/-! # Quantitative frame energy for actual regular Bochner data -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m n : ℕ} + +theorem regularBochner_frame_defect [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (hn : 0 C i.castSucc) (C (Fin.last n)) + (fun i j => localGamma μ hQ (U (w i.castSucc)) (U (w j.castSucc)) x) + (localGamma μ hQ (U (w (Fin.last n))) (U (w (Fin.last n))) x) + (fun i => localGamma μ hQ (U (w i.castSucc)) (U (w (Fin.last n))) x) + he he1 (fun i => hx.1 i.castSucc) (fun i j => hx.2.1 i.castSucc j.castSucc) + (hx.1 (Fin.last n)) (hx.2.1 (Fin.last n) (Fin.last n)) + (fun i => hx.2.1 i.castSucc (Fin.last n)) ht hs + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerLocalSource.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerLocalSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0d77b80ffa4c26ac9e6435a8b311015fe967d35 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerLocalSource.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerForm +import OAI.Geometry.RCD.Sobolev.LocalMixedSourceIdentity + +namespace OAI + +/-! # Local Sobolev sources in the polarized Bochner identity -/ + +open Set MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +theorem regularBochnerForm_local_sources (K : ℝ) + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (q : X →ᵇ ℝ) (ψ : SobolevSpace μ hQ) (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + {Ω : Set X} (hΩ : MeasurableSet Ω) (hq : tsupport q ⊆ Ω) + (hψ : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q) + (a b : Euclidean m) (da db : SobolevSpace μ hQ) + (hda : IsWeakLaplacian μ hQ (U a) (D a)) + (hdb : IsWeakLaplacian μ hQ (U b) (D b)) + (hsa : D a =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ da) + (hsb : D b =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ db) + (A B : ℝ≥0) + (ha : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ da x|≤A) + (hb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ db x|≤B) : + regularBochnerForm μ hQ K U D H q ψ L hU a b = + bochnerTestForm μ hQ (-K) (H a b) ψ- + (1/2 : ℝ)*((∫ x, q x*localGamma μ hQ (U a) db x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U b) da x ∂μ)) := by + have hψb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ ψ x|≤(‖q‖₊:ℝ) := by + filter_upwards [hψ] with x hx + simpa only [hx,Real.norm_eq_abs,coe_nnnorm] using q.norm_coe_le_norm x + have h₁ := weakLaplacian_local_mixed_identity μ hQ hΩ (U a) db ψ (D a) (D b) + hda hsb B ‖q‖₊ hb hψb q hψ hq + have h₂ := weakLaplacian_local_mixed_identity μ hQ hΩ (U b) da ψ (D b) (D a) + hdb hsa A ‖q‖₊ ha hψb q hψ hq + have hc : (∫ x, q x*D b x*D a x ∂μ) = ∫ x, q x*D a x*D b x ∂μ := by + congr 1 + funext x + ring + rw [hc] at h₂ + change bochnerTestForm μ hQ (-K) (H a b) ψ+weightedLaplacianPair μ q (D a) (D b)+ + (1/2 : ℝ)*(weightedGamma μ hQ (D a) (U b) ψ+weightedGamma μ hQ (D b) (U a) ψ) = _ + rw [weightedLaplacianPair_apply] + linarith only [h₁,h₂] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f13b45017a42d38323b39012d9df2285ccf5197 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasure.lean @@ -0,0 +1,158 @@ +import OAI.Geometry.RCD.Sobolev.BochnerCauchySchwarz +import OAI.Geometry.RCD.Sobolev.CompactBochnerSobolevMeasure +import OAI.Geometry.RCD.Sobolev.SignedTestFunctional +import OAI.Geometry.RCD.Coordinates.LocalPositiveBilinearMeasure +import OAI.Geometry.RCD.Sobolev.AnnularLipschitzCutoff + +namespace OAI + +/-! # A common full Bochner measure for a finite regular span -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction BigOperators + +noncomputable section +namespace RegularPointCoordinates + +private theorem coordinateBilinear_of_form {m : ℕ} (B : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] ℝ) : + coordinateBilinear (fun i j => B (EuclideanSpace.single i 1) (EuclideanSpace.single j 1)) = B := by + classical + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro i + apply (EuclideanSpace.basisFun (Fin m) ℝ).toBasis.ext + intro j + simp [coordinateBilinear,EuclideanSpace.basisFun_apply] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {m : ℕ} + +/-- The scalar RCD Bochner measures polarize to one positive bilinear +measure on the whole regular span. No source derivatives are assumed. -/ +theorem NoncollapsedRCD.regular_span_bochner_sobolev_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {r : ℝ} (hr : 0 F a a) + (coordinateBilinear_of_form (B q ψ)) + simpa only [coordinateBilinear_apply,smul_eq_mul] using hc + have hpos (a : Euclidean m) (q : compactLipschitzTests (ball p (2*r))) + (hq : 0≤(q : X →ᵇ ℝ)) : 0≤∫ᵛ x, (q : X →ᵇ ℝ) x ∂<•(Q a a) := by + obtain ⟨C,hC,hqc,hqs⟩ := q.property + let ψ := compactTestSobolev μ hQ _ q + have hψ := compactTestSobolev_coe μ hQ _ q + change 0 ≤ signedTestIntegral (q : X →ᵇ ℝ) (Q a a) + rw [htest a ψ q hC.continuous hqc hqs hψ,← hscalarB a ψ q hC.continuous hqc hqs hψ] + exact integral_nonneg hq + obtain ⟨χ,C,hχ,hχc,hχs,hχb,hχ1⟩ := + exists_annular_lipschitz_cutoff p (a := r) (b := 3*r/2) (by linarith) + let M := positiveBilinearMeasure_of_local_tests Q (coordinateBilinear_symmetric A hA) + measurableSet_closedBall χ hχ hχc + (hχs.trans (closedBall_subset_ball (show 3*r/2<2*r by linarith))) + (fun x => (hχb x).1) hχ1 hpos + refine ⟨M,?_⟩ + intro a ψ q hq hqc hqs hψ + rw [← VectorMeasure.integral_toSignedMeasure,M.measure_toSignedMeasure] + change signedTestIntegral q ((Q a a).restrict (closedBall p r)) = _ + rw [signedTestIntegral_restrict q _ measurableSet_closedBall (hqs.trans ball_subset_closedBall)] + exact htest a ψ q hq hqc (hqs.trans (ball_subset_ball (by linarith))) hψ + + +/-- The compact Lipschitz test specialization of the full Sobolev test identity. -/ +theorem NoncollapsedRCD.regular_span_bochner_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {r : ℝ} (hr : 0 hM a ψ q hq.continuous hqc hqs hψ⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasureLaplacian.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasureLaplacian.lean new file mode 100644 index 0000000000000000000000000000000000000000..554da2954bad8b53a166bb506669e9ede1f9de77 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerMeasureLaplacian.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.RCD.Sobolev.BochnerMeasurePolarization +import OAI.Geometry.RCD.Coordinates.RegularBochnerLocalSource +import OAI.Geometry.RCD.Metric.LocalMeasureProduct + +namespace OAI + +/-! # The local measure Laplacian of a regular Gram entry -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- Local Sobolev representatives of the Laplacians turn the common +Bochner identity into the full distributional equation for each Gram +entry. Global derivatives of the chosen extensions are not required. -/ +theorem regularBochner_measure_laplacian (K : ℝ) + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hsym : ∀ a b, H a b=H b a) + {Ω : Set X} (hΩ : MeasurableSet Ω) (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (a b : Euclidean m) (da db : SobolevSpace μ hQ) + (hH : SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hda : IsWeakLaplacian μ hQ (U a) (D a)) + (hdb : IsWeakLaplacian μ hQ (U b) (D b)) + (hsa : D a =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ da) + (hsb : D b =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ db) + (A B : ℝ≥0) + (ha : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ da x|≤A) + (hb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ db x|≤B) : + IsMeasureLaplacianOn μ hQ Ω (H a b) + ((2 : ℝ) • M.bilinear a b + μ.withDensityᵥ (fun x => + 2*K*localGamma μ hQ (U a) (U b) x+ + localGamma μ hQ (U a) db x+localGamma μ hQ (U b) da x)) := by + intro ψ v hv hvc hvs hψ + let q : X →ᵇ ℝ := ofCompactSupport v hv hvc + have hq : HasCompactSupport (q : X → ℝ) := hvc + have hqp : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q := hψ + have hm := M.polarized_test q (regularBochnerForm μ hQ K U D H q ψ L hU) + (regularBochnerForm_symmetric μ hQ K U D H q ψ L hU hsym) + (fun c => hM c ψ q hq hvs hqp) a b + have hlocal := regularBochnerForm_local_sources μ hQ K U D H q ψ L hU hΩ hvs hqp + a b da db hda hdb hsa hsb A B ha hb + have hI : inner ℝ (SobolevSpace.toLp μ hQ ψ) (SobolevSpace.toLp μ hQ (H a b)) = + ∫ x, q x*localGamma μ hQ (U a) (U b) x ∂μ := by + rw [L2.inner_def] + apply integral_congr_ae + filter_upwards [hH,hψ] with x hh hp + simp only [Real.inner_apply,hh,hp] + change v x*localGamma μ hQ (U a) (U b) x = v x*localGamma μ hQ (U a) (U b) x + rfl + have hig := (localGamma_memL1 μ hQ (U a) (U b)).const_mul (2*K) + have hid : Integrable (fun x => 2*K*localGamma μ hQ (U a) (U b) x+ + localGamma μ hQ (U a) db x+localGamma μ hQ (U b) da x) μ := + (hig.add (localGamma_memL1 μ hQ (U a) db)).add (localGamma_memL1 μ hQ (U b) da) + have hi₁ := (localGamma_memL1 μ hQ (U a) (U b)).bdd_mul q.continuous.aestronglyMeasurable + (Eventually.of_forall q.norm_coe_le_norm) + have hi₂ := (localGamma_memL1 μ hQ (U a) db).bdd_mul q.continuous.aestronglyMeasurable + (Eventually.of_forall q.norm_coe_le_norm) + have hi₃ := (localGamma_memL1 μ hQ (U b) da).bdd_mul q.continuous.aestronglyMeasurable + (Eventually.of_forall q.norm_coe_le_norm) + have hi₁' : Integrable (fun x => q x*(2*K*localGamma μ hQ (U a) (U b) x)) μ := by + convert hi₁.const_mul (2*K) using 1 + ext x + ring + have hiss : Integrable (fun x => q x*(2*K*localGamma μ hQ (U a) (U b) x)+ + q x*localGamma μ hQ (U a) db x) μ := hi₁'.add hi₂ + have hsource : (∫ᵛ x, v x ∂<•((2 : ℝ) • M.bilinear a b + μ.withDensityᵥ (fun x => + 2*K*localGamma μ hQ (U a) (U b) x+ + localGamma μ hQ (U a) db x+localGamma μ hQ (U b) da x))) = + 2*signedTestIntegral q (M.bilinear a b)+ + 2*K*(∫ x, q x*localGamma μ hQ (U a) (U b) x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U a) db x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U b) da x ∂μ) := by + change (∫ᵛ x, q x ∂<•((2 : ℝ) • M.bilinear a b + μ.withDensityᵥ _)) = _ + rw [VectorMeasure.integral_add_vectorMeasure (PositiveBilinearMeasure.integrable_weight q _) + (PositiveBilinearMeasure.integrable_weight q _),VectorMeasure.integral_smul_vectorMeasure, + integral_signedDensity μ hid] + have heq : (fun x => q x*(2*K*localGamma μ hQ (U a) (U b) x+ + localGamma μ hQ (U a) db x+localGamma μ hQ (U b) da x)) = + (fun x => q x*(2*K*localGamma μ hQ (U a) (U b) x)+ + q x*localGamma μ hQ (U a) db x+q x*localGamma μ hQ (U b) da x) := by + funext x + ring + rw [heq,integral_add hiss hi₃,integral_add hi₁' hi₂] + have hc : (∫ x, q x*(2*K*localGamma μ hQ (U a) (U b) x) ∂μ) = + 2*K*(∫ x, q x*localGamma μ hQ (U a) (U b) x ∂μ) := by + rw [← integral_const_mul] + congr 1 + funext x + ring + rw [hc] + change 2*(∫ᵛ x, q x ∂<•M.bilinear a b)+ + (2*K*(∫ x, q x*localGamma μ hQ (U a) (U b) x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U a) db x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U b) da x ∂μ)) = _ + change _ = 2*(∫ᵛ x, q x ∂<•M.bilinear a b)+ + 2*K*(∫ x, q x*localGamma μ hQ (U a) (U b) x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U a) db x ∂μ)+ + (∫ x, q x*localGamma μ hQ (U b) da x ∂μ) + ring + rw [← hm,bochnerTestForm_apply,hI] at hlocal + rw [hsource] + linarith only [hlocal] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerPositivity.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerPositivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7b43813aaec5f18ad184b04baff2ab13d5b1771 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerPositivity.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerForm + +namespace OAI + +/-! # Positivity and Cauchy--Schwarz for the full regular Bochner form -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {m : ℕ} + +theorem NoncollapsedRCD.regularBochnerForm_nonneg {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + (U : Euclidean m →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (D : Euclidean m →L[ℝ] Lp ℝ 2 (hausdorff n X)) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (q : X →ᵇ ℝ) (ψ : SobolevSpace (hausdorff n X) hX.quadratic) (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂hausdorff n X, SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (U a) x≤L a) + (hq : 0≤q) (hψ : SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ =ᵐ[hausdorff n X] q) + (a : Euclidean m) + (ha : ∃ (v : X → ℝ) (Q : ℝ≥0), LipschitzWith Q v ∧ HasCompactSupport v ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (U a) =ᵐ[hausdorff n X] v) + (hd : IsWeakLaplacian (hausdorff n X) hX.quadratic (U a) (D a)) + (hH : SobolevSpace.toLp (hausdorff n X) hX.quadratic (H a a) =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic (U a) (U a)) : + 0≤regularBochnerForm (hausdorff n X) hX.quadratic K U D H q ψ L hU a a := by + let μ := hausdorff n X + obtain ⟨v,Q,hv,hvc,hav⟩ := ha + have hb := hX.compact_bochner_sobolev_test hn hv hvc p (U a) hav (D a) hd (H a a) hH + ψ q.continuous.measurable hψ ‖q‖₊ (fun x => q.norm_coe_le_norm x) (fun x => hq x) + change 0≤bochnerTestForm μ hX.quadratic (-K) (H a a) ψ+ + weightedLaplacianPair μ q (D a) (D a)+ + (1/2 : ℝ)*(weightedGamma μ hX.quadratic (D a) (U a) ψ+ + weightedGamma μ hX.quadratic (D a) (U a) ψ) + rw [bochnerTestForm_apply,weightedLaplacianPair_apply] + have heq : (∫ x, q x*D a x*D a x ∂μ) = ∫ x, q x*(D a x)^2 ∂μ := by + congr 1 + funext x + ring + rw [heq] + nlinarith only [hb] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerShiftedDirectional.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerShiftedDirectional.lean new file mode 100644 index 0000000000000000000000000000000000000000..88ef9f56da2efbc45901bf88b1e1215ffb2be6b8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerShiftedDirectional.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquare +import OAI.Geometry.RCD.Sobolev.HessianActionLocality +import OAI.Geometry.RCD.Sobolev.BochnerDensityShiftedQuadratic +import OAI.Geometry.RCD.Coordinates.LaplacianCoordinateForm + +namespace OAI + +/-! # Shifted Hessian domination from scalar dimensional Bochner on actual families -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- The full product calculus and measure positivity give the sharp +pointwise diagonal-direction Hessian bound, with the same Bochner measure. -/ +theorem regularBochner_shifted_directional_bound [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (K N b : ℝ) (hN : 0 + 2*G x*localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w) x+ + 2*(localGamma μ hQ (U w) (U w) x)^2 := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub hsq, + ae_restrict_of_ae hG] with x hx hg + simpa only [hg] using hx + have hgrad : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L w:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U w),hU w, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U w))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + have hsource := laplacianCoordinateForm_square μ hQ U D hD w z ‖G‖₊ (L w) hgb hgrad hz + have hdelta : ∀ᵐ x ∂μ.restrict S, + laplacianCoordinateForm μ D x z=2*G x*laplacianCoordinateForm μ D x w+ + 2*localGamma μ hQ (U w) (U w) x := by + filter_upwards [ae_restrict_of_ae hsource,ae_restrict_of_ae hG] with x hs hg + rwa [hg] at hs + exact bochner_measure_shifted_quadratic_bound μ M v w z G + (localHessianAction μ hQ (U v) (U w) (U w) (H v w) (H v w) (H w w)) + (localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w)) + (localHessianAction μ hQ (U z) (U w) (U w) (H z w) (H z w) (H w w)) + (localGamma μ hQ (U w) (U w)) (laplacianCoordinateForm μ D) N b hN + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS h₁ h₂ h₃ hsq' hdelta hBE + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquare.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquare.lean new file mode 100644 index 0000000000000000000000000000000000000000..910a677673aac71d4c2f846d45937433f3ef13ea --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquare.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Coordinates.RegularSquareLaplacian +import OAI.Geometry.RCD.Coordinates.RegularBochnerMeasureLaplacian +import OAI.Geometry.RCD.Sobolev.BochnerMeasureProductLocal + +namespace OAI + +/-! # The full Bochner square identity for a regular finite family -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +theorem regularGram_abs_le + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (a b : Euclidean m) : + ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (H a b) x|≤L a*L b := by + filter_upwards [hH a b,localGamma_abs_le μ hQ (U a) (U b),hU a,hU b, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U b))] + with x hh hab ha hb h0 + rw [hh] + exact hab.trans (mul_le_mul ha hb h0 (L a).coe_nonneg) + +/-- Squaring one member of the regular family produces the actual full +measure product identity. Only local Sobolev representatives of the two +original Laplacians are needed. -/ +theorem regularBochner_square_product [μ.Regular] [SecondCountableTopology X] + (K : ℝ) (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hsym : ∀ a b, H a b=H b a) + {Ω S : Set X} (hΩ : MeasurableSet Ω) (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (a w z : Euclidean m) (G : X →ᵇ ℝ) + (hG : SobolevSpace.toLp μ hQ (U w) =ᵐ[μ] G) + (hz : U z=SobolevSpace.product μ hQ (U w) (U w) ‖G‖₊ ‖G‖₊) + (da dw : SobolevSpace μ hQ) (A B : ℝ≥0) + (ha : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ da x|≤A) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dw x|≤B) + (hda : D a =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ da) + (hdw : D w =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dw) + (hS : MeasurableSet S) (χ : X →ᵇ ℝ) {Cχ : ℝ≥0} (hχ : LipschitzWith Cχ χ) + (hχc : HasCompactSupport (χ : X → ℝ)) (hχΩ : tsupport χ ⊆ Ω) + (hχ0 : ∀ x, 0≤χ x) (hχ1 : ∀ x ∈ S, χ x=1) : + (M.bilinear a z).restrict S = + (signedSourceWeight (M.bilinear a w) G+signedSourceWeight (M.bilinear a w) G+ + (2:ℝ) • μ.withDensityᵥ + (localHessianAction μ hQ (U a) (U w) (U w) (H a w) (H a w) (H w w))).restrict S := by + have hgb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U w) x|≤‖G‖₊ := by + filter_upwards [hG] with x hx + rw [hx] + exact G.norm_coe_le_norm x + have hL : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L w:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U w),hU w, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U w))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + let dz := SobolevSpace.product μ hQ (U w) dw ‖G‖₊ B+ + SobolevSpace.product μ hQ (U w) dw ‖G‖₊ B+(2:ℝ) • H w w + obtain ⟨q,hq,hqr⟩ := (hD w).square_local μ hQ (U w) (H w w) dw (D w) + ‖G‖₊ B (L w) hgb hw hL (ae_restrict_of_ae (hH w w)) hdw + have hqz : D z=q := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD z) hq + have hdz : D z =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dz := by rw [hqz]; exact hqr + have hdzb := squareLaplacianSource_bound μ hQ (U w) (H w w) dw ‖G‖₊ B + (L w*L w) hgb hw (regularGram_abs_le μ hQ U H L hU hH w w) + let E : ℝ≥0 := 2*‖G‖₊*B+2*(L w*L w) + have hE : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dz x|≤E := by + simpa only [E,NNReal.coe_add,NNReal.coe_mul,NNReal.coe_ofNat] using hdzb + have hsg := regularBochner_measure_laplacian μ hQ K U D H L hU hsym hΩ M hM + a w da dw (hH a w) (hD a) (hD w) hda hdw A B ha hw + have hsz := regularBochner_measure_laplacian μ hQ K U D H L hU hsym hΩ M hM + a z da dz (hH a z) (hD a) (hD z) hda hdz A E ha hE + apply bochner_measure_product μ hQ hΩ K (U a) (U w) (U w) da dw dw + (H a w) (H a w) (H w w) (H a z) (D w) (D w) (hD w) (hD w) + hdw hdw G G hG hG (L a*L w) (L a*L w) B B + (regularGram_abs_le μ hQ U H L hU hH a w) + (regularGram_abs_le μ hQ U H L hU hH a w) hw hw + (ae_restrict_of_ae (hH a w)) (ae_restrict_of_ae (hH a w)) + (by rw [← hz]; exact ae_restrict_of_ae (hH a z)) + (M.bilinear a w) (M.bilinear a w) (M.bilinear a z) + hsg hsg + (by rw [hz] at hsz; exact hsz) + hS χ hχ hχc hχΩ hχ0 hχ1 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquareFamily.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquareFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..c93aa454f84c7c4b15ed518ae0b563f15a95f848 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquareFamily.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerFrame + +namespace OAI + +/-! # Common centered-square source and density data for a regular family -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m n : ℕ} + +theorem regularBochner_centered_square_family [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (K : ℝ) (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hsym : ∀ a b, H a b=H b a) + {Ω S : Set X} (hΩ : MeasurableSet Ω) (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (w z : Fin (n+1) → Euclidean m) (F : Fin (n+1) → X →ᵇ ℝ) + (hF : ∀ i, SobolevSpace.toLp μ hQ (U (w i)) =ᵐ[μ] F i) + (hz : ∀ i, U (z i)=SobolevSpace.product μ hQ (U (w i)) (U (w i)) ‖F i‖₊ ‖F i‖₊) + (d : Fin (n+1) → SobolevSpace μ hQ) (A : Fin (n+1) → ℝ≥0) + (hd : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (d i) x|≤A i) + (hDr : ∀ i, D (w i) =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ (d i)) + (hS : MeasurableSet S) (hsub : S⊆Ω) + (χ : X →ᵇ ℝ) {Cχ : ℝ≥0} (hχ : LipschitzWith Cχ χ) + (hχc : HasCompactSupport (χ : X → ℝ)) (hχΩ : tsupport χ⊆Ω) + (hχ0 : ∀ x, 0≤χ x) (hχ1 : ∀ x∈S, χ x=1) + (hBE : ∀ a, ∀ᵐ x ∂μ.restrict S, + (laplacianCoordinateForm μ D x a)^2≤(n:ℝ)*bochnerRadonDensity μ M x a a) : + ∀ᵐ x ∂μ.restrict S, + (∀ i, laplacianCoordinateForm μ D x (z i-(2*F i x) • w i)= + 2*localGamma μ hQ (U (w i)) (U (w i)) x) ∧ + (∀ i j, bochnerRadonDensity μ M x (z i-(2*F i x) • w i) + (z j-(2*F j x) • w j)=4*(localGamma μ hQ (U (w i)) (U (w j)) x)^2) ∧ + ∀ a, (laplacianCoordinateForm μ D x a)^2≤(n:ℝ)*bochnerRadonDensity μ M x a a := by + let G (i j : Fin (n+1)) := localGamma μ hQ (U (w i)) (U (w j)) + let T (i j : Fin (n+1)) := + localHessianAction μ hQ (U (w i)) (U (w j)) (U (w j)) (H (w i) (w j)) + (H (w i) (w j)) (H (w j) (w j)) + have hgrad (i : Fin (n+1)) : ∀ᵐ x ∂μ, G i i x≤(L (w i):ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U (w i)),hU (w i), + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U (w i)))] with x he hb h0 + change localGamma μ hQ (U (w i)) (U (w i)) x≤_ + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + have hfb (i : Fin (n+1)) : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U (w i)) x|≤‖F i‖₊ := by + filter_upwards [hF i] with x hx + rw [hx] + exact (F i).norm_coe_le_norm x + have hsource (i : Fin (n+1)) := regular_square_source_data μ hQ U D H L hU hD hH + (w i) (z i) (F i) (hF i) (hz i) (d i) (A i) (hd i) (hDr i) + choose dz B hdz hDz using hsource + have hlinear (i j : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + bochnerRadonDensity μ M x (w i) (z j)= + 2*F j x*bochnerRadonDensity μ M x (w i) (w j)+2*T i j x := by + have hp := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + (w i) (w j) (z j) (F j) (hF j) (hz j) (d i) (d j) (A i) (A j) + (hd i) (hd j) (hDr i) (hDr j) hS χ hχ hχc hχΩ hχ0 hχ1 + have hh := signed_rnDeriv_local_product μ (M.bilinear (w i) (w j)) + (M.bilinear (w i) (w j)) (M.bilinear (w i) (z j)) (F j) (F j) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS hp + filter_upwards [hh,ae_restrict_of_ae (bochnerRadonDensity_rep μ M (w i) (z j)), + ae_restrict_of_ae (bochnerRadonDensity_rep μ M (w i) (w j))] with x hx he hf + rw [he,hf] at hx + change _=2*F j x*bochnerRadonDensity μ M x (w i) (w j)+2* + localHessianAction μ hQ (U (w i)) (U (w j)) (U (w j)) + (H (w i) (w j)) (H (w i) (w j)) (H (w j) (w j)) x + linarith only [hx] + have hpairs (i j : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + bochnerRadonDensity μ M x (z i) (z j)= + 2*F j x*bochnerRadonDensity μ M x (z i) (w j)+4*F i x*T i j x+4*(G i j x)^2 := + regularBochner_square_pair μ hQ K U D H L hU hD hH hsym hΩ M hM + (w i) (w j) (z i) (z j) (F i) (F j) (hF i) (hF j) (hz i) (hz j) + (dz i) (d j) (B i) (A j) (hdz i) (hd j) (hDz i) (hDr j) + hS hsub χ hχ hχc hχΩ hχ0 hχ1 + have hlap (i : Fin (n+1)) : ∀ᵐ x ∂μ.restrict S, + laplacianCoordinateForm μ D x (z i)= + 2*F i x*laplacianCoordinateForm μ D x (w i)+2*G i i x := by + have hh := laplacianCoordinateForm_square μ hQ U D hD (w i) (z i) + ‖F i‖₊ (L (w i)) (hfb i) (hgrad i) (hz i) + filter_upwards [ae_restrict_of_ae hh,ae_restrict_of_ae (hF i)] with x hx hf + simpa only [hf] using hx + have hfull := ae_finite_bochner_bound (μ.restrict S) (bochnerRadonDensity μ M) + (laplacianCoordinateForm μ D) (n:ℝ) hBE + filter_upwards [hfull,ae_all_iff.mpr hlap, + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hlinear i)), + ae_all_iff.mpr (fun i => ae_all_iff.mpr (hpairs i))] with x hbe hl hp hpp + refine ⟨?_,?_,hbe⟩ + · intro i + exact centered_square_source (laplacianCoordinateForm μ D x) (w i) (z i) + (F i x) (G i i x) (hl i) + · intro i j + exact centered_square_bochner_pair (bochnerRadonDensity μ M x) (w i) (w j) + (z i) (z j) (F i x) (F j x) (T i j x) (G i j x) (hpp i j) (hp i j) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquarePair.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquarePair.lean new file mode 100644 index 0000000000000000000000000000000000000000..8953c2fb230b87c2c217028d8c8073f3a5269f6d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerSquarePair.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquare +import OAI.Geometry.RCD.Sobolev.HessianSquareCross +import OAI.Geometry.RCD.Sobolev.LocalBochnerDensityProduct +import OAI.Geometry.RCD.Sobolev.BochnerRadonDensity + +namespace OAI + +/-! # Mixed Bochner densities of actual squared regular directions -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +theorem regularBochner_square_pair [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (K : ℝ) (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hsym : ∀ a b, H a b=H b a) + {Ω S : Set X} (hΩ : MeasurableSet Ω) (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (v w zv zw : Euclidean m) (F G : X →ᵇ ℝ) + (hF : SobolevSpace.toLp μ hQ (U v) =ᵐ[μ] F) + (hG : SobolevSpace.toLp μ hQ (U w) =ᵐ[μ] G) + (hzv : U zv=SobolevSpace.product μ hQ (U v) (U v) ‖F‖₊ ‖F‖₊) + (hzw : U zw=SobolevSpace.product μ hQ (U w) (U w) ‖G‖₊ ‖G‖₊) + (dzv dw : SobolevSpace μ hQ) (A B : ℝ≥0) + (hdzv : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dzv x|≤A) + (hdw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dw x|≤B) + (hDzv : D zv =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dzv) + (hDw : D w =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dw) + (hS : MeasurableSet S) (hsub : S⊆Ω) + (χ : X →ᵇ ℝ) {Cχ : ℝ≥0} (hχ : LipschitzWith Cχ χ) + (hχc : HasCompactSupport (χ : X → ℝ)) (hχΩ : tsupport χ⊆Ω) + (hχ0 : ∀ x, 0≤χ x) (hχ1 : ∀ x∈S, χ x=1) : + ∀ᵐ x ∂μ.restrict S, bochnerRadonDensity μ M x zv zw= + 2*G x*bochnerRadonDensity μ M x zv w+ + 4*F x*localHessianAction μ hQ (U v) (U w) (U w) (H v w) (H v w) (H w w) x+ + 4*(localGamma μ hQ (U v) (U w) x)^2 := by + have hp := regularBochner_square_product μ hQ K U D H L hU hD hH hsym hΩ M hM + zv w zw G hG hzw dzv dw A B hdzv hdw hDzv hDw hS χ hχ hχc hχΩ hχ0 hχ1 + have hd := signed_rnDeriv_local_product μ (M.bilinear zv w) (M.bilinear zv w) + (M.bilinear zv zw) G G + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS hp + have hfb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U v) x|≤‖F‖₊ := by + filter_upwards [hF] with x hx + rw [hx] + exact F.norm_coe_le_norm x + have hh := localHessianAction_square_cross μ hQ (Ω := Ω) (U v) (U w) (H v w) (H w w) + (H zv w) ‖F‖₊ (L v*L w) hfb (regularGram_abs_le μ hQ U H L hU hH v w) + (ae_restrict_of_ae (hH v w)) (by rw [← hzv]; exact ae_restrict_of_ae (hH zv w)) + rw [← hzv] at hh + filter_upwards [hd,ae_restrict_of_ae_restrict_of_subset hsub hh,ae_restrict_of_ae hF, + ae_restrict_of_ae (bochnerRadonDensity_rep μ M zv zw), + ae_restrict_of_ae (bochnerRadonDensity_rep μ M zv w)] with x hd hh hf hzz hzw + rw [hzz,hzw] at hd + rw [hh,hf] at hd + linarith only [hd] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakDirectional.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakDirectional.lean new file mode 100644 index 0000000000000000000000000000000000000000..b828699ca772f6e61beb1189751e09cb902f4076 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakDirectional.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerWeakSquare +import OAI.Geometry.RCD.Sobolev.HessianActionLocality +import OAI.Geometry.RCD.Sobolev.BochnerDensityShiftedQuadratic +import OAI.Geometry.RCD.Coordinates.LaplacianCoordinateForm + +namespace OAI + +/-! # Shifted directional domination for the actual weak regular algebra -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- The full product calculus and measure positivity give the sharp +pointwise diagonal-direction Hessian bound, with the same Bochner measure. -/ +theorem regularBochner_shifted_directional_bound_weak [μ.Regular] [SigmaFinite μ] [SecondCountableTopology X] + (K N b : ℝ) (hN : 0 + 2*G x*localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w) x+ + 2*(localGamma μ hQ (U w) (U w) x)^2 := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub hsq, + ae_restrict_of_ae hG] with x hx hg + simpa only [hg] using hx + have hgrad : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L w:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U w),hU w, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U w))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + have hsource := laplacianCoordinateForm_square μ hQ U D hD w z ‖G‖₊ (L w) hgb hgrad hz + have hdelta : ∀ᵐ x ∂μ.restrict S, + laplacianCoordinateForm μ D x z=2*G x*laplacianCoordinateForm μ D x w+ + 2*localGamma μ hQ (U w) (U w) x := by + filter_upwards [ae_restrict_of_ae hsource,ae_restrict_of_ae hG] with x hs hg + rwa [hg] at hs + exact bochner_measure_shifted_quadratic_bound μ M v w z G + (localHessianAction μ hQ (U v) (U w) (U w) (H v w) (H v w) (H w w)) + (localHessianAction μ hQ (U w) (U w) (U w) (H w w) (H w w) (H w w)) + (localHessianAction μ hQ (U z) (U w) (U w) (H z w) (H z w) (H w w)) + (localGamma μ hQ (U w) (U w)) (laplacianCoordinateForm μ D) N b hN + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) + (localHessianAction_integrable μ hQ _ _ _ _ _ _) hS h₁ h₂ h₃ hsq' hdelta hBE + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakSquare.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakSquare.lean new file mode 100644 index 0000000000000000000000000000000000000000..c93bd12f2cc8f66d518939ab5612199b488b93f4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBochnerWeakSquare.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.RCD.Sobolev.WeakBochnerSquare +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquare + +namespace OAI + +/-! # The full finite-family square identity with L² sources + +The exact weak product calculation avoids local Sobolev assumptions on +the Laplacians of the two original directions. +-/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +/-- The square product identity for the actual full bilinear measure. +Only the genuine L² Laplacian and Sobolev Gram representatives occur. -/ +theorem regularBochner_square_product_weak [μ.Regular] [SecondCountableTopology X] + (K : ℝ) (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) + (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + (hsym : ∀ a b, H a b=H b a) + {Ω S : Set X} (M : PositiveBilinearMeasure X (Euclidean m)) + (hM : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (q : X →ᵇ ℝ), + HasCompactSupport (q : X → ℝ) → tsupport q ⊆ Ω → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] q → + (∫ x, q x ∂M.measure a)=regularBochnerForm μ hQ K U D H q ψ L hU a a) + (a w z : Euclidean m) (G : X →ᵇ ℝ) + (hG : SobolevSpace.toLp μ hQ (U w) =ᵐ[μ] G) + (hz : U z=SobolevSpace.product μ hQ (U w) (U w) ‖G‖₊ ‖G‖₊) + (hS : MeasurableSet S) (χ : X →ᵇ ℝ) {Cχ : ℝ≥0} (hχ : LipschitzWith Cχ χ) + (hχc : HasCompactSupport (χ : X → ℝ)) (hχΩ : tsupport χ ⊆ Ω) + (hχ0 : ∀ x, 0≤χ x) (hχ1 : ∀ x∈S, χ x=1) : + (M.bilinear a z).restrict S= + (signedSourceWeight (M.bilinear a w) G+signedSourceWeight (M.bilinear a w) G+ + (2:ℝ) • μ.withDensityᵥ + (localHessianAction μ hQ (U a) (U w) (U w) (H a w) (H a w) (H w w))).restrict S := by + have hgb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U w) x|≤‖G‖₊ := by + filter_upwards [hG] with x hx + rw [hx] + exact G.norm_coe_le_norm x + have hF := regularGram_abs_le μ hQ U H L hU hH a w + have hGG := regularGram_abs_le μ hQ U H L hU hH w w + have hgrad : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L w:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U w),hU w, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U w))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + obtain ⟨qz,hqz,hqzr⟩ := (hD w).product μ hQ (U w) (U w) (D w) (D w) (hD w) + ‖G‖₊ ‖G‖₊ (L w) hgb hgb hgrad + have hDz : D z=qz := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD z) hqz + have hDzr : D z =ᵐ[μ] fun x => 2*SobolevSpace.toLp μ hQ (U w) x*D w x+ + 2*SobolevSpace.toLp μ hQ (H w w) x := by + rw [hDz] + filter_upwards [hqzr,hH w w] with x hx hh + rw [hx,hh] + ring + have hFz : H a z=(2:ℝ) • SobolevSpace.product μ hQ (U w) (H a w) ‖G‖₊ (L a*L w) := by + apply Subtype.ext + apply Lp.ext + change SobolevSpace.toLp μ hQ (H a z) =ᵐ[μ] + SobolevSpace.toLp μ hQ ((2:ℝ) • SobolevSpace.product μ hQ (U w) (H a w) ‖G‖₊ (L a*L w)) + have hp := SobolevSpace.product_coe μ hQ (U w) (H a w) ‖G‖₊ (L a*L w) hgb hF + have hg := localGamma_product_right μ hQ (U a) (U w) (U w) ‖G‖₊ ‖G‖₊ hgb hgb + filter_upwards [hH a z,hH a w,hp,hg, + Lp.coeFn_smul (2:ℝ) (SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ (U w) (H a w) ‖G‖₊ (L a*L w)))] + with x haz haw hp hg hs + simp only [map_smul] + rw [hs] + simp only [Pi.smul_apply,smul_eq_mul] + rw [haz,hp,haw,hz,hg] + ring + apply signedMeasure_eq_restrict_of_tests _ _ hS χ hχ hχc hχΩ hχ0 hχ1 + intro q + obtain ⟨Aq,hq,hqc,hqΩ⟩ := q.property + let ψ := compactTestSobolev μ hQ Ω q + have hψ : SobolevSpace.toLp μ hQ ψ =ᵐ[μ] (q : X →ᵇ ℝ) := compactTestSobolev_coe μ hQ Ω q + have hψb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ ψ x|≤‖(q:X →ᵇ ℝ)‖₊ := by + filter_upwards [hψ] with x hx + rw [hx] + exact (q:X →ᵇ ℝ).norm_coe_le_norm x + let ψg := SobolevSpace.product μ hQ ψ (U w) ‖(q:X →ᵇ ℝ)‖₊ ‖G‖₊ + have hψg : SobolevSpace.toLp μ hQ ψg =ᵐ[μ] (q:X →ᵇ ℝ)*G := by + filter_upwards [SobolevSpace.product_coe μ hQ ψ (U w) ‖(q:X →ᵇ ℝ)‖₊ ‖G‖₊ hψb hgb,hψ,hG] + with x hp hq hg + change SobolevSpace.toLp μ hQ ψg x=_ at hp + simp only [hp,hq,hg,Pi.mul_apply] + have hprodcompact : HasCompactSupport ((q:X →ᵇ ℝ)*G : X → ℝ) := hqc.mul_right + have hprodΩ : tsupport ((q:X →ᵇ ℝ)*G) ⊆ Ω := tsupport_mul_subset_left.trans hqΩ + have htest₁ := M.polarized_test (q:X →ᵇ ℝ) (regularBochnerForm μ hQ K U D H q ψ L hU) + (regularBochnerForm_symmetric μ hQ K U D H q ψ L hU hsym) + (fun v => hM v ψ q hqc hqΩ hψ) a z + have htest₂ := M.polarized_test ((q:X →ᵇ ℝ)*G) + (regularBochnerForm μ hQ K U D H ((q:X →ᵇ ℝ)*G) ψg L hU) + (regularBochnerForm_symmetric μ hQ K U D H _ ψg L hU hsym) + (fun v => hM v ψg _ hprodcompact hprodΩ hψg) a w + have hcalc := mixedBochnerTest_square μ hQ K (U a) (U w) (H a w) (H w w) ψ + (D a) (D w) (D z) (hD a) (hD w) ‖G‖₊ (L a*L w) (L w*L w) (L a) (L w) + hgb hF hGG (hU a) (hU w) (hH a w) (hH w w) G q hG hψ hDzr + change mixedBochnerTest μ hQ K (U a) _ (D a) (D z) _ q ψ= + 2*mixedBochnerTest μ hQ K (U a) (U w) (D a) (D w) (H a w) _ ψg+_ at hcalc + rw [← hz,← hFz] at hcalc + change signedTestIntegral (q:X →ᵇ ℝ) (M.bilinear a z)= + mixedBochnerTest μ hQ K (U a) (U z) (D a) (D z) (H a z) q ψ at htest₁ + change signedTestIntegral ((q:X →ᵇ ℝ)*G) (M.bilinear a w)= + mixedBochnerTest μ hQ K (U a) (U w) (D a) (D w) (H a w) _ ψg at htest₂ + rw [map_add,map_add,map_smul] + change _=(∫ᵛ x, (q:X →ᵇ ℝ) x ∂<•signedSourceWeight (M.bilinear a w) G)+ + (∫ᵛ x, (q:X →ᵇ ℝ) x ∂<•signedSourceWeight (M.bilinear a w) G)+ + 2*(∫ᵛ x, (q:X →ᵇ ℝ) x ∂<•μ.withDensityᵥ _) + simp only [integral_signedSourceWeight] + rw [integral_signedDensity μ (localHessianAction_integrable μ hQ _ _ _ _ _ _)] + change signedTestIntegral (q:X →ᵇ ℝ) (M.bilinear a z)= + signedTestIntegral ((q:X →ᵇ ℝ)*G) (M.bilinear a w)+ + signedTestIntegral ((q:X →ᵇ ℝ)*G) (M.bilinear a w)+_ + rw [htest₁,htest₂] + linarith only [hcalc] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularBoundedCoarseFineSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularBoundedCoarseFineSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fe41500f787ff09e6a62ea825f839f545dba2f7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularBoundedCoarseFineSets.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Coordinates.RegularGoodCoordinateSetsBounded +import OAI.Geometry.RCD.Coordinates.FlatSplittingApproximation +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinates +import OAI.Geometry.RCD.Metric.PointedCompactness + +namespace OAI + +/-! # Coarse and fine charts for the same actual harmonic family -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_bounded_coarse_fine_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hpublished : LocalAlmostSplittingInput hX) {p : X} (hp : IsRegular n p) + {η ζ : ℝ} (hη : 0 < η) (hζ : 0 < ζ) : + ∃ t s : ℝ, 0 < t ∧ t ≤ 1 ∧ 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) (U : Set X), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) t u v ∧ + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ ζ*(hausdorff n X).real (ball p R) ∧ + IsPointedApproximation p 0 (R/8) (1/2) (η/4) + (fun x => (R/8)⁻¹ • (v x-v p)) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R/16 → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (v z-v x)) := by + obtain ⟨τ,β,hτ,hβ,hcoarse⟩ := hX.flat_splitting_coordinates hn hX.measuredCoordinateInput + (show 0 < η/4 by positivity) + obtain ⟨t,s,ht,htsmall,hs,hsets⟩ := hX.regular_good_coordinate_sets_bounded + hn hpublished hp hη hζ (lt_min hβ zero_lt_one) + have htβ : t ≤ β := htsmall.trans (min_le_left _ _) + have ht1 : t ≤ 1 := htsmall.trans (min_le_right _ _) + obtain ⟨d,hd,hflat⟩ := regular_small_scale_approximation + (hX.pointedRescalingPrecompactness hn p) hp (show (0:ℝ)<2 by norm_num) hτ + refine ⟨t,min s (8*d),ht,ht1,lt_min hs (by positivity),?_⟩ + intro R hR hRs + obtain ⟨u,v,U,hcurv,hsplit,hU,hUsub,hbad,hfine⟩ := hsets R hR (hRs.trans_le (min_le_left _ _)) + have hr : 0 < R/8 := by positivity + have hcurvr : -β ≤ K*(R/8)^2 := by + by_cases hK : 0 ≤ K + · exact (neg_nonpos.mpr hβ.le).trans (mul_nonneg hK (sq_nonneg _)) + · have hsquare : (R/8)^2 ≤ R^2 := by nlinarith only [sq_nonneg R] + have hm := mul_le_mul_of_nonpos_left hsquare (le_of_lt (lt_of_not_ge hK)) + exact (neg_le_neg htβ).trans (hcurv.trans hm) + have hsplit' : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*(R/8)) β u v := by + simpa only [show 16*(R/8)=2*R by ring] using hsplit.mono_error _ _ ht.le htβ + have hc := hcoarse p (R/8) hr hcurvr u v hsplit' + (hflat (R/8) hr (by linarith only [hRs.trans_le (min_le_right _ _)])) + exact ⟨u,v,U,hsplit,hU,hUsub,hbad,hc,hfine⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCenterRadialData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCenterRadialData.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c2f3254f57660ff7096cee331facddf47b41d6d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCenterRadialData.lean @@ -0,0 +1,173 @@ +import OAI.Geometry.RCD.Coordinates.RegularProjectionEnvironment +import OAI.Geometry.RCD.Coordinates.RadialMatrixEstimates + +namespace OAI + +/-! # Actual radial data at every center of the common heat neighborhood -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Sources, normalizing frames and radial fits all use the same harmonic map. -/ +structure RegularCenterRadialData {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [(hausdorff n X).Regular] + {p : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (heat : RegularBilinearData hX p hk enlargement zeta) + (κ B J C A Cχ eta Cg D Ca : ℝ) (q : X) where + source : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ q heat.radius + replacement : DyadicDistanceReplacements (hausdorff n X) hX.quadratic source B J C + summable : Summable (normalizedPoissonDefect (hausdorff n X) hX.quadratic source) + budget : (∑' i, normalizedPoissonDefect (hausdorff n X) hX.quadratic source i) < eta + gradient : ∀ i z, dist z q ≤ distanceSourceRadius heat.radius i / 4 → + ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius heat.radius i / 4)), + localGamma (hausdorff n X) hX.quadratic (replacement.replacement i) + (replacement.replacement i) x ≤ (A * distanceSourceRadius heat.radius i) ^ 2 + cutoff : ∀ i, GoodLaplacianCutoff (hausdorff n X) hX.quadratic q + (distanceSourceRadius heat.radius i / 64) Cχ + frame : ℕ → Euclidean n ≃L[ℝ] Euclidean n + exactFrame : ∀ i, IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic heat.coordinates) + (ball q (2 * distanceSourceRadius heat.radius i)) measurableSet_ball (frame i) + splitting : ∀ i, FirstOrderSplittingOn (hausdorff n X) hX.quadratic q + (2 * distanceSourceRadius heat.radius i) zeta + (transformedColumn (hausdorff n X) hX.quadratic heat.coordinates (frame i)) + (fun x => (frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (heat.values x)) + metric : ∀ i, IsPointedApproximation q 0 (distanceSourceRadius heat.radius i / 64) 4 zeta + (fun x => (distanceSourceRadius heat.radius i / 64)⁻¹ • + ((frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (heat.values x) - + (frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (heat.values q))) + rows : RadialMatrixEstimates hX source replacement heat.coordinates heat.values frame cutoff + zeta Cg D Ca A + +/-- Uniform radial constants can be chosen before any neighborhood or error +size. This uses the proved radial estimates and the fixed heat degree. -/ +theorem regular_center_radial_constants {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + {B J A Cχ : ℝ} {degree : ℕ} (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) + (hCχ : 0 ≤ Cχ) (hdegree : 0 < degree) : + ∃ Cg D Ca : ℝ, 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ + ∀ {p : X} {a κ C enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker}, + 0 ≤ a → 0 ≤ κ → -κ ≤ K → 0 ≤ zeta → + radialNormalizationRestrictionConstant (m + 2) * zeta ≤ 1 → + ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * zeta) ≤ 1 / 64 → + BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a) → + ∀ e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta, + e.heat.degree = degree → ∀ q ∈ ball p (e.heat.radius / 32), + Nonempty (RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q) := by + classical + obtain ⟨Cg, D, Ca, hCg, hD, hCa, hrows⟩ := dyadic_radial_matrices_uniform m hX hhessian + hmean hgradient hB hJ hA hCχ (show (0 : ℝ) ≤ 1 by norm_num) hdegree + refine ⟨Cg, D, Ca, hCg, hD, hCa, ?_⟩ + intro p a κ C enlargement zeta eta ker hk ha hκ hK hzeta hsmall1 hsmall hBG e hdeg q hq + let R := e.heat.radius + let u := e.heat.coordinates + let V := e.heat.values + let μ := hausdorff (m + 2) X + have hR : 0 < R := e.heat.radius_pos + have hs (i : ℕ) : 0 < distanceSourceRadius R i := distanceSourceRadius_pos hR i + have hsR (i : ℕ) : distanceSourceRadius R i ≤ R := by + have hh := distanceSourceRadius_outer_le hR.le i + linarith [hs i] + have hsub : ball q R ⊆ ball p (32 * R) := by + intro x hx + have hxp := dist_triangle x q p + have hxq := mem_ball.mp hx + have hqp := mem_ball.mp hq + change dist x p < 32 * R + change dist q p < R / 32 at hqp + linarith + let gramSize (j k : Fin (m + 2)) := (μ.real (ball q R))⁻¹ * ∫ x in ball q R, + |localGamma μ hX.quadratic (u j) (u k) x - (if j = k then 1 else 0)| ∂μ + let gramBudget := ∑ j : Fin (m + 2), ∑ k : Fin (m + 2), |gramSize j k| + have hgramBudget : 0 ≤ gramBudget := Finset.sum_nonneg (fun _ _ => + Finset.sum_nonneg (fun _ _ => abs_nonneg _)) + have hgram (j k : Fin (m + 2)) : gramSize j k ≤ gramBudget := by + have hrow : |gramSize j k| ≤ ∑ l : Fin (m + 2), |gramSize j l| := + Finset.single_le_sum (f := fun l : Fin (m + 2) => |gramSize j l|) + (fun _ _ => abs_nonneg _) (Finset.mem_univ k) + have hsum : (∑ l : Fin (m + 2), |gramSize j l|) ≤ gramBudget := + Finset.single_le_sum (f := fun j : Fin (m + 2) => ∑ l : Fin (m + 2), |gramSize j l|) + (fun _ _ => Finset.sum_nonneg (fun _ _ => abs_nonneg _)) + (Finset.mem_univ j) + exact (le_abs_self _).trans (hrow.trans hsum) + have huq : FirstOrderSplittingOn μ hX.quadratic q R + (e.heat.initialError + gramBudget) u V := by + refine { + representative := fun j => ae_restrict_of_ae_restrict_of_subset hsub + (e.heat.splitting.representative j) + continuous := e.heat.splitting.continuous.mono hsub + harmonic := fun j => (e.heat.splitting.harmonic j).mono μ hX.quadratic hsub + gradient := ?_ + gram := ?_ } + · intro j + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub (e.heat.splitting.gradient j)] + with x hx + apply hx.trans + have he := e.heat.initialError_pos + nlinarith + · intro j k + exact (hgram j k).trans (le_add_of_nonneg_left e.heat.initialError_pos.le) + obtain ⟨S, T, hP, hbudget, hgrad, hcut⟩ := e.poisson q hq + let χ := fun i => Classical.choice (hcut i) + obtain ⟨_, _, hfit, F, hexact, hfirst, hmetric⟩ := e.heat.localData q hq + let w := fun i x => (F i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (V x) + have hrad (i : ℕ) : 2 * distanceSourceRadius R i = R / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have htest (i : ℕ) : distanceSourceRadius R i / 64 = (R / (2 : ℝ) ^ i) / 128 := by + have hh := hrad i + linarith + dsimp only [R] at hrad htest + have hbase (i : ℕ) (j : Fin (m + 2)) : ∀ᵐ x ∂μ.restrict (ball q (distanceSourceRadius R i / 64)), + localGamma μ hX.quadratic (u j) (u j) x ≤ (2 : ℝ) ^ 2 := by + have hsub' : ball q (distanceSourceRadius R i / 64) ⊆ ball p (32 * R) := + (ball_subset_ball (by linarith [hs i, hsR i])).trans hsub + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub' (e.heat.splitting.gradient j)] with x hx + exact hx.trans (by nlinarith [e.heat.initialError_pos, e.heat.initialError_le_one]) + have hcurv (i : ℕ) : -(1 : ℝ) ≤ K * (distanceSourceRadius R i / 64) ^ 2 := by + have hsquare : (distanceSourceRadius R i / 64) ^ 2 ≤ R ^ 2 := by nlinarith [hs i, hsR i] + have habs := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (distanceSourceRadius R i / 64)) + have he := e.curvature + have hkR := mul_nonneg hκ (sq_nonneg R) + change 4 * (|K| + κ) * R ^ 2 ≤ 1 at he + nlinarith + have hresult := hrows ha hκ hK e.heat.radius_le_one e.modelScale hBG S T hP + (fun t ht htR => e.volume q hq t ht (by linarith)) u hbase F w hzeta hsmall1 hsmall + (fun i => by simpa only [R, u, V, w, hrad] using hexact i) + (fun i => by simpa only [R, u, V, w, hrad] using hfirst i) + (fun i => by simpa only [R, u, V, w, htest] using hmetric i) + (fun i => hgrad i q (by have hsi := hs i; simp only [dist_self]; change 0 ≤ distanceSourceRadius R i / 4; linarith)) χ + (fun i => by + have hsi := hs i + rw [← hdeg] + exact hfit _ (by positivity) (by linarith [hs i, hsR i])) V huq hcurv + exact ⟨{ + source := S + replacement := T + summable := hP + budget := hbudget + gradient := hgrad + cutoff := χ + frame := F + exactFrame := fun i => by simpa only [R, u, V, w, hrad] using hexact i + splitting := fun i => by simpa only [R, u, V, w, hrad] using hfirst i + metric := fun i => by simpa only [R, u, V, w, htest] using hmetric i + rows := hresult }⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCompactCutoff.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCompactCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..d828bbb25646a36ff1ae31279ae947e3c8e247ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCompactCutoff.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.RCD.Sobolev.WeakLaplacianCutoff +import OAI.Geometry.RCD.Sobolev.GoodCutoffFromResolvent + +namespace OAI + +/-! # Compact cutoffs with an L² Laplacian on arbitrary open sets -/ + +open Set Filter MeasureTheory +open scoped NNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- Qualitative cutoff data, without a fixed ratio between the two radii. -/ +structure RegularCompactCutoff where + weight : X → ℝ + lip : ℝ≥0 + lipschitz : LipschitzWith lip weight + compact : HasCompactSupport weight + bounds : ∀ x, 0 ≤ weight x ∧ weight x ≤ 1 + sobolev : SobolevSpace μ hQ + representative : SobolevSpace.toLp μ hQ sobolev =ᵐ[μ] weight + laplacian : Lp ℝ 2 μ + weak_laplacian : IsWeakLaplacian μ hQ sobolev laplacian + +namespace RegularCompactCutoff + +variable {μ hQ} + +def zero : RegularCompactCutoff μ hQ where + weight := 0 + lip := 0 + lipschitz := LipschitzWith.const 0 + compact := HasCompactSupport.zero + bounds := by intro x; exact ⟨le_rfl,zero_le_one⟩ + sobolev := 0 + representative := by simpa using Lp.coeFn_zero ℝ 2 μ + laplacian := 0 + weak_laplacian := by intro φ; simp [energyForm] + +omit [BorelSpace X] [ProperSpace X] [IsFiniteMeasureOnCompacts μ] in +lemma abs_le (χ : RegularCompactCutoff μ hQ) (x : X) : |χ.weight x| ≤ (1 : ℝ≥0) := by + rw [abs_of_nonneg (χ.bounds x).1] + exact (χ.bounds x).2 + +/-- Combining two plateaux preserves their union and the L² Laplacian. -/ +def union (χ η : RegularCompactCutoff μ hQ) : RegularCompactCutoff μ hQ := by + let M := SobolevSpace.cutoffCLM μ hQ χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) + have hex := η.weak_laplacian.cutoff μ hQ η.sobolev χ.sobolev + η.laplacian χ.laplacian χ.weak_laplacian χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) χ.representative + (η.representative.mono fun x hx => hx ▸ η.abs_le x) + let q := hex.choose + have hq := hex.choose_spec.1 + refine { + weight := fun x => χ.weight x + η.weight x - χ.weight x * η.weight x + lip := (χ.lip+η.lip)+(χ.lip+η.lip) + lipschitz := ?_ + compact := (χ.compact.add η.compact).sub χ.compact.mul_right + bounds := ?_ + sobolev := χ.sobolev+η.sobolev-M η.sobolev + representative := ?_ + laplacian := χ.laplacian+η.laplacian-q + weak_laplacian := ?_ } + · exact (χ.lipschitz.add η.lipschitz).sub + (by simpa only [one_mul,add_comm] using + (lipschitzWith_mul_of_support_bound χ.lipschitz η.lipschitz χ.abs_le + (fun x _ => η.abs_le x))) + · intro x + have hc := χ.bounds x + have he := η.bounds x + constructor <;> nlinarith [mul_nonneg hc.1 he.1, mul_nonneg (sub_nonneg.mpr hc.2) (sub_nonneg.mpr he.2)] + · simp only [map_sub,map_add] + filter_upwards [Lp.coeFn_sub (SobolevSpace.toLp μ hQ χ.sobolev+SobolevSpace.toLp μ hQ η.sobolev) + (SobolevSpace.toLp μ hQ (M η.sobolev)), + Lp.coeFn_add (SobolevSpace.toLp μ hQ χ.sobolev) (SobolevSpace.toLp μ hQ η.sobolev), + χ.representative,η.representative, + SobolevSpace.cutoffCLM_coe μ hQ χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) η.sobolev] with x hs ha hc he hm + simp only [Pi.add_apply,Pi.sub_apply] at hs ha + change _ = χ.weight x*SobolevSpace.toLp μ hQ η.sobolev x at hm + rw [hs,ha,hc,he,hm,he] + · intro φ + rw [energyForm_sub_left,energyForm_add_left,χ.weak_laplacian, + η.weak_laplacian,hq,inner_sub_left,inner_add_left] + ring + +lemma union_weight (χ η : RegularCompactCutoff μ hQ) : + (χ.union η).weight = fun x => χ.weight x+η.weight x-χ.weight x*η.weight x := rfl + +lemma union_support (χ η : RegularCompactCutoff μ hQ) : + tsupport (χ.union η).weight ⊆ tsupport χ.weight ∪ tsupport η.weight := by + rw [union_weight] + exact (tsupport_sub _ _).trans (union_subset_union_left _ (tsupport_add _ _)) |>.trans + (union_subset (subset_refl _) ((tsupport_mul_subset_left).trans subset_union_left)) + +lemma union_one_left (χ η : RegularCompactCutoff μ hQ) {x : X} (h : χ.weight x=1) : + (χ.union η).weight x=1 := by + change χ.weight x+η.weight x-χ.weight x*η.weight x=1 + rw [h] + ring + +lemma union_one_right (χ η : RegularCompactCutoff μ hQ) {x : X} (h : η.weight x=1) : + (χ.union η).weight x=1 := by + change χ.weight x+η.weight x-χ.weight x*η.weight x=1 + rw [h] + ring + +end RegularCompactCutoff +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularControlledNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularControlledNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..89a2b22a6fe7fa8b626b6814f6b65d32e55ff23b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularControlledNormalization.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Coordinates.UniformControlledNormalization +import OAI.Geometry.RCD.Coordinates.InitialHarmonicCoordinates +import OAI.Geometry.RCD.Coordinates.RegularPointedFlatness + +namespace OAI + +/-! +# Harmonic normalization around a regular point + +Initial harmonic approximation, all-center metric flatness, a +finite-dimensional obstruction, and the transformation theorem produce +normalized harmonic coordinates. +-/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem regular_controlled_normalization {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (_hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 1) X) (m + 1) p + (euclideanUnitVolume (m + 1))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 1) X) (m + 1) p) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (_hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 1) X) + (comparisonModelVolume m a) y (euclideanUnitVolume (m + 1))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) : + ∃ R ε : ℝ, 0 < R ∧ 0 < ε ∧ R < 1 ∧ a * (3 * R) ≤ 1 ∧ |K| * R ^ 2 ≤ β ∧ + ∃ (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (v : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 * R) ε u v ∧ + ∀ q ∈ ball p (R / 4), ∀ r : ℝ, 0 < r → 64 * r ≤ R → + ∃ A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball q (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (16 * r) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u A) + (fun x => (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x)) ∧ + IsPointedApproximation q 0 r (1 / 2) ρ + (fun x => r⁻¹ • ((A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q))) := by + obtain ⟨ε, hε, hnormalize⟩ := uniform_controlled_coordinates_of_comparison m hX hn + htrans hsplit ha hBG hρ hβ + obtain ⟨D, hD, hflat⟩ := hrigidity p hregular ε hε + obtain ⟨T, hT, hinitialize⟩ := regular_initial_splitting_at_all_small_scales hX hn + hcompact hregular hmeasured hinitial hε + have hcap : 0 < min (β / (|K| + 1)) + (min D (min T (min 1 (min (ε / (|K| + 1)) (1 / (3 * (a + 1))))))) := + lt_min (by positivity) + (lt_min hD (lt_min hT (lt_min zero_lt_one (lt_min (by positivity) (by positivity))))) + obtain ⟨R, hR, hRcap⟩ := exists_between hcap + rcases lt_min_iff.mp hRcap with ⟨hRβ, hRcap⟩ + rcases lt_min_iff.mp hRcap with ⟨hRD, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hRT, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hR1, hrest⟩ + rcases lt_min_iff.mp hrest with ⟨hRK, hRa⟩ + obtain ⟨u, v, hu⟩ := hinitialize R hR hRT + have hcurv : -ε ≤ K * R ^ 2 := by + have he : R * (|K| + 1) ≤ ε := (le_div_iff₀ (by positivity)).mp hRK.le + have hs : R ^ 2 ≤ R := by nlinarith + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + have hK := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg R) + nlinarith + have hscale : a * (3 * R) ≤ 1 := by + have he := (lt_div_iff₀ (by positivity : 0 < 3 * (a + 1))).mp hRa + nlinarith + have hcurvβ : |K| * R ^ 2 ≤ β := by + have hb := (lt_div_iff₀ (by positivity : 0 < |K| + 1)).mp hRβ + have hs : R ^ 2 ≤ R := by nlinarith + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + nlinarith + refine ⟨R, ε, hR, hε, hR1, hscale, hcurvβ, u, v, hu, ?_⟩ + apply hnormalize p R hR hcurv hscale u v hu + intro q hq s hs hsR + apply hflat q ?_ s hs (by linarith) + have hh := mem_ball.mp hq + rw [dist_comm] at hh + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreBochner.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreBochner.lean new file mode 100644 index 0000000000000000000000000000000000000000..615400c982c3fcb19127f1248efd6dd95bab6a6b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreBochner.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.RegularFiniteSpan + +namespace OAI + +/-! # Full Bochner measures constructed for the regular test algebra -/ + +open Set Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A finite collection of actual regular tests determines a single +positive bilinear Bochner measure, with the exact weak test identity. -/ +theorem NoncollapsedRCD.regular_core_bochner_sobolev_measure {K : ℝ} {n m : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {Ω : Set X} (u : Fin m → compactLaplacianCore (hausdorff n X) hX.quadratic Ω) + {r : ℝ} (hr : 0 (u i).val) + ∃ (D : Euclidean m →L[ℝ] Lp ℝ 2 (hausdorff n X)) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂hausdorff n X, SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (U a) x≤L a) + (M : PositiveBilinearMeasure X (Euclidean m)), + (∀ a, IsWeakLaplacian (hausdorff n X) hX.quadratic (U a) (D a)) ∧ + (∀ a b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H a b) =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic (U a) (U b)) ∧ + (∀ a b, H a b=H b a) ∧ + (∀ (a : Euclidean m) (ψ : SobolevSpace (hausdorff n X) hX.quadratic) + (q : X →ᵇ ℝ), HasCompactSupport (q : X → ℝ) → + tsupport q ⊆ ball p r → SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ =ᵐ[hausdorff n X] q → + (∫ x, q x ∂M.measure a) = + regularBochnerForm (hausdorff n X) hX.quadratic K U D H q ψ L hU a a) := by + dsimp only + obtain ⟨D,H,L,hU,hc,hD,hH,hsym⟩ := hX.regular_finite_span hn p u + obtain ⟨M,hM⟩ := hX.regular_span_bochner_sobolev_measure hn p hr _ D H L hU hc hD + (fun a => hH a a) hsym + exact ⟨D,H,L,hU,M,hD,hH,hsym,fun a ψ q => hM a ψ q q.continuous⟩ + + +/-- The Lipschitz test specialization, preserving the original interface. -/ +theorem NoncollapsedRCD.regular_core_bochner_measure {K : ℝ} {n m : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {Ω : Set X} (u : Fin m → compactLaplacianCore (hausdorff n X) hX.quadratic Ω) + {r : ℝ} (hr : 0 (u i).val) + ∃ (D : Euclidean m →L[ℝ] Lp ℝ 2 (hausdorff n X)) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂hausdorff n X, SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (U a) x≤L a) + (M : PositiveBilinearMeasure X (Euclidean m)), + (∀ a, IsWeakLaplacian (hausdorff n X) hX.quadratic (U a) (D a)) ∧ + (∀ a b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H a b) =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic (U a) (U b)) ∧ + (∀ a b, H a b=H b a) ∧ + (∀ (a : Euclidean m) (ψ : SobolevSpace (hausdorff n X) hX.quadratic) + (q : X →ᵇ ℝ) (C : ℝ≥0), LipschitzWith C q → HasCompactSupport (q : X → ℝ) → + tsupport q ⊆ ball p r → SobolevSpace.toLp (hausdorff n X) hX.quadratic ψ =ᵐ[hausdorff n X] q → + (∫ x, q x ∂M.measure a) = + regularBochnerForm (hausdorff n X) hX.quadratic K U D H q ψ L hU a a) := by + obtain ⟨D,H,L,hU,M,hD,hH,hsym,hM⟩ := hX.regular_core_bochner_sobolev_measure hn p u hr + exact ⟨D,H,L,hU,M,hD,hH,hsym,fun a ψ q _ _ => hM a ψ q⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..47103753c73fd65055a7408a7b62e7d10b5ac34b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreFrameDefect.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerFrameDefect +import OAI.Geometry.RCD.Sobolev.ScalarBochnerConstruction + +namespace OAI + +/-! # Quantitative frame energy on the actual regular core of an RCD space + +The finite-dimensional inequality and common Bochner measure are +constructed from RCD. The only source data supplied below are the actual +weak Laplacians and their bounded local Sobolev representatives. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_core_frame_defect {K : ℝ} {n m : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) (p : X) + (u : Fin m → compactLaplacianCore (hausdorff n X) hX.quadratic univ) + {R : ℝ} (hR : 0 (u j).val) (w i)) + =ᵐ[hausdorff n X] F i) + (hz : ∀ i, sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (z i)= + SobolevSpace.product (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (w i)) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (w i)) ‖F i‖₊ ‖F i‖₊) + (q : Fin (n+1) → Lp ℝ 2 (hausdorff n X)) + (hq : ∀ i, IsWeakLaplacian (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (w i)) (q i)) + (d : Fin (n+1) → SobolevSpace (hausdorff n X) hX.quadratic) (A : Fin (n+1) → ℝ≥0) + (hd : ∀ i, ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic (d i) x|≤A i) + (hqr : ∀ i, q i =ᵐ[(hausdorff n X).restrict (ball p R)] + SobolevSpace.toLp (hausdorff n X) hX.quadratic (d i)) + (δ : X → ℝ) + (hδ : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R/2)), 0≤δ x) + (htrace : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R/2)), + |∑ i : Fin n, localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (w i.castSucc)) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) (w i.castSucc)) x-(n:ℝ)|≤δ x) + (hsquare : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R/2)), + |∑ i : Fin n, ∑ j : Fin n, (localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun k => (u k).val) (w i.castSucc)) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun k => (u k).val) (w j.castSucc)) x)^2-(n:ℝ)|≤δ x) : + let U := sobolevColumnMap (hausdorff n X) hX.quadratic (fun j => (u j).val) + ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R/2)), δ x≤1 → + |localGamma (hausdorff n X) hX.quadratic (U (w (Fin.last n))) (U (w (Fin.last n))) x- + ∑ i : Fin n, (localGamma (hausdorff n X) hX.quadratic (U (w i.castSucc)) (U (w (Fin.last n))) x)^2|≤ + Real.sqrt (6*δ x)*|localGamma (hausdorff n X) hX.quadratic (U (w (Fin.last n))) (U (w (Fin.last n))) x| := by + let μ := hausdorff n X + let hQ := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let U := sobolevColumnMap μ hQ (fun j => (u j).val) + obtain ⟨D,H,L,hU,hc,hD,hH,hsym⟩ := hX.regular_finite_span hn p u + obtain ⟨M,hM⟩ := hX.regular_span_bochner_sobolev_measure hn p hR U D H L hU hc hD + (fun a => hH a a) hsym + obtain ⟨χ,Cχ,hχ,hχc,hχs,hχb,hχ1⟩ := + exists_annular_lipschitz_cutoff p (a := R/2) (b := 3*R/4) (by linarith) + have hχΩ : tsupport χ⊆ball p R := hχs.trans (closedBall_subset_ball (by linarith)) + have hχS (x : X) (hx : x∈ball p (R/2)) : χ x=1 := hχ1 x (ball_subset_closedBall hx) + have hMs : ∀ (a : Euclidean m) (ψ : SobolevSpace μ hQ) (v : X →ᵇ ℝ), + HasCompactSupport (v : X → ℝ) → tsupport v⊆ball p R → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] v → + (∫ x, v x ∂M.measure a)=regularBochnerForm μ hQ K U D H v ψ L hU a a := by + intro a ψ v hvc hvs hψ + exact hM a ψ v v.continuous hvc hvs hψ + have hBE := (hX.scalarBochner_nonpositive K n hn hK p).regular_density μ hQ + U D H L hU hc hD (fun a => hH a a) M hMs measurableSet_ball + χ hχ hχc hχΩ (fun x => (hχb x).1) hχS + have hDr (i : Fin (n+1)) : D (w i) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ (d i) := by + have he : D (w i)=q i := IsWeakLaplacian.unique μ hQ (hD (w i)) (hq i) + rw [he] + exact hqr i + exact regularBochner_frame_defect μ hQ (by omega) K U D H L hU hD hH hsym + measurableSet_ball M hMs w z F hF hz d A hd hDr measurableSet_ball + (ball_subset_ball (by linarith)) χ hχ hχc hχΩ (fun x => (hχb x).1) hχS hBE δ hδ htrace hsquare + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreGradientProduct.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreGradientProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..cec9cd40348c9e1050060b6cd295102deb6cc57c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreGradientProduct.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Coordinates.RegularTripleHessian +import OAI.Geometry.RCD.Sobolev.GradientProductAction + +namespace OAI + +/-! # Gradient-product tests against every compact regular direction + +Two mixed Hessian actions and the exact Gram derivative identity give the +factor-two gradient bound. No regularity of the Gram representative beyond +membership in the Sobolev space is imposed. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_core_gradient_product_test {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (f a g : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (p : X) {R : ℝ} (hR : 0 c) + {J : ℝ} (hJK : J≤K) + (F₀ A₀ G : SobolevSpace (hausdorff n X) hX.quadratic) + (σ τ : Measure X) [IsFiniteMeasure σ] [IsFiniteMeasure τ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val f.val) + (hA₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic A₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic a.val a.val) + (hG : SobolevSpace.toLp (hausdorff n X) hX.quadratic G + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val a.val) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J f.val f.val df df σ.toSignedMeasure)) + (hτ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) A₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J a.val a.val da da τ.toSignedMeasure)) + (b : ℝ) : + ∀ᵐ x ∂(hausdorff n X).restrict (ball p R), + (localGamma (hausdorff n X) hX.quadratic (G-b • a.val) g.val x)^2≤ + (2*localGamma (hausdorff n X) hX.quadratic a.val a.val x* + ((σ.rnDeriv (hausdorff n X) x).toReal-(2*b*c-(n:ℝ)*b^2))+ + 2*localGamma (hausdorff n X) hX.quadratic f.val f.val x* + (τ.rnDeriv (hausdorff n X) x).toReal)* + localGamma (hausdorff n X) hX.quadratic g.val g.val x := by + let μ := hausdorff n X + let hQ := hX.quadratic + obtain ⟨Fga,Fg,Ag,hga,hfg,hag,_,hfirst⟩ := hX.regular_core_triple_hessian_on_measure + hn hscalar f a g p hR df qf hqf A hdf hsf hJK F₀ σ hF₀ hσ + obtain ⟨Afa,Ag',Fg',haf,hag',hfg',_,hsecond⟩ := hX.regular_core_triple_hessian_on_measure + hn hscalar a f g p hR da qa hqa B hda hsa hJK A₀ τ hA₀ hτ + have hgaG : SobolevSpace.toLp μ hQ Fga =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ G := by + filter_upwards [ae_restrict_of_ae hga,hG] with x hx hy + exact hx.trans hy.symm + have hafG : SobolevSpace.toLp μ hQ Afa =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ G := by + filter_upwards [ae_restrict_of_ae haf,hG,ae_restrict_of_ae (localGamma_comm μ hQ a.val f.val)] + with x hx hy he + exact hx.trans (he.trans hy.symm) + have hAg : SobolevSpace.toLp μ hQ Ag' =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ Ag := + ae_restrict_of_ae (hag'.trans hag.symm) + have hFg : SobolevSpace.toLp μ hQ Fg' =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ Fg := + ae_restrict_of_ae (hfg'.trans hfg.symm) + have he1 := localHessianAction_congr μ hQ (f := f.val) (f' := f.val) + (u := a.val) (u' := a.val) (v := g.val) (v' := g.val) + (fv := Fg) (fv' := Fg) (uv := Ag) (uv' := Ag) + EventuallyEq.rfl EventuallyEq.rfl EventuallyEq.rfl hgaG EventuallyEq.rfl EventuallyEq.rfl + have he2 := localHessianAction_congr μ hQ (f := a.val) (f' := a.val) + (u := f.val) (u' := f.val) (v := g.val) (v' := g.val) + EventuallyEq.rfl EventuallyEq.rfl EventuallyEq.rfl hafG hAg hFg + filter_upwards [hfirst b,hsecond 0,he1,he2,hc, + ae_restrict_of_ae (localGamma_mixed_as_hessian_actions μ hQ f.val a.val g.val G Fg Ag b)] + with x h1 h2 he1 he2 hc hid + rw [he1,hc] at h1 + rw [he2] at h2 + simp only [zero_mul,sub_zero,mul_zero,zero_pow (by decide : (2:ℕ)≠0),add_zero] at h2 + rw [hid] + nlinarith only [h1,h2,sq_nonneg + ((localHessianAction μ hQ f.val a.val g.val G Fg Ag x-b*localGamma μ hQ a.val g.val x)- + localHessianAction μ hQ a.val f.val g.val G Ag Fg x)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreHessianBound.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreHessianBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a648e380dd264bee064ca8d99bb68f2b2a84b9b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreHessianBound.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerDirectional +import OAI.Geometry.RCD.Coordinates.RegularCoreBochner +import OAI.Geometry.RCD.Coordinates.RegularTestAlgebra + +namespace OAI + +/-! # Directional Hessian bounds for actual compact regular functions -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A regular function and one regular direction have a full positive +Bochner measure controlling their diagonal Hessian action. The measure +and all Gram representatives are constructed from the RCD structure. -/ +theorem NoncollapsedRCD.regular_core_directional_hessian {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {V : Set X} (f g : compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (u i).val) + let e (i : Fin 3) : Euclidean 3 := EuclideanSpace.single i 1 + have hcol (i : Fin 3) : U (e i)=(u i).val := sobolevColumnMap_single μ hQ _ i + have hf : U (e 0)=f.val := by simpa [u] using hcol 0 + have hg : U (e 1)=g.val := by simpa [u] using hcol 1 + have hz : U (e 2)=SobolevSpace.product μ hQ (U (e 1)) (U (e 1)) ‖W‖₊ ‖W‖₊ := by + simpa [hg,u,g₂] using hcol 2 + obtain ⟨D,H,L,hU,M,hD,hH,hsym,hM⟩ := hX.regular_core_bochner_sobolev_measure hn p u hR + change (∀ a, IsWeakLaplacian μ hQ (U a) (D a)) at hD + change (∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) at hH + have hq0 : D (e 0)=qf := IsWeakLaplacian.unique μ hQ (by simpa only [hf] using hD (e 0)) hqf + have hq1 : D (e 1)=qg := IsWeakLaplacian.unique μ hQ (by simpa only [hg] using hD (e 1)) hqg + have hs0 : D (e 0) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ df := by rw [hq0]; exact hsf + have hs1 : D (e 1) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ dg := by rw [hq1]; exact hsg + have hw' : SobolevSpace.toLp μ hQ (U (e 1)) =ᵐ[μ] W := by rw [hg]; exact hw + have hgb' : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U (e 1)) x|≤‖W‖₊ := by rw [hg]; exact hgb + have hL : ∀ᵐ x ∂μ, localGamma μ hQ (U (e 1)) (U (e 1)) x≤(L (e 1):ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U (e 1)),hU (e 1), + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U (e 1)))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + let dz := SobolevSpace.product μ hQ (U (e 1)) dg ‖W‖₊ B+ + SobolevSpace.product μ hQ (U (e 1)) dg ‖W‖₊ B+(2:ℝ) • H (e 1) (e 1) + obtain ⟨q,hq,hqr⟩ := (hD (e 1)).square_local μ hQ (U (e 1)) (H (e 1) (e 1)) dg + (D (e 1)) ‖W‖₊ B (L (e 1)) hgb' hdg hL (ae_restrict_of_ae (hH (e 1) (e 1))) hs1 + have hq2 : D (e 2)=q := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD (e 2)) hq + have hs2 : D (e 2) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ dz := by rw [hq2]; exact hqr + let C : ℝ≥0 := 2*‖W‖₊*B+2*(L (e 1)*L (e 1)) + have hc : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dz x|≤C := by + simpa only [C,NNReal.coe_add,NNReal.coe_mul,NNReal.coe_ofNat] using + squareLaplacianSource_bound μ hQ (U (e 1)) (H (e 1) (e 1)) dg ‖W‖₊ B + (L (e 1)*L (e 1)) hgb' hdg (regularGram_abs_le μ hQ U H L hU hH (e 1) (e 1)) + obtain ⟨χ,hχΩ,hχ1⟩ := hX.exists_open_regular_cutoff hn isOpen_ball hS hsub + let χb : X →ᵇ ℝ := ofCompactSupport χ.weight χ.lipschitz.continuous χ.compact + have hbound := regularBochner_directional_bound μ hQ K U D H L hU hD hH hsym + measurableSet_ball M hM (e 0) (e 1) (e 2) W hw' hz df dg dz A B C + hdf hdg hc hs0 hs1 hs2 hS.measurableSet hsub χb χ.lipschitz χ.compact hχΩ + (fun x => (χ.bounds x).1) hχ1 + have hlap := regularBochner_measure_laplacian μ hQ K U D H L hU hsym measurableSet_ball M hM + (e 0) (e 0) df df (hH (e 0) (e 0)) (hD (e 0)) (hD (e 0)) hs0 hs0 A A hdf hdf + refine ⟨H (e 0) (e 0),H (e 0) (e 1),H (e 1) (e 1),M.measure (e 0),inferInstance,?_,?_,?_,?_,?_⟩ + · simpa only [hf] using hH (e 0) (e 0) + · simpa only [hf,hg] using hH (e 0) (e 1) + · simpa only [hg] using hH (e 1) (e 1) + · rw [M.measure_toSignedMeasure] + change IsMeasureLaplacianOn μ hQ (ball p R) (H (e 0) (e 0)) + (bochnerGramSource μ hQ K (U (e 0)) (U (e 0)) df df (M.bilinear (e 0) (e 0))) at hlap + rw [hf] at hlap + exact hlap + · have hRN := signed_rnDeriv_toSignedMeasure μ (M.measure (e 0)) + rw [M.measure_toSignedMeasure] at hRN + filter_upwards [hbound,ae_restrict_of_ae hRN, + ae_restrict_of_ae (bochnerRadonDensity_rep μ M (e 0) (e 0))] with x hb hrn hrep + rw [← hrep,hrn] at hb + simpa only [hf,hg] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreMixedFullBall.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreMixedFullBall.lean new file mode 100644 index 0000000000000000000000000000000000000000..83bf7367214e91a7ec3c0910043c85263b0a010c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreMixedFullBall.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreMixedHessian +import OAI.Geometry.RCD.Metric.RationalInteriorBalls +import OAI.Geometry.RCD.Coordinates.HessianCoordinateForm +import OAI.Geometry.RCD.Sobolev.SymmetricGammaForm +import OAI.Geometry.RCD.Coordinates.FiniteBilinearAE + +namespace OAI + +/-! # A common mixed Hessian estimate on the full working ball + +The direction functions require only their actual L² weak Laplacians. +Diagonal estimates are transferred to one fixed Sobolev Gram family and +polarized outside a common null set. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Scalar dimensional Bochner gives the mixed Hessian estimate on any +finite regular family, for the prescribed full Bochner measure. -/ +theorem NoncollapsedRCD.regular_core_mixed_hessian_full_ball {K : ℝ} {n m : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + {V : Set X} (u : Fin m → compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (u i).val) a) qf) + (C : ℝ≥0) (hdf : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic df x|≤C) + (hsf : qf =ᵐ[(hausdorff n X).restrict (ball p R)] SobolevSpace.toLp (hausdorff n X) hX.quadratic df) + {J : ℝ} (hJK : J≤K) + (F₀ : SobolevSpace (hausdorff n X) hX.quadratic) (σ : Measure X) [IsFiniteMeasure σ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] + localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a)) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) df df σ.toSignedMeasure)) : + let U := sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) + ∃ H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic, + (∀ v w, H v w=H w v) ∧ + (∀ v w, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H v w) + =ᵐ[hausdorff n X] localGamma (hausdorff n X) hX.quadratic (U v) (U w)) ∧ + (∀ᵐ x ∂(hausdorff n X).restrict (ball p R), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic df x)^2≤ + (n:ℝ)*(σ.rnDeriv (hausdorff n X) x).toReal) ∧ + ∀ (b : ℝ) v w, ∀ᵐ x ∂(hausdorff n X).restrict (ball p R), + (localHessianAction (hausdorff n X) hX.quadratic (U a) (U v) (U w) + (H a v) (H a w) (H v w) x-b*localGamma (hausdorff n X) hX.quadratic (U v) (U w) x)^2 ≤ + ((σ.rnDeriv (hausdorff n X) x).toReal- + 2*b*SobolevSpace.toLp (hausdorff n X) hX.quadratic df x+(n:ℝ)*b^2)* + localGamma (hausdorff n X) hX.quadratic (U v) (U v) x* + localGamma (hausdorff n X) hX.quadratic (U w) (U w) x := by + let μ := hausdorff n X + let hQ := hX.quadratic + let U := sobolevColumnMap μ hQ (fun i => (u i).val) + obtain ⟨H,hsym,hH,-,-⟩ := hX.regular_core_mixed_hessian_on_measure hn hscalar u p hR + (S := ∅) isCompact_empty (empty_subset _) a df qf hqf C hdf hsf hJK F₀ σ hF₀ hσ + have hclosed (t : ℝ) (ht : t (u i).val) a) qf) + (C : ℝ≥0) (hdf : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic df x|≤C) + (hsf : qf =ᵐ[(hausdorff n X).restrict (ball p R)] SobolevSpace.toLp (hausdorff n X) hX.quadratic df) + {J : ℝ} (hJK : J≤K) + (F₀ : SobolevSpace (hausdorff n X) hX.quadratic) (σ : Measure X) [IsFiniteMeasure σ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] + localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a)) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) + (sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) a) df df σ.toSignedMeasure)) : + let U := sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) + ∃ H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic, + (∀ v w, H v w=H w v) ∧ + (∀ v w, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H v w) + =ᵐ[hausdorff n X] localGamma (hausdorff n X) hX.quadratic (U v) (U w)) ∧ + (∀ᵐ x ∂(hausdorff n X).restrict S, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic df x)^2≤ + (n:ℝ)*(σ.rnDeriv (hausdorff n X) x).toReal) ∧ + ∀ (b : ℝ) v w, ∀ᵐ x ∂(hausdorff n X).restrict S, + (localHessianAction (hausdorff n X) hX.quadratic (U a) (U v) (U w) + (H a v) (H a w) (H v w) x-b*localGamma (hausdorff n X) hX.quadratic (U v) (U w) x)^2 ≤ + ((σ.rnDeriv (hausdorff n X) x).toReal- + 2*b*SobolevSpace.toLp (hausdorff n X) hX.quadratic df x+(n:ℝ)*b^2)* + localGamma (hausdorff n X) hX.quadratic (U v) (U v) x* + localGamma (hausdorff n X) hX.quadratic (U w) (U w) x := by + classical + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + let hQ := hX.quadratic + let U := sobolevColumnMap μ hQ (fun i => (u i).val) + have hmem (v : Euclidean m) : U v ∈ compactLaplacianCore μ hQ V := by + rw [sobolevColumnMap_apply] + exact Submodule.sum_mem _ (fun i _ => Submodule.smul_mem _ _ (u i).property) + let core (v : Euclidean m) : compactLaplacianCore μ hQ V := ⟨U v,hmem v⟩ + obtain ⟨_D,H,_L,_hU,_hc,_hD,hH,hsym⟩ := hX.regular_finite_span hn p u + have hget (v : Euclidean m) := hX.regular_core_weak_hessian_on_measure hn hscalar + (core a) (core v) p hR hS hsub df qf hqf C hdf hsf hJK F₀ σ hF₀ hσ + choose FG GG hFG hGG hdim hbound using hget + have hFG' (v : Euclidean m) : FG v=H a v := by + apply Subtype.ext + apply Lp.ext + exact (hFG v).trans (hH a v).symm + have hGG' (v : Euclidean m) : GG v=H v v := by + apply Subtype.ext + apply Lp.ext + exact (hGG v).trans (hH v v).symm + refine ⟨H,hsym,hH,hdim 0,?_⟩ + intro b + let A := (H a).toContinuousLinearMap + let P := symmetricGammaForm μ hQ U + let B := fun x => hessianCoordinateForm μ hQ (U a) U A H x-b • P x + let c := fun x => (σ.rnDeriv μ x).toReal-2*b*SobolevSpace.toLp μ hQ df x+(n:ℝ)*b^2 + have hn0 : 0<(n:ℝ) := by exact_mod_cast (by omega : 0 ae_restrict_of_ae (symmetricGammaForm_nonneg μ hQ U v)) hc hb + intro v w + filter_upwards [hall,ae_restrict_of_ae (hessianCoordinateForm_rep μ hQ (U a) U A H v w), + ae_restrict_of_ae (symmetricGammaForm_rep μ hQ U v w), + ae_restrict_of_ae (symmetricGammaForm_rep μ hQ U v v), + ae_restrict_of_ae (symmetricGammaForm_rep μ hQ U w w)] with x hx hH hP hv hw + have he := hx v w + change (hessianCoordinateForm μ hQ (U a) U A H x v w-b*P x v w)^2≤c x*P x v v*P x w w at he + rw [← hH,← hP,← hv,← hw] at he + exact he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreRepresentative.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..61926dc4f4b23d7b7d2a3699fc5cf7e750532c8d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreRepresentative.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Coordinates.RegularDirichletCore + +namespace OAI + +/-! # Bounded compact Lipschitz representatives of the actual regular core -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +theorem regular_core_representative (u : compactLaplacianCore μ Q univ) : + ∃ (V : X → ℝ) (L A : ℝ≥0), LipschitzWith L V ∧ HasCompactSupport V ∧ + (SobolevSpace.toLp μ Q u.val =ᵐ[μ] V) ∧ + ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q u.val x| ≤ A := by + obtain ⟨V,L,hV,hVc,_hs,hu⟩ := u.property.1 + obtain ⟨B,hB⟩ := hVc.exists_bound_of_continuous hV.continuous + let A : ℝ≥0 := ⟨max B 0,le_max_right _ _⟩ + refine ⟨V,L,A,hV,hVc,hu,?_⟩ + filter_upwards [hu] with x hx + rw [hx] + exact (show |V x| ≤ B by simpa only [Real.norm_eq_abs] using hB x).trans (le_max_left _ _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedHessian.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ddba26531bbfd3534ff42c1b9aa0c5115c01284 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedHessian.lean @@ -0,0 +1,150 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerShiftedDirectional +import OAI.Geometry.RCD.Sobolev.ScalarDimensionalBochner +import OAI.Geometry.RCD.Coordinates.RegularCoreBochner +import OAI.Geometry.RCD.Coordinates.RegularTestAlgebra + +namespace OAI + +/-! # Shifted regular-core Hessian bounds from the scalar dimensional inequality -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The already constructed regular algebra and full Bochner measure +turn scalar finite-dimensional BE into every shifted diagonal action. +The scalar finite-dimensional Bochner inequality supplies the second-order bound. -/ +theorem NoncollapsedRCD.regular_core_shifted_hessian_of_scalar {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + {V : Set X} (f g : compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (u i).val) + let e (i : Fin 3) : Euclidean 3 := EuclideanSpace.single i 1 + have hcol (i : Fin 3) : U (e i)=(u i).val := sobolevColumnMap_single μ hQ _ i + have hf : U (e 0)=f.val := by simpa [u] using hcol 0 + have hg : U (e 1)=g.val := by simpa [u] using hcol 1 + have hz : U (e 2)=SobolevSpace.product μ hQ (U (e 1)) (U (e 1)) ‖W‖₊ ‖W‖₊ := by + simpa [hg,u,g₂] using hcol 2 + obtain ⟨D,H,L,hU,M,hD,hH,hsym,hM⟩ := hX.regular_core_bochner_sobolev_measure hn p u hR + change (∀ a, IsWeakLaplacian μ hQ (U a) (D a)) at hD + change (∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) at hH + have hq0 : D (e 0)=qf := IsWeakLaplacian.unique μ hQ (by simpa only [hf] using hD (e 0)) hqf + have hq1 : D (e 1)=qg := IsWeakLaplacian.unique μ hQ (by simpa only [hg] using hD (e 1)) hqg + have hs0 : D (e 0) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ df := by rw [hq0]; exact hsf + have hs1 : D (e 1) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ dg := by rw [hq1]; exact hsg + have hw' : SobolevSpace.toLp μ hQ (U (e 1)) =ᵐ[μ] W := by rw [hg]; exact hw + have hgb' : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U (e 1)) x|≤‖W‖₊ := by rw [hg]; exact hgb + have hL : ∀ᵐ x ∂μ, localGamma μ hQ (U (e 1)) (U (e 1)) x≤(L (e 1):ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U (e 1)),hU (e 1), + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U (e 1)))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + let dz := SobolevSpace.product μ hQ (U (e 1)) dg ‖W‖₊ B+ + SobolevSpace.product μ hQ (U (e 1)) dg ‖W‖₊ B+(2:ℝ) • H (e 1) (e 1) + obtain ⟨q,hq,hqr⟩ := (hD (e 1)).square_local μ hQ (U (e 1)) (H (e 1) (e 1)) dg + (D (e 1)) ‖W‖₊ B (L (e 1)) hgb' hdg hL (ae_restrict_of_ae (hH (e 1) (e 1))) hs1 + have hq2 : D (e 2)=q := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD (e 2)) hq + have hs2 : D (e 2) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ dz := by rw [hq2]; exact hqr + let C : ℝ≥0 := 2*‖W‖₊*B+2*(L (e 1)*L (e 1)) + have hc : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dz x|≤C := by + simpa only [C,NNReal.coe_add,NNReal.coe_mul,NNReal.coe_ofNat] using + squareLaplacianSource_bound μ hQ (U (e 1)) (H (e 1) (e 1)) dg ‖W‖₊ B + (L (e 1)*L (e 1)) hgb' hdg (regularGram_abs_le μ hQ U H L hU hH (e 1) (e 1)) + obtain ⟨χ,hχΩ,hχ1⟩ := hX.exists_open_regular_cutoff hn isOpen_ball hS hsub + let χb : X →ᵇ ℝ := ofCompactSupport χ.weight χ.lipschitz.continuous χ.compact + have hcompact (a : Euclidean 3) : ∃ (v : X → ℝ) (Q : ℝ≥0), LipschitzWith Q v ∧ + HasCompactSupport v ∧ SobolevSpace.toLp μ hQ (U a) =ᵐ[μ] v := by + have hm : U a ∈ compactLaplacianCore μ hQ V := by + rw [sobolevColumnMap_apply] + exact Submodule.sum_mem _ (fun i _ => Submodule.smul_mem _ _ (u i).property) + obtain ⟨v,Q,hv,hvc,-,hvr⟩ := hm.1 + exact ⟨v,Q,hv,hvc,hvr⟩ + have hBE := hscalar.regular_density μ hQ U D H L hU hcompact hD + (fun a => hH a a) M hM hS.measurableSet χb χ.lipschitz χ.compact hχΩ + (fun x => (χ.bounds x).1) hχ1 + have hn0 : 0<(n:ℝ) := by exact_mod_cast (by omega : 0 (χ.bounds x).1) hχ1 hBE + have hlap := regularBochner_measure_laplacian μ hQ K U D H L hU hsym measurableSet_ball M hM + (e 0) (e 0) df df (hH (e 0) (e 0)) (hD (e 0)) (hD (e 0)) hs0 hs0 A A hdf hdf + refine ⟨H (e 0) (e 0),H (e 0) (e 1),H (e 1) (e 1),M.measure (e 0),inferInstance,?_,?_,?_,?_,?_⟩ + · simpa only [hf] using hH (e 0) (e 0) + · simpa only [hf,hg] using hH (e 0) (e 1) + · simpa only [hg] using hH (e 1) (e 1) + · rw [M.measure_toSignedMeasure] + change IsMeasureLaplacianOn μ hQ (ball p R) (H (e 0) (e 0)) + (bochnerGramSource μ hQ K (U (e 0)) (U (e 0)) df df (M.bilinear (e 0) (e 0))) at hlap + rw [hf] at hlap + exact hlap + · have hRN := bochnerRadonDensity_diagonal μ M (e 0) + have hdelta : (fun x => laplacianCoordinateForm μ D x (e 0)) + =ᵐ[μ.restrict S] SobolevSpace.toLp μ hQ df := by + filter_upwards [ae_restrict_of_ae (laplacianCoordinateForm_rep μ D (e 0)), + ae_restrict_of_ae_restrict_of_subset hsub hs0] with x hx hy + exact hx.symm.trans hy + constructor + · filter_upwards [hBE (e 0),ae_restrict_of_ae hRN,hdelta] with x hb hrn hd + rwa [hrn,hd] at hb + · intro b + filter_upwards [hbound b,ae_restrict_of_ae hRN,hdelta] with x hb hrn hd + rw [hrn,hd] at hb + simpa only [hf,hg] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..da140190d4b5f19f560e4e4a08c52c73af65762e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreShiftedMeasure.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreShiftedHessian +import OAI.Geometry.RCD.Sobolev.BochnerCurvatureDensity + +namespace OAI + +/-! # Shifted regular-core estimates for the prescribed full measure -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The scalar dimensional inequality controls the actual prescribed +Bochner measure, even when its curvature parameter is weakened. -/ +theorem NoncollapsedRCD.regular_core_shifted_hessian_on_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + {V : Set X} (f g : compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (χ.bounds x).1) hχ1 + refine ⟨FG,GG,hFGr,hGGr,?_,?_⟩ + · filter_upwards [hdim,hden] with x hx he + exact hx.trans (mul_le_mul_of_nonneg_left he (Nat.cast_nonneg n)) + · intro b + filter_upwards [hbound b,hden] with x hx he + apply hx.trans + apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) + linarith only [he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakHessian.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..05ee8aecdaa20c95e00d58166a6119e7caadf324 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakHessian.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerWeakDirectional +import OAI.Geometry.RCD.Sobolev.ScalarDimensionalBochner +import OAI.Geometry.RCD.Coordinates.RegularCoreBochner +import OAI.Geometry.RCD.Coordinates.RegularTestAlgebra + +namespace OAI + +/-! # Shifted regular-core bounds without derivatives of the test Laplacian -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The already constructed regular algebra and full Bochner measure +turn scalar finite-dimensional BE into every shifted diagonal action. +The scalar finite-dimensional Bochner inequality supplies the second-order bound. -/ +theorem NoncollapsedRCD.regular_core_shifted_hessian_weak {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + {V : Set X} (f g : compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (u i).val) + let e (i : Fin 3) : Euclidean 3 := EuclideanSpace.single i 1 + have hcol (i : Fin 3) : U (e i)=(u i).val := sobolevColumnMap_single μ hQ _ i + have hf : U (e 0)=f.val := by simpa [u] using hcol 0 + have hg : U (e 1)=g.val := by simpa [u] using hcol 1 + have hz : U (e 2)=SobolevSpace.product μ hQ (U (e 1)) (U (e 1)) ‖W‖₊ ‖W‖₊ := by + simpa [hg,u,g₂] using hcol 2 + obtain ⟨D,H,L,hU,M,hD,hH,hsym,hM⟩ := hX.regular_core_bochner_sobolev_measure hn p u hR + change (∀ a, IsWeakLaplacian μ hQ (U a) (D a)) at hD + change (∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) at hH + have hq0 : D (e 0)=qf := IsWeakLaplacian.unique μ hQ (by simpa only [hf] using hD (e 0)) hqf + have hs0 : D (e 0) =ᵐ[μ.restrict (ball p R)] SobolevSpace.toLp μ hQ df := by rw [hq0]; exact hsf + have hw' : SobolevSpace.toLp μ hQ (U (e 1)) =ᵐ[μ] W := by rw [hg]; exact hw + obtain ⟨χ,hχΩ,hχ1⟩ := hX.exists_open_regular_cutoff hn isOpen_ball hS hsub + let χb : X →ᵇ ℝ := ofCompactSupport χ.weight χ.lipschitz.continuous χ.compact + have hcompact (a : Euclidean 3) : ∃ (v : X → ℝ) (Q : ℝ≥0), LipschitzWith Q v ∧ + HasCompactSupport v ∧ SobolevSpace.toLp μ hQ (U a) =ᵐ[μ] v := by + have hm : U a ∈ compactLaplacianCore μ hQ V := by + rw [sobolevColumnMap_apply] + exact Submodule.sum_mem _ (fun i _ => Submodule.smul_mem _ _ (u i).property) + obtain ⟨v,Q,hv,hvc,-,hvr⟩ := hm.1 + exact ⟨v,Q,hv,hvc,hvr⟩ + have hBE := hscalar.regular_density μ hQ U D H L hU hcompact hD + (fun a => hH a a) M hM hS.measurableSet χb χ.lipschitz χ.compact hχΩ + (fun x => (χ.bounds x).1) hχ1 + have hn0 : 0<(n:ℝ) := by exact_mod_cast (by omega : 0 (χ.bounds x).1) hχ1 hBE + have hlap := regularBochner_measure_laplacian μ hQ K U D H L hU hsym measurableSet_ball M hM + (e 0) (e 0) df df (hH (e 0) (e 0)) (hD (e 0)) (hD (e 0)) hs0 hs0 A A hdf hdf + refine ⟨H (e 0) (e 0),H (e 0) (e 1),H (e 1) (e 1),M.measure (e 0),inferInstance,?_,?_,?_,?_,?_⟩ + · simpa only [hf] using hH (e 0) (e 0) + · simpa only [hf,hg] using hH (e 0) (e 1) + · simpa only [hg] using hH (e 1) (e 1) + · rw [M.measure_toSignedMeasure] + change IsMeasureLaplacianOn μ hQ (ball p R) (H (e 0) (e 0)) + (bochnerGramSource μ hQ K (U (e 0)) (U (e 0)) df df (M.bilinear (e 0) (e 0))) at hlap + rw [hf] at hlap + exact hlap + · have hRN := bochnerRadonDensity_diagonal μ M (e 0) + have hdelta : (fun x => laplacianCoordinateForm μ D x (e 0)) + =ᵐ[μ.restrict S] SobolevSpace.toLp μ hQ df := by + filter_upwards [ae_restrict_of_ae (laplacianCoordinateForm_rep μ D (e 0)), + ae_restrict_of_ae_restrict_of_subset hsub hs0] with x hx hy + exact hx.symm.trans hy + constructor + · filter_upwards [hBE (e 0),ae_restrict_of_ae hRN,hdelta] with x hb hrn hd + rwa [hrn,hd] at hb + · intro b + filter_upwards [hbound b,ae_restrict_of_ae hRN,hdelta] with x hb hrn hd + rw [hrn,hd] at hb + simpa only [hf,hg] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..566aa49ddd237b174f1b468ff1efcc31d919fed2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCoreWeakMeasure.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreWeakHessian +import OAI.Geometry.RCD.Sobolev.BochnerCurvatureDensity + +namespace OAI + +/-! # Shifted regular-core estimates for the prescribed full measure -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The scalar dimensional inequality controls the actual prescribed +Bochner measure, even when its curvature parameter is weakened. -/ +theorem NoncollapsedRCD.regular_core_weak_hessian_on_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + {V : Set X} (f g : compactLaplacianCore (hausdorff n X) hX.quadratic V) + (p : X) {R : ℝ} (hR : 0 (χ.bounds x).1) hχ1 + refine ⟨FG,GG,hFGr,hGGr,?_,?_⟩ + · filter_upwards [hdim,hden] with x hx he + exact hx.trans (mul_le_mul_of_nonneg_left he (Nat.cast_nonneg n)) + · intro b + filter_upwards [hbound b,hden] with x hx he + apply hx.trans + apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) + linarith only [he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffDerivatives.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..3625772c0e40aa011432ed759c1b1e4201dd81ec --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffDerivatives.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Coordinates.RegularCutoffJets +import OAI.Geometry.RCD.Coordinates.FrozenCutoffDerivatives + +namespace OAI + +/-! # First and second directional bounds for the actual patch cutoffs -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The one fixed Gevrey base controls both derivative orders needed by +the metric update. The source radius is the actual pinching scale. -/ +theorem regular_cutoff_directional_bounds {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta0 : 0 ≤ zeta) (hzeta : zeta ≤ 1 / 64) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (psi : EuclideanGevreyCutoff n) (i : ℕ) + {q y : X} (hq : q ∈ e.heat.patchRegion) (hy : y ∈ e.heat.patchNet i) + (hactive : e.heat.values q ∈ tsupport (e.heat.patchCutoff psi.value i y)) + (xi : Euclidean n) : + let L := psi.constant * 536870912 + let s := distanceSourceRadius e.heat.radius (e.heat.shift + i) + |fderiv ℝ (e.heat.patchCutoff psi.value i y) (e.heat.values q) xi| ≤ + (L ^ 2 + 4 * L ^ 3) / s * ‖e.heat.frozenAt q i xi‖ ∧ + |diagonalSecond (e.heat.patchCutoff psi.value i y) (e.heat.values q) xi| ≤ + (L ^ 2 + 4 * L ^ 3) / s ^ 2 * ‖e.heat.frozenAt q i xi‖ ^ 2 := by + intro L s + have hcont := (regular_actual_patch_cover hX e hzeta psi i).cutoff_smooth y + apply frozen_cutoff_first_second (e.heat.frozenAt q i) + (e.heat.patchCutoff psi.value i y) (e.heat.values q) xi + (distanceSourceRadius_pos e.heat.radius_pos _) (by + have hc := psi.constant_ge_one + dsimp only [L] + positivity) (hcont.of_le (by simp)).contDiffAt + exact regular_cutoff_normalized_jet hX e hzeta0 hzeta hsmall psi i hq hy hactive + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffJets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..522cc393b24334a68ece6c3a9618a36fcebf40ee --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularCutoffJets.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.RegularActualPatches +import OAI.Geometry.RCD.Coordinates.RegularNearbyFrozen +import OAI.Geometry.RCD.Coordinates.NormalizedUpdate + +namespace OAI + +/-! # Uniform Gevrey jets of the actual heat-coordinate cutoffs -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ContDiff + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The support localization places its net center within the radius +where the frozen heat frames can be compared. -/ +theorem regular_active_patch_distance {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : zeta ≤ 1 / 64) (psi : EuclideanGevreyCutoff n) (i : ℕ) + {q y : X} (hq : q ∈ e.heat.patchRegion) (hy : y ∈ e.heat.patchNet i) + (hactive : e.heat.values q ∈ tsupport (e.heat.patchCutoff psi.value i y)) : + dist y q ≤ e.heat.radius / 2 ^ (e.heat.shift + i + 17) := by + have h := (regular_actual_patch_cover hX e hzeta psi i).active_localized q hq y hy hactive + have hr : 0 < regularNetRadius e.heat.radius e.heat.shift i := div_pos e.heat.radius_pos (by positivity) + have heq : e.heat.radius / 2 ^ (e.heat.shift + i + 17) = + 2048 * regularNetRadius e.heat.radius e.heat.shift i := by + unfold regularNetRadius + rw [show e.heat.shift + i + 28 = (e.heat.shift + i + 17) + 11 by omega, pow_add] + norm_num + ring + rw [dist_comm, heq] + change dist q y ≤ 144 * regularNetRadius e.heat.radius e.heat.shift i at h + linarith + +/-- The affine input of the actual cutoff has uniformly bounded norm +after normalization at the testing point. The scale ratio is exactly +2^27; the numerical bound also absorbs the nearby-frame comparison. -/ +theorem regular_cutoff_normalized_jet {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta0 : 0 ≤ zeta) (hzeta : zeta ≤ 1 / 64) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (psi : EuclideanGevreyCutoff n) (i : ℕ) + {q y : X} (hq : q ∈ e.heat.patchRegion) (hy : y ∈ e.heat.patchNet i) + (hactive : e.heat.values q ∈ tsupport (e.heat.patchCutoff psi.value i y)) (m : ℕ) : + ‖iteratedFDeriv ℝ m (fun z => e.heat.patchCutoff psi.value i y + (frozenSource (distanceSourceRadius e.heat.radius (e.heat.shift + i)) + (e.heat.frozenAt q i) (e.heat.values q) z)) 0‖ ≤ + (psi.constant * 536870912) ^ (m + 1) * (m.factorial : ℝ) ^ 2 := by + let s := distanceSourceRadius e.heat.radius (e.heat.shift + i) + let r : ℝ := e.heat.patchRadius i + let P := e.heat.frozenAt q i + let Q := e.heat.frozenAt y i + let D : Euclidean n →L[ℝ] Euclidean n := Q.toContinuousLinearMap.comp P.symm.toContinuousLinearMap + let L : Euclidean n →L[ℝ] Euclidean n := (s / r) • D + let b := r⁻¹ • Q (e.heat.values q - e.heat.values y) + have hr : 0 < r := div_pos e.heat.radius_pos (by positivity) + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos _ + have hratio : s / r = 134217728 := by + change distanceSourceRadius e.heat.radius (e.heat.shift + i) / + regularNetRadius e.heat.radius e.heat.shift i = _ + unfold distanceSourceRadius regularNetRadius + rw [show e.heat.shift + i + 28 = (e.heat.shift + i + 1) + 27 by omega, pow_add] + norm_num + field_simp [e.heat.radius_pos.ne'] + ring + have hD : ‖D‖ ≤ 3 := by + have hq' := e.heat.patch_region_subset hq + have hy' := e.heat.patch_region_subset ((regular_actual_patch_cover hX e hzeta psi i).center_mem hy) + exact regular_nearby_frozen_operator hX e hq' hy' hzeta0 hsmall i + (regular_active_patch_distance hX e hzeta psi i hq hy hactive) + have hL : ‖L‖ ≤ 536870912 := by + dsimp only [L] + rw [norm_smul, Real.norm_eq_abs, abs_of_pos (div_pos hs hr), hratio] + nlinarith + have heq : (fun z => e.heat.patchCutoff psi.value i y + (frozenSource s P (e.heat.values q) z)) = fun z => psi.value (b + L z) := by + funext z + change psi.value (r⁻¹ • Q (e.heat.values q + s • P.symm z - e.heat.values y)) = _ + congr 1 + have hv : e.heat.values q + s • P.symm z - e.heat.values y = + (e.heat.values q - e.heat.values y) + s • P.symm z := by abel + rw [hv, map_add, map_smul, smul_add] + simp only [b, L, D, smul_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe, div_eq_mul_inv, smul_smul, mul_comm] + rw [heq] + exact psi.affine_jet_le L b 0 m (by norm_num) hL + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularDirichletCore.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularDirichletCore.lean new file mode 100644 index 0000000000000000000000000000000000000000..5381e2ea5d160e78207e016e5c95c912f85b3e54 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularDirichletCore.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.RCD.Sobolev.WeakLaplacianDomain + +namespace OAI + +/-! # A dense compact test core with actual L² Laplacians -/ + +open Set Filter MeasureTheory Topology +open scoped NNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Compact Lipschitz Sobolev functions whose weak Laplacian belongs to L². -/ +def compactLaplacianCore (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) (Ω : Set X) : + Submodule ℝ (SobolevSpace μ hQ) := + SobolevSpace.dirichletCore μ hQ Ω ⊓ weakLaplacianDomain μ hQ + +theorem NoncollapsedRCD.compactLaplacianCore_closure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {Ω : Set X} (hΩ : IsOpen Ω) : + (compactLaplacianCore (hausdorff n X) hX.quadratic Ω).topologicalClosure = + SobolevSpace.dirichlet (hausdorff n X) hX.quadratic Ω := by + let μ := hausdorff n X + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + apply le_antisymm + · exact Submodule.topologicalClosure_minimal _ + (inf_le_left.trans (Submodule.le_topologicalClosure _)) + (Submodule.isClosed_topologicalClosure _) + apply Submodule.topologicalClosure_minimal _ ?_ (Submodule.isClosed_topologicalClosure _) + rintro u ⟨φ,L,hφ,hcompact,hsupport,hu⟩ + obtain ⟨χ,hχ,hχ1⟩ := hX.exists_open_regular_cutoff hn hΩ hcompact hsupport + let M := SobolevSpace.cutoffCLM μ hX.quadratic χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) + have hMu : M u=u := by + apply Subtype.ext + apply Lp.ext + filter_upwards [SobolevSpace.cutoffCLM_coe μ hX.quadratic χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) u,hu] with x hx hux + change SobolevSpace.toLp μ hX.quadratic (M u) x = SobolevSpace.toLp μ hX.quadratic u x + rw [hx,hux] + by_cases hz : φ x=0 + · rw [hz,mul_zero] + · rw [hχ1 x (subset_tsupport φ hz),one_mul] + obtain ⟨A,hA⟩ := hcompact.exists_bound_of_continuous hφ.continuous + let B : ℝ≥0 := ⟨max A 0,le_max_right _ _⟩ + have hB (x : X) : |φ x| ≤ B := by + have hb : |φ x| ≤ A := by simpa only [Real.norm_eq_abs] using hA x + exact hb.trans (le_max_left _ _) + have huB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hX.quadratic u x| ≤ B := + hu.mono fun x hx => hx ▸ hB x + let t (k : ℕ) : ℝ := 1/((k:ℝ)+1) + have ht (k : ℕ) : 0 M (us k)) atTop (𝓝 u) := by + simpa only [hMu,Function.comp_def] using M.continuous.tendsto u |>.comp hconv + apply (Submodule.isClosed_topologicalClosure _).mem_of_tendsto hconvM + apply Eventually.of_forall + intro k + apply Submodule.le_topologicalClosure + constructor + · obtain ⟨v,hv,hev⟩ := hX.heat_lipschitz K n hn + (SobolevSpace.toLp μ hX.quadratic u) hφ hu.symm B hB (ht k).le + obtain ⟨D,hD⟩ := lipschitz_mul_constant_outside_compact χ.lipschitz hv 0 + (by simpa using χ.compact) χ.abs_le + refine ⟨fun x => χ.weight x*v x,D,hD,χ.compact.mul_right, + tsupport_mul_subset_left.trans hχ,?_⟩ + filter_upwards [SobolevSpace.cutoffCLM_coe μ hX.quadratic χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) (us k),hev] with x hx hvx + exact hx.trans (congrArg (fun z => χ.weight x*z) hvx) + · have hbound : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hX.quadratic (us k) x| ≤ B := + heatAt_abs_le_const μ hX.quadratic (t k) B _ huB + obtain ⟨d,hd,-⟩ := (heatSobolev_weak_laplacian μ hX.quadratic (t k) (ht k) + (SobolevSpace.toLp μ hX.quadratic u)).cutoff μ hX.quadratic (us k) χ.sobolev + _ χ.laplacian χ.weak_laplacian χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) χ.representative hbound + exact ⟨d,hd⟩ + +/-- The same core as a submodule of the actual zero-boundary space. -/ +def regularDirichletCore (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) (Ω : Set X) : + Submodule ℝ (SobolevSpace.dirichlet μ hQ Ω) := + (compactLaplacianCore μ hQ Ω).comap (SobolevSpace.dirichlet μ hQ Ω).subtype + +theorem NoncollapsedRCD.regularDirichletCore_dense {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {Ω : Set X} (hΩ : IsOpen Ω) : + Dense (regularDirichletCore (hausdorff n X) hX.quadratic Ω : + Set (SobolevSpace.dirichlet (hausdorff n X) hX.quadratic Ω)) := by + let μ := hausdorff n X + intro φ + rw [IsEmbedding.subtypeVal.closure_eq_preimage_closure_image] + have himage : Subtype.val '' (regularDirichletCore μ hX.quadratic Ω : + Set (SobolevSpace.dirichlet μ hX.quadratic Ω)) = + (compactLaplacianCore μ hX.quadratic Ω : Set (SobolevSpace μ hX.quadratic)) := by + ext u + constructor + · rintro ⟨v,hv,rfl⟩ + exact hv + · intro hu + exact ⟨⟨u,Submodule.le_topologicalClosure _ hu.1⟩,hu,rfl⟩ + rw [himage] + change φ.val ∈ (compactLaplacianCore μ hX.quadratic Ω).topologicalClosure + rw [hX.compactLaplacianCore_closure hn hΩ] + exact φ.property + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceReplacements.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceReplacements.lean new file mode 100644 index 0000000000000000000000000000000000000000..255410b053d6aea68619c29b45ba4ad7e523bde0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceReplacements.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Coordinates.RegularDistanceSources +import OAI.Geometry.RCD.Harmonic.DyadicDistanceReplacements +import OAI.Geometry.RCD.Metric.AnnularVolume + +namespace OAI + +/-! # Uniform dyadic Poisson data throughout a regular neighborhood -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A regular neighborhood has actual squared-distance replacements with +one set of constants, while the total full source mass is arbitrarily small. +The constants precede the center and every smaller dyadic root. -/ +theorem regular_distance_replacements {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) {p : X} {a κ rho eta : ℝ} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hrho : 0 < rho) (heta : 0 < eta) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) + (hsobolev : LocalDirichletSobolevInput hX) (hcutoff : LocalGoodCutoffInput hX) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C D : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < D ∧ D ≤ rho ∧ + ∀ q : X, dist p q ≤ D → ∀ r0 : ℝ, 0 < r0 → r0 ≤ D → + ∃ S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ q r0, + Nonempty (DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) ∧ + Summable (normalizedDistanceSourceMass (hausdorff (m + 2) X) hX.quadratic S) ∧ + (∑' i, normalizedDistanceSourceMass (hausdorff (m + 2) X) hX.quadratic S i) < eta := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨B, J, C, hB, hJ, hC, hreplace⟩ := dyadic_distance_replacements_of_published + hX (by omega) hsobolev hcutoff hκ + obtain ⟨D₁, hD₁, hD₁rho, hsource⟩ := regular_small_distance_sources m hX + ha hκ hK hrho heta hcompact hregular hvolume hBG hdensity hdistance + let cap := min rho (min 1 (1 / (64 * (|K| + 1)))) + have hcap : 0 < cap := lt_min hrho (lt_min zero_lt_one (by positivity)) + obtain ⟨D₂, hD₂, hD₂cap, hvol⟩ := exists_uniform_volume_neighborhood (m + 1) ha + (euclideanUnitVolume_pos (m + 2)) (by norm_num : (0 : ℝ) < 1 / 4) + (by norm_num : (1 / 4 : ℝ) ≤ 1) hcap hcompact hregular hvolume hBG hdensity + (fun q r => ne_of_lt (hX.finiteOnBounded (ball q r) isBounded_ball)) + let D := min D₁ D₂ + have hD : 0 < D := lt_min hD₁ hD₂ + refine ⟨B, J, C, D, hB, hJ, hC, hD, (min_le_left _ _).trans hD₁rho, ?_⟩ + intro q hq r0 hr0 hrD + have hq₁ : dist p q ≤ D₁ := hq.trans (min_le_left _ _) + have hq₂ : dist p q ≤ D₂ := hq.trans (min_le_right _ _) + have hrD₁ : r0 ≤ D₁ := hrD.trans (min_le_left _ _) + have hrD₂ : r0 ≤ D₂ := hrD.trans (min_le_right _ _) + obtain ⟨S, hsum, hsmall⟩ := hsource q hq₁ r0 hr0 hrD₁ + have hrone : r0 ≤ 1 := hrD₂.trans (hD₂cap.trans + ((min_le_right _ _).trans (min_le_left _ _))) + have hrcap : r0 ≤ 1 / (64 * (|K| + 1)) := hrD₂.trans (hD₂cap.trans + ((min_le_right _ _).trans (min_le_right _ _))) + have hradii (i : ℕ) : distanceSourceRadius r0 i ≤ r0 := by + have hh := distanceSourceRadius_outer_le hr0.le i + have hp := distanceSourceRadius_pos hr0 i + linarith + have hcurv (i : ℕ) : -1 ≤ K * (64 * distanceSourceRadius r0 i) ^ 2 := + curvature_bound_sixtyfour (distanceSourceRadius_pos hr0 i).le ((hradii i).trans hrcap) + have hann (i : ℕ) : + 0 < (hausdorff (m + 2) X).real (ball q (distanceSourceRadius r0 i)) ∧ + 2 * (hausdorff (m + 2) X).real (ball q (distanceSourceRadius r0 i)) ≤ + (hausdorff (m + 2) X).real (ball q (2 * distanceSourceRadius r0 i)) := by + apply relative_volume_annulus (n := m + 2) (by omega) (distanceSourceRadius_pos hr0 i) + (euclideanUnitVolume_pos (m + 2)) + · exact hvol q hq₂ _ (distanceSourceRadius_pos hr0 i) ((hradii i).trans hrD₂) + · exact hvol q hq₂ _ (mul_pos (by norm_num) (distanceSourceRadius_pos hr0 i)) + ((distanceSourceRadius_outer_le hr0.le i).trans hrD₂) + exact ⟨S, hreplace q r0 S hrone hcurv (fun i => (hann i).1) (fun i => (hann i).2), hsum, hsmall⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceSources.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceSources.lean new file mode 100644 index 0000000000000000000000000000000000000000..bff64a57421aceea0cf20395ff98b049aaa6c114 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularDistanceSources.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Metric.AlmostEuclideanSourceBudget +import OAI.Geometry.RCD.Metric.VolumeRegime +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # Uniformly small full distance sources near a regular point -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The same neighborhood works for every center and every smaller root +radius. Both the full source and its small total mass are constructed. -/ +theorem regular_small_distance_sources {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) {p : X} {a κ rho eta : ℝ} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hrho : 0 < rho) (heta : 0 < eta) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ D : ℝ, 0 < D ∧ D ≤ rho ∧ ∀ q : X, dist p q ≤ D → + ∀ r0 : ℝ, 0 < r0 → r0 ≤ D → + ∃ S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ q r0, + Summable (normalizedDistanceSourceMass (hausdorff (m + 2) X) hX.quadratic S) ∧ + (∑' i, normalizedDistanceSourceMass (hausdorff (m + 2) X) hX.quadratic S i) < eta := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + let omega := euclideanUnitVolume (m + 2) + have homega : 0 < omega := euclideanUnitVolume_pos _ + let A := 2 * (radialCutoffCoefficient ((m + 2 : ℕ) : ℝ))⁻¹ * omega + have hA : 0 ≤ A := by + have := (radialCutoffCoefficient_pos (n := ((m + 2 : ℕ) : ℝ)) (by positivity)).le + dsimp only [A] + positivity + let C := (16 / 3 : ℝ) * κ * omega * (2 : ℝ) ^ ((m + 2 : ℕ) : ℝ) + have hC : 0 ≤ C := by dsimp only [C]; positivity + let B := 1 + 2 * C + have hB : 0 < B := by dsimp only [B]; linarith + let eps := min (1 / 2 : ℝ) (eta / (4 * (A + 1))) + have heps : 0 < eps := lt_min (by norm_num) (by positivity) + have heps1 : eps ≤ 1 := (min_le_left _ _).trans (by norm_num) + have hfirst : A * eps ≤ eta / 4 := by + have hepsle : eps ≤ eta / (4 * (A + 1)) := min_le_right _ _ + have hh := (le_div_iff₀ (by positivity : 0 < 4 * (A + 1))).mp hepsle + nlinarith + let cap := min rho (Real.sqrt (eta / (4 * B))) + have hcap : 0 < cap := lt_min hrho (Real.sqrt_pos.mpr (by positivity)) + obtain ⟨D, hD, hDcap, hvol⟩ := exists_uniform_volume_neighborhood (m + 1) ha homega heps heps1 + hcap hcompact hregular hvolume hBG hdensity + (fun q r => ne_of_lt (hX.finiteOnBounded (ball q r) isBounded_ball)) + refine ⟨D, hD, hDcap.trans (min_le_left _ _), ?_⟩ + intro q hq r0 hr0 hrD + obtain ⟨S⟩ := dyadic_distance_sources_of_published hX (by omega) hdistance hκ hK q hr0 + have hlocal : ∀ r, 0 < r → r ≤ r0 → + |(hausdorff (m + 2) X).real (ball q r) / (omega * r ^ (m + 2)) - 1| ≤ eps := + fun r hr hrr => hvol q hq r hr (hrr.trans hrD) + obtain ⟨hs, hb⟩ := S.almost_euclidean_budget (hausdorff (m + 2) X) hX.quadratic + (by omega) hκ homega heps.le hBG (continuous_comparisonModelVolume _ _) + (fun r hr => comparisonModelVolume_pos _ ha hr) hlocal + refine ⟨S, hs, ?_⟩ + have hrsmall : r0 ≤ Real.sqrt (eta / (4 * B)) := + hrD.trans (hDcap.trans (min_le_right _ _)) + have hrsq : r0 ^ 2 ≤ eta / (4 * B) := by + have hh := (sq_le_sq₀ hr0.le (Real.sqrt_nonneg _)).mpr hrsmall + rwa [Real.sq_sqrt (by positivity : 0 ≤ eta / (4 * B))] at hh + have hsmall : B * r0 ^ 2 ≤ eta / 4 := by + have hh := (le_div_iff₀ (by positivity : 0 < 4 * B)).mp hrsq + nlinarith + have hcoef : C * (1 + eps) ≤ B := by dsimp only [B]; nlinarith + have hcurv : (4 * κ * r0 ^ 2 * ((1 + eps) * omega) * + (2 : ℝ) ^ ((m + 2 : ℕ) : ℝ)) * (4 / 3) ≤ B * r0 ^ 2 := by + calc + _ = C * (1 + eps) * r0 ^ 2 := by dsimp only [C]; ring + _ ≤ _ := mul_le_mul_of_nonneg_right hcoef (sq_nonneg _) + have hmain : 2 * (radialCutoffCoefficient ((m + 2 : ℕ) : ℝ))⁻¹ * eps * omega = A * eps := by + dsimp only [A] + ring + rw [hmain] at hb + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularDyadicData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularDyadicData.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbb797163ee8aac3db3216bd1f74802b40f073ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularDyadicData.lean @@ -0,0 +1,215 @@ +import OAI.Geometry.RCD.Coordinates.DyadicNormalizedFamily +import OAI.Geometry.RCD.Coordinates.InitialAnalyticBounds +import OAI.Geometry.RCD.Heat.HeatRegimeBridges +import OAI.Geometry.RCD.Coordinates.ScaledCoordinates +import OAI.Geometry.RCD.Coordinates.MetricDyadicNormalization + +namespace OAI + +/-! # One regular-point map with bounded dyadic frames and one Bochner measure -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published geometric normalization and local Bochner inputs provide +the actual common data required by the heat argument. The root frames are +bounded before any small-scale heat comparison is invoked. -/ +theorem regular_uniform_dyadic_data_with_cap {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 1) X) (m + 1) p + (euclideanUnitVolume (m + 1))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 1) X) (m + 1) p) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 1) X) + (comparisonModelVolume m a) y (euclideanUnitVolume (m + 1))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) + {radiusCap : ℝ} (hRadiusCap : 0 < radiusCap) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) : + ∃ R ε : ℝ, 0 < R ∧ R ≤ radiusCap ∧ 16 * R < 1 ∧ a * (48 * R) ≤ 1 ∧ + |K| * (16 * R) ^ 2 ≤ β ∧ 0 < ε ∧ ε ≤ 1 ∧ + ∃ (L : ℝ≥0) (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (v : X → Euclidean (m + 1)) (M : PositiveBilinearMeasure X (Euclidean (m + 1))), + (L : ℝ) ^ 2 ≤ 4 * ((m + 1 : ℕ) : ℝ) ^ 2 ∧ + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (32 * R) ε u v ∧ + (∀ z, Nonempty (LocalHarmonicEnergy (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) M |K| p (4 * R) + L z)) ∧ + (∀ y, dist p y ≤ 16 * R → ∀ r, 0 < r → r ≤ 32 * R → + |(hausdorff (m + 1) X).real (ball y r) / + (euclideanUnitVolume (m + 1) * r ^ (m + 1)) - 1| ≤ 1 / 2) ∧ + (∀ q ∈ ball p R, + ∃ S : ℕ → Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + (∀ i, IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, ∃ w : X → Euclidean (m + 1), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (R / 2 ^ i) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) w) ∧ + ‖(S 0 : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1))‖ ^ 2 ≤ 2 ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (R / 2 ^ i) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 (8 * ρ) + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q)))) ∧ + ∀ q ∈ ball p R, ∀ r : ℝ, 0 < r → r ≤ R / 16 → + ∃ B : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsPointedApproximation q 0 r 2 (4 * ρ) (fun x => + (B : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (B : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q)) := by + let μ := hausdorff (m + 1) X + let C := 3 * (32 : ℝ) ^ (m + 1) + have hC : 1 ≤ C := by + have hpow : (1 : ℝ) ≤ 32 ^ (m + 1) := one_le_pow₀ (by norm_num) + dsimp only [C] + linarith + let cap := min 1 (1 / (2 * (((m + 1 : ℕ) : ℝ) ^ 2 * C + 1))) + have hcap : 0 < cap := lt_min zero_lt_one (by dsimp only [C]; positivity) + have homega := euclideanUnitVolume_pos (m + 1) + obtain ⟨D, hD, _, hvolD⟩ := exists_uniform_volume_neighborhood (μ := μ) m ha homega + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num : (1 / 2 : ℝ) ≤ 1) zero_lt_one + hcompact hregular hvolume hBG hdensity + (fun y r => ne_of_lt (hX.finiteOnBounded (ball y r) isBounded_ball)) + obtain ⟨T, ε, hT, hε, hTcap, hεcap, hT1, hscale, hcurv, u, v, hu, hfamily⟩ := + bounded_regular_controlled_normalization m hX hn ha hcompact hregular hvolume hmeasured hBG + hdensity hinitial htrans hsplit hrigidity hρ hβ + (Rcap := min (D / 4) radiusCap) (lt_min (by positivity) hRadiusCap) hcap + have hTD : T ≤ D / 4 := hTcap.trans (min_le_left _ _) + let R := T / 16 + have hR : 0 < R := div_pos hT (by norm_num) + have hTR : 16 * R = T := by dsimp only [R]; ring + have h32R : 32 * R = 2 * T := by dsimp only [R]; ring + have hε1 : ε ≤ 1 := hεcap.trans (min_le_left _ _) + have hεsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (C * ε) ≤ 1 / 2 := by + have he := hεcap.trans (min_le_right _ _) + have hden : 0 < 2 * (((m + 1 : ℕ) : ℝ) ^ 2 * C + 1) := by dsimp only [C]; positivity + have hm := (le_div_iff₀ hden).mp he + nlinarith only [hm, hε.le] + have hu' : FirstOrderSplittingOn μ hX.quadratic p (8 * (T / 4)) ε u v := by + simpa only [show 8 * (T / 4) = 2 * T by ring] using hu + obtain ⟨M, hM⟩ := hu'.local_bochner hX hbochner (abs_nonneg K) (neg_abs_le K) + (by positivity) hε.le + have hvol : ∀ y, dist p y ≤ 16 * R → ∀ r, 0 < r → r ≤ 32 * R → + |μ.real (ball y r) / (euclideanUnitVolume (m + 1) * r ^ (m + 1)) - 1| ≤ 1 / 2 := by + intro y hy r hr hrR + apply hvolD y (by rw [hTR] at hy; linarith) r hr + rw [h32R] at hrR + linarith + refine ⟨R, ε, hR, by + have hh := hTcap.trans (min_le_right _ _) + dsimp only [R] + linarith, by rwa [hTR], ?_, by rwa [hTR], hε, hε1, + splittingDirectionBound (m + 1) ε hε.le, u, v, M, + splittingDirectionBound_sq_le hε.le hε1, by simpa only [h32R] using hu, ?_, hvol, ?_, ?_⟩ + · have he : 48 * R = 3 * T := by dsimp only [R]; ring + rwa [he] + · have he : 4 * R = T / 4 := by dsimp only [R]; ring + simpa only [he] using hM + · intro q hq + have hqp : dist q p < R := hq + have hqT : q ∈ ball p (T / 4) := by + change dist q p < T / 4 + dsimp only [R] at hqp + linarith + obtain ⟨S, hS, hfirst, hmetricS⟩ := exists_metric_dyadic_normalized_family μ hX.quadratic u v q hR + (show 4 * R ≤ T by dsimp only [R]; linarith) (hfamily q hqT) + refine ⟨S, hS, fun i => ⟨_, hfirst i⟩, ?_, hfirst, hmetricS⟩ + have hsub : ball q R ⊆ ball p (2 * T) := by + intro x hx + have hxq : dist x q < R := hx + have hxp := dist_triangle x q p + change dist x p < 2 * T + dsimp only [R] at hxq hqp + linarith + have hratio : μ.real (ball p (2 * T)) ≤ C * μ.real (ball q R) := by + apply initial_working_volume_ratio μ (m + 1) p q hT homega + · apply hvol p (by simp only [dist_self]; positivity) (2 * T) (by positivity) + rw [h32R] + · apply hvol q (by rw [dist_comm]; linarith) R hR + linarith + apply initial_normalizer_norm_sq_le_two μ hX.quadratic u hu (ball q R) measurableSet_ball hsub + (ne_of_gt (hX.fullSupport q R hR)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport p (2 * T) (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hC hε.le hratio hεsmall (S 0) + simpa only [pow_zero, div_one] using hS 0 + + · intro q hq r hr hrR + have hqp : dist q p < R := hq + have hqT : q ∈ ball p (T / 4) := by + change dist q p < T / 4 + dsimp only [R] at hqp + linarith + have hrT : 64 * (4 * r) ≤ T := by + dsimp only [R] at hrR + linarith + obtain ⟨A, _, _, happ⟩ := hfamily q hqT (4 * r) (by positivity) hrT + exact ⟨scaledCoordinateEquiv A r⁻¹ (inv_ne_zero hr.ne'), + normalized_approximation_rescale_four hr v A happ⟩ + +/-- The original uncapped interface is the unit-cap specialization. -/ +theorem regular_uniform_dyadic_data {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 1) X) (m + 1) p + (euclideanUnitVolume (m + 1))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 1) X) (m + 1) p) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 1) X) + (comparisonModelVolume m a) y (euclideanUnitVolume (m + 1))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) : + ∃ R ε : ℝ, 0 < R ∧ 16 * R < 1 ∧ a * (48 * R) ≤ 1 ∧ + |K| * (16 * R) ^ 2 ≤ β ∧ 0 < ε ∧ ε ≤ 1 ∧ + ∃ (L : ℝ≥0) (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (v : X → Euclidean (m + 1)) (M : PositiveBilinearMeasure X (Euclidean (m + 1))), + (L : ℝ) ^ 2 ≤ 4 * ((m + 1 : ℕ) : ℝ) ^ 2 ∧ + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (32 * R) ε u v ∧ + (∀ z, Nonempty (LocalHarmonicEnergy (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) M |K| p (4 * R) + L z)) ∧ + (∀ y, dist p y ≤ 16 * R → ∀ r, 0 < r → r ≤ 32 * R → + |(hausdorff (m + 1) X).real (ball y r) / + (euclideanUnitVolume (m + 1) * r ^ (m + 1)) - 1| ≤ 1 / 2) ∧ + (∀ q ∈ ball p R, + ∃ S : ℕ → Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + (∀ i, IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, ∃ w : X → Euclidean (m + 1), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (R / 2 ^ i) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) w) ∧ + ‖(S 0 : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1))‖ ^ 2 ≤ 2 ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (R / 2 ^ i) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 (8 * ρ) + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (S i : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q)))) ∧ + ∀ q ∈ ball p R, ∀ r : ℝ, 0 < r → r ≤ R / 16 → + ∃ B : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsPointedApproximation q 0 r 2 (4 * ρ) (fun x => + (B : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (B : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q)) := by + obtain ⟨R, epsilon, hR, _hcap, hrest⟩ := regular_uniform_dyadic_data_with_cap m hX hn ha + hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity hbochner + (radiusCap := 1) zero_lt_one hρ hβ + exact ⟨R, epsilon, hR, hrest⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularEllipsoids.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularEllipsoids.lean new file mode 100644 index 0000000000000000000000000000000000000000..625e63e3ae89b29cbdfbe324a9e4f93631e807e3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularEllipsoids.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Coordinates.RegularWorkingChart +import OAI.Geometry.RCD.Coordinates.CoordinateEllipsoids + +namespace OAI + +/-! # Actual frozen ellipsoids inside the working coordinate image -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +def regularEllipsoidRadius (R : ℝ) (shift i : ℕ) : ℝ := + iterationRadius (R / 128) (shift + i + 17) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The constructive quarter-scale corrections fill a small ellipsoid +in the actual fine heat metric. Every preimage lies in the patch region. -/ +theorem regular_frozen_ellipsoid_preimages {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzetaSmall : zeta ≤ 1 / 2048) + (hgramSmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4) + (i : ℕ) {q : X} (hq : q ∈ e.heat.patchRegion) + (hball : ball q (4 * regularEllipsoidRadius e.heat.radius e.heat.shift i) ⊆ e.heat.patchRegion) : + ∀ P : Euclidean n, + ‖e.heat.frozenAt q i (P - e.heat.values q)‖ < + regularEllipsoidRadius e.heat.radius e.heat.shift i / 32 → + ∃ y ∈ e.heat.patchRegion, + dist q y < regularEllipsoidRadius e.heat.radius e.heat.shift i ∧ e.heat.values y = P := by + let d := regular_open_coordinate_data hX e hzeta hzetaSmall hgramSmall + have hr : 0 < e.heat.radius / 128 := div_pos e.heat.radius_pos (by norm_num) + have hc : ContinuousOn e.heat.values (ball base (e.heat.radius / 1024)) := + e.heat.splitting.continuous.mono (ball_subset_ball (by linarith [e.heat.radius_pos])) + have hpre := dyadic_ellipsoid_preimages d hr (by positivity) hc + (e.heat.shift + i + 17) q (e.heat.frozenAt q i) + (hball.trans e.heat.patch_region_subset_initial) + (by + intro w + have hq' := e.heat.patch_region_subset hq + change ‖e.heat.quarterFrame ((e.heat.shift + i + 17) / 2) q w‖ ≤ _ + rw [e.heat.quarterFrame_eq _ q hq'] + exact e.heat.coarse_frame_le_frozen hq' i (2 * ((e.heat.shift + i + 17) / 2)) + (by omega) (by omega) w) + intro P hP + obtain ⟨y, _, hy, heq⟩ := hpre P hP + refine ⟨y, hball ?_, hy, heq⟩ + have hρ : 0 < regularEllipsoidRadius e.heat.radius e.heat.shift i := + iterationRadius_pos hr _ + change dist q y < regularEllipsoidRadius e.heat.radius e.heat.shift i at hy + change dist y q < 4 * regularEllipsoidRadius e.heat.radius e.heat.shift i + rw [dist_comm] + linarith + +omit [MeasurableSpace X] [BorelSpace X] [ProperSpace X] in +/-- The inner original-space ball has room for every ellipsoid used by +the iteration, uniformly over the scale. -/ +theorem regular_ellipsoid_room {R : ℝ} (hR : 0 < R) (shift i : ℕ) + {base q : X} (hq : q ∈ ball base (R / 2 ^ (shift + 12))) : + ball q (4 * regularEllipsoidRadius R shift i) ⊆ regularPatchRegion base R shift := by + have hρ : 4 * regularEllipsoidRadius R shift i ≤ R / 2 ^ (shift + 12) := by + have hp : (2 : ℝ) ^ (shift + 12) ≤ 2 ^ (shift + i + 17) := + pow_le_pow_right₀ (by norm_num) (by omega) + have hd := div_le_div_of_nonneg_left hR.le (by positivity) hp + unfold regularEllipsoidRadius iterationRadius + have hr : 0 < R / 2 ^ (shift + 12) := div_pos hR (by positivity) + have he : R / 128 / (2 : ℝ) ^ (shift + i + 17) = + (R / (2 : ℝ) ^ (shift + i + 17)) / 128 := by ring + rw [he] + linarith + have hrad : R / 2 ^ (shift + 10) = 4 * (R / 2 ^ (shift + 12)) := by + rw [show shift + 12 = (shift + 10) + 2 by omega, pow_add] + norm_num + ring + apply ball_subset_ball' + change 4 * regularEllipsoidRadius R shift i + dist q base ≤ R / 2 ^ (shift + 10) + rw [hrad] + have hdist : dist q base < R / 2 ^ (shift + 12) := hq + have hr : 0 < R / 2 ^ (shift + 12) := div_pos hR (by positivity) + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularEuclideanHausdorff.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularEuclideanHausdorff.lean new file mode 100644 index 0000000000000000000000000000000000000000..70b00d24259b5898a5709a2085fb720aeecc291f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularEuclideanHausdorff.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.MetricLimitHausdorffNormalization +import OAI.Geometry.RCD.Metric.MetricLawCompactness +import OAI.Geometry.RCD.Metric.PointedCompactness +import OAI.Geometry.RCD.Metric.MeasurablePointedApproximation +import OAI.Geometry.RCD.Metric.LowerCurvatureVolume + +namespace OAI + +/-! # Euclidean measure normalization supplied by an actual regular point -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_euclidean_hausdorff_nonpositive {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hK : K ≤ 0) + {p : X} (hp : IsRegular n p) : hausdorff n (Euclidean n) = volume := by + let ε := fun k : ℕ => 1/((k:ℝ)+1) + have he (k : ℕ) : 0 < ε k := by dsimp only [ε]; positivity + have he1 (k : ℕ) : ε k ≤ 1 := by + dsimp only [ε] + apply (div_le_one (by positivity)).mpr + have := Nat.cast_nonneg (α := ℝ) k + linarith + have hex (k : ℕ) : ∃ r : ℝ, 0 < r ∧ ∃ V : X → Euclidean n, + Measurable V ∧ IsPointedApproximation p 0 r 1 (ε k) V ∧ -ε k ≤ K*r^2 := by + obtain ⟨d,hd,happ⟩ := regular_small_scale_approximation + (hX.pointedRescalingPrecompactness hn p) hp zero_lt_one (div_pos (he k) (by norm_num : (0:ℝ)<5)) + let r := min (d/2) (min 1 (ε k/(|K|+1))) + have hr : 0 < r := lt_min (half_pos hd) + (lt_min zero_lt_one (div_pos (he k) (by positivity))) + have hrd : r < d := lt_of_le_of_lt (min_le_left _ _) (half_lt_self hd) + have hr1 : r ≤ 1 := (min_le_right _ _).trans (min_le_left _ _) + have hre : r ≤ ε k/(|K|+1) := (min_le_right _ _).trans (min_le_right _ _) + obtain ⟨f,hf⟩ := happ r hr hrd + obtain ⟨V,hVm,hV⟩ := hf.exists_measurable hr zero_lt_one (div_pos (he k) (by norm_num : (0:ℝ)<5)) + have hV' : IsPointedApproximation p 0 r 1 (ε k) V := by + convert hV using 1 + ring + refine ⟨r,hr,V,hVm,hV',?_⟩ + have hb := (le_div_iff₀ (by positivity : 0 < |K|+1)).mp hre + have hs : r^2 ≤ r := by nlinarith only [hr,hr1] + have hmul := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + have hlow := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + nlinarith only [hb,hmul,hlow,hr] + choose r hr V hVm hV hcurv using hex + have hε : Tendsto ε atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + obtain ⟨Q,α,hα,hlim,_,hpositive⟩ := hX.metric_law_compactness hn zero_lt_one + (fun _ => p) r ε V hr hε he1 + (fun k => by simpa only [one_mul] using (show (-1:ℝ) ≤ K*(r k)^2 from + (by linarith only [hcurv k,he1 k]))) hVm hV + exact hX.metric_limit_hausdorff_normalization hn hK zero_lt_one + (fun _ => p) (r ∘ α) (ε ∘ α) (V ∘ α) (fun k => hr (α k)) + (hε.comp hα.tendsto_atTop) (fun k => hcurv (α k)) (fun k => hVm (α k)) + (fun k => hV (α k)) (fun _ => (hX.finiteOnBounded _ isBounded_ball).ne) hlim hpositive + +theorem NoncollapsedRCD.regular_euclidean_hausdorff {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + {p : X} (hp : IsRegular n p) : hausdorff n (Euclidean n) = volume := by + by_cases hK : K ≤ 0 + · exact hX.regular_euclidean_hausdorff_nonpositive hn hK hp + · exact (hX.zero_of_nonneg_curvature hn (le_of_not_ge hK)).regular_euclidean_hausdorff_nonpositive + hn le_rfl hp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFinitePatchCover.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFinitePatchCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..356dba98f23ea34d66eb7473a9e0630cb27e34a5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFinitePatchCover.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.RegularNetSeparation +import OAI.Geometry.RCD.Coordinates.PatchCoverData + +namespace OAI + +/-! # Actual finite heat-coordinate covers on the working region -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ContDiff + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Maximal metric nets and a fixed Euclidean cutoff produce localized +finite covers with one dimensional overlap constant at every scale. -/ +theorem regular_finite_patch_cover {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : zeta ≤ 1 / 64) (i : ℕ) (psi : Euclidean n → ℝ) + (hsmooth : ContDiff ℝ ∞ psi) (hzero : ∀ z, 0 ≤ psi z) (hone : ∀ z, psi z ≤ 1) + (hcore : ∀ z, ‖z‖ ≤ 2 → psi z = 1) (hsupport : tsupport psi ⊆ closedBall 0 3) : + let region := regularPatchRegion base e.heat.radius e.heat.shift + let r : ℝ≥0 := ⟨regularNetRadius e.heat.radius e.heat.shift i, + (div_pos e.heat.radius_pos (by positivity)).le⟩ + let T := fun q => (e.heat.frozenAt q i).toContinuousLinearMap + IsLocalizedPatchCover region r e.heat.values (maximalPatchNet r region) + (normalizedPatchCutoff r e.heat.values T psi) (patchOverlapBound n (1 / 2) 2 3) 144 3 := by + intro region r T + have hr : 0 < (r : ℝ) := div_pos e.heat.radius_pos (by positivity) + have hN : (256 : ℝ) ≤ (2 : ℝ) ^ (e.heat.shift + i + 28) := by + have h := pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) + (show 8 ≤ e.heat.shift + i + 28 by omega) + norm_num at h ⊢ + exact h + have hrR : (r : ℝ) ≤ e.heat.radius / 256 := + div_le_div_of_nonneg_left e.heat.radius_pos.le (by norm_num) hN + have hscale : (patchLocalizationFactor (1 / 2) 2 3 + 1) * (r : ℝ) ≤ 2 * e.heat.radius := by + norm_num [patchLocalizationFactor] + linarith [e.heat.radius_pos] + have hcover := bounded_maximal_normalized_patch_cover (hausdorff n X) region + (show Bornology.IsBounded region from isBounded_ball) r + (show 0 < r by exact_mod_cast hr) e.heat.values T psi n + (R := 2 * e.heat.radius) (omega := euclideanUnitVolume n) (c := 1 / 2) (M := 2) (L := 3) + (euclideanUnitVolume_pos n) (by norm_num) (by norm_num) hscale + (fun x hx t ht htR => (e.volume x (e.heat.patch_region_subset hx) t ht htR).trans (by norm_num)) + (fun x t => ne_of_lt (hX.finiteOnBounded (ball x t) isBounded_ball)) + hsmooth hzero hone hcore hsupport + (fun x _ y hy hxy => e.heat.net_near_pair_bound (e.heat.patch_region_subset hy) hzeta i hxy) + (by + intro x hx y hy hfar + refine ⟨(2 : ℝ) • T y, ?_, ?_⟩ + · have h := e.heat.net_pair_lower_bound hy hx hzeta i hfar.le + simp only [smul_apply, norm_smul, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 2)] + change (1 / 2 : ℝ) * dist x y ≤ 2 * ‖e.heat.frozenAt y i (e.heat.values x - e.heat.values y)‖ + linarith + · have hratio : 1 ≤ dist x y / (r : ℝ) := (one_le_div hr).mpr hfar.le + simp only [smul_apply, norm_smul, Real.norm_eq_abs, abs_of_pos (by norm_num : (0 : ℝ) < 2)] + have h := mul_le_mul_of_nonneg_right hratio + (sq_nonneg ‖T y (e.heat.values x - e.heat.values y)‖) + nlinarith) + norm_num [patchLocalizationFactor] at hcover ⊢ + exact hcover + +/-- Every pair of active points is close enough for both directional +pinching and the reverse central mass-ball containment. -/ +theorem regular_net_diameter_le {R : ℝ} (hR : 0 < R) (shift i : ℕ) : + 2 * 144 * regularNetRadius R shift i ≤ (R / (2 : ℝ) ^ (shift + i + 15)) / 12 := by + have hr : 0 < regularNetRadius R shift i := div_pos hR (by positivity) + have heq : R / (2 : ℝ) ^ (shift + i + 15) = 8192 * regularNetRadius R shift i := by + unfold regularNetRadius + rw [show shift + i + 28 = (shift + i + 15) + 13 by omega, pow_add] + norm_num + ring + rw [heq] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFiniteSpan.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFiniteSpan.lean new file mode 100644 index 0000000000000000000000000000000000000000..470406c22c2309ad2a8f2537ea649dd5cd1a8d27 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFiniteSpan.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Sobolev.WeakLaplacianOperator +import OAI.Geometry.RCD.Coordinates.RegularBochnerMeasure +import OAI.Geometry.RCD.Coordinates.RegularDirichletCore +import OAI.Geometry.RCD.Sobolev.CompactMixedEnergy +import OAI.Geometry.RCD.Sobolev.FiniteEnergyRepresentatives + +namespace OAI + +/-! # The actual Laplacian and Gram representatives of a regular finite span -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Every finite family in the proved regular test core has a common +linear Laplacian and a symmetric Sobolev Gram form. -/ +theorem NoncollapsedRCD.regular_finite_span {K : ℝ} {n m : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {Ω : Set X} (u : Fin m → compactLaplacianCore (hausdorff n X) hX.quadratic Ω) : + let U := sobolevColumnMap (hausdorff n X) hX.quadratic (fun i => (u i).val) + ∃ (D : Euclidean m →L[ℝ] Lp ℝ 2 (hausdorff n X)) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (L : Euclidean m → ℝ≥0), + (∀ a, ∀ᵐ x ∂hausdorff n X, SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (U a) x≤L a) ∧ + (∀ a, ∃ (v : X → ℝ) (Q : ℝ≥0), LipschitzWith Q v ∧ HasCompactSupport v ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (U a) =ᵐ[hausdorff n X] v) ∧ + (∀ a, IsWeakLaplacian (hausdorff n X) hX.quadratic (U a) (D a)) ∧ + (∀ a b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (H a b) =ᵐ[hausdorff n X] + localGamma (hausdorff n X) hX.quadratic (U a) (U b)) ∧ + (∀ a b, H a b=H b a) := by + classical + let μ := hausdorff n X + let hQ := hX.quadratic + let U := sobolevColumnMap μ hQ (fun i => (u i).val) + have hmem (a : Euclidean m) : U a ∈ compactLaplacianCore μ hQ Ω := by + rw [sobolevColumnMap_apply] + exact Submodule.sum_mem _ (fun i _ => Submodule.smul_mem _ _ (u i).property) + let V : Euclidean m →ₗ[ℝ] weakLaplacianDomain μ hQ := + U.toLinearMap.codRestrict _ (fun a => (hmem a).2) + let D := ((weakLaplacianOperator μ hQ).comp V).toContinuousLinearMap + have hD (a : Euclidean m) : IsWeakLaplacian μ hQ (U a) (D a) := + weakLaplacianOperator_spec μ hQ (V a) + have hc (a : Euclidean m) : ∃ (v : X → ℝ) (Q : ℝ≥0), LipschitzWith Q v ∧ + HasCompactSupport v ∧ SobolevSpace.toLp μ hQ (U a) =ᵐ[μ] v := by + obtain ⟨v,Q,hv,hvc,-,hvr⟩ := (hmem a).1 + exact ⟨v,Q,hv,hvc,hvr⟩ + choose v L hv hvc hvr using hc + have hL (a : Euclidean m) : ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a := + SobolevSpace.minimalSlope_le_lipschitz μ hQ (U a) (hv a) (hvr a) + let e (i : Fin m) : Euclidean m := EuclideanSpace.single i 1 + have hentry (i j : Fin m) : ∃ G : SobolevSpace μ hQ, + SobolevSpace.toLp μ hQ G =ᵐ[μ] localGamma μ hQ (U (e i)) (U (e j)) := + hX.compact_mixed_energy hn p (U (e i)) (U (e j)) (hv (e i)) (hvc (e i)) (hvr (e i)) + (hv (e j)) (hvc (e j)) (hvr (e j)) (D (e i)) (D (e j)) (hD (e i)) (hD (e j)) + choose G hG using hentry + let H := coordinateBilinear G + have hH (a b : Euclidean m) : SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] + localGamma μ hQ (U a) (U b) := by + simpa only [Measure.restrict_univ] using + coordinate_energy_representative μ hQ U G (Ω := univ) (by + intro i j + simpa only [Measure.restrict_univ] using hG i j) a b + refine ⟨D,H,L,hL,(fun a => ⟨v a,L a,hv a,hvc a,hvr a⟩),hD,hH,?_⟩ + intro a b + apply Subtype.ext + apply Lp.ext + exact (hH a b).trans ((localGamma_comm μ hQ (U a) (U b)).trans (hH b a).symm) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFrameDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFrameDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..08de2f8be31efc165d989d0a4a75bc1b2f0e7328 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFrameDefect.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreFrameDefect +import OAI.Geometry.RCD.Coordinates.RegularTestAlgebra + +namespace OAI + +/-! # Quantitative gradient expansion for an actual regular family + +Only the original n+1 functions and their weak Laplacians are supplied. +Their squares, finite span, Bochner measure and dimensional inequality +are constructed internally. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_frame_defect {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) (p : X) + (f : Fin (n+1) → compactLaplacianCore (hausdorff n X) hX.quadratic univ) + {R : ℝ} (hR : 0 hX.finiteOnBounded _ hs.isBounded⟩ + have hb (i : Fin (n+1)) : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (f i).val x|≤‖F i‖₊ := by + filter_upwards [hF i] with x hx + rw [hx] + exact (F i).norm_coe_le_norm x + let sq (i : Fin (n+1)) : compactLaplacianCore μ hQ univ := + ⟨SobolevSpace.product μ hQ (f i).val (f i).val ‖F i‖₊ ‖F i‖₊, + product_mem_compactLaplacianCore μ hQ (f i).property (f i).property _ _ (hb i) (hb i)⟩ + let u := Fin.append f sq + let U := sobolevColumnMap μ hQ (fun i => (u i).val) + let w (i : Fin (n+1)) : Euclidean ((n+1)+(n+1)) := + EuclideanSpace.single (Fin.castAdd (n+1) i) 1 + let z (i : Fin (n+1)) : Euclidean ((n+1)+(n+1)) := + EuclideanSpace.single (Fin.natAdd (n+1) i) 1 + have hUw (i : Fin (n+1)) : U (w i)=(f i).val := by + simp [U,w,u,sobolevColumnMap_single] + have hUz (i : Fin (n+1)) : U (z i)= + SobolevSpace.product μ hQ (f i).val (f i).val ‖F i‖₊ ‖F i‖₊ := by + change sobolevColumnMap μ hQ (fun j => (u j).val) + (EuclideanSpace.single (Fin.natAdd (n+1) i) 1)=_ + rw [sobolevColumnMap_single] + change (Fin.append f sq (Fin.natAdd (n+1) i)).val=_ + rw [Fin.append_right] + have hF' (i : Fin (n+1)) : SobolevSpace.toLp μ hQ (U (w i)) =ᵐ[μ] F i := by + rw [hUw] + exact hF i + have hz' (i : Fin (n+1)) : U (z i)= + SobolevSpace.product μ hQ (U (w i)) (U (w i)) ‖F i‖₊ ‖F i‖₊ := by + rw [hUz,hUw] + have hq' (i : Fin (n+1)) : IsWeakLaplacian μ hQ (U (w i)) (q i) := by + rw [hUw] + exact hq i + have ht : ∀ᵐ x ∂μ.restrict (ball p (R/2)), + |∑ i : Fin n, localGamma μ hQ (U (w i.castSucc)) (U (w i.castSucc)) x-(n:ℝ)|≤δ x := by + simpa only [hUw] using htrace + have hs : ∀ᵐ x ∂μ.restrict (ball p (R/2)), + |∑ i : Fin n, ∑ j : Fin n, (localGamma μ hQ (U (w i.castSucc)) (U (w j.castSucc)) x)^2-(n:ℝ)|≤δ x := by + simpa only [hUw] using hsquare + have hh := hX.regular_core_frame_defect hn hK p u hR w z F hF' hz' q hq' d A hd hqr δ hδ ht hs + change (∀ᵐ x ∂μ.restrict (ball p (R/2)), δ x≤1 → + |localGamma μ hQ (U (w (Fin.last n))) (U (w (Fin.last n))) x- + ∑ i : Fin n, (localGamma μ hQ (U (w i.castSucc)) (U (w (Fin.last n))) x)^2|≤ + Real.sqrt (6*δ x)*|localGamma μ hQ (U (w (Fin.last n))) (U (w (Fin.last n))) x|) at hh + simpa only [hUw] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFrameGeometry.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFrameGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3df7f4d65790c18ce4fa460119e2f2621e45363 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFrameGeometry.lean @@ -0,0 +1,154 @@ +import OAI.Geometry.RCD.Coordinates.RegularProjectionEnvironment +import OAI.Geometry.RCD.Coordinates.NormalizedCoordinateFrames +import OAI.Geometry.RCD.Coordinates.ExactNormalizationComparison +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits + +namespace OAI + +/-! # Actual dyadic coordinate frames and their neighboring-ball bounds -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- Use the same exact dyadic frames already furnished by the construction. -/ +def frameAt (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) : + Euclidean n ≃L[ℝ] Euclidean n := + Classical.choose (d.localData q hq).2.2.2 i + +theorem frameAt_exact (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) : + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball (d.frameAt q hq i) := + (Classical.choose_spec (d.localData q hq).2.2.2).1 i + +theorem frameAt_splitting (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) : + FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (d.radius / 2 ^ i) zeta + (transformedColumn (hausdorff n X) hX.quadratic d.coordinates (d.frameAt q hq i)) + (fun x => (d.frameAt q hq i).toContinuousLinearMap.adjoint (d.values x)) := + (Classical.choose_spec (d.localData q hq).2.2.2).2.1 i + +theorem frameAt_approximation (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) : + IsPointedApproximation q 0 ((d.radius / 2 ^ i) / 128) 4 zeta + (fun x => ((d.radius / 2 ^ i) / 128)⁻¹ • + ((d.frameAt q hq i).toContinuousLinearMap.adjoint (d.values x) - + (d.frameAt q hq i).toContinuousLinearMap.adjoint (d.values q))) := + (Classical.choose_spec (d.localData q hq).2.2.2).2.2 i + +/-- Every raw mean energy is bounded by the already constructed common +harmonic gradient bound. -/ +theorem mean_upper (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) + (v : Euclidean n) : + ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball v⟫_ℝ ≤ (2 * (n : ℝ)) ^ 2 * ‖v‖ ^ 2 := by + let μ := hausdorff n X + let U := sobolevColumnMap μ hX.quadratic d.coordinates + let r := d.radius / (2 : ℝ) ^ i + have hr : 0 < r := div_pos d.radius_pos (by positivity) + have hrR : r ≤ d.radius := div_le_self d.radius_pos.le (one_le_pow₀ (by norm_num)) + have hsub : ball q r ⊆ ball base (2 * (4 * d.radius)) := by + intro x hx + have ht := dist_triangle x q base + have hxq : dist x q < r := hx + have hqb : dist q base < d.radius / 32 := hq + change dist x base < 2 * (4 * d.radius) + linarith [d.radius_pos] + have hg : ∀ᵐ x ∂μ.restrict (ball q r), + localGamma μ hX.quadratic (U v) (U v) x ≤ (d.energyBound : ℝ) ^ 2 * ‖v‖ ^ 2 := + ae_restrict_of_ae_restrict_of_subset hsub + (LocalHarmonicEnergy.gamma_bound_on_smaller_ball μ hX.quadratic d.energy le_rfl v) + have hfin : μ (ball q r) ≠ ∞ := ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + have hpos : 0 < μ.real (ball q r) := + ENNReal.toReal_pos (ne_of_gt (hX.fullSupport q r hr)) hfin + have hint := integral_mono_ae + (localGamma_memL1 μ hX.quadratic (U v) (U v)).integrableOn + (integrableOn_const hfin) hg + have hm := mul_le_mul_of_nonneg_left hint (inv_nonneg.mpr hpos.le) + have hn := mul_le_mul_of_nonneg_right d.energyBound_sq (sq_nonneg ‖v‖) + change ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ ≤ _ + rw [real_inner_comm, sobolevMeanGram_inner] + calc + _ ≤ (d.energyBound : ℝ) ^ 2 * ‖v‖ ^ 2 := by + simpa only [integral_const, measureReal_restrict_apply_univ, smul_eq_mul, + ← mul_assoc, inv_mul_cancel₀ hpos.ne', one_mul] using hm + _ ≤ _ := by nlinarith only [hn] + +theorem coordinateFrame_lower (q : X) (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (w : Euclidean n) : + ‖w‖ ≤ 2 * (n : ℝ) * ‖coordinateFrame (d.frameAt q hq i) w‖ := + norm_le_coordinateFrame_of_mean_upper (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball (d.frameAt q hq i) + (d.frameAt_exact q hq i) (by positivity) (d.mean_upper q hq i) w + +end RegularBilinearData + +/-- Restricting the actual normalized splitting map to a nearby smaller +ball gives a relative bound with just the Euclidean volume-ratio loss. -/ +theorem regular_subball_mean_comparison {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (i : ℕ) {theta : ℝ} (htheta : 0 < theta) (htheta1 : theta ≤ 1) + (hroom : dist z q + theta * (e.heat.radius / 2 ^ i) ≤ e.heat.radius / 2 ^ i) + (v : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ i + let loss := (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (theta ^ n)⁻¹) * zeta) + (1 - loss) * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q r) measurableSet_ball v⟫_ℝ ≤ + ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball z (theta * r)) measurableSet_ball v⟫_ℝ ∧ + ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball z (theta * r)) measurableSet_ball v⟫_ℝ ≤ + (1 + loss) * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q r) measurableSet_ball v⟫_ℝ := by + intro r loss + let μ := hausdorff n X + have hr : 0 < r := div_pos e.heat.radius_pos (by positivity) + have hrR : r ≤ e.heat.radius := div_le_self e.heat.radius_pos.le (one_le_pow₀ (by norm_num)) + have htr : 0 < theta * r := mul_pos htheta hr + have htrR : theta * r ≤ 2 * e.heat.radius := by + have h := mul_le_mul_of_nonneg_right htheta1 hr.le + linarith [e.heat.radius_pos] + have hsub : ball z (theta * r) ⊆ ball q r := by + intro x hx + have hh := dist_triangle x z q + have hxz : dist x z < theta * r := hx + change dist x q < r + linarith + have hvq := e.volume q hq r hr (by linarith [e.heat.radius_pos]) + have hvz := e.volume z hz (theta * r) htr htrR + have hpos := (quarter_volume_bounds htr (euclideanUnitVolume_pos n) hvz).1 + have hratio : μ.real (ball q r) ≤ ((5 / 3 : ℝ) * (theta ^ n)⁻¹) * μ.real (ball z (theta * r)) := + (div_le_iff₀ hpos).mp (radial_fraction_volume_ratio hr htheta (euclideanUnitVolume_pos n) hvq hvz) + exact exact_normalization_subball_bounds μ hX.quadratic e.heat.coordinates + (e.heat.frameAt q hq i) (e.heat.frameAt_splitting q hq i) (e.heat.frameAt_exact q hq i) + _ measurableSet_ball hsub (ne_of_gt (hX.fullSupport _ _ htr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (ne_of_gt (hX.fullSupport _ _ hr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (by positivity) hzeta hratio v + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1cd59f43d06bd0ac59deb3cd1994cff1a856903 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMass.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchHeatComparison +import OAI.Geometry.RCD.Coordinates.RegularShiftedNormalizationSum + +namespace OAI + +/-! # Small full-mass operators in the constructed frozen heat frames -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The two-step interior shift only increases the inverse metric, so the +actual patch mass remains small in the chosen frozen frame. -/ +theorem regular_patch_mass_frozen_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) + (hroom : dist z q ≤ 32 * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15))) + (xi : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) + ⟪xi, e.heat.pinchingMassMatrix z hz (e.heat.shift + i) xi⟫_ℝ ≤ + (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2 := by + intro r + have hm := regular_patch_mass_small hX e hq hz hzeta hzeta1 hCχ hsmall hnear + (e.heat.shift + i) (by omega) hroom xi + have h := (inverse_increment_isPositive _ _ + (e.heat.heatAt_isPositive q (e.heat.shift + i + 15)) + (e.heat.heatAt_isPositive q (e.heat.shift + i + 15 + 2)) + (e.heat.heatAt_two_step_decrement_positive hq (e.heat.shift + i + 15) (by omega))).inner_nonneg_right xi + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] at h + have hmetric : ⟪xi, (e.heat.heatAt q (e.heat.shift + i + 15)).symm xi⟫_ℝ ≤ + ‖e.heat.frozenAt q i xi‖ ^ 2 := by + rw [e.heat.frozenAt_norm_sq] + rw [show e.heat.shift + i + 15 + 2 = e.heat.shift + i + 17 by omega] at h + linarith only [h] + have hc : 0 ≤ 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) := by + have homega : 0 < euclideanUnitVolume n := euclideanUnitVolume_pos n + dsimp only [pinchingMassUnitFactor, regularSmallMassCoefficient] + positivity + exact hm.trans (mul_le_mul_of_nonneg_left hmetric hc) + +/-- A finite family incurs exactly its overlap multiplicity in the +pointwise mass bound; the full net cardinality never enters it. -/ +theorem regular_patch_mass_sum_frozen_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + {ι : Type*} (s : Finset ι) + (centers : ι → {z : X // z ∈ ball base (e.heat.radius / 32)}) + {N : ℕ} (hcard : s.card ≤ N) (i : ℕ) + (hroom : ∀ y ∈ s, dist (centers y).val q ≤ + 32 * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15))) + (xi : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) + (∑ y ∈ s, ⟪xi, e.heat.pinchingMassMatrix (centers y).val (centers y).property + (e.heat.shift + i) xi⟫_ℝ) ≤ + (N : ℝ) * (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2 := by + intro r + have hc : 0 ≤ (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2 := by + have homega : 0 < euclideanUnitVolume n := euclideanUnitVolume_pos n + dsimp only [pinchingMassUnitFactor, regularSmallMassCoefficient] + positivity + calc + _ ≤ ∑ _y ∈ s, (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2 := + Finset.sum_le_sum (fun y hy => regular_patch_mass_frozen_small hX e hq + (centers y).property hzeta hzeta1 hCχ hsmall hnear i (hroom y hy) xi) + _ = (s.card : ℝ) * ((4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2) := by + rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ (N : ℝ) * ((4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ‖e.heat.frozenAt q i xi‖ ^ 2) := + mul_le_mul_of_nonneg_right (by exact_mod_cast hcard) hc + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMetrics.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMetrics.lean new file mode 100644 index 0000000000000000000000000000000000000000..be1e64477aeebb97d526639b08e677113c5610f5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularFrozenMetrics.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.RCD.Coordinates.InverseMetricFrames +import OAI.Geometry.RCD.Coordinates.RegularHeatNormalization + +namespace OAI + +/-! # Frozen frames constructed from the actual heat metrics -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- The original heat decrement is positive as an operator. -/ +theorem heatAt_decrement_positive {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (hi : d.shift ≤ i) : + ((d.heatAt q i).toContinuousLinearMap - + (d.heatAt q (i + 1)).toContinuousLinearMap).IsPositive := by + apply (ContinuousLinearMap.isPositive_iff _).mpr + refine ⟨(d.heatAt_isPositive q i).isSymmetric.sub + (d.heatAt_isPositive q (i + 1)).isSymmetric, ?_⟩ + intro w + rw [real_inner_comm, sub_apply, inner_sub_right] + exact sub_nonneg.mpr (d.heatOrder q hq i hi w).1 + +/-- The sum of two consecutive positive heat decrements. -/ +theorem heatAt_two_step_decrement_positive {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (hi : d.shift ≤ i) : + ((d.heatAt q i).toContinuousLinearMap - + (d.heatAt q (i + 2)).toContinuousLinearMap).IsPositive := by + have h := (d.heatAt_decrement_positive hq i hi).add + (d.heatAt_decrement_positive hq (i + 1) (by omega)) + have he : (d.heatAt q i).toContinuousLinearMap - (d.heatAt q (i + 2)).toContinuousLinearMap = + ((d.heatAt q i).toContinuousLinearMap - (d.heatAt q (i + 1)).toContinuousLinearMap) + + ((d.heatAt q (i + 1)).toContinuousLinearMap - (d.heatAt q (i + 1 + 1)).toContinuousLinearMap) := by + rw [show i + 1 + 1 = i + 2 by omega] + abel + rw [he] + exact h + +/-- Two successive 9/8 bounds still give a half-small total decrement. -/ +theorem heatAt_two_step_bound {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (hi : d.shift ≤ i) (v : Euclidean n) : + ⟪v, d.heatAt q i v⟫_ℝ ≤ 2 * ⟪v, d.heatAt q (i + 2) v⟫_ℝ := by + have h0 := (d.heatOrder q hq i hi v).2 + have h1 := (d.heatOrder q hq (i + 1) (by omega) v).2 + rw [show i + 1 + 1 = i + 2 by omega] at h1 + have hp := (d.heatAt_isPositive q (i + 2)).inner_nonneg_right v + change 0 ≤ ⟪v, d.heatAt q (i + 2) v⟫_ℝ at hp + change ⟪v, d.heatAt q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, d.heatAt q (i + 1) v⟫_ℝ at h0 + change ⟪v, d.heatAt q (i + 1) v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, d.heatAt q (i + 2) v⟫_ℝ at h1 + linarith + +/-- The two-scale inverse error costs only the corresponding inverse-energy increment. -/ +theorem heatAt_two_step_inverse_error {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (hi : d.shift ≤ i) (xi : Euclidean n) : + let delta := (d.heatAt q (i + 2)).symm xi - (d.heatAt q i).symm xi + ⟪delta, d.heatAt q (i + 2) delta⟫_ℝ ≤ + ⟪xi, (d.heatAt q (i + 2)).symm xi⟫_ℝ - ⟪xi, (d.heatAt q i).symm xi⟫_ℝ := + inverse_difference_energy_le _ _ (d.heatAt_isPositive q i) + (d.heatAt_isPositive q (i + 2)) (d.heatAt_two_step_decrement_positive hq i hi) + (d.heatAt_two_step_bound hq i hi) xi + +/-- Freeze at the heat scale two dyadic steps below the pinching mean radius. -/ +def frozenAt (q : X) (i : ℕ) : Euclidean n ≃L[ℝ] Euclidean n := + inverseMetricFrame (d.heatAt q (d.shift + i + 17)) + (d.heatAt_isPositive q (d.shift + i + 17)) + +@[simp] theorem frozenAt_norm_sq (q : X) (i : ℕ) (v : Euclidean n) : + ‖d.frozenAt q i v‖ ^ 2 = ⟪v, (d.heatAt q (d.shift + i + 17)).symm v⟫_ℝ := + inverseMetricFrame_norm_sq _ _ _ + +/-- The actual heat monotonicity gives monotone frozen norms at every center. -/ +theorem frozenAt_mono {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (v : Euclidean n) : + ‖d.frozenAt q i v‖ ≤ ‖d.frozenAt q (i + 1) v‖ := by + have hp := d.heatAt_isPositive q (d.shift + i + 17) + have hq' := d.heatAt_isPositive q (d.shift + i + 17 + 1) + have hD := d.heatAt_decrement_positive hq (d.shift + i + 17) (by omega) + have h := inverseMetricFrame_mono _ _ hp hq' hD v + simpa only [frozenAt, show d.shift + (i + 1) + 17 = d.shift + i + 17 + 1 by omega] using h + +/-- A single dyadic step changes the frozen norm by at most two. -/ +theorem frozenAt_step {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (v : Euclidean n) : + ‖d.frozenAt q (i + 1) v‖ ≤ 2 * ‖d.frozenAt q i v‖ := by + have h := inverseMetricFrame_step _ _ + (d.heatAt_isPositive q (d.shift + i + 17)) + (d.heatAt_isPositive q (d.shift + i + 17 + 1)) + (fun w => (d.heatOrder q hq (d.shift + i + 17) (by omega) w).2) v + simpa only [frozenAt, show d.shift + (i + 1) + 17 = d.shift + i + 17 + 1 by omega] using h + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..63fd2579848bb06770e7575883b14a8d2a003b92 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSets.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.FullSplittingCoordinates +import OAI.Geometry.RCD.Coordinates.RegularLargeGoodSets + +namespace OAI + +/-! # All-scale coordinates on the actual regular harmonic good sets + +Only the original Huang--Huang product input remains conditional here. +The family and compact good set are constructed from the actual space. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_good_coordinate_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hpublished : LocalAlmostSplittingInput hX) {p : X} (hp : IsRegular n p) + {η ζ : ℝ} (hη : 0 < η) (hζ : 0 < ζ) : + ∃ t s : ℝ, 0 < t ∧ 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) (U : Set X), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) t u v ∧ + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ ζ*(hausdorff n X).real (ball p R) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R/16 → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (v z-v x)) := by + obtain ⟨ε,he,hcoord⟩ := hX.full_splitting_coordinates hn hpublished hη + let t := min ε 1 + have ht : 0 < t := lt_min he zero_lt_one + have htε : t ≤ ε := min_le_left _ _ + obtain ⟨s,hs,hgood⟩ := hX.regular_large_good_sets hn hp ht hζ + let S := min s (min 1 (ε/(|K|+1))) + have hS : 0 < S := lt_min hs (lt_min zero_lt_one (by positivity)) + refine ⟨t,S,ht,hS,?_⟩ + intro R hR hRS + have hRs : R < s := hRS.trans_le (min_le_left _ _) + have hR1 : R ≤ 1 := (hRS.le.trans (min_le_right _ _)).trans (min_le_left _ _) + have hRe : R ≤ ε/(|K|+1) := + (hRS.le.trans (min_le_right _ _)).trans (min_le_right _ _) + have hKR : |K| * R ≤ ε := by + have hh := (le_div_iff₀ (by positivity : 0 < |K|+1)).mp hRe + nlinarith only [hh,hR] + obtain ⟨u,v,U,hsplit,hU,hUsub,hbad,hall⟩ := hgood R hR hRs + refine ⟨u,v,U,hsplit,hU,hUsub,hbad,?_⟩ + intro x hx r hr hrR + have hrR' : r < R := by linarith only [hrR,hR] + have hrsq : r^2 ≤ R := by nlinarith only [hrR',hr,hR1,hR] + have hcurv : -ε ≤ K*r^2 := by + have h1 := mul_le_mul_of_nonneg_left hrsq (abs_nonneg K) + have h2 := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + linarith only [h1,h2,hKR] + exact hcoord x r hr hcurv u v + ((hall x hx (16*r) (by positivity) (by linarith only [hrR])).mono_error _ _ ht.le htε) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSetsBounded.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSetsBounded.lean new file mode 100644 index 0000000000000000000000000000000000000000..4758bed147c1b959f27c042cea7b7504588469b5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodCoordinateSetsBounded.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.RegularGoodCoordinateSets + +namespace OAI + +/-! # Good coordinate sets with a prescribed outer splitting tolerance + +Only the original Huang--Huang product input remains conditional here. +The family and compact good set are constructed from the actual space. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_good_coordinate_sets_bounded {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hpublished : LocalAlmostSplittingInput hX) {p : X} (hp : IsRegular n p) + {η ζ β : ℝ} (hη : 0 < η) (hζ : 0 < ζ) (hβ : 0 < β) : + ∃ t s : ℝ, 0 < t ∧ t ≤ β ∧ 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) (U : Set X), + -t ≤ K*R^2 ∧ + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) t u v ∧ + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ ζ*(hausdorff n X).real (ball p R) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R/16 → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (v z-v x)) := by + obtain ⟨ε,he,hcoord⟩ := hX.full_splitting_coordinates hn hpublished hη + let t := min ε (min β 1) + have ht : 0 < t := lt_min he (lt_min hβ zero_lt_one) + have htε : t ≤ ε := min_le_left _ _ + have htβ : t ≤ β := (min_le_right _ _).trans (min_le_left _ _) + obtain ⟨s,hs,hgood⟩ := hX.regular_large_good_sets hn hp ht hζ + let S := min s (min 1 (t/(|K|+1))) + have hS : 0 < S := lt_min hs (lt_min zero_lt_one (by positivity)) + refine ⟨t,S,ht,htβ,hS,?_⟩ + intro R hR hRS + have hRs : R < s := hRS.trans_le (min_le_left _ _) + have hR1 : R ≤ 1 := (hRS.le.trans (min_le_right _ _)).trans (min_le_left _ _) + have hRe : R ≤ t/(|K|+1) := + (hRS.le.trans (min_le_right _ _)).trans (min_le_right _ _) + have hKR : |K| * R ≤ t := by + have hh := (le_div_iff₀ (by positivity : 0 < |K|+1)).mp hRe + nlinarith only [hh,hR] + have hcurvR : -t ≤ K*R^2 := by + have hsquare : R^2 ≤ R := by nlinarith only [hR1,hR] + have h1 := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + have h2 := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg R) + linarith only [h1,h2,hKR] + obtain ⟨u,v,U,hsplit,hU,hUsub,hbad,hall⟩ := hgood R hR hRs + refine ⟨u,v,U,hcurvR,hsplit,hU,hUsub,hbad,?_⟩ + intro x hx r hr hrR + have hrR' : r < R := by linarith only [hrR,hR] + have hrsq : r^2 ≤ R := by nlinarith only [hrR',hr,hR1,hR] + have hcurv : -ε ≤ K*r^2 := by + have h1 := mul_le_mul_of_nonneg_left hrsq (abs_nonneg K) + have h2 := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + linarith only [h1,h2,hKR,htε] + exact hcoord x r hr hcurv u v + ((hall x hx (16*r) (by positivity) (by linarith only [hrR])).mono_error _ _ ht.le htε) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularGoodSplittingSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodSplittingSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..66954afa2318ea5756c0bc7093259a6e8b01b9b4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularGoodSplittingSets.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Coordinates.GoodSplittingSet +import OAI.Geometry.RCD.Metric.PointedCompactness +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinates +import OAI.Geometry.RCD.Coordinates.MeasuredRescalingFromCoordinates +import OAI.Geometry.RCD.Coordinates.InitialHarmonicCoordinates +import OAI.Geometry.RCD.Coordinates.InitialSplittingConstruction + +namespace OAI + +/-! # Actual harmonic good sets at every sufficiently small regular scale -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_good_splitting_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {p : X} (hp : IsRegular n p) {ε t : ℝ} (hε : 0 < ε) (ht : 0 < t) (hεt : ε ≤ t) : + ∃ s : ℝ, 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) (U : Set X), + -1 ≤ K*(5*R)^2 ∧ + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) ε u v ∧ + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ + (fiveBallConstant n/t)*((n:ℝ)^2*ε*(hausdorff n X).real (ball p (2*R))) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + FirstOrderSplittingOn (hausdorff n X) hX.quadratic x r t u v := by + obtain ⟨s,hs,hinit⟩ := regular_initial_splitting_at_all_small_scales hX hn + (hX.pointedRescalingPrecompactness hn p) hp + (hX.measuredCoordinateInput.euclideanMeasuredRescalingConvergence hn p) + hX.initialSplittingInput hε + refine ⟨min s (min 1 (1/(25*(|K|+1)))),lt_min hs (lt_min zero_lt_one (by positivity)),?_⟩ + intro R hR hRs + have hRs' : R < s := hRs.trans_le (min_le_left _ _) + have hR1 : R ≤ 1 := (hRs.le.trans (min_le_right _ _)).trans (min_le_left _ _) + have hRK : R ≤ 1/(25*(|K|+1)) := + (hRs.le.trans (min_le_right _ _)).trans (min_le_right _ _) + have hm := (le_div_iff₀ (by positivity : 0 < 25*(|K|+1))).mp hRK + have hsquare : R^2 ≤ R := by nlinarith + have habs : |K| * (5*R)^2 ≤ 1 := by + have hh := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + nlinarith + have hcurv : -1 ≤ K*(5*R)^2 := by + have hh := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (5*R)) + linarith + obtain ⟨u,v,huv⟩ := hinit R hR hRs' + obtain ⟨U,hU,hUsub,hbad,hgood⟩ := hX.good_splitting_set hn p hR hcurv hε.le ht hεt huv + exact ⟨u,v,U,hcurv,huv,hU,hUsub,hbad,hgood⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularGramEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularGramEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..350c26eff520d8db7350f9f5d3f4bf90bf87e4e7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularGramEnergy.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.RCD.Sobolev.ScalarBochnerConstruction +import OAI.Geometry.RCD.Coordinates.RegularCoreGradientProduct +import OAI.Geometry.RCD.Sobolev.DenseCoreGradientBound +import OAI.Geometry.RCD.Metric.ShiftedRadonSum + +namespace OAI + +/-! # Local energy of a harmonic/regular gradient pairing from full Bochner masses -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_gram_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hK : K ≤ 0) + (f a : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (p : X) {R t : ℝ} (ht : 0 < t) (htR : t < R) + (df da : SobolevSpace (hausdorff n X) hX.quadratic) + (qf qa : Lp ℝ 2 (hausdorff n X)) + (hqf : IsWeakLaplacian (hausdorff n X) hX.quadratic f.val qf) + (hqa : IsWeakLaplacian (hausdorff n X) hX.quadratic a.val qa) + (A B : ℝ≥0) + (hdf : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic df x|≤A) + (hda : ∀ᵐ x ∂hausdorff n X, |SobolevSpace.toLp (hausdorff n X) hX.quadratic da x|≤B) + (hsf : qf =ᵐ[(hausdorff n X).restrict (ball p R)] SobolevSpace.toLp (hausdorff n X) hX.quadratic df) + (hsa : qa =ᵐ[(hausdorff n X).restrict (ball p R)] SobolevSpace.toLp (hausdorff n X) hX.quadratic da) + (hc : SobolevSpace.toLp (hausdorff n X) hX.quadratic df + =ᵐ[(hausdorff n X).restrict (ball p R)] fun _ => 0) + {J : ℝ} (hJK : J ≤ K) + (F₀ A₀ G : SobolevSpace (hausdorff n X) hX.quadratic) + (σ τ : Measure X) [IsFiniteMeasure σ] [IsFiniteMeasure τ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val f.val) + (hA₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic A₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic a.val a.val) + (hG : SobolevSpace.toLp (hausdorff n X) hX.quadratic G + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val a.val) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J f.val f.val df df σ.toSignedMeasure)) + (hτ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) A₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J a.val a.val da da τ.toSignedMeasure)) + (Cf Ca : ℝ≥0) + (hCf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic f.val f.val x ≤ (Cf:ℝ)^2) + (hCa : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), + localGamma (hausdorff n X) hX.quadratic a.val a.val x ≤ (Ca:ℝ)^2) : + (∫ x in ball p t, localGamma (hausdorff n X) hX.quadratic G G x ∂hausdorff n X) ≤ + 2*(Ca:ℝ)^2*σ.real (ball p t)+2*(Cf:ℝ)^2*τ.real (ball p t) := by + have hscalar := hX.scalarBochner_nonpositive K n hn hK p + let μ := hausdorff n X + let Q := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let : IsFiniteMeasure (μ.restrict (ball p t)) := ⟨by + simpa only [Measure.restrict_apply_univ] using hX.finiteOnBounded (ball p t) isBounded_ball⟩ + let D x := 2*(Ca:ℝ)^2*(σ.rnDeriv μ x).toReal+2*(Cf:ℝ)^2*(τ.rnDeriv μ x).toReal + have hmass := integral_shifted_radon_sum_le μ σ τ (ball p t) 0 (2*(Ca:ℝ)^2) (2*(Cf:ℝ)^2) + (by positivity) (by positivity) + simp only [sub_zero,zero_mul] at hmass + have hD : Integrable D (μ.restrict (ball p t)) := hmass.1 + have hD0 : ∀ᵐ x ∂μ.restrict (ball p t), 0 ≤ D x := + Eventually.of_forall fun x => add_nonneg (mul_nonneg (by positivity) ENNReal.toReal_nonneg) + (mul_nonneg (by positivity) ENNReal.toReal_nonneg) + obtain ⟨χ,hχ,hχ1⟩ := hX.exists_open_regular_cutoff hn isOpen_ball + (isCompact_closedBall p t) (closedBall_subset_ball htR) + let V := SobolevSpace.cutoffCLM μ Q χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) G + have hVmem : V∈SobolevSpace.dirichlet μ Q (ball p R) := + SobolevSpace.cutoffCLM_mem_dirichlet μ Q χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) hχ G + have hV : SobolevSpace.toLp μ Q V =ᵐ[μ.restrict (ball p t)] SobolevSpace.toLp μ Q G := by + apply (ae_restrict_iff' measurableSet_ball).mpr + filter_upwards [SobolevSpace.cutoffCLM_coe μ Q χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) G] with x hx hxt + change SobolevSpace.toLp μ Q (SobolevSpace.cutoffCLM μ Q χ.lipschitz χ.compact χ.abs_le + (fun x => (χ.bounds x).1) G) x = _ + rw [hx,hχ1 x (ball_subset_closedBall hxt),one_mul] + have htest (g : compactLaplacianCore μ Q (ball p R)) : + ∀ᵐ x ∂μ.restrict (ball p t), (localGamma μ Q G g.val x)^2≤D x*localGamma μ Q g.val g.val x := by + have hgu : g.val∈compactLaplacianCore μ Q univ := by + obtain ⟨⟨v,L,hv,hvc,_hvs,hvr⟩,hql⟩ := g.property + exact ⟨⟨v,L,hv,hvc,subset_univ _,hvr⟩,hql⟩ + have hb := hX.regular_core_gradient_product_test hn hscalar f a ⟨g.val,hgu⟩ p + (ht.trans htR) df da qf qa hqf hqa A B hdf hda hsf hsa 0 hc hJK F₀ A₀ G σ τ hF₀ hA₀ hG hσ hτ 0 + simp only [zero_smul,sub_zero,mul_zero,zero_pow (by decide : (2:ℕ)≠0)] at hb + filter_upwards [ae_restrict_of_ae_restrict_of_subset (ball_subset_ball htR.le) hb,hCf,hCa, + ae_restrict_of_ae (localGamma_self μ Q g.val)] with x hb hf ha hg + have hnn : 0 ≤ localGamma μ Q g.val g.val x := by rw [hg]; positivity + apply hb.trans + apply mul_le_mul_of_nonneg_right _ hnn + dsimp only [D] + exact add_le_add + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left ha (by norm_num : (0:ℝ)≤2)) ENNReal.toReal_nonneg) + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hf (by norm_num : (0:ℝ)≤2)) ENNReal.toReal_nonneg) + exact (hX.gradient_integral_le_of_core_tests hn isOpen_ball measurableSet_ball G D hD hD0 htest + ⟨V,hVmem⟩ hV).trans hmass.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularHeatCutoff.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b50e73990df937477e0da5e745a27e659b9e0f6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatCutoff.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.GaussianVolumeTail +import OAI.Geometry.RCD.Metric.VolumeRegime + +namespace OAI + +/-! +# Uniformly negligible cutoff heat errors near a regular point + +The volume lower bound needed for the Gaussian tail estimate is supplied +by the already proved regular-point volume neighborhood, rather than by +an additional analytic assumption. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {k : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ k) + +include hk in +/-- At a regular point a single volume neighborhood gives uniform +small-time cutoff-error estimates for every smaller supported cutoff. -/ +theorem regular_uniform_heat_cutoff_errors + (m : ℕ) {a ω R : ℝ} {p : X} (ha : 0 ≤ a) (hω : 0 < ω) (hR : 0 < R) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (hvolume : EuclideanRescalingVolumeConvergence μ (m + 1) p ω) + (hBG : BallVolumeComparison μ (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper μ (comparisonModelVolume m a) y ω) + (hfinite : ∀ y r, μ (ball y r) ≠ ∞) (hg : HasCoordinateHeatBounds μ k) : + ∃ D : ℝ, 0 < D ∧ D ≤ R ∧ ∀ ρ, 0 < ρ → 2 * ρ ≤ D → + ∀ C (χ : GoodLaplacianCutoff μ hQ p ρ C) (g : SobolevSpace μ hQ), + ∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧ + ∀ t, 0 < t → t < δ → ∀ x ∈ ball p (ρ / 2), + |∫ z, k t x z * cutoffSourceDensity μ hQ g χ.sobolev χ.laplacian z ∂μ| < ε := by + obtain ⟨D, hD, hDR, hvol⟩ := exists_uniform_volume_neighborhood m ha hω + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num : (1 / 2 : ℝ) ≤ 1) hR + hcompact hregular hvolume hBG hdensity hfinite + refine ⟨D, hD, hDR, ?_⟩ + intro ρ hρ hρD C χ g ε hε + apply GoodLaplacianCutoff.heat_error_uniformly_small μ k hQ hk hg χ hρ hD + (half_pos hω) (m + 1) _ g hε + intro y _hy hy s hs hsD + have hpy : dist p y ≤ D := hy.trans hρD + have hv := hvol y hpy s hs hsD + have hden : 0 < ω * s ^ (m + 1) := mul_pos hω (pow_pos hs _) + have hlo : (1 / 2 : ℝ) ≤ μ.real (ball y s) / (ω * s ^ (m + 1)) := by + linarith [(abs_le.mp hv).1] + have hmul := (le_div_iff₀ hden).mp hlo + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularHeatFrameGeometry.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatFrameGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..60f74517279988aa67c7d61d12f2680abc40d478 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatFrameGeometry.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchCumulative + +namespace OAI + +/-! # Coordinate separation measured in the actual frozen heat frames -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- An exact coordinate frame realizes the quadratic inverse mean. -/ +theorem coordinateFrame_norm_sq (q : X) (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (v : Euclidean n) : + ‖coordinateFrame (d.frameAt q hq i) v‖ ^ 2 = ⟪v, (d.meanAt q hq i).symm v⟫_ℝ := by + change ‖(d.frameAt q hq i).toContinuousLinearMap.adjoint v‖ ^ 2 = + ⟪v, (meanGramEquiv (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball (d.frameAt q hq i) + (d.frameAt_exact q hq i)).symm v⟫_ℝ + rw [meanGramEquiv_symm_apply] + change ‖(d.frameAt q hq i).toContinuousLinearMap.adjoint v‖ ^ 2 = + ⟪v, (d.frameAt q hq i).toContinuousLinearMap ((d.frameAt q hq i).toContinuousLinearMap.adjoint v)⟫_ℝ + rw [← ContinuousLinearMap.adjoint_inner_left, real_inner_self_eq_norm_sq] + +/-- Heat and mean frames at the same radius are uniformly comparable. -/ +theorem mean_heat_frame_comparison (q : X) (hq : q ∈ ball base (d.radius / 32)) + (i : ℕ) (hi : d.shift ≤ i) (v : Euclidean n) : + ‖coordinateFrame (d.frameAt q hq i) v‖ ≤ + (3 / 2 : ℝ) * ‖inverseMetricFrame (d.heatAt q i) (d.heatAt_isPositive q i) v‖ ∧ + ‖inverseMetricFrame (d.heatAt q i) (d.heatAt_isPositive q i) v‖ ≤ + (3 / 2 : ℝ) * ‖coordinateFrame (d.frameAt q hq i) v‖ := by + let Q := d.heatAt q i + let G := d.meanAt q hq i + have hc (w : Euclidean n) : + (1 / 2 : ℝ) * ⟪w, Q w⟫_ℝ ≤ ⟪w, G w⟫_ℝ ∧ + (1 / 2 : ℝ) * ⟪w, G w⟫_ℝ ≤ ⟪w, Q w⟫_ℝ := by + have h := d.heatMeanComparison q hq i hi w + have hp := (d.meanAt_isPositive q hq i).inner_nonneg_right w + change 0 ≤ ⟪w, G w⟫_ℝ at hp + change (1 - 1 / 64 : ℝ) * ⟪w, G.toContinuousLinearMap w⟫_ℝ ≤ ⟪w, Q w⟫_ℝ ∧ + ⟪w, Q w⟫_ℝ ≤ (1 + 1 / 64 : ℝ) * ⟪w, G.toContinuousLinearMap w⟫_ℝ at h + simp only [ContinuousLinearEquiv.coe_coe] at h + constructor <;> nlinarith [h.1, h.2] + have h0 := (relative_inverse_bounds Q G (d.heatAt_isPositive q i) + (d.meanAt_isPositive q hq i) (by norm_num : (0 : ℝ) < 1 / 2) (fun w => (hc w).1) v).1 + have h1 := (relative_inverse_bounds G Q (d.meanAt_isPositive q hq i) + (d.heatAt_isPositive q i) (by norm_num : (0 : ℝ) < 1 / 2) (fun w => (hc w).2) v).1 + rw [← d.coordinateFrame_norm_sq q hq i v] at h0 h1 + rw [← inverseMetricFrame_norm_sq Q (d.heatAt_isPositive q i) v] at h0 h1 + constructor <;> nlinarith [norm_nonneg (coordinateFrame (d.frameAt q hq i) v), + norm_nonneg (inverseMetricFrame Q (d.heatAt_isPositive q i) v)] + +/-- Monotonicity holds between any two sufficiently late heat scales. -/ +theorem heat_frame_mono_indices {q : X} (hq : q ∈ ball base (d.radius / 32)) + {i j : ℕ} (hi : d.shift ≤ i) (hij : i ≤ j) (v : Euclidean n) : + ‖inverseMetricFrame (d.heatAt q i) (d.heatAt_isPositive q i) v‖ ≤ + ‖inverseMetricFrame (d.heatAt q j) (d.heatAt_isPositive q j) v‖ := by + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hij + clear hij + induction k with + | zero => simp + | succ k ih => + have hstep := inverseMetricFrame_mono (d.heatAt q (i + k)) (d.heatAt q (i + k + 1)) + (d.heatAt_isPositive q (i + k)) (d.heatAt_isPositive q (i + k + 1)) + (d.heatAt_decrement_positive hq (i + k) (by omega)) v + exact ih.trans hstep + +/-- A coarser exact harmonic frame is bounded by the actual fine frozen +heat frame. This supplies the global separation bound for patch supports. -/ +theorem coarse_frame_le_frozen {q : X} (hq : q ∈ ball base (d.radius / 32)) + (i j : ℕ) (hj : d.shift ≤ j) (hji : j ≤ d.shift + i + 17) (v : Euclidean n) : + ‖coordinateFrame (d.frameAt q hq j) v‖ ≤ 2 * ‖d.frozenAt q i v‖ := by + have h := (d.mean_heat_frame_comparison q hq j hj v).1.trans + (mul_le_mul_of_nonneg_left (d.heat_frame_mono_indices hq hj hji v) (by norm_num : (0 : ℝ) ≤ 3 / 2)) + change ‖coordinateFrame (d.frameAt q hq j) v‖ ≤ 2 * + ‖inverseMetricFrame (d.heatAt q (d.shift + i + 17)) (d.heatAt_isPositive q _) v‖ + linarith [norm_nonneg (inverseMetricFrame (d.heatAt q (d.shift + i + 17)) (d.heatAt_isPositive q _) v)] + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularHeatNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..32ef3b88981e6be3c180cba10e63ea9da95fe1ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularHeatNormalization.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.RCD.Coordinates.RegularMassMatrices +import OAI.Geometry.RCD.Coordinates.RegularFrameGeometry +import OAI.Geometry.RCD.Coordinates.NormalizationCumulative + +namespace OAI + +/-! # Changing actual mean frames in the cumulative heat estimates -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- The same positive heat Gram used in the neighborhood construction. -/ +def heatAt (q : X) (i : ℕ) : Euclidean n ≃L[ℝ] Euclidean n := + dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + d.cutoff q d.radius_pos d.lambda_pos i + +theorem heatAt_isPositive (q : X) (i : ℕ) : (d.heatAt q i).toContinuousLinearMap.IsPositive := + dyadicHeatGramAt_isPositive (hausdorff n X) hX.quadratic hk _ d.cutoff q d.radius_pos d.lambda_pos i + +end RegularBilinearData + +/-- A nearby mean dominates one quarter of the central heat metric. +Both means are compared inside a single larger normalized ball. -/ +theorem regular_nearby_mean_heat_lower {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 1) + (hroom : dist z q ≤ e.heat.radius / (2 : ℝ) ^ (i + 1)) (v : Euclidean n) : + (1 / 4 : ℝ) * ⟪v, e.heat.heatAt q (i + 1) v⟫_ℝ ≤ + ⟪v, e.heat.meanAt z hz (i + 1) v⟫_ℝ := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ i := div_pos e.heat.radius_pos (by positivity) + have heq : (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) = + e.heat.radius / (2 : ℝ) ^ (i + 1) := by rw [pow_succ]; ring + have hqroom : dist q q + (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) ≤ + e.heat.radius / (2 : ℝ) ^ i := by rw [dist_self]; linarith + have hzroom : dist z q + (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) ≤ + e.heat.radius / (2 : ℝ) ^ i := by rw [heq]; rw [← heq] at hroom; linarith + have hbq := (regular_subball_mean_comparison hX e hq hq hzeta i + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num) hqroom v).2 + have hbz := (regular_subball_mean_comparison hX e hq hz hzeta i + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num) hzroom v).1 + rw [heq] at hbq hbz + have hheat := (e.heat.heatMeanComparison q hq (i + 1) hi v).2 + have hnonneg := (sobolevMeanGram_isPositive (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q (e.heat.radius / (2 : ℝ) ^ i)) measurableSet_ball).inner_nonneg_right v + have hmul := mul_le_mul_of_nonneg_right hsmall hnonneg + change (1 / 4 : ℝ) * ⟪v, e.heat.heatAt q (i + 1) v⟫_ℝ ≤ + ⟪v, (e.heat.meanAt z hz (i + 1)).toContinuousLinearMap v⟫_ℝ + rw [e.heat.meanAt_toContinuousLinearMap] + change (1 / 4 : ℝ) * ⟪v, dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + e.heat.cutoff q e.heat.radius_pos e.heat.lambda_pos (i + 1) v⟫_ℝ ≤ _ + nlinarith + +/-- The actual inverse-frame discrepancy has the weighted envelope bound +needed for summing over patch centers. -/ +theorem regular_inverse_mean_heat_error {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 1) + (hroom : dist z q ≤ e.heat.radius / (2 : ℝ) ^ (i + 1)) + (henlargement : dist q z ≤ enlargement * (e.heat.radius / (2 : ℝ) ^ (i + 1))) + (xi : Euclidean n) : + let Q := e.heat.heatAt q (i + 1) + let R := e.heat.meanAt z hz (i + 1) + let F := dyadicBochnerEnvelope e.heat.mass n q e.heat.radius (i + 1) + ⟪R.symm xi - Q.symm xi, Q (R.symm xi - Q.symm xi)⟫_ℝ ≤ + 16 * e.heat.comparisonConstant * ⟪Q.symm xi, F (Q.symm xi)⟫_ℝ := by + intro Q R F + have hbilinear (u v : Euclidean n) : + ⟪v, (R.toContinuousLinearMap - Q.toContinuousLinearMap) u⟫_ℝ ^ 2 ≤ + (e.heat.comparisonConstant * ⟪u, F u⟫_ℝ) * ⟪v, Q v⟫_ℝ := by + have h := (e.heat.localData q hq).2.1 (i + 1) hi z henlargement v u + dsimp only [R, Q, F, RegularBilinearData.heatAt] + rw [e.heat.meanAt_toContinuousLinearMap] + convert h using 1 + ring + have h := inverse_normalization_error_le Q R (e.heat.heatAt_isPositive q (i + 1)) + (e.heat.meanAt_isPositive z hz (i + 1)) F + (dyadicBochnerEnvelope_isPositive e.heat.mass n q e.heat.radius_pos.le (i + 1)) + (by norm_num : (0 : ℝ) < 1 / 4) e.heat.comparisonConstant_pos.le + (regular_nearby_mean_heat_lower hX e hq hz hzeta hsmall i hi hroom) hbilinear xi + norm_num at h ⊢ + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularHessianCore.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularHessianCore.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a452795ecc2d2731189b585928c8a2c52ef13f9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularHessianCore.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Sobolev.CompactPoissonHessian +import OAI.Geometry.RCD.Sobolev.PoissonHessianIdentity + +namespace OAI + +/-! # Replacing the local Hessian core without changing its functional -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- For compact Poisson functions, the actual dense regular core can be +installed while preserving the given Hessian functional and mixed Gram +representative. This makes bounds independent of a prior core choice. -/ +theorem NoncollapsedRCD.hessian_pairing_regular_core {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (p : X) + {Ω : Set X} (hΩ : IsOpen Ω) + (f a : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (c d : ℝ) + (hf : IsConstantLaplacianOn (hausdorff n X) hX.quadratic Ω f.val c) + (ha : IsConstantLaplacianOn (hausdorff n X) hX.quadratic Ω a.val d) + (G : LocalHessianPairing (hausdorff n X) hX.quadratic Ω f.val a.val) : + ∃ H : LocalHessianPairing (hausdorff n X) hX.quadratic Ω f.val a.val, + H.core=regularDirichletCore (hausdorff n X) hX.quadratic Ω ∧ + H.mixed=G.mixed ∧ H.hessian=G.hessian := by + let μ := hausdorff n X + let hQ := hX.quadratic + obtain ⟨v,L,hv,hvc,-,hfr⟩ := f.property.1 + obtain ⟨w,M,hw,hwc,-,har⟩ := a.property.1 + obtain ⟨df,hdf⟩ := f.property.2 + obtain ⟨da,hda⟩ := a.property.2 + choose γf hγf using hX.compact_test_gradient hn p hΩ f.val hv hvc hfr df hdf + choose γa hγa using hX.compact_test_gradient hn p hΩ a.val hw hwc har da hda + refine ⟨{ G with + core := regularDirichletCore μ hQ Ω + core_dense := hX.regularDirichletCore_dense hn hΩ + gammaF := γf + gammaA := γa + gammaF_rep := hγf + gammaA_rep := hγa + koszul := ?_ },rfl,rfl,rfl⟩ + intro φ + have hif : (∫ x in Ω, SobolevSpace.toLp μ hQ (γf φ).val x ∂μ)= + energyForm μ hQ f.val φ.val.val := by + rw [integral_congr_ae (ae_restrict_of_ae (hγf φ))] + exact integral_localGamma_dirichlet μ hQ Ω hΩ.measurableSet f.val φ.val + have hia : (∫ x in Ω, SobolevSpace.toLp μ hQ (γa φ).val x ∂μ)= + energyForm μ hQ a.val φ.val.val := by + rw [integral_congr_ae (ae_restrict_of_ae (hγa φ))] + exact integral_localGamma_dirichlet μ hQ Ω hΩ.measurableSet a.val φ.val + have he : energyForm μ hQ a.val (γf φ).val=energyForm μ hQ f.val (γa φ).val := by + rw [ha _ (γf φ).property,hf _ (γa φ).property,hif,hia, + hf _ φ.val.property,ha _ φ.val.property] + ring + have hG := G.constant_source_identity μ hQ hΩ.measurableSet hf ha φ.val + rw [he,energyForm_comm μ hQ φ.val.val G.mixed] + linarith only [hG] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularImageGoodSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularImageGoodSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2a52ec79b0ab0d3f5f8a93561663a8b1328b410 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularImageGoodSets.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.RegularBoundedCoarseFineSets +import OAI.Geometry.RCD.Coordinates.CoarseFineCoordinateDistance +import OAI.Geometry.RCD.Coordinates.SplittingCoordinateLipschitz + +namespace OAI + +/-! # One harmonic good set retains the data for the image-volume argument -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_image_good_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hpublished : LocalAlmostSplittingInput hX) {p : X} (hp : IsRegular n p) + {η ζ : ℝ} (hη : 0 < η) (hζ : 0 < ζ) : + ∃ s : ℝ, 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (v : X → Euclidean n) (U : Set X), + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ ζ*(hausdorff n X).real (ball p (16*R)) ∧ + LipschitzOnWith ⟨1+32*η,by positivity⟩ v U ∧ + LipschitzOnWith ⟨2*(n:ℝ),by positivity⟩ v (ball p (4*R)) ∧ + IsPointedApproximation p 0 (2*R) (1/2) (η/4) + (fun x => (2*R)⁻¹ • (v x-v p)) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (v z-v x)) := by + obtain ⟨t,s,ht,ht1,hs,hsets⟩ := hX.regular_bounded_coarse_fine_sets hn hpublished hp hη hζ + refine ⟨s/16,by positivity,?_⟩ + intro R hR hRs + obtain ⟨u,v,V,hsplit,hV,hVsub,hbad,hcoarse,hfine⟩ := hsets (16*R) (by positivity) + (by linarith only [hRs]) + let U := V ∩ closedBall p R + have hU : IsCompact U := hV.inter_right isClosed_closedBall + have hUsub : U ⊆ closedBall p R := inter_subset_right + have hc : IsPointedApproximation p 0 (2*R) (1/2) (η/4) + (fun x => (2*R)⁻¹ • (v x-v p)) := by + simpa only [show 16*R/8=2*R by ring] using hcoarse + have hf : ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation x 0 r (1/16) η (fun z => r⁻¹ • (v z-v x)) := by + intro x hx r hr hrR + exact hfine x hx.1 r hr (by linarith only [hrR]) + have hd := coarse_fine_coordinate_distance (by positivity : 0 < 2*R) hη.le + (show (η/4)*(2*R) ≤ η*R by nlinarith only [hη,hR]) + (fun x hx => by have hh := hUsub hx; change dist x p ≤ R at hh; linarith only [hh]) hc hf + have hglobal := hX.splitting_coordinate_lipschitz hn (by positivity : 0 < 4*R) ht.le + (by simpa only [show 8*(4*R)=2*(16*R) by ring] using hsplit) + refine ⟨v,U,hU,hUsub,?_,LipschitzOnWith.of_dist_le_mul (fun x hx y hy => (hd x hx y hy).2), + ?_,hc,hf⟩ + · have hsub : ball p R \ U ⊆ ball p (16*R) \ V := by + intro x hx + refine ⟨ball_subset_ball (by linarith only [hR]) hx.1,?_⟩ + intro hxV + exact hx.2 ⟨hxV,ball_subset_closedBall hx.1⟩ + exact (measureReal_mono hsub (measure_ne_top_of_subset sdiff_subset + (hX.finiteOnBounded _ isBounded_ball).ne)).trans hbad + · apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + apply (hglobal.dist_le_mul x hx y hy).trans + apply mul_le_mul_of_nonneg_right _ dist_nonneg + change (n:ℝ)*(1+t) ≤ 2*n + nlinarith [Nat.cast_nonneg (α := ℝ) n] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularImageMassEstimate.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularImageMassEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..aedd6f91d17047b5e10be1728a2a96a58ff4e069 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularImageMassEstimate.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Coordinates.RegularImageGoodSets +import OAI.Geometry.RCD.Metric.CoarseFineSourceMass +import OAI.Geometry.RCD.Metric.GoodSetInteriorPoint + +namespace OAI + +/-! # Quantitative absolute mass supplied by the actual harmonic good sets -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +def imageMassErrorConstant (n : ℕ) : ℝ := + (2*5^n)*((8*(n:ℝ))^n*(Real.cosh 1^(n-1)*2^n)*16^n) + +theorem NoncollapsedRCD.regular_image_mass_estimate {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (hpublished : LocalAlmostSplittingInput hX) {p : X} (hp : IsRegular n p) + {η ζ : ℝ} (hη : 0 < η) (hηsmall : η ≤ 1/8192) (hζ : 0 < ζ) + (hζsmall : ζ*((Real.cosh 1^(n-1)*2^n)*(16*16384)^n) < 1) : + ∃ s : ℝ, 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → -1 ≤ K*(32*R)^2 → + volume.real (ball (0 : Euclidean n) (R/4096)) - + volume.real (ball (0 : Euclidean n) 1)*imageMassErrorConstant n*ζ*R^n ≤ + (1+32*η)^n*(hausdorff n X).real (ball p (R/4096+(2*R)*(η/4))) := by + obtain ⟨s,hs,hsets⟩ := hX.regular_image_good_sets hn hpublished hp hη hζ + refine ⟨s,hs,?_⟩ + intro R hR hRs hcurv + obtain ⟨v,U,hU,hUsub,hbad,hgood,hglobal,hcoarse,hfine⟩ := hsets R hR hRs + have hpoint := hX.good_set_inner_point hn hR hζ.le hζsmall hcurv hbad + have hf : ∀ z ∈ U, ∀ r : ℝ, 0 < r → r < R → + IsPointedApproximation z 0 r (1/16) (1/128) (fun x => r⁻¹ • (v x-v z)) := by + intro z hz r hr hrR + exact (hfine z hz r hr hrR).mono_error (by linarith only [hηsmall]) + have hh := hX.coarse_fine_source_mass hn (hX.regular_euclidean_hausdorff hn hp) + (ρ := R/4096) (C := ⟨2*(n:ℝ),by positivity⟩) (L := ⟨1+32*η,by positivity⟩) + hR (by positivity) (by linarith only [hR]) + (by change (1:ℝ)≤2*n + have hn0 : (2:ℝ)≤n := by exact_mod_cast hn + linarith only [hn0]) + hcurv (by nlinarith only [hηsmall,hR]) hU hUsub hgood hglobal hcoarse hf + (by simpa only [show R/4096/4=R/16384 by ring] using hpoint) + let M := (hausdorff n X).real (ball p (16*R)) + have hM : 0 < M := ENNReal.toReal_pos + (hX.fullSupport p _ (by positivity)).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hE : (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)* + (hausdorff n X).real (ball p R \ U)) ≤ + volume.real (ball (0 : Euclidean n) 1)*imageMassErrorConstant n*ζ*R^n := by + calc + _ ≤ (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)*(ζ*M)) := by + gcongr + _ = _ := by + dsimp only [imageMassErrorConstant] + rw [show (8:ℝ)=4*2 by norm_num] + simp only [mul_pow] + field_simp [hM.ne'] + change volume.real (ball (0 : Euclidean n) (R/4096)) - + (2*5^n*volume.real (ball (0 : Euclidean n) 1))* + (((4*(2*(n:ℝ)))^n*(Real.cosh 1^(n-1)*2^n)*(16*R)^n/M)* + (hausdorff n X).real (ball p R \ U)) ≤ + (1+32*η)^n*(hausdorff n X).real (ball p (R/4096+(2*R)*(η/4))) at hh + linarith only [hh,hE] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularInitialChart.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularInitialChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d6622f24af3e5bff894b4d3c2bf474cdae40e08 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularInitialChart.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Coordinates.RegularOpenCoordinates + +namespace OAI + +/-! # The actual harmonic coordinates give an initial open chart -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The metric error in normalized coordinates, returned to physical units. -/ +theorem normalized_pair_error {X E : Type*} [MetricSpace X] + [NormedAddCommGroup E] [NormedSpace ℝ E] + (f : X → E) (N : E ≃L[ℝ] E) {x z : X} {r epsilon : ℝ} (hr : 0 < r) + (hg : IsPointedApproximation x 0 r 4 epsilon + (fun y => r⁻¹ • N (f y - f x))) (hz : dist z x ≤ 4 * r) : + |‖N (f z - f x)‖ - dist x z| ≤ epsilon * r := by + have h := hg.2.1 z x hz (by simp only [dist_self]; positivity) + have hzero : r⁻¹ • N (f x - f x) = (0 : E) := by simp + dsimp only at h + rw [hzero, dist_zero_right, norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos hr] at h + have he : r⁻¹ * ‖N (f z - f x)‖ - dist z x / r = + (‖N (f z - f x)‖ - dist z x) / r := by ring + rw [he, abs_div, abs_of_pos hr] at h + simpa only [dist_comm x z] using (div_le_iff₀ hr).mp h + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The existing harmonic map is a homeomorphism onto an open image on a +fixed smaller neighborhood. Exact preimages come from the quarter-scale +correction construction. -/ +theorem regular_initial_chart {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzetaSmall : zeta ≤ 1 / 2048) + (hgramSmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4) : + let Ω := ball base (e.heat.radius / 1024) + IsOpen (Set.range (fun x : Ω => e.heat.values x)) ∧ + ∃ chart : Ω ≃ₜ Set.range (fun x : Ω => e.heat.values x), + ∀ x, (chart x).val = e.heat.values x := by + intro Ω + let d := regular_open_coordinate_data hX e hzeta hzetaSmall hgramSmall + have hr : 0 < e.heat.radius / 128 := div_pos e.heat.radius_pos (by norm_num) + have hcont : ContinuousOn e.heat.values Ω := e.heat.splitting.continuous.mono (by + intro x hx + apply ball_subset_ball _ hx + linarith [e.heat.radius_pos]) + apply open_homeomorph_of_normalized_separation d hr (by positivity) isOpen_ball hcont + intro x hx z hz hne + have hx' : x ∈ ball base (e.heat.radius / 32) := + ball_subset_ball (by linarith [e.heat.radius_pos]) hx + have ht : 0 < dist x z := dist_pos.mpr hne + have hdiam : dist x z ≤ e.heat.radius / 128 := by + have hxv : dist x base < e.heat.radius / 1024 := hx + have hzv : dist z base < e.heat.radius / 1024 := hz + have hh := dist_triangle x base z + rw [dist_comm base z] at hh + linarith [e.heat.radius_pos] + obtain ⟨i, hi, hi'⟩ := exists_nat_pow_near_of_lt_one + (div_pos ht hr) ((div_le_one hr).mpr hdiam) + (by norm_num : (0 : ℝ) < 1 / 4) (by norm_num : (1 / 4 : ℝ) < 1) + let r := coordinateQuarterRadius (e.heat.radius / 128) i + have hr' : 0 < r := mul_pos hr (pow_pos (by norm_num) i) + have htr : dist x z ≤ r := by + simpa only [r, coordinateQuarterRadius, mul_comm] using (div_le_iff₀ hr).mp hi' + have hrt : r < 4 * dist x z := by + rw [pow_succ] at hi + have hh := (lt_div_iff₀ hr).mp hi + dsimp only [r, coordinateQuarterRadius] + nlinarith + have hframe : d.normalization i x = coordinateFrame (e.heat.frameAt x hx' (2 * i)) := by + change e.heat.quarterFrame i x = _ + exact e.heat.quarterFrame_eq i x hx' + have happ : IsPointedApproximation x 0 r 4 zeta + (fun y => r⁻¹ • d.normalization i x (e.heat.values y - e.heat.values x)) := by + rw [hframe] + have h := e.heat.frameAt_approximation x hx' (2 * i) + simpa only [r, regular_quarter_radius, coordinateFrame_apply, map_sub] using h + have he := normalized_pair_error e.heat.values (d.normalization i x) hr' happ + (by rw [dist_comm]; linarith) + refine ⟨i, he.trans ?_⟩ + have hh := mul_le_mul_of_nonneg_right hzetaSmall hr'.le + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularInnerGoodCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularInnerGoodCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f2c9285265d2a26502cf6de9058e1f3a644c5b6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularInnerGoodCoordinates.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.FirstOrderInnerCoordinates +import OAI.Geometry.RCD.Coordinates.RegularLargeGoodSets + +namespace OAI + +/-! # Actual fine coordinate maps on large regular-point good sets -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_inner_good_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + {p : X} (hp : IsRegular n p) {η ζ β : ℝ} + (hη : 0<η) (hζ : 0<ζ) (hβ : 0<β) : + ∃ t s : ℝ, 0 r⁻¹ • (v z-v x)) := by + obtain ⟨r₀,ε,hr₀,hε,hcoord⟩ := hX.first_order_inner_coordinates hn hK + (show 0<η/160 by positivity) + let t := min ε β + have ht : 0 e.heat.values x.val) Ω + (fun i x => e.heat.frozenAt (inverse x).val i) + (distanceSourceRadius e.heat.radius e.heat.shift) Theta Bjet 64 := by + let L := iterationPairMultiplier Theta Bjet 64 + have hL : 274877906944 ≤ L := by + have hh := mul_le_mul hTheta hBjet zero_le_one (zero_le_one.trans hTheta) + dsimp only [L, iterationPairMultiplier, iterationChartRatio] + norm_num at hh ⊢ + nlinarith only [hh] + have hL0 : 0 ≤ L := by linarith + have hinside {x : X} (hx : x ∈ ball base δ) : x ∈ e.heat.patchRegion := by + apply ball_subset_ball _ hx + exact hδ.trans (div_le_div_of_nonneg_left e.heat.radius_pos.le (by positivity) + (pow_le_pow_right₀ (by norm_num) (by omega : e.heat.shift + 10 ≤ e.heat.shift + 12))) + have hinv {x : X} (hx : x ∈ e.heat.patchRegion) : + (inverse (e.heat.values x)).val = x := + working_chart_inverse_left e.heat u hu inverse hinverse hx + apply iterationPairGeometry_of_all_scales + (fun x : ball base δ => e.heat.values x.val) Ω + (fun i x => e.heat.frozenAt (inverse x).val i) + (distanceSourceRadius_pos e.heat.radius_pos _) hTheta hBjet (by norm_num) + · intro x z + have ht := dist_triangle x.val base z.val + rw [dist_comm base z.val] at ht + have hx : dist x.val base < δ := x.property + have hz : dist z.val base < δ := z.property + have hd : dist x.val z.val ≤ 2 * δ := by linarith + have hh := mul_le_mul_of_nonneg_left hd hL0 + change L * dist x.val z.val ≤ _ + exact hh.trans (by calc + L * (2 * δ) = 2 * L * δ := by ring + _ ≤ _ := hdiam) + · intro i x z hxz hlow hupp + have hxi := hinside x.property + have hzi := hinside z.property + have hxz' : x.val ≠ z.val := fun hh => hxz (Subtype.ext hh) + have ht : 0 < dist x.val z.val := dist_pos.mpr hxz' + have hscale := iterationRadius_distanceSourceRadius e.heat.radius e.heat.shift i + rw [hscale] at hlow hupp + change L * dist x.val z.val ≤ distanceSourceRadius e.heat.radius (e.heat.shift + i) at hlow + change distanceSourceRadius e.heat.radius (e.heat.shift + i) ≤ 2 * L * dist x.val z.val at hupp + have he := e.heat.pair_endpoints_at_scale (by linarith : 2097152 ≤ L) + hzeta hzetaL i (e.heat.patch_region_subset hxi) hlow hupp + refine ⟨?_, ?_, ?_⟩ + · rw [hinv hxi] + change (64 : ℝ)⁻¹ * dist x.val z.val ≤ _ + rw [show (64 : ℝ)⁻¹ = 1 / 64 by norm_num] + linarith [he.1, ht] + · rw [hinv hxi] + change _ ≤ 64 * dist x.val z.val + linarith [he.2, ht] + apply segment_geometry_of_ellipsoid e.heat.values + (fun P => e.heat.frozenAt (inverse P).val i) + (x := x.val) (z := z.val) (r := regularEllipsoidRadius e.heat.radius e.heat.shift i) + (c := 1 / 32) (W := e.heat.patchRegion) + · rw [hinv hxi] + have hs := source_eq_ellipsoidRadius e.heat.radius e.heat.shift i + have hm := mul_lt_mul_of_pos_right (show (1073741824 : ℝ) < L by linarith) ht + rw [hs] at hlow + linarith [he.2] + · intro P hP + rw [hinv hxi] at hP + have hroom := regular_ellipsoid_room e.heat.radius_pos e.heat.shift i + (ball_subset_ball hδ x.property) + obtain ⟨y, hy, hd, heq⟩ := regular_frozen_ellipsoid_preimages hX e hzeta hzetaSmall + hgramSmall i hxi hroom P (by simpa only [div_eq_mul_inv, mul_comm, one_mul] using hP) + refine ⟨?_, y, hy, hd, heq⟩ + rw [← heq, ← hu ⟨y, hy⟩] + exact (u ⟨y, hy⟩).property + · intro y hy hd w + rw [hinv hy, hinv hxi] + have hρ : regularEllipsoidRadius e.heat.radius e.heat.shift i ≤ + e.heat.radius / 2 ^ (e.heat.shift + i + 17) := by + unfold regularEllipsoidRadius iterationRadius + have heq : e.heat.radius / 128 / 2 ^ (e.heat.shift + i + 17) = + (e.heat.radius / 2 ^ (e.heat.shift + i + 17)) / 128 := by ring + rw [heq] + have hr : 0 < e.heat.radius / 2 ^ (e.heat.shift + i + 17) := + div_pos e.heat.radius_pos (by positivity) + linarith + have hb := regular_nearby_frozen_bound hX e (e.heat.patch_region_subset hxi) + (e.heat.patch_region_subset hy) hzeta hnear i + (by rw [dist_comm]; exact hd.le.trans hρ) w + linarith [norm_nonneg (e.heat.frozenAt x.val i w)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLargeGoodSets.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLargeGoodSets.lean new file mode 100644 index 0000000000000000000000000000000000000000..de52712e44eb3588d937572243819b7852f53f6d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLargeGoodSets.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Coordinates.RegularGoodSplittingSets + +namespace OAI + +/-! # Arbitrarily large good sets at all sufficiently small regular scales -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_large_good_sets {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {p : X} (hp : IsRegular n p) {t ζ : ℝ} (ht : 0 < t) (hζ : 0 < ζ) : + ∃ s : ℝ, 0 < s ∧ ∀ R : ℝ, 0 < R → R < s → + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n) (U : Set X), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*R) t u v ∧ + IsCompact U ∧ U ⊆ closedBall p R ∧ + (hausdorff n X).real (ball p R \ U) ≤ ζ*(hausdorff n X).real (ball p R) ∧ + ∀ x ∈ U, ∀ r : ℝ, 0 < r → r < R → + FirstOrderSplittingOn (hausdorff n X) hX.quadratic x r t u v := by + let D := fiveBallConstant n + have hD : 0 < D := by dsimp only [D,fiveBallConstant]; positivity + let e := min t (ζ*t/(D^2*((n:ℝ)^2+1))) + have he : 0 < e := lt_min ht (by positivity) + have het : e ≤ t := min_le_left _ _ + have heζ : e*(D^2*((n:ℝ)^2+1)) ≤ ζ*t := + (le_div_iff₀ (by positivity)).mp (min_le_right _ _) + have hcoef : (D/t)*((n:ℝ)^2*e)*D ≤ ζ := by + calc + _ = (D^2*(n:ℝ)^2*e)/t := by ring + _ ≤ ζ := (div_le_iff₀ ht).mpr (by nlinarith [mul_nonneg (sq_nonneg D) he.le]) + obtain ⟨s,hs,hsets⟩ := hX.regular_good_splitting_sets hn hp he ht het + refine ⟨s,hs,?_⟩ + intro R hR hRs + obtain ⟨u,v,U,hcurv,hsplit,hU,hUsub,hbad,hgood⟩ := hsets R hR hRs + have hvol : (hausdorff n X).real (ball p (2*R)) ≤ D*(hausdorff n X).real (ball p R) := by + apply le_trans (measureReal_mono (ball_subset_ball (by linarith : 2*R ≤ 5*R)) + (hX.finiteOnBounded _ isBounded_ball).ne) + exact hX.five_ball_doubling hn hR hcurv p R hR le_rfl + refine ⟨u,v,U,hsplit.mono_error _ _ he.le het,hU,hUsub,hbad.trans ?_,hgood⟩ + calc + _ ≤ (D/t)*((n:ℝ)^2*e*(D*(hausdorff n X).real (ball p R))) := + mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left hvol (by positivity)) (by positivity) + _ = ((D/t)*((n:ℝ)^2*e)*D)*(hausdorff n X).real (ball p R) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right hcoef measureReal_nonneg + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallBounds.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..5708f78cdc937b138230ace5a404ffd3577e56c1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallBounds.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Coordinates.RegularMovingVolumeRatio +import OAI.Geometry.RCD.Metric.PointedBallSandwich +import OAI.Geometry.RCD.Sobolev.WeakBallMassBounds + +namespace OAI + +/-! # Exact-volume bounds for the original laws in a regular metric limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + {K : ℝ} {n : ℕ} + +theorem NoncollapsedRCD.regular_limit_ball_bounds + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {o : X} (ho : IsRegular n o) + {q z : Y} {S a t b : ℝ} (hS : 0 < S) (ha : 0 < a) + (hat : a < t) (htb : t < b) (hroom : dist z q+b < S) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hVm : ∀ k, Measurable (V k)) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) S (ε k) (V k)) + (hfin : ∀ k, hausdorff n X (ball (p k) (S*r k)) ≠ ⊤) + {Q : ProbabilityMeasure Y} + (hlim : Tendsto (fun k => metricBallLaw (hausdorff n X) + (p k) (r k) S (V k) (hfin k)) atTop (𝓝 Q)) : + (a/S)^n ≤ (Q : Measure Y).real (closedBall z t) ∧ + (Q : Measure Y).real (ball z t) ≤ (b/S)^n := by + let T := (dist z q+S-b)/2 + have hzT : dist z q < T := by dsimp only [T]; linarith + have hTS : T < S := by dsimp only [T]; linarith [dist_nonneg (x := z) (y := q)] + have haT : a+T ≤ S := by dsimp only [T]; linarith + obtain ⟨x,hx,hxz⟩ := pointed_bounded_lift p r ε V hr hε hV hTS hzT + have hxo : Tendsto x atTop (𝓝 o) := by + apply hp.congr_dist + have hsmall : Tendsto (fun k => T*r k) atTop (𝓝 0) := by + simpa only [mul_zero] using hr0.const_mul T + apply squeeze_zero (fun _ => dist_nonneg) _ hsmall + intro k + simpa only [dist_comm] using hx k + have hsand := pointed_ball_sandwich_eventually p x r ε V hr hε hV hx hxz + hTS.le haT hat htb + have hpos k : 0 < (hausdorff n X).real (ball (p k) (S*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' (hfin k) + constructor + · apply weak_closed_mass_ge_of_tendsto hlim isClosed_closedBall + (hX.regular_moving_volume_ratio hn ho p x r hp hxo hr hr0 hS ha) + filter_upwards [hsand] with k hk + rw [metricBallLaw_real _ _ _ _ _ _ (hpos k) (hVm k) measurableSet_closedBall, + div_eq_inv_mul] + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (hpos k).le) + apply measureReal_mono _ (hX.finiteOnBounded _ (isBounded_ball.subset inter_subset_right)).ne + intro y hy + exact ⟨ball_subset_closedBall (hk.1 hy).1,(hk.1 hy).2⟩ + · apply weak_open_mass_le_of_tendsto hlim isOpen_ball + (hX.regular_moving_volume_ratio hn ho p x r hp hxo hr hr0 hS (ha.trans (hat.trans htb))) + filter_upwards [hsand] with k hk + rw [metricBallLaw_real _ _ _ _ _ _ (hpos k) (hVm k) measurableSet_ball, + div_eq_inv_mul] + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (hpos k).le) + apply measureReal_mono _ (hX.finiteOnBounded _ isBounded_ball).ne + rintro y ⟨hy,hyS⟩ + exact hk.2 ⟨ball_subset_closedBall hy,hyS⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd8f2697c760a7d11a422d3ead5a37be15540841 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitBallMass.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitBallBounds +import OAI.Geometry.RCD.Metric.InteriorBallMassIdentification + +namespace OAI + +/-! # Exact interior ball masses in the actual regular metric limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] + {K : ℝ} {n : ℕ} + +theorem NoncollapsedRCD.regular_limit_ball_mass + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {o : X} (ho : IsRegular n o) + {q z : Y} {S t : ℝ} (hS : 0 < S) (ht : 0 < t) (hroom : dist z q+t < S) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hVm : ∀ k, Measurable (V k)) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) S (ε k) (V k)) + (hfin : ∀ k, hausdorff n X (ball (p k) (S*r k)) ≠ ⊤) + {Q : ProbabilityMeasure Y} + (hlim : Tendsto (fun k => metricBallLaw (hausdorff n X) + (p k) (r k) S (V k) (hfin k)) atTop (𝓝 Q)) : + (Q : Measure Y).real (ball z t) = (t/S)^n ∧ + (Q : Measure Y).real (closedBall z t) = (t/S)^n := by + apply interior_ball_mass_identification (Q : Measure Y) z n hS ht + (show t < S-dist z q by linarith) + intro a s b ha has hsb hb + exact hX.regular_limit_ball_bounds hn ho hS ha has hsb (by linarith) + p r ε V hp hr hr0 hε hVm hV hfin hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitChart.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..47e3b2de0631a3667696c7181ffa3609fe834cbe --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitChart.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Coordinates.RegularIterationPairs +import OAI.Geometry.RCD.Coordinates.IterationOpenness + +namespace OAI + +/-! # The chart limit of the regular-neighborhood iteration + +Scalar smallness and geometric patch estimates yield an open chart with +two-sided ambient-distance bounds. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Once the scalar tolerances are met, the actual heat-coordinate +iteration has an open ambient-distance bi-Lipschitz limit chart. -/ +theorem regular_iteration_limit_chart {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (psi : EuclideanGevreyCutoff n) {Cpin Theta : ℝ} (hCpin : 0 ≤ Cpin) (hTheta : 1 ≤ Theta) : + let N := patchOverlapBound n (1 / 2) 2 3 + let Lcut := psi.constant * 536870912 + let Kcut := Lcut ^ 2 + 4 * Lcut ^ 3 + let Bjet := patchJetBase N (Real.sqrt (3 * Cpin)) Lcut + ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1 ∧ + ∀ {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta), + 0 ≤ zeta → zeta ≤ 1 / 2048 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4 → + zeta * iterationPairMultiplier Theta Bjet 64 ≤ 2097152 → + ∀ (Ω : Set (Euclidean n)), IsOpen Ω → + ∀ (u : e.heat.patchRegion ≃ₜ Ω), (∀ q, (u q).val = e.heat.values q.val) → + ∀ (inverse : Euclidean n → {q : X // q ∈ ball base (e.heat.radius / 32)}), + (∀ x ∈ Ω, (inverse x).val ∈ e.heat.patchRegion ∧ e.heat.values (inverse x).val = x) → + ∀ g : PatchIterationGeometry (ι := X) Ω (distanceSourceRadius e.heat.radius e.heat.shift) + Theta epsilon N (3 * Cpin) Kcut Lcut, + g.frozen = (fun i x => e.heat.frozenAt (inverse x).val i) → HasOpenBilipschitzChart n base := by + intro N Lcut Kcut Bjet + let Fiter := patchAssemblyCoefficient N (3 * Cpin) Kcut Lcut + have hLcut : 1 ≤ Lcut := by + have h := psi.constant_ge_one + dsimp only [Lcut] + linarith + have hKcut : 0 ≤ Kcut := by dsimp only [Kcut]; positivity + have hFiter : 1 ≤ Fiter := (patchAssemblyCoefficient_bounds N (C := 3 * Cpin) hKcut hLcut).1 + have hBjet : 1 ≤ Bjet := patchJetBase_ge_one hLcut + obtain ⟨epsilon, hepsilon, hepsilon1, hchart⟩ := exists_analytic_iteration_open_limit_chart + (X := X) hTheta hFiter hBjet (by norm_num : (1 : ℝ) ≤ 64) + refine ⟨epsilon, hepsilon, hepsilon1, ?_⟩ + intro base a κ B J C A Cχ enlargement zeta eta ker hk e hzeta hzetaSmall hgram hnear hzetaL + Ω hΩ u hu inverse hinverse g hg + let r0 := distanceSourceRadius e.heat.radius e.heat.shift + let L := iterationPairMultiplier Theta Bjet 64 + have hr0 : 0 < r0 := distanceSourceRadius_pos e.heat.radius_pos _ + have hL : 0 < L := by + dsimp only [L, iterationPairMultiplier, iterationChartRatio] + positivity + let δ := min (e.heat.radius / 2 ^ (e.heat.shift + 12)) (r0 / (4 * L)) + have hδ : 0 < δ := lt_min (div_pos e.heat.radius_pos (by positivity)) (by positivity) + have hδrad : δ ≤ e.heat.radius / 2 ^ (e.heat.shift + 12) := min_le_left _ _ + have hδdiam : 2 * L * δ ≤ r0 := by + have h := (le_div_iff₀ (by positivity : 0 < 4 * L)).mp (min_le_right _ _ : δ ≤ r0 / (4 * L)) + nlinarith [mul_nonneg hL.le hδ.le] + have hsubset : ball base δ ⊆ e.heat.patchRegion := by + apply ball_subset_ball + exact hδrad.trans (div_le_div_of_nonneg_left e.heat.radius_pos.le (by positivity) + (pow_le_pow_right₀ (by norm_num) (by omega : e.heat.shift + 10 ≤ e.heat.shift + 12))) + obtain ⟨hO, v, hv⟩ := restrict_open_coordinate_chart isOpen_ball hΩ hsubset e.heat.values u hu + have hOΩ : Set.range (fun x : ball base δ => e.heat.values x.val) ⊆ Ω := by + rintro _ ⟨x, rfl⟩ + change e.heat.values x.val ∈ Ω + rw [← hu ⟨x.val, hsubset x.property⟩] + exact (u ⟨x.val, hsubset x.property⟩).property + let d := g.toCanonicalAnalyticIterationData hr0 hepsilon.le hepsilon1 + (by positivity) hKcut hLcut + have hvfun : (fun x : ball base δ => (v x).val) = fun x => e.heat.values x.val := funext hv + have hgeom : IterationPairGeometry (fun x : ball base δ => (v x).val) Ω d.frozen r0 Theta Bjet 64 := by + change IterationPairGeometry _ Ω g.frozen r0 Theta Bjet 64 + rw [hvfun, hg] + exact regular_iteration_pair_geometry hX e hzeta hzetaSmall hgram hnear u hu inverse hinverse + hTheta hBjet hzetaL hδrad hδdiam + exact hchart base Ω hΩ (ball base δ) isOpen_ball (mem_ball_self hδ) + (Set.range (fun x : ball base δ => e.heat.values x.val)) hO hOΩ v r0 hr0 d hgeom + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitEuclideanNeighborhood.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitEuclideanNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ffb2bdc38a6d61ad7c461a2de85f9cbc5f6beb3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitEuclideanNeighborhood.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitFiniteEuclidean +import OAI.Geometry.RCD.Metric.IsometricBallMeasure +import OAI.Geometry.RCD.Metric.PowerBallFullImage + +namespace OAI + +/-! # Full Euclidean neighborhoods in actual near-regular metric limits -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +universe u v +variable {X : Type u} {Y : Type v} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] [ProperSpace Y] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_euclidean_neighborhood (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q : Y} + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K*(4*r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) : + ∃ f : closedBall q (1/4:ℝ) → Euclidean n, Isometry f ∧ + f ⟨q,by simp⟩ = 0 ∧ ball (0:Euclidean n) (1/32) ⊆ range f := by + obtain ⟨m,hmn,f,hf,-,hcompact,hzero⟩ := + hX.regular_limit_finite_euclidean hn hK ho p r ε V hp hr hr0 hε hcurv hV + obtain ⟨Q,-,hQ⟩ := hX.regular_metric_limit_measure hn ho (by norm_num : (0:ℝ)<1/8) + (by norm_num : (1/8:ℝ)≤5) p r ε V hp hr hr0 hε hV + let μ := isometricBallMeasure (Q : Measure Y) q (1/4) f + let : IsFiniteMeasure μ := isometricBallMeasure_finite (Q : Measure Y) q (1/4) f + have hμ : ∀ᵐ x ∂μ, x ∈ range f := isometricBallMeasure_supported _ _ _ _ hf + let q' : closedBall q (1/4:ℝ) := ⟨q,by simp⟩ + have hmass : ∀ y ∈ range f ∩ closedBall (0:Euclidean m) (1/32), + ∀ t : ℝ, 0 < t → t ≤ 1/32 → μ.real (closedBall y t) = (t/(1/8))^n := by + rintro y ⟨⟨x,rfl⟩,hy⟩ t ht hta + have hxd : dist (x:Y) q ≤ 1/32 := by + have he := hf.dist_eq x q' + change dist (f x) (f q') = dist (x:Y) q at he + rw [hzero] at he + simpa only [mem_closedBall,he] using hy + have he := isometricBallMeasure_closedBall (Q : Measure Y) f hf x t (by linarith) + change μ.real (closedBall (f x) t) = _ + rw [Measure.real,he] + exact (hQ x t ht (by linarith)).2 + have hmass0 : μ.real (closedBall (0:Euclidean m) (1/32)) = ((1/32)/(1/8):ℝ)^n := by + have hh := hmass 0 ⟨⟨q',hzero⟩,by simp⟩ (1/32) (by norm_num) le_rfl + exact hh + have hmn' := euclidean_dimension_of_power_ball_mass μ hcompact.isClosed hμ hmn + (by norm_num : (0:ℝ)<1/32) (by norm_num : (0:ℝ)<1/8) + (by rw [hmass0]; positivity) hmass + subst m + have hopen : μ.real (ball (0:Euclidean n) (1/32)) = ((1/32)/(1/8):ℝ)^n := by + have he := isometricBallMeasure_ball (Q : Measure Y) f hf q' (1/32) (by norm_num [q']) + rw [hzero] at he + rw [Measure.real,he] + exact (hQ q (1/32) (by norm_num) (by simp; norm_num)).1 + refine ⟨f,hf,hzero,?_⟩ + exact ball_subset_of_power_ball_mass (by omega) μ hcompact.isClosed hμ + (by norm_num) (by norm_num) hopen hmass + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitFiniteEuclidean.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitFiniteEuclidean.lean new file mode 100644 index 0000000000000000000000000000000000000000..316fea1f5b1d18cfdd3489243598bca7ad67b24d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitFiniteEuclidean.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitInnerProductBall +import OAI.Geometry.RCD.Metric.ConvexPackingFiniteDimensional +import OAI.Geometry.RCD.Metric.PointedLimitPacking + +namespace OAI + +/-! # Finite-dimensional Euclidean realization of the actual inner limit ball -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +universe u v +variable {X : Type u} {Y : Type v} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_finite_euclidean (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q : Y} + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4*r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) : + ∃ m : ℕ, m ≤ n ∧ ∃ f : closedBall q (1/4:ℝ) → Euclidean m, + Isometry f ∧ Convex ℝ (range f) ∧ IsCompact (range f) ∧ f ⟨q,by simp⟩ = 0 := by + classical + obtain ⟨E,m,hE⟩ := hX.regular_limit_inner_product_ball hn hK ho p r ε V hp hr hr0 hε hcurv hV + let := m + obtain ⟨i,f,hiso,hconv,hcompact,hspan,hzero⟩ := hE + let := i + have hpack : ∀ {ι : Type} [Fintype ι] (v : ι → E) {d : ℝ}, 0 d≤dist (v i) (v j)) → + (Fintype.card ι:ℝ)*(d/2)^n ≤ Real.cosh 1^(n-1)*8^n := by + intro ι _ v d hd hd1 hv hsep + choose x hx using hv + apply hX.pointed_limit_packing hn p r ε V hr hε hcurv hV (fun i => (x i:Y)) hd hd1 + · intro j + exact (x j).property.trans (by norm_num) + · intro a b hab + have hh := hsep hab + change d ≤ dist (v a) (v b) at hh + rw [← hx a,← hx b,hiso.dist_eq] at hh + exact hh + obtain ⟨hfin,hdim⟩ := finite_dimensional_of_convex_packing hconv + (show (0:E) ∈ range f from ⟨⟨q,by simp⟩,hzero⟩) hspan n _ hpack + let := hfin + let e := (stdOrthonormalBasis ℝ E).repr + have hcrange : range (fun x => e (f x)) = e '' range f := by + ext z + simp only [mem_range,mem_image] + constructor + · rintro ⟨x,rfl⟩ + exact ⟨f x,⟨x,rfl⟩,rfl⟩ + · rintro ⟨y,⟨x,rfl⟩,rfl⟩ + exact ⟨x,rfl⟩ + refine ⟨Module.finrank ℝ E,hdim,(fun x => e (f x)),e.isometry.comp hiso,?_,?_,?_⟩ + · rw [hcrange] + exact hconv.linear_image e.toLinearMap + · rw [hcrange] + exact hcompact.image e.continuous + · change e (f ⟨q,by simp⟩) = 0 + rw [hzero,map_zero] + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitInnerProductBall.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitInnerProductBall.lean new file mode 100644 index 0000000000000000000000000000000000000000..6bb2a528499a4456f683b08ac07781eb46630bb1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitInnerProductBall.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitMidpointGeometry +import OAI.Geometry.RCD.Transport.LocalHilbertEmbedding + +namespace OAI + +/-! # Inner-product balls obtained from the original near-regular RCD sequence -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +universe u v +variable {X : Type u} {Y : Type v} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_inner_product_ball (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q : Y} + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) : + ∃ (E : Type v) (m : NormedAddCommGroup E), + letI := m + ∃ (_ : InnerProductSpace ℝ E) (f : closedBall q (1/4:ℝ) → E), + Isometry f ∧ Convex ℝ (range f) ∧ IsCompact (range f) ∧ + Submodule.span ℝ (range f) = ⊤ ∧ f ⟨q,by simp⟩ = 0 := by + obtain ⟨G⟩ := hX.regular_limit_midpoint_geometry hn hK ho p r ε V hp hr hr0 hε hcurv hV + exact G.exists_local_inner_product_embedding + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointFamily.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..a77265a99e3000c0c236583d2aa25d103c8a6952 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointFamily.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Coordinates.RegularPointedMidpoint +import OAI.Geometry.RCD.Metric.PointedBoundedLifts + +namespace OAI + +/-! # Simultaneous midpoint identities for countably many prescribed limit points -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_midpoint_family (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q a b : Y} (w : ℕ → Y) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) + (ha : dist a q < 1/2) (hb : dist b q < 1/2) (hw : ∀ i, dist (w i) q < 1) : + ∃ c : Y, dist c q ≤ 4 ∧ dist a c = dist a b/2 ∧ dist c b = dist a b/2 ∧ + ∀ i, dist (w i) c^2 = (dist (w i) a^2+dist (w i) b^2)/2-dist a b^2/4 := by + obtain ⟨x,hx,hVx⟩ := pointed_bounded_lift p r ε V hr hε hV (by norm_num) ha + obtain ⟨y,hy,hVy⟩ := pointed_bounded_lift p r ε V hr hε hV (by norm_num) hb + have hex i := pointed_bounded_lift p r ε V hr hε hV (by norm_num : (1:ℝ)<5) (hw i) + choose z hz hVz using hex + exact hX.regular_pointed_midpoint hn hK ho w p x y z r ε V hp hr hr0 hε hcurv hV + (fun k => by simpa only [div_eq_mul_inv,one_mul,mul_comm] using hx k) + (fun k => by simpa only [div_eq_mul_inv,one_mul,mul_comm] using hy k) + (fun i k => by simpa only [one_mul] using hz i k) hVx hVy hVz + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointGeometry.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..60cd270a359b94bc503ec75e900c0fff2fb93fda --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitMidpointGeometry.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitQuadraticMidpoint +import OAI.Geometry.RCD.Transport.LocalQuadraticMidpointGeometry + +namespace OAI + +/-! # Local midpoint geometry constructed from the original RCD sequence -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_midpoint_geometry (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q : Y} + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) : + Nonempty (LocalQuadraticMidpointGeometry q) := by + classical + have hex (x y : ball q (1/2:ℝ)) := hX.regular_limit_quadratic_midpoint hn hK ho + p r ε V hp hr hr0 hε hcurv hV x.property y.property + choose c hc hleft hright hquad using hex + exact ⟨{ + mid := fun x y => ⟨c x y,hc x y⟩ + left := hleft + right := hright + quadratic := hquad }⟩ + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLimitQuadraticMidpoint.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitQuadraticMidpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..988eb313cdcf47b21b86a12f8ecd9e838716430f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLimitQuadraticMidpoint.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitMidpointFamily + +namespace OAI + +/-! # Exact local quadratic midpoint geometry of the actual metric limits -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_limit_quadratic_midpoint (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q a b : Y} + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) + (ha : dist a q < 1/2) (hb : dist b q < 1/2) : + ∃ c : Y, dist c q < 1/2 ∧ dist a c = dist a b/2 ∧ dist c b = dist a b/2 ∧ + ∀ z ∈ ball q 1, dist z c^2 = (dist z a^2+dist z b^2)/2-dist a b^2/4 := by + let W := ball q (1:ℝ) + have hq : q ∈ W := by simp [W] + let : Nonempty W := ⟨⟨q,hq⟩⟩ + obtain ⟨w,hw⟩ := TopologicalSpace.exists_dense_seq W + obtain ⟨c,_hc,hac,hcb,hc⟩ := hX.regular_limit_midpoint_family hn hK ho + (fun i => (w i : Y)) p r ε V hp hr hr0 hε hcurv hV ha hb (fun i => (w i).property) + have hclosed : IsClosed {z : W | dist (z:Y) c^2 = + (dist (z:Y) a^2+dist (z:Y) b^2)/2-dist a b^2/4} := by + apply isClosed_eq + · exact (continuous_subtype_val.dist continuous_const).pow 2 + · exact (((continuous_subtype_val.dist continuous_const).pow 2).add + ((continuous_subtype_val.dist continuous_const).pow 2) |>.div_const 2).sub continuous_const + have hall (z : W) : dist (z:Y) c^2 = + (dist (z:Y) a^2+dist (z:Y) b^2)/2-dist a b^2/4 := by + apply hclosed.closure_subset_iff.mpr _ (hw z) + rintro _ ⟨i,rfl⟩ + exact hc i + have hqc := hall ⟨q,hq⟩ + simp only [dist_comm q] at hqc + have hsmall : dist c q < 1/2 := by + nlinarith [dist_nonneg (x:=a) (y:=q),dist_nonneg (x:=b) (y:=q), + dist_nonneg (x:=c) (y:=q),sq_nonneg (dist a b)] + exact ⟨c,hsmall,hac,hcb,fun z hz => hall ⟨z,hz⟩⟩ + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularLinearRadialData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularLinearRadialData.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ecece7060191578d1736a466545b14781a40755 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularLinearRadialData.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData +import OAI.Geometry.RCD.Harmonic.RadialLinearCoefficient +import OAI.Geometry.RCD.Harmonic.RadialLinearRepresentatives +import OAI.Geometry.RCD.Sobolev.RadialCutoffChange + +namespace OAI + +/-! # The actual radial estimates for every covector simultaneously -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Linear assembly keeps the same radial representatives and coefficients +in both the value and gradient bounds. It also gives the near-identity +bound for the covector operator used in the two-center commutator. -/ +theorem regular_linear_radial_data {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p q : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + (e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta) + (hq : q ∈ ball p (e.heat.radius / 32)) + (d : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q) + (hκ : 0 ≤ κ) (hB : 0 ≤ B) (hCχ : 0 ≤ Cχ) (hzeta : 0 ≤ zeta) (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let r := s / 64 + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d.source) i + let Cv := 2 * D ^ 2 + 8192 * ((n : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + let Ce := radialEnergyConstant K n Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume n)) * (128 : ℝ) ^ n) + ∃ (coeff : Euclidean n →L[ℝ] Euclidean n) + (G : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic), + ‖(d.frame i).symm.toContinuousLinearMap.comp coeff - ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ + (n : ℝ) ^ 4 * Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant n Cχ * zeta)) ∧ + ∀ b : Euclidean n, + (SobolevSpace.toLp μ hX.quadratic (G b) =ᵐ[μ.restrict (ball q r)] + localGamma μ hX.quadratic (d.replacement.replacement i) + (sobolevColumnMap μ hX.quadratic e.heat.coordinates (d.frame i b))) ∧ + let R := G b - centeredAffineSobolev μ hX.quadratic e.heat.coordinates + e.one.sobolev (e.heat.values q) (coeff b) + ‖normalizeLocalL2 μ (ball q r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball q r) R)‖ ^ 2 ≤ + (n : ℝ) ^ 2 * (Cv * r ^ 2 * E) * ‖b‖ ^ 2 ∧ + (μ.real (ball q (r / 2)))⁻¹ * + (∫ x in ball q (r / 2), localGamma μ hX.quadratic R R x ∂μ) ≤ + (n : ℝ) ^ 2 * Ce * E * ‖b‖ ^ 2 := by + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius e.heat.radius i + let r := s / 64 + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hQ d.source) i + let Cv := 2 * D ^ 2 + 8192 * ((n : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + let Ce := radialEnergyConstant K n Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume n)) * (128 : ℝ) ^ n) + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + change 2 * s ≤ e.heat.radius at hh + linarith + have hE : 0 ≤ E := (radial_fit_pinching_envelope_budget d.source hκ hCχ hzeta d.summable).2.2 i |>.1 + have hCv : 0 ≤ Cv := by dsimp only [Cv]; have := euclideanUnitVolume_pos n; positivity + have hvol : 0 < μ.real (ball q (r / 2)) := + (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) + (e.volume q hq (r / 2) (by positivity) (by dsimp only [r]; linarith))).1 + obtain ⟨c, g, hmatrix, hrows⟩ := d.rows i + refine ⟨finiteCoefficientMap c, sobolevColumnMap μ hQ g, ?_, ?_⟩ + · have hh := finiteCoefficientMap_relative_bound (d.frame i) c + (by positivity : 0 ≤ (n : ℝ) ^ 2 * Real.sqrt + (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant n Cχ * zeta))) hmatrix + convert hh using 1 + ring + · intro b + have hf := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by dsimp only [r]; linarith : r ≤ s / 4)) + (d.gradient i q (by simp only [dist_self]; positivity)) + have hrep := localRadialDerivative_column μ hQ (ball q r) (d.replacement.replacement i) + hf (transformedColumn μ hQ e.heat.coordinates (d.frame i)) g (fun j => (hrows j).1) b + have hradial := localRadialDerivative_representative μ hQ (ball q r) (d.replacement.replacement i) + (sobolevColumnMap μ hQ (transformedColumn μ hQ e.heat.coordinates (d.frame i)) b) hf + rw [hrep] at hradial + have hrep' := (SobolevSpace.restrictLp_coe μ hQ (ball q r) (sobolevColumnMap μ hQ g b)).symm.trans + hradial + rw [sobolevColumnMap_transformed, ContinuousLinearMap.comp_apply] at hrep' + refine ⟨hrep', ?_⟩ + have he (j : Fin n) : (∫ x in ball q (r / 2), localGamma μ hQ + (g j - centeredAffineSobolev μ hQ e.heat.coordinates (d.cutoff i).sobolev (e.heat.values q) (c j)) + (g j - centeredAffineSobolev μ hQ e.heat.coordinates (d.cutoff i).sobolev (e.heat.values q) (c j)) x ∂μ) ≤ + μ.real (ball q (r / 2)) * (Ce * E) := by + exact (inv_mul_le_iff₀ hvol).mp (hrows j).2.2 + have hh := linear_centered_radial_bounds μ hQ e.heat.coordinates g (d.cutoff i).sobolev + (e.heat.values q) c (ball q r) (ball q (r / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (mul_nonneg (mul_nonneg hCv (sq_nonneg r)) hE) + (fun j => (hrows j).2.1) he b + have hone := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by dsimp only [r]; linarith : r ≤ 2 * s)) (e.oneRepresentative q hq i) + have hchi : SobolevSpace.toLp μ hQ (d.cutoff i).sobolev =ᵐ[μ.restrict (ball q r)] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (d.cutoff i).representative, ae_restrict_mem measurableSet_ball] + with x hx hball + exact hx.trans ((d.cutoff i).one x hball) + have hvchange := centered_radial_cutoff_change μ hQ e.heat.coordinates + (sobolevColumnMap μ hQ g b) e.one.sobolev (d.cutoff i).sobolev (e.heat.values q) + (finiteCoefficientMap c b) (ball q r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hone hchi + have hsub : ball q (r / 2) ⊆ ball q r := ball_subset_ball (by linarith) + have hechange := centered_radial_cutoff_change μ hQ e.heat.coordinates + (sobolevColumnMap μ hQ g b) e.one.sobolev (d.cutoff i).sobolev (e.heat.values q) + (finiteCoefficientMap c b) (ball q (r / 2)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ae_restrict_of_ae_restrict_of_subset hsub hone) (ae_restrict_of_ae_restrict_of_subset hsub hchi) + refine ⟨?_, ?_⟩ + · rw [hvchange.1] + exact hh.1 + rw [hechange.2] + change (μ.real (ball q (r / 2)))⁻¹ * _ ≤ (n : ℝ) ^ 2 * Ce * E * ‖b‖ ^ 2 + apply (inv_mul_le_iff₀ hvol).2 + exact hh.2.trans_eq (by ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMassMatrices.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMassMatrices.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac45474d411caabb19634b1e38291b28aab60e49 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMassMatrices.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Coordinates.RegularMeanPinching + +namespace OAI + +/-! # Canonical mean and local mass matrices of the constructed neighborhood -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + (q : X) (hq : q ∈ ball base (d.radius / 32)) + +/-- The actual dyadic mean Gram, using an already constructed exact frame +only to certify its invertibility. -/ +def meanAt (i : ℕ) : Euclidean n ≃L[ℝ] Euclidean n := + meanGramEquiv (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball + (Classical.choose (d.localData q hq).2.2.2 i) + ((Classical.choose_spec (d.localData q hq).2.2.2).1 i) + +theorem meanAt_toContinuousLinearMap (i : ℕ) : + (d.meanAt q hq i).toContinuousLinearMap = + sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (d.radius / 2 ^ i)) measurableSet_ball := by + ext v + rfl + +theorem meanAt_isPositive (i : ℕ) : (d.meanAt q hq i).toContinuousLinearMap.IsPositive := by + rw [meanAt_toContinuousLinearMap] + exact sobolevMeanGram_isPositive _ _ _ _ _ + +/-- These matrices retain the full original Bochner measure and use the +mean at a fixed dyadic offset. Their mass radius is one third of that mean radius. -/ +def pinchingMassMatrix (i : ℕ) : Euclidean n →L[ℝ] Euclidean n := + let s := distanceSourceRadius d.radius i + frozenConjugate (d.meanAt q hq (i + 15)) + ((s ^ 2 / s ^ n) • d.mass.massOperator (ball q (s / 49152))) + +theorem pinchingMassMatrix_isPositive (i : ℕ) : (d.pinchingMassMatrix q hq i).IsPositive := by + apply frozenConjugate_isPositive + apply ContinuousLinearMap.IsPositive.smul_of_nonneg + · exact d.mass.massOperator_isPositive _ measurableSet_ball + · have hs := distanceSourceRadius_pos d.radius_pos i + positivity + +end RegularBilinearData + +/-- The matrix furnished by the pinching proof equals the canonical mean +matrix at the shifted dyadic index. This identification uses equality of +operators, without comparing or commuting arbitrary normalization frames. -/ +theorem regular_pinching_matrix_identification {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + (q : X) (hq : q ∈ ball base (d.radius / 32)) (i : ℕ) + (R : Euclidean n ≃L[ℝ] Euclidean n) + (hR : R.toContinuousLinearMap = sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic d.coordinates) + (ball q (3 * (distanceSourceRadius d.radius i / 49152))) measurableSet_ball) : + R = d.meanAt q hq (i + 15) := by + apply DFunLike.ext + intro v + have hcanonical := d.meanAt_toContinuousLinearMap q hq (i + 15) + rw [← pinching_mean_radius] at hcanonical + exact congrArg (fun T : Euclidean n →L[ℝ] Euclidean n => T v) (hR.trans hcanonical.symm) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMassScale.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMassScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e9899e2eecd042c3182e6891ce5e0ac2bcdd44f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMassScale.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairMass +import OAI.Geometry.RCD.Sobolev.PoissonMassUnits +import OAI.Geometry.RCD.Metric.FullMassScaling + +namespace OAI + +/-! # The full original heat mass in scale-independent source units -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +def regularPinchingMassConstant (n : ℕ) (Ccut A B J Cχ Q L : ℝ) : ℝ := + 8 * (4096 * Cχ * (J + B / 2) + A ^ 2) + + 4 * ((Ccut * (49152 : ℝ) ^ 2 / 18 + 1) * ((5 / 4 : ℝ) * euclideanUnitVolume n)) * + (Q ^ 2 + 16 * (n : ℝ) ^ 2 * + (4 * ((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * L ^ 2 + Q ^ 2)) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Both terms of the actual mass estimate are controlled by the same +squared source. The constant has no dependence on center or scale. -/ +theorem regular_pair_mass_scaling {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base first center : X} {a B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a |K| B J C A Cχ enlargement zeta eta) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca center) + {Ccut Q L sigma : ℝ} (hCcut : 0 ≤ Ccut) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) + (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let rho := s / 49152 + let Rvol := (5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹ + let Praw := 2 * (4096 * Cχ * (J + B / 2) * + ((d1.source.source i).real (ball first s) + (d2.source.source i).real (ball center s)) + + |K| * A ^ 2 * s ^ 2 * (μ.real (ball first s) + μ.real (ball center s))) + let Fcut := ((Ccut / (3 * rho) ^ 2) / 2 + |K|) * μ.real (closedBall center (6 * rho)) + normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i ≤ sigma ^ 2 → + 4 * (Praw + Fcut * (Q ^ 2 * s ^ 2 * sigma ^ 2)) + + 4 * (Fcut * (16 * (n : ℝ) ^ 2)) * + ((2 * Real.sqrt Rvol * (L * s * sigma)) ^ 2 + Q ^ 2 * s ^ 2 * sigma ^ 2) ≤ + regularPinchingMassConstant n Ccut A B J Cχ Q L * s ^ n * sigma ^ 2 := by + intro μ s rho Rvol Praw Fcut hsource + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + let Cs := 4096 * Cχ * (J + B / 2) + A ^ 2 + let Cv := (5 / 4 : ℝ) * euclideanUnitVolume n + let Cf := (Ccut * (49152 : ℝ) ^ 2 / 18 + 1) * Cv + have hCs : 0 ≤ Cs := by dsimp only [Cs]; positivity + have hCv : 0 ≤ Cv := by dsimp only [Cv]; exact mul_nonneg (by norm_num) (euclideanUnitVolume_pos n).le + have hCf : 0 ≤ Cf := by dsimp only [Cf]; positivity + have hRvol : 0 ≤ Rvol := by dsimp only [Rvol]; positivity + have hP : Praw ≤ 2 * Cs * s ^ n * sigma ^ 2 := by + have hh := poisson_pair_mass_units μ hX.quadratic d1.source d2.source (abs_nonneg K) + (by positivity : 0 ≤ 4096 * Cχ * (J + B / 2)) i (A := A) + dsimp only at hh + rw [Real.rpow_natCast] at hh + apply hh.trans + change 2 * Cs * s ^ n * _ ≤ _ + gcongr + have hcurv : |K| * s ^ 2 ≤ 1 := by + have hsq : s ^ 2 ≤ e.heat.radius ^ 2 := by nlinarith [e.heat.radius_pos] + have hh := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hc := e.curvature + nlinarith [mul_nonneg (abs_nonneg K) (sq_nonneg e.heat.radius)] + have hvolume : μ.real (closedBall center (6 * rho)) ≤ Cv * s ^ n := by + have hh := (quarter_volume_bounds hs (euclideanUnitVolume_pos n) + (e.volume center hcenter s hs (by linarith))).2.2 + exact (measureReal_mono (closedBall_subset_ball (by dsimp only [rho]; linarith)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))).trans hh + have hF : Fcut * s ^ 2 ≤ Cf * s ^ n := + scaled_cutoff_mass_factor hs hCcut (abs_nonneg K) hCv hcurv hvolume + exact full_mass_scaling hs.le hCs hCf hRvol hP hF + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMassSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMassSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..9010b32600250a3967e51fc7df1ed8251e182072 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMassSmallness.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.RCD.Coordinates.RegularMassMatrices +import OAI.Geometry.RCD.Coordinates.RegularFrameGeometry + +namespace OAI + +/-! # Smallness of the actual full mass at the pinching radius -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- All volume and cutoff losses in the local smallness estimate. -/ +def regularSmallMassCoefficient (n : ℕ) (C : ℝ) : ℝ := + (5 / 2 : ℝ) * euclideanUnitVolume n * (8 : ℝ) ^ n * + (2 * C * (n : ℝ) ^ 2 + (n : ℝ) ^ 2 + 1) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The local Bochner cutoff calculation makes the full original mass +small in its own mean metric. Its coefficient tends to zero with the +splitting error and the rescaled curvature. -/ +theorem regular_local_mass_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (i : ℕ) (v : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (i + 15) + (r ^ 2 / r ^ n) * ⟪v, e.heat.mass.massOperator (ball q (r / 3)) v⟫_ℝ ≤ + regularSmallMassCoefficient n Cχ * (zeta + |K| * r ^ 2) * + ⟪v, e.heat.meanAt q hq (i + 15) v⟫_ℝ := by + intro r + let μ := hausdorff n X + have homega : 0 < euclideanUnitVolume n := euclideanUnitVolume_pos n + let U := sobolevColumnMap μ hX.quadratic e.heat.coordinates + let : IsFiniteMeasureOnCompacts μ := ⟨fun {_s} hs => hX.finiteOnBounded _ hs.isBounded⟩ + have hr : 0 < r := div_pos e.heat.radius_pos (by positivity) + have hrR : r ≤ e.heat.radius := div_le_self e.heat.radius_pos.le (one_le_pow₀ (by norm_num)) + have houter : e.heat.radius / (2 : ℝ) ^ (i + 12) = 8 * r := by + dsimp only [r] + rw [show i + 15 = (i + 12) + 3 by omega, pow_add] + norm_num + ring + have hcutrad : distanceSourceRadius e.heat.radius (i + 9) / 64 = r / 2 := by + dsimp only [distanceSourceRadius, r] + simp only [pow_succ] + ring + obtain ⟨_S, _T, _hsum, _hbudget, _hgrad, hcuts⟩ := e.poisson q hq + let χ : GoodLaplacianCutoff μ hX.quadratic q (r / 2) Cχ := + hcutrad ▸ Classical.choice (hcuts (i + 9)) + have hsub : ball q (2 * r) ⊆ ball base (2 * (4 * e.heat.radius)) := by + intro x hx + have hd := dist_triangle x q base + have hxq : dist x q < 2 * r := hx + have hqb : dist q base < e.heat.radius / 32 := hq + change dist x base < 2 * (4 * e.heat.radius) + linarith [e.heat.radius_pos] + let G := fun w => (e.heat.energy w).restrict μ hX.quadratic hsub + have hvol := e.volume q hq (8 * r) (by positivity) (by + rw [← houter] + have hh := div_le_self e.heat.radius_pos.le + (one_le_pow₀ (by norm_num : (1 : ℝ) ≤ 2) : (1 : ℝ) ≤ 2 ^ (i + 12)) + linarith [e.heat.radius_pos]) + have hv := quarter_volume_bounds (by positivity : 0 < 8 * r) (euclideanUnitVolume_pos n) hvol + have hfirst := e.heat.frameAt_splitting q hq (i + 12) + have hexact := e.heat.frameAt_exact q hq (i + 12) + rw [houter] at hfirst hexact + have hb := original_gram_bochner_mass_le μ hX.quadratic e.heat.coordinates e.heat.mass + G (e.heat.frameAt q hq (i + 12)) hfirst hexact hr hzeta hCχ (abs_nonneg K) hv.1 χ v + have hroom : dist q q + (1 / 8 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (i + 12)) ≤ + e.heat.radius / (2 : ℝ) ^ (i + 12) := by rw [dist_self, houter]; linarith + have hmean := (regular_subball_mean_comparison hX e hq hq hzeta (i + 12) + (by norm_num : (0 : ℝ) < 1 / 8) (by norm_num) hroom v).1 + rw [houter, show (1 / 8 : ℝ) * (8 * r) = r by ring] at hmean + have hg0 := (sobolevMeanGram_isPositive μ hX.quadratic U (ball q (8 * r)) measurableSet_ball).inner_nonneg_right v + have hsmall' := mul_le_mul_of_nonneg_right hsmall hg0 + have hmean' : ⟪v, sobolevMeanGram μ hX.quadratic U (ball q (8 * r)) measurableSet_ball v⟫_ℝ ≤ + 2 * ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ := by + nlinarith + have hg1 := (sobolevMeanGram_isPositive μ hX.quadratic U (ball q r) measurableSet_ball).inner_nonneg_right v + have hm : ⟪v, e.heat.mass.massOperator (ball q (r / 3)) v⟫_ℝ ≤ + ⟪v, e.heat.mass.massOperator (ball q (r / 2)) v⟫_ℝ := by + rw [← e.heat.mass.measure_real v _ measurableSet_ball, + ← e.heat.mass.measure_real v _ measurableSet_ball] + exact measureReal_mono (ball_subset_ball (by linarith)) (measure_ne_top _ _) + let beta := 2 * Cχ * (n : ℝ) ^ 2 * zeta + |K| * r ^ 2 * ((n : ℝ) ^ 2 * zeta + 1) + have hbeta : 0 ≤ beta := by dsimp only [beta]; positivity + have hb' : (r ^ 2 / μ.real (ball q (8 * r))) * + ⟪v, e.heat.mass.massOperator (ball q (r / 3)) v⟫_ℝ ≤ + beta * (2 * ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ) := + (mul_le_mul_of_nonneg_left hm (by positivity)).trans + (hb.trans (mul_le_mul_of_nonneg_left hmean' hbeta)) + have hratio : μ.real (ball q (8 * r)) / r ^ n ≤ (5 / 4 : ℝ) * euclideanUnitVolume n * (8 : ℝ) ^ n := by + apply (div_le_iff₀ (pow_pos hr n)).mpr + simpa only [mul_pow, mul_assoc] using hv.2.2 + have hbeta' : beta ≤ (2 * Cχ * (n : ℝ) ^ 2 + (n : ℝ) ^ 2 + 1) * (zeta + |K| * r ^ 2) := by + have hn := mul_le_mul_of_nonneg_left hzeta1 (sq_nonneg (n : ℝ)) + have hm := mul_le_mul_of_nonneg_left hn (mul_nonneg (abs_nonneg K) (sq_nonneg r)) + dsimp only [beta] + nlinarith [mul_nonneg (mul_nonneg (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) hCχ) + (sq_nonneg (n : ℝ))) (mul_nonneg (abs_nonneg K) (sq_nonneg r)), + mul_nonneg (sq_nonneg (n : ℝ)) hzeta] + have hidentity : (r ^ 2 / r ^ n) * ⟪v, e.heat.mass.massOperator (ball q (r / 3)) v⟫_ℝ = + (μ.real (ball q (8 * r)) / r ^ n) * + ((r ^ 2 / μ.real (ball q (8 * r))) * ⟪v, e.heat.mass.massOperator (ball q (r / 3)) v⟫_ℝ) := by + have hvpos : 0 < μ.real (ball q (8 * r)) := hv.1 + generalize μ.real (ball q (8 * r)) = V at hvpos ⊢ + field_simp [hr.ne', hvpos.ne'] + rw [hidentity] + change _ ≤ regularSmallMassCoefficient n Cχ * (zeta + |K| * r ^ 2) * + ⟪v, (e.heat.meanAt q hq (i + 15)).toContinuousLinearMap v⟫_ℝ + rw [e.heat.meanAt_toContinuousLinearMap] + calc + _ ≤ (μ.real (ball q (8 * r)) / r ^ n) * + (beta * (2 * ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ)) := + mul_le_mul_of_nonneg_left hb' (by positivity) + _ ≤ ((5 / 4 : ℝ) * euclideanUnitVolume n * (8 : ℝ) ^ n) * + (beta * (2 * ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ)) := + mul_le_mul_of_nonneg_right hratio (mul_nonneg hbeta (mul_nonneg (by norm_num) hg1)) + _ ≤ ((5 / 4 : ℝ) * euclideanUnitVolume n * (8 : ℝ) ^ n) * + (((2 * Cχ * (n : ℝ) ^ 2 + (n : ℝ) ^ 2 + 1) * (zeta + |K| * r ^ 2)) * + (2 * ⟪v, sobolevMeanGram μ hX.quadratic U (ball q r) measurableSet_ball v⟫_ℝ)) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hbeta' (mul_nonneg (by norm_num) hg1)) + (by positivity) + _ = _ := by dsimp only [regularSmallMassCoefficient, r, U, μ]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinching.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinching.lean new file mode 100644 index 0000000000000000000000000000000000000000..601f61f1f1dccecc92428d2c85e4fecf989bb4f2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinching.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairPinching +import OAI.Geometry.RCD.Harmonic.MeanGramInverse +import OAI.Geometry.RCD.Coordinates.FrozenNorms + +namespace OAI + +/-! # Directional pinching for the canonical inverse mean Gram -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The mean normalization in the mass estimate is on the existing dyadic +sequence, fifteen indices after the source index. -/ +theorem pinching_mean_radius (r : ℝ) (i : ℕ) : + 3 * (distanceSourceRadius r i / 49152) = r / (2 : ℝ) ^ (i + 15) := by + unfold distanceSourceRadius + rw [pow_add, pow_add] + norm_num + ring + +/-- The actual local mass matrix uses the inverse of the original mean +Gram. The exact normalization used in its proof has disappeared from the +quadratic estimate, and the physical mass scaling has been cancelled. -/ +theorem regular_pair_mean_pinching {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hhessian : LocalPoissonHessianInput hX) (hcutoff : LocalGoodCutoffInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {A B J Cχ Cg D Ca P : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hP : 0 < P) : + ∃ Cpin tau : ℝ, 0 < Cpin ∧ 0 < tau ∧ + ∀ {base first center : X} {a C enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a |K| B J C A Cχ enlargement zeta eta) + (_hfirst : first ∈ ball base (e.heat.radius / 32)) + (_hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca center), + 0 ≤ zeta → zeta ≤ tau → ∀ i, + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let rho := s / 49152 + let _U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let _delta := (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let sigma := twoCenterProjectionSource (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) + (normalizedPoissonDefect μ hX.quadratic d2.source) i + dist first center ≤ s / 512 → sigma ^ 2 ≤ tau → + regularPairProjectionSize hX e d1 d2 i ≤ P * sigma → + ∃ R : Euclidean n ≃L[ℝ] Euclidean n, + R.toContinuousLinearMap = sobolevMeanGram μ hX.quadratic + (sobolevColumnMap μ hX.quadratic e.heat.coordinates) + (ball center (3 * rho)) measurableSet_ball ∧ + R.toContinuousLinearMap.IsPositive ∧ + let D := frozenConjugate R ((s ^ 2 / s ^ n) • e.heat.mass.massOperator (ball center rho)) + D.IsPositive ∧ + ⟪e.heat.values first - e.heat.values center, + D (e.heat.values first - e.heat.values center)⟫_ℝ ≤ Cpin * s ^ 2 * sigma ^ 2 := by + obtain ⟨Cpin, tau, hCpin, htau, hpin⟩ := regular_pair_pinching hX hhessian hcutoff + haction hgradient hmean hn hA hB hJ hCχ hP (Cg := Cg) (D := D) (Ca := Ca) + refine ⟨Cpin, tau, hCpin, htau, ?_⟩ + intro base first center a C enlargement zeta eta ker hk e hfirst hcenter d1 d2 + hzeta hzt i μ s rho U delta sigma hroom hsigma hsharp + obtain ⟨N, hN, _hNnorm, hmass⟩ := hpin e hfirst hcenter d1 d2 hzeta hzt i hroom hsigma hsharp + let A := N.trans (d2.frame i) + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsub : ball center (3 * rho) ⊆ ball center (2 * s) := + ball_subset_ball (by dsimp only [rho]; linarith) + have hone := ae_restrict_of_ae_restrict_of_subset hsub (e.oneRepresentative center hcenter i) + have hraw : IsExactMeanNormalization μ hX.quadratic + (sobolevColumnMap μ hX.quadratic e.heat.coordinates) + (ball center (3 * rho)) measurableSet_ball A := by + have hh := uncentered_frame_normalization μ hX.quadratic e.heat.coordinates + e.one.sobolev (e.heat.values center) (d2.frame i) N + (ball center (3 * rho)) measurableSet_ball hone hN + have hcomp : A.toContinuousLinearMap = + (d2.frame i).toContinuousLinearMap.comp N.toContinuousLinearMap := by + ext v + rfl + change sobolevMeanGram μ hX.quadratic + ((sobolevColumnMap μ hX.quadratic e.heat.coordinates).comp A.toContinuousLinearMap) + (ball center (3 * rho)) measurableSet_ball = _ + rw [hcomp] + exact hh + let R := meanGramEquiv μ hX.quadratic (sobolevColumnMap μ hX.quadratic e.heat.coordinates) + (ball center (3 * rho)) measurableSet_ball A hraw + have hR : R.toContinuousLinearMap = sobolevMeanGram μ hX.quadratic + (sobolevColumnMap μ hX.quadratic e.heat.coordinates) + (ball center (3 * rho)) measurableSet_ball := by + ext v + rfl + have hinv : R.symm (e.heat.values first - e.heat.values center) = + d2.frame i (N (N.toContinuousLinearMap.adjoint delta)) := by + rw [meanGramEquiv_symm_apply] + have hcomp : A.toContinuousLinearMap = + (d2.frame i).toContinuousLinearMap.comp N.toContinuousLinearMap := by + ext v + rfl + rw [hcomp, ContinuousLinearMap.adjoint_comp] + rfl + have hscale : 0 ≤ s ^ 2 / s ^ n := by positivity + refine ⟨R, hR, ?_, ?_, ?_⟩ + · rw [hR] + exact sobolevMeanGram_isPositive μ hX.quadratic _ _ _ + · exact frozenConjugate_isPositive R + ((e.heat.mass.massOperator_isPositive _ measurableSet_ball).smul_of_nonneg hscale) + · rw [inner_frozenConjugate, smul_apply, inner_smul_right, hinv] + calc + _ ≤ (s ^ 2 / s ^ n) * (Cpin * s ^ n * sigma ^ 2) := + mul_le_mul_of_nonneg_left hmass hscale + _ = Cpin * s ^ 2 * sigma ^ 2 := by + field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinchingNeighborhood.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinchingNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..c978198a93df875181308af45969555ef4dad7a4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMeanPinchingNeighborhood.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularSharpNeighborhood +import OAI.Geometry.RCD.Coordinates.RegularMassMatrices + +namespace OAI + +/-! # The regular neighborhood with actual inverse mean-Gram mass matrices -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The precise published inputs construct one common harmonic/heat family +with an arbitrarily small summable source and the full directional mass +estimate for every nearby pair. No pinching hypothesis is assumed. -/ +theorem exists_regular_mean_pinching_neighborhood {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C A Cχ Cg D Ca Cpin : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ 0 < Cpin ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a |K| B J C A Cχ 1 zeta eta, + ∃ data : ∀ q, q ∈ ball p (e.heat.radius / 32) → + RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca q, + ∀ first (hfirst : first ∈ ball p (e.heat.radius / 32)) + center (hcenter : center ∈ ball p (e.heat.radius / 32)), + let d1 := data first hfirst + let d2 := data center hcenter + let sigma := twoCenterProjectionSource (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) + Summable (fun i => sigma i ^ 2) ∧ (∑' i, sigma i ^ 2) ≤ budget ∧ + ∀ i, let s := distanceSourceRadius e.heat.radius i + let _U := (centeredSobolevMap (hausdorff (m + 2) X) hX.quadratic e.heat.coordinates + e.one.sobolev (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let _delta := (d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint + (e.heat.values first - e.heat.values center) + dist first center ≤ s / 512 → + let D := e.heat.pinchingMassMatrix center hcenter i + D.IsPositive ∧ + ⟪e.heat.values first - e.heat.values center, + D (e.heat.values first - e.heat.values center)⟫_ℝ ≤ + Cpin * s ^ 2 * sigma i ^ 2 := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨B, J, C, A, Cχ, Cg, D, Ca, P, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hP, hconstruct⟩ := + exists_regular_sharp_neighborhood m hX ha (abs_nonneg K) (neg_abs_le K) hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff hharmonic + hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨Cpin, tau, hCpin, htau, hpinch⟩ := regular_pair_mean_pinching hX hhessian hcutoff haction + hgradient hmean (by omega) hA.le hB.le hJ.le (zero_le_one.trans hCχ) hP + (Cg := Cg) (D := D) (Ca := Ca) + let Q := radialFitQualitativeConstant (m + 2) Cχ + have hQ : 0 < Q := by + have hc : 0 < radialNormalizationRestrictionConstant (m + 2) := + zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + dsimp only [Q, radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * + radialNormalizationRestrictionConstant (m + 2) * _ + positivity + refine ⟨B, J, C, A, Cχ, Cg, D, Ca, Cpin, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hCpin, ?_⟩ + intro budget hbudget + let small := min budget (min tau (128 * Q * tau)) + have hsmall : 0 < small := by dsimp only [small]; positivity + obtain ⟨zeta, eta, hzeta, heta, e, hscalar, data, hpairs⟩ := hconstruct small hsmall + have hzetatau : zeta ≤ tau := by + have hb : small ≤ 128 * Q * tau := (min_le_right _ _).trans (min_le_right _ _) + have hh := hscalar.trans hb + have he := mul_pos (by norm_num : (0 : ℝ) < 128) hQ + change 128 * (Q * zeta + eta) ≤ _ at hh + nlinarith only [hh, heta, he] + refine ⟨zeta, eta, hzeta, heta, e, data, ?_⟩ + intro first hfirst center hcenter d1 d2 sigma + obtain ⟨hsum, hsumBound, hsharp⟩ := hpairs first hfirst center hcenter + refine ⟨hsum, hsumBound.trans (min_le_left _ _), ?_⟩ + intro i s U delta hroom + have hsig : sigma i ^ 2 ≤ tau := (hsum.le_tsum i (fun j _ => sq_nonneg (sigma j))).trans + (hsumBound.trans ((min_le_right _ _).trans (min_le_left _ _))) + obtain ⟨R, hR, _hRpos, hDpos, hmass⟩ := hpinch e hfirst hcenter d1 d2 hzeta.le hzetatau + i hroom hsig (hsharp i (by + rw [dist_comm] + have hs := distanceSourceRadius_pos e.heat.radius_pos i + linarith)) + have hEq := regular_pinching_matrix_identification e.heat center hcenter i R hR + rw [hEq] at hDpos hmass + exact ⟨hDpos, hmass⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMetricLimitMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMetricLimitMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..2746c0df8224f6e592548d77c8b5f922356795c2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMetricLimitMeasure.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.RegularLimitBallMass +import OAI.Geometry.RCD.Metric.MeasurablePointedSequence +import OAI.Geometry.RCD.Metric.MetricBallLawCompactness +import OAI.Geometry.RCD.Metric.ApproximationRestriction + +namespace OAI + +/-! # The actual normalized volume law on a regular metric limit + +The measure is constructed from the original Hausdorff measures and measurable +pointed maps. Its exact interior ball masses require no RCD structure on the +target metric space. +-/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] [MeasurableSpace Y] [BorelSpace Y] [ProperSpace Y] + {K : ℝ} {n : ℕ} + +theorem NoncollapsedRCD.regular_metric_limit_measure + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {o : X} (ho : IsRegular n o) + {q : Y} {S : ℝ} (hS : 0 < S) (hS5 : S ≤ 5) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) : + ∃ Q : ProbabilityMeasure Y, + (∀ᵐ z ∂(Q : Measure Y), z ∈ closedBall q S) ∧ + ∀ (z : Y) (t : ℝ), 0 < t → dist z q+t < S → + (Q : Measure Y).real (ball z t) = (t/S)^n ∧ + (Q : Measure Y).real (closedBall z t) = (t/S)^n := by + have hVr k := (hV k).restrict_radius (hr k) hS.le hS5 + (show 0 ≤ ε k from dist_nonneg.trans (hV k).1) + have h3ε : Tendsto (fun k => 3*ε k) atTop (𝓝 0) := by + simpa only [mul_zero] using hε.const_mul 3 + obtain ⟨δ,W,hδ,hWm,hW⟩ := measurable_pointed_sequence hS p r _ V hr h3ε hVr + obtain ⟨N,hN⟩ := eventually_atTop.mp (hδ.eventually (gt_mem_nhds (by norm_num : (0:ℝ)<1))) + let ps := fun k => p (k+N) + let rs := fun k => r (k+N) + let es := fun k => δ (k+N) + let Ws := fun k => W (k+N) + have hfin k : hausdorff n X (ball (ps k) (S*rs k)) ≠ ⊤ := + (hX.finiteOnBounded _ isBounded_ball).ne + have hpos k : 0 < (hausdorff n X).real (ball (ps k) (S*rs k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr _))).ne' (hfin k) + obtain ⟨Q,α,hα,hlim,-⟩ := metric_ball_law_subsequence hS.le (hausdorff n X) + ps rs es Ws (fun k => hr _) (fun k => (hN _ (Nat.le_add_left _ _)).le) + (fun k => hWm _) (fun k => hW _) hfin hpos + have he0 : Tendsto (fun k => es (α k)) atTop (𝓝 0) := + (hδ.comp (tendsto_add_atTop_nat N)).comp hα.tendsto_atTop + have hr' k : 0 < rs (α k) := hr _ + have hVm' k : Measurable (Ws (α k)) := hWm _ + have hV' k : IsPointedApproximation (ps (α k)) q (rs (α k)) S + (es (α k)) (Ws (α k)) := hW _ + refine ⟨Q,metric_ball_law_limit_support hS.le (hausdorff n X) + _ _ _ _ hr' he0 hVm' hV' (fun k => hfin _) (fun k => hpos _) hlim,?_⟩ + intro z t ht hzt + exact hX.regular_limit_ball_mass hn ho hS ht hzt _ _ _ _ + ((hp.comp (tendsto_add_atTop_nat N)).comp hα.tendsto_atTop) hr' + ((hr0.comp (tendsto_add_atTop_nat N)).comp hα.tendsto_atTop) + he0 hVm' hV' (fun k => hfin _) hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolume.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..7072c9ec51367c137c4f82f17ce5912ff4c04cfe --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolume.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Coordinates.RegularVolumeConvergence +import OAI.Geometry.RCD.Metric.PointedCompactness +import OAI.Geometry.RCD.Metric.ModelVolumeComparison +import OAI.Geometry.RCD.Metric.VolumeDensity + +namespace OAI + +/-! # Absolute volume limits at moving centers near a regular point + +The single all-center neighborhood obtained from Bishop--Gromov suffices for +arbitrary centers tending to the regular point and arbitrary shrinking radii. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +theorem regular_moving_volume_limit {μ : Measure X} (m : ℕ) {p : X} {a ω : ℝ} + (ha : 0≤a) (hω : 0<ω) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m+1) p) + (hvolume : EuclideanRescalingVolumeConvergence μ (m+1) p ω) + (hBG : BallVolumeComparison μ (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper μ (comparisonModelVolume m a) y ω) + (hfinite : ∀ y r, μ (ball y r)≠∞) + (q : ℕ → X) (r : ℕ → ℝ) (hq : Tendsto q atTop (𝓝 p)) + (hr : ∀ k, 0 μ.real (ball (q k) (r k))/(r k)^(m+1)) atTop (𝓝 ω) := by + apply Metric.tendsto_atTop.mpr + intro ε hε + let η := min 1 (ε/(2*ω)) + have hη : 0<η := lt_min zero_lt_one (div_pos hε (by positivity)) + obtain ⟨D,hD,-,hvol⟩ := exists_uniform_volume_neighborhood m ha hω hη + (min_le_left _ _) zero_lt_one hcompact hregular hvolume hBG hdensity hfinite + have hqc : ∀ᶠ k in atTop, dist p (q k) (hausdorff n X).real (ball (q k) (r k))/(r k)^n) + atTop (𝓝 (euclideanUnitVolume n)) := by + obtain ⟨m,rfl⟩ := Nat.exists_eq_succ_of_ne_zero (show n≠0 by omega) + obtain ⟨a,ha,hBG⟩ := hX.exists_model_ballVolumeComparison hn + exact RegularPointCoordinates.regular_moving_volume_limit m ha (euclideanUnitVolume_pos (m+1)) + (hX.pointedRescalingPrecompactness hn p) hp (hX.regular_volume_convergence hn hp) + hBG (hX.smallScaleVolumeUpper hn ha) + (fun y r => (hX.finiteOnBounded (ball y r) isBounded_ball).ne) + q r hq hr hr0 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolumeRatio.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolumeRatio.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d6fc4d5014d7e36e9c232ad2b8399ef6b1a0321 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularMovingVolumeRatio.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Coordinates.RegularMovingVolume + +namespace OAI + +/-! # Exact relative volume limits at moving regular centers -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} + +theorem NoncollapsedRCD.regular_moving_volume_ratio + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {o : X} (ho : IsRegular n o) + (p x : ℕ → X) (r : ℕ → ℝ) (hp : Tendsto p atTop (𝓝 o)) + (hx : Tendsto x atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) {S t : ℝ} (hS : 0 < S) (ht : 0 < t) : + Tendsto (fun k => (hausdorff n X).real (ball (x k) (t*r k)) / + (hausdorff n X).real (ball (p k) (S*r k))) atTop (𝓝 ((t/S)^n)) := by + have hnum := hX.regular_moving_volume_limit hn ho x (fun k => t*r k) hx + (fun k => mul_pos ht (hr k)) (by simpa using hr0.const_mul t) + have hden := hX.regular_moving_volume_limit hn ho p (fun k => S*r k) hp + (fun k => mul_pos hS (hr k)) (by simpa using hr0.const_mul S) + have hω := euclideanUnitVolume_pos n + have hlim := (hnum.div hden hω.ne').mul_const ((t/S)^n) + simp only [div_self hω.ne',one_mul] at hlim + convert hlim using 1 + ext k + have hb : (hausdorff n X).real (ball (p k) (S*r k)) ≠ 0 := + (ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne).ne' + change (hausdorff n X).real (ball (x k) (t*r k)) / + (hausdorff n X).real (ball (p k) (S*r k)) = + ((hausdorff n X).real (ball (x k) (t*r k))/(t*r k)^n) / + ((hausdorff n X).real (ball (p k) (S*r k))/(S*r k)^n) * (t/S)^n + rw [mul_pow,mul_pow,div_pow] + field_simp [hb, hS.ne', ht.ne', (hr k).ne'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyFrozen.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyFrozen.lean new file mode 100644 index 0000000000000000000000000000000000000000..5863e8fd9704da43e148e25c1f88151ba9f788da --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyFrozen.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Coordinates.RegularHeatFrameGeometry + +namespace OAI + +/-! # Comparing actual frozen frames at nearby centers -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The existing subball Gram estimate compares the two actual heat +frames. No continuity estimate for an arbitrarily chosen normalizer is +assumed. -/ +theorem regular_nearby_frozen_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hroom : dist z q ≤ e.heat.radius / 2 ^ (e.heat.shift + i + 17)) + (v : Euclidean n) : + ‖e.heat.frozenAt z i v‖ ≤ 3 * ‖e.heat.frozenAt q i v‖ := by + have hgram (w : Euclidean n) : + (1 / 8 : ℝ) * ⟪w, e.heat.heatAt q (e.heat.shift + i + 17) w⟫_ℝ ≤ + ⟪w, e.heat.heatAt z (e.heat.shift + i + 17) w⟫_ℝ := by + have hlo := regular_nearby_mean_heat_lower hX e hq hz hzeta hsmall + (e.heat.shift + i + 16) (by omega) + (by simpa only [show e.heat.shift + i + 16 + 1 = e.heat.shift + i + 17 by omega] using hroom) w + rw [show e.heat.shift + i + 16 + 1 = e.heat.shift + i + 17 by omega] at hlo + have hh := (e.heat.heatMeanComparison z hz (e.heat.shift + i + 17) (by omega) w).1 + change (1 - 1 / 64 : ℝ) * ⟪w, + (e.heat.meanAt z hz (e.heat.shift + i + 17)).toContinuousLinearMap w⟫_ℝ ≤ + ⟪w, e.heat.heatAt z (e.heat.shift + i + 17) w⟫_ℝ at hh + simp only [ContinuousLinearEquiv.coe_coe] at hh + have hp := (e.heat.meanAt_isPositive z hz (e.heat.shift + i + 17)).inner_nonneg_right w + change 0 ≤ ⟪w, e.heat.meanAt z hz (e.heat.shift + i + 17) w⟫_ℝ at hp + nlinarith + have hi := (relative_inverse_bounds + (e.heat.heatAt q (e.heat.shift + i + 17)) + (e.heat.heatAt z (e.heat.shift + i + 17)) + (e.heat.heatAt_isPositive q _) (e.heat.heatAt_isPositive z _) + (by norm_num : (0 : ℝ) < 1 / 8) hgram v).1 + have hsq : ‖e.heat.frozenAt z i v‖ ^ 2 ≤ 8 * ‖e.heat.frozenAt q i v‖ ^ 2 := by + rw [e.heat.frozenAt_norm_sq, e.heat.frozenAt_norm_sq] + convert hi using 1 + ring + nlinarith [norm_nonneg (e.heat.frozenAt z i v), norm_nonneg (e.heat.frozenAt q i v)] + +/-- Operator-norm form of the same comparison. -/ +theorem regular_nearby_frozen_operator {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hroom : dist z q ≤ e.heat.radius / 2 ^ (e.heat.shift + i + 17)) : + ‖(e.heat.frozenAt z i).toContinuousLinearMap.comp + (e.heat.frozenAt q i).symm.toContinuousLinearMap‖ ≤ 3 := by + apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num) + intro v + have h := regular_nearby_frozen_bound hX e hq hz hzeta hsmall i hroom + ((e.heat.frozenAt q i).symm v) + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyMidpoints.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyMidpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..c41f9fc997df993a79ebfb1bda4b405cd0be1858 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNearbyMidpoints.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Transport.NearbyPlanCompression +import OAI.Geometry.RCD.Coordinates.RegularQuadraticMidpoints + +namespace OAI + +/-! # Actual nearby-endpoint paths with simultaneous distance midpoint laws -/ + +open Set Filter Metric MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] +attribute [local instance] pathBorel pathBorelSpace + +include hX in +theorem regular_nearby_midpoints (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) (p x y : ℕ → X) (z : ℕ → ℕ → X) (R : ℕ → ℝ) + (hp : Tendsto p atTop (𝓝 o)) (hz : ∀ i, Tendsto (z i) atTop (𝓝 o)) + (hR : ∀ k, 0 < R k) (hR0 : Tendsto R atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * R k)^2) + (hx : ∀ k, dist (x k) (p k) ≤ R k/2) + (hy : ∀ k, dist (y k) (p k) ≤ R k/2) + (hzp : ∀ i k, dist (z i k) (p k) ≤ R k) : + ∃ (η : ℕ → ℝ) (γ : ℕ → C(Time,X)), Tendsto η atTop (𝓝 0) ∧ + (∀ k, 0 < η k ∧ IsGeodesic (γ k) ∧ + dist (γ k 0) (x k) < η k * R k ∧ dist (γ k 1) (y k) < η k * R k ∧ + ∀ t : Time, dist (γ k t) (p k) ≤ 3 * R k) ∧ + ∀ i, Tendsto (fun k => fullMidpointDefect (z i k) (γ k)/(R k)^2) atTop (𝓝 0) := by + let θ m := heatStep m/4 + have hθ m : 0 < θ m := div_pos (heatStep_pos m) (by norm_num) + have hθle m : θ m ≤ 1/2 := by + have hh : heatStep m ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + dsimp only [θ] + linarith + have hθ0 : Tendsto θ atTop (𝓝 0) := by + simpa only [zero_div] using heatStep_tendsto.div_const 4 + have hex m k := hX.nearby_endpoint_plan hn hK (hR k) (mul_pos (hθ m) (hR k)) + (by nlinarith [hθle m,hR k] : θ m * R k ≤ R k/2) (hx k) (hy k) (hcurv k) + choose π hπ hg hopt hc he using hex + let : ∀ m k, IsProbabilityMeasure (π m k) := hπ + let B m k := ENNReal.ofReal (segmentCost n * (R k)^n / + ((hausdorff n X).real (ball (p k) (R k)) * (θ m * R k)^n)) + have hends m i (_him : i ≤ m) k : + (∀ᵐ w ∂(π m k).map (fun γ => γ 0), dist w (z i k) ≤ (1024 * R k)/512) ∧ + (∀ᵐ w ∂(π m k).map (fun γ => γ 1), dist w (z i k) ≤ (1024 * R k)/512) := by + have hend : ∀ᵐ γ ∂π m k, + dist (γ 0) (z i k) ≤ (1024 * R k)/512 ∧ + dist (γ 1) (z i k) ≤ (1024 * R k)/512 := by + filter_upwards [he m k] with γ hγ + have ht0 := dist_triangle4 (γ 0) (x k) (p k) (z i k) + have ht1 := dist_triangle4 (γ 1) (y k) (p k) (z i k) + rw [dist_comm (p k) (z i k)] at ht0 ht1 + have hsmall : θ m * R k ≤ R k/2 := by nlinarith [hθle m,hR k] + constructor <;> linarith [hzp i k,hx k,hy k,hγ.1,hγ.2.1] + constructor + · apply (ae_map_iff (measurable_path_eval 0).aemeasurable measurableSet_closedBall).mpr + exact hend.mono fun _ h => h.1 + · apply (ae_map_iff (measurable_path_eval 1).aemeasurable measurableSet_closedBall).mpr + exact hend.mono fun _ h => h.2 + have hcompression m i (_him : i ≤ m) : ∃ C : ℝ, 0 ≤ C ∧ ∀ k, + (B m k).toReal * (hausdorff n X).real (ball (z i k) (1024 * R k)) ≤ C := + hX.near_regular_compression_bound hn ho p (z i) R hp (hz i) hR hR0 + (by norm_num) (hθ m) + let P m k (γ : C(Time,X)) := + dist (γ 0) (x k) < θ m * R k ∧ dist (γ 1) (y k) < θ m * R k ∧ + ∀ t : Time, dist (γ t) (p k) ≤ 3 * R k + obtain ⟨d,γ,hd,hγ,hlim⟩ := hX.regular_quadratic_midpoint_selection hn hK ho z + (fun _ k => 1024 * R k) hz (fun _ k => mul_pos (by norm_num) (hR k)) + (fun _ => by simpa using hR0.const_mul 1024) π hg hopt B + (fun _ _ => ENNReal.ofReal_ne_top) hc hends hcompression P he + refine ⟨fun k => θ (d k),γ,hθ0.comp hd,?_,?_⟩ + · intro k + exact ⟨hθ (d k),(hγ k).2,(hγ k).1⟩ + · intro i + have hh := (hlim i).mul_const ((1024:ℝ)^2) + simp only [zero_mul] at hh + apply hh.congr + intro k + field_simp [(hR k).ne'] + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodBilinear.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodBilinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..e392aa64927ca009f556fc70c1e3cc44a13a5a1a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodBilinear.lean @@ -0,0 +1,502 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularNeighborhoodHeat +import OAI.Geometry.RCD.Harmonic.NeighborhoodGramEnvelope +import OAI.Geometry.RCD.Heat.EventualEnvelopeOrder +import OAI.Geometry.RCD.Harmonic.ContinuousAffineImprovement + +namespace OAI + +/-! # The bilinear and cumulative heat estimates for the same regular-point data -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Published normalization, Bochner and kernel inputs produce both the actual +bilinear comparison and the three cumulative estimates with one common family. -/ +theorem regular_neighborhood_bilinear_heat_with_energy {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + : + ∃ d : ℕ, 3 ≤ d ∧ ∀ {radiusCap enlargement ζ : ℝ}, + 0 < radiusCap → 0 ≤ enlargement → 0 < ζ → + ∃ R : ℝ, ∃ hR : 0 < R, ∃ _hRcap : R ≤ radiusCap, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) (e : ℝ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (J : ℕ) (A B D H : ℝ) (L : ℝ≥0), + R ≤ 1 ∧ 0 < A ∧ 0 < B ∧ 0 < D ∧ 0 < H ∧ 0 < e ∧ e ≤ 1 ∧ + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (32 * R) e u v ∧ + (L : ℝ) ^ 2 ≤ 4 * ((m + 2 : ℕ) : ℝ) ^ 2 ∧ + (∀ z, Nonempty (LocalHarmonicEnergy (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) M |K| p (4 * R) L z)) ∧ + ∀ q ∈ ball p (R / 32), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + ((∀ v, ‖v‖ ^ 2 ≤ 2 * ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q R) measurableSet_ball v⟫_ℝ) ∧ + (∀ i, J ≤ i → ∀ v, + (1 - 1 / 64 : ℝ) * ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (1 + 1 / 64 : ℝ) * + ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball v⟫_ℝ) ∧ + (∀ i, J ≤ i → ∀ v, + ⟪v, Q (i + 1) v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ)) ∧ + (∀ (xi : Euclidean (m + 2)) (k : ℕ), + let h := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * h ∧ + ‖xi‖ ^ 2 + mass ≤ B * h ∧ h ≤ D * (‖xi‖ ^ 2 + mass)) ∧ + (∀ i, J ≤ i → ∀ y, dist q y ≤ enlargement * (R / 2 ^ i) → + ∀ b w : Euclidean (m + 2), + ⟪b, (sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) w⟫_ℝ ^ 2 ≤ + H * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope M (m + 2) q R i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ R / 16 → + HasNormalizedAffineImprovement hX u q r ((1 / 2 : ℝ) ^ d)) ∧ + ∃ S : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic q (R / 2 ^ i) ζ + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 ζ + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q))) := by + classical + let μ := hausdorff (m + 2) X + let omega := euclideanUnitVolume (m + 2) + have homega : 0 < omega := euclideanUnitVolume_pos _ + obtain ⟨Ccut, hCcut, hcut⟩ := hcutoff (by omega) + let lambda := 8 * |K| * ((m + 2 : ℕ) : ℝ) ^ 2 + 1 + have hlambda : 0 < lambda := by dsimp only [lambda]; positivity + have hVlo : 0 < omega / (2 * (2 : ℝ) ^ (m + 2)) := by positivity + have hVhi : 0 < (3 / 2 : ℝ) * omega := by positivity + obtain ⟨d, hd, δ, hδ, hδ1, haffine⟩ := affine_improvement_from_continuous_coordinates + hX (by omega) hharmonic hgradient heuclidean hmetricmeasure + obtain ⟨ε, εmass, C, N, hε, hε1, hεmass, hC, habsorb, hcontrols⟩ := + uniform_heat_controls_at_of_splitting m hX ha hBG hk hg + (L := 4 * ((m + 2 : ℕ) : ℝ) ^ 2) (B := 2) + (C := Ccut) (η := 1) (lambda := lambda) + (by positivity) (by norm_num) hVlo hVhi (by linarith) (by norm_num) hlambda + refine ⟨d, hd, ?_⟩ + intro radiusCap enlargement ζ hRadiusCap henlargement hζ + let β := min ε (min δ ζ) + let ρ := min (δ / 4) (ζ / 8) + have hβ : 0 < β := lt_min hε (lt_min hδ hζ) + have hρ : 0 < ρ := lt_min (by positivity) (by positivity) + have hβε : β ≤ ε := min_le_left _ _ + have hβδ : β ≤ δ := (min_le_right _ _).trans (min_le_left _ _) + have hβζ : β ≤ ζ := (min_le_right _ _).trans (min_le_right _ _) + have hρδ : 4 * ρ ≤ δ := by have hh := min_le_left (δ / 4) (ζ / 8); dsimp only [ρ]; linarith + have hρζ : 8 * ρ ≤ ζ := by have hh := min_le_right (δ / 4) (ζ / 8); dsimp only [ρ]; linarith + obtain ⟨R, e, hR, hRcap, hRsmall, hscale, hcurv, he, he1, L, u, v, M, hL, hu, hG, hvol, hfamily, hmetric⟩ := + regular_uniform_dyadic_data_with_cap (ρ := ρ) (β := β) (m + 1) hX (by omega) ha hcompact hregular hvolume hmeasured hBG + hdensity hinitial htrans hsplit hrigidity hbochner hRadiusCap hρ hβ + have hcurvδ : |K| * (16 * R) ^ 2 ≤ δ := hcurv.trans hβδ + have hcurv : |K| * (16 * R) ^ 2 ≤ ε := hcurv.trans hβε + have hR1 : R ≤ 1 := by linarith + have hscale' : a * (3 * R) ≤ 1 := by + have hh := mul_le_mul_of_nonneg_left (show 3 * R ≤ 48 * R by linarith) ha + linarith + have hcurv' : |K| * R ^ 2 ≤ ε := by + have hh := mul_le_mul_of_nonneg_left + (show R ^ 2 ≤ (16 * R) ^ 2 by nlinarith [sq_nonneg R]) (abs_nonneg K) + exact hh.trans hcurv + have hreg : 2 * |K| * (L : ℝ) ^ 2 + 1 ≤ lambda := by + have hh := mul_le_mul_of_nonneg_left hL (show 0 ≤ 2 * |K| by positivity) + dsimp only [lambda] + nlinarith only [hh] + let G := fun z => Classical.choice (hG z) + obtain ⟨χ, J₀, hχ⟩ := exists_fixed_cutoff_neighborhood μ hX.quadratic hk G hg hR homega + (hcurv.trans hε1) hvol (hcut p) + obtain ⟨Cg, hCg, Jg, hgram⟩ := exists_neighborhood_gram_envelope_bound μ hX.quadratic hk G χ + hg hdiff hR hR1 homega hvol henlargement lambda + let J := max Jg (max 4 (max N J₀)) + obtain ⟨b, hb, hbackground⟩ := exists_uniform_mass_background M (m + 2) hR J + obtain ⟨T, hT, hbase⟩ := exists_uniform_dyadic_heat_base μ hX.quadratic hk G χ + (show 3 * R / 8 < 4 * R by linarith) hR hlambda J + obtain ⟨A, B, D, hA, hB, hD, hresult⟩ := + exists_uniform_heat_cumulative_constants (E := Euclidean (m + 2)) hb hT hεmass hC habsorb + let H := Cg ^ 2 * (b * T + 8 * εmass) + have hH : 0 < H := by + have hb0 : 0 < b := lt_of_lt_of_le zero_lt_one hb + dsimp only [H] + positivity + refine ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, χ, J, A, B, D, H, L, + hR1, hA, hB, hD, hH, he, he1, hu, hL, (fun z => ⟨G z⟩), ?_⟩ + intro q hq + have hqp : dist q p < R / 32 := hq + have hqR : q ∈ ball p R := by change dist q p < R; linarith + obtain ⟨S, hexact, hfirst, hS0, hfirstv, hmetricS⟩ := hfamily q hqR + have hfirst' (i : ℕ) : ∃ w : X → Euclidean (m + 2), + FirstOrderSplittingOn μ hX.quadratic q (R / 2 ^ i) ε + (transformedColumn μ hX.quadratic u (S i)) w := by + obtain ⟨w, hw⟩ := hfirst i + exact ⟨w, hw.mono_error μ hX.quadratic hβ.le hβε⟩ + have hsub : ball q (2 * (2 * R)) ⊆ ball p (2 * (4 * R)) := by + intro x hx + have hxq : dist x q < 2 * (2 * R) := hx + change dist x p < 2 * (4 * R) + have hh := dist_triangle x q p + linarith + let Gq := fun z => (G z).restrict μ hX.quadratic hsub + have hvolq : ∀ y, dist q y ≤ 2 * R → ∀ s, 0 < s → s ≤ R → + |μ.real (ball y s) / (omega * s ^ (m + 2)) - 1| ≤ 1 / 2 := by + intro y hy s hs hsR + apply hvol y ?_ s hs (by linarith) + have hh := dist_triangle p q y + rw [dist_comm p q] at hh + linarith + have hgradient : ∀ z : Euclidean (m + 2), ∀ᵐ x ∂μ.restrict (ball q R), + localGamma μ hX.quadratic (sobolevColumnMap μ hX.quadratic u z) + (sobolevColumnMap μ hX.quadratic u z) x ≤ + (4 * ((m + 2 : ℕ) : ℝ) ^ 2) * ‖z‖ ^ 2 := by + intro z + filter_upwards [LocalHarmonicEnergy.gamma_bound_on_smaller_ball μ hX.quadratic Gq + (show R ≤ 2 * (2 * R) by linarith) z] with x hx + exact hx.trans (mul_le_mul_of_nonneg_right hL (sq_nonneg _)) + have hc := hcontrols R hR hR1 hscale' u M S q ε L Gq hε.le le_rfl hcurv' hreg hS0 + hexact hfirst' (hcut q) (dyadic_heat_volumes_of_common_regime μ (m + 2) q hR homega hvolq) + hgradient p (4 * R) (3 * R / 8) Ccut G χ (by positivity) (by linarith) + (hχ q hq).1 (hχ q hq).2.1 J₀ (hχ q hq).2.2 J (le_max_right _ _) + let Q := dyadicHeatGramAt μ hX.quadratic hk (sobolevColumnMap μ hX.quadratic u) χ q hR hlambda + have horder (i : ℕ) (hi : J ≤ i) (v : Euclidean (m + 2)) : + ⟪v, Q (i + 1) v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ := by + have hd := (hc.1.decrement i hi v).1 + simp only [sub_apply, inner_sub_right] at hd + change 0 ≤ ⟪v, Q i v⟫_ℝ - ⟪v, Q (i + 1) v⟫_ℝ at hd + exact ⟨sub_nonneg.mp hd, hc.1.step i hi v⟩ + refine ⟨⟨?_, hc.2, horder⟩, ?_, ?_, ?_, S, hexact, ?_, ?_⟩ + · intro v + have h := norm_apply_sq_le_of_norm_sq_le + (S 0 : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)) hS0 ((S 0).symm v) + have he := meanGram_energy_of_exact_normalization μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball q R) measurableSet_ball (S 0) + (by simpa only [pow_zero, div_one] using hexact 0) v + change ‖v‖ ^ 2 ≤ 2 * ⟪v, sobolevMeanGram μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball q R) measurableSet_ball v⟫_ℝ + rw [he] + simpa only [ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] using h + · apply hresult Q (dyadicBochnerMass M (m + 2) q R) (dyadicBochnerEnvelope M (m + 2) q R) J + (dyadicHeatGramAt_isPositive μ hX.quadratic hk _ χ q hR hlambda) + (dyadicBochnerMass_isPositive M (m + 2) q hR.le) hc.1.step hc.1.decrement hc.1.small + (hbackground q) + · exact fun z => (hbase q z).1 + · exact fun z => (hbase q z).2 + + · intro i hi y hy v w + have hpos (j : ℕ) : (Q j : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).IsPositive := + dyadicHeatGramAt_isPositive μ hX.quadratic hk _ χ q hR hlambda j + have hcurrent (z : Euclidean (m + 2)) : + ⟪z, dyadicBochnerEnvelope M (m + 2) q R i z⟫_ℝ ≤ + (b * T + 8 * εmass) * ⟪z, Q i z⟫_ℝ := by + have h := hc.1.envelope_le_current hpos hεmass (zero_le_one.trans hb) hT.le + (fun z => (hbase q z).2) (hbackground q) (i - J) z + simpa only [Nat.add_sub_of_le hi] using h + have hsource (z : Euclidean (m + 2)) : + |⟪z, (sobolevMeanGram μ hX.quadratic (sobolevColumnMap μ hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) z⟫_ℝ| ≤ + Cg * ⟪z, dyadicBochnerEnvelope M (m + 2) q R i z⟫_ℝ := by + simpa only [Q, dyadicHeatGramAt_coe] using + hgram i ((le_max_left _ _).trans hi) q hq y hy z + have hsym := (sobolevMeanGram_isPositive μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball y (R / 2 ^ i)) measurableSet_ball).isSymmetric.sub + (hpos i).isSymmetric + exact bilinear_heat_comparison_of_envelope (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)) + (dyadicBochnerEnvelope M (m + 2) q R i) + (sobolevMeanGram μ hX.quadratic (sobolevColumnMap μ hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - + (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) + (dyadicBochnerEnvelope_isPositive M (m + 2) q hR.le i) hsym hsource hcurrent v w + + · intro r hr hrR + have hsubr : ball q r ⊆ ball p (32 * R) := by + intro x hx + have hh := dist_triangle x q p + have hxq : dist x q < r := hx + change dist x p < 32 * R + linarith + have hsub4 : ball q (4 * r) ⊆ ball p (32 * R) := by + intro x hx + have hh := dist_triangle x q p + have hxq : dist x q < 4 * r := hx + change dist x p < 32 * R + linarith + have hcurvr : -δ ≤ K * r ^ 2 := by + have hrsq : r ^ 2 ≤ (16 * R) ^ 2 := + (sq_le_sq₀ hr.le (by positivity)).mpr (by linarith) + have hh := mul_le_mul_of_nonneg_left hrsq (abs_nonneg K) + have hk := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + linarith + obtain ⟨N, hN⟩ := hmetric q hqR r hr hrR + have hN' : IsPointedApproximation q 0 r 2 δ (fun x => + (N : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (N : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q)) := by + exact hN.mono_error hρδ + have hη : SobolevSpace.toLp μ hX.quadratic χ.sobolev =ᵐ[μ.restrict (ball q r)] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae χ.representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + rw [hx] + apply χ.one x + have hh := dist_triangle x q p + have hxq : dist x q < r := hxr + change dist x p < 3 * R / 8 + linarith + exact haffine q r hr hcurvr u v + (fun i => ae_restrict_of_ae_restrict_of_subset hsubr (hu.representative i)) + (hu.continuous.mono hsub4) N χ.sobolev hη hN' + + · intro i + exact (hfirstv i).mono_error μ hX.quadratic hβ.le hβζ + · intro i + exact (hmetricS i).mono_error hρζ + +/-- Retain the original uniform-degree interface. -/ +theorem regular_neighborhood_bilinear_heat_uniform_degree {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + : + ∃ d : ℕ, 3 ≤ d ∧ ∀ {radiusCap enlargement ζ : ℝ}, + 0 < radiusCap → 0 ≤ enlargement → 0 < ζ → + ∃ R : ℝ, ∃ hR : 0 < R, ∃ _hRcap : R ≤ radiusCap, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) (e : ℝ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (J : ℕ) (A B D H : ℝ), + R ≤ 1 ∧ 0 < A ∧ 0 < B ∧ 0 < D ∧ 0 < H ∧ 0 < e ∧ e ≤ 1 ∧ + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (32 * R) e u v ∧ + ∀ q ∈ ball p (R / 32), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + (∀ (xi : Euclidean (m + 2)) (k : ℕ), + let h := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * h ∧ + ‖xi‖ ^ 2 + mass ≤ B * h ∧ h ≤ D * (‖xi‖ ^ 2 + mass)) ∧ + (∀ i, J ≤ i → ∀ y, dist q y ≤ enlargement * (R / 2 ^ i) → + ∀ b w : Euclidean (m + 2), + ⟪b, (sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) w⟫_ℝ ^ 2 ≤ + H * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope M (m + 2) q R i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ R / 16 → + HasNormalizedAffineImprovement hX u q r ((1 / 2 : ℝ) ^ d)) ∧ + ∃ S : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic q (R / 2 ^ i) ζ + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 ζ + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q))) := by + obtain ⟨d, hd, hconstruct⟩ := regular_neighborhood_bilinear_heat_with_energy m hX ha + hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + refine ⟨d, hd, ?_⟩ + intro radiusCap enlargement zeta hcap henlargement hzeta + obtain ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, chi, J, A, B, D, H, _L, + hR1, hA, hB, hD, hH, he, he1, hu, _hL, _henergy, hlocal⟩ := + hconstruct hcap henlargement hzeta + exact ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, chi, J, A, B, D, H, + hR1, hA, hB, hD, hH, he, he1, hu, fun q hq => (hlocal q hq).2⟩ + +/-- The capped interface retains the original argument order. -/ +theorem regular_neighborhood_bilinear_heat_with_cap {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + {radiusCap : ℝ} (hRadiusCap : 0 < radiusCap) + {enlargement ζ : ℝ} (henlargement : 0 ≤ enlargement) (hζ : 0 < ζ) : + ∃ R : ℝ, ∃ hR : 0 < R, ∃ _hRcap : R ≤ radiusCap, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) (e : ℝ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (J d : ℕ) (A B D H : ℝ), + R ≤ 1 ∧ 3 ≤ d ∧ 0 < A ∧ 0 < B ∧ 0 < D ∧ 0 < H ∧ 0 < e ∧ e ≤ 1 ∧ + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (32 * R) e u v ∧ + ∀ q ∈ ball p (R / 32), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + (∀ (xi : Euclidean (m + 2)) (k : ℕ), + let h := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * h ∧ + ‖xi‖ ^ 2 + mass ≤ B * h ∧ h ≤ D * (‖xi‖ ^ 2 + mass)) ∧ + (∀ i, J ≤ i → ∀ y, dist q y ≤ enlargement * (R / 2 ^ i) → + ∀ b w : Euclidean (m + 2), + ⟪b, (sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) w⟫_ℝ ^ 2 ≤ + H * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope M (m + 2) q R i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ R / 16 → + HasNormalizedAffineImprovement hX u q r ((1 / 2 : ℝ) ^ d)) ∧ + ∃ S : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic q (R / 2 ^ i) ζ + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 ζ + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q))) := by + obtain ⟨d, hd, hconstruct⟩ := regular_neighborhood_bilinear_heat_uniform_degree m hX ha + hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, chi, J, A, B, D, H, + hR1, hA, hB, hD, hH, he, he1, hu, hlocal⟩ := hconstruct hRadiusCap henlargement hζ + exact ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, chi, J, d, A, B, D, H, + hR1, hd, hA, hB, hD, hH, he, he1, hu, hlocal⟩ + +/-- The uncapped heat statement follows with unit radius cap. -/ +theorem regular_neighborhood_bilinear_heat {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + {enlargement ζ : ℝ} (henlargement : 0 ≤ enlargement) (hζ : 0 < ζ) : + ∃ R : ℝ, ∃ hR : 0 < R, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) (e : ℝ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (J d : ℕ) (A B D H : ℝ), + R ≤ 1 ∧ 3 ≤ d ∧ 0 < A ∧ 0 < B ∧ 0 < D ∧ 0 < H ∧ 0 < e ∧ e ≤ 1 ∧ + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (32 * R) e u v ∧ + ∀ q ∈ ball p (R / 32), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + (∀ (xi : Euclidean (m + 2)) (k : ℕ), + let h := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * h ∧ + ‖xi‖ ^ 2 + mass ≤ B * h ∧ h ≤ D * (‖xi‖ ^ 2 + mass)) ∧ + (∀ i, J ≤ i → ∀ y, dist q y ≤ enlargement * (R / 2 ^ i) → + ∀ b w : Euclidean (m + 2), + ⟪b, (sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) w⟫_ℝ ^ 2 ≤ + H * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope M (m + 2) q R i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ R / 16 → + HasNormalizedAffineImprovement hX u q r ((1 / 2 : ℝ) ^ d)) ∧ + ∃ S : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic q (R / 2 ^ i) ζ + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 ζ + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q))) := by + obtain ⟨R, hR, _hcap, hrest⟩ := regular_neighborhood_bilinear_heat_with_cap m hX ha + hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + (radiusCap := 1) zero_lt_one henlargement hζ + exact ⟨R, hR, hrest⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodHeat.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodHeat.lean new file mode 100644 index 0000000000000000000000000000000000000000..942bb34f69ca9ba00a656340df00f3bfacb6fc24 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNeighborhoodHeat.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Sobolev.FixedCutoffNeighborhood +import OAI.Geometry.RCD.Heat.UniformHeatControlsAt +import OAI.Geometry.RCD.Heat.UniformHeatBase +import OAI.Geometry.RCD.Metric.UniformMassBackground + +namespace OAI + +/-! # Cumulative heat estimates on a regular-point neighborhood + +All centers use a common harmonic map, full positive Bochner measure, +cutoff, regularizer, and starting index. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Cumulative heat comparisons hold with common constants throughout one +neighborhood of an all-tangents regular point. No heat comparison or +coordinate conclusion is assumed in the inputs. -/ +theorem regular_neighborhood_cumulative_heat {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) : + ∃ R : ℝ, ∃ hR : 0 < R, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (J : ℕ) (A B D : ℝ), + R ≤ 1 ∧ 0 < A ∧ 0 < B ∧ 0 < D ∧ + ∀ q ∈ ball p (R / 32), ∀ (xi : Euclidean (m + 2)) (k : ℕ), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + let H := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * H ∧ + ‖xi‖ ^ 2 + mass ≤ B * H ∧ H ≤ D * (‖xi‖ ^ 2 + mass) := by + classical + let μ := hausdorff (m + 2) X + let omega := euclideanUnitVolume (m + 2) + have homega : 0 < omega := euclideanUnitVolume_pos _ + obtain ⟨Ccut, hCcut, hcut⟩ := hcutoff (by omega) + let lambda := 8 * |K| * ((m + 2 : ℕ) : ℝ) ^ 2 + 1 + have hlambda : 0 < lambda := by dsimp only [lambda]; positivity + have hVlo : 0 < omega / (2 * (2 : ℝ) ^ (m + 2)) := by positivity + have hVhi : 0 < (3 / 2 : ℝ) * omega := by positivity + obtain ⟨ε, εmass, C, N, hε, hε1, hεmass, hC, habsorb, hcontrols⟩ := + uniform_heat_controls_at_of_splitting m hX ha hBG hk hg + (L := 4 * ((m + 2 : ℕ) : ℝ) ^ 2) (B := 2) + (C := Ccut) (η := 1) (lambda := lambda) + (by positivity) (by norm_num) hVlo hVhi (by linarith) (by norm_num) hlambda + obtain ⟨R, e, hR, hRsmall, hscale, hcurv, he, he1, L, u, v, M, hL, _hu, hG, hvol, hfamily, _hmetric⟩ := + regular_uniform_dyadic_data (m + 1) hX (by omega) ha hcompact hregular hvolume hmeasured hBG + hdensity hinitial htrans hsplit hrigidity hbochner zero_lt_one hε + have hR1 : R ≤ 1 := by linarith + have hscale' : a * (3 * R) ≤ 1 := by + have hh := mul_le_mul_of_nonneg_left (show 3 * R ≤ 48 * R by linarith) ha + linarith + have hcurv' : |K| * R ^ 2 ≤ ε := by + have hh := mul_le_mul_of_nonneg_left + (show R ^ 2 ≤ (16 * R) ^ 2 by nlinarith [sq_nonneg R]) (abs_nonneg K) + exact hh.trans hcurv + have hreg : 2 * |K| * (L : ℝ) ^ 2 + 1 ≤ lambda := by + have hh := mul_le_mul_of_nonneg_left hL (show 0 ≤ 2 * |K| by positivity) + dsimp only [lambda] + nlinarith only [hh] + let G := fun z => Classical.choice (hG z) + obtain ⟨χ, J₀, hχ⟩ := exists_fixed_cutoff_neighborhood μ hX.quadratic hk G hg hR homega + (hcurv.trans hε1) hvol (hcut p) + let J := max 4 (max N J₀) + obtain ⟨b, hb, hbackground⟩ := exists_uniform_mass_background M (m + 2) hR J + obtain ⟨T, hT, hbase⟩ := exists_uniform_dyadic_heat_base μ hX.quadratic hk G χ + (show 3 * R / 8 < 4 * R by linarith) hR hlambda J + obtain ⟨A, B, D, hA, hB, hD, hresult⟩ := + exists_uniform_heat_cumulative_constants (E := Euclidean (m + 2)) hb hT hεmass hC habsorb + refine ⟨R, hR, lambda, hlambda, u, M, Ccut, χ, J, A, B, D, hR1, hA, hB, hD, ?_⟩ + intro q hq + have hqp : dist q p < R / 32 := hq + have hqR : q ∈ ball p R := by change dist q p < R; linarith + obtain ⟨S, hexact, hfirst, hS0, _hfirstv, _hmetricS⟩ := hfamily q hqR + have hsub : ball q (2 * (2 * R)) ⊆ ball p (2 * (4 * R)) := by + intro x hx + have hxq : dist x q < 2 * (2 * R) := hx + change dist x p < 2 * (4 * R) + have hh := dist_triangle x q p + linarith + let Gq := fun z => (G z).restrict μ hX.quadratic hsub + have hvolq : ∀ y, dist q y ≤ 2 * R → ∀ s, 0 < s → s ≤ R → + |μ.real (ball y s) / (omega * s ^ (m + 2)) - 1| ≤ 1 / 2 := by + intro y hy s hs hsR + apply hvol y ?_ s hs (by linarith) + have hh := dist_triangle p q y + rw [dist_comm p q] at hh + linarith + have hgradient : ∀ z : Euclidean (m + 2), ∀ᵐ x ∂μ.restrict (ball q R), + localGamma μ hX.quadratic (sobolevColumnMap μ hX.quadratic u z) + (sobolevColumnMap μ hX.quadratic u z) x ≤ + (4 * ((m + 2 : ℕ) : ℝ) ^ 2) * ‖z‖ ^ 2 := by + intro z + filter_upwards [LocalHarmonicEnergy.gamma_bound_on_smaller_ball μ hX.quadratic Gq + (show R ≤ 2 * (2 * R) by linarith) z] with x hx + exact hx.trans (mul_le_mul_of_nonneg_right hL (sq_nonneg _)) + have hc := hcontrols R hR hR1 hscale' u M S q ε L Gq hε.le le_rfl hcurv' hreg hS0 + hexact hfirst (hcut q) (dyadic_heat_volumes_of_common_regime μ (m + 2) q hR homega hvolq) + hgradient p (4 * R) (3 * R / 8) Ccut G χ (by positivity) (by linarith) + (hχ q hq).1 (hχ q hq).2.1 J₀ (hχ q hq).2.2 J le_rfl + let Q := dyadicHeatGramAt μ hX.quadratic hk (sobolevColumnMap μ hX.quadratic u) χ q hR hlambda + apply hresult Q (dyadicBochnerMass M (m + 2) q R) (dyadicBochnerEnvelope M (m + 2) q R) J + (dyadicHeatGramAt_isPositive μ hX.quadratic hk _ χ q hR hlambda) + (dyadicBochnerMass_isPositive M (m + 2) q hR.le) hc.1.step hc.1.decrement hc.1.small + (hbackground q) + · exact fun z => (hbase q z).1 + · exact fun z => (hbase q z).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNetGeometry.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNetGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0e06847922bb173edb1d08cbaf549baaa4c6294 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNetGeometry.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Coordinates.RegularHeatFrameGeometry +import OAI.Geometry.RCD.Coordinates.RegularInitialChart +import OAI.Geometry.RCD.Sobolev.BoundedDyadicScale + +namespace OAI + +/-! # The metric geometry of the actual fine heat-coordinate patches -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The net is substantially finer than the pinching mean radius, so that +all active energy centers satisfy the reverse mass-covering condition. -/ +def regularNetRadius (R : ℝ) (shift i : ℕ) : ℝ := R / (2 : ℝ) ^ (shift + i + 28) + +/-- The region is small enough that all pair comparison scales follow +the common heat comparison index. -/ +def regularPatchRegion {X : Type*} [MetricSpace X] (p : X) (R : ℝ) (shift : ℕ) : Set X := + ball p (R / (2 : ℝ) ^ (shift + 10)) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- Return the published coordinate approximation to physical distance. -/ +theorem exact_frame_pair_error {q z : X} (hq : q ∈ ball base (d.radius / 32)) + (j : ℕ) (hroom : dist z q ≤ 4 * ((d.radius / (2 : ℝ) ^ j) / 128)) : + |‖coordinateFrame (d.frameAt q hq j) (d.values z - d.values q)‖ - dist q z| ≤ + zeta * ((d.radius / (2 : ℝ) ^ j) / 128) := by + apply normalized_pair_error d.values (coordinateFrame (d.frameAt q hq j)) + (div_pos (div_pos d.radius_pos (by positivity)) (by norm_num)) ?_ hroom + simpa only [coordinateFrame_apply, map_sub] using d.frameAt_approximation q hq j + +/-- Every net neighbor lies in the core of the cutoff expressed in the +actual frozen heat coordinates. -/ +theorem net_near_pair_bound {q z : X} (hq : q ∈ ball base (d.radius / 32)) + (hzeta : zeta ≤ 1 / 64) (i : ℕ) + (hroom : dist z q ≤ regularNetRadius d.radius d.shift i) : + ‖d.frozenAt q i (d.values z - d.values q)‖ ≤ 2 * regularNetRadius d.radius d.shift i := by + let r := regularNetRadius d.radius d.shift i + have hr : 0 < r := div_pos d.radius_pos (by positivity) + have heq : (d.radius / (2 : ℝ) ^ (d.shift + i + 17)) / 128 = 16 * r := by + dsimp only [r, regularNetRadius] + rw [show d.shift + i + 28 = (d.shift + i + 17) + 11 by omega, pow_add] + norm_num + ring + have hroom' : dist z q ≤ 4 * ((d.radius / (2 : ℝ) ^ (d.shift + i + 17)) / 128) := by + rw [heq] + change dist z q ≤ r at hroom + linarith + have h := d.exact_frame_pair_error hq (d.shift + i + 17) hroom' + rw [heq] at h + have hu := (abs_le.mp h).2 + have hf := (d.mean_heat_frame_comparison q hq (d.shift + i + 17) (by omega) + (d.values z - d.values q)).2 + change ‖d.frozenAt q i (d.values z - d.values q)‖ ≤ + (3 / 2 : ℝ) * ‖coordinateFrame (d.frameAt q hq (d.shift + i + 17)) (d.values z - d.values q)‖ at hf + have hs := mul_le_mul_of_nonneg_right hzeta (show 0 ≤ 16 * r by positivity) + change _ ≤ 2 * r + rw [dist_comm q z] at hu + linarith + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularNetSeparation.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularNetSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e12d2dd2d69e1e834050f01d5a2d483aaf7b40f3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularNetSeparation.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.RCD.Coordinates.RegularNetGeometry + +namespace OAI + +/-! # Global support separation for the actual heat-coordinate patches -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- The working region lies inside the common harmonic neighborhood. -/ +theorem patch_region_subset : regularPatchRegion base d.radius d.shift ⊆ ball base (d.radius / 32) := by + apply ball_subset_ball + apply div_le_div_of_nonneg_left d.radius_pos.le (by norm_num : (0 : ℝ) < 32) + have h := one_le_pow₀ (by norm_num : (1 : ℝ) ≤ 2) (n := d.shift) + rw [pow_add] + norm_num + linarith + +/-- Pair scales inside the working region follow the common heat index. -/ +theorem patch_region_pair_bound {q z : X} + (hq : q ∈ regularPatchRegion base d.radius d.shift) + (hz : z ∈ regularPatchRegion base d.radius d.shift) : + dist z q ≤ (d.radius / (2 : ℝ) ^ d.shift) / 128 := by + have hR := d.radius_pos + have heq : d.radius / (2 : ℝ) ^ (d.shift + 10) = + ((d.radius / (2 : ℝ) ^ d.shift) / 128) / 8 := by + rw [pow_add] + norm_num + ring + have hq' : dist q base < d.radius / (2 : ℝ) ^ (d.shift + 10) := hq + have hz' : dist z base < d.radius / (2 : ℝ) ^ (d.shift + 10) := hz + rw [heq] at hq' hz' + have hh := dist_triangle z base q + rw [dist_comm base q] at hh + have ht : 0 < (d.radius / (2 : ℝ) ^ d.shift) / 128 := by positivity + linarith + +/-- Beyond the net radius, the fine frozen norm separates every pair in +the working region, including pairs outside its approximation ball. -/ +theorem net_pair_lower_bound {q z : X} + (hq : q ∈ regularPatchRegion base d.radius d.shift) + (hz : z ∈ regularPatchRegion base d.radius d.shift) + (hzeta : zeta ≤ 1 / 64) (i : ℕ) + (hfar : regularNetRadius d.radius d.shift i ≤ dist z q) : + dist z q ≤ 4 * ‖d.frozenAt q i (d.values z - d.values q)‖ := by + have hR := d.radius_pos + have hq' := d.patch_region_subset hq + let a := regularNetRadius d.radius d.shift i + let t := (d.radius / (2 : ℝ) ^ (d.shift + i + 17)) / 128 + have ha : 0 < a := div_pos d.radius_pos (by positivity) + have ht : 0 < t := by dsimp only [t]; positivity + have hta : t = 16 * a := by + dsimp only [t, a, regularNetRadius] + rw [show d.shift + i + 28 = (d.shift + i + 17) + 11 by omega, pow_add] + norm_num + ring + by_cases hclose : dist z q ≤ 4 * t + · have h := d.exact_frame_pair_error hq' (d.shift + i + 17) hclose + change |‖coordinateFrame (d.frameAt q hq' (d.shift + i + 17)) (d.values z - d.values q)‖ - dist q z| ≤ zeta * t at h + have hf := (d.mean_heat_frame_comparison q hq' (d.shift + i + 17) (by omega) (d.values z - d.values q)).1 + change ‖coordinateFrame (d.frameAt q hq' (d.shift + i + 17)) (d.values z - d.values q)‖ ≤ + (3 / 2 : ℝ) * ‖d.frozenAt q i (d.values z - d.values q)‖ at hf + have hs := mul_le_mul_of_nonneg_right hzeta ht.le + rw [hta] at hs + have hl := (abs_le.mp h).1 + rw [dist_comm q z, hta] at hl + change a ≤ dist z q at hfar + linarith + · let t0 := (d.radius / (2 : ℝ) ^ d.shift) / 128 + have ht0 : 0 < t0 := by dsimp only [t0]; positivity + have hscale (j : ℕ) : t0 / (2 : ℝ) ^ j = + (d.radius / (2 : ℝ) ^ (d.shift + j)) / 128 := by + dsimp only [t0] + rw [pow_add] + ring + obtain ⟨j, hj, hlow, hhigh⟩ := exists_bounded_dyadic_scale ht0 (lt_of_lt_of_le ha hfar) + (d.patch_region_pair_bound hq hz) (i + 17) (by rw [hscale]; change t ≤ dist z q; linarith) + have htj : 0 < t0 / (2 : ℝ) ^ j := div_pos ht0 (by positivity) + have hr : dist z q ≤ 4 * ((d.radius / (2 : ℝ) ^ (d.shift + j)) / 128) := by + rw [← hscale] + linarith + have h := d.exact_frame_pair_error hq' (d.shift + j) hr + rw [← hscale] at h + have hf := d.coarse_frame_le_frozen hq' i (d.shift + j) (by omega) (by omega) (d.values z - d.values q) + have hs := mul_le_mul_of_nonneg_right hzeta htj.le + have hl := (abs_le.mp h).1 + rw [dist_comm q z] at hl + linarith + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularOpenCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularOpenCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc30863745795a750afe3458e6323eb31fda51c2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularOpenCoordinates.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.RCD.Coordinates.RegularFrameGeometry +import OAI.Geometry.RCD.Coordinates.OpenCoordinates + +namespace OAI + +/-! # Constructive openness of the actual harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- A centered four-ball approximation restricts to the unit ball when +the error is at most half the new tolerance. -/ +theorem pointed_approximation_restrict_four {X E : Type*} + [MetricSpace X] [NormedAddCommGroup E] [NormedSpace ℝ E] + {x : X} {r epsilon : ℝ} {g : X → E} (hr : 0 < r) + (hepsilon : epsilon ≤ 1 / 2048) (hzero : g x = 0) + (hg : IsPointedApproximation x 0 r 4 epsilon g) : + IsPointedApproximation x 0 r 1 (1 / 1024) g := by + have he0 : 0 ≤ epsilon := (dist_nonneg (x := g x) (y := 0)).trans hg.1 + refine ⟨by rw [hzero, dist_self]; norm_num, ?_, ?_⟩ + · intro y z hy hz + exact (hg.2.1 y z (by linarith) (by linarith)).trans (by linarith) + · intro v hv + obtain ⟨y, hy, hyv⟩ := hg.2.2 v (by linarith) + have hmetric := hg.2.1 y x hy (by simp only [dist_self]; positivity) + rw [hzero, dist_zero_right] at hmetric + have ht : ‖g y‖ ≤ dist (g y) v + ‖v‖ := by + simpa only [sub_add_cancel, ← dist_eq_norm] using norm_add_le (g y - v) v + rw [dist_zero_right] at hv + have hb : dist y x / r ≤ 1 := by linarith [(abs_le.mp hmetric).1] + exact ⟨y, by simpa only [one_mul] using (div_le_one hr).mp hb, hyv.trans (by linarith)⟩ + +theorem regular_quarter_radius (R : ℝ) (i : ℕ) : + coordinateQuarterRadius (R / 128) i = (R / (2 : ℝ) ^ (2 * i)) / 128 := by + simp only [coordinateQuarterRadius, pow_mul] + rw [show (2 : ℝ) ^ 2 = 4 by norm_num, + show (1 / 4 : ℝ) = (4 : ℝ)⁻¹ by norm_num, inv_pow] + ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- Quarter-scale pointwise coordinate changes, extended outside the working +neighborhood only to give the total function required by the open-map API. -/ +def quarterFrame (i : ℕ) (q : X) : Euclidean n ≃L[ℝ] Euclidean n := by + classical + exact if hq : q ∈ ball base (d.radius / 32) then coordinateFrame (d.frameAt q hq (2 * i)) + else ContinuousLinearEquiv.refl ℝ (Euclidean n) + +theorem quarterFrame_eq (i : ℕ) (q : X) (hq : q ∈ ball base (d.radius / 32)) : + d.quarterFrame i q = coordinateFrame (d.frameAt q hq (2 * i)) := by + simp only [quarterFrame, dite_eq_left hq] + +end RegularBilinearData + +/-- The actual regular-neighborhood harmonic coordinates satisfy every +hypothesis of the constructive open-map argument. -/ +def regular_open_coordinate_data {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzetaSmall : zeta ≤ 1 / 2048) + (hgramSmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4) : + OpenCoordinateData (ball base (e.heat.radius / 1024)) e.heat.values + (e.heat.radius / 128) (2 * (n : ℝ)) := by + have hinside {q : X} (hq : q ∈ ball base (e.heat.radius / 1024)) : + q ∈ ball base (e.heat.radius / 32) := by + apply ball_subset_ball _ hq + linarith [e.heat.radius_pos] + refine OpenCoordinateData.of_pointed_approximation (div_pos e.heat.radius_pos (by norm_num)) + e.heat.quarterFrame ?_ ?_ ?_ + · intro i q hq _hball + let r := (e.heat.radius / (2 : ℝ) ^ (2 * i)) / 128 + have hr : 0 < r := div_pos (div_pos e.heat.radius_pos (by positivity)) (by norm_num) + have heq := regular_quarter_radius e.heat.radius i + let N := e.heat.quarterFrame i q + let g := fun x => r⁻¹ • N (e.heat.values x - e.heat.values q) + refine ⟨g, ?_, ?_⟩ + · rw [heq] + apply pointed_approximation_restrict_four hr hzetaSmall (by simp only [g, sub_self, map_zero, smul_zero]) + have h := e.heat.frameAt_approximation q (hinside hq) (2 * i) + simpa only [g, N, RegularBilinearData.quarterFrame_eq e.heat i q (hinside hq), + coordinateFrame_apply, map_sub] using h + · intro y _hy + rw [heq] + change ‖r⁻¹ • N (e.heat.values y - e.heat.values q) - + r⁻¹ • N (e.heat.values y - e.heat.values q)‖ ≤ 1 / 1024 + simp only [sub_self, norm_zero] + norm_num + · intro i x y hx hy hdist w + rw [regular_quarter_radius] at hdist + rw [e.heat.quarterFrame_eq i x (hinside hx), + e.heat.quarterFrame_eq (i + 1) y (hinside hy)] + apply coordinateFrame_le_of_mean_comparison (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball x (e.heat.radius / 2 ^ (2 * i))) + (ball y (e.heat.radius / 2 ^ (2 * (i + 1)))) measurableSet_ball measurableSet_ball + (e.heat.frameAt x (hinside hx) (2 * i)) + (e.heat.frameAt y (hinside hy) (2 * (i + 1))) + (e.heat.frameAt_exact x (hinside hx) (2 * i)) + (e.heat.frameAt_exact y (hinside hy) (2 * (i + 1))) ?_ w + intro v + have hr : 0 < e.heat.radius / (2 : ℝ) ^ (2 * i) := div_pos e.heat.radius_pos (by positivity) + have hroom : dist y x + (1 / 4 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (2 * i)) ≤ + e.heat.radius / (2 : ℝ) ^ (2 * i) := by linarith + have hb := (regular_subball_mean_comparison hX e (hinside hx) (hinside hy) hzeta + (2 * i) (by norm_num : (0 : ℝ) < 1 / 4) (by norm_num) hroom v).1 + have heq : (1 / 4 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (2 * i)) = + e.heat.radius / (2 : ℝ) ^ (2 * (i + 1)) := by + rw [show 2 * (i + 1) = 2 * i + 2 by omega, pow_add] + norm_num + ring + rw [heq] at hb + have hnonneg := (sobolevMeanGram_isPositive (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball x (e.heat.radius / 2 ^ (2 * i))) measurableSet_ball).inner_nonneg_right v + nlinarith [mul_le_mul_of_nonneg_right hgramSmall hnonneg] + · intro i q hq w + rw [e.heat.quarterFrame_eq i q (hinside hq)] + exact e.heat.coordinateFrame_lower q (hinside hq) (2 * i) w + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairBochner.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairBochner.lean new file mode 100644 index 0000000000000000000000000000000000000000..956aacce365bb3b4ea2c534ac976867d1c0885c3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairBochner.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData +import OAI.Geometry.RCD.Sobolev.ActualPoissonDifference +import OAI.Geometry.RCD.Sobolev.PoissonPairSpan +import OAI.Geometry.RCD.Sobolev.PoissonSpanLift +import OAI.Geometry.RCD.Sobolev.BochnerMassComparison +import OAI.Geometry.RCD.Transport.LocalBochnerTransport + +namespace OAI + +/-! # The common Bochner span of the constructed Poisson pair -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual pair has a single full Bochner measure. Its difference mass +is bounded by the source defects, and its coordinate block controls the +original heat measure on the smaller ball. All objects come from the cited +local calculus and cutoff inputs. -/ +theorem regular_pair_bochner {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hhessian : LocalPoissonHessianInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hn : 2 ≤ n) : + ∃ C₀ : ℝ, 1 ≤ C₀ ∧ + ∀ {base first center : X} {a B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker}, + 0 ≤ A → 0 ≤ Cχ → + ∀ (e : RegularProjectionEnvironment hX base hk a |K| B J C A Cχ enlargement zeta eta), + center ∈ ball base (e.heat.radius / 32) → + ∀ (d1 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca center) (i : ℕ), + let s := distanceSourceRadius e.heat.radius i + let f : Fin 2 → SobolevSpace (hausdorff n X) hX.quadratic := + ![d1.replacement.replacement i, d2.replacement.replacement i] + let U := sobolevColumnMap (hausdorff n X) hX.quadratic + (poissonSpan (hausdorff n X) hX.quadratic e.heat.coordinates f) + let v1 : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (0 : Fin 2)) 1 + let v2 : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (1 : Fin 2)) 1 + dist center first ≤ s / 4 → + ∃ (L : ℝ≥0) (M : PositiveBilinearMeasure X (Euclidean (n + 2))), + (∀ v, Nonempty (LocalHarmonicEnergy (hausdorff n X) hX.quadratic + U M |K| center (s / 32) L v)) ∧ + ⟪v2 - v1, M.massOperator (ball center (s / 64)) (v2 - v1)⟫_ℝ ≤ + 2 * (4096 * Cχ * (J + B / 2) * + ((d1.source.source i).real (ball first s) + (d2.source.source i).real (ball center s)) + + |K| * A ^ 2 * s ^ 2 * ((hausdorff n X).real (ball first s) + + (hausdorff n X).real (ball center s))) ∧ + ∀ b : Euclidean n, + ⟪b, e.heat.mass.massOperator (ball center (s / 49152)) b⟫_ℝ ≤ + ⟪poissonCoordinateLift b, M.massOperator (ball center (3 * (s / 49152))) + (poissonCoordinateLift b)⟫_ℝ := by + obtain ⟨C₀, hC₀, hcuts⟩ := hcutoff hn + refine ⟨C₀, hC₀, ?_⟩ + intro base first center a B J C A Cχ enlargement zeta eta Cg D Ca ker hk hA hCχ + e hcenter d1 d2 i s f U v1 v2 hroom + let μ := hausdorff n X + let hQ := hX.quadratic + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + change 2 * s ≤ e.heat.radius at hh + linarith + have hsub : ball center (s / 4) ⊆ ball base (32 * e.heat.radius) := by + intro x hx + have htri := dist_triangle x center base + have hxc := mem_ball.mp hx + have hcp := mem_ball.mp hcenter + change dist x base < 32 * e.heat.radius + linarith + have hu : ∀ j, IsSobolevHarmonicOn μ hQ (ball center (s / 4)) (e.heat.coordinates j) := + fun j => (e.heat.splitting.harmonic j).mono μ hQ hsub + have hgrad : ∀ j, ∀ᵐ x ∂μ.restrict (ball center (s / 4)), + localGamma μ hQ (e.heat.coordinates j) (e.heat.coordinates j) x ≤ (1 + (1 : ℝ)) ^ 2 := by + intro j + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub (e.heat.splitting.gradient j)] + with x hx + exact hx.trans (by nlinarith [e.heat.initialError_pos, e.heat.initialError_le_one]) + have hf1 := d1.gradient i center hroom + have hf2 := d2.gradient i center (by simp only [dist_self]; positivity) + obtain ⟨L, _hL, M, henergy, hshift, _hpair⟩ := actual_poisson_pair_span hX hhessian + (abs_nonneg K) (neg_abs_le K) hA (by norm_num : (0 : ℝ) ≤ 1) + first center center d1.source d2.source d1.replacement d2.replacement i hroom + (by simp only [dist_self]; positivity) e.heat.coordinates hu hgrad hf1 hf2 + have hv1 : U v1 = d1.replacement.replacement i := poissonSpanMap_right μ hQ e.heat.coordinates f 0 + have hv2 : U v2 = d2.replacement.replacement i := poissonSpanMap_right μ hQ e.heat.coordinates f 1 + let ell := poissonSpanLaplacian n ((n : ℝ) + |K| * (4 * s) ^ 2) + have hell1 : ell v1 = (n : ℝ) + |K| * (4 * s) ^ 2 := poissonSpanLaplacian_right _ 0 + have hell2 : ell v2 = (n : ℝ) + |K| * (4 * s) ^ 2 := poissonSpanLaplacian_right _ 1 + let : IsFiniteMeasure (μ.restrict (ball center (2 * (s / 32)))) := + isFiniteMeasure_restrict.mpr (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + have hsmall : ball center (2 * (s / 32)) ⊆ ball center (s / 4) := + ball_subset_ball (by linarith) + have hmass := actual_poisson_difference_mass_le μ hQ d1.replacement d2.replacement i + (abs_nonneg K) hCχ hroom (by simp only [dist_self]; positivity) ell + (Classical.choice (henergy v1)) (Classical.choice (henergy v2)) hv1 hv2 hell1 hell2 hshift + (d2.cutoff i) + (by simpa only [mul_pow] using ae_restrict_of_ae_restrict_of_subset hsmall hf1) + (by simpa only [mul_pow] using ae_restrict_of_ae_restrict_of_subset hsmall hf2) + dsimp only at hmass + rw [M.measure_real _ _ measurableSet_ball] at hmass + refine ⟨L, M, henergy, hmass, ?_⟩ + have hheat : ball center (2 * (s / 32)) ⊆ ball base (2 * (4 * e.heat.radius)) := by + intro x hx + have htri := dist_triangle x center base + have hxc := mem_ball.mp hx + have hcp := mem_ball.mp hcenter + change dist x base < 2 * (4 * e.heat.radius) + linarith + have hcurv : -1 ≤ K * (s / 49152) ^ 2 := by + have hsq : (s / 49152) ^ 2 ≤ e.heat.radius ^ 2 := by nlinarith [e.heat.radius_pos] + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (s / 49152)) + have hc := e.curvature + nlinarith + let χ := Classical.choice (hcuts center (s / 49152) (by positivity) hcurv) + intro b + have G := (e.heat.energy b).restrict μ hQ hheat + exact G.mass_le_of_same_energy μ hQ (Classical.choice (henergy (poissonCoordinateLift b))) + χ (by positivity) (by linarith) (by + rw [poissonSpanMap_lift μ hQ e.heat.coordinates f b]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairCommutator.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairCommutator.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f332c0ef0654d991c5e0308cb8aa46ebeb03ab4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairCommutator.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.RCD.Coordinates.RegularRebasedRadialData +import OAI.Geometry.RCD.Coordinates.RestrictedCommutatorFit + +namespace OAI + +/-! # The actual commutator on the common radial-fit ball -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [BorelSpace X] [ProperSpace X] in +/-- The centered finite column and the centered linear family are exactly +the same Sobolev map, before any local representatives are chosen. -/ +theorem centered_transformed_columnMap (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (eta : SobolevSpace μ hQ) (z : Euclidean n) : + sobolevColumnMap μ hQ (centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta) = + (centeredSobolevMap μ hQ u eta z).comp N.toContinuousLinearMap := by + apply ContinuousLinearMap.ext + intro b + have hh := centered_frame_covector_eq μ hQ u N eta z + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) (N b) (by + rw [N.symm_apply_apply, ContinuousLinearMap.adjoint_inner_left] + rfl) + simpa only [N.symm_apply_apply, ContinuousLinearMap.comp_apply, centeredSobolevMap_apply, + ContinuousLinearEquiv.coe_coe] using hh + +/-- The published commutator bound applies to any chosen radial families +on the common small ball. The sole loss is its explicit volume ratio. -/ +theorem regular_pair_commutator {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (haction : LocalPoissonHessianActionInput hX) + {base first center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let Ω := ball center (s / 2048) + dist center first ≤ s / 4 → + ∀ G H : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic, + (∀ b, SobolevSpace.toLp μ hX.quadratic (G b) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d2.replacement.replacement i) (U b)) → + (∀ b, SobolevSpace.toLp μ hX.quadratic (H b) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U b)) → + ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (G b) x - + localGamma μ hX.quadratic (d2.replacement.replacement i) (H b) x - + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U b) x) ^ 2 ∂μ) ≤ + ((5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹) * poissonCommutatorConstant n A 1 B J Cχ * + s ^ 2 * ‖b‖ ^ 2 * (normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i) := by + intro μ s U Ω hroom G H hG hH b + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + change 2 * s ≤ e.heat.radius at hh + linarith + let u := centeredColumn μ hX.quadratic + (transformedColumn μ hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + have hU : sobolevColumnMap μ hX.quadratic u = U := centered_transformed_columnMap μ hX.quadratic _ _ _ _ + have hone := e.oneRepresentative center hcenter i + have hfirst := ((d2.splitting i).mono_error μ hX.quadratic hzeta hzeta1).center μ hX.quadratic + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev hone + have hsub4 : ball center (s / 4) ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hf1 := d1.gradient i center hroom + have hf2 := d2.gradient i center (by simp only [dist_self]; positivity) + have hvolume := e.volume center hcenter (s / 64) (by positivity) (by linarith) + obtain ⟨g, h, hg, hh, he⟩ := normalized_poisson_commutator_error hX haction hκ hK hB hJ hCχ + hA (by norm_num : (0 : ℝ) ≤ 1) first center center d1.source d2.source + d1.replacement d2.replacement i hroom (by simp only [dist_self]; positivity) u + (fun j => (hfirst.harmonic j).mono μ hX.quadratic hsub4) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub4 (hfirst.gradient j)) hf1 hf2 + (d2.cutoff i) hvolume b + rw [hU] at hg hh he + have hsub : Ω ⊆ ball center (s / 64) := ball_subset_ball (by linarith) + have hbig : 0 < μ.real (ball center (s / 64)) := + (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) hvolume).1 + have hsmallVolume := e.volume center hcenter (s / 2048) (by positivity) (by linarith) + have hsmall : 0 < μ.real Ω := (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) hsmallVolume).1 + have hratio : μ.real (ball center (s / 64)) ≤ + ((5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹) * μ.real Ω := by + apply (div_le_iff₀ hsmall).mp + exact radial_fraction_volume_ratio (by positivity : 0 < s / 64) + (by norm_num : (0 : ℝ) < 1 / 32) (euclideanUnitVolume_pos n) hvolume + (by simpa only [show (1 / 32 : ℝ) * (s / 64) = s / 2048 by ring] using hsmallVolume) + have hsub64 : ball center (s / 64) ⊆ ball center (s / 4) := ball_subset_ball (by linarith) + have hf := ae_restrict_of_ae_restrict_of_subset hsub64 hf2 + have hv : ∀ᵐ x ∂μ.restrict (ball center (s / 64)), + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) + (d2.replacement.replacement i - d1.replacement.replacement i) x ≤ (2 * A * s) ^ 2 := by + have hneg : localGamma μ hX.quadratic (-d1.replacement.replacement i) (-d1.replacement.replacement i) =ᵐ[μ] + localGamma μ hX.quadratic (d1.replacement.replacement i) (d1.replacement.replacement i) := by + filter_upwards [localGamma_smul_left μ hX.quadratic (-1) (d1.replacement.replacement i) (-d1.replacement.replacement i), + localGamma_smul_right μ hX.quadratic (-1) (d1.replacement.replacement i) (d1.replacement.replacement i)] with x h1 h2 + simp only [neg_one_smul, neg_one_mul] at h1 h2 + exact h1.trans ((congrArg Neg.neg h2).trans (neg_neg _)) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub64 hf1, hf, + ae_restrict_of_ae hneg, ae_restrict_of_ae + (localGamma_add_self_le μ hX.quadratic (d2.replacement.replacement i) (-d1.replacement.replacement i))] + with x h1 h2 hneg hsum + rw [← sub_eq_add_neg, hneg] at hsum + nlinarith only [h1, h2, hsum] + have hE : 0 ≤ poissonCommutatorConstant n A 1 B J Cχ * s ^ 2 * ‖b‖ ^ 2 * + (normalizedPoissonDefect μ hX.quadratic d1.source i + normalizedPoissonDefect μ hX.quadratic d2.source i) := by + have h1 := normalizedPoissonDefect_nonneg μ hX.quadratic d1.source hκ i + have h2 := normalizedPoissonDefect_nonneg μ hX.quadratic d2.source hκ i + have := euclideanUnitVolume_pos n + dsimp only [poissonCommutatorConstant] + positivity + have hb := normalized_commutator_restrict μ hX.quadratic hsub hbig hsmall + (d2.replacement.replacement i) (d2.replacement.replacement i - d1.replacement.replacement i) + (U b) g h (G b) (H b) hf hv hg hh (hG b) (hH b) hE hratio he + convert hb using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..c55a3066505196f6b4287a21fb09c88bd0ee41fa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairCoordinates.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairCommutator +import OAI.Geometry.RCD.Coordinates.ProjectionCoordinateValues +import OAI.Geometry.RCD.Coordinates.LinearNormalization +import OAI.Geometry.RCD.Coordinates.NormalizedPairing + +namespace OAI + +/-! # The actual interior frame and coordinate values for direction recovery -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A half-unit Gram error constructs a bounded exact normalizer. -/ +theorem bounded_exact_mean_normalization (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (Ω : Set X) (hΩ : MeasurableSet Ω) + (hsmall : ‖sobolevMeanGram μ hQ U Ω hΩ - ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ 1 / 2) : + ∃ N : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ U Ω hΩ N ∧ ‖N.toContinuousLinearMap‖ ≤ 2 := by + have hl (v : Euclidean n) := inner_lower_of_sub_id_norm _ hsmall v + obtain ⟨N, hN⟩ := exists_exact_mean_normalization μ hQ U Ω hΩ (by + intro v hv + have hp := sq_pos_of_ne_zero (norm_ne_zero_iff.mpr hv) + nlinarith only [hl v, hp]) + refine ⟨N, hN, ContinuousLinearMap.opNorm_le_bound _ (by norm_num) ?_⟩ + intro v + have hh := hl (N v) + rw [meanGram_energy_of_exact_normalization μ hQ U Ω hΩ N hN, + N.symm_apply_apply] at hh + have hNv := norm_nonneg (N v) + have hv := norm_nonneg v + change ‖N v‖ ≤ 2 * ‖v‖ + nlinarith only [hh, hNv, hv, sq_nonneg (‖N v‖ - 2 * ‖v‖)] + +/-- The interior normalization and coordinate size are consequences of +the same actual splitting map used for both radial fits. -/ +theorem regular_pair_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (8192 : ℝ) ^ n) * zeta) ≤ 1 / 2) + (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let u := centeredColumn μ hX.quadratic + (transformedColumn μ hX.quadratic e.heat.coordinates (d.frame i)) + ((d.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + let V := fun x => (d.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values x - e.heat.values center) + FirstOrderSplittingOn μ hX.quadratic center (2 * s) zeta u V ∧ + V center = 0 ∧ + ∃ N : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hX.quadratic (sobolevColumnMap μ hX.quadratic u) + (ball center ((s / 2048) / 2)) measurableSet_ball N ∧ + ‖N.toContinuousLinearMap‖ ≤ 2 ∧ + ∀ b, ‖normalizeLocalL2 μ (ball center (s / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball center (s / 2048)) + (sobolevColumnMap μ hX.quadratic u b))‖ ≤ s * ‖b‖ := by + intro μ s u V + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + have hone := e.oneRepresentative center hcenter i + have hf : FirstOrderSplittingOn μ hX.quadratic center (2 * s) zeta u V := by + simpa only [V, map_sub] using (d.splitting i).center μ hX.quadratic + ((d.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev hone + have hzero : V center = 0 := by simp only [V, sub_self, map_zero] + refine ⟨hf, hzero, ?_⟩ + let Ω := ball center ((s / 2048) / 2) + have hsub : Ω ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hvol := e.volume center hcenter (2 * s) (by positivity) (by linarith) + have hvolSmall := e.volume center hcenter ((s / 2048) / 2) (by positivity) (by linarith) + have hp : 0 < μ.real Ω := (quarter_volume_bounds (by positivity) + (euclideanUnitVolume_pos n) hvolSmall).1 + have hratio : μ.real (ball center (2 * s)) ≤ + ((5 / 3 : ℝ) * (8192 : ℝ) ^ n) * μ.real Ω := by + apply (div_le_iff₀ hp).mp + have hh := radial_fraction_volume_ratio (by positivity : 0 < 2 * s) + (by norm_num : (0 : ℝ) < 1 / 8192) (euclideanUnitVolume_pos n) hvol + (by simpa only [show (1 / 8192 : ℝ) * (2 * s) = (s / 2048) / 2 by ring] using hvolSmall) + have hpow : (((1 / 8192 : ℝ) ^ n)⁻¹) = (8192 : ℝ) ^ n := by simp + rw [hpow] at hh + exact hh + have hg := meanGram_sub_id_norm_le_of_subset μ hX.quadratic u measurableSet_ball hsub + (ne_of_gt (hX.fullSupport _ _ (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport _ _ (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (by positivity : 0 ≤ (5 / 3 : ℝ) * (8192 : ℝ) ^ n) hzeta hratio hf.gram + obtain ⟨N, hN, hnorm⟩ := bounded_exact_mean_normalization μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) Ω measurableSet_ball (hg.trans hsmall) + refine ⟨N, hN, hnorm, ?_⟩ + have hsub512 : ball center (s / 512) ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hvalues := projection_coordinate_values μ hX.quadratic hs hzeta1 u V + (ContinuousLinearEquiv.refl ℝ (Euclidean n)) hzero + (fun j => ae_restrict_of_ae_restrict_of_subset hsub512 (hf.representative j)) + (by simpa only [V, map_sub, ContinuousLinearEquiv.coe_refl, + ContinuousLinearMap.adjoint_id, ContinuousLinearMap.id_apply] using d.metric i) + intro b + apply normalized_norm_le_of_bound μ _ _ _ (by positivity) + have hb := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : s / 2048 ≤ s / 512)) (hvalues b) + filter_upwards [hb, SobolevSpace.restrictLp_coe μ hX.quadratic + (ball center (s / 2048)) (sobolevColumnMap μ hX.quadratic u b)] with x hx hrep + rw [hrep] + simpa only [ContinuousLinearEquiv.coe_refl', id_eq] using hx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairDirection.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f259241ce53d8127f2b0ad95f686c2a972d7343 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairDirection.lean @@ -0,0 +1,246 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairCoordinates +import OAI.Geometry.RCD.Harmonic.TwoCenterDirectionEstimate + +namespace OAI + +/-! # Constant-direction recovery for the actual two-center replacements -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The dimensionless value coefficient after restriction and frame transport. -/ +def regularRadialValueCoefficient (n : ℕ) (B D : ℝ) : ℝ := + 2 * ((5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹) * (n : ℝ) ^ 2 * + (2 * D ^ 2 + 8192 * ((n : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n)) / 64 ^ 2 + +/-- The dimensionless energy coefficient for the same transported residual. -/ +def regularRadialEnergyCoefficient (K : ℝ) (n : ℕ) (Cg A B J Cχ D : ℝ) : ℝ := + 2 * ((5 / 3 : ℝ) * ((1 / 16 : ℝ) ^ n)⁻¹) * (n : ℝ) ^ 2 * + (radialEnergyConstant K n Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume n)) * (128 : ℝ) ^ n)) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The pairing is constructed from the actual radial derivatives. Every +smallness premise here is an explicit scalar bound on the already constructed +source envelopes; no direction or mass estimate is assumed. -/ +theorem regular_pair_direction {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (haction : LocalPoissonHessianActionInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ Cgrad Cmean : ℝ, 1 ≤ Cgrad ∧ 1 ≤ Cmean ∧ + ∀ {base first center : X} {a B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (_hfirst : first ∈ ball base (e.heat.radius / 32)) + (_hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center), + -κ ≤ K → 0 ≤ B → 0 ≤ J → 0 ≤ A → 0 ≤ Cχ → 0 ≤ zeta → zeta ≤ 1 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * zeta) ≤ 1 / 3 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (8192 : ℝ) ^ n) * zeta) ≤ 1 / 2 → + ∀ i, + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let delta := (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let Ω := ball center (s / 2048) + let E1 := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) i + let E2 := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d2.source) i + let Vc := regularRadialValueCoefficient n B D + let Ec := regularRadialEnergyCoefficient K n Cg A B J Cχ D + let Com := ((5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹) * poissonCommutatorConstant n A 1 B J Cχ * + s ^ 2 * (normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i) + let amax := 4 * (Cgrad / (s / 2048)) + let err := (2 * A * s) * Real.sqrt (Ec * E2) + Real.sqrt Com + + (A * s) * Real.sqrt (2 * (Ec * E2) + 2 * (Ec * E1)) + + Real.sqrt (2 * (Vc * s ^ 2 * E2) + 2 * (Vc * s ^ 2 * E1)) / 4 + dist first center ≤ s / 512 → -κ ≤ K * (s / 2048) ^ 2 → + 2 * ((n : ℝ) ^ 4 * Real.sqrt (2 * Ca ^ 2 * + (D ^ 2 * E1 + radialFitQualitativeConstant n Cχ * zeta))) ≤ 1 / 2 → + 2 * ((n : ℝ) ^ 4 * Real.sqrt (2 * Ca ^ 2 * + (D ^ 2 * E2 + radialFitQualitativeConstant n Cχ * zeta))) ≤ 1 / 4 → + amax * Real.sqrt (Vc * s ^ 2 * E2) ≤ 1 / 2 → + ∃ H : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic, + (∀ b, SobolevSpace.toLp μ hX.quadratic (H b) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U b)) ∧ + ∀ b, ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω + (H b - ⟪delta, b⟫_ℝ • e.one.sobolev))‖ ≤ + (Real.sqrt (2 * (Vc * s ^ 2 * E2) + 2 * (Vc * s ^ 2 * E1)) + + s * (2 * amax * err) + 2 * (2 * Cmean * err + (2 * s) * (2 * amax * err))) * ‖b‖ := by + obtain ⟨Cgrad, Cmean, hCgrad, hCmean, hrecover⟩ := two_center_direction_estimate hgradient hmean hn hκ + refine ⟨Cgrad, Cmean, hCgrad, hCmean, ?_⟩ + intro base first center a B J C A Cχ enlargement zeta eta Cg D Ca ker hk + e hfirst hcenter d1 d2 hK hB hJ hA hCχ hzeta hzeta1 hframe hgram i + μ s U delta Ω E1 E2 Vc Ec Com amax err hroom hcurv hMx hMz habsorb + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hE1 : 0 ≤ E1 := (radial_fit_pinching_envelope_budget d1.source hκ hCχ hzeta d1.summable).2.2 i |>.1 + have hE2 : 0 ≤ E2 := (radial_fit_pinching_envelope_budget d2.source hκ hCχ hzeta d2.summable).2.2 i |>.1 + have hVc : 0 ≤ Vc := by dsimp only [Vc, regularRadialValueCoefficient]; have := euclideanUnitVolume_pos n; positivity + have hEc : 0 ≤ Ec := by + have := (radialEnergyConstant_pos (K := K) (n := n) (G := Cg) (ε := 1) (A := A) hB hJ hCχ).le + dsimp only [Ec, regularRadialEnergyCoefficient] + have := euclideanUnitVolume_pos n + positivity + have hCom : 0 ≤ Com := by + have := normalizedPoissonDefect_nonneg μ hX.quadratic d1.source hκ i + have := normalizedPoissonDefect_nonneg μ hX.quadratic d2.source hκ i + have := euclideanUnitVolume_pos n + dsimp only [Com, poissonCommutatorConstant] + positivity + have hamax : 0 ≤ amax := by dsimp only [amax]; positivity + have herr : 0 ≤ err := by dsimp only [err]; positivity + obtain ⟨Ax, Gx, hAx, hx⟩ := regular_rebased_radial_data hX e hfirst hcenter d1 d2 + hκ hB hJ hCχ hzeta hframe i hroom + obtain ⟨Az, Gz, hAz, hz⟩ := regular_rebased_radial_data hX e hcenter hcenter d2 d2 + hκ hB hJ hCχ hzeta hframe i (by simp only [dist_self]; positivity) + have hAx' : ‖Ax - 1‖ ≤ 1 / 2 := hAx.trans hMx + have hAz' : ‖Az - 1‖ ≤ 1 / 4 := hAz.trans hMz + have hGx (b) := (hx b).1 + have hGz (b) := (hz b).1 + let d : Euclidean n →L[ℝ] ℝ := innerSL ℝ delta + let c := d.comp Ax + have hzv (b) : ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω (Gz b - U (Az b)))‖ ^ 2 ≤ + (Vc * s ^ 2 * E2) * ‖b‖ ^ 2 := by + have hh := (hz b).2.1 + simp only [sub_self, map_zero, inner_zero_left, zero_smul, add_zero] at hh + convert hh using 1 + dsimp only [Vc, regularRadialValueCoefficient] + ring + have hze (b) : (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic + (Gz b - U (Az b)) (Gz b - U (Az b)) x ∂μ) ≤ (Ec * E2) * ‖b‖ ^ 2 := by + have hh := (hz b).2.2 + simp only [sub_self, map_zero, inner_zero_left, zero_smul, add_zero] at hh + convert hh using 1 + dsimp only [Ec, regularRadialEnergyCoefficient] + ring + have hxv (b) : ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω (Gx b - U (Ax b) + c b • e.one.sobolev))‖ ^ 2 ≤ + (Vc * s ^ 2 * E1) * ‖b‖ ^ 2 := by + have hh := (hx b).2.1 + convert hh using 1 <;> first | rfl | (dsimp only [c, d, U, delta, μ, Ω, s, + ContinuousLinearMap.comp_apply, innerSL_apply_apply, Vc, regularRadialValueCoefficient]; ring) + have hxe (b) : (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic + (Gx b - U (Ax b) + c b • e.one.sobolev) + (Gx b - U (Ax b) + c b • e.one.sobolev) x ∂μ) ≤ (Ec * E1) * ‖b‖ ^ 2 := by + have hh := (hx b).2.2 + convert hh using 1 <;> first | rfl | (dsimp only [c, d, U, delta, μ, Ω, s, + ContinuousLinearMap.comp_apply, innerSL_apply_apply, Ec, regularRadialEnergyCoefficient]; ring) + let u := centeredColumn μ hX.quadratic + (transformedColumn μ hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + let V := fun x => (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values x - e.heat.values center) + have hU : sobolevColumnMap μ hX.quadratic u = U := centered_transformed_columnMap μ hX.quadratic _ _ _ _ + obtain ⟨hfirstOrder, hzero, N, hN, hNnorm, hvalues⟩ := regular_pair_coordinates hX e hcenter d2 hzeta hzeta1 hgram i + change ∀ b, ‖normalizeLocalL2 μ Ω _ (SobolevSpace.restrictLp μ hX.quadratic Ω + (sobolevColumnMap μ hX.quadratic u b))‖ ≤ s * ‖b‖ at hvalues + rw [hU] at hvalues + have hsub : Ω ⊆ ball center (2 * s) := ball_subset_ball (by linarith) + have hone := ae_restrict_of_ae_restrict_of_subset hsub (e.oneRepresentative center hcenter i) + have hdelta : ‖delta‖ ≤ s := by + have hh := (d2.metric i).centered_norm_error (by positivity : 0 < s / 64) (by norm_num) + (by simp only [sub_self, smul_zero]) (by linarith : dist first center ≤ 4 * (s / 64)) + simp only [← map_sub] at hh + change _ ∧ ‖(s / 64)⁻¹ • delta‖ ≤ 4 + zeta at hh + rw [norm_smul, Real.norm_eq_abs, abs_of_pos (by positivity : 0 < (s / 64)⁻¹)] at hh + have hv := mul_le_mul_of_nonneg_left hh.2 (by positivity : 0 ≤ s / 64) + rw [← mul_assoc, mul_inv_cancel₀ (by positivity : s / 64 ≠ 0), one_mul] at hv + change ‖delta‖ ≤ s / 64 * (4 + zeta) at hv + nlinarith only [hv, mul_le_mul_of_nonneg_left hzeta1 hs.le, hs.le] + have hc : ‖c‖ ≤ 2 * s := by + have hdnorm : ‖d‖ ≤ s := by simpa only [d, innerSL_apply_norm] using hdelta + have hAnorm : ‖Ax‖ ≤ 2 := by + calc + _ = ‖(Ax - 1) + 1‖ := by rw [sub_add_cancel] + _ ≤ ‖Ax - 1‖ + ‖(1 : Euclidean n →L[ℝ] Euclidean n)‖ := norm_add_le _ _ + _ ≤ 2 := by + have hid : ‖(1 : Euclidean n →L[ℝ] Euclidean n)‖ ≤ 1 := ContinuousLinearMap.norm_id_le + linarith only [hAx', hid] + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + ((mul_le_mul hdnorm hAnorm (norm_nonneg _) hs.le).trans_eq (by ring)) + have hf := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : s / 2048 ≤ s / 4)) + (d2.gradient i center (by simp only [dist_self]; positivity)) + have hfx := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : s / 2048 ≤ s / 4)) + (d1.gradient i center (by rw [dist_comm]; linarith)) + have hv : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hX.quadratic + (d2.replacement.replacement i - d1.replacement.replacement i) + (d2.replacement.replacement i - d1.replacement.replacement i) x ≤ (2 * A * s) ^ 2 := by + have hneg : localGamma μ hX.quadratic (-d1.replacement.replacement i) (-d1.replacement.replacement i) =ᵐ[μ] + localGamma μ hX.quadratic (d1.replacement.replacement i) (d1.replacement.replacement i) := by + filter_upwards [localGamma_smul_left μ hX.quadratic (-1) (d1.replacement.replacement i) (-d1.replacement.replacement i), + localGamma_smul_right μ hX.quadratic (-1) (d1.replacement.replacement i) (d1.replacement.replacement i)] with x h1 h2 + simp only [neg_one_smul, neg_one_mul] at h1 h2 + exact h1.trans ((congrArg Neg.neg h2).trans (neg_neg _)) + filter_upwards [hf, hfx, ae_restrict_of_ae hneg, ae_restrict_of_ae + (localGamma_add_self_le μ hX.quadratic (d2.replacement.replacement i) (-d1.replacement.replacement i))] + with x h1 h2 h3 h4 + rw [← sub_eq_add_neg, h3] at h4 + nlinarith only [h1, h2, h4] + have hH (b) := radial_difference_representative μ hX.quadratic Ω + (d2.replacement.replacement i) (d1.replacement.replacement i) (U b) (Gz b) (Gx b) (hGz b) (hGx b) + have hcomm (b) := regular_pair_commutator hX haction e hcenter d1 d2 hκ hK hB hJ hA hCχ hzeta hzeta1 i + (by rw [dist_comm]; linarith) Gz (Gz - Gx) hGz hH b + have hanorm : 2 * ‖N.toContinuousLinearMap‖ * (Cgrad / (s / 2048)) ≤ amax := by + dsimp only [amax] + nlinarith only [mul_le_mul_of_nonneg_right hNnorm (by positivity : 0 ≤ Cgrad / (s / 2048))] + have hasmall : 2 * ‖N.toContinuousLinearMap‖ * (Cgrad / (s / 2048)) * + Real.sqrt (Vc * s ^ 2 * E2) ≤ 1 / 2 := + (mul_le_mul_of_nonneg_right hanorm (Real.sqrt_nonneg _)).trans habsorb + have hr := hrecover center (s / 2048) (by positivity) hcurv u V N hN + (fun j => (hfirstOrder.harmonic j).mono μ hX.quadratic hsub) + (hfirstOrder.continuous.mono hsub) hzero + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hfirstOrder.representative j)) + e.one.sobolev (d2.replacement.replacement i) (d1.replacement.replacement i) + Gz Gx Az Ax c d (A * s) (2 * A * s) (Vc * s ^ 2 * E2) (Vc * s ^ 2 * E1) + (Ec * E2) (Ec * E1) s (2 * s) Com + dsimp only at hr + rw [hU] at hr + have hcomm' (b) : (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (Gz b) x - + localGamma μ hX.quadratic (d2.replacement.replacement i) ((Gz - Gx) b) x - + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U b) x) ^ 2 ∂μ) ≤ + Com * ‖b‖ ^ 2 := by + convert hcomm b using 1 + dsimp only [Com] + ring + obtain ⟨_, _, hdir⟩ := hr (by positivity) (by positivity) (by positivity) (by positivity) + (by positivity) (by positivity) hs.le hCom hAz' hAx' hasmall rfl hc hone hvalues hf hv + hGz hGx hzv hxv hze hxe hcomm' + have he : (2 * A * s) * Real.sqrt (Ec * E2) + Real.sqrt Com + + (A * s) * Real.sqrt (2 * (Ec * E2) + 2 * (Ec * E1)) + + Real.sqrt (2 * (Vc * s ^ 2 * E2) + 2 * (Vc * s ^ 2 * E1)) * ‖Az - 1‖ ≤ err := by + dsimp only [err] + nlinarith only [mul_le_mul_of_nonneg_left hAz' + (Real.sqrt_nonneg (2 * (Vc * s ^ 2 * E2) + 2 * (Vc * s ^ 2 * E1)))] + refine ⟨Gz - Gx, hH, ?_⟩ + intro b + apply (hdir b).trans + apply mul_le_mul_of_nonneg_right _ (norm_nonneg b) + have hamul := mul_le_mul hanorm he (by positivity) hamax + have hcmul := mul_le_mul_of_nonneg_left he (by linarith : 0 ≤ Cmean) + dsimp only + nlinarith only [mul_le_mul_of_nonneg_left hamul hs.le, hcmul] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairEndpoints.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c026774aeac71e0f4f1964723705b72aa79fd23 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairEndpoints.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.RegularEllipsoids + +namespace OAI + +/-! # Ambient pair separation at the scale selected by the iteration -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +theorem source_eq_ellipsoidRadius (R : ℝ) (shift i : ℕ) : + distanceSourceRadius R (shift + i) = 8388608 * regularEllipsoidRadius R shift i := by + unfold distanceSourceRadius regularEllipsoidRadius iterationRadius + rw [show shift + i + 17 = (shift + i + 1) + 16 by omega, pow_add] + norm_num + ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- The precise approximation error is small relative to the original +ambient pair distance at the chosen dyadic scale. -/ +theorem pair_endpoints_at_scale {L : ℝ} (hL : 2097152 ≤ L) + (hzeta : 0 ≤ zeta) (hzetaL : zeta * L ≤ 2097152) + (i : ℕ) {q z : X} (hq : q ∈ ball base (d.radius / 32)) + (hlow : L * dist q z ≤ distanceSourceRadius d.radius (d.shift + i)) + (hupp : distanceSourceRadius d.radius (d.shift + i) ≤ 2 * L * dist q z) : + (1 / 4 : ℝ) * dist q z ≤ ‖d.frozenAt q i (d.values z - d.values q)‖ ∧ + ‖d.frozenAt q i (d.values z - d.values q)‖ ≤ 4 * dist q z := by + let rho := regularEllipsoidRadius d.radius d.shift i + have heq := source_eq_ellipsoidRadius d.radius d.shift i + change distanceSourceRadius d.radius (d.shift + i) = 8388608 * rho at heq + have haux : (d.radius / (2 : ℝ) ^ (d.shift + i + 17)) / 128 = rho := by + unfold rho regularEllipsoidRadius iterationRadius + ring + have hroom : dist z q ≤ 4 * ((d.radius / (2 : ℝ) ^ (d.shift + i + 17)) / 128) := by + rw [dist_comm, haux] + rw [heq] at hlow + have h := mul_le_mul_of_nonneg_right hL (dist_nonneg (x := q) (y := z)) + linarith + have herr : zeta * rho ≤ dist q z / 2 := by + have hu := mul_le_mul_of_nonneg_left hupp hzeta + have hh := mul_le_mul_of_nonneg_right hzetaL (dist_nonneg (x := q) (y := z)) + rw [heq] at hu + nlinarith only [hu, hh] + have happ := d.exact_frame_pair_error hq (d.shift + i + 17) hroom + rw [haux] at happ + have hm := d.mean_heat_frame_comparison q hq (d.shift + i + 17) (by omega) (d.values z - d.values q) + change ‖coordinateFrame (d.frameAt q hq (d.shift + i + 17)) (d.values z - d.values q)‖ ≤ + (3 / 2 : ℝ) * ‖d.frozenAt q i (d.values z - d.values q)‖ ∧ + ‖d.frozenAt q i (d.values z - d.values q)‖ ≤ + (3 / 2 : ℝ) * ‖coordinateFrame (d.frameAt q hq (d.shift + i + 17)) (d.values z - d.values q)‖ at hm + constructor <;> linarith [(abs_le.mp happ).1, (abs_le.mp happ).2, + dist_nonneg (x := q) (y := z)] + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairFrames.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..0663ee8320b8f7162ea9e27971ffede467bb49cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairFrames.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData +import OAI.Geometry.RCD.Coordinates.NearbyExactFrames + +namespace OAI + +/-! # Uniform comparisons between the actual neighboring radial frames -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The frames supplied by the common heat construction satisfy the +published overlap estimate at every admissible pair and dyadic scale. -/ +theorem regular_pair_frame_bounds {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base first center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hfirst : first ∈ ball base (e.heat.radius / 32)) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) + (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * zeta) ≤ 1 / 3) + (i : ℕ) (hroom : dist first center ≤ distanceSourceRadius e.heat.radius i / 4) : + ‖(d1.frame i).symm.toContinuousLinearMap.comp (d2.frame i).toContinuousLinearMap‖ ≤ Real.sqrt 2 ∧ + ‖(d2.frame i).symm.toContinuousLinearMap.comp (d1.frame i).toContinuousLinearMap‖ ≤ Real.sqrt 2 := by + have hs : 0 < distanceSourceRadius e.heat.radius i := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : distanceSourceRadius e.heat.radius i ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + linarith + exact nearby_exact_frames hX e.heat.coordinates first center hs hzeta hroom + (d1.frame i) (d2.frame i) _ _ hsmall (d1.splitting i) (d2.splitting i) + (d1.exactFrame i) (d2.exactFrame i) + (e.volume first hfirst _ (by positivity) (by linarith)) + (e.volume center hcenter _ (by positivity) (by linarith)) + (e.volume center hcenter _ hs (by linarith)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairGradient.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a9052f55a74fa53722850da0548aa5a65e3e3d2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairGradient.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairProjection +import OAI.Geometry.RCD.Sobolev.PoissonProjectionGradient + +namespace OAI + +/-! # Harmonic residual gradients in the common regular neighborhood -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual sharp projection bound supplies an actual Sobolev residual +and a uniform physical gradient estimate, in the same centered heat frame. -/ +theorem regular_pair_projection_gradient {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {P : ℝ} (hP : 0 < P) : + ∃ Q : ℝ, 0 < Q ∧ + ∀ {base first center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker}, + 0 ≤ κ → + ∀ (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta), + center ∈ ball base (e.heat.radius / 32) → + ∀ (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) (i : ℕ), + let s := distanceSourceRadius e.heat.radius i + let uc := centeredColumn (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + dist center first ≤ s / 4 → ∀ source : ℝ, 0 ≤ source → + regularPairProjectionSize hX e d1 d2 i ≤ P * source → + ∃ (c : ℝ) (b : Euclidean n) (w : SobolevSpace (hausdorff n X) hX.quadratic), + w = d2.replacement.replacement i - d1.replacement.replacement i - + (c • e.one.sobolev + sobolevColumnMap (hausdorff n X) hX.quadratic uc b) ∧ + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball center ((1 / 2048) * s)) w ∧ + ∀ᵐ x ∂(hausdorff n X).restrict (ball center ((1 / 4096) * s)), + localGamma (hausdorff n X) hX.quadratic w w x ≤ Q ^ 2 * s ^ 2 * source ^ 2 := by + obtain ⟨Q, hQ, hbound⟩ := poisson_projection_gradient hX hgradient hn hP + refine ⟨Q, hQ, ?_⟩ + intro base first center a κ B J C A Cχ enlargement zeta eta Cg D Ca ker hk hκ + e hcenter d1 d2 i s uc hroom source hsource hsize + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + change 2 * s ≤ e.heat.radius at hh + linarith + have hsq : s ^ 2 ≤ e.heat.radius ^ 2 := by nlinarith [e.heat.radius_pos] + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg s) + have he := e.curvature + have hkR := mul_nonneg hκ (sq_nonneg e.heat.radius) + have hcurv : -1 ≤ K * s ^ 2 := by nlinarith + have hone := e.oneRepresentative center hcenter i + have hfirst := (d2.splitting i).center (hausdorff n X) hX.quadratic + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) + e.one.sobolev hone + have hsub : ball center ((1 / 2048) * s) ⊆ ball center (2 * s) := + ball_subset_ball (by linarith) + obtain ⟨c, b, w, hw, hharm, _, hgrad⟩ := hbound d1.source d2.source + d1.replacement d2.replacement i hroom hcurv uc e.one.sobolev + (fun j => (hfirst.harmonic j).mono (hausdorff n X) hX.quadratic hsub) + (ae_restrict_of_ae_restrict_of_subset hsub hone) source hsource hsize + exact ⟨c, b, w, hw, hharm, hgrad⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..548f909095782005563961d8b8c090d8927fca66 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairMass.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.RCD.Sobolev.CenteredPoissonPinching +import OAI.Geometry.RCD.Coordinates.RegularPairBochner + +namespace OAI + +/-! # Full original heat mass from the actual two-center estimates -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The two estimates already proved for the actual replacements control +an actual direction of the original heat measure, including singular mass. -/ +theorem regular_pair_mass_from_estimates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hhessian : LocalPoissonHessianInput hX) (hcutoff : LocalGoodCutoffInput hX) (hn : 2 ≤ n) : + ∃ Ccut : ℝ, 1 ≤ Ccut ∧ + ∀ {base first center : X} {a B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a |K| B J C A Cχ enlargement zeta eta) + (_hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca center), + 0 ≤ A → 0 ≤ Cχ → 0 ≤ zeta → zeta ≤ 1 → + (n : ℝ) ^ 2 * (pinchingFrameVolumeRatio n * zeta) ≤ 1 / 2 → + ∀ i, + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let rho := s / 49152 + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let delta := (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let Ω := ball center (s / 2048) + let Rvol := (5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹ + let Praw := 2 * (4096 * Cχ * (J + B / 2) * + ((d1.source.source i).real (ball first s) + (d2.source.source i).real (ball center s)) + + |K| * A ^ 2 * s ^ 2 * (μ.real (ball first s) + μ.real (ball center s))) + let Fcut := ((Ccut / (3 * rho) ^ 2) / 2 + |K|) * μ.real (closedBall center (6 * rho)) + dist center first ≤ s / 4 → + ∀ (c : ℝ) (b : Euclidean n) (Q L sigma : ℝ), 0 ≤ Q → 0 ≤ L → 0 ≤ sigma → + ∀ Hpair : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic, + (∀ v, SobolevSpace.toLp μ hX.quadratic (Hpair v) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U v)) → + (∀ v, ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω (Hpair v - ⟪delta, v⟫_ℝ • e.one.sobolev))‖ ≤ + (L * s * sigma) * ‖v‖) → + (∀ᵐ x ∂μ.restrict (ball center (s / 4096)), + localGamma μ hX.quadratic + (d2.replacement.replacement i - d1.replacement.replacement i - (c • e.one.sobolev + U b)) + (d2.replacement.replacement i - d1.replacement.replacement i - (c • e.one.sobolev + U b)) x ≤ + Q ^ 2 * s ^ 2 * sigma ^ 2) → + ∃ N : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hX.quadratic U (ball center (3 * rho)) measurableSet_ball N ∧ + ‖N.toContinuousLinearMap‖ ≤ 2 ∧ + let v := d2.frame i (N (N.toContinuousLinearMap.adjoint delta)) + ⟪v, e.heat.mass.massOperator (ball center rho) v⟫_ℝ ≤ + 4 * (Praw + Fcut * (Q ^ 2 * s ^ 2 * sigma ^ 2)) + + 4 * (Fcut * (16 * (n : ℝ) ^ 2)) * + ((2 * Real.sqrt Rvol * (L * s * sigma)) ^ 2 + Q ^ 2 * s ^ 2 * sigma ^ 2) := by + obtain ⟨Ccut, hCcut, hcuts⟩ := hcutoff hn + obtain ⟨_, _, hpair⟩ := regular_pair_bochner hX hhessian hcutoff hn + refine ⟨Ccut, hCcut, ?_⟩ + intro base first center a B J C A Cχ enlargement zeta eta Cg D Ca ker hk e hcenter d1 d2 + hA hCχ hzeta hzeta1 hsmall i μ s rho U delta Ω Rvol Praw Fcut hroom c b Q L sigma hQ hL hsigma Hpair hrep hfit hgrad + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + have hrad : 0 < 3 * rho := by dsimp only [rho]; positivity + have hcurv : -1 ≤ K * (3 * rho) ^ 2 := by + have hsq : (3 * rho) ^ 2 ≤ e.heat.radius ^ 2 := by dsimp only [rho]; nlinarith [e.heat.radius_pos] + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (3 * rho)) + have hc := e.curvature + nlinarith [mul_nonneg (abs_nonneg K) (sq_nonneg e.heat.radius)] + let chi := Classical.choice (hcuts center (3 * rho) hrad hcurv) + obtain ⟨N, hN, hNnorm, hcoord⟩ := regular_pinching_frame hX e hcenter d2 hzeta hzeta1 hsmall i + refine ⟨N, hN, hNnorm, ?_⟩ + obtain ⟨Ljoint, M, henergy, hraw, hcompare⟩ := hpair hA hCχ e hcenter d1 d2 i hroom + let f : Fin 2 → SobolevSpace μ hX.quadratic := ![d1.replacement.replacement i, d2.replacement.replacement i] + let v1 : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (0 : Fin 2)) 1 + let v2 : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (1 : Fin 2)) 1 + have hsub : ball center (3 * rho) ⊆ Ω := ball_subset_ball (by dsimp only [rho]; linarith) + have hclosed : closedBall center (6 * rho) ⊆ ball center (2 * s) := + closedBall_subset_ball (by dsimp only [rho]; linarith) + have hone := ae_restrict_of_ae_restrict_of_subset hclosed (e.oneRepresentative center hcenter i) + have honeSmall := ae_restrict_of_ae_restrict_of_subset + (ball_subset_closedBall.trans (closedBall_subset_closedBall (by linarith : 3 * rho ≤ 6 * rho))) hone + have hvolBig := e.volume center hcenter (s / 2048) (by positivity) (by linarith) + have hvolSmall := e.volume center hcenter (3 * rho) hrad (by dsimp only [rho]; linarith) + have hpBig : 0 < μ.real Ω := (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) hvolBig).1 + have hpSmall : 0 < μ.real (ball center (3 * rho)) := (quarter_volume_bounds hrad (euclideanUnitVolume_pos n) hvolSmall).1 + have hratio : μ.real Ω ≤ Rvol * μ.real (ball center (3 * rho)) := by + apply (div_le_iff₀ hpSmall).mp + exact radial_fraction_volume_ratio (by positivity : 0 < s / 2048) + (by norm_num : (0 : ℝ) < 1 / 8) (euclideanUnitVolume_pos n) hvolBig + (by simpa only [rho, show (1 / 8 : ℝ) * (s / 2048) = 3 * (s / 49152) by ring] using hvolSmall) + have herror := pinching_pairing_restrict μ hX.quadratic hsub + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hpBig hpSmall + e.one.sobolev honeSmall Hpair delta N hNnorm + (by dsimp only [Rvol]; positivity) (by positivity : 0 ≤ L * s * sigma) hratio hfit + have hsmallraw : ⟪v2 - v1, M.massOperator (ball center (3 * rho)) (v2 - v1)⟫_ℝ ≤ Praw := by + apply le_trans _ hraw + rw [← M.measure_real _ _ measurableSet_ball, ← M.measure_real _ _ measurableSet_ball] + exact measureReal_mono (ball_subset_ball (by dsimp only [rho]; linarith)) (measure_ne_top _ _) + have hsmallgrad := ae_restrict_of_ae_restrict_of_subset + (closedBall_subset_ball (by dsimp only [rho]; linarith : 6 * rho < s / 4096)) hgrad + have hsmallrep (v : Euclidean n) := ae_restrict_of_ae_restrict_of_subset hsub (hrep (N v)) + have h2rho : 2 * (3 * rho) = 6 * rho := by ring + have hm := centered_poisson_directional_mass (beta := Q ^ 2 * s ^ 2 * sigma ^ 2) + (P := Praw) (H := 16 * (n : ℝ) ^ 2) (D := 2 * Real.sqrt Rvol * (L * s * sigma)) + μ hX.quadratic e.heat.coordinates f e.one.sobolev + (e.heat.values center) delta b c (d2.frame i) N (Hpair.comp N.toContinuousLinearMap) M chi + hrad (by dsimp only [rho]; linarith : 3 * rho < s / 32) + (by linarith : 0 ≤ Ccut) (abs_nonneg K) (by positivity : 0 ≤ 16 * (n : ℝ) ^ 2) + (by positivity : 0 ≤ 2 * Real.sqrt Rvol * (L * s * sigma)) hpSmall + (by + rw [h2rho] + filter_upwards [hone] with x hx + exact hx) hN + (fun v => Classical.choice (henergy v)) + (by simpa [μ, f, U, h2rho] using hsmallgrad) + (by simpa [μ, rho, s, h2rho] using hcoord) hsmallrep herror hsmallraw + have htest := hcompare (d2.frame i (N (N.toContinuousLinearMap.adjoint delta))) + apply htest.trans + simpa only [Fcut, h2rho] using hm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairPinching.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairPinching.lean new file mode 100644 index 0000000000000000000000000000000000000000..bff5349a41e3273eca37d781df19224efbb22596 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairPinching.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.RCD.Coordinates.RegularUniformDirection +import OAI.Geometry.RCD.Coordinates.RegularPairGradient +import OAI.Geometry.RCD.Coordinates.RegularMassScale + +namespace OAI + +/-! # Directional pinching for the actual original heat measure -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The sharp projection estimate and the constructed radial fits imply +full directional pinching, with a uniform constant and source tolerance. +The direction is expressed in the actual exact mean-Gram frame on the +mass-test ball. -/ +theorem regular_pair_pinching {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hhessian : LocalPoissonHessianInput hX) (hcutoff : LocalGoodCutoffInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {A B J Cχ Cg D Ca P : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hP : 0 < P) : + ∃ Cpin tau : ℝ, 0 < Cpin ∧ 0 < tau ∧ + ∀ {base first center : X} {a C enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a |K| B J C A Cχ enlargement zeta eta) + (_hfirst : first ∈ ball base (e.heat.radius / 32)) + (_hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca center), + 0 ≤ zeta → zeta ≤ tau → ∀ i, + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let rho := s / 49152 + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let delta := (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let sigma := twoCenterProjectionSource (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) + (normalizedPoissonDefect μ hX.quadratic d2.source) i + dist first center ≤ s / 512 → sigma ^ 2 ≤ tau → + regularPairProjectionSize hX e d1 d2 i ≤ P * sigma → + ∃ N : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hX.quadratic U (ball center (3 * rho)) measurableSet_ball N ∧ + ‖N.toContinuousLinearMap‖ ≤ 2 ∧ + let v := d2.frame i (N (N.toContinuousLinearMap.adjoint delta)) + ⟪v, e.heat.mass.massOperator (ball center rho) v⟫_ℝ ≤ Cpin * s ^ n * sigma ^ 2 := by + obtain ⟨L, t, hL, ht, hdir⟩ := regular_pair_direction_uniform hX haction hgradient hmean hn + (abs_nonneg K) (neg_abs_le K) hA hB hJ hCχ (Cg := Cg) (D := D) (Ca := Ca) + obtain ⟨Q, hQ, hgradientPair⟩ := regular_pair_projection_gradient hX hgradient hn hP + obtain ⟨Ccut, hCcut, hmass⟩ := regular_pair_mass_from_estimates hX hhessian hcutoff hn + let G := (n : ℝ) ^ 2 * pinchingFrameVolumeRatio n + have hG : 0 ≤ G := by dsimp only [G, pinchingFrameVolumeRatio]; positivity + let t2 := 1 / (2 * (G + 1)) + have ht2 : 0 < t2 := by dsimp only [t2]; positivity + let tau := min t t2 + let Cpin := max (regularPinchingMassConstant n Ccut A B J Cχ Q L) 1 + refine ⟨Cpin, tau, lt_of_lt_of_le zero_lt_one (le_max_right _ _), lt_min ht ht2, ?_⟩ + intro base first center a C enlargement zeta eta ker hk e hfirst hcenter d1 d2 hzeta hzt + i μ s rho U delta sigma hroom hsigma hsharp + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hz2 : zeta ≤ t2 := hzt.trans (min_le_right _ _) + have hzbound : zeta * (2 * (G + 1)) ≤ 1 := (le_div_iff₀ (by positivity)).mp hz2 + have hzeta1 : zeta ≤ 1 := by nlinarith [mul_nonneg hG hzeta] + have hsmall : (n : ℝ) ^ 2 * (pinchingFrameVolumeRatio n * zeta) ≤ 1 / 2 := by + have hh : G * zeta ≤ 1 / 2 := by nlinarith only [hzbound, hzeta] + simpa only [G, mul_assoc] using hh + have hE1 := (radial_fit_pinching_envelope_budget d1.source (abs_nonneg K) hCχ hzeta d1.summable).2.2 i + have hE2 := (radial_fit_pinching_envelope_budget d2.source (abs_nonneg K) hCχ hzeta d2.summable).2.2 i + have hsig0 : 0 ≤ sigma := Real.sqrt_nonneg _ + have hsigSq : sigma ^ 2 = + pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) i + + pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d2.source) i := + Real.sq_sqrt (add_nonneg hE1.1 hE2.1) + obtain ⟨Hpair, hrep, hfit⟩ := hdir e hfirst hcenter d1 d2 hzeta + (hzt.trans (min_le_left _ _)) i hroom (by rw [← hsigSq]; exact hsigma.trans (min_le_left _ _)) + obtain ⟨c, b, w, hw, _hharm, hgrad⟩ := hgradientPair (abs_nonneg K) e hcenter d1 d2 i + (by rw [dist_comm]; linarith) sigma hsig0 hsharp + have hU := centered_transformed_columnMap μ hX.quadratic e.heat.coordinates (d2.frame i) + e.one.sobolev (e.heat.values center) + rw [hw, hU] at hgrad + have hgrad' : ∀ᵐ x ∂μ.restrict (ball center (s / 4096)), + localGamma μ hX.quadratic + (d2.replacement.replacement i - d1.replacement.replacement i - (c • e.one.sobolev + U b)) + (d2.replacement.replacement i - d1.replacement.replacement i - (c • e.one.sobolev + U b)) x ≤ Q ^ 2 * s ^ 2 * sigma ^ 2 := by + have hr : (1 / 4096 : ℝ) * distanceSourceRadius e.heat.radius i = s / 4096 := by + dsimp only [s] + ring + rw [hr] at hgrad + exact hgrad + obtain ⟨N, hN, hNnorm, hm⟩ := hmass e hcenter d1 d2 hA hCχ hzeta hzeta1 hsmall i + (by rw [dist_comm]; linarith) c b Q L sigma hQ.le hL.le hsig0 Hpair hrep hfit hgrad' + refine ⟨N, hN, hNnorm, hm.trans ?_⟩ + have hsource : normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i ≤ sigma ^ 2 := by + rw [hsigSq] + exact add_le_add hE1.2 hE2.2 + apply (regular_pair_mass_scaling hX e hcenter d1 d2 (by linarith : 0 ≤ Ccut) hB hJ hCχ i hsource).trans + dsimp only [Cpin] + gcongr + exact le_max_left _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairProjection.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..4583afaac423b3b19af19e8eee2dde1ddda7bff8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairProjection.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Coordinates.RegularSharpSources + +namespace OAI + +/-! # The physical two-center projection size in the common coordinate map -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual normalized least-squares residual of the two replacements. -/ +def regularPairProjectionSize {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base first center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) (i : ℕ) : ℝ := + let s := distanceSourceRadius e.heat.radius i + let uc := centeredColumn (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + ‖normalizeLocalL2 (hausdorff n X) (ball center ((1 / 2048) * s)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic + (radiusScaledColumns (hausdorff n X) hX.quadratic s uc) + (ball center ((1 / 2048) * s)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball center ((1 / 2048) * s)) + ((s ^ 2)⁻¹ • (d2.replacement.replacement i - d1.replacement.replacement i))))‖ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairingChoiceBound.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairingChoiceBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfa2c3e1b17d4a82b9e42a84e1bec558ee010b33 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairingChoiceBound.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairingShiftedBound +import OAI.Geometry.RCD.Coordinates.RegularHessianCore + +namespace OAI + +/-! # The shifted estimate on every Dirichlet test + +The finite regular-family estimate applies to the actual dense core of a +local Hessian pairing, and continuity then gives the full Dirichlet bound. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_pairing_shifted_bound_any_core {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (f a : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (p : X) {R : ℝ} (hR : 0 c) + {J : ℝ} (hJK : J≤K) + (F₀ : SobolevSpace (hausdorff n X) hX.quadratic) (σ : Measure X) [IsFiniteMeasure σ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val f.val) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J f.val f.val df df σ.toSignedMeasure)) + {t : ℝ} (ht : t≤R) + (d : ℝ) + (hf : IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball p t) f.val c) + (ha : IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball p t) a.val d) + (G : LocalHessianPairing (hausdorff n X) hX.quadratic (ball p t) f.val a.val) + (B : ℝ) (hB : 0≤B) + (hgrad : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), localGamma (hausdorff n X) hX.quadratic a.val a.val x≤B) : + ∀ (b : ℝ) (φ : SobolevSpace.dirichlet (hausdorff n X) hX.quadratic (ball p t)), + (G.hessian φ-b*energyForm (hausdorff n X) hX.quadratic a.val φ.val)^2≤ + (B*(σ.real (ball p t)-(2*b*c-(n:ℝ)*b^2)*(hausdorff n X).real (ball p t)))* + energyForm (hausdorff n X) hX.quadratic φ.val φ.val := by + let μ := hausdorff n X + let hQ := hX.quadratic + obtain ⟨H,hcore,_,hess⟩ := hX.hessian_pairing_regular_core hn p isOpen_ball f a c d hf ha G + have hmem (φ : H.core) : φ.val.val∈compactLaplacianCore μ hQ univ := by + have hp : φ.val∈regularDirichletCore μ hQ (ball p t) := by + rw [← hcore] + exact φ.property + change φ.val.val∈compactLaplacianCore μ hQ (ball p t) at hp + obtain ⟨⟨v,L,hv,hvc,_,hrep⟩,hlap⟩ := hp + exact ⟨⟨v,L,hv,hvc,subset_univ _,hrep⟩,hlap⟩ + have hh := hX.regular_pairing_shifted_bound hn hscalar f a p hR df qf hqf A hdf hsf c hc + hJK F₀ σ hF₀ hσ ht H hmem B hB hgrad + simpa only [hess] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPairingShiftedBound.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPairingShiftedBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b059a3546dfb5adeaf1c6589eaa56d00273f858 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPairingShiftedBound.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.RCD.Coordinates.RegularTripleHessian +import OAI.Geometry.RCD.Sobolev.HessianActionCoreIntegral + +namespace OAI + +/-! # The shifted estimate on every Dirichlet test + +The finite regular-family estimate applies to the actual dense core of a +local Hessian pairing, and continuity then gives the full Dirichlet bound. +-/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_pairing_shifted_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (f a : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (p : X) {R : ℝ} (hR : 0 c) + {J : ℝ} (hJK : J≤K) + (F₀ : SobolevSpace (hausdorff n X) hX.quadratic) (σ : Measure X) [IsFiniteMeasure σ] + (hF₀ : SobolevSpace.toLp (hausdorff n X) hX.quadratic F₀ + =ᵐ[(hausdorff n X).restrict (ball p R)] localGamma (hausdorff n X) hX.quadratic f.val f.val) + (hσ : IsMeasureLaplacianOn (hausdorff n X) hX.quadratic (ball p R) F₀ + (bochnerGramSource (hausdorff n X) hX.quadratic J f.val f.val df df σ.toSignedMeasure)) + {t : ℝ} (ht : t≤R) + (G : LocalHessianPairing (hausdorff n X) hX.quadratic (ball p t) f.val a.val) + (hcore : ∀ φ : G.core, φ.val.val∈compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (B : ℝ) (hB : 0≤B) + (hgrad : ∀ᵐ x ∂(hausdorff n X).restrict (ball p t), localGamma (hausdorff n X) hX.quadratic a.val a.val x≤B) : + ∀ (b : ℝ) (φ : SobolevSpace.dirichlet (hausdorff n X) hX.quadratic (ball p t)), + (G.hessian φ-b*energyForm (hausdorff n X) hX.quadratic a.val φ.val)^2≤ + (B*(σ.real (ball p t)-(2*b*c-(n:ℝ)*b^2)*(hausdorff n X).real (ball p t)))* + energyForm (hausdorff n X) hX.quadratic φ.val φ.val := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + let hQ := hX.quadratic + let : IsFiniteMeasure (μ.restrict (ball p t)) := ⟨by + simpa only [Measure.restrict_apply_univ,μ] using hX.finiteOnBounded (ball p t) isBounded_ball⟩ + have hsub : ball p t ⊆ ball p R := ball_subset_ball ht + have hget (φ : G.core) : ∃ Fga Fgφ Gaφ : SobolevSpace μ hQ, + SobolevSpace.toLp μ hQ Fga =ᵐ[μ] localGamma μ hQ f.val a.val ∧ + SobolevSpace.toLp μ hQ Fgφ =ᵐ[μ] localGamma μ hQ f.val φ.val.val ∧ + SobolevSpace.toLp μ hQ Gaφ =ᵐ[μ] localGamma μ hQ a.val φ.val.val ∧ + (∀ᵐ x ∂μ.restrict (ball p R), (SobolevSpace.toLp μ hQ df x)^2≤(n:ℝ)*(σ.rnDeriv μ x).toReal) ∧ + ∀ b : ℝ, ∀ᵐ x ∂μ.restrict (ball p R), + (localHessianAction μ hQ f.val a.val φ.val.val Fga Fgφ Gaφ x- + b*localGamma μ hQ a.val φ.val.val x)^2≤ + ((σ.rnDeriv μ x).toReal-2*b*SobolevSpace.toLp μ hQ df x+(n:ℝ)*b^2)* + localGamma μ hQ a.val a.val x*localGamma μ hQ φ.val.val φ.val.val x := by + exact hX.regular_core_triple_hessian_on_measure hn hscalar f a ⟨φ.val.val,hcore φ⟩ + p hR df qf hqf A hdf hsf hJK F₀ σ hF₀ hσ + intro b + obtain ⟨_,_,_,_,_,_,hdim,_⟩ := hget 0 + have hn0 : 0<(n:ℝ) := by exact_mod_cast (by omega : 0 f.energy q i) hne + (fun _ => ⟨f.floor i, f.floor_pos i, fun q _ => f.energy_floor q i⟩) + refine ⟨center, fun j => ⟨(hcenter j).1, d.pinchingMassMatrix_isPositive _ _ i, ?_⟩⟩ + intro x hx + exact centered_patch_energy_le + (X := {q : X // q ∈ ball base (d.radius / 32)}) (E := Euclidean n) + (energy := fun q => f.energy q i) (fun q => d.values q.val) + (d.pinchingMassMatrix (center j).val (center j).property i) + hC ((hcenter j).2 x hx) + (f.directional x (center j) i (hdiam j x hx (center j) (hcenter j).1)) + +/-- Apply the selection to the actual normalized cutoffs of a localized +finite cover. The overlap radius controls the pair distance required by +pinching; no regularity of the source energy is needed. -/ +theorem RegularPinchingField.exists_normalized_centers {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta C budget : ℝ} {d : RegularBilinearData hX base hk enlargement zeta} + (f : RegularPinchingField d C budget) (hC : 0 ≤ C) (i : ℕ) + (A : Set X) (r : ℝ≥0) (T : X → Euclidean n →L[ℝ] Euclidean n) + (psi : Euclidean n → ℝ) (s : Finset X) {N : ℕ} {L R : ℝ} + (cover : IsLocalizedPatchCover A r d.values s (normalizedPatchCutoff r d.values T psi) N L R) + (hzero : psi 0 = 1) (hA : A ⊆ ball base (d.radius / 32)) + (hsmall : 2 * L * (r : ℝ) ≤ distanceSourceRadius d.radius i / 512) : + ∃ center : {y : X // y ∈ s} → {q : X // q ∈ ball base (d.radius / 32)}, + ∀ y, (center y).val ∈ normalizedPatchDomain A r d.values T psi y.val ∧ + ∀ x : {q : X // q ∈ ball base (d.radius / 32)}, + x.val ∈ normalizedPatchDomain A r d.values T psi y.val → + ⟪d.values x.val - d.values (center y).val, + d.pinchingMassMatrix (center y).val (center y).property i + (d.values x.val - d.values (center y).val)⟫_ℝ ≤ + (3 * C) * (distanceSourceRadius d.radius i) ^ 2 * f.energy x i := by + let patch := fun y : {y : X // y ∈ s} => + {q : {q : X // q ∈ ball base (d.radius / 32)} | + q.val ∈ normalizedPatchDomain A r d.values T psi y.val} + have hne (y) : (patch y).Nonempty := by + refine ⟨⟨y.val, hA (cover.center_mem y.property)⟩, ?_⟩ + exact self_mem_normalizedPatchDomain A r d.values T psi (cover.center_mem y.property) hzero + have hdiam (y) (x) (hx : x ∈ patch y) (z) (hz : z ∈ patch y) : + dist x.val z.val ≤ distanceSourceRadius d.radius i / 512 := by + have hx' := cover.active_localized x.val hx.1 y.val y.property hx.2 + have hz' := cover.active_localized z.val hz.1 y.val y.property hz.2 + have ht := dist_triangle x.val y.val z.val + rw [dist_comm y.val z.val] at ht + linarith + obtain ⟨center, hc⟩ := f.exists_patch_centers hC i patch hne hdiam + exact ⟨center, fun y => ⟨(hc y).1, fun x hx => (hc y).2.2 x hx⟩⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchCumulative.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchCumulative.lean new file mode 100644 index 0000000000000000000000000000000000000000..0aef88b819322bbf5d17c90302fb30546aaec5b0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchCumulative.lean @@ -0,0 +1,175 @@ +import OAI.Geometry.RCD.Coordinates.RegularShiftedCentralMass + +namespace OAI + +/-! # Cumulative comparison for the actual pinching matrices -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- A positive rescaling of the central mass changes only the finite constant. -/ +theorem central_comparison_rescale {H t mass T c : ℝ} + (ht : 0 ≤ t) (hm : 0 ≤ mass) (hT : 0 ≤ T) (hc : 0 < c) + (h : H ≤ T * (t + mass)) : + H ≤ (T * (1 + c⁻¹)) * (t + c * mass) := by + have heq : (1 + c⁻¹) * (t + c * mass) = + (t + mass) + (c * mass + c⁻¹ * t) := by + field_simp + ring + calc + H ≤ T * (t + mass) := h + _ ≤ T * ((t + mass) + (c * mass + c⁻¹ * t)) := + mul_le_mul_of_nonneg_left (le_add_of_nonneg_right (by positivity)) hT + _ = _ := by rw [← heq]; ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Actual raw masses, mean inverses and a strictly interior central heat +scale satisfy both cumulative comparisons. All matrix changes and the +reverse covering are derived from the constructed data. -/ +theorem regular_patch_cumulative_comparison {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (N : ℕ) : + ∃ Theta tau : ℝ, 0 < Theta ∧ 0 < tau ∧ ∀ epsilon : ℝ, 0 ≤ epsilon → epsilon ≤ tau → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + ∀ {ι : Type*} (s : ℕ → Finset ι) + (centers : ℕ → ι → {z : X // z ∈ ball base (e.heat.radius / 32)}) + (weight : ℕ → ι → ℝ), + (∀ i, (s i).card ≤ N) → ∀ q, q ∈ ball base (e.heat.radius / 32) → + (∀ i y, y ∈ s i → dist (centers i y).val q ≤ + (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) / 12) → + (∀ i y, y ∈ s i → dist q (centers i y).val ≤ + enlargement * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15))) → + (∀ i y, y ∈ s i → 0 ≤ weight i y) → + (∀ i, ∃ y ∈ s i, weight i y = 1) → + ∀ (xi : Euclidean n) (k : ℕ), + let D := fun i y => e.heat.pinchingMassMatrix (centers i y).val (centers i y).property + (e.heat.shift + i) + (‖xi‖ ^ 2 + (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪xi, D i y xi⟫_ℝ) ≤ + Theta * ‖e.heat.frozenAt q k xi‖ ^ 2) ∧ + (‖e.heat.frozenAt q k xi‖ ^ 2 ≤ Theta * + (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ∑ y ∈ s i, weight i y * ⟪xi, D i y xi⟫_ℝ)) := by + classical + obtain ⟨T, hT, hcentral⟩ := e.heat.shifted_central_mass_comparison + let c := patchCentralFactor n + have hc : 0 < c := by dsimp only [c, patchCentralFactor]; positivity + let K₀ := T * (1 + c⁻¹) + let U := (N : ℝ) * patchEnvelopeFactor n * e.heat.envelopeConstant + let V := (N : ℝ) * (32 * e.heat.comparisonConstant * e.heat.envelopeConstant + 4) + have hK₀ : 0 < K₀ := mul_pos hT (by positivity) + have hU : 0 ≤ U := by + dsimp only [U, patchEnvelopeFactor] + have hA := e.heat.envelopeConstant_pos + positivity + have hV : 0 ≤ V := by + dsimp only [V] + have hA := e.heat.envelopeConstant_pos + have hC := e.heat.comparisonConstant_pos + positivity + let Theta := e.heat.lowerConstant + 2 * (U + V) + 4 * K₀ + 1 + let tau := min 1 (1 / (4 * K₀ * (V + 1))) + have hTheta : 0 < Theta := by dsimp only [Theta]; linarith [e.heat.lowerConstant_pos] + have htau : 0 < tau := lt_min zero_lt_one (by positivity) + refine ⟨Theta, tau, hTheta, htau, ?_⟩ + intro epsilon hepsilon hetau hcoefficient ι s centers weight hcard q hq hroom henlargement hweight hcover xi k D + have hepsilon1 : epsilon ≤ 1 := hetau.trans (min_le_left _ _) + have habsorb : 2 * K₀ * V * epsilon ≤ 1 / 2 := by + have h := (le_div_iff₀ (by positivity : 0 < 4 * K₀ * (V + 1))).mp + (hetau.trans (min_le_right _ _)) + have hp := mul_nonneg hK₀.le hepsilon + nlinarith only [h, hp] + let Q := fun i => e.heat.heatAt q (e.heat.shift + i + 17) + let R := fun i y => e.heat.meanAt (centers i y).val (centers i y).property (e.heat.shift + i + 15) + let C₀ := fun i y => rawPinchingMass e.heat.mass n e.heat.radius (centers i y).val (e.heat.shift + i) + let a₀ := fun i => (Q i).symm xi + let z₀ := fun i y => (R i y).symm xi + let N₀ := fun i => c • dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) + let H := ‖e.heat.frozenAt q k xi‖ ^ 2 + have hC₀ (i y) (_hy : y ∈ s i) : (C₀ i y).IsPositive := by + apply (e.heat.mass.massOperator_isPositive _ measurableSet_ball).smul_of_nonneg + have hs := distanceSourceRadius_pos e.heat.radius_pos (e.heat.shift + i) + positivity + have hroom' i y (hy : y ∈ s i) : dist (centers i y).val q ≤ + e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := div_pos e.heat.radius_pos (by positivity) + linarith [hroom i y hy] + have hsmallC i y (hy : y ∈ s i) (v : Euclidean n) : + ⟪v, C₀ i y v⟫_ℝ ≤ epsilon * ⟪v, Q i v⟫_ℝ := by + have h := regular_raw_patch_mass_small hX e hq (centers i y).property + hzeta hzeta1 hCχ hsmall hnear (e.heat.shift + i) (by omega) (hroom' i y hy) v + exact h.trans (mul_le_mul_of_nonneg_right (hcoefficient i) ((e.heat.heatAt_isPositive q _).inner_nonneg_right v)) + have herr : (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z₀ i y - a₀ i, C₀ i y (z₀ i y - a₀ i)⟫_ℝ) ≤ V * epsilon * H := by + have h := normalization_mass_errors_sum_le (fun i => (Q i).toContinuousLinearMap) C₀ s + (fun i y => z₀ i y - a₀ i) hsmallC k + have he := regular_shifted_inverse_errors_sum_le hX e hq hzeta hnear s centers N hcard + hroom' henlargement xi k + dsimp only at he + rw [← e.heat.frozenAt_norm_sq q k xi] at he + change _ ≤ V * H at he + have hm := mul_le_mul_of_nonneg_left he hepsilon + simp only [ContinuousLinearEquiv.coe_coe] at h + change epsilon * (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z₀ i y - a₀ i, Q i (z₀ i y - a₀ i)⟫_ℝ) ≤ epsilon * (V * H) at hm + exact (h.trans hm).trans_eq (by ring) + have hu : (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪a₀ i, C₀ i y (a₀ i)⟫_ℝ) ≤ U * H := + e.heat.raw_patch_mass_sum_le hq s (fun i y => (centers i y).val) N hcard hroom xi k + have hcent : H ≤ K₀ * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ⟪a₀ i, N₀ i (a₀ i)⟫_ℝ) := by + have h := (hcentral q hq xi k).2 + have hm : 0 ≤ ∑ i ∈ Finset.range k, + ⟪a₀ i, dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) (a₀ i)⟫_ℝ := + Finset.sum_nonneg (fun i _ => (dyadicBochnerMass_isPositive e.heat.mass n q e.heat.radius_pos.le _).inner_nonneg_right _) + have ht := central_comparison_rescale (sq_nonneg ‖xi‖) hm hT.le hc h + simpa only [N₀, smul_apply, inner_smul_right, ← Finset.mul_sum] using ht + have hcover' i : ∃ y ∈ s i, weight i y = 1 ∧ ∀ v, ⟪v, N₀ i v⟫_ℝ ≤ ⟪v, C₀ i y v⟫_ℝ := by + obtain ⟨y, hy, hw⟩ := hcover i + refine ⟨y, hy, hw, ?_⟩ + intro v + simpa only [N₀, smul_apply, inner_smul_right] using + rawPinchingMass_covers_central e.heat.mass n e.heat.radius_pos (e.heat.shift + i) (hroom i y hy) v + have hh := local_mass_cumulative_comparison N₀ C₀ s weight a₀ z₀ hC₀ hweight hcover' + (sq_nonneg ‖e.heat.frozenAt q k xi‖) hK₀.le k hu herr hcent habsorb + have hD (i y) : ⟪xi, D i y xi⟫_ℝ = ⟪z₀ i y, C₀ i y (z₀ i y)⟫_ℝ := by + change ⟪xi, frozenConjugate (R i y) (C₀ i y) xi⟫_ℝ = _ + exact inner_frozenConjugate _ _ _ _ + simp_rw [hD] + have hmass0 : 0 ≤ ∑ i ∈ Finset.range k, ⟪a₀ i, + dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) (a₀ i)⟫_ℝ := + Finset.sum_nonneg (fun i _ => (dyadicBochnerMass_isPositive e.heat.mass n q e.heat.radius_pos.le _).inner_nonneg_right _) + have hnorm : ‖xi‖ ^ 2 ≤ e.heat.lowerConstant * H := by + have hl := (hcentral q hq xi k).1 + change ‖xi‖ ^ 2 + _ ≤ e.heat.lowerConstant * H at hl + linarith only [hl, hmass0] + have hprincipal : 0 ≤ ∑ i ∈ Finset.range k, ∑ y ∈ s i, weight i y * ⟪z₀ i y, C₀ i y (z₀ i y)⟫_ℝ := + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun y hy => mul_nonneg (hweight i y hy) ((hC₀ i y hy).inner_nonneg_right _))) + have hscale : e.heat.lowerConstant + 2 * (U + V * epsilon) ≤ Theta := by + have h := mul_le_mul_of_nonneg_left hepsilon1 hV + dsimp only [Theta] + nlinarith only [h, hK₀] + constructor + · have hb := hh.1 + have hc := mul_le_mul_of_nonneg_right hscale (sq_nonneg ‖e.heat.frozenAt q k xi‖) + change _ ≤ Theta * H + nlinarith only [hb, hc, hnorm] + · have h2 : 2 * K₀ ≤ Theta := by dsimp only [Theta]; linarith [e.heat.lowerConstant_pos] + have h4 : 4 * K₀ ≤ Theta := by dsimp only [Theta]; linarith [e.heat.lowerConstant_pos] + have h := add_le_add (mul_le_mul_of_nonneg_right h2 (sq_nonneg ‖xi‖)) + (mul_le_mul_of_nonneg_right h4 hprincipal) + exact hh.2.trans (by convert h using 1; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchHeatComparison.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchHeatComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..d252dcc8122760ce3c5bdc8fde5a95166bede847 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchHeatComparison.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Coordinates.RegularPinchingSmallness +import OAI.Geometry.RCD.Coordinates.RegularFrozenMetrics + +namespace OAI + +/-! # Actual heat comparison across the full support of a pinching patch -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- One outer normalized ball compares every mean whose center can lie +in the support of the actual patch. The mean radius is 1/64 of that ball. -/ +theorem regular_patch_mean_heat_lower {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 15) + (hroom : dist z q ≤ 32 * (e.heat.radius / (2 : ℝ) ^ (i + 15))) (v : Euclidean n) : + (1 / 4 : ℝ) * ⟪v, e.heat.heatAt q (i + 15) v⟫_ℝ ≤ + ⟪v, e.heat.meanAt z hz (i + 15) v⟫_ℝ := by + let r := e.heat.radius / (2 : ℝ) ^ (i + 15) + have hr : 0 < r := div_pos e.heat.radius_pos (by positivity) + have hout : e.heat.radius / (2 : ℝ) ^ (i + 9) = 64 * r := by + dsimp only [r] + rw [show i + 15 = (i + 9) + 6 by omega, pow_add] + norm_num + ring + have heq : (1 / 64 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (i + 9)) = r := by + rw [hout]; ring + have hqroom : dist q q + (1 / 64 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (i + 9)) ≤ + e.heat.radius / (2 : ℝ) ^ (i + 9) := by rw [dist_self, heq, hout]; linarith + have hzroom : dist z q + (1 / 64 : ℝ) * (e.heat.radius / (2 : ℝ) ^ (i + 9)) ≤ + e.heat.radius / (2 : ℝ) ^ (i + 9) := by rw [heq, hout]; change dist z q ≤ 32 * r at hroom; linarith + have hbq := (regular_subball_mean_comparison hX e hq hq hzeta (i + 9) + (by norm_num : (0 : ℝ) < 1 / 64) (by norm_num) hqroom v).2 + have hbz := (regular_subball_mean_comparison hX e hq hz hzeta (i + 9) + (by norm_num : (0 : ℝ) < 1 / 64) (by norm_num) hzroom v).1 + rw [heq] at hbq hbz + have hheat := (e.heat.heatMeanComparison q hq (i + 15) hi v).2 + have hnonneg := (sobolevMeanGram_isPositive (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q (e.heat.radius / (2 : ℝ) ^ (i + 9))) measurableSet_ball).inner_nonneg_right v + have hmul := mul_le_mul_of_nonneg_right hsmall hnonneg + change (1 / 4 : ℝ) * ⟪v, e.heat.heatAt q (i + 15) v⟫_ℝ ≤ + ⟪v, (e.heat.meanAt z hz (i + 15)).toContinuousLinearMap v⟫_ℝ + rw [e.heat.meanAt_toContinuousLinearMap] + change (1 / 4 : ℝ) * ⟪v, dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + e.heat.cutoff q e.heat.radius_pos e.heat.lambda_pos (i + 15) v⟫_ℝ ≤ _ + change ⟪v, dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + e.heat.cutoff q e.heat.radius_pos e.heat.lambda_pos (i + 15) v⟫_ℝ ≤ + (1 + 1 / 64 : ℝ) * ⟪v, sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q r) measurableSet_ball v⟫_ℝ at hheat + nlinarith + +/-- The full patch mass is small in the heat metric at the testing point, +even when the patch center is thirty-two mean radii away. -/ +theorem regular_patch_mass_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 15) + (hroom : dist z q ≤ 32 * (e.heat.radius / (2 : ℝ) ^ (i + 15))) (xi : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (i + 15) + ⟪xi, e.heat.pinchingMassMatrix z hz i xi⟫_ℝ ≤ + 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) * ⟪xi, (e.heat.heatAt q (i + 15)).symm xi⟫_ℝ := by + intro r + have hm := regular_pinching_mass_small hX e hz hzeta hzeta1 hCχ hsmall i xi + have hcomp := (relative_inverse_bounds (e.heat.heatAt q (i + 15)) + (e.heat.meanAt z hz (i + 15)) (e.heat.heatAt_isPositive q (i + 15)) + (e.heat.meanAt_isPositive z hz (i + 15)) (by norm_num : (0 : ℝ) < 1 / 4) + (regular_patch_mean_heat_lower hX e hq hz hzeta hnear i hi hroom) xi).1 + have hcoeff : 0 ≤ pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) := by + have homega : 0 < euclideanUnitVolume n := euclideanUnitVolume_pos n + dsimp only [pinchingMassUnitFactor, regularSmallMassCoefficient] + positivity + have h := mul_le_mul_of_nonneg_left hcomp hcoeff + norm_num at h + exact hm.trans (by convert h using 1; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchIteration.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..e913c404dfa47758ea104755e72a93ce456a7395 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchIteration.lean @@ -0,0 +1,130 @@ +import OAI.Geometry.RCD.Coordinates.RegularSelectedMass +import OAI.Geometry.RCD.Coordinates.RegularCutoffDerivatives +import OAI.Geometry.RCD.Coordinates.PatchAssembly + +namespace OAI + +/-! # Assembling the actual geometric input to the analytic iteration -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +theorem iterationRadius_distanceSourceRadius (R : ℝ) (shift i : ℕ) : + iterationRadius (distanceSourceRadius R shift) i = distanceSourceRadius R (shift + i) := by + unfold iterationRadius distanceSourceRadius + rw [show shift + i + 1 = (shift + 1) + i by omega, pow_add] + ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- All analytic patch fields are made from the original harmonic map, +its heat frames, its full Bochner measure and its fixed energy centers. +Only the displayed scalar smallness conditions remain to be selected. -/ +theorem exists_regular_patch_iteration {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1 / 64) (hCχ : 0 ≤ Cχ) + (henlargement : 1 ≤ enlargement) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (hwide : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (psi : EuclideanGevreyCutoff n) (f : RegularPinchingField e.heat Cpin budget) + (p : RegularPatchSelection e.heat psi.value f) : + ∃ Theta tau : ℝ, 1 ≤ Theta ∧ 0 < tau ∧ ∀ epsilon : ℝ, + 0 ≤ epsilon → epsilon ≤ tau → budget ≤ epsilon → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + (∀ i, (patchOverlapBound n (1 / 2) 2 3 : ℝ) * + (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2)) ≤ epsilon) → + ∀ (Ω : Set (Euclidean n)) + (inverse : Euclidean n → {q : X // q ∈ ball base (e.heat.radius / 32)}), + (∀ x ∈ Ω, (inverse x).val ∈ e.heat.patchRegion ∧ e.heat.values (inverse x).val = x) → + ∃ g : PatchIterationGeometry (ι := X) Ω (distanceSourceRadius e.heat.radius e.heat.shift) + Theta epsilon (patchOverlapBound n (1 / 2) 2 3) (3 * Cpin) + ((psi.constant * 536870912) ^ 2 + 4 * (psi.constant * 536870912) ^ 3) + (psi.constant * 536870912), + g.frozen = fun i x => e.heat.frozenAt (inverse x).val i := by + classical + obtain ⟨Theta, tau, hTheta, htau, hc⟩ := p.cumulative hzeta hzeta1 hCχ henlargement hsmall hnear + refine ⟨Theta + 1, tau, by linarith, htau, ?_⟩ + intro epsilon hepsilon heps hbudget hcoef hmass Ω inverse hinverse + have cover (i) := regular_actual_patch_cover hX e hzeta1 psi i + have hscale (i) := iterationRadius_distanceSourceRadius e.heat.radius e.heat.shift i + have hactive (i x y) (hx : x ∈ Ω) (hy : x ∈ tsupport (e.heat.patchCutoff psi.value i y)) : + e.heat.values (inverse x).val ∈ tsupport (e.heat.patchCutoff psi.value i y) := by + rwa [(hinverse x hx).2] + have hfinset (i x) (hx : x ∈ Ω) : + activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := by + simp only [activePatches, RegularPatchSelection.activePatchesAt, (hinverse x hx).2] + refine ⟨{ + patches := e.heat.patchNet + cutoff := e.heat.patchCutoff psi.value + operator := p.operator + center := fun i y => e.heat.values (p.center i y).val + frozen := fun i x => e.heat.frozenAt (inverse x).val i + energy := fun i x => f.energy (inverse x) (e.heat.shift + i) + frozen_mono := fun i x _ xi => e.heat.frozenAt_mono (inverse x).property i xi + cutoff_smooth := fun i y _ x _ m => ((cover i).cutoff_smooth y).of_le (by simp) |>.contDiffAt + active_card := ?_ + energy_nonneg := fun i x _ => (f.floor_pos (e.heat.shift + i)).le.trans (f.energy_floor (inverse x) _) + energy_budget := fun k x _ => (f.shifted_energy_sum_le (inverse x) e.heat.shift k).trans hbudget + operator_positive := fun i y _ x _ _ => e.heat.pinchingMassMatrix_isPositive _ _ _ + cutoff_nonneg := fun i y _ x _ _ => (cover i).cutoff_nonneg y x + cutoff_le_one := fun i y _ x _ _ => (cover i).cutoff_le_one y x + mass_small := ?_ + center_energy := ?_ + cutoff_first := ?_ + cutoff_second := ?_ + cutoff_jets := ?_ + mass_budget := ?_ + principal_budget := ?_ }, rfl⟩ + · intro i x hx + rw [hfinset i x hx] + exact (cover i).active_card (inverse x).val (hinverse x hx).1 + · intro i x hx xi + rw [hfinset i x hx] + exact p.mass_small hzeta hzeta1 hCχ hsmall hwide i (hmass i) (hinverse x hx).1 xi + · intro i y hy x hx ha + have h := p.energy i y hy (inverse x) ⟨(hinverse x hx).1, hactive i x y hx ha⟩ + simpa only [(hinverse x hx).2, hscale, RegularPatchSelection.operator] using h + · intro i y hy x hx ha xi + have h := (regular_cutoff_directional_bounds hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) xi).1 + simpa only [(hinverse x hx).2, hscale] using h + · intro i y hy x hx ha xi + have h := (regular_cutoff_directional_bounds hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) xi).2 + simpa only [(hinverse x hx).2, hscale] using h + · intro i y hy x hx ha m + have h := regular_cutoff_normalized_jet hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) m + simpa only [(hinverse x hx).2, hscale] using h + · intro k x hx xi + have h := (hc epsilon hepsilon heps hcoef (inverse x).val (hinverse x hx).1 xi k).1 + have hs : ∀ i, activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := fun i => hfinset i x hx + have hh := h.trans (mul_le_mul_of_nonneg_right (show Theta ≤ Theta + 1 by linarith) + (sq_nonneg ‖e.heat.frozenAt (inverse x).val k xi‖)) + simpa only [hs] using hh + · intro k x hx xi + have h := (hc epsilon hepsilon heps hcoef (inverse x).val (hinverse x hx).1 xi k).2 + have hs : ∀ i, activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := fun i => hfinset i x hx + have hp := (sq_nonneg ‖e.heat.frozenAt (inverse x).val k xi‖).trans h + have hnonneg := nonneg_of_mul_nonneg_right hp hTheta + have hh := h.trans (mul_le_mul_of_nonneg_right (show Theta ≤ Theta + 1 by linarith) hnonneg) + simpa only [hs, (hinverse x hx).2] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassEnvelope.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..9050e30e5b4b03bbdc068cc95715f998b7e543e0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassEnvelope.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Coordinates.RegularFrozenMass + +namespace OAI + +/-! # Envelopes for the actual full mass of nearby patches -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + +/-- The raw full mass before conjugation by the patch's mean. -/ +def rawPinchingMass (M : PositiveBilinearMeasure X E) (n : ℕ) + (R : ℝ) (z : X) (i : ℕ) : E →L[ℝ] E := + let s := distanceSourceRadius R i + (s ^ 2 / s ^ n) • M.massOperator (ball z (s / 49152)) + +/-- The scaling ratio from the source radius to the enclosing dyadic mass. -/ +def patchEnvelopeFactor (n : ℕ) : ℝ := + (4 / 3 : ℝ) * ((32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n) + +/-- A patch lying within one twelfth of the mean radius is contained in +the preceding central dyadic mass ball, a term of the actual heat envelope. -/ +theorem rawPinchingMass_le_envelope (M : PositiveBilinearMeasure X E) (n : ℕ) + {R : ℝ} (hR : 0 < R) {q z : X} (i : ℕ) + (hroom : dist z q ≤ (R / (2 : ℝ) ^ (i + 15)) / 12) (v : E) : + ⟪v, rawPinchingMass M n R z i v⟫_ℝ ≤ + patchEnvelopeFactor n * ⟪v, dyadicBochnerEnvelope M n q R (i + 17) v⟫_ℝ := by + let r := R / (2 : ℝ) ^ (i + 16) + let s := distanceSourceRadius R i + have hr : 0 < r := div_pos hR (by positivity) + have hs : s = 32768 * r := by + dsimp only [r, s, distanceSourceRadius] + rw [show i + 16 = (i + 1) + 15 by omega, pow_add] + norm_num + ring + have hrmean : R / (2 : ℝ) ^ (i + 15) = 2 * r := by + dsimp only [r] + rw [show i + 16 = (i + 15) + 1 by omega, pow_add] + norm_num + ring + have hball : ball z (s / 49152) ⊆ ball q r := by + apply ball_subset_ball' + rw [hrmean] at hroom + rw [hs] + linarith + have hmass := measureReal_mono (μ := M.measure v) hball (measure_ne_top _ _) + rw [M.measure_real v _ measurableSet_ball, M.measure_real v _ measurableSet_ball] at hmass + have hscale : s ^ 2 / s ^ n = ((32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n) * (r ^ 2 / r ^ n) := by + rw [hs, mul_pow, mul_pow] + ring + have hraw : ⟪v, rawPinchingMass M n R z i v⟫_ℝ ≤ + ((32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n) * ⟪v, dyadicBochnerMass M n q R (i + 16) v⟫_ℝ := by + change ⟪v, ((s ^ 2 / s ^ n) • M.massOperator (ball z (s / 49152))) v⟫_ℝ ≤ _ + rw [smul_apply, inner_smul_right, hscale] + change _ ≤ ((32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n) * + ⟪v, ((r ^ 2 / r ^ n) • M.massOperator (ball q r)) v⟫_ℝ + rw [smul_apply, inner_smul_right] + have h := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hmass + (show 0 ≤ r ^ 2 / r ^ n by positivity)) + (show 0 ≤ (32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n by positivity) + convert h using 1 + ring + have hterm : (3 / 4 : ℝ) * ⟪v, dyadicBochnerMass M n q R (i + 16) v⟫_ℝ ≤ + ⟪v, dyadicBochnerEnvelope M n q R (i + 17) v⟫_ℝ := by + rw [dyadicBochnerEnvelope_inner] + have h := Finset.single_le_sum + (fun j (_ : j ∈ Finset.range (i + 17 + 1)) => + mul_nonneg (by positivity : 0 ≤ (3 / 4 : ℝ) ^ (i + 17 - j)) + ((dyadicBochnerMass_isPositive M n q hR.le j).inner_nonneg_right v)) + (show i + 16 ∈ Finset.range (i + 17 + 1) by simp) + rw [show i + 17 - (i + 16) = 1 by omega, pow_one] at h + exact h.trans (le_add_of_nonneg_left (by positivity)) + have hm := mul_le_mul_of_nonneg_left hterm + (show 0 ≤ (4 / 3 : ℝ) * ((32768 : ℝ) ^ 2 / (32768 : ℝ) ^ n) by positivity) + dsimp only [patchEnvelopeFactor] + exact hraw.trans (by nlinarith only [hm]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassSum.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..053a758203e4436e5593ce723b34cbcf4a95a89e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchMassSum.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchMassEnvelope + +namespace OAI + +/-! # Finite patch mass sums and the reverse central-ball covering -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- The heat-envelope total controls the full raw mass of every finite +family of sufficiently nearby patches at the moving inverse vectors. -/ +theorem raw_patch_mass_sum_le {q : X} (hq : q ∈ ball base (d.radius / 32)) + {ι : Type*} (s : ℕ → Finset ι) + (centers : ℕ → ι → X) (N : ℕ) (hcard : ∀ i, (s i).card ≤ N) + (hroom : ∀ i y, y ∈ s i → dist (centers i y) q ≤ + (d.radius / (2 : ℝ) ^ (d.shift + i + 15)) / 12) + (xi : Euclidean n) (k : ℕ) : + let Q := fun i => d.heatAt q (d.shift + i + 17) + (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪(Q i).symm xi, rawPinchingMass d.mass n d.radius (centers i y) (d.shift + i) + ((Q i).symm xi)⟫_ℝ) ≤ + (N : ℝ) * patchEnvelopeFactor n * d.envelopeConstant * ‖d.frozenAt q k xi‖ ^ 2 := by + classical + intro Q + let b := fun j => ⟪(d.heatAt q (d.shift + j)).symm xi, + dyadicBochnerEnvelope d.mass n q d.radius (d.shift + j) ((d.heatAt q (d.shift + j)).symm xi)⟫_ℝ + have hb (j) : 0 ≤ b j := + (dyadicBochnerEnvelope_isPositive d.mass n q d.radius_pos.le _).inner_nonneg_right _ + have hfactor : 0 ≤ patchEnvelopeFactor n := by unfold patchEnvelopeFactor; positivity + have hpoint i y (hy : y ∈ s i) : + ⟪(Q i).symm xi, rawPinchingMass d.mass n d.radius (centers i y) (d.shift + i) + ((Q i).symm xi)⟫_ℝ ≤ patchEnvelopeFactor n * b (i + 17) := by + have h := rawPinchingMass_le_envelope d.mass n d.radius_pos (d.shift + i) + (hroom i y hy) ((Q i).symm xi) + simpa only [b, Q, Nat.add_assoc] using h + have htotal : (∑ i ∈ Finset.range k, b (i + 17)) ≤ + d.envelopeConstant * ‖d.frozenAt q k xi‖ ^ 2 := by + have h := ((d.localData q hq).1 xi (k + 17)).1 + change (∑ j ∈ Finset.range (k + 17), b j) ≤ + d.envelopeConstant * ⟪xi, (d.heatAt q (d.shift + (k + 17))).symm xi⟫_ℝ at h + have hshift := nonnegative_shifted_sum_le b hb 17 k + rw [show 17 + k = k + 17 by omega] at hshift + have ht := hshift.trans h + rw [d.frozenAt_norm_sq] + simpa only [Nat.add_comm 17, Nat.add_assoc] using ht + calc + _ ≤ ∑ i ∈ Finset.range k, (N : ℝ) * (patchEnvelopeFactor n * b (i + 17)) := by + apply Finset.sum_le_sum + intro i _ + calc + _ ≤ ∑ _y ∈ s i, patchEnvelopeFactor n * b (i + 17) := Finset.sum_le_sum (fun y hy => hpoint i y hy) + _ = ((s i).card : ℝ) * (patchEnvelopeFactor n * b (i + 17)) := by + rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ _ := mul_le_mul_of_nonneg_right (by exact_mod_cast hcard i) (mul_nonneg hfactor (hb _)) + _ = ((N : ℝ) * patchEnvelopeFactor n) * ∑ i ∈ Finset.range k, b (i + 17) := by + simp only [Finset.mul_sum, mul_assoc] + _ ≤ ((N : ℝ) * patchEnvelopeFactor n) * (d.envelopeConstant * ‖d.frozenAt q k xi‖ ^ 2) := + mul_le_mul_of_nonneg_left htotal (mul_nonneg (Nat.cast_nonneg N) hfactor) + _ = _ := by ring + +end RegularBilinearData + +/-- The precise scale factor for the strictly interior central mass. -/ +def patchCentralFactor (n : ℕ) : ℝ := (65536 : ℝ) ^ 2 / (65536 : ℝ) ^ n + +omit [ProperSpace X] in +/-- A center within one twelfth of the mean radius has a mass ball that +covers the central ball two scales below the mean radius. -/ +theorem rawPinchingMass_covers_central {E : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + (M : PositiveBilinearMeasure X E) (n : ℕ) {R : ℝ} (hR : 0 < R) + {q z : X} (i : ℕ) (hroom : dist z q ≤ (R / (2 : ℝ) ^ (i + 15)) / 12) (v : E) : + patchCentralFactor n * ⟪v, dyadicBochnerMass M n q R (i + 17) v⟫_ℝ ≤ + ⟪v, rawPinchingMass M n R z i v⟫_ℝ := by + let r := R / (2 : ℝ) ^ (i + 17) + let s := distanceSourceRadius R i + have hr : 0 < r := div_pos hR (by positivity) + have hs : s = 65536 * r := by + dsimp only [s, r, distanceSourceRadius] + rw [show i + 17 = (i + 1) + 16 by omega, pow_add] + norm_num + ring + have hmean : R / (2 : ℝ) ^ (i + 15) = 4 * r := by + dsimp only [r] + rw [show i + 17 = (i + 15) + 2 by omega, pow_add] + norm_num + ring + have hball : ball q r ⊆ ball z (s / 49152) := by + apply ball_subset_ball' + rw [dist_comm] + rw [hmean] at hroom + rw [hs] + linarith + have hm := measureReal_mono (μ := M.measure v) hball (measure_ne_top _ _) + rw [M.measure_real v _ measurableSet_ball, M.measure_real v _ measurableSet_ball] at hm + have hscale : s ^ 2 / s ^ n = patchCentralFactor n * (r ^ 2 / r ^ n) := by + rw [hs, mul_pow, mul_pow] + dsimp only [patchCentralFactor] + ring + change patchCentralFactor n * ⟪v, ((r ^ 2 / r ^ n) • M.massOperator (ball q r)) v⟫_ℝ ≤ + ⟪v, ((s ^ 2 / s ^ n) • M.massOperator (ball z (s / 49152))) v⟫_ℝ + rw [smul_apply, inner_smul_right, smul_apply, inner_smul_right, hscale] + have hspos : 0 < s := by rw [hs]; positivity + have h := mul_le_mul_of_nonneg_left hm (show 0 ≤ s ^ 2 / s ^ n by positivity) + rw [hscale] at h + convert h using 1 + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPatchSelection.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fc8e74fe60e36daa936fe75c4907dc4b9e0ae5e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPatchSelection.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Coordinates.RegularActualPatches + +namespace OAI + +/-! # A single total family of actual patch operators -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Extending the selected net centers outside the net makes the +operator family total without changing any active patch. -/ +structure RegularPatchSelection {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [(hausdorff n X).Regular] {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (d : RegularBilinearData hX base hk enlargement zeta) + (psi : Euclidean n → ℝ) {Cpin budget : ℝ} (f : RegularPinchingField d Cpin budget) where + center : ℕ → X → {q : X // q ∈ ball base (d.radius / 32)} + active : ∀ i y, y ∈ d.patchNet i → (center i y).val ∈ d.patchDomain psi i y + near : ∀ i y, y ∈ d.patchNet i → ∀ q, q ∈ d.patchDomain psi i y → + dist (center i y).val q ≤ (d.radius / 2 ^ (d.shift + i + 15)) / 12 + energy : ∀ i y, y ∈ d.patchNet i → + ∀ q : {q : X // q ∈ ball base (d.radius / 32)}, q.val ∈ d.patchDomain psi i y → + ⟪d.values q.val - d.values (center i y).val, + d.pinchingMassMatrix (center i y).val (center i y).property (d.shift + i) + (d.values q.val - d.values (center i y).val)⟫_ℝ ≤ + (3 * Cpin) * (distanceSourceRadius d.radius (d.shift + i)) ^ 2 * f.energy q (d.shift + i) + +/-- The selector is constructed from the already proved finite covers +and positive energy floors. -/ +def regularPatchSelection {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : zeta ≤ 1 / 64) (psi : EuclideanGevreyCutoff n) + (f : RegularPinchingField e.heat Cpin budget) (hCpin : 0 ≤ Cpin) : + RegularPatchSelection e.heat psi.value f := by + classical + let c := Classical.choose (exists_regular_actual_patch_centers hX e hzeta psi f hCpin) + have hc := Classical.choose_spec (exists_regular_actual_patch_centers hX e hzeta psi f hCpin) + let fallback : {q : X // q ∈ ball base (e.heat.radius / 32)} := + ⟨base, mem_ball_self (div_pos e.heat.radius_pos (by norm_num))⟩ + let center := fun i y => if hy : y ∈ e.heat.patchNet i then c i ⟨y, hy⟩ else fallback + refine { center := center, active := ?_, near := ?_, energy := ?_ } + · intro i y hy + simpa only [center, dite_eq_left hy] using (hc i ⟨y, hy⟩).1 + · intro i y hy q hq + have hq' := e.heat.patch_region_subset hq.1 + simpa only [center, dite_eq_left hy] using ((hc i ⟨y, hy⟩).2 ⟨q, hq'⟩ hq).1 + · intro i y hy q hq + simpa only [center, dite_eq_left hy] using ((hc i ⟨y, hy⟩).2 q hq).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingField.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingField.lean new file mode 100644 index 0000000000000000000000000000000000000000..d616cb0ed1eb33fbd362e9759e2aff20b40884e7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingField.lean @@ -0,0 +1,157 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularMeanPinchingNeighborhood + +namespace OAI + +/-! # One actual matrix and energy family for all finite patches -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- These are constructed from the original full Bochner measure and the +actual Poisson sources. The common positive floor permits a fixed energy +minimizer in each finite patch. -/ +structure RegularPinchingField {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [(hausdorff n X).Regular] {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (d : RegularBilinearData hX base hk enlargement zeta) + (C budget : ℝ) where + energy : {q : X // q ∈ ball base (d.radius / 32)} → ℕ → ℝ + floor : ℕ → ℝ + floor_pos : ∀ i, 0 < floor i + energy_floor : ∀ q i, floor i ≤ energy q i + summable : ∀ q, Summable (energy q) + total : ∀ q, (∑' i, energy q i) ≤ budget + directional : ∀ x z i, + dist x.val z.val ≤ distanceSourceRadius d.radius i / 512 → + ⟪d.values x.val - d.values z.val, + d.pinchingMassMatrix z.val z.property i (d.values x.val - d.values z.val)⟫_ℝ ≤ + C * (distanceSourceRadius d.radius i) ^ 2 * (energy x i + energy z i) + +theorem exists_regular_pinching_field {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C A Cχ Cpin : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 0 < Cpin ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a |K| B J C A Cχ 1 zeta eta, + zeta ≤ budget ∧ Nonempty (RegularPinchingField e.heat Cpin budget) := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨B, J, C, A, Cχ, Cg, D, Ca, Cpin, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hCpin, hbuild⟩ := + exists_regular_mean_pinching_neighborhood m hX ha hcompact hregular hvolume hmeasured + hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare hpoissonCompact + hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff hharmonic hgradient + heuclidean hmetricmeasure hk hg hdiff + refine ⟨B, J, C, A, Cχ, Cpin, hB, hJ, hC, hA, hCχ, hCpin, ?_⟩ + intro budget hbudget + obtain ⟨zeta, eta, hzeta, heta, e, data, hpairs⟩ := hbuild budget hbudget + let μ := hausdorff (m + 2) X + let Q := radialFitQualitativeConstant (m + 2) Cχ * zeta + have hQ : 0 < Q := by + have hc : 0 < radialNormalizationRestrictionConstant (m + 2) := + zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + have hqual : 0 < radialFitQualitativeConstant (m + 2) Cχ := by + dsimp only [radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * + radialNormalizationRestrictionConstant (m + 2) * _ + positivity + exact mul_pos hqual hzeta + let P := fun q : {q : X // q ∈ ball p (e.heat.radius / 32)} => + normalizedPoissonDefect μ hX.quadratic (data q.val q.property).source + let E := fun q => pinchingEnvelope (7 / 8) (3 / 4) Q (P q) + have hP (q) (i) : 0 ≤ P q i := + normalizedPoissonDefect_nonneg μ hX.quadratic (data q.val q.property).source (abs_nonneg K) i + have hspec (q) := pinchingEnvelope_spec (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num : (7 / 8 : ℝ) < 1) (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hQ (hP q) (data q.val q.property).summable + have hE (q) (i) : 0 ≤ E q i := ((hspec q).2.2 i).2.2.le + have hsig (x z) (i) : + twoCenterProjectionSource Q (P x) (P z) i ^ 2 = E x i + E z i := + Real.sq_sqrt (add_nonneg (hE x i) (hE z i)) + have htotal (q) : (∑' i, E q i) ≤ budget := by + obtain ⟨hsum, hbound, _⟩ := hpairs q.val q.property q.val q.property + have hdom (i) : E q i ≤ twoCenterProjectionSource Q (P q) (P q) i ^ 2 := by + rw [hsig] + linarith [hE q i] + exact (((hspec q).1).tsum_le_tsum hdom hsum).trans hbound + have hqual : 1 ≤ radialFitQualitativeConstant (m + 2) Cχ := by + have hn : (1 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) := by exact_mod_cast (show 1 ≤ m + 2 by omega) + have hs : (1 : ℝ) ≤ (((m + 2 : ℕ) : ℝ) + 1) ^ 2 := by nlinarith + have hb : (1 : ℝ) ≤ 1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1) := by + have hh := mul_le_mul_of_nonneg_left hs (by norm_num : (0 : ℝ) ≤ 1000) + have hprod := mul_le_mul_of_nonneg_left (show (1 : ℝ) ≤ Cχ + 1 by linarith) + (show 0 ≤ 1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 by positivity) + nlinarith + have hfirst : (1 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) * + (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) := by nlinarith + have hsecond := radialNormalizationRestrictionConstant_ge_one (m + 2) + have hthird : (1 : ℝ) ≤ (5 / 3 : ℝ) * (4 : ℝ) ^ (m + 2) := by + have hp : (1 : ℝ) ≤ 4 ^ (m + 2) := one_le_pow₀ (by norm_num) + linarith + dsimp only [radialFitQualitativeConstant] + have hp := mul_le_mul hfirst hsecond (by norm_num : (0 : ℝ) ≤ 1) + (by linarith : (0 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) * + (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1))) + have hp' := mul_le_mul hp hthird (by norm_num : (0 : ℝ) ≤ 1) (by linarith) + simpa only [one_mul] using hp' + have hzetaBudget : zeta ≤ budget := by + let q : {q : X // q ∈ ball p (e.heat.radius / 32)} := + ⟨p, mem_ball_self (div_pos e.heat.radius_pos (by norm_num))⟩ + have hfloor : Q ≤ E q 0 := by simpa only [pow_zero, mul_one] using ((hspec q).2.2 0).2.1 + have he0 := (hspec q).1.le_tsum 0 (fun j _ => hE q j) + have hQz : zeta ≤ Q := by + dsimp only [Q] + nlinarith [mul_le_mul_of_nonneg_right hqual hzeta.le] + exact hQz.trans (hfloor.trans (he0.trans (htotal q))) + refine ⟨zeta, eta, hzeta, heta, e, hzetaBudget, ⟨{ + energy := E + floor := fun i => Q * (7 / 8 : ℝ) ^ i + floor_pos := fun i => mul_pos hQ (pow_pos (by norm_num) i) + energy_floor := fun q i => ((hspec q).2.2 i).2.1 + summable := fun q => (hspec q).1 + total := htotal + directional := ?_ }⟩⟩ + · intro x z i hroom + have hh := (hpairs x.val x.property z.val z.property).2.2 i hroom + rw [hsig] at hh + exact hh.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingFrame.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4bf8088c2020195d98ee45e9a43d3926b7a8278 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingFrame.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairCoordinates +import OAI.Geometry.RCD.Sobolev.FiniteColumnEnergy + +namespace OAI + +/-! # The exact interior frame used to test full directional mass -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- The volume loss from the radial normalization ball to the mass-test ball. -/ +def pinchingFrameVolumeRatio (n : ℕ) : ℝ := + (5 / 3 : ℝ) * ((1 / 32768 : ℝ) ^ n)⁻¹ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The same actual harmonic coordinates admit a bounded exact frame on +three times the mass radius, with a gradient bound on the cutoff support. -/ +theorem regular_pinching_frame {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) + (hsmall : (n : ℝ) ^ 2 * (pinchingFrameVolumeRatio n * zeta) ≤ 1 / 2) + (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d.frame i).toContinuousLinearMap + let rho := s / 49152 + ∃ N : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hX.quadratic U (ball center (3 * rho)) measurableSet_ball N ∧ + ‖N.toContinuousLinearMap‖ ≤ 2 ∧ + ∀ b, ∀ᵐ x ∂μ.restrict (closedBall center (6 * rho)), + localGamma μ hX.quadratic (U (N b)) (U (N b)) x ≤ 16 * (n : ℝ) ^ 2 * ‖b‖ ^ 2 := by + intro μ s U rho + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + let u := centeredColumn μ hX.quadratic + (transformedColumn μ hX.quadratic e.heat.coordinates (d.frame i)) + ((d.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + have hU : sobolevColumnMap μ hX.quadratic u = U := centered_transformed_columnMap μ hX.quadratic _ _ _ _ + have hf := (d.splitting i).center μ hX.quadratic + ((d.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values center)) e.one.sobolev + (e.oneRepresentative center hcenter i) + have hsub : ball center (3 * rho) ⊆ ball center (2 * s) := ball_subset_ball (by simp only [rho]; linarith) + have hvol := e.volume center hcenter (2 * s) (by positivity) (by linarith) + have hvolSmall := e.volume center hcenter (3 * rho) (by simp only [rho]; positivity) (by simp only [rho]; linarith) + have hp : 0 < μ.real (ball center (3 * rho)) := + (quarter_volume_bounds (by simp only [rho]; positivity) (euclideanUnitVolume_pos n) hvolSmall).1 + have hratio : μ.real (ball center (2 * s)) ≤ pinchingFrameVolumeRatio n * μ.real (ball center (3 * rho)) := by + apply (div_le_iff₀ hp).mp + exact radial_fraction_volume_ratio (by positivity : 0 < 2 * s) + (by norm_num : (0 : ℝ) < 1 / 32768) (euclideanUnitVolume_pos n) hvol + (by simpa only [rho, show (1 / 32768 : ℝ) * (2 * s) = 3 * (s / 49152) by ring] using hvolSmall) + have hg := meanGram_sub_id_norm_le_of_subset μ hX.quadratic u measurableSet_ball hsub + (ne_of_gt (hX.fullSupport _ _ (by simp only [rho]; positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport _ _ (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (by dsimp only [pinchingFrameVolumeRatio]; positivity) hzeta hratio hf.gram + obtain ⟨N, hN, hnorm⟩ := bounded_exact_mean_normalization μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball center (3 * rho)) measurableSet_ball (hg.trans hsmall) + rw [hU] at hN + refine ⟨N, hN, hnorm, ?_⟩ + have hclosed : closedBall center (6 * rho) ⊆ ball center (2 * s) := + closedBall_subset_ball (by simp only [rho]; linarith) + have hrows : ∀ᵐ x ∂μ.restrict (closedBall center (6 * rho)), ∀ j : Fin n, + localGamma μ hX.quadratic (u j) (u j) x ≤ 4 := by + apply ae_all_iff.mpr + intro j + filter_upwards [ae_restrict_of_ae_restrict_of_subset hclosed (hf.gradient j)] with x hx + exact hx.trans (by nlinarith) + intro b + have hcol : ∀ᵐ x ∂μ.restrict (closedBall center (6 * rho)), + localGamma μ hX.quadratic (sobolevColumnMap μ hX.quadratic u (N b)) + (sobolevColumnMap μ hX.quadratic u (N b)) x ≤ + (n : ℝ) * ‖N b‖ ^ 2 * ∑ j, localGamma μ hX.quadratic (u j) (u j) x := + ae_restrict_of_ae (localGamma_column_le_diagonal_sum μ hX.quadratic u (N b)) + rw [hU] at hcol + have hnb : ‖N b‖ ≤ 2 * ‖b‖ := + (N.toContinuousLinearMap.le_opNorm b).trans (mul_le_mul_of_nonneg_right hnorm (norm_nonneg b)) + filter_upwards [hrows, hcol] with x hx hc + have hsum : (∑ j, localGamma μ hX.quadratic (u j) (u j) x) ≤ (n : ℝ) * 4 := by + have hh := Finset.sum_le_sum (s := Finset.univ) (fun j _ => hx j) + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] using hh + calc + _ ≤ (n : ℝ) * ‖N b‖ ^ 2 * ∑ j, localGamma μ hX.quadratic (u j) (u j) x := hc + _ ≤ (n : ℝ) * ‖N b‖ ^ 2 * ((n : ℝ) * 4) := by gcongr + _ ≤ (n : ℝ) * (2 * ‖b‖) ^ 2 * ((n : ℝ) * 4) := by gcongr + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a4cb4c88bc26417571a01af61e94c677d23b54c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPinchingSmallness.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.RegularMassSmallness + +namespace OAI + +/-! # Smallness in the inverse mean metric of the actual patch operators -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The original pinching radius is a fixed multiple of the mean radius. -/ +def pinchingMassUnitFactor (n : ℕ) : ℝ := (16384 : ℝ) ^ 2 / (16384 : ℝ) ^ n + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual conjugated full mass is small in its own inverse mean +metric, with no lower eigenvalue bound or discarded singular part. -/ +theorem regular_pinching_mass_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (i : ℕ) (xi : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (i + 15) + ⟪xi, e.heat.pinchingMassMatrix q hq i xi⟫_ℝ ≤ + pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) * ⟪xi, (e.heat.meanAt q hq (i + 15)).symm xi⟫_ℝ := by + intro r + let s := distanceSourceRadius e.heat.radius i + let R := e.heat.meanAt q hq (i + 15) + have hr : 0 < r := div_pos e.heat.radius_pos (by positivity) + have hs : s = 16384 * r := by + dsimp only [s, r, distanceSourceRadius] + rw [show i + 15 = (i + 1) + 14 by omega, pow_add] + norm_num + ring + have hscale : s ^ 2 / s ^ n = pinchingMassUnitFactor n * (r ^ 2 / r ^ n) := by + rw [hs, mul_pow, mul_pow] + dsimp only [pinchingMassUnitFactor] + ring + have hball : s / 49152 = r / 3 := by rw [hs]; ring + have hR : ⟪R.symm xi, e.heat.meanAt q hq (i + 15) (R.symm xi)⟫_ℝ = + ⟪xi, R.symm xi⟫_ℝ := by + change ⟪R.symm xi, R (R.symm xi)⟫_ℝ = _ + rw [R.apply_symm_apply, real_inner_comm] + have hb := regular_local_mass_small hX e hq hzeta hzeta1 hCχ hsmall i (R.symm xi) + have hf : 0 ≤ pinchingMassUnitFactor n := by dsimp only [pinchingMassUnitFactor]; positivity + change ⟪xi, frozenConjugate R ((s ^ 2 / s ^ n) • + e.heat.mass.massOperator (ball q (s / 49152))) xi⟫_ℝ ≤ _ + rw [inner_frozenConjugate, smul_apply, inner_smul_right, hball, hscale] + calc + _ = pinchingMassUnitFactor n * ((r ^ 2 / r ^ n) * + ⟪R.symm xi, e.heat.mass.massOperator (ball q (r / 3)) (R.symm xi)⟫_ℝ) := by ring + _ ≤ pinchingMassUnitFactor n * (regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) * ⟪R.symm xi, e.heat.meanAt q hq (i + 15) (R.symm xi)⟫_ℝ) := + mul_le_mul_of_nonneg_left hb hf + _ = _ := by rw [hR]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPointedFlatness.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPointedFlatness.lean new file mode 100644 index 0000000000000000000000000000000000000000..05251cd5d6c25389c8f95f3b00259c283e16439c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPointedFlatness.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Coordinates.UniformRegularFlatnessInput +import OAI.Geometry.RCD.Metric.VolumeRigidityInput +import OAI.Geometry.RCD.Metric.VolumeRegime + +namespace OAI + +/-! # Uniform metric flatness near a regular point from local volume rigidity -/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +private def curvatureRadius (K δ : ℝ) : ℝ := min 1 (δ / (|K| + 1)) + +private theorem curvatureRadius_pos (K : ℝ) {δ : ℝ} (hδ : 0 < δ) : + 0 < curvatureRadius K δ := + lt_min zero_lt_one (div_pos hδ (by positivity)) + +private theorem curvature_bound_of_radius {K δ t : ℝ} (ht : 0 ≤ t) + (hsmall : t ≤ curvatureRadius K δ) : -δ ≤ K * t ^ 2 := by + have ht1 : t ≤ 1 := hsmall.trans (min_le_left _ _) + have htd : t ≤ δ / (|K| + 1) := hsmall.trans (min_le_right _ _) + have hbound : t * (|K| + 1) ≤ δ := (le_div_iff₀ (by positivity)).mp htd + have hs : t ^ 2 ≤ t := by nlinarith + have hm := mul_le_mul_of_nonneg_left hs (abs_nonneg K) + have hK := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg t) + nlinarith + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +/-- The regular-point volume neighborhood supplies a single neighborhood +whose every sufficiently small ball is pointed close to Euclidean space. -/ +theorem regular_uniform_pointed_flatness {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) {p : X} {a : ℝ} + (ha : 0 ≤ a) (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 1) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 1) X) (m + 1) p + (euclideanUnitVolume (m + 1))) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 1) X) + (comparisonModelVolume m a) y (euclideanUnitVolume (m + 1))) + (hrigidity : LocalVolumeRigidityInput hX) {θ : ℝ} (hθ : 0 < θ) : + ∃ D : ℝ, 0 < D ∧ ∀ q, dist p q ≤ D → ∀ r : ℝ, 0 < r → r ≤ D / 4 → + ∃ f : X → Euclidean (m + 1), IsPointedApproximation q 0 r 2 θ f := by + obtain ⟨δ, hδ, happly⟩ := pointed_flatness_of_volume_rigidity hX hn hrigidity hθ + let ε := min (δ / 2) (1 / 2 : ℝ) + have hε : 0 < ε := lt_min (by positivity) (by norm_num) + have hεδ : ε ≤ δ := (min_le_left _ _).trans (by linarith) + have hε1 : ε ≤ 1 := (min_le_right _ _).trans (by norm_num) + obtain ⟨D, hD, hDsmall, hvol⟩ := exists_uniform_volume_neighborhood m ha + (euclideanUnitVolume_pos (m + 1)) hε hε1 (curvatureRadius_pos K hδ) + hcompact hregular hvolume hBG hdensity + (fun y r => ne_of_lt (hX.finiteOnBounded (ball y r) isBounded_ball)) + refine ⟨D, hD, ?_⟩ + intro q hq r hr hrD + have h4rD : 4 * r ≤ D := by linarith + have hv := hvol q hq (4 * r) (by positivity) h4rD + have hden : 0 < euclideanUnitVolume (m + 1) * (4 * r) ^ (m + 1) := + mul_pos (euclideanUnitVolume_pos _) (pow_pos (by positivity) _) + have hlo : (1 - δ) * euclideanUnitVolume (m + 1) * (4 * r) ^ (m + 1) ≤ + (hausdorff (m + 1) X).real (ball q (4 * r)) := by + have h := (abs_le.mp hv).1 + have h' : 1 - δ ≤ (hausdorff (m + 1) X).real (ball q (4 * r)) / + (euclideanUnitVolume (m + 1) * (4 * r) ^ (m + 1)) := by linarith + have h'' := (le_div_iff₀ hden).mp h' + nlinarith + exact happly q r hr + (curvature_bound_of_radius (by positivity) (h4rD.trans hDsmall)) hlo + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularPointedMidpoint.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularPointedMidpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..dff261aaff051a33ae1daca9bec4e346068cca15 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularPointedMidpoint.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.RCD.Coordinates.RegularNearbyMidpoints +import OAI.Geometry.RCD.Transport.QuadraticMidpointLimit +import OAI.Geometry.RCD.Metric.PointedNearbyLifts + +namespace OAI + +/-! # Actual near-regular midpoint identities in an arbitrary proper metric limit -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MetricSpace Y] [ProperSpace Y] {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + +include hX in +theorem regular_pointed_midpoint (hn : 2 ≤ n) (hK : K ≤ 0) + {o : X} (ho : IsRegular n o) {q a b : Y} (w : ℕ → Y) + (p x y : ℕ → X) (z : ℕ → ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 < r k) + (hr0 : Tendsto r atTop (𝓝 0)) (hε : Tendsto ε atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K * (4 * r k)^2) + (hV : ∀ k, IsPointedApproximation (p k) q (r k) 5 (ε k) (V k)) + (hx : ∀ k, dist (x k) (p k) ≤ r k/2) + (hy : ∀ k, dist (y k) (p k) ≤ r k/2) + (hz : ∀ i k, dist (z i k) (p k) ≤ r k) + (hVx : Tendsto (fun k => V k (x k)) atTop (𝓝 a)) + (hVy : Tendsto (fun k => V k (y k)) atTop (𝓝 b)) + (hVz : ∀ i, Tendsto (fun k => V k (z i k)) atTop (𝓝 (w i))) : + ∃ c : Y, dist c q ≤ 4 ∧ dist a c = dist a b/2 ∧ dist c b = dist a b/2 ∧ + ∀ i, dist (w i) c^2 = (dist (w i) a^2+dist (w i) b^2)/2-dist a b^2/4 := by + classical + have hzo i : Tendsto (z i) atTop (𝓝 o) := by + apply hp.congr_dist + apply squeeze_zero (fun _ => dist_nonneg) _ hr0 + intro k + simpa only [dist_comm] using hz i k + obtain ⟨η,γ,hη,hγ,hquad⟩ := hX.regular_nearby_midpoints hn hK ho p x y z r hp hzo hr hr0 + hcurv hx hy hz + have hg k := (hγ k).2.1 + have hstay k (t : Time) : dist (γ k t) (p k) ≤ 5 * r k := + ((hγ k).2.2.2.2 t).trans (by nlinarith [hr k]) + have hxS k : dist (x k) (p k) ≤ 5 * r k := (hx k).trans (by nlinarith [hr k]) + have hyS k : dist (y k) (p k) ≤ 5 * r k := (hy k).trans (by nlinarith [hr k]) + have hnear0 : Tendsto (fun k => dist (x k) (γ k 0)/r k) atTop (𝓝 0) := by + apply squeeze_zero (fun k => div_nonneg dist_nonneg (hr k).le) _ hη + intro k + apply (div_le_iff₀ (hr k)).mpr + simpa only [dist_comm] using (hγ k).2.2.1.le + have hnear1 : Tendsto (fun k => dist (y k) (γ k 1)/r k) atTop (𝓝 0) := by + apply squeeze_zero (fun k => div_nonneg dist_nonneg (hr k).le) _ hη + intro k + apply (div_le_iff₀ (hr k)).mpr + simpa only [dist_comm] using (hγ k).2.2.2.1.le + have h0 := pointed_nearby_lift_tendsto p x (fun k => γ k 0) r ε V hε hV + (Eventually.of_forall hxS) (Eventually.of_forall (fun k => hstay k 0)) hnear0 hVx + have h1 := pointed_nearby_lift_tendsto p y (fun k => γ k 1) r ε V hε hV + (Eventually.of_forall hyS) (Eventually.of_forall (fun k => hstay k 1)) hnear1 hVy + let m k := γ k quadraticMidpointTime + have hbound k (hk : ε k ≤ 1/2) : dist (V k (m k)) q ≤ 4 := by + have hpS : dist (p k) (p k) ≤ 5*r k := by + rw [dist_self] + exact mul_nonneg (by norm_num) (hr k).le + have hh := (abs_le.mp ((hV k).2.1 (m k) (p k) (hstay k _) hpS)).2 + have ht := dist_triangle (V k (m k)) (V k (p k)) q + have hrb : dist (m k) (p k)/r k ≤ 3 := + (div_le_iff₀ (hr k)).mpr ((hγ k).2.2.2.2 _) + linarith [(hV k).1] + let v k := if ε k ≤ 1/2 then V k (m k) else q + have hv k : v k ∈ closedBall q 4 := by + dsimp only [v] + split_ifs with hk + · exact hbound k hk + · simp + obtain ⟨c,hc,α,hα,hlim⟩ := (isCompact_closedBall q (4:ℝ)).tendsto_subseq hv + have hm : Tendsto (fun k => V (α k) (m (α k))) atTop (𝓝 c) := by + apply hlim.congr' + filter_upwards [hα.tendsto_atTop.eventually + (hε.eventually (gt_mem_nhds (by norm_num : (0:ℝ)<1/2)))] with k hk + exact ite_eq_left hk.le + have h01 := pointed_lift_distance_tendsto p r ε V hε hV + (fun k => γ k 0) (fun k => γ k 1) + (Eventually.of_forall (fun k => hstay k 0)) (Eventually.of_forall (fun k => hstay k 1)) h0 h1 + have h0m := pointed_lift_distance_tendsto (p∘α) (r∘α) (ε∘α) (V∘α) + (hε.comp hα.tendsto_atTop) (fun k => hV (α k)) (fun k => γ (α k) 0) (m∘α) + (Eventually.of_forall (fun k => hstay (α k) 0)) + (Eventually.of_forall (fun k => hstay (α k) _)) (h0.comp hα.tendsto_atTop) hm + have hm1 := pointed_lift_distance_tendsto (p∘α) (r∘α) (ε∘α) (V∘α) + (hε.comp hα.tendsto_atTop) (fun k => hV (α k)) (m∘α) (fun k => γ (α k) 1) + (Eventually.of_forall (fun k => hstay (α k) _)) + (Eventually.of_forall (fun k => hstay (α k) 1)) hm (h1.comp hα.tendsto_atTop) + have hhalf : Tendsto (fun k => dist (γ (α k) 0) (γ (α k) 1)/r (α k)/2) + atTop (𝓝 (dist a b/2)) := (h01.comp hα.tendsto_atTop).div_const 2 + refine ⟨c,hc,?_,?_,?_⟩ + · apply tendsto_nhds_unique h0m + apply hhalf.congr + intro k + have hh := hg (α k) 0 quadraticMidpointTime + change dist (γ (α k) 0) (m (α k))=|(0:ℝ)-1/2| *dist (γ (α k) 0) (γ (α k) 1) at hh + simp only [Function.comp_apply] + rw [hh] + norm_num + ring + · apply tendsto_nhds_unique hm1 + apply hhalf.congr + intro k + have hh := hg (α k) quadraticMidpointTime 1 + change dist (m (α k)) (γ (α k) 1)=|(1/2:ℝ)-1| *dist (γ (α k) 0) (γ (α k) 1) at hh + simp only [Function.comp_apply] + rw [hh] + norm_num + ring + · intro i + apply pointed_fullMidpointDefect_zero (p∘α) ((z i)∘α) (r∘α) (ε∘α) (V∘α) (γ∘α) + (fun k => hr (α k)) (hε.comp hα.tendsto_atTop) (fun k => hV (α k)) + (Eventually.of_forall (fun k => (hz i (α k)).trans (by + change r (α k) ≤ 5*r (α k) + nlinarith [hr (α k)]))) + (Eventually.of_forall (fun k t => hstay (α k) t)) + ((hVz i).comp hα.tendsto_atTop) (h0.comp hα.tendsto_atTop) + (h1.comp hα.tendsto_atTop) hm ((hquad i).comp hα.tendsto_atTop) + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionConfiguration.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionConfiguration.lean new file mode 100644 index 0000000000000000000000000000000000000000..040d85685d707c0ae0c67ba5ec8a6c240cbdabbc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionConfiguration.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.RCD.Coordinates.RegularProjectionRows +import OAI.Geometry.RCD.Harmonic.LocalProjectionMeasure +import OAI.Geometry.RCD.Coordinates.NormalizedProjectionConfiguration + +namespace OAI + +/-! # Sharp-projection configurations constructed from the regular neighborhood -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual radial rows construct the full projection data. The affine +constant is fixed before the measured error and every geometric choice. -/ +theorem regular_projection_configuration_constants {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + (hgradient : LocalHarmonicL2GradientInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hmeasured : LocalMeasuredCoordinateInput hX) + {κ B J C A Cχ epsilon D : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hCχ : 0 ≤ Cχ) + (hepsilon : 0 ≤ epsilon) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * + (((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) * epsilon) ≤ 1 / 2) : + ∃ H : ℝ, 0 ≤ H ∧ ∀ error : ℝ, 0 < error → ∃ delta : ℝ, 0 < delta ∧ + ∀ {base first center : X} {a enlargement zeta eta Cg Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker}, + 0 ≤ a → 0 ≤ zeta → zeta ≤ epsilon → zeta ≤ delta → 0 ≤ eta → + BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a) → + ∀ e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta, + first ∈ ball base (e.heat.radius / 32) → center ∈ ball base (e.heat.radius / 32) → + ∀ (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) (i : ℕ), + let s := distanceSourceRadius e.heat.radius i + let uc := centeredColumn (hausdorff (m + 2) X) hX.quadratic + (transformedColumn (hausdorff (m + 2) X) hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (e.heat.values center)) + e.one.sobolev + dist center first ≤ s / 4 → -delta / 32 ≤ K * s ^ 2 → + ∀ source : ℝ, 0 < source → + normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source i + + normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source i ≤ source ^ 2 → + pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) i ≤ source ^ 2 → + ∃ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H + (((m + 2 : ℕ) : ℝ) * Real.sqrt (projectionRowConstant (m + 2) B D)) 1 1, + d.radius = s ∧ d.source = source ∧ d.totalSource = eta ∧ + d.approximationError = error ∧ d.coordinates = uc ∧ d.center = center ∧ + d.projectionNorm = + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball center ((1 / 2048) * s)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff (m + 2) X) hX.quadratic + (radiusScaledColumns (hausdorff (m + 2) X) hX.quadratic s uc) + (ball center ((1 / 2048) * s)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball center ((1 / 2048) * s)) + ((s ^ 2)⁻¹ • (d2.replacement.replacement i - d1.replacement.replacement i))))‖ := by + classical + have hn : 2 ≤ m + 2 := by omega + have hDrow := projectionRowConstant_nonneg (m + 2) (D := D) hB + obtain ⟨H, hH, hconstruct⟩ := normalized_projection_configuration hX hgradient hmean hn + hκ hepsilon hDrow hsmall + refine ⟨H, hH, ?_⟩ + intro error herror + obtain ⟨deltaM, hdeltaM, hmeasure⟩ := projection_measured_local_coordinates hX hn hmeasured herror + let delta := min deltaM 1 + have hdelta : 0 < delta := lt_min hdeltaM zero_lt_one + refine ⟨delta, hdelta, ?_⟩ + intro base first center a enlargement zeta eta Cg Ca ker hk ha hzeta hzetaeps hzetadelta heta hBG + e hfirst hcenter d1 d2 i s uc hroom hcurvMeasure source hsource hpair henv + let μ := hausdorff (m + 2) X + let hQ := hX.quadratic + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hs2R : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + have hR1 := e.heat.radius_le_one + have hsR : s ≤ e.heat.radius := by linarith + obtain ⟨huc, hnormal, hmetric, g, coeff, hrows⟩ := + regular_center_projection_rows hX e hcenter d2 hκ hB hCχ hzeta i + let V := fun x => (d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (e.heat.values x) - + (d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (e.heat.values center) + have hVzero : V center = 0 := sub_self _ + have huc' : FirstOrderSplittingOn μ hQ center (2 * s) epsilon uc V := + huc.mono_error μ hQ hzeta hzetaeps + have hzetaM : zeta ≤ deltaM := hzetadelta.trans (min_le_left _ _) + have hzeta1 : zeta ≤ 1 := hzetadelta.trans (min_le_right _ _) + have hcurvM : -deltaM / 32 ≤ K * s ^ 2 := by + have hh : delta ≤ deltaM := min_le_left _ _ + linarith + obtain ⟨W, _hW, hEq, hWfirst, hWzero, _hWmetricM, hWmeasured⟩ := + hmeasure hs hcurvM uc V huc' hVzero (hmetric.mono_error hzetaM) + have hWmetric : IsPointedApproximation center 0 (s / 64) 4 zeta + (fun x => (s / 64)⁻¹ • W x) := by + apply hmetric.congr_on_ball (by positivity) + intro x hx + have hxs : x ∈ ball center (2 * s) := by + have hh := mem_closedBall.mp hx + exact mem_ball.mpr (by linarith) + change (s / 64)⁻¹ • V x = (s / 64)⁻¹ • W x + rw [hEq hxs] + have hcurv : -1 ≤ K * s ^ 2 := by + have hh := e.curvature + have hsq : s ^ 2 ≤ e.heat.radius ^ 2 := by nlinarith + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg s) + have hkR := mul_nonneg hκ (sq_nonneg e.heat.radius) + nlinarith + have hsmallcurv : -κ ≤ K * (s / 512) ^ 2 := by + have hsq : (s / 512) ^ 2 ≤ 1 := by nlinarith + have hh := mul_le_mul_of_nonneg_right hK (sq_nonneg (s / 512)) + have hk := mul_nonneg hκ (sub_nonneg.mpr hsq) + nlinarith + have hlap : ((m + 2 : ℕ) : ℝ) + κ * (4 * s) ^ 2 ≤ ((m + 2 : ℕ) : ℝ) + 1 := by + have hsq : (4 * s) ^ 2 ≤ 4 * e.heat.radius ^ 2 := by nlinarith + have hh := mul_le_mul_of_nonneg_left hsq hκ + have he := e.curvature + have haR := mul_nonneg (abs_nonneg K) (sq_nonneg e.heat.radius) + nlinarith + have hsphere : μ (sphere center (s / 2048)) = 0 := + sphere_measure_zero_of_comparison hBG (continuous_comparisonModelVolume (m + 1) a) + center (by positivity) (comparisonModelVolume_pos (m + 1) ha (by positivity)) + apply hconstruct e.heat.radius first center d1.source d2.source d1.replacement d2.replacement i + hR1 hroom hcurv hsmallcurv hlap + (fun t ht htR => e.volume center hcenter t ht (by linarith)) hsphere + uc W hWfirst hnormal hWzero zeta hzeta1 hWmetric error herror hWmeasured + e.one.sobolev (e.oneRepresentative center hcenter i) (d2.cutoff i) + (d1.gradient i center hroom) (d2.gradient i center (by simp only [dist_self]; positivity)) + source hsource hpair g coeff (fun j => (hrows j).1) _ eta heta d2.summable d2.budget.le + intro j + exact (hrows j).2.trans (mul_le_mul_of_nonneg_left henv (by positivity)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionEnvironment.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionEnvironment.lean new file mode 100644 index 0000000000000000000000000000000000000000..22664144648c89d951b2e6013423f51a5d53d16c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionEnvironment.lean @@ -0,0 +1,203 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularBilinearData +import OAI.Geometry.RCD.Coordinates.UniformRegularPoissonDefect +import OAI.Geometry.RCD.Sobolev.PoissonFamilyGradient + +namespace OAI + +/-! # One regular-neighborhood environment for heat and sharp projection -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Actual heat data and actual small-source replacements with identical +root radii. Every later coordinate estimate uses `heat.coordinates`. -/ +structure RegularProjectionEnvironment {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [(hausdorff n X).Regular] [IsFiniteMeasureOnCompacts (hausdorff n X)] + (p : X) {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (a κ B J C A Cχ enlargement zeta eta : ℝ) where + heat : RegularBilinearData hX p hk enlargement zeta + modelScale : a * (3 * heat.radius) ≤ 1 + curvature : 4 * (|K| + κ) * heat.radius ^ 2 ≤ 1 + one : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (2 * heat.radius) Cχ + oneRepresentative : ∀ q ∈ ball p (heat.radius / 32), ∀ i, + SobolevSpace.toLp (hausdorff n X) hX.quadratic one.sobolev =ᵐ[ + (hausdorff n X).restrict (ball q (2 * distanceSourceRadius heat.radius i))] + fun _ => (1 : ℝ) + volume : ∀ q ∈ ball p (heat.radius / 32), ∀ t : ℝ, 0 < t → t ≤ 2 * heat.radius → + |(hausdorff n X).real (ball q t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4 + poisson : ∀ q ∈ ball p (heat.radius / 32), + ∃ S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ q heat.radius, + ∃ T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C, + Summable (normalizedPoissonDefect (hausdorff n X) hX.quadratic S) ∧ + (∑' i, normalizedPoissonDefect (hausdorff n X) hX.quadratic S i) < eta ∧ + (∀ i z, dist z q ≤ distanceSourceRadius heat.radius i / 4 → + ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius heat.radius i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius heat.radius i) ^ 2) ∧ + ∀ i, Nonempty (GoodLaplacianCutoff (hausdorff n X) hX.quadratic q + (distanceSourceRadius heat.radius i / 64) Cχ) + +/-- The radius cap synchronizes the already proved heat construction with +the source neighborhood. All five construction constants are chosen before +the source and coordinate tolerances. -/ +theorem exists_regular_projection_environment_uniform_degree {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ degree : ℕ, 3 ≤ degree ∧ ∃ B J C A Cχ : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ + ∀ enlargement zeta eta cap : ℝ, 0 ≤ enlargement → 0 < zeta → 0 < eta → 0 < cap → + ∃ d : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta, + d.heat.radius ≤ cap ∧ d.heat.degree = degree := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨degree, hdegree, hheatConstruct⟩ := exists_regular_bilinear_data_uniform_degree m hX + ha hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + have hn : 2 ≤ m + 2 := by omega + obtain ⟨B, J, C, hB, hJ, hC, hsources⟩ := regular_poisson_defect_uniform m hX + ha hκ hK hcompact hregular hvolume hBG hdensity hdistance hsobolev hcutoff + obtain ⟨A, hA, hgrad⟩ := poisson_family_gradient hX hn hpoisson (B := B) hκ + obtain ⟨Cχ, hCχ, hcuts⟩ := hcutoff hn + refine ⟨degree, hdegree, B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, ?_⟩ + intro enlargement zeta eta cap henlargement hzeta heta hcap + let cap' := min cap (1 / (4 * (|K| + κ + a + 1))) + have hcap' : 0 < cap' := lt_min hcap (by positivity) + obtain ⟨D, hD, hDcap, hsource⟩ := hsources cap' eta hcap' heta + obtain ⟨heat, hheat, hdegreeEq⟩ := hheatConstruct (radiusCap := D / 2) + (by positivity) henlargement hzeta + let R := heat.radius + have hR : 0 < R := heat.radius_pos + have hR1 : R ≤ 1 := heat.radius_le_one + have hRcap : R ≤ cap' := hheat.trans ((by linarith : D / 2 ≤ D).trans hDcap) + have hRsmall : R ≤ 1 / (4 * (|K| + κ + a + 1)) := hRcap.trans (min_le_right _ _) + have hbound := (le_div_iff₀ (by positivity : 0 < 4 * (|K| + κ + a + 1))).mp hRsmall + have hscale : a * (3 * R) ≤ 1 := by + nlinarith [mul_nonneg (abs_nonneg K) hR.le, mul_nonneg hκ hR.le, mul_nonneg ha hR.le] + have hcurv : 4 * (|K| + κ) * R ^ 2 ≤ 1 := by + have hsquare : R ^ 2 ≤ R := by nlinarith + have hh := mul_le_mul_of_nonneg_left hsquare (by positivity : 0 ≤ 4 * (|K| + κ)) + nlinarith [mul_nonneg ha hR.le] + have hcurvSmall (r : ℝ) (hr : 0 ≤ r) (hrR : r ≤ 2 * R) : -1 ≤ K * r ^ 2 := by + have hsquare : r ^ 2 ≤ (2 * R) ^ 2 := by nlinarith + have habs := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + have hkappa := mul_nonneg hκ (sq_nonneg R) + nlinarith + let one := Classical.choice (hcuts p (2 * R) (by positivity) + (hcurvSmall _ (by positivity) le_rfl)) + have hqD (q : X) (hq : q ∈ ball p (R / 32)) : dist p q ≤ D := by + have hh := mem_ball.mp hq + rw [dist_comm] at hh + linarith + have hvol (q : X) (hq : q ∈ ball p (R / 32)) (t : ℝ) (ht : 0 < t) (htR : t ≤ 2 * R) : + |(hausdorff (m + 2) X).real (ball q t) / + (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4 := by + obtain ⟨_, _, _, _, hv⟩ := hsource q (hqD q hq) (2 * R) (by positivity) (by linarith) + exact hv t ht htR + refine ⟨{ + heat := heat + modelScale := hscale + curvature := hcurv + one := one + oneRepresentative := ?_ + volume := hvol + poisson := ?_ }, hRcap.trans (min_le_left _ _), hdegreeEq⟩ + · intro q hq i + filter_upwards [ae_restrict_of_ae one.representative, ae_restrict_mem measurableSet_ball] + with x hx hball + rw [hx] + apply one.one + have houter := distanceSourceRadius_outer_le hR.le i + have hxq := mem_ball.mp hball + have hqp := mem_ball.mp hq + have hxp := dist_triangle x q p + change dist x p < 2 * R + linarith + · intro q hq + obtain ⟨S, hT, hsum, hbudget, _⟩ := hsource q (hqD q hq) R hR (by linarith) + let T := Classical.choice hT + have hs (i : ℕ) : 0 < distanceSourceRadius R i := distanceSourceRadius_pos hR i + have hsR (i : ℕ) : distanceSourceRadius R i ≤ R := by + have hh := distanceSourceRadius_outer_le hR.le i + linarith + refine ⟨S, T, hsum, hbudget, ?_, ?_⟩ + · intro i z hz + have hsi := hs i + exact hgrad q z R J C S T i ((hsR i).trans hR1) hz + (hcurvSmall _ (by positivity) (by linarith [hsR i])) + · intro i + have hsi := hs i + exact hcuts q _ (by positivity) (hcurvSmall _ (by positivity) (by linarith [hsR i])) + +/-- The original interface follows by forgetting the uniform degree. -/ +theorem exists_regular_projection_environment {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C A Cχ : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ + ∀ enlargement zeta eta cap : ℝ, 0 ≤ enlargement → 0 < zeta → 0 < eta → 0 < cap → + ∃ d : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta, + d.heat.radius ≤ cap := by + obtain ⟨_, _, B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, hconstruct⟩ := + exists_regular_projection_environment_uniform_degree m hX ha hκ hK hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson hinitial htrans hsplit + hrigidity hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + refine ⟨B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, ?_⟩ + intro enlargement zeta eta cap henlargement hzeta heta hcap + obtain ⟨d, hradius, _⟩ := hconstruct enlargement zeta eta cap henlargement hzeta heta hcap + exact ⟨d, hradius⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionRows.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..7579b52f52fbf639f8f5ea85e3e1b8a624dc13e5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularProjectionRows.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData +import OAI.Geometry.RCD.Harmonic.CenteredProjectionRows +import OAI.Geometry.RCD.Coordinates.CenteredNormalization + +namespace OAI + +/-! # Actual radial rows in the coordinates used by sharp projection -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +def projectionRowConstant (n : ℕ) (B D : ℝ) : ℝ := + ((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * + (2 * D ^ 2 + 8192 * ((n : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n)) / 64 ^ 2 + +theorem projectionRowConstant_nonneg (n : ℕ) {B D : ℝ} (hB : 0 ≤ B) : + 0 ≤ projectionRowConstant n B D := by + unfold projectionRowConstant + have hω := euclideanUnitVolume_pos n + positivity + +/-- The same exact frames and local constant turn the radial rows into +centered projection rows on the smaller ball, with a uniform coefficient. -/ +theorem regular_center_projection_rows {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {p q : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + (e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta) + (hq : q ∈ ball p (e.heat.radius / 32)) + (d : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q) + (hκ : 0 ≤ κ) (hB : 0 ≤ B) (hCχ : 0 ≤ Cχ) (hzeta : 0 ≤ zeta) (i : ℕ) : + let s := distanceSourceRadius e.heat.radius i + let N := d.frame i + let uc := centeredColumn (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic e.heat.coordinates N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values q)) e.one.sobolev + let W := fun x => (N : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values x) - + (N : Euclidean n →L[ℝ] Euclidean n).adjoint (e.heat.values q) + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect (hausdorff n X) hX.quadratic d.source) i + FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (2 * s) zeta uc W ∧ + sobolevMeanGram (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic uc) + (ball q (2 * s)) measurableSet_ball = ContinuousLinearMap.id ℝ (Euclidean n) ∧ + IsPointedApproximation q 0 (s / 64) 4 zeta (fun x => (s / 64)⁻¹ • W x) ∧ + ∃ (g : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (coeff : Fin n → Euclidean n), ∀ j, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (g j) =ᵐ[ + (hausdorff n X).restrict (ball q (s / 512))] + localGamma (hausdorff n X) hX.quadratic (d.replacement.replacement i) (uc j)) ∧ + ‖normalizeLocalL2 (hausdorff n X) (ball q (s / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball q (s / 512)) + (g j - sobolevColumnMap (hausdorff n X) hX.quadratic uc (coeff j)))‖ ^ 2 ≤ + projectionRowConstant n B D * s ^ 2 * E := by + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius e.heat.radius i + let N := d.frame i + let u := e.heat.coordinates + let z := e.heat.values q + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hQ d.source) i + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + dsimp only [s] + linarith + have hone := e.oneRepresentative q hq i + have hsmall : ball q (s / 512) ⊆ ball q (2 * s) := ball_subset_ball (by linarith) + have honeSmall := ae_restrict_of_ae_restrict_of_subset hsmall hone + have hfirst := (d.splitting i).center μ hQ + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) e.one.sobolev hone + have hnormal : sobolevMeanGram μ hQ + (sobolevColumnMap μ hQ (centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) e.one.sobolev)) + (ball q (2 * s)) measurableSet_ball = ContinuousLinearMap.id ℝ (Euclidean n) := by + rw [centeredColumn_meanGram μ hQ _ _ measurableSet_ball _ _ hone, + sobolevColumnMap_transformed] + exact d.exactFrame i + refine ⟨hfirst, hnormal, d.metric i, ?_⟩ + obtain ⟨coeff, g, _hmatrix, hrows⟩ := d.rows i + refine ⟨g, fun j => N.symm (coeff j), ?_⟩ + intro j + have hrow := hrows j + have hsub : ball q (s / 512) ⊆ ball q (s / 64) := ball_subset_ball (by linarith) + have hrep : SobolevSpace.toLp μ hQ (g j) =ᵐ[μ.restrict (ball q (s / 512))] + localGamma μ hQ (d.replacement.replacement i) (transformedColumn μ hQ u N j) := by + exact ae_restrict_of_ae_restrict_of_subset hsub hrow.1 + refine ⟨centered_radial_representative μ hQ (transformedColumn μ hQ u N) + (d.replacement.replacement i) (g j) e.one.sobolev + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) _ j honeSmall hrep, ?_⟩ + have hchi : SobolevSpace.toLp μ hQ (d.cutoff i).sobolev =ᵐ[μ.restrict (ball q (s / 512))] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (d.cutoff i).representative, ae_restrict_mem measurableSet_ball] + with x hx hball + exact hx.trans ((d.cutoff i).one x (hsub hball)) + have hE : 0 ≤ E := (radial_fit_pinching_envelope_budget d.source hκ hCχ hzeta d.summable).2.2 i |>.1 + have hvolBig := e.volume q hq (s / 64) (by positivity) (by linarith) + have hvolSmall := e.volume q hq (s / 512) (by positivity) (by linarith) + have hVbig : 0 < μ.real (ball q (s / 64)) := + (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) hvolBig).1 + have hVsmall : 0 < μ.real (ball q (s / 512)) := + (quarter_volume_bounds (by positivity) (euclideanUnitVolume_pos n) hvolSmall).1 + have hratio := radial_fraction_volume_ratio (by positivity : 0 < s / 64) + (by norm_num : (0 : ℝ) < 1 / 8) (euclideanUnitVolume_pos n) hvolBig + (by simpa only [show (1 / 8 : ℝ) * (s / 64) = s / 512 by ring] using hvolSmall) + have hvol : μ.real (ball q (s / 64)) ≤ + ((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * μ.real (ball q (s / 512)) := + (div_le_iff₀ hVsmall).mp hratio + have hω := euclideanUnitVolume_pos n + have hbound := normalized_centered_frame_fit μ hQ hsub + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hVbig hVsmall + u (g j) e.one.sobolev (d.cutoff i).sobolev N z (coeff j) + (by positivity) hvol honeSmall hchi hrow.2.1 + convert hbound using 1 + dsimp only [projectionRowConstant, s] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticMidpoints.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticMidpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..b28ee02c582dbe4ddecb4d7c9d93ea1585aa3e26 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticMidpoints.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Coordinates.RegularQuadraticTransportPaths +import OAI.Geometry.RCD.Transport.QuadraticMidpointSelection + +namespace OAI + +/-! # Simultaneous approximate midpoint identities near a regular point -/ + +open Set Filter Metric MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] +attribute [local instance] pathBorel pathBorelSpace + +include hX in +theorem regular_quadratic_midpoint_selection (hn : 2≤n) (hK : K≤0) + {o : X} (ho : IsRegular n o) (z : ℕ → ℕ → X) (r : ℕ → ℕ → ℝ) + (hz : ∀ i, Tendsto (z i) atTop (𝓝 o)) (hr : ∀ i k, 0 γ 0)) ((π m k).map (fun γ => γ 1)) + ((π m k).map (fun γ => (γ 0,γ 1)))) + (B : ℕ → ℕ → ℝ≥0∞) (hB : ∀ m k, B m k≠∞) + (hcomp : ∀ m k (t : Time), (π m k).map (fun γ => γ t)≤B m k • hausdorff n X) + (hends : ∀ m i, i ≤ m → ∀ k, + (∀ᵐ x ∂(π m k).map (fun γ => γ 0), dist x (z i k)≤r i k/512) ∧ + (∀ᵐ x ∂(π m k).map (fun γ => γ 1), dist x (z i k)≤r i k/512)) + (hcompression : ∀ m i, i ≤ m → ∃ C : ℝ, 0 ≤ C ∧ ∀ k, + (B m k).toReal*(hausdorff n X).real (ball (z i k) (r i k))≤C) + (P : ℕ → ℕ → C(Time,X) → Prop) (hP : ∀ m k, ∀ᵐ γ ∂π m k, P m k γ) : + ∃ (d : ℕ → ℕ) (γ : ℕ → C(Time,X)), Tendsto d atTop atTop ∧ + (∀ k, P (d k) k (γ k) ∧ IsGeodesic (γ k)) ∧ + ∀ i, Tendsto (fun k => fullMidpointDefect (z i k) (γ k)/(r i k)^2) atTop (𝓝 0) := by + let δ m := heatStep m/4 + have hδ m : 0<δ m ∧ δ m<1/2 := by + have hm : heatStep m≤1 := pow_le_one₀ (by norm_num) (by norm_num) + constructor + · exact div_pos (heatStep_pos m) (by norm_num) + · dsimp only [δ] + linarith + have hδ0 : Tendsto δ atTop (𝓝 0) := by simpa only [zero_div] using heatStep_tendsto.div_const 4 + let a (m : ℕ) : Time := ⟨δ m,(hδ m).1.le,by linarith [(hδ m).2]⟩ + let b (m : ℕ) : Time := ⟨1-δ m,by linarith [(hδ m).2],by linarith [(hδ m).1]⟩ + have hs m i (him : i ≤ m) k : ∀ᵐ γ ∂π m k, + dist (z i k) (γ 0)≤r i k ∧ dist (z i k) (γ 1)≤r i k := by + have h0 := ae_of_ae_map (measurable_path_eval 0).aemeasurable (hends m i him k).1 + have h1 := ae_of_ae_map (measurable_path_eval 1).aemeasurable (hends m i him k).2 + filter_upwards [h0,h1] with γ hγ0 hγ1 + rw [dist_comm] at hγ0 hγ1 + exact ⟨hγ0.trans (by linarith [hr i k]),hγ1.trans (by linarith [hr i k])⟩ + have hl m i (him : i ≤ m) : Tendsto (fun k => + (∫ γ, |interiorQuadraticDefect (fun x => dist (z i k) x^2/2) + (a m) (b m) quadraticMidpointTime γ| ∂π m k)/(r i k)^2) atTop (𝓝 0) := by + obtain ⟨C,hC,hbound⟩ := hcompression m i him + exact hX.regular_quadratic_transport_paths hn hK ho (z i) (r i) (hz i) (hr i) (hr0 i) + (π m) (hg m) (hopt m) (B m) (hB m) (hcomp m) + (fun k => (hends m i him k).1) (fun k => (hends m i him k).2) hC hbound + (a m) (b m) quadraticMidpointTime (hδ m).1 + (by change δ m<1-δ m; linarith [(hδ m).2]) + (by change 1-δ m<1; linarith [(hδ m).1]) + (by constructor + · change δ m ≤ 1/2 + linarith [(hδ m).2] + · change 1/2 ≤ 1-δ m + linarith [(hδ m).2]) + exact quadratic_midpoint_selection π z r hr δ hδ hδ0 a b (fun _ => rfl) (fun _ => rfl) hg hs hl P hP + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticTransportPaths.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticTransportPaths.lean new file mode 100644 index 0000000000000000000000000000000000000000..f09f10e7489f713321991e77cdc2baa7da39c794 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularQuadraticTransportPaths.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Harmonic.DistanceQuadraticPathLimit +import OAI.Geometry.RCD.Coordinates.NearRegularPoissonFamily + +namespace OAI + +/-! # Absolute squared-distance path errors near every regular point + +All Poisson, source, cutoff and second-order data are constructed internally. +The remaining hypotheses describe only the given compressed optimal plans. +-/ + +open Set Filter Metric MeasureTheory TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] +attribute [local instance] pathBorel pathBorelSpace + +include hX in +theorem regular_quadratic_transport_paths (hn : 2≤n) (hK : K≤0) + {o : X} (ho : IsRegular n o) (p : ℕ → X) (r : ℕ → ℝ) + (hp : Tendsto p atTop (𝓝 o)) (hr : ∀ k, 0 γ 0)) ((π k).map (fun γ => γ 1)) + ((π k).map (fun γ => (γ 0,γ 1)))) + (Bπ : ℕ → ℝ≥0∞) (hBπ : ∀ k, Bπ k≠∞) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t)≤Bπ k • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k)≤r k/512) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k)≤r k/512) + {Cπ : ℝ} (hCπ : 0≤Cπ) + (hcompression : ∀ k, (Bπ k).toReal*(hausdorff n X).real (ball (p k) (r k))≤Cπ) + (l h t : Time) (hl : 0<(l:ℝ)) (hlh : (l:ℝ) (∫ γ, |interiorQuadraticDefect + (fun x => dist (p k) x^2/2) l h t γ| ∂π k)/(r k)^2) atTop (𝓝 0) := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + obtain ⟨B,J,C,hB,hJ,_hC,N,F,hgood,_hmass,hratio,_hL2⟩ := + hX.near_regular_poisson_family hn hK ho p r hp hr hr0 + obtain ⟨D⟩ := hX.distance_poisson_mean_data hn hK o (neg_nonneg.mpr hK) F + (fun k => ⟨(hgood k).1,(hgood k).2.1⟩) + have hrN : Tendsto (fun k => r (k+N)) atTop (𝓝 0) := hr0.comp (tendsto_add_atTop_nat N) + have hresult := D.normalized_distance_path_error (hX := hX) (hn := hn) o hK (neg_nonneg.mpr hK) + (by positivity : 0≤J+B/2) (fun k => (hgood k).1) (fun k => (hgood k).2.2.1) hrN + (annularPoincareConstant_pos K n).le hCπ + (fun k => hX.annular_dirichlet_poincare hn (p (k+N)) (hr (k+N)) (hgood k).1 + (hgood k).2.2.1 (hgood k).2.2.2) hratio + (fun k => π (k+N)) (fun k => hgeo (k+N)) (fun k => hopt (k+N)) + (fun k => Bπ (k+N)) (fun k => hBπ (k+N)) (fun k => hcomp (k+N)) + (fun k => hs₀ (k+N)) (fun k => hs₁ (k+N)) (fun k => hcompression (k+N)) + l h t hl hlh hh ht + exact (tendsto_add_atTop_iff_nat N).mp hresult + +end RegularPointCoordinates.NoncollapsedRCD + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularRadialEnvironment.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularRadialEnvironment.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b2b5b4c3b7a181c4feb775d4fa4e9575c5ab8b6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularRadialEnvironment.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData + +namespace OAI + +/-! # A common regular neighborhood with uniform radial estimates -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published inputs yield one actual heat and Poisson environment, +with the radial constants fixed before all requested smallness tolerances. -/ +theorem exists_regular_radial_environment {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C A Cχ Cg D Ca : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ + ∀ enlargement zeta eta cap : ℝ, 0 ≤ enlargement → 0 < zeta → + radialNormalizationRestrictionConstant (m + 2) * zeta ≤ 1 → + ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * zeta) ≤ 1 / 64 → + 0 < eta → 0 < cap → + ∃ e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ enlargement zeta eta, + e.heat.radius ≤ cap ∧ ∀ q ∈ ball p (e.heat.radius / 32), + Nonempty (RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q) := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨degree, hdegree, B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, hconstruct⟩ := + exists_regular_projection_environment_uniform_degree m hX ha hκ hK hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson hinitial htrans hsplit + hrigidity hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨Cg, D, Ca, hCg, hD, hCa, hrows⟩ := regular_center_radial_constants m hX hhessian + hmean hgradient hB.le hJ.le hA.le (zero_le_one.trans hCχ) (by omega : 0 < degree) + refine ⟨B, J, C, A, Cχ, Cg, D, Ca, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, ?_⟩ + intro enlargement zeta eta cap henlargement hzeta hsmall1 hsmall heta hcap + obtain ⟨e, hecap, hdeg⟩ := hconstruct enlargement zeta eta cap henlargement hzeta heta hcap + exact ⟨e, hecap, hrows ha hκ hK hzeta.le hsmall1 hsmall hBG e hdeg⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularRawMassSmallness.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularRawMassSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2d1f004661bfe43cb3055b8d58907928d7b1680 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularRawMassSmallness.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchMassSum + +namespace OAI + +/-! # Small raw patch mass in the strictly interior heat metric -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Nearby mean forms are at most twice the central heat form. -/ +theorem regular_nearby_mean_heat_upper {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 1) + (hroom : dist z q ≤ e.heat.radius / (2 : ℝ) ^ (i + 1)) (v : Euclidean n) : + ⟪v, e.heat.meanAt z hz (i + 1) v⟫_ℝ ≤ 2 * ⟪v, e.heat.heatAt q (i + 1) v⟫_ℝ := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ i := div_pos e.heat.radius_pos (by positivity) + have heq : (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) = + e.heat.radius / (2 : ℝ) ^ (i + 1) := by rw [pow_succ]; ring + have hqroom : dist q q + (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) ≤ + e.heat.radius / (2 : ℝ) ^ i := by rw [dist_self]; linarith + have hzroom : dist z q + (1 / 2 : ℝ) * (e.heat.radius / (2 : ℝ) ^ i) ≤ + e.heat.radius / (2 : ℝ) ^ i := by rw [heq]; rw [← heq] at hroom; linarith + have hbq := (regular_subball_mean_comparison hX e hq hq hzeta i + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num) hqroom v).1 + have hbz := (regular_subball_mean_comparison hX e hq hz hzeta i + (by norm_num : (0 : ℝ) < 1 / 2) (by norm_num) hzroom v).2 + rw [heq] at hbq hbz + have hheat := (e.heat.heatMeanComparison q hq (i + 1) hi v).1 + have hnonneg := (sobolevMeanGram_isPositive (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + (ball q (e.heat.radius / (2 : ℝ) ^ i)) measurableSet_ball).inner_nonneg_right v + have hmul := mul_le_mul_of_nonneg_right hsmall hnonneg + change ⟪v, (e.heat.meanAt z hz (i + 1)).toContinuousLinearMap v⟫_ℝ ≤ + 2 * ⟪v, e.heat.heatAt q (i + 1) v⟫_ℝ + rw [e.heat.meanAt_toContinuousLinearMap] + change _ ≤ 2 * ⟪v, dyadicHeatGramAt (hausdorff n X) hX.quadratic hk + (sobolevColumnMap (hausdorff n X) hX.quadratic e.heat.coordinates) + e.heat.cutoff q e.heat.radius_pos e.heat.lambda_pos (i + 1) v⟫_ℝ + nlinarith + +/-- Before conjugation the full raw mass is small in the finer central +heat form. This is the bound needed to charge normalization errors. -/ +theorem regular_raw_patch_mass_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) + (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 15) + (hroom : dist z q ≤ e.heat.radius / (2 : ℝ) ^ (i + 15)) (v : Euclidean n) : + let r := e.heat.radius / (2 : ℝ) ^ (i + 15) + ⟪v, rawPinchingMass e.heat.mass n e.heat.radius z i v⟫_ℝ ≤ + (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2)) * ⟪v, e.heat.heatAt q (i + 17) v⟫_ℝ := by + intro r + let R := e.heat.meanAt z hz (i + 15) + let D := rawPinchingMass e.heat.mass n e.heat.radius z i + have h := regular_pinching_mass_small hX e hz hzeta hzeta1 hCχ hsmall i (R v) + change ⟪R v, frozenConjugate R D (R v)⟫_ℝ ≤ + pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * (zeta + |K| * r ^ 2) * + ⟪R v, R.symm (R v)⟫_ℝ at h + rw [inner_frozenConjugate, R.symm_apply_apply] at h + rw [show ⟪R v, v⟫_ℝ = ⟪v, R v⟫_ℝ from real_inner_comm _ _] at h + have hu := regular_nearby_mean_heat_upper hX e hq hz hzeta hnear (i + 14) + (by omega) (by simpa only [show i + 14 + 1 = i + 15 by omega] using hroom) v + rw [show i + 14 + 1 = i + 15 by omega] at hu + have hs := e.heat.heatAt_two_step_bound hq (i + 15) hi v + rw [show i + 15 + 2 = i + 17 by omega] at hs + have hc : 0 ≤ pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * r ^ 2) := by + have homega : 0 < euclideanUnitVolume n := euclideanUnitVolume_pos n + dsimp only [pinchingMassUnitFactor, regularSmallMassCoefficient] + positivity + have hbound : ⟪v, R v⟫_ℝ ≤ 4 * ⟪v, e.heat.heatAt q (i + 17) v⟫_ℝ := by + change ⟪v, e.heat.meanAt z hz (i + 15) v⟫_ℝ ≤ _ + linarith + have hh := mul_le_mul_of_nonneg_left hbound hc + exact h.trans (by convert hh using 1; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularRebasedRadialData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularRebasedRadialData.lean new file mode 100644 index 0000000000000000000000000000000000000000..964e6fad33d2e9f9ac97a3ed770b4971c97655dc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularRebasedRadialData.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.RCD.Coordinates.RegularLinearRadialData +import OAI.Geometry.RCD.Coordinates.RegularPairFrames +import OAI.Geometry.RCD.Coordinates.CommonFrameRadialFits + +namespace OAI + +/-! # The actual radial family in a neighboring centered frame -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Both value and gradient estimates transfer together to the common +commutator ball. The added affine constant is the actual coordinate +displacement paired with the transported coefficient. -/ +theorem regular_rebased_radial_data {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base first center : X} {a κ B J C A Cχ enlargement zeta eta Cg D Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hfirst : first ∈ ball base (e.heat.radius / 32)) + (hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) + (hκ : 0 ≤ κ) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * zeta) ≤ 1 / 3) + (i : ℕ) : + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let N := d2.frame i + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp N.toContinuousLinearMap + let delta := (N : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let Ω := ball center (s / 2048) + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) i + let Cv := 2 * D ^ 2 + 8192 * ((n : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume n)) * (64 : ℝ) ^ n) + let Ce := radialEnergyConstant K n Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume n)) * (128 : ℝ) ^ n) + let Vratio := (5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹ + let Eratio := (5 / 3 : ℝ) * ((1 / 16 : ℝ) ^ n)⁻¹ + dist first center ≤ s / 512 → + ∃ (T : Euclidean n →L[ℝ] Euclidean n) + (G : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic), + ‖T - 1‖ ≤ 2 * ((n : ℝ) ^ 4 * + Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant n Cχ * zeta))) ∧ + ∀ b, + (SobolevSpace.toLp μ hX.quadratic (G b) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d1.replacement.replacement i) (U b)) ∧ + let R := G b - U (T b) + ⟪delta, T b⟫_ℝ • e.one.sobolev + ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω R)‖ ^ 2 ≤ + 2 * (Vratio * ((n : ℝ) ^ 2 * (Cv * (s / 64) ^ 2 * E))) * ‖b‖ ^ 2 ∧ + (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic R R x ∂μ) ≤ + 2 * (Eratio * ((n : ℝ) ^ 2 * Ce * E)) * ‖b‖ ^ 2 := by + intro μ s N U delta Ω E Cv Ce Vratio Eratio hroom + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : s ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + change 2 * s ≤ e.heat.radius at hh + linarith + have hE : 0 ≤ E := (radial_fit_pinching_envelope_budget d1.source hκ hCχ hzeta d1.summable).2.2 i |>.1 + have hCv : 0 ≤ Cv := by dsimp only [Cv]; have := euclideanUnitVolume_pos n; positivity + have hCe : 0 ≤ Ce := by + have hh := (radialEnergyConstant_pos (K := K) (n := n) (G := Cg) (ε := 1) (A := A) hB hJ hCχ).le + dsimp only [Ce] + have := euclideanUnitVolume_pos n + positivity + have hVratio : 0 ≤ Vratio := by dsimp only [Vratio]; positivity + have hEratio : 0 ≤ Eratio := by dsimp only [Eratio]; positivity + have hsubv : Ω ⊆ ball first (s / 64) := by + apply ball_subset_ball' + rw [dist_comm center first] + linarith + have hsube : Ω ⊆ ball first ((s / 64) / 2) := by + apply ball_subset_ball' + rw [dist_comm center first] + linarith + have hvol (x : X) (hx : x ∈ ball base (e.heat.radius / 32)) + (t : ℝ) (ht : 0 < t) (hts : t ≤ 2 * e.heat.radius) : + |μ.real (ball x t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4 := e.volume x hx t ht hts + have hpos : 0 < μ.real Ω := (quarter_volume_bounds (by positivity) + (euclideanUnitVolume_pos n) (hvol center hcenter _ (by positivity) (by linarith))).1 + have hposv : 0 < μ.real (ball first (s / 64)) := (quarter_volume_bounds (by positivity) + (euclideanUnitVolume_pos n) (hvol first hfirst _ (by positivity) (by linarith))).1 + have hpose : 0 < μ.real (ball first ((s / 64) / 2)) := (quarter_volume_bounds (by positivity) + (euclideanUnitVolume_pos n) (hvol first hfirst _ (by positivity) (by linarith))).1 + have hvr : μ.real (ball first (s / 64)) ≤ Vratio * μ.real Ω := by + apply (div_le_iff₀ hpos).mp + exact radial_fraction_volume_ratio (by positivity : 0 < s / 64) + (by norm_num : (0 : ℝ) < 1 / 32) (euclideanUnitVolume_pos n) + (hvol first hfirst _ (by positivity) (by linarith)) + (by simpa only [Ω, show (1 / 32 : ℝ) * (s / 64) = s / 2048 by ring] using + hvol center hcenter (s / 2048) (by positivity) (by linarith)) + have her : μ.real (ball first ((s / 64) / 2)) ≤ Eratio * μ.real Ω := by + apply (div_le_iff₀ hpos).mp + exact radial_fraction_volume_ratio (by positivity : 0 < (s / 64) / 2) + (by norm_num : (0 : ℝ) < 1 / 16) (euclideanUnitVolume_pos n) + (hvol first hfirst _ (by positivity) (by linarith)) + (by simpa only [Ω, show (1 / 16 : ℝ) * ((s / 64) / 2) = s / 2048 by ring] using + hvol center hcenter (s / 2048) (by positivity) (by linarith)) + obtain ⟨Craw, Graw, hCraw, hraw⟩ := regular_linear_radial_data hX e hfirst d1 hκ hB hCχ hzeta i + let M := d1.frame i + let P := M.symm.toContinuousLinearMap.comp N.toContinuousLinearMap + let T := rebasedRadialOperator N M Craw + let G := Graw.comp P + have hframes := regular_pair_frame_bounds hX e hfirst hcenter d1 d2 hzeta hsmall i (by linarith) + have hP : ‖P‖ ≤ Real.sqrt 2 := hframes.1 + have hP2 : ‖P‖ ^ 2 ≤ 2 := by nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2), norm_nonneg P] + refine ⟨T, G, rebased_radial_operator_bound_two N M Craw hframes.2 hframes.1 hCraw, ?_⟩ + have hone := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : s / 2048 ≤ 2 * s)) (e.oneRepresentative center hcenter i) + have hidentity (b : Euclidean n) : ⟪delta, T b⟫_ℝ = + ⟪e.heat.values first - e.heat.values center, Craw (P b)⟫_ℝ := by + dsimp only [delta] + rw [ContinuousLinearMap.adjoint_inner_left] + simp only [T, rebasedRadialOperator, P, ContinuousLinearMap.comp_apply, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] + intro b + have hrep := common_frame_radial_representative μ hX.quadratic Ω (d1.replacement.replacement i) + e.heat.coordinates e.one.sobolev (e.heat.values center) N M Graw hone + (fun v => ae_restrict_of_ae_restrict_of_subset hsubv (hraw v).1) b + refine ⟨hrep, ?_⟩ + have hb := common_frame_radial_bounds μ hX.quadratic e.heat.coordinates e.one.sobolev + Graw (e.heat.values first) (e.heat.values center) N M Craw hsubv hsube + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hposv hpose hpos + (mul_nonneg (sq_nonneg _) (mul_nonneg (mul_nonneg hCv (sq_nonneg _)) hE)) + (mul_nonneg (mul_nonneg (sq_nonneg _) hCe) hE) hvr her + (fun v => (hraw v).2.1) (fun v => (hraw v).2.2) b + have heq : G b - U (T b) + ⟪delta, T b⟫_ℝ • e.one.sobolev = + Graw (M.symm (N b)) - U (T b) - + ⟪e.heat.values center - e.heat.values first, Craw (M.symm (N b))⟫_ℝ • e.one.sobolev := by + rw [hidentity] + simp only [G, P, ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + inner_sub_left, sub_smul] + module + rw [heq] + dsimp only at hb + constructor + · apply hb.1.trans + change Vratio * (((n : ℝ) ^ 2 * (Cv * (s / 64) ^ 2 * E)) * ‖P‖ ^ 2) * ‖b‖ ^ 2 ≤ _ + calc + _ ≤ Vratio * (((n : ℝ) ^ 2 * (Cv * (s / 64) ^ 2 * E)) * 2) * ‖b‖ ^ 2 := by gcongr + _ = _ := by ring + · apply hb.2.trans + change Eratio * (((n : ℝ) ^ 2 * Ce * E) * ‖P‖ ^ 2) * ‖b‖ ^ 2 ≤ _ + calc + _ ≤ Eratio * (((n : ℝ) ^ 2 * Ce * E) * 2) * ‖b‖ ^ 2 := by gcongr + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSelectedMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSelectedMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..f84c4c790e63b0577bdaabe2d829fc7bc77e2a6c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSelectedMass.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchSelection +import OAI.Geometry.RCD.Coordinates.PatchDirectionalBounds + +namespace OAI + +/-! # Cumulative mass bounds for the selected actual patch family -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularPatchSelection + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + {e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta} + {psi : EuclideanGevreyCutoff n} {f : RegularPinchingField e.heat Cpin budget} + (p : RegularPatchSelection e.heat psi.value f) + +def operator (i : ℕ) (y : X) : Euclidean n →L[ℝ] Euclidean n := + e.heat.pinchingMassMatrix (p.center i y).val (p.center i y).property (e.heat.shift + i) + +def activePatchesAt (_p : RegularPatchSelection e.heat psi.value f) (q : X) (i : ℕ) : Finset X := by + classical + exact (e.heat.patchNet i).filter (fun y => e.heat.values q ∈ tsupport (e.heat.patchCutoff psi.value i y)) + +/-- Both cumulative estimates now concern the actual active net and its +fixed energy centers, including the original singular Bochner mass. -/ +theorem cumulative (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1 / 64) + (hCχ : 0 ≤ Cχ) (henlargement : 1 ≤ enlargement) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) : + ∃ Theta tau : ℝ, 0 < Theta ∧ 0 < tau ∧ ∀ epsilon : ℝ, 0 ≤ epsilon → epsilon ≤ tau → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + ∀ q, q ∈ e.heat.patchRegion → ∀ (xi : Euclidean n) (k : ℕ), + (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ⟪xi, patchMass (p.activePatchesAt q i) (p.operator i) xi⟫_ℝ ≤ + Theta * ‖e.heat.frozenAt q k xi‖ ^ 2) ∧ + (‖e.heat.frozenAt q k xi‖ ^ 2 ≤ Theta * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, + ⟪xi, patchPrincipal (p.activePatchesAt q i) (fun y => e.heat.patchCutoff psi.value i y (e.heat.values q)) + (p.operator i) xi⟫_ℝ)) := by + classical + obtain ⟨Theta, tau, hTheta, htau, hc⟩ := regular_patch_cumulative_comparison hX e hzeta + (by linarith) hCχ hsmall hnear (patchOverlapBound n (1 / 2) 2 3) + refine ⟨Theta, tau, hTheta, htau, ?_⟩ + intro epsilon hepsilon heps hcoef q hq xi k + have cover (i) := regular_actual_patch_cover hX e hzeta1 psi i + have hroom (i y) (hy : y ∈ p.activePatchesAt q i) : dist (p.center i y).val q ≤ + (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) / 12 := + p.near i y (Finset.mem_filter.mp hy).1 q ⟨hq, (Finset.mem_filter.mp hy).2⟩ + have hbig (i y) (hy : y ∈ p.activePatchesAt q i) : dist q (p.center i y).val ≤ + enlargement * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := + div_pos e.heat.radius_pos (by positivity) + have hh := hroom i y hy + rw [dist_comm] at hh + have hm := mul_le_mul_of_nonneg_right henlargement hr.le + linarith + have h := hc epsilon hepsilon heps hcoef (p.activePatchesAt q) p.center + (fun i y => e.heat.patchCutoff psi.value i y (e.heat.values q)) + (fun i => (cover i).active_card q hq) q (e.heat.patch_region_subset hq) + hroom hbig (fun i y _ => (cover i).cutoff_nonneg y _) + (fun i => by + obtain ⟨y, hy, _, hw, ha, _⟩ := (cover i).weight_one_cover q hq + exact ⟨y, Finset.mem_filter.mpr ⟨hy, ha⟩, hw⟩) xi k + simpa only [operator, patchMass, patchPrincipal, sum_apply, inner_sum, smul_apply, + inner_smul_right] using h + +/-- At one scale the total positive mass costs only the active overlap, +with the coefficient computed from the original Bochner cutoff bound. -/ +theorem mass_small (hzeta : 0 ≤ zeta) (hzeta1 : zeta ≤ 1 / 64) (hCχ : 0 ≤ Cχ) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) {epsilon : ℝ} + (hcoef : (patchOverlapBound n (1 / 2) 2 3 : ℝ) * + (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2)) ≤ epsilon) + {q : X} (hq : q ∈ e.heat.patchRegion) (xi : Euclidean n) : + ⟪xi, patchMass (p.activePatchesAt q i) (p.operator i) xi⟫_ℝ ≤ + epsilon * ‖e.heat.frozenAt q i xi‖ ^ 2 := by + classical + have cover := regular_actual_patch_cover hX e hzeta1 psi i + have hroom (y) (hy : y ∈ p.activePatchesAt q i) : dist (p.center i y).val q ≤ + 32 * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) := by + have h := p.near i y (Finset.mem_filter.mp hy).1 q ⟨hq, (Finset.mem_filter.mp hy).2⟩ + have hr : 0 < e.heat.radius / 2 ^ (e.heat.shift + i + 15) := + div_pos e.heat.radius_pos (by positivity) + linarith + have h := regular_patch_mass_sum_frozen_small hX e (e.heat.patch_region_subset hq) + hzeta (by linarith) hCχ hsmall hnear (p.activePatchesAt q i) (p.center i) + (cover.active_card q hq) i hroom xi + have hm := mul_le_mul_of_nonneg_right hcoef (sq_nonneg ‖e.heat.frozenAt q i xi‖) + simpa only [operator, patchMass, sum_apply, inner_sum] using h.trans hm + +end RegularPatchSelection +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSharpNeighborhood.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..8dbdb2a6881db34eb1b77d90d9a6e7429ecbb406 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpNeighborhood.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularRadialEnvironment +import OAI.Geometry.RCD.Coordinates.RegularPairProjection +import OAI.Geometry.RCD.Sobolev.SharpNeighborhoodParameters + +namespace OAI + +/-! # A regular neighborhood carrying the actual sharp projection estimate -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- All sources and coordinates are constructed from the cited inputs. +The positive source has any requested square budget and controls the actual +normalized two-center projection at every admissible center and scale. -/ +theorem exists_regular_sharp_neighborhood {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C A Cχ Cg D Ca P : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ 0 < P ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ 1 zeta eta, + 128 * (radialFitQualitativeConstant (m + 2) Cχ * zeta + eta) ≤ budget ∧ + ∃ data : ∀ q, q ∈ ball p (e.heat.radius / 32) → + RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q, + ∀ first (hfirst : first ∈ ball p (e.heat.radius / 32)) + center (hcenter : center ∈ ball p (e.heat.radius / 32)), + let d1 := data first hfirst + let d2 := data center hcenter + let sigma := twoCenterProjectionSource + (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) + Summable (fun i => sigma i ^ 2) ∧ (∑' i, sigma i ^ 2) ≤ budget ∧ + ∀ i, dist center first ≤ distanceSourceRadius e.heat.radius i / 4 → + regularPairProjectionSize hX e d1 d2 i ≤ P * sigma i := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨B, J, C, A, Cχ, Cg, D, Ca, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hconstruct⟩ := + exists_regular_radial_environment m hX ha hκ hK hcompact hregular hvolume hmeasured hBG + hdensity hdistance hsobolev hpoisson hhessian hmean hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + let G := ((m + 2 : ℕ) : ℝ) ^ 2 * ((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) + have hG : 0 ≤ G := by dsimp only [G]; positivity + let epsilon := 1 / (2 * (G + 1)) + have hepsilon : 0 < epsilon := by dsimp only [epsilon]; positivity + have hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * + (((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) * epsilon) ≤ 1 / 2 := by + have hh : epsilon * (2 * (G + 1)) ≤ 1 := (le_div_iff₀ (by positivity)).mp (le_refl epsilon) + dsimp only [G] at hh + nlinarith + obtain ⟨P, tau, hP, htau, hsharp⟩ := regular_sharp_projection_actual_sources m hX + hgradient hmean hmetricmeasure haction hproduct hpoincare hpoissonCompact + hκ hK hB.le hJ.le (zero_le_one.trans hCχ) hA.le hepsilon.le hsmall + obtain ⟨delta, hdelta, hbound⟩ := hsharp (tau / 2) (by positivity) (by linarith) + refine ⟨B, J, C, A, Cχ, Cg, D, Ca, P, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hP, ?_⟩ + intro budget hbudget + let c := radialNormalizationRestrictionConstant (m + 2) + let g := ((m + 2 : ℕ) : ℝ) ^ 2 * normalizationVolumeRatio (m + 1) + let a₀ := radialFitQualitativeConstant (m + 2) Cχ + have hc : 0 ≤ c := zero_le_one.trans (radialNormalizationRestrictionConstant_ge_one (m + 2)) + have hg : 0 ≤ g := by dsimp only [g, normalizationVolumeRatio]; positivity + have ha₀ : 0 ≤ a₀ := radialFitQualitativeConstant_nonneg _ (zero_le_one.trans hCχ) + obtain ⟨zeta, eta, cap, hzeta, heta, hcap, hzeps, hzdelta, hzc, hzg, hetatau, hbudgetSmall, hcapK⟩ := + sharp_neighborhood_parameters (K := K) hepsilon hdelta htau hc hg ha₀ hbudget + have hnormalize : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * zeta) ≤ 1 / 64 := by + simpa only [g, mul_assoc] using hzg + obtain ⟨e, hecap, hdata⟩ := hconstruct 1 zeta eta cap (by norm_num) hzeta hzc hnormalize heta hcap + let data := fun q hq => Classical.choice (hdata q hq) + refine ⟨zeta, eta, hzeta, heta, e, hbudgetSmall, data, ?_⟩ + intro first hfirst center hcenter + let d1 := data first hfirst + let d2 := data center hcenter + have hqual : 0 < a₀ := by + have hN : 0 < c := zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + dsimp only [a₀, radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * c * _ + positivity + obtain ⟨_hsource, hsum, hsourceBudget⟩ := actual_two_center_projection_budget d1.source d2.source + hκ (mul_pos hqual hzeta) d1.summable d2.summable + refine ⟨hsum, ?_, ?_⟩ + · have hb : 2 * (a₀ * zeta) + + (∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source i) + + (∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source i) ≤ + 2 * (a₀ * zeta) + 2 * eta := by linarith [d1.budget, d2.budget] + have hh := hsourceBudget.trans (mul_le_mul_of_nonneg_left hb (by norm_num : (0 : ℝ) ≤ 64)) + exact hh.trans (by nlinarith [hbudgetSmall]) + · intro i hroom + have hs : 0 < distanceSourceRadius e.heat.radius i := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : distanceSourceRadius e.heat.radius i ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + linarith + have hsCap := hsR.trans hecap + have hsq : distanceSourceRadius e.heat.radius i ^ 2 ≤ cap ^ 2 := by nlinarith + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (distanceSourceRadius e.heat.radius i)) + have hcurv : -delta / 32 ≤ K * distanceSourceRadius e.heat.radius i ^ 2 := by nlinarith + have hh := hbound ha hzeta hzeps hzdelta heta.le hetatau hBG e hfirst hcenter d1 d2 i hroom hcurv + exact hh.2.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSharpProjection.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..275537a80e77afa1553ef31ecc76f71a221cee3b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpProjection.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.RegularProjectionConfiguration +import OAI.Geometry.RCD.Harmonic.ActualProjectionThreshold + +namespace OAI + +/-! # Sharp projection for the constructed regular-neighborhood data -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual two-center projection has a uniform sharp bound on the +same regular neighborhood, under the explicitly separated metric and +source tolerances. -/ +theorem regular_sharp_projection_constants {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + (hgradient : LocalHarmonicL2GradientInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hmeasured : LocalMeasuredCoordinateInput hX) + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) + {κ B J C A Cχ epsilon D : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) + (hepsilon : 0 ≤ epsilon) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * + (((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) * epsilon) ≤ 1 / 2) : + ∃ P tau : ℝ, 0 < P ∧ 0 < tau ∧ ∀ error : ℝ, 0 < error → error ≤ tau → + ∃ delta : ℝ, 0 < delta ∧ + ∀ {base first center : X} {a enlargement zeta eta Cg Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker}, + 0 ≤ a → 0 ≤ zeta → zeta ≤ epsilon → zeta ≤ delta → 0 ≤ eta → eta ≤ tau → + BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a) → + ∀ e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta, + first ∈ ball base (e.heat.radius / 32) → center ∈ ball base (e.heat.radius / 32) → + ∀ (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) (i : ℕ), + let s := distanceSourceRadius e.heat.radius i + let uc := centeredColumn (hausdorff (m + 2) X) hX.quadratic + (transformedColumn (hausdorff (m + 2) X) hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (e.heat.values center)) + e.one.sobolev + dist center first ≤ s / 4 → -delta / 32 ≤ K * s ^ 2 → + ∀ source : ℝ, 0 < source → + normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source i + + normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source i ≤ source ^ 2 → + pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) i ≤ source ^ 2 → + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball center ((1 / 2048) * s)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff (m + 2) X) hX.quadratic + (radiusScaledColumns (hausdorff (m + 2) X) hX.quadratic s uc) + (ball center ((1 / 2048) * s)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball center ((1 / 2048) * s)) + ((s ^ 2)⁻¹ • (d2.replacement.replacement i - d1.replacement.replacement i))))‖ ≤ P * source := by + obtain ⟨H, hH, hconfig⟩ := regular_projection_configuration_constants m hX hgradient hmean + hmeasured hκ hK hB hCχ hepsilon hsmall + have hD : 0 ≤ ((m + 2 : ℕ) : ℝ) * Real.sqrt (projectionRowConstant (m + 2) B D) := by positivity + obtain ⟨P, tau, hP, htau, hbound⟩ := actual_sharp_projection_small_data + (hX := hX) (κ := κ) (B := B) (J := J) (C := C) (A := A) (Cχ := Cχ) + (epsilon := epsilon) (H := H) (D := ((m + 2 : ℕ) : ℝ) * Real.sqrt (projectionRowConstant (m + 2) B D)) + (L := 1) (M := 1) hhessian hproduct hpoincare hgradient hcompact (by omega) + hκ hK hB hJ hCχ hA hepsilon hH hD zero_le_one + refine ⟨P, tau, hP, htau, ?_⟩ + intro error herror herrortau + obtain ⟨delta, hdelta, hconstruct⟩ := hconfig error herror + refine ⟨delta, hdelta, ?_⟩ + intro base first center a enlargement zeta eta Cg Ca ker hk ha hzeta hzetaeps hzetadelta heta hetatau hBG + e hfirst hcenter d1 d2 i s uc hroom hcurvMeasure source hsource hpair henv + obtain ⟨d, _hradius, hsourceEq, htotal, herr, _huc, _hcenter, hproj⟩ := + hconstruct ha hzeta hzetaeps hzetadelta heta hBG e hfirst hcenter d1 d2 i + hroom hcurvMeasure source hsource hpair henv + have hh := hbound d (by rwa [herr]) (by rwa [htotal]) + simpa only [hproj, hsourceEq] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSharpSources.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpSources.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8c34462a07601d73e6e50c9144549a0e5bf74b8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSharpSources.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Coordinates.RegularSharpProjection +import OAI.Geometry.RCD.Harmonic.TwoCenterProjectionBudget + +namespace OAI + +/-! # The sharp estimate with its actual summable two-center source -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Both radial envelopes and both original Poisson defects are absorbed +by the explicitly constructed positive source; its square sum is controlled +by the same neighborhood tolerances. -/ +theorem regular_sharp_projection_actual_sources {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + (hgradient : LocalHarmonicL2GradientInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hmeasured : LocalMeasuredCoordinateInput hX) + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) + {κ B J C A Cχ epsilon D : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) + (hepsilon : 0 ≤ epsilon) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * + (((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) * epsilon) ≤ 1 / 2) : + ∃ P tau : ℝ, 0 < P ∧ 0 < tau ∧ ∀ error : ℝ, 0 < error → error ≤ tau → + ∃ delta : ℝ, 0 < delta ∧ + ∀ {base first center : X} {a enlargement zeta eta Cg Ca : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker}, + 0 ≤ a → 0 < zeta → zeta ≤ epsilon → zeta ≤ delta → 0 ≤ eta → eta ≤ tau → + BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a) → + ∀ e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta, + first ∈ ball base (e.heat.radius / 32) → center ∈ ball base (e.heat.radius / 32) → + ∀ (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center) (i : ℕ), + let s := distanceSourceRadius e.heat.radius i + let uc := centeredColumn (hausdorff (m + 2) X) hX.quadratic + (transformedColumn (hausdorff (m + 2) X) hX.quadratic e.heat.coordinates (d2.frame i)) + ((d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (e.heat.values center)) + e.one.sobolev + dist center first ≤ s / 4 → -delta / 32 ≤ K * s ^ 2 → + let sigma := twoCenterProjectionSource + (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) + Summable (fun k => sigma k ^ 2) ∧ + (∑' k, sigma k ^ 2) ≤ 128 * (radialFitQualitativeConstant (m + 2) Cχ * zeta + eta) ∧ + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball center ((1 / 2048) * s)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff (m + 2) X) hX.quadratic + (radiusScaledColumns (hausdorff (m + 2) X) hX.quadratic s uc) + (ball center ((1 / 2048) * s)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball center ((1 / 2048) * s)) + ((s ^ 2)⁻¹ • (d2.replacement.replacement i - d1.replacement.replacement i))))‖ ≤ P * sigma i := by + obtain ⟨P, tau, hP, htau, hsharp⟩ := regular_sharp_projection_constants m hX hgradient hmean + hmeasured hhessian hproduct hpoincare hcompact hκ hK hB hJ hCχ hA hepsilon hsmall + refine ⟨P, tau, hP, htau, ?_⟩ + intro error herror herrortau + obtain ⟨delta, hdelta, hbound⟩ := hsharp error herror herrortau + refine ⟨delta, hdelta, ?_⟩ + intro base first center a enlargement zeta eta Cg Ca ker hk ha hzeta hzetaeps hzetadelta heta hetatau hBG + e hfirst hcenter d1 d2 i s uc hroom hcurvMeasure + have hqual : 0 < radialFitQualitativeConstant (m + 2) Cχ := by + have hN : 0 < radialNormalizationRestrictionConstant (m + 2) := + zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + unfold radialFitQualitativeConstant + positivity + obtain ⟨hsigma, hsum, hbudget⟩ := actual_two_center_projection_budget d1.source d2.source + hκ (mul_pos hqual hzeta) d1.summable d2.summable + refine ⟨hsum, ?_, ?_⟩ + · have hb : 2 * (radialFitQualitativeConstant (m + 2) Cχ * zeta) + + (∑' k, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source k) + + (∑' k, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source k) ≤ + 2 * (radialFitQualitativeConstant (m + 2) Cχ * zeta) + 2 * eta := by + linarith [d1.budget, d2.budget] + have hh := hbudget.trans (mul_le_mul_of_nonneg_left hb (by norm_num : (0 : ℝ) ≤ 64)) + convert hh using 1 + ring + · exact hbound ha hzeta.le hzetaeps hzetadelta heta hetatau hBG e hfirst hcenter d1 d2 i + hroom hcurvMeasure _ (hsigma i).1 (hsigma i).2.1 (hsigma i).2.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedCentralMass.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedCentralMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a9e498ee4b37621bd223079baec19e0e216cfb7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedCentralMass.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Coordinates.RegularRawMassSmallness +import OAI.Geometry.RCD.Heat.UniformHeatBase + +namespace OAI + +/-! # Central cumulative comparison at the interior heat scale -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +namespace RegularBilinearData + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} {enlargement zeta : ℝ} + (d : RegularBilinearData hX base hk enlargement zeta) + +/-- Discarding seventeen initial terms changes only a uniform finite +constant. Both inequalities concern the actual heat inverse and central +Bochner masses at the same interior scales. -/ +theorem shifted_central_mass_comparison : + ∃ T : ℝ, 0 < T ∧ ∀ q, q ∈ ball base (d.radius / 32) → ∀ (xi : Euclidean n) (k : ℕ), + let Q := fun i => d.heatAt q (d.shift + i + 17) + let mass := ∑ i ∈ Finset.range k, + ⟪(Q i).symm xi, dyadicBochnerMass d.mass n q d.radius (d.shift + i + 17) ((Q i).symm xi)⟫_ℝ + (‖xi‖ ^ 2 + mass ≤ d.lowerConstant * ‖d.frozenAt q k xi‖ ^ 2) ∧ + (‖d.frozenAt q k xi‖ ^ 2 ≤ T * (‖xi‖ ^ 2 + mass)) := by + obtain ⟨T₀, hT₀, hbase⟩ := exists_uniform_dyadic_heat_base + (hausdorff n X) hX.quadratic hk d.energy d.cutoff + (by linarith [d.radius_pos]) d.radius_pos d.lambda_pos (d.shift + 17) + let T := d.upperConstant * (1 + d.lowerConstant * T₀) + have hT : 0 < T := mul_pos d.upperConstant_pos + (add_pos_of_pos_of_nonneg zero_lt_one (mul_nonneg d.lowerConstant_pos.le hT₀.le)) + refine ⟨T, hT, ?_⟩ + intro q hq xi k Q mass + let b := fun i => ⟪(d.heatAt q (d.shift + i)).symm xi, + dyadicBochnerMass d.mass n q d.radius (d.shift + i) ((d.heatAt q (d.shift + i)).symm xi)⟫_ℝ + have hb (i) : 0 ≤ b i := + (dyadicBochnerMass_isPositive d.mass n q d.radius_pos.le _).inner_nonneg_right _ + have hmass : mass = ∑ i ∈ Finset.range k, b (17 + i) := by + dsimp only [mass, b, Q] + apply Finset.sum_congr rfl + intro i _ + rw [show d.shift + i + 17 = d.shift + (17 + i) by omega] + have hsplit : (∑ i ∈ Finset.range (k + 17), b i) = + (∑ i ∈ Finset.range 17, b i) + mass := by + rw [show k + 17 = 17 + k by omega, Finset.sum_range_add, ← hmass] + have hprefix : (∑ i ∈ Finset.range 17, b i) ≤ d.lowerConstant * T₀ * ‖xi‖ ^ 2 := by + have h := ((d.localData q hq).1 xi 17).2.1 + change ‖xi‖ ^ 2 + (∑ i ∈ Finset.range 17, b i) ≤ + d.lowerConstant * ⟪xi, (d.heatAt q (d.shift + 17)).symm xi⟫_ℝ at h + have hupper := (hbase q xi).1.1 + change ⟪xi, (d.heatAt q (d.shift + 17)).symm xi⟫_ℝ ≤ T₀ * ‖xi‖ ^ 2 at hupper + have hh := mul_le_mul_of_nonneg_left hupper d.lowerConstant_pos.le + nlinarith only [h, hh, sq_nonneg ‖xi‖] + have hlo := ((d.localData q hq).1 xi (k + 17)).2.1 + have hup := ((d.localData q hq).1 xi (k + 17)).2.2 + change ‖xi‖ ^ 2 + (∑ i ∈ Finset.range (k + 17), b i) ≤ + d.lowerConstant * ⟪xi, (d.heatAt q (d.shift + (k + 17))).symm xi⟫_ℝ at hlo + change ⟪xi, (d.heatAt q (d.shift + (k + 17))).symm xi⟫_ℝ ≤ + d.upperConstant * (‖xi‖ ^ 2 + (∑ i ∈ Finset.range (k + 17), b i)) at hup + rw [hsplit] at hlo hup + have hnonneg := Finset.sum_nonneg (fun i (_ : i ∈ Finset.range 17) => hb i) + have hmass0 : 0 ≤ mass := by rw [hmass]; exact Finset.sum_nonneg (fun i _ => hb (17 + i)) + rw [d.frozenAt_norm_sq] + rw [show d.shift + k + 17 = d.shift + (k + 17) by omega] + constructor + · linarith only [hlo, hnonneg] + · calc + _ ≤ d.upperConstant * (‖xi‖ ^ 2 + (∑ i ∈ Finset.range 17, b i) + mass) := by nlinarith only [hup] + _ ≤ d.upperConstant * (‖xi‖ ^ 2 + d.lowerConstant * T₀ * ‖xi‖ ^ 2 + mass) := + mul_le_mul_of_nonneg_left (by linarith only [hprefix]) d.upperConstant_pos.le + _ ≤ T * (‖xi‖ ^ 2 + mass) := by + have h := mul_nonneg (mul_nonneg d.lowerConstant_pos.le hT₀.le) hmass0 + dsimp only [T] + nlinarith only [mul_nonneg d.upperConstant_pos.le h] + +end RegularBilinearData +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e923b0475928718bd400d0825011d22576ee824 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalization.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.RegularFrozenMetrics + +namespace OAI + +/-! # Normalization errors for a strictly interior heat scale -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Changing from the patch mean to a heat scale two steps finer costs a +mean-normalization error and a telescoping heat increment. -/ +theorem regular_shifted_inverse_error {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q z : X} (hq : q ∈ ball base (e.heat.radius / 32)) + (hz : z ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (i : ℕ) (hi : e.heat.shift ≤ i + 15) + (hroom : dist z q ≤ e.heat.radius / (2 : ℝ) ^ (i + 15)) + (henlargement : dist q z ≤ enlargement * (e.heat.radius / (2 : ℝ) ^ (i + 15))) + (xi : Euclidean n) : + let P := e.heat.heatAt q (i + 15) + let Q := e.heat.heatAt q (i + 17) + let R := e.heat.meanAt z hz (i + 15) + let F := dyadicBochnerEnvelope e.heat.mass n q e.heat.radius (i + 15) + let delta := R.symm xi - Q.symm xi + ⟪delta, Q delta⟫_ℝ ≤ + 32 * e.heat.comparisonConstant * ⟪P.symm xi, F (P.symm xi)⟫_ℝ + + 2 * (⟪xi, Q.symm xi⟫_ℝ - ⟪xi, P.symm xi⟫_ℝ) := by + intro P Q R F delta + have hmean := regular_inverse_mean_heat_error hX e hq hz hzeta hsmall + (i + 14) (by omega) (by simpa only [show i + 14 + 1 = i + 15 by omega] using hroom) + (by simpa only [show i + 14 + 1 = i + 15 by omega] using henlargement) xi + change ⟪R.symm xi - P.symm xi, P (R.symm xi - P.symm xi)⟫_ℝ ≤ + 16 * e.heat.comparisonConstant * ⟪P.symm xi, F (P.symm xi)⟫_ℝ at hmean + have hinc := e.heat.heatAt_two_step_inverse_error hq (i + 15) hi xi + rw [show i + 15 + 2 = i + 17 by omega] at hinc + change ⟪Q.symm xi - P.symm xi, Q (Q.symm xi - P.symm xi)⟫_ℝ ≤ + ⟪xi, Q.symm xi⟫_ℝ - ⟪xi, P.symm xi⟫_ℝ at hinc + have hdec := (e.heat.heatAt_two_step_decrement_positive hq (i + 15) hi).inner_nonneg_right + (R.symm xi - P.symm xi) + rw [show i + 15 + 2 = i + 17 by omega] at hdec + change 0 ≤ ⟪R.symm xi - P.symm xi, + (P.toContinuousLinearMap - Q.toContinuousLinearMap) (R.symm xi - P.symm xi)⟫_ℝ at hdec + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] at hdec + have hadd := positive_form_add_le_two (e.heat.heatAt_isPositive q (i + 17)) + (R.symm xi - P.symm xi) (-(Q.symm xi - P.symm xi)) + have heq : R.symm xi - P.symm xi + -(Q.symm xi - P.symm xi) = delta := by dsimp only [delta]; abel + rw [heq] at hadd + change ⟪delta, Q delta⟫_ℝ ≤ + 2 * ⟪R.symm xi - P.symm xi, Q (R.symm xi - P.symm xi)⟫_ℝ + + 2 * ⟪-(Q.symm xi - P.symm xi), Q (-(Q.symm xi - P.symm xi))⟫_ℝ at hadd + simp only [map_neg, inner_neg_left, inner_neg_right, neg_neg] at hadd + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalizationSum.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalizationSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..58c3f505b33bdb6bc39da3d76bf8b2a88d587561 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularShiftedNormalizationSum.lean @@ -0,0 +1,141 @@ +import OAI.Geometry.RCD.Coordinates.RegularShiftedNormalization + +namespace OAI + +/-! # Summing actual normalization errors at the interior heat scale -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- A nonnegative shifted block is bounded by its full initial segment. -/ +theorem nonnegative_shifted_sum_le (b : ℕ → ℝ) (hb : ∀ i, 0 ≤ b i) (l k : ℕ) : + (∑ i ∈ Finset.range k, b (l + i)) ≤ ∑ i ∈ Finset.range (l + k), b i := by + induction k with + | zero => simpa using Finset.sum_nonneg (fun i (_ : i ∈ Finset.range l) => hb i) + | succ k ih => + rw [Finset.sum_range_succ, Nat.add_succ, Finset.sum_range_succ] + linarith only [ih] + +/-- Two-scale nonnegative increments telescope with multiplicity two. -/ +theorem two_step_energy_sum_le (H : ℕ → ℝ) (hH : ∀ i, 0 ≤ H i) + (hmono : Monotone H) (k : ℕ) : + (∑ i ∈ Finset.range k, (H (i + 2) - H i)) ≤ 2 * H (k + 2) := by + have heq : (∑ i ∈ Finset.range k, (H (i + 2) - H i)) = + (H (k + 1) - H 1) + (H k - H 0) := by + calc + _ = (∑ i ∈ Finset.range k, (H (i + 1 + 1) - H (i + 1))) + + (∑ i ∈ Finset.range k, (H (i + 1) - H i)) := by + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i _ + rw [show i + 1 + 1 = i + 2 by omega] + ring + _ = _ := by + have h := Finset.sum_range_sub (fun i => H (i + 1)) k + rw [h, Finset.sum_range_sub] + rw [heq] + linarith [hH 0, hH 1, hmono (show k + 1 ≤ k + 2 by omega), hmono (show k ≤ k + 2 by omega)] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual mean-to-interior-heat errors have one cumulative bound for +any finite choice of nearby centers, with only its multiplicity as a loss. -/ +theorem regular_shifted_inverse_errors_sum_le {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + {q : X} (hq : q ∈ ball base (e.heat.radius / 32)) (hzeta : 0 ≤ zeta) + (hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + {ι : Type*} (s : ℕ → Finset ι) + (centers : ℕ → ι → {z : X // z ∈ ball base (e.heat.radius / 32)}) + (N : ℕ) (hcard : ∀ i, (s i).card ≤ N) + (hroom : ∀ i y, y ∈ s i → dist (centers i y).val q ≤ + e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) + (henlargement : ∀ i y, y ∈ s i → dist q (centers i y).val ≤ + enlargement * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15))) + (xi : Euclidean n) (k : ℕ) : + let Q := fun i => e.heat.heatAt q (e.heat.shift + i + 17) + let R := fun i y => e.heat.meanAt (centers i y).val (centers i y).property + (e.heat.shift + i + 15) + (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪(R i y).symm xi - (Q i).symm xi, + Q i ((R i y).symm xi - (Q i).symm xi)⟫_ℝ) ≤ + (N : ℝ) * (32 * e.heat.comparisonConstant * e.heat.envelopeConstant + 4) * + ⟪xi, (Q k).symm xi⟫_ℝ := by + classical + intro Q R + let H := fun i => ⟪xi, (e.heat.heatAt q (e.heat.shift + i + 15)).symm xi⟫_ℝ + let b := fun i => ⟪(e.heat.heatAt q (e.heat.shift + i)).symm xi, + dyadicBochnerEnvelope e.heat.mass n q e.heat.radius (e.heat.shift + i) + ((e.heat.heatAt q (e.heat.shift + i)).symm xi)⟫_ℝ + have hH (i) : 0 ≤ H i := + (positive_equiv_symm _ (e.heat.heatAt_isPositive q _)).inner_nonneg_right _ + have hb (i) : 0 ≤ b i := + (dyadicBochnerEnvelope_isPositive e.heat.mass n q e.heat.radius_pos.le _).inner_nonneg_right _ + have hmono : Monotone H := by + apply monotone_nat_of_le_succ + intro i + have h := (inverse_increment_isPositive _ _ + (e.heat.heatAt_isPositive q (e.heat.shift + i + 15)) + (e.heat.heatAt_isPositive q (e.heat.shift + i + 15 + 1)) + (e.heat.heatAt_decrement_positive hq _ (by omega))).inner_nonneg_right xi + simp only [sub_apply, inner_sub_right, ContinuousLinearEquiv.coe_coe] at h + change H i ≤ H (i + 1) + dsimp only [H] + rw [show e.heat.shift + (i + 1) + 15 = e.heat.shift + i + 15 + 1 by omega] + linarith only [h] + have hblock : (∑ i ∈ Finset.range k, b (i + 15)) ≤ + e.heat.envelopeConstant * H (k + 2) := by + have hshift := nonnegative_shifted_sum_le b hb 15 k + have hprefix : (∑ i ∈ Finset.range (15 + k), b i) ≤ + ∑ i ∈ Finset.range (k + 17), b i := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (by omega)) (fun i _ _ => hb i) + have h := ((e.heat.localData q hq).1 xi (k + 17)).1 + change (∑ i ∈ Finset.range (k + 17), b i) ≤ _ at h + change (∑ i ∈ Finset.range (k + 17), b i) ≤ e.heat.envelopeConstant * + ⟪xi, (e.heat.heatAt q (e.heat.shift + (k + 17))).symm xi⟫_ℝ at h + rw [← show e.heat.shift + (k + 2) + 15 = e.heat.shift + (k + 17) by omega] at h + change (∑ i ∈ Finset.range (k + 17), b i) ≤ e.heat.envelopeConstant * H (k + 2) at h + have ht := (hshift.trans hprefix).trans h + simpa only [Nat.add_comm 15] using ht + have hinc := two_step_energy_sum_le H hH hmono k + let t := fun i => 32 * e.heat.comparisonConstant * b (i + 15) + 2 * (H (i + 2) - H i) + have ht (i) : 0 ≤ t i := add_nonneg + (mul_nonneg (mul_nonneg (by norm_num) e.heat.comparisonConstant_pos.le) (hb (i + 15))) + (mul_nonneg (by norm_num) (sub_nonneg.mpr (hmono (by omega)))) + have hpoint (i y) (hy : y ∈ s i) : + ⟪(R i y).symm xi - (Q i).symm xi, + Q i ((R i y).symm xi - (Q i).symm xi)⟫_ℝ ≤ t i := by + have h := regular_shifted_inverse_error hX e hq (centers i y).property hzeta hsmall + (e.heat.shift + i) (by omega) (hroom i y hy) (henlargement i y hy) xi + simpa only [R, Q, t, b, H, Nat.add_assoc, Nat.reduceAdd] using h + have hs : (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪(R i y).symm xi - (Q i).symm xi, + Q i ((R i y).symm xi - (Q i).symm xi)⟫_ℝ) ≤ (N : ℝ) * ∑ i ∈ Finset.range k, t i := by + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + calc + _ ≤ ∑ _y ∈ s i, t i := Finset.sum_le_sum (fun y hy => hpoint i y hy) + _ = ((s i).card : ℝ) * t i := by rw [Finset.sum_const, nsmul_eq_mul] + _ ≤ _ := mul_le_mul_of_nonneg_right (by exact_mod_cast hcard i) (ht i) + have htsum : (∑ i ∈ Finset.range k, t i) ≤ + (32 * e.heat.comparisonConstant * e.heat.envelopeConstant + 4) * H (k + 2) := by + simp only [t, Finset.sum_add_distrib, ← Finset.mul_sum] + have h0 := mul_le_mul_of_nonneg_left hblock + (mul_nonneg (by norm_num : (0 : ℝ) ≤ 32) e.heat.comparisonConstant_pos.le) + have h1 := mul_le_mul_of_nonneg_left hinc (by norm_num : (0 : ℝ) ≤ 2) + nlinarith only [h0, h1] + have h := hs.trans (mul_le_mul_of_nonneg_left htsum (Nat.cast_nonneg N)) + simpa only [Q, H, show e.heat.shift + (k + 2) + 15 = e.heat.shift + k + 17 by omega, mul_assoc] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSquareLaplacian.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSquareLaplacian.lean new file mode 100644 index 0000000000000000000000000000000000000000..210da066cb0c13c0261ae4eec87be9170f29d0c1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSquareLaplacian.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Sobolev.WeakLaplacianProduct + +namespace OAI + +/-! # Actual local Laplacians of squared regular functions -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A local Sobolev representative of the source suffices. The global +weak Laplacian remains the actual L² source of the compact extension. -/ +theorem IsWeakLaplacian.square_local {Ω : Set X} + (g G dg : SobolevSpace μ hQ) (d : Lp ℝ 2 μ) + (hd : IsWeakLaplacian μ hQ g d) (A B L : ℝ≥0) + (hg : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ g x|≤A) + (hdg : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dg x|≤B) + (hL : ∀ᵐ x ∂μ, localGamma μ hQ g g x≤(L:ℝ)^2) + (hGr : SobolevSpace.toLp μ hQ G =ᵐ[μ.restrict Ω] localGamma μ hQ g g) + (hdr : d =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dg) : + ∃ q : Lp ℝ 2 μ, + IsWeakLaplacian μ hQ (SobolevSpace.product μ hQ g g A A) q ∧ + q =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ + (SobolevSpace.product μ hQ g dg A B+ + SobolevSpace.product μ hQ g dg A B+(2:ℝ) • G) := by + obtain ⟨q,hq,hqr⟩ := hd.product μ hQ g g d d hd A A L hg hg hL + refine ⟨q,hq,?_⟩ + simp only [map_add,map_smul] + let P := SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ g dg A B) + filter_upwards [ae_restrict_of_ae hqr,hdr,hGr, + ae_restrict_of_ae (SobolevSpace.product_coe μ hQ g dg A B hg hdg), + ae_restrict_of_ae (Lp.coeFn_add (P+P) ((2:ℝ) • SobolevSpace.toLp μ hQ G)), + ae_restrict_of_ae (Lp.coeFn_add P P), + ae_restrict_of_ae (Lp.coeFn_smul (2:ℝ) (SobolevSpace.toLp μ hQ G))] + with x hq hd hG hP hsum hdouble hsmul + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul] at hsum hdouble hsmul + change q x=((P+P)+(2:ℝ) • SobolevSpace.toLp μ hQ G) x + rw [hsum,hdouble,hsmul,hq,hd,← hG] + change _=P x+P x+2*SobolevSpace.toLp μ hQ G x + rw [show P x=SobolevSpace.toLp μ hQ g x*SobolevSpace.toLp μ hQ dg x from hP] + +omit [BorelSpace X] [ProperSpace X] in +theorem squareLaplacianSource_bound (g G dg : SobolevSpace μ hQ) (A B C : ℝ≥0) + (hg : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ g x|≤A) + (hdg : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dg x|≤B) + (hG : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ G x|≤C) : + ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ + (SobolevSpace.product μ hQ g dg A B+ + SobolevSpace.product μ hQ g dg A B+(2:ℝ) • G) x|≤2*A*B+2*C := by + simp only [map_add,map_smul] + let P := SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ g dg A B) + filter_upwards [hg,hdg,hG,SobolevSpace.product_coe μ hQ g dg A B hg hdg, + Lp.coeFn_add (P+P) ((2:ℝ) • SobolevSpace.toLp μ hQ G),Lp.coeFn_add P P, + Lp.coeFn_smul (2:ℝ) (SobolevSpace.toLp μ hQ G)] with x hg hdg hG hp hs ha hm + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul] at hs ha hm + change |((P+P)+(2:ℝ) • SobolevSpace.toLp μ hQ G) x|≤_ + rw [hs,ha,hm] + have hP : |P x|≤(A:ℝ)*B := by + change |SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ g dg A B) x|≤_ + rw [hp,abs_mul] + exact mul_le_mul hg hdg (abs_nonneg _) A.coe_nonneg + calc + |P x+P x+2*SobolevSpace.toLp μ hQ G x| + ≤ |P x|+|P x|+|2*SobolevSpace.toLp μ hQ G x| := + (abs_add_le _ _).trans (add_le_add (abs_add_le _ _) le_rfl) + _ ≤ 2*A*B+2*C := by rw [abs_mul,abs_of_pos (by norm_num : (0:ℝ)<2)]; linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularSquareSourceData.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularSquareSourceData.lean new file mode 100644 index 0000000000000000000000000000000000000000..6af26dd06afdefcc5631ac9bd76c5128f358eb02 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularSquareSourceData.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Coordinates.RegularBochnerSquare + +namespace OAI + +/-! # Bounded local Sobolev sources for actual squared regular directions -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) {m : ℕ} + +theorem regular_square_source_data [μ.Regular] + (U : Euclidean m →L[ℝ] SobolevSpace μ hQ) (D : Euclidean m →L[ℝ] Lp ℝ 2 μ) + (H : Euclidean m →ₗ[ℝ] Euclidean m →ₗ[ℝ] SobolevSpace μ hQ) + (L : Euclidean m → ℝ≥0) + (hU : ∀ a, ∀ᵐ x ∂μ, SobolevSpace.minimalSlope μ hQ (U a) x≤L a) + (hD : ∀ a, IsWeakLaplacian μ hQ (U a) (D a)) + (hH : ∀ a b, SobolevSpace.toLp μ hQ (H a b) =ᵐ[μ] localGamma μ hQ (U a) (U b)) + {Ω : Set X} (w z : Euclidean m) (G : X →ᵇ ℝ) + (hG : SobolevSpace.toLp μ hQ (U w) =ᵐ[μ] G) + (hz : U z=SobolevSpace.product μ hQ (U w) (U w) ‖G‖₊ ‖G‖₊) + (d : SobolevSpace μ hQ) (A : ℝ≥0) + (hd : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ d x|≤A) + (hDr : D w =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ d) : + ∃ dz : SobolevSpace μ hQ, ∃ B : ℝ≥0, + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ dz x|≤B) ∧ + D z =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ hQ dz := by + have hgb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (U w) x|≤‖G‖₊ := by + filter_upwards [hG] with x hx + rw [hx] + exact G.norm_coe_le_norm x + have hL : ∀ᵐ x ∂μ, localGamma μ hQ (U w) (U w) x≤(L w:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ (U w),hU w, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ (U w))] with x he hb h0 + rw [he] + exact pow_le_pow_left₀ h0 hb 2 + let dz := SobolevSpace.product μ hQ (U w) d ‖G‖₊ A+ + SobolevSpace.product μ hQ (U w) d ‖G‖₊ A+(2:ℝ) • H w w + obtain ⟨q,hq,hqr⟩ := (hD w).square_local μ hQ (U w) (H w w) d (D w) + ‖G‖₊ A (L w) hgb hd hL (ae_restrict_of_ae (hH w w)) hDr + have hqz : D z=q := IsWeakLaplacian.unique μ hQ (by simpa only [hz] using hD z) hq + refine ⟨dz,2*‖G‖₊*A+2*(L w*L w),?_,?_⟩ + · exact squareLaplacianSource_bound μ hQ (U w) (H w w) d ‖G‖₊ A (L w*L w) + hgb hd (regularGram_abs_le μ hQ U H L hU hH w w) + · rw [hqz] + exact hqr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularTangents.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularTangents.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a9d9738b860b1627df4b3b9a7b9da48f5328624 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularTangents.lean @@ -0,0 +1,113 @@ +import OAI.Analysis.RCDHeat.Foundations + +namespace OAI + +/-! +# Regularity and convergence of rescalings + +The compactness input is kept separate from regularity. In particular, +regularity is never used as an assertion that a tangent already exists. +Once subsequential pointed compactness is available, all rescaling +sequences at a regular point converge to Euclidean space. +-/ + +open Filter +open scoped Topology + +namespace RegularPointCoordinates + +universe u v w + +variable {X : Type u} {Y : Type v} {Z : Type w} + [MetricSpace X] [MetricSpace Y] [MetricSpace Z] + +/-- Pointed metric approximations are preserved by a target isometry. -/ +theorem IsPointedApproximation.postcomp_isometry + {p : X} {q : Y} {r R epsilon : ℝ} {f : X → Y} + (hf : IsPointedApproximation p q r R epsilon f) (e : Y ≃ᵢ Z) : + IsPointedApproximation p (e q) r R epsilon (fun x => e (f x)) := by + refine ⟨by simpa only [e.dist_eq] using hf.1, ?_, ?_⟩ + · intro x z hx hz + simpa only [e.dist_eq] using hf.2.1 x z hx hz + · intro y hy + have hy' : dist (e.symm y) q ≤ R - epsilon := by + simpa only [← e.dist_eq, e.apply_symm_apply] using hy + obtain ⟨x, hx, hxy⟩ := hf.2.2 (e.symm y) hy' + refine ⟨x, hx, ?_⟩ + simpa only [← e.dist_eq, e.apply_symm_apply] using hxy + +theorem RescalingsConverge.postcomp_isometry {p : X} {q : Y} {r : ℕ → ℝ} + (h : RescalingsConverge p q r) (e : Y ≃ᵢ Z) : + RescalingsConverge p (e q) r := by + intro R hR epsilon hepsilon + filter_upwards [h R hR epsilon hepsilon] with i hi + obtain ⟨f, hf⟩ := hi + exact ⟨fun x => e (f x), hf.postcomp_isometry e⟩ + +/-- Rescalings at a point admit a pointed-convergent subsequence with a proper +metric-space limit. -/ +def PointedRescalingPrecompactness (p : X) : Prop := + ∀ r : ℕ → ℝ, (∀ i, 0 < r i) → Tendsto r atTop (𝓝 0) → + ∃ phi : ℕ → ℕ, StrictMono phi ∧ + ∃ (Y : Type u) (dY : MetricSpace Y), + letI := dY + ∃ (_ : ProperSpace Y) (q : Y), RescalingsConverge p q (r ∘ phi) + +/-- The all-tangents definition of regularity and pointed compactness +imply convergence along every prescribed sequence of scales. -/ +theorem regular_rescalings_converge {n : ℕ} {p : X} + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + (r : ℕ → ℝ) (hr : ∀ i, 0 < r i) (hrzero : Tendsto r atTop (𝓝 0)) : + RescalingsConverge p (0 : Euclidean n) r := by + intro R hR epsilon hepsilon + by_contra hnot + have hbad : ∃ᶠ i in atTop, + ¬ ∃ f : X → Euclidean n, IsPointedApproximation p 0 (r i) R epsilon f := + Filter.not_eventually.mp hnot + obtain ⟨phi, hphi, hbadphi⟩ := extraction_of_frequently_atTop hbad + obtain ⟨psi, hpsi, Y, dY, hproper, q, hlimit⟩ := + hcompact (r ∘ phi) (fun i => hr (phi i)) (hrzero.comp hphi.tendsto_atTop) + let : MetricSpace Y := dY + let : ProperSpace Y := hproper + have htangent : IsTangent p q := by + refine ⟨(r ∘ phi) ∘ psi, fun i => hr (phi (psi i)), ?_, hlimit⟩ + exact (hrzero.comp hphi.tendsto_atTop).comp hpsi.tendsto_atTop + obtain ⟨e, he⟩ := hregular Y dY hproper q htangent + have heuc := hlimit.postcomp_isometry e + rw [he] at heuc + obtain ⟨i, f, hf⟩ := (heuc R hR epsilon hepsilon).exists + exact hbadphi (psi i) ⟨f, hf⟩ + +/-- Compactness also proves existence of a Euclidean tangent; this is +not silently built into the universal definition of regularity. -/ +theorem regular_has_euclidean_tangent {n : ℕ} {p : X} + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) : + IsTangent p (0 : Euclidean n) := by + let r : ℕ → ℝ := fun i => 1 / ((i : ℝ) + 1) + have hr (i : ℕ) : 0 < r i := by dsimp [r]; positivity + have hrzero : Tendsto r atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + exact ⟨r, hr, hrzero, regular_rescalings_converge hcompact hregular r hr hrzero⟩ + +/-- The sequential statement gives a uniform approximation threshold +for every fixed radius and tolerance, not merely a chosen blow-up sequence. -/ +theorem regular_small_scale_approximation {n : ℕ} {p : X} + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular n p) + {R epsilon : ℝ} (hR : 0 < R) (hepsilon : 0 < epsilon) : + ∃ delta : ℝ, 0 < delta ∧ ∀ r : ℝ, 0 < r → r < delta → + ∃ f : X → Euclidean n, IsPointedApproximation p 0 r R epsilon f := by + by_contra hnot + push Not at hnot + have hchoice (i : ℕ) : ∃ r : ℝ, 0 < r ∧ r < 1 / ((i : ℝ) + 1) ∧ + ∀ f : X → Euclidean n, ¬IsPointedApproximation p 0 r R epsilon f := + hnot (1 / ((i : ℝ) + 1)) (by positivity) + choose r hrpos hrsmall hrbad using hchoice + have hrzero : Tendsto r atTop (𝓝 0) := + squeeze_zero (fun i => (hrpos i).le) (fun i => (hrsmall i).le) + tendsto_one_div_add_atTop_nhds_zero_nat + have hconv := regular_rescalings_converge hcompact hregular r hrpos hrzero + obtain ⟨i, f, hf⟩ := (hconv R hR epsilon hepsilon).exists + exact hrbad i f hf + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularTestAlgebra.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularTestAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9ea631da36894290bc7e7eabd94289b8049aeac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularTestAlgebra.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Coordinates.RegularDirichletCore +import OAI.Geometry.RCD.Sobolev.WeakLaplacianProduct + +namespace OAI + +/-! # Products remain in the dense regular compact test core -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem product_mem_compactLaplacianCore [IsFiniteMeasureOnCompacts μ] + {Ω : Set X} {f g : SobolevSpace μ hQ} + (hf : f ∈ compactLaplacianCore μ hQ Ω) (hg : g ∈ compactLaplacianCore μ hQ Ω) + (A B : ℝ≥0) + (hA : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ f x| ≤ A) + (hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ g x| ≤ B) : + SobolevSpace.product μ hQ f g A B ∈ compactLaplacianCore μ hQ Ω := by + obtain ⟨v,L,hv,hvc,hvs,hfr⟩ := hf.1 + obtain ⟨w,M,hw,hwc,hws,hgr⟩ := hg.1 + obtain ⟨E,hE⟩ := hvc.exists_bound_of_continuous hv.continuous + have hE' (x : X) : |v x| ≤ (max E 0).toNNReal := by + rw [Real.coe_toNNReal _ (le_max_right _ _)] + exact (hE x).trans (le_max_left _ _) + obtain ⟨D,hD⟩ := lipschitz_mul_constant_outside_compact hv hw 0 (by simpa using hvc) hE' + constructor + · refine ⟨fun x => v x*w x,D,hD,hvc.mul_right,tsupport_mul_subset_left.trans hvs,?_⟩ + filter_upwards [SobolevSpace.product_coe μ hQ f g A B hA hB,hfr,hgr] with x hx hf hg + exact hx.trans (congrArg₂ (fun a b : ℝ => a*b) hf hg) + · obtain ⟨df,hdf⟩ := hf.2 + obtain ⟨dg,hdg⟩ := hg.2 + have hL : ∀ᵐ x ∂μ, localGamma μ hQ g g x ≤ (M:ℝ)^2 := by + filter_upwards [localGamma_self μ hQ g,SobolevSpace.minimalSlope_le_lipschitz μ hQ g hw hgr, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ g)] with x he hM h0 + rw [he] + exact pow_le_pow_left₀ h0 hM 2 + obtain ⟨q,hq,-⟩ := hdf.product μ hQ f g df dg hdg A B M hA hB hL + exact ⟨q,hq⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularTripleHessian.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularTripleHessian.lean new file mode 100644 index 0000000000000000000000000000000000000000..77a3841f09c08e90e3a87af9c0ce05d16c8db4cf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularTripleHessian.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreMixedFullBall + +namespace OAI + +/-! # Three fixed regular functions in the prescribed mixed Hessian bound -/ + +open Set Filter Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_core_triple_hessian_on_measure {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (hscalar : ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n) + (f a g : compactLaplacianCore (hausdorff n X) hX.quadratic univ) + (p : X) {R : ℝ} (hR : 0 (u i).val) + have h₀ : U (e 0)=f.val := by simpa [u,e] using sobolevColumnMap_single μ hQ (fun i => (u i).val) 0 + have h₁ : U (e 1)=a.val := by simpa [u,e] using sobolevColumnMap_single μ hQ (fun i => (u i).val) 1 + have h₂ : U (e 2)=g.val := by simpa [u,e] using sobolevColumnMap_single μ hQ (fun i => (u i).val) 2 + have hq : IsWeakLaplacian μ hQ (U (e 0)) qf := by rw [h₀]; exact hqf + have hr : SobolevSpace.toLp μ hQ F₀ =ᵐ[μ.restrict (ball p R)] + localGamma μ hQ (U (e 0)) (U (e 0)) := by rw [h₀]; exact hF₀ + have hs : IsMeasureLaplacianOn μ hQ (ball p R) F₀ + (bochnerGramSource μ hQ J (U (e 0)) (U (e 0)) df df σ.toSignedMeasure) := by + rw [h₀] + exact hσ + obtain ⟨H,-,hH,hdim,hbound⟩ := hX.regular_core_mixed_hessian_full_ball hn hscalar u p hR + (e 0) df qf hq A hdf hsf hJK F₀ σ hr hs + change ∀ v w, SobolevSpace.toLp μ hQ (H v w) =ᵐ[μ] localGamma μ hQ (U v) (U w) at hH + change ∀ b v w, ∀ᵐ x ∂μ.restrict (ball p R), + (localHessianAction μ hQ (U (e 0)) (U v) (U w) (H (e 0) v) (H (e 0) w) (H v w) x- + b*localGamma μ hQ (U v) (U w) x)^2≤ + ((σ.rnDeriv μ x).toReal-2*b*SobolevSpace.toLp μ hQ df x+(n:ℝ)*b^2)* + localGamma μ hQ (U v) (U v) x*localGamma μ hQ (U w) (U w) x at hbound + refine ⟨H (e 0) (e 1),H (e 0) (e 2),H (e 1) (e 2),?_,?_,?_,hdim,?_⟩ + · simpa only [h₀,h₁] using hH (e 0) (e 1) + · simpa only [h₀,h₂] using hH (e 0) (e 2) + · simpa only [h₁,h₂] using hH (e 1) (e 2) + · intro b + simpa only [h₀,h₁,h₂] using hbound b (e 1) (e 2) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularUniformDirection.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularUniformDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..3be7a375827ce6f5bfc6b7dde3268ce599d6332d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularUniformDirection.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Coordinates.RegularPairDirection +import OAI.Geometry.RCD.Harmonic.DirectionSmallness + +namespace OAI + +/-! # A uniform direction bound for the actual regular-neighborhood family -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- One constant and tolerance work at every center and scale of the +constructed family. Only the original scalar source envelope must be small. -/ +theorem regular_pair_direction_uniform {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (haction : LocalPoissonHessianActionInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {κ A B J Cχ Cg D Ca : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hA : 0 ≤ A) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) : + ∃ L tau : ℝ, 0 < L ∧ 0 < tau ∧ + ∀ {base first center : X} {a C enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (_hfirst : first ∈ ball base (e.heat.radius / 32)) + (_hcenter : center ∈ ball base (e.heat.radius / 32)) + (d1 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca first) + (d2 : RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca center), + 0 ≤ zeta → zeta ≤ tau → ∀ i, + let μ := hausdorff n X + let s := distanceSourceRadius e.heat.radius i + let U := (centeredSobolevMap μ hX.quadratic e.heat.coordinates e.one.sobolev + (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let delta := (d2.frame i : Euclidean n →L[ℝ] Euclidean n).adjoint + (e.heat.values first - e.heat.values center) + let Ω := ball center (s / 2048) + let E1 := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d1.source) i + let E2 := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * zeta) + (normalizedPoissonDefect μ hX.quadratic d2.source) i + dist first center ≤ s / 512 → E1 + E2 ≤ tau → + ∃ H : Euclidean n →L[ℝ] SobolevSpace μ hX.quadratic, + (∀ b, SobolevSpace.toLp μ hX.quadratic (H b) =ᵐ[μ.restrict Ω] + localGamma μ hX.quadratic (d2.replacement.replacement i - d1.replacement.replacement i) (U b)) ∧ + ∀ b, ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω + (H b - ⟪delta, b⟫_ℝ • e.one.sobolev))‖ ≤ + L * s * Real.sqrt (E1 + E2) * ‖b‖ := by + obtain ⟨G, M, hG, hM, hpair⟩ := regular_pair_direction hX haction hgradient hmean hn hκ + let Vc := regularRadialValueCoefficient n B D + let Ec := regularRadialEnergyCoefficient K n Cg A B J Cχ D + let Ccom := ((5 / 3 : ℝ) * ((1 / 32 : ℝ) ^ n)⁻¹) * poissonCommutatorConstant n A 1 B J Cχ + have hVc : 0 ≤ Vc := by dsimp only [Vc, regularRadialValueCoefficient]; have := euclideanUnitVolume_pos n; positivity + have hEc : 0 ≤ Ec := by + have := (radialEnergyConstant_pos (K := K) (n := n) (G := Cg) (ε := 1) (A := A) hB hJ hCχ).le + dsimp only [Ec, regularRadialEnergyCoefficient] + have := euclideanUnitVolume_pos n + positivity + have hCcom : 0 ≤ Ccom := by + have := euclideanUnitVolume_pos n + dsimp only [Ccom, poissonCommutatorConstant] + positivity + have hQ : 0 ≤ radialFitQualitativeConstant n Cχ := radialFitQualitativeConstant_nonneg n hCχ + obtain ⟨tau, htau, htau1, htframe, htgram, hsmall⟩ := + direction_smallness_parameters n Ca D (radialFitQualitativeConstant n Cχ) Vc G hQ hVc (by linarith) + let L := max (directionRecoveryConstant A Vc Ec Ccom G M) 1 + have hL : 0 < L := lt_of_lt_of_le zero_lt_one (le_max_right _ _) + refine ⟨L, tau, hL, htau, ?_⟩ + intro base first center a C enlargement zeta eta ker hk e hfirst hcenter d1 d2 hzeta hzt + i μ s U delta Ω E1 E2 hroom hEt + have hs : 0 < s := distanceSourceRadius_pos e.heat.radius_pos i + have he1 := (radial_fit_pinching_envelope_budget d1.source hκ hCχ hzeta d1.summable).2.2 i + have he2 := (radial_fit_pinching_envelope_budget d2.source hκ hCχ hzeta d2.summable).2.2 i + have hE1 : 0 ≤ E1 := he1.1 + have hE2 : 0 ≤ E2 := he2.1 + have hE1t : E1 ≤ tau := by linarith + have hE2t : E2 ≤ tau := by linarith + have hframe : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * zeta) ≤ 1 / 3 := by + apply le_trans _ htframe + gcongr + have hgram : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (8192 : ℝ) ^ n) * zeta) ≤ 1 / 2 := by + apply le_trans _ htgram + gcongr + have hxsmall := hsmall zeta E1 hzeta hzt hE1 hE1t + have hzsmall := hsmall zeta E2 hzeta hzt hE2 hE2t + have hcurv : -κ ≤ K * (s / 2048) ^ 2 := by + by_cases hKpos : 0 ≤ K + · exact (neg_nonpos.mpr hκ).trans (mul_nonneg hKpos (sq_nonneg _)) + · have hsR : 2 * s ≤ e.heat.radius := distanceSourceRadius_outer_le e.heat.radius_pos.le i + have hs1 : s / 2048 ≤ 1 := by linarith [e.heat.radius_le_one] + have hsq : (s / 2048) ^ 2 ≤ 1 := by nlinarith [hs.le] + exact hK.trans (by simpa only [mul_one] using + mul_le_mul_of_nonpos_left hsq (le_of_not_ge hKpos)) + obtain ⟨H, hH, hfit⟩ := hpair e hfirst hcenter d1 d2 hK hB hJ hA hCχ hzeta + (hzt.trans htau1) hframe hgram i hroom hcurv (hxsmall.1.trans (by norm_num)) + hzsmall.1 (hzsmall.2 s hs) + refine ⟨H, hH, ?_⟩ + have hP : normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i ≤ E1 + E2 := add_le_add he1.2 he2.2 + have hPn : 0 ≤ normalizedPoissonDefect μ hX.quadratic d1.source i + + normalizedPoissonDefect μ hX.quadratic d2.source i := add_nonneg + (normalizedPoissonDefect_nonneg μ hX.quadratic d1.source hκ i) + (normalizedPoissonDefect_nonneg μ hX.quadratic d2.source hκ i) + have hscale := direction_recovery_scaled_bound hs hA hVc hEc hCcom + (by linarith : 0 ≤ G) (by linarith : 0 ≤ M) hE1 hE2 hPn hP + dsimp only at hscale + intro b + apply (hfit b).trans + apply (mul_le_mul_of_nonneg_right hscale (norm_nonneg b)).trans + dsimp only [L] + gcongr + exact le_max_left _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeConvergence.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb2c449c7f020484d2112216285d56aec9fced95 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeConvergence.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.RCD.Coordinates.RegularVolumeNonpositive +import OAI.Geometry.RCD.Metric.LowerCurvatureVolume +import OAI.Geometry.RCD.Coordinates.HausdorffMeasureRegularity + +namespace OAI + +/-! # Absolute volume convergence at every regular point, for every real curvature -/ + +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_volume_convergence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} (hp : IsRegular n p) : + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) := by + let := hX.hausdorff_regular + by_cases hK : K≤0 + · exact hX.regular_volume_convergence_nonpositive hn hK hp + · exact (hX.zero_of_nonneg_curvature hn (le_of_not_ge hK)).regular_volume_convergence_nonpositive + hn le_rfl hp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeNonpositive.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeNonpositive.lean new file mode 100644 index 0000000000000000000000000000000000000000..c61939f387e69825ee904303824c6292ad91137c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularVolumeNonpositive.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.RCD.Metric.ImageMassErrorLimit +import OAI.Geometry.RCD.Metric.ActualImageMassDensity + +namespace OAI + +/-! # Absolute regular-point volume convergence from actual coordinate images -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.regular_volume_convergence_nonpositive {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hK : K≤0) {p : X} (hp : IsRegular n p) : + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + obtain ⟨θ,_hθ,hθupper,hdensity⟩ := hX.rescaling_volume_density hn p + have hlower : euclideanUnitVolume n ≤ θ := by + apply unit_volume_le_density_of_image_bounds n (euclideanUnitVolume n) θ + (imageMassErrorConstant n) ((Real.cosh 1^(n-1)*2^n)*(16*16384)^n) (by positivity) + intro η hη hηsmall ζ hζ hζsmall + exact hX.actual_image_mass_density_bound hn hK hp hdensity hη hηsmall hζ hζsmall + have hθeq : θ=euclideanUnitVolume n := le_antisymm hθupper hlower + apply rescaling_volume_convergence_of_density + intro s hs hs0 + simpa only [hθeq,mul_one,one_pow] using hdensity s hs hs0 1 zero_lt_one + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularWorkingChart.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularWorkingChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c34748cf0ed656443a8bdd68332d46cfc170da4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularWorkingChart.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.RCD.Coordinates.RegularActualPatches + +namespace OAI + +/-! # The working chart and a total inverse for the actual patch data -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +/-- Restrict an existing open coordinate chart to a smaller open set. -/ +theorem restrict_open_coordinate_chart {X E : Type*} [TopologicalSpace X] + [TopologicalSpace E] {A U : Set X} {O : Set E} (hA : IsOpen A) (hO : IsOpen O) + (hAU : A ⊆ U) (f : X → E) (u : U ≃ₜ O) (hu : ∀ x, (u x).val = f x.val) : + IsOpen (Set.range (fun x : A => f x.val)) ∧ + ∃ v : A ≃ₜ Set.range (fun x : A => f x.val), ∀ x, (v x).val = f x.val := by + have hi : Topology.IsOpenEmbedding (Set.inclusion hAU) := + .inclusion hAU (hA.preimage continuous_subtype_val) + have hg := hO.isOpenEmbedding_subtypeVal.comp (u.isOpenEmbedding.comp hi) + have heq : (Subtype.val ∘ u ∘ Set.inclusion hAU) = (fun x : A => f x.val) := by + funext x + exact hu (Set.inclusion hAU x) + rw [heq] at hg + exact ⟨hg.isOpen_range, hg.isEmbedding.toHomeomorph, fun _ => rfl⟩ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem RegularBilinearData.patch_region_subset_initial {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (d : RegularBilinearData hX base hk enlargement zeta) : + d.patchRegion ⊆ ball base (d.radius / 1024) := by + apply ball_subset_ball + have hp : (1024 : ℝ) ≤ 2 ^ (d.shift + 10) := by + calc + 1024 = (2 : ℝ) ^ 10 := by norm_num + _ ≤ _ := pow_le_pow_right₀ (by norm_num) (by omega) + exact div_le_div_of_nonneg_left d.radius_pos.le (by norm_num) hp + +/-- The region used for the finite heat nets is an open subchart of the +previously constructed initial coordinate neighborhood. -/ +theorem regular_working_chart {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {a κ B J C A Cχ enlargement zeta eta : ℝ} + {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (hzeta : 0 ≤ zeta) (hzetaSmall : zeta ≤ 1 / 2048) + (hgramSmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ n)⁻¹) * zeta) ≤ 3 / 4) : + IsOpen (Set.range (fun x : e.heat.patchRegion => e.heat.values x.val)) ∧ + ∃ chart : e.heat.patchRegion ≃ₜ Set.range (fun x : e.heat.patchRegion => e.heat.values x.val), + ∀ x, (chart x).val = e.heat.values x.val := by + obtain ⟨hO, chart, hc⟩ := regular_initial_chart hX e hzeta hzetaSmall hgramSmall + exact restrict_open_coordinate_chart isOpen_ball hO e.heat.patch_region_subset_initial + e.heat.values chart hc + +/-- The inverse of a working chart, extended outside its image, takes +values in the same original-space neighborhood as every energy field. -/ +theorem exists_working_chart_inverse {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [(hausdorff n X).Regular] {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (d : RegularBilinearData hX base hk enlargement zeta) + {Ω : Set (Euclidean n)} (u : d.patchRegion ≃ₜ Ω) + (hu : ∀ q, (u q).val = d.values q.val) : + ∃ inverse : Euclidean n → {q : X // q ∈ ball base (d.radius / 32)}, + ∀ x ∈ Ω, (inverse x).val ∈ d.patchRegion ∧ d.values (inverse x).val = x := by + classical + let fallback : {q : X // q ∈ ball base (d.radius / 32)} := + ⟨base, mem_ball_self (div_pos d.radius_pos (by norm_num))⟩ + let inverse := fun x => if hx : x ∈ Ω then + (⟨(u.symm ⟨x, hx⟩).val, d.patch_region_subset (u.symm ⟨x, hx⟩).property⟩ : + {q : X // q ∈ ball base (d.radius / 32)}) else fallback + refine ⟨inverse, ?_⟩ + intro x hx + simp only [inverse, dite_eq_left hx] + refine ⟨(u.symm ⟨x, hx⟩).property, ?_⟩ + rw [← hu, u.apply_symm_apply] + +/-- A right inverse lying in the working region is also a left inverse +there, because these are the same open chart coordinates. -/ +theorem working_chart_inverse_left {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [(hausdorff n X).Regular] {base : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (d : RegularBilinearData hX base hk enlargement zeta) + {Ω : Set (Euclidean n)} (u : d.patchRegion ≃ₜ Ω) + (hu : ∀ q, (u q).val = d.values q.val) + (inverse : Euclidean n → {q : X // q ∈ ball base (d.radius / 32)}) + (hinverse : ∀ x ∈ Ω, (inverse x).val ∈ d.patchRegion ∧ d.values (inverse x).val = x) + {q : X} (hq : q ∈ d.patchRegion) : (inverse (d.values q)).val = q := by + have hmem : d.values q ∈ Ω := by rw [← hu ⟨q, hq⟩]; exact (u ⟨q, hq⟩).property + have hq' := hinverse (d.values q) hmem + have heq : u ⟨(inverse (d.values q)).val, hq'.1⟩ = u ⟨q, hq⟩ := by + apply Subtype.ext + simp only [hu, hq'.2] + exact congrArg Subtype.val (u.injective heq) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropyFirstVariation.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropyFirstVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ce5a560cb7b081be9cf218fdee557bcd0a496bd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropyFirstVariation.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Coordinates.RegularizedEntropySecant +import OAI.Geometry.RCD.Heat.EntropyPowerFirstVariation + +namespace OAI + +/-! # Finite-dimensional first variation for the actual regularized log direction -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem regularized_entropy_power_first_variation (μ : Measure X) [SigmaFinite μ] + (ν₀ : Measure X) [IsProbabilityMeasure ν₀] + (r : Lp ℝ 2 μ) {h : X → ℝ} + (hr : (r : X → ℝ) =ᵐ[μ] fun x => h x^2) + (hrn : (fun x => h x^2) =ᵐ[μ] fun x => (ν₀.rnDeriv μ x).toReal) + (he0 : Integrable (fun x => (ν₀.rnDeriv μ x).toReal * Real.log (ν₀.rnDeriv μ x).toReal) μ) + (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (hmap0 : π.map (fun γ => γ 0) = ν₀) + {C : ℝ≥0∞} (hC : C ≠ ∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t) ≤ C • μ) + {B : Set X} (hB : MeasurableSet B) [IsFiniteMeasure (μ.restrict B)] + (hs : ∀ t : Time, ∀ᵐ x ∂π.map (fun γ => γ t), x ∈ B) + (het : ∀ t : Time, Integrable (fun x => ((π.map (fun γ => γ t)).rnDeriv μ x).toReal * + Real.log ((π.map (fun γ => γ t)).rnDeriv μ x).toReal) μ) + {N : ℝ} (hN : 0 < N) {V : ℝ → ℝ} {D d : ℝ} + (hV0 : V 0=Real.exp (-boltzmannEntropy μ ν₀/N)) + (hV : HasDerivAt V D 0) + (hp : ∀ t : Time, V t ≤ Real.exp (-boltzmannEntropy μ (π.map (fun γ => γ t))/N)) + (hd : Tendsto (regularizedPlanLogSecant π h) (𝓝[>] (0:ℝ)) (𝓝 d)) : + d ≤ -N*(D/(V 0)) := by + let E : ℝ → ℝ := fun t => boltzmannEntropy μ (π.map (fun γ => geodesicExtension γ t)) + have hE (t : Time) : E t=boltzmannEntropy μ (π.map (fun γ => γ t)) := by + simp only [E,geodesicExtension_eq] + have hEzero : E 0=boltzmannEntropy μ ν₀ := by + simpa [hmap0] using hE (0:Time) + have hVpos : 0 < V 0 := by rw [hV0]; exact Real.exp_pos _ + have hE0 : E 0 = -N*Real.log (V 0) := by + rw [hV0,Real.log_exp,hEzero] + field_simp + have hsmall : ∀ᶠ t : ℝ in 𝓝[>] (0:ℝ), t < 1 := + (gt_mem_nhds zero_lt_one).filter_mono nhdsWithin_le_nhds + apply entropy_power_first_variation (M := (μ B).toReal) hN hVpos hV hE0 _ _ hd + · filter_upwards [hsmall,self_mem_nhdsWithin] with t ht1 ht0 + rw [hE (⟨t,ht0.le,ht1.le⟩:Time)] + exact hp ⟨t,ht0.le,ht1.le⟩ + · filter_upwards [hsmall,self_mem_nhdsWithin] with t ht1 ht0 + have hh := regularized_log_secant_le_entropy μ ν₀ r hr hrn he0 π hmap0 hC hcomp + hB hs ⟨t,ht0.le,ht1.le⟩ ht0 (het _) + rw [hEzero,hE (⟨t,ht0.le,ht1.le⟩:Time)] + exact hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropySecant.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropySecant.lean new file mode 100644 index 0000000000000000000000000000000000000000..ddee76dc519ac6178894b684bb4c2a083a4815a1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularizedEntropySecant.lean @@ -0,0 +1,58 @@ +import OAI.Analysis.RCDHeat.ExistingAnalytic + +namespace OAI + +/-! # The regularized signed logarithmic variation is bounded by the entropy secant -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem regularized_log_secant_le_entropy (μ : Measure X) [SigmaFinite μ] + (ν₀ : Measure X) [IsProbabilityMeasure ν₀] + (r : Lp ℝ 2 μ) {h : X → ℝ} + (hr : (r : X → ℝ) =ᵐ[μ] fun x => h x^2) + (hrn : (fun x => h x^2) =ᵐ[μ] fun x => (ν₀.rnDeriv μ x).toReal) + (he0 : Integrable (fun x => (ν₀.rnDeriv μ x).toReal * Real.log (ν₀.rnDeriv μ x).toReal) μ) + (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (hmap0 : π.map (fun γ => γ 0) = ν₀) + {C : ℝ≥0∞} (hC : C ≠ ∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t) ≤ C • μ) + {B : Set X} (hB : MeasurableSet B) [IsFiniteMeasure (μ.restrict B)] + (hs : ∀ t : Time, ∀ᵐ x ∂π.map (fun γ => γ t), x ∈ B) + (t : Time) (ht : 0 < (t:ℝ)) + (het : Integrable (fun x => ((π.map (fun γ => γ t)).rnDeriv μ x).toReal * + Real.log ((π.map (fun γ => γ t)).rnDeriv μ x).toReal) μ) : + regularizedPlanLogSecant π h t ≤ + (boltzmannEntropy μ (π.map (fun γ => γ t))-boltzmannEntropy μ ν₀)/(t:ℝ)+ + (t:ℝ)*(μ B).toReal := by + have hν (s : Time) : π.map (fun γ => γ s) ≪ μ := + Measure.absolutelyContinuous_of_le_smul (hcomp s) + have hνB (s : Time) : π.map (fun γ => γ s) ≪ μ.restrict B := + Measure.absolutelyContinuous_of_le_smul ((compression_iff_localized μ _ (hs s) C).mp (hcomp s)) + have hi (s : Time) : Integrable (fun x => h x^2) (π.map (fun γ => γ s)) := + ((Lp.memLp r).of_measure_le_smul hC (hcomp s)).integrable (by norm_num) |>.congr (hν s |>.ae_eq hr) + have hil (s : Time) : Integrable (fun x => Real.log (h x^2+(t:ℝ)^2)) (π.map (fun γ => γ s)) := + integrable_log_of_lower _ ((hi s).add (integrable_const _)) (sq_pos_of_pos ht) + (Eventually.of_forall fun x => by nlinarith [sq_nonneg (h x)]) + have hip (s : Time) : Integrable (fun γ : C(Time,X) => Real.log (h (γ s)^2+(t:ℝ)^2)) π := + (hil s).comp_measurable (measurable_path_eval s) + have hg := entropy_regularized_subgradient_localized μ ν₀ (π.map (fun γ => γ t)) hB + (hmap0 ▸ hνB 0) (hνB t) he0 het (sq_pos_of_pos ht) _ hrn (hmap0 ▸ hil 0) (hil t) + have he (s : Time) : (∫γ : C(Time,X), Real.log (h (γ s)^2+(t:ℝ)^2) ∂π) = + ∫x, Real.log (h x^2+(t:ℝ)^2) ∂π.map (fun γ => γ s) := + (integral_map (measurable_path_eval s).aemeasurable (hil s).aestronglyMeasurable).symm + simp only [regularizedPlanLogSecant,planInitialSecant,geodesicExtension_eq] + rw [integral_sub (hip t) (hip 0),he t,he 0,hmap0] + apply (div_le_iff₀ ht).mpr + field_simp + nlinarith only [hg] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularizedFisherContinuity.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularizedFisherContinuity.lean new file mode 100644 index 0000000000000000000000000000000000000000..38fd45f4cfebe3f4a94a8e87d0eea0ad460006c9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularizedFisherContinuity.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Sobolev.ComposedGammaContinuity +import OAI.Geometry.RCD.Coordinates.RegularizedFisherInterpolation +import OAI.Geometry.RCD.Heat.HeatCutoffIntegral + +namespace OAI + +/-! # Initial-time continuity of the actual Fisher interpolation -/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates.NoncollapsedRCD +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hn : 2≤n) (p : X) [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + +include hn p + +theorem regularizedFisherInterpolation_continuousAt + (f w : Lp ℝ 2 (hausdorff n X)) (hf0 : 0≤f) (A : ℝ≥0) + (hf : ∀ᵐ x ∂hausdorff n X, |f x|≤A) + {T t ε : ℝ} (ht : t heatTail μ Q a ha f (T-s) + have hF : Continuous F := (heatTail_continuous μ Q a ha f).comp (continuous_const.sub continuous_id) + obtain ⟨L,hL⟩ := hX.heatTail_gradient_bound hn p f A hf ha + have hval (s : ℝ) : ∀ᵐ x ∂μ, SobolevSpace.toLp μ Q (F s) x∈Icc 0 (A:ℝ) := by + have hP := heatAt_nonneg μ Q a (heatAt μ Q (T-s-a) f) + (heatAt_nonneg μ Q (T-s-a) f hf0) + have hA := heatAt_abs_le_const μ Q a A (heatAt μ Q (T-s-a) f) + (heatAt_abs_le_const μ Q (T-s-a) A f hf) + filter_upwards [(Lp.coeFn_nonneg _).mpr hP,hA] with x hx hy + exact ⟨hx,(le_abs_self _).trans hy⟩ + obtain ⟨φ,b,db,C,D,J,B,E,_hφ,hb,_hdb,_hφ0,_hdφ,_hdb',hB,_hE,he⟩ := + shifted_logarithm_jets hε A.coe_nonneg + have hc := composed_gamma_pairing_continuousAt μ Q (t:=t) hF.continuousAt + (heatAt_continuous μ Q w).continuousAt L (fun s => hL (T-s)) hb B hB + apply hc.congr_of_eventuallyEq + have hnear : ∀ᶠ s in 𝓝 t, a (ε+f x)*(Real.log (ε+A)-Real.log (ε+f x))) s μ := by + have hm : AEStronglyMeasurable (fun x => (ε+f x)*(Real.log (ε+A)-Real.log (ε+f x))) μ := + (aestronglyMeasurable_const.add (Lp.aestronglyMeasurable f)).mul + (aestronglyMeasurable_const.sub + ((aestronglyMeasurable_const.add (Lp.aestronglyMeasurable f)).aemeasurable.log.aestronglyMeasurable)) + apply IntegrableOn.of_bound hs hm.restrict ((ε+A)*(Real.log (ε+A)-Real.log ε)) + filter_upwards [ae_restrict_of_ae hf] with x hx + have hp : 0<ε+f x := add_pos_of_pos_of_nonneg hε hx.1 + have hlog0 : 0≤Real.log (ε+A)-Real.log (ε+f x) := + sub_nonneg.mpr (Real.log_le_log hp (add_le_add le_rfl hx.2)) + have hlogε : Real.log ε≤Real.log (ε+f x) := + Real.log_le_log hε (le_add_of_nonneg_right hx.1) + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg hp.le hlog0)] + exact mul_le_mul (add_le_add le_rfl hx.2) (sub_le_sub_left hlogε _) + hlog0 (add_nonneg hε.le A.coe_nonneg) + +variable [MetricSpace X] [BorelSpace X] (hQ : QuadraticCheegerEnergy μ) + +theorem regularized_gamma_integrable (u : SobolevSpace μ hQ) {ε : ℝ} (hε : 0<ε) + (hu : ∀ᵐ x ∂μ, 0≤SobolevSpace.toLp μ hQ u x) (c : ℝ) : + Integrable (fun x => c*localGamma μ hQ u u x/(ε+SobolevSpace.toLp μ hQ u x)) μ := by + have hb : ∀ᵐ x ∂μ, ‖(ε+SobolevSpace.toLp μ hQ u x)⁻¹‖≤ε⁻¹ := by + filter_upwards [hu] with x hx + rw [Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr (add_nonneg hε.le hx))] + exact inv_anti₀ hε (le_add_of_nonneg_right hx) + have hi := (localGamma_memL1 μ hQ u u).bdd_mul + ((aestronglyMeasurable_const.add (Lp.aestronglyMeasurable (SobolevSpace.toLp μ hQ u))).aemeasurable.inv.aestronglyMeasurable) hb + convert hi.const_mul c using 1 + funext x + change c*localGamma μ hQ u u x/(ε+SobolevSpace.toLp μ hQ u x) = + c*((ε+SobolevSpace.toLp μ hQ u x)⁻¹*localGamma μ hQ u u x) + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RegularizedMonotoneHeat.lean b/lean/OAI/Geometry/RCD/Coordinates/RegularizedMonotoneHeat.lean new file mode 100644 index 0000000000000000000000000000000000000000..083f6f6424fa5b6db5342a860cca443cb2f60b93 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RegularizedMonotoneHeat.lean @@ -0,0 +1,172 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.HarmonicOperatorEvolution +import OAI.Geometry.RCD.Coordinates.WeightedInverse + +namespace OAI + +/-! +# A single regularization for monotone harmonic heat Grams + +The regularizer is constructed from the actual annular error and the +curvature term. Positivity is proved uniformly in the direction and pole; +it is not assumed as an additional heat-flow input. +-/ + +open Set Metric MeasureTheory +open scoped NNReal InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {k : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ k) + {n : ℕ} {U : Euclidean n →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean n)} {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) + +def harmonicHeatDerivative {t : ℝ} (ht : 0 < t) (x : X) (lambda : ℝ) : + Euclidean n →L[ℝ] Euclidean n := + (2 : ℝ) • cutoffHeatMass μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M ht x - + (2 * κ) • cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U ht x 0 + + harmonicHeatError μ hQ (k := k) G χ t x + + lambda • ContinuousLinearMap.id ℝ (Euclidean n) + +/-- The regularized derivative lies between twice the heat mass and +that mass plus a uniform scalar error. -/ +theorem harmonicHeatDerivative_bounds (hρr : ρ < r) (hκ : 0 ≤ κ) + {t : ℝ} (ht : 0 < t) (x : X) {η lambda : ℝ} + (herr : ‖harmonicHeatError μ hQ (k := k) G χ t x‖ ≤ η) + (hlambda : 2 * κ * (L : ℝ) ^ 2 + η ≤ lambda) (v : Euclidean n) : + 2 * ⟪v, cutoffHeatMass μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M ht x v⟫_ℝ ≤ + ⟪v, harmonicHeatDerivative μ hQ hk G χ ht x lambda v⟫_ℝ ∧ + ⟪v, harmonicHeatDerivative μ hQ hk G χ ht x lambda v⟫_ℝ ≤ + 2 * ⟪v, cutoffHeatMass μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M ht x v⟫_ℝ + (lambda + η) * ‖v‖ ^ 2 := by + let A := cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) U ht x 0 + let E := harmonicHeatError μ hQ (k := k) G χ t x + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r) := by + intro z hz + have hd : dist z p ≤ 2 * ρ := χ.tsupport_subset μ hQ hz + exact lt_of_le_of_lt hd (by linarith) + have hA := (G v).heatGram_le μ hQ hk χ.weight χ.bounds (χ.hasCompactSupport μ hQ) hχΩ ht x + have hApos : 0 ≤ ⟪v, A v⟫_ℝ := + (cutoffHeatGram_isPositive μ hQ hk _ _ U (fun z => (χ.bounds z).1) ht x le_rfl).inner_nonneg_right v + have hE : |⟪v, E v⟫_ℝ| ≤ η * ‖v‖ ^ 2 := by + calc + |⟪v, E v⟫_ℝ| ≤ ‖v‖ * ‖E v‖ := abs_real_inner_le_norm _ _ + _ ≤ ‖v‖ * (η * ‖v‖) := by + apply mul_le_mul_of_nonneg_left _ (norm_nonneg v) + exact (E.le_opNorm v).trans (mul_le_mul_of_nonneg_right herr (norm_nonneg v)) + _ = _ := by ring + have hcurv := mul_le_mul_of_nonneg_left hA (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) hκ) + have hreg := mul_le_mul_of_nonneg_right hlambda (sq_nonneg ‖v‖) + have hcurvpos := mul_nonneg (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) hκ) hApos + change ⟪v, A v⟫_ℝ ≤ _ at hA + change 2 * κ * ⟪v, A v⟫_ℝ ≤ _ at hcurv + simp only [harmonicHeatDerivative, add_apply, sub_apply, smul_apply, + ContinuousLinearMap.id_apply, inner_add_right, inner_sub_right, inner_smul_right, + real_inner_self_eq_norm_sq] + change _ ≤ _ - _ + ⟪v, E v⟫_ℝ + _ ∧ _ - _ + ⟪v, E v⟫_ℝ + _ ≤ _ + constructor <;> nlinarith only [hcurv, hreg, hcurvpos, (abs_le.mp hE).1, (abs_le.mp hE).2] + +/-- An actual operator derivative also differentiates every quadratic value. -/ +theorem harmonicHeatQuadratic_hasDerivAt (hρ : 0 < ρ) (hρr : ρ < r) + {t : ℝ} (ht : 0 < t) (x : X) {lambda : ℝ} (hlambda : 0 ≤ lambda) (v : Euclidean n) : + HasDerivAt (fun s => ⟪v, cutoffHeatGramAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U s x lambda v⟫_ℝ) + ⟪v, harmonicHeatDerivative μ hQ hk G χ ht x lambda v⟫_ℝ t := by + have h := harmonicHeatGram_hasDerivAt μ hQ hk G χ hρ hρr ht x hlambda + have hv := h.clm_apply (hasDerivAt_const t v) + have hi := (hasDerivAt_const t v).inner ℝ hv + simpa only [inner_zero_left, map_zero, add_zero, harmonicHeatDerivative] using hi + +include G in +/-- Uniform annular decay constructs one strictly positive regularizer +valid for every inner pole and every direction on a common time interval. -/ +theorem exists_monotone_regularized_heat (hg : HasCoordinateHeatBounds μ k) + (hρ : 0 < ρ) (hρr : ρ < r) (hκ : 0 ≤ κ) + {D V η : ℝ} (hD : 0 < D) (hV : 0 < V) (hη : 0 < η) + (hvol : ∀ y, ρ ≤ dist p y → dist p y ≤ 2 * ρ → + ∀ s, 0 < s → s ≤ D → V * s ^ n ≤ μ.real (ball y s)) : + ∃ δ : ℝ, 0 < δ ∧ ∃ lambda : ℝ, 0 < lambda ∧ + lambda = 2 * κ * (L : ℝ) ^ 2 + η ∧ + ∀ x ∈ ball p (ρ / 2), ∀ v : Euclidean n, + MonotoneOn (fun t => ⟪v, cutoffHeatGramAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U t x lambda v⟫_ℝ) (Ioo 0 δ) := by + obtain ⟨δ, hδ, hb⟩ := harmonicHeatError_uniformly_small μ hQ hk hg G χ hρ hD hV hvol hη + let lambda := 2 * κ * (L : ℝ) ^ 2 + η + have hlambda : 0 < lambda := by + dsimp only [lambda] + positivity + refine ⟨δ, hδ, lambda, hlambda, rfl, ?_⟩ + intro x hx v + apply monotoneOn_of_hasDerivWithinAt_nonneg (convex_Ioo (0 : ℝ) δ) + (f' := fun t => if ht : 0 < t then + ⟪v, harmonicHeatDerivative μ hQ hk G χ ht x lambda v⟫_ℝ else 0) + · intro t ht + exact (harmonicHeatQuadratic_hasDerivAt μ hQ hk G χ hρ hρr ht.1 x hlambda.le v).continuousAt.continuousWithinAt + · intro t ht + have ht' : t ∈ Ioo (0 : ℝ) δ := by simpa only [interior_Ioo] using ht + simp only [dite_eq_left ht'.1] + exact (harmonicHeatQuadratic_hasDerivAt μ hQ hk G χ hρ hρr ht'.1 x hlambda.le v).hasDerivWithinAt + · intro t ht + have ht' : t ∈ Ioo (0 : ℝ) δ := by simpa only [interior_Ioo] using ht + simp only [dite_eq_left ht'.1] + have hlow := (harmonicHeatDerivative_bounds μ hQ hk G χ hρr hκ ht'.1 x + (hb t ht'.1 ht'.2 x hx).le (le_refl lambda) v).1 + exact (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) + ((cutoffHeatMass_isPositive μ hQ hk _ _ M (fun z => (χ.bounds z).1) ht'.1 x).inner_nonneg_right v)).trans hlow + +include G in +/-- Inverting the actual positive heat Gram reverses its time order. -/ +theorem exists_antitone_regularized_inverse (hg : HasCoordinateHeatBounds μ k) + (hρ : 0 < ρ) (hρr : ρ < r) (hκ : 0 ≤ κ) + {D V η : ℝ} (hD : 0 < D) (hV : 0 < V) (hη : 0 < η) + (hvol : ∀ y, ρ ≤ dist p y → dist p y ≤ 2 * ρ → + ∀ s, 0 < s → s ≤ D → V * s ^ n ≤ μ.real (ball y s)) : + ∃ δ : ℝ, 0 < δ ∧ ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + lambda = 2 * κ * (L : ℝ) ^ 2 + η ∧ + ∀ x ∈ ball p (ρ / 2), ∀ s t (hs : 0 < s) (hst : s ≤ t), t < δ → + ((cutoffHeatGramEquiv μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (fun z => (χ.bounds z).1) hs x hlambda).symm.toContinuousLinearMap - + (cutoffHeatGramEquiv μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (fun z => (χ.bounds z).1) (hs.trans_le hst) x hlambda).symm.toContinuousLinearMap).IsPositive := by + obtain ⟨δ, hδ, lambda, hlambda, heq, hm⟩ := exists_monotone_regularized_heat μ hQ hk G χ + hg hρ hρr hκ hD hV hη hvol + refine ⟨δ, hδ, lambda, hlambda, heq, ?_⟩ + intro x hx s t hs hst htδ + let P := cutoffHeatGramEquiv μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (fun z => (χ.bounds z).1) (hs.trans_le hst) x hlambda + let Q := cutoffHeatGramEquiv μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (fun z => (χ.bounds z).1) hs x hlambda + have hP : (P : Euclidean n →L[ℝ] Euclidean n).IsPositive := + cutoffHeatGram_isPositive μ hQ hk _ _ U (fun z => (χ.bounds z).1) (hs.trans_le hst) x hlambda.le + have hQ' : (Q : Euclidean n →L[ℝ] Euclidean n).IsPositive := + cutoffHeatGram_isPositive μ hQ hk _ _ U (fun z => (χ.bounds z).1) hs x hlambda.le + have hPQ : ((P : Euclidean n →L[ℝ] Euclidean n) - (Q : Euclidean n →L[ℝ] Euclidean n)).IsPositive := by + apply (ContinuousLinearMap.isPositive_iff _).mpr + refine ⟨hP.isSymmetric.sub hQ'.isSymmetric, ?_⟩ + intro v + rw [real_inner_comm] + simp only [sub_apply, inner_sub_right] + apply sub_nonneg.mpr + change ⟪v, cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U hs x lambda v⟫_ℝ ≤ + ⟪v, cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U (hs.trans_le hst) x lambda v⟫_ℝ + have h := hm x hx v ⟨hs, hst.trans_lt htδ⟩ ⟨hs.trans_le hst, htδ⟩ hst + simpa only [cutoffHeatGramAt_of_pos μ hQ hk _ _ U hs, + cutoffHeatGramAt_of_pos μ hQ hk _ _ U (hs.trans_le hst)] using h + exact inverse_increment_isPositive P Q hP hQ' hPQ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RelativeErrorNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RelativeErrorNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e812ebcc5addc6b621ad83c9de5f2aff2ce3736 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RelativeErrorNormalization.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Harmonic.ProjectionFailureSequence + +namespace OAI + +/-! # Normalizing only after the outer residual bound -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_relative_bound {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + (x : H) {α s C : ℝ} (hα : 0 < α) (hx : ‖x‖ ≤ C * (α + s)) : + ‖α⁻¹ • x‖ ≤ C * (1 + s / α) := by + rw [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos hα] + apply (mul_le_mul_of_nonneg_left hx (inv_nonneg.mpr hα.le)).trans_eq + field_simp + +/-- Dividing the already proved unnormalized outer bound gives a +uniform bound on every sufficiently late normalized residual. -/ +theorem normalized_relative_eventually_bounded + {H : ℕ → Type*} [∀ i, NormedAddCommGroup (H i)] [∀ i, NormedSpace ℝ (H i)] + (x : ∀ i, H i) {α s : ℕ → ℝ} {C : ℝ} (hC : 0 ≤ C) + (hα : ∀ i, 0 < α i) (hx : ∀ i, ‖x i‖ ≤ C * (α i + s i)) + (hratio : Tendsto (fun i => s i / α i) atTop (𝓝 0)) : + ∀ᶠ i in atTop, ‖(α i)⁻¹ • x i‖ ≤ 2 * C := by + filter_upwards [hratio.eventually (gt_mem_nhds (by norm_num : (0 : ℝ) < 1))] with i hi + have hb := normalized_relative_bound (x i) (hα i) (hx i) + nlinarith only [hb, mul_nonneg hC (le_of_lt (sub_pos.mpr hi))] + +/-- The normalized forcing tends to zero when its original size is +linear in a source error negligible relative to the residual. -/ +theorem normalized_source_error_tendsto_zero + {H : ℕ → Type*} [∀ i, NormedAddCommGroup (H i)] [∀ i, NormedSpace ℝ (H i)] + (e : ∀ i, H i) {α s : ℕ → ℝ} {C : ℝ} + (hα : ∀ i, 0 < α i) (he : ∀ i, ‖e i‖ ≤ C * s i) + (hratio : Tendsto (fun i => s i / α i) atTop (𝓝 0)) : + Tendsto (fun i => ‖(α i)⁻¹ • e i‖) atTop (𝓝 0) := by + have hb (i : ℕ) : ‖(α i)⁻¹ • e i‖ ≤ C * (s i / α i) := by + rw [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos (hα i)] + apply (mul_le_mul_of_nonneg_left (he i) (inv_nonneg.mpr (hα i).le)).trans_eq + ring + exact squeeze_zero (fun i => norm_nonneg _) hb + (by simpa only [mul_zero] using tendsto_const_nhds.mul hratio) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RenyiChordNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RenyiChordNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..85ad8b2944817a2a44c1e3e1f10bc9ac13e1e069 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RenyiChordNormalization.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Coordinates.RenyiScalarNormalization +import OAI.Geometry.RCD.Transport.ReducedChord + +namespace OAI + +/-! # Exact cancellation of component mass in a two-coefficient chord -/ + +open Set MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem renyiIntegral_normalized_chord (μ ν₀ νt ν₁ : Measure X) [SigmaFinite μ] + [IsFiniteMeasure ν₀] [IsFiniteMeasure νt] [IsFiniteMeasure ν₁] + {c A B : ℝ≥0∞} (hc0 : c≠0) (hct : c≠∞) {N : ℝ} (hN : 1 (γ 0,γ 1)))) + (hκ : κ≤π) (hκ0 : κ univ≠0) + (ht : IsOptimalCoupling ((κ univ)⁻¹ • κ.map (fun γ => γ 0)) + ((κ univ)⁻¹ • κ.map (fun γ => γ 1)) (σ.map (fun γ => (γ 0,γ 1)))) + (hgs : ∀ᵐ γ ∂σ, IsGeodesic γ) + (hsκ : (π-κ).map (fun γ => γ t) ⟂ₘ κ.map (fun γ => γ t)) + (hsσ : (π-κ).map (fun γ => γ t) ⟂ₘ σ.map (fun γ => γ t)) : + (∫ x, ((σ.map (fun γ => γ t)).rnDeriv μ x).toReal^q ∂μ) ≤ + ∫ x, (((κ univ)⁻¹ • κ.map (fun γ => γ t)).rnDeriv μ x).toReal^q ∂μ := by + let : IsFiniteMeasure κ := isFiniteMeasure_of_le π hκ + have hκtop : κ univ≠∞ := measure_ne_top κ univ + have hi : (κ univ)⁻¹≠∞ := ENNReal.inv_ne_top.mpr hκ0 + let : IsFiniteMeasure (κ univ • σ) := Measure.smul_finite _ hκtop + let : IsFiniteMeasure ((κ univ)⁻¹ • κ.map (fun γ => γ t)) := Measure.smul_finite _ hi + have hscaled : IsOptimalCoupling (κ.map (fun γ => γ 0)) (κ.map (fun γ => γ 1)) + ((κ univ • σ).map (fun γ => (γ 0,γ 1))) := by + have hh := ht.smul hκ0 hκtop + simpa only [Measure.map_smul _ ((measurable_path_eval 0).prodMk (measurable_path_eval 1)).aemeasurable, + smul_smul,ENNReal.mul_inv_cancel hκ0 hκtop,one_smul] using hh + have hgeoscaled : ∀ᵐ γ ∂κ univ • σ, IsGeodesic γ := + hgs.filter_mono Measure.smul_absolutelyContinuous.ae_le + have hsep : (π-κ).map (fun γ => γ t) ⟂ₘ (κ univ • σ).map (fun γ => γ t) := by + rw [Measure.map_smul _ (measurable_path_eval t).aemeasurable] + exact hsσ.mono_ac Measure.AbsolutelyContinuous.rfl Measure.smul_absolutelyContinuous + have hh := hmax.subplan_comparison μ hq0 hq1 hg hp hκ hscaled hgeoscaled hsκ hsep + rw [Measure.map_smul _ (measurable_path_eval t).aemeasurable, + renyiPower_smul μ _ hκtop q] at hh + have he : κ univ • ((κ univ)⁻¹ • κ.map (fun γ => γ t))=κ.map (fun γ => γ t) := by + rw [smul_smul,ENNReal.mul_inv_cancel hκ0 hκtop,one_smul] + rw [←he] at hh + rw [renyiPower_smul μ _ hκtop q] at hh + exact (mul_le_mul_iff_right₀ (Real.rpow_pos_of_pos (ENNReal.toReal_pos hκ0 hκtop) q)).mp hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/RenyiScalarNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/RenyiScalarNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..628301c909e5df694b8be0d6b473f479efcafada --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/RenyiScalarNormalization.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Transport.RenyiIntegralAdditivity + +namespace OAI + +/-! # Cancellation of component mass in scalar Rényi bounds -/ + +open Set MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem renyiIntegral_normalized_bound (μ ν₀ νm ν₁ : Measure X) [SigmaFinite μ] + [IsFiniteMeasure ν₀] [IsFiniteMeasure νm] [IsFiniteMeasure ν₁] + {c s : ℝ≥0∞} (hc0 : c≠0) (hct : c≠∞) {N : ℝ} (hN : 1 sq_nonneg _) hE hvol he + have htransfer := commutator_error_transfer μ hQ f v u g₀ h₀ g h + (ae_restrict_of_ae_restrict_of_subset hsub hg₀) + (ae_restrict_of_ae_restrict_of_subset hsub hh₀) hg hh le_rfl + exact (mul_le_mul_of_nonneg_left htransfer (by positivity)).trans hsmall + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScalarBochnerCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/ScalarBochnerCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..4639fd304f16f71aaea5a18f7a9ddda1fbccd538 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScalarBochnerCoordinates.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Sobolev.PublishedInputDischarge +import OAI.Geometry.RCD.Sobolev.PoissonHessianFromScalar +import OAI.Geometry.RCD.Sobolev.PoissonActionFromScalar +import OAI.Geometry.RCD.Sobolev.PoissonGradientFromScalar + +namespace OAI + +/-! # The chart theorem under a scalar second-order estimate + +The scalar finite-dimensional Bochner inequality implies the local +second-order estimates required for the coordinate construction. +-/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_scalar_bochner {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + ScalarDimensionalBochner (hausdorff n X) hX.quadratic K n → + LocalPoissonHarmonicCompactnessInput hX → + LocalInitialSplittingInput hX → LocalTransformationInput hX → + LocalFlatSplittingInput hX → LocalVolumeRigidityInput hX → + LocalHarmonicMomentCompactnessInput hX → LocalMeasuredCoordinateInput hX → + HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + dsimp only + intro p hregular hvolume hscalar hpoissonCompact hinitial htrans hsplit hrigidity hharmonic hmeasured + let := hX.hausdorff_regular + exact regular_coordinates_of_published_inputs hn hX hregular hvolume + (hX.poisson_hessian_action_input_of_scalar hn hscalar) + (hX.poisson_gradient_product_input_of_scalar hn hscalar) + hpoissonCompact (hX.poisson_hessian_input_of_scalar hn hscalar) + hinitial htrans hsplit hrigidity hharmonic hmeasured + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledChartPinching.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledChartPinching.lean new file mode 100644 index 0000000000000000000000000000000000000000..427bfa67194958d58a0ebd52f95fbc37a9366f5e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledChartPinching.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.ScaledPinchingField +import OAI.Geometry.RCD.Coordinates.RegularInitialChart + +namespace OAI + +/-! # The initial open chart and full directional pinching for the same map -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The precisely stated published inputs construct one actual open chart +and an arbitrarily small summable pinching field for its coordinate map. -/ +theorem exists_scaled_chart_pinching_field {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ Cpin : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 0 < Cpin ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a |K| B J C A Cχ 1 zeta eta, + c.Matches e.heat ∧ zeta ≤ budget ∧ Nonempty (RegularPinchingField e.heat Cpin budget) ∧ + let Ω := ball p (e.heat.radius / 1024) + IsOpen (Set.range (fun x : Ω => e.heat.values x)) ∧ + ∃ chart : Ω ≃ₜ Set.range (fun x : Ω => e.heat.values x), + ∀ x, (chart x).val = e.heat.values x := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, Cpin, hB, hJ, hC, hA, hCχ, hCpin, hconstruct⟩ := + exists_scaled_pinching_field m hX ha hcompact hregular hvolume hmeasured hBG hdensity + hdistance hsobolev hpoisson haction hproduct hpoincare hpoissonCompact hhessian hmean + hinitial htrans hsplit hrigidity hbochner hcutoff hharmonic hgradient heuclidean + hmetricmeasure hk hg hdiff + refine ⟨c, B, J, C, A, Cχ, Cpin, hB, hJ, hC, hA, hCχ, hCpin, ?_⟩ + intro budget hbudget + let D := (((m + 2 : ℕ) : ℝ) ^ 2) * ((5 / 3 : ℝ) * ((1 / 4 : ℝ) ^ (m + 2))⁻¹) + have hD : 0 ≤ D := by dsimp only [D]; positivity + let small := min budget (min (1 / 2048) ((3 / 4) / (D + 1))) + have hsmall : 0 < small := lt_min hbudget (lt_min (by norm_num) (by positivity)) + obtain ⟨zeta, eta, hzeta, heta, e, hmatch, hzetaBudget, ⟨f⟩⟩ := hconstruct small hsmall + have hzetaSmall : zeta ≤ 1 / 2048 := + hzetaBudget.trans ((min_le_right _ _).trans (min_le_left _ _)) + have hzetaGram : D * zeta ≤ 3 / 4 := by + have hh := hzetaBudget.trans ((min_le_right _ _).trans (min_le_right _ _)) + have hb := (le_div_iff₀ (by positivity : 0 < D + 1)).mp hh + nlinarith + refine ⟨zeta, eta, hzeta, heta, e, hmatch, hzetaBudget.trans (min_le_left _ _), ⟨{ f with total := ?_ }⟩, ?_⟩ + · intro q + exact (f.total q).trans (min_le_left _ _) + · apply regular_initial_chart hX e hzeta.le hzetaSmall + simpa only [D, mul_assoc] using hzetaGram + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledCoordinates.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..deb542452436d060ed95d8cc3de80751c4d55559 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledCoordinates.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Metric.RecenterApproximation +import OAI.Geometry.RCD.Harmonic.TransformedColumns + +namespace OAI + +/-! # Invertible coordinate normalization with physical scale included -/ + +open Metric +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- Include the physical inverse radius in the invertible coordinate change. -/ +def scaledCoordinateEquiv {n : ℕ} (A : Euclidean n ≃L[ℝ] Euclidean n) + (c : ℝ) (hc : c ≠ 0) : Euclidean n ≃L[ℝ] Euclidean n := + A.trans (ContinuousLinearEquiv.smulLeft (R₁ := ℝ) (Units.mk0 c hc)) + +theorem scaledCoordinateEquiv_toCLM {n : ℕ} (A : Euclidean n ≃L[ℝ] Euclidean n) + (c : ℝ) (hc : c ≠ 0) : + (scaledCoordinateEquiv A c hc : Euclidean n →L[ℝ] Euclidean n) = + c • (A : Euclidean n →L[ℝ] Euclidean n) := by + ext x + rfl + +theorem scaledCoordinateEquiv_adjoint {n : ℕ} (A : Euclidean n ≃L[ℝ] Euclidean n) + (c : ℝ) (hc : c ≠ 0) (z : Euclidean n) : + (scaledCoordinateEquiv A c hc : Euclidean n →L[ℝ] Euclidean n).adjoint z = + c • (A : Euclidean n →L[ℝ] Euclidean n).adjoint z := by + rw [scaledCoordinateEquiv_toCLM, map_smulₛₗ] + simp only [starRingEnd_apply, star_trivial, smul_apply] + +theorem centered_scaledCoordinateEquiv {X : Type*} {n : ℕ} + (v : X → Euclidean n) (p x : X) (A : Euclidean n ≃L[ℝ] Euclidean n) + (c : ℝ) (hc : c ≠ 0) : + (scaledCoordinateEquiv A c hc : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (scaledCoordinateEquiv A c hc : Euclidean n →L[ℝ] Euclidean n).adjoint (v p) = + c • ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) := by + rw [scaledCoordinateEquiv_adjoint, scaledCoordinateEquiv_adjoint, smul_sub] + +/-- The normalization at radius four times the testing radius gives the +radius-two metric approximation needed for harmonic compactness. -/ +theorem normalized_approximation_rescale_four {X : Type*} [MetricSpace X] {n : ℕ} + {p : X} {r ε : ℝ} (hr : 0 < r) (v : X → Euclidean n) + (A : Euclidean n ≃L[ℝ] Euclidean n) + (happ : IsPointedApproximation p 0 (4 * r) (1 / 2) ε + (fun x => (4 * r)⁻¹ • ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)))) : + IsPointedApproximation p 0 r 2 (4 * ε) + (fun x => + (scaledCoordinateEquiv A r⁻¹ (inv_ne_zero hr.ne') : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (scaledCoordinateEquiv A r⁻¹ (inv_ne_zero hr.ne') : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) := by + have he (x : X) : (4 : ℝ) • ((4 * r)⁻¹ • + ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v p))) = + (scaledCoordinateEquiv A r⁻¹ (inv_ne_zero hr.ne') : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (scaledCoordinateEquiv A r⁻¹ (inv_ne_zero hr.ne') : Euclidean n →L[ℝ] Euclidean n).adjoint (v p) := by + rw [centered_scaledCoordinateEquiv, smul_smul] + congr 1 + field_simp + simpa only [he] using happ.rescale_four hr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchCumulative.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchCumulative.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd1386b83a8ffc9130965a96c4da2d098ac40c51 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchCumulative.lean @@ -0,0 +1,167 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchCumulative +import OAI.Geometry.RCD.Metric.ScaledCentralMass + +namespace OAI + +/-! # Patch cumulative constants fixed before the source budget -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem exists_scaled_patch_cumulative_comparison {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (c₀ : RegularHeatConstants n) (N : ℕ) : + ∃ Theta tau : ℝ, 1 ≤ Theta ∧ 0 < tau ∧ + ∀ {a κ B J C A Cχ enlargement zeta eta : ℝ} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta), + c₀.Matches e.heat → 0 ≤ zeta → zeta ≤ 1 → 0 ≤ Cχ → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4 → + ∀ epsilon : ℝ, 0 ≤ epsilon → epsilon ≤ tau → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + ∀ {ι : Type*} (s : ℕ → Finset ι) + (centers : ℕ → ι → {z : X // z ∈ ball base (e.heat.radius / 32)}) + (weight : ℕ → ι → ℝ), + (∀ i, (s i).card ≤ N) → ∀ q, q ∈ ball base (e.heat.radius / 32) → + (∀ i y, y ∈ s i → dist (centers i y).val q ≤ + (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) / 12) → + (∀ i y, y ∈ s i → dist q (centers i y).val ≤ + enlargement * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15))) → + (∀ i y, y ∈ s i → 0 ≤ weight i y) → + (∀ i, ∃ y ∈ s i, weight i y = 1) → + ∀ (xi : Euclidean n) (k : ℕ), + let D := fun i y => e.heat.pinchingMassMatrix (centers i y).val (centers i y).property + (e.heat.shift + i) + (‖xi‖ ^ 2 + (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪xi, D i y xi⟫_ℝ) ≤ + Theta * ‖e.heat.frozenAt q k xi‖ ^ 2) ∧ + (‖e.heat.frozenAt q k xi‖ ^ 2 ≤ Theta * + (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ∑ y ∈ s i, weight i y * ⟪xi, D i y xi⟫_ℝ)) := by + classical + obtain ⟨T, hT, hcentralBuild⟩ := exists_scaled_central_mass_comparison hX hk c₀ + let c := patchCentralFactor n + have hc : 0 < c := by dsimp only [c, patchCentralFactor]; positivity + let K₀ := T * (1 + c⁻¹) + let U := (N : ℝ) * patchEnvelopeFactor n * c₀.envelope + let V := (N : ℝ) * (32 * c₀.comparison * c₀.envelope + 4) + have hK₀ : 0 < K₀ := mul_pos hT (by positivity) + have hU : 0 ≤ U := by + dsimp only [U, patchEnvelopeFactor] + have hA := c₀.envelope_pos + positivity + have hV : 0 ≤ V := by + dsimp only [V] + have hA := c₀.envelope_pos + have hC := c₀.comparison_pos + positivity + let Theta := c₀.lower + 2 * (U + V) + 4 * K₀ + 1 + let tau := min 1 (1 / (4 * K₀ * (V + 1))) + have hTheta : 1 ≤ Theta := by dsimp only [Theta]; linarith only [c₀.lower_pos, hU, hV, hK₀] + have htau : 0 < tau := lt_min zero_lt_one (by positivity) + refine ⟨Theta, tau, hTheta, htau, ?_⟩ + intro a κ B J C A Cχ enlargement zeta eta e hmatch hzeta hzeta1 hCχ hsmall hnear + epsilon hepsilon hetau hcoefficient ι s centers weight hcard q hq hroom henlargement hweight hcover xi k D + have hcentral := hcentralBuild e.heat hmatch + have hAeq := hmatch.2.2.1 + have hBeq := hmatch.2.2.2.1 + have hCeq := hmatch.2.2.2.2.2.1 + have hepsilon1 : epsilon ≤ 1 := hetau.trans (min_le_left _ _) + have habsorb : 2 * K₀ * V * epsilon ≤ 1 / 2 := by + have h := (le_div_iff₀ (by positivity : 0 < 4 * K₀ * (V + 1))).mp + (hetau.trans (min_le_right _ _)) + have hp := mul_nonneg hK₀.le hepsilon + nlinarith only [h, hp] + let Q := fun i => e.heat.heatAt q (e.heat.shift + i + 17) + let R := fun i y => e.heat.meanAt (centers i y).val (centers i y).property (e.heat.shift + i + 15) + let C₀ := fun i y => rawPinchingMass e.heat.mass n e.heat.radius (centers i y).val (e.heat.shift + i) + let a₀ := fun i => (Q i).symm xi + let z₀ := fun i y => (R i y).symm xi + let N₀ := fun i => c • dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) + let H := ‖e.heat.frozenAt q k xi‖ ^ 2 + have hC₀ (i y) (_hy : y ∈ s i) : (C₀ i y).IsPositive := by + apply (e.heat.mass.massOperator_isPositive _ measurableSet_ball).smul_of_nonneg + have hs := distanceSourceRadius_pos e.heat.radius_pos (e.heat.shift + i) + positivity + have hroom' i y (hy : y ∈ s i) : dist (centers i y).val q ≤ + e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := div_pos e.heat.radius_pos (by positivity) + linarith [hroom i y hy] + have hsmallC i y (hy : y ∈ s i) (v : Euclidean n) : + ⟪v, C₀ i y v⟫_ℝ ≤ epsilon * ⟪v, Q i v⟫_ℝ := by + have h := regular_raw_patch_mass_small hX e hq (centers i y).property + hzeta hzeta1 hCχ hsmall hnear (e.heat.shift + i) (by omega) (hroom' i y hy) v + exact h.trans (mul_le_mul_of_nonneg_right (hcoefficient i) ((e.heat.heatAt_isPositive q _).inner_nonneg_right v)) + have herr : (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z₀ i y - a₀ i, C₀ i y (z₀ i y - a₀ i)⟫_ℝ) ≤ V * epsilon * H := by + have h := normalization_mass_errors_sum_le (fun i => (Q i).toContinuousLinearMap) C₀ s + (fun i y => z₀ i y - a₀ i) hsmallC k + have he := regular_shifted_inverse_errors_sum_le hX e hq hzeta hnear s centers N hcard + hroom' henlargement xi k + dsimp only at he + rw [← e.heat.frozenAt_norm_sq q k xi] at he + simp only [hAeq, hCeq] at he + change _ ≤ V * H at he + have hm := mul_le_mul_of_nonneg_left he hepsilon + simp only [ContinuousLinearEquiv.coe_coe] at h + change epsilon * (∑ i ∈ Finset.range k, ∑ y ∈ s i, + ⟪z₀ i y - a₀ i, Q i (z₀ i y - a₀ i)⟫_ℝ) ≤ epsilon * (V * H) at hm + exact (h.trans hm).trans_eq (by ring) + have hu : (∑ i ∈ Finset.range k, ∑ y ∈ s i, ⟪a₀ i, C₀ i y (a₀ i)⟫_ℝ) ≤ U * H := + by simpa only [U, hAeq] using + e.heat.raw_patch_mass_sum_le hq s (fun i y => (centers i y).val) N hcard hroom xi k + have hcent : H ≤ K₀ * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ⟪a₀ i, N₀ i (a₀ i)⟫_ℝ) := by + have h := (hcentral q hq xi k).2 + have hm : 0 ≤ ∑ i ∈ Finset.range k, + ⟪a₀ i, dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) (a₀ i)⟫_ℝ := + Finset.sum_nonneg (fun i _ => (dyadicBochnerMass_isPositive e.heat.mass n q e.heat.radius_pos.le _).inner_nonneg_right _) + have ht := central_comparison_rescale (sq_nonneg ‖xi‖) hm hT.le hc h + simpa only [N₀, smul_apply, inner_smul_right, ← Finset.mul_sum] using ht + have hcover' i : ∃ y ∈ s i, weight i y = 1 ∧ ∀ v, ⟪v, N₀ i v⟫_ℝ ≤ ⟪v, C₀ i y v⟫_ℝ := by + obtain ⟨y, hy, hw⟩ := hcover i + refine ⟨y, hy, hw, ?_⟩ + intro v + simpa only [N₀, smul_apply, inner_smul_right] using + rawPinchingMass_covers_central e.heat.mass n e.heat.radius_pos (e.heat.shift + i) (hroom i y hy) v + have hh := local_mass_cumulative_comparison N₀ C₀ s weight a₀ z₀ hC₀ hweight hcover' + (sq_nonneg ‖e.heat.frozenAt q k xi‖) hK₀.le k hu herr hcent habsorb + have hD (i y) : ⟪xi, D i y xi⟫_ℝ = ⟪z₀ i y, C₀ i y (z₀ i y)⟫_ℝ := by + change ⟪xi, frozenConjugate (R i y) (C₀ i y) xi⟫_ℝ = _ + exact inner_frozenConjugate _ _ _ _ + simp_rw [hD] + have hmass0 : 0 ≤ ∑ i ∈ Finset.range k, ⟪a₀ i, + dyadicBochnerMass e.heat.mass n q e.heat.radius (e.heat.shift + i + 17) (a₀ i)⟫_ℝ := + Finset.sum_nonneg (fun i _ => (dyadicBochnerMass_isPositive e.heat.mass n q e.heat.radius_pos.le _).inner_nonneg_right _) + have hnorm : ‖xi‖ ^ 2 ≤ c₀.lower * H := by + have hl := (hcentral q hq xi k).1 + change ‖xi‖ ^ 2 + _ ≤ e.heat.lowerConstant * H at hl + rw [hBeq] at hl + linarith only [hl, hmass0] + have hprincipal : 0 ≤ ∑ i ∈ Finset.range k, ∑ y ∈ s i, weight i y * ⟪z₀ i y, C₀ i y (z₀ i y)⟫_ℝ := + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun y hy => mul_nonneg (hweight i y hy) ((hC₀ i y hy).inner_nonneg_right _))) + have hscale : c₀.lower + 2 * (U + V * epsilon) ≤ Theta := by + have h := mul_le_mul_of_nonneg_left hepsilon1 hV + dsimp only [Theta] + nlinarith only [h, hK₀] + constructor + · have hb := hh.1 + have hc := mul_le_mul_of_nonneg_right hscale (sq_nonneg ‖e.heat.frozenAt q k xi‖) + change _ ≤ Theta * H + nlinarith only [hb, hc, hnorm] + · have h2 : 2 * K₀ ≤ Theta := by dsimp only [Theta]; linarith [c₀.lower_pos] + have h4 : 4 * K₀ ≤ Theta := by dsimp only [Theta]; linarith [c₀.lower_pos] + have h := add_le_add (mul_le_mul_of_nonneg_right h2 (sq_nonneg ‖xi‖)) + (mul_le_mul_of_nonneg_right h4 hprincipal) + exact hh.2.trans (by convert h using 1; ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchIteration.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ee08c57e6b626fd8ae1837d29c514981997ff70 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledPatchIteration.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Coordinates.RegularPatchIteration +import OAI.Geometry.RCD.Coordinates.ScaledSelectedCumulative + +namespace OAI + +/-! # Actual patch iteration with constants preceding its source budget -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem exists_scaled_patch_iteration {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (c : RegularHeatConstants n) : + ∃ Theta tau : ℝ, 1 ≤ Theta ∧ 0 < tau ∧ + ∀ {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta) + (_hmatch : c.Matches e.heat) (_hzeta : 0 ≤ zeta) (_hzeta1 : zeta ≤ 1 / 64) (_hCχ : 0 ≤ Cχ) + (_henlargement : 1 ≤ enlargement) + (_hsmall : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2) + (_hnear : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (_hwide : (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 64 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4) + (psi : EuclideanGevreyCutoff n) (f : RegularPinchingField e.heat Cpin budget) + (_p : RegularPatchSelection e.heat psi.value f), + ∀ epsilon : ℝ, + 0 ≤ epsilon → epsilon ≤ tau → budget ≤ epsilon → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + (∀ i, (patchOverlapBound n (1 / 2) 2 3 : ℝ) * + (4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / 2 ^ (e.heat.shift + i + 15)) ^ 2)) ≤ epsilon) → + ∀ (Ω : Set (Euclidean n)) + (inverse : Euclidean n → {q : X // q ∈ ball base (e.heat.radius / 32)}), + (∀ x ∈ Ω, (inverse x).val ∈ e.heat.patchRegion ∧ e.heat.values (inverse x).val = x) → + ∃ g : PatchIterationGeometry (ι := X) Ω (distanceSourceRadius e.heat.radius e.heat.shift) + Theta epsilon (patchOverlapBound n (1 / 2) 2 3) (3 * Cpin) + ((psi.constant * 536870912) ^ 2 + 4 * (psi.constant * 536870912) ^ 3) + (psi.constant * 536870912), + g.frozen = fun i x => e.heat.frozenAt (inverse x).val i := by + classical + obtain ⟨Theta, tau, hTheta, htau, hcBuild⟩ := exists_scaled_selected_cumulative hX hk c + refine ⟨Theta + 1, tau, by linarith only [hTheta], htau, ?_⟩ + intro a κ B J C A Cχ enlargement zeta eta Cpin budget e hmatch hzeta hzeta1 hCχ + henlargement hsmall hnear hwide psi f p + have hc := hcBuild e hmatch hzeta hzeta1 hCχ henlargement hsmall hnear psi f p + intro epsilon hepsilon heps hbudget hcoef hmass Ω inverse hinverse + have cover (i) := regular_actual_patch_cover hX e hzeta1 psi i + have hscale (i) := iterationRadius_distanceSourceRadius e.heat.radius e.heat.shift i + have hactive (i x y) (hx : x ∈ Ω) (hy : x ∈ tsupport (e.heat.patchCutoff psi.value i y)) : + e.heat.values (inverse x).val ∈ tsupport (e.heat.patchCutoff psi.value i y) := by + rwa [(hinverse x hx).2] + have hfinset (i x) (hx : x ∈ Ω) : + activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := by + simp only [activePatches, RegularPatchSelection.activePatchesAt, (hinverse x hx).2] + refine ⟨{ + patches := e.heat.patchNet + cutoff := e.heat.patchCutoff psi.value + operator := p.operator + center := fun i y => e.heat.values (p.center i y).val + frozen := fun i x => e.heat.frozenAt (inverse x).val i + energy := fun i x => f.energy (inverse x) (e.heat.shift + i) + frozen_mono := fun i x _ xi => e.heat.frozenAt_mono (inverse x).property i xi + cutoff_smooth := fun i y _ x _ m => ((cover i).cutoff_smooth y).of_le (by simp) |>.contDiffAt + active_card := ?_ + energy_nonneg := fun i x _ => (f.floor_pos (e.heat.shift + i)).le.trans (f.energy_floor (inverse x) _) + energy_budget := fun k x _ => (f.shifted_energy_sum_le (inverse x) e.heat.shift k).trans hbudget + operator_positive := fun i y _ x _ _ => e.heat.pinchingMassMatrix_isPositive _ _ _ + cutoff_nonneg := fun i y _ x _ _ => (cover i).cutoff_nonneg y x + cutoff_le_one := fun i y _ x _ _ => (cover i).cutoff_le_one y x + mass_small := ?_ + center_energy := ?_ + cutoff_first := ?_ + cutoff_second := ?_ + cutoff_jets := ?_ + mass_budget := ?_ + principal_budget := ?_ }, rfl⟩ + · intro i x hx + rw [hfinset i x hx] + exact (cover i).active_card (inverse x).val (hinverse x hx).1 + · intro i x hx xi + rw [hfinset i x hx] + exact p.mass_small hzeta hzeta1 hCχ hsmall hwide i (hmass i) (hinverse x hx).1 xi + · intro i y hy x hx ha + have h := p.energy i y hy (inverse x) ⟨(hinverse x hx).1, hactive i x y hx ha⟩ + simpa only [(hinverse x hx).2, hscale, RegularPatchSelection.operator] using h + · intro i y hy x hx ha xi + have h := (regular_cutoff_directional_bounds hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) xi).1 + simpa only [(hinverse x hx).2, hscale] using h + · intro i y hy x hx ha xi + have h := (regular_cutoff_directional_bounds hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) xi).2 + simpa only [(hinverse x hx).2, hscale] using h + · intro i y hy x hx ha m + have h := regular_cutoff_normalized_jet hX e hzeta hzeta1 hnear psi i + (hinverse x hx).1 hy (hactive i x y hx ha) m + simpa only [(hinverse x hx).2, hscale] using h + · intro k x hx xi + have h := (hc epsilon hepsilon heps hcoef (inverse x).val (hinverse x hx).1 xi k).1 + have hs : ∀ i, activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := fun i => hfinset i x hx + have hh := h.trans (mul_le_mul_of_nonneg_right (show Theta ≤ Theta + 1 by linarith) + (sq_nonneg ‖e.heat.frozenAt (inverse x).val k xi‖)) + simpa only [hs] using hh + · intro k x hx xi + have h := (hc epsilon hepsilon heps hcoef (inverse x).val (hinverse x hx).1 xi k).2 + have hs : ∀ i, activePatches (e.heat.patchNet i) (e.heat.patchCutoff psi.value i) x = + p.activePatchesAt (inverse x).val i := fun i => hfinset i x hx + have hp := (sq_nonneg ‖e.heat.frozenAt (inverse x).val k xi‖).trans h + have hnonneg := nonneg_of_mul_nonneg_right hp (lt_of_lt_of_le zero_lt_one hTheta) + have hh := h.trans (mul_le_mul_of_nonneg_right (show Theta ≤ Theta + 1 by linarith) hnonneg) + simpa only [hs, (hinverse x hx).2] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularBilinear.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularBilinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..47da02145c8473592621819b62c796c865bb0aa8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularBilinear.lean @@ -0,0 +1,360 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularNeighborhoodHeat +import OAI.Geometry.RCD.Heat.ScaledHeatControls +import OAI.Geometry.RCD.Sobolev.ScaledFixedCutoffNeighborhood +import OAI.Geometry.RCD.Harmonic.ScaledNeighborhoodGram +import OAI.Geometry.RCD.Harmonic.ScaledHarmonicMass +import OAI.Geometry.RCD.Heat.ScaledHeatBase +import OAI.Geometry.RCD.Sobolev.HarmonicEnergyBound +import OAI.Geometry.RCD.Harmonic.NeighborhoodGramEnvelope +import OAI.Geometry.RCD.Heat.EventualEnvelopeOrder +import OAI.Geometry.RCD.Harmonic.ContinuousAffineImprovement + +namespace OAI + +/-! # The bilinear and cumulative heat estimates for the same regular-point data -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Published normalization, Bochner and kernel inputs produce both the actual +bilinear comparison and the three cumulative estimates with one common family. -/ +theorem scaled_regular_neighborhood_bilinear_heat {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hhessian : LocalPoissonHessianInput hX) (hproduct : LocalPoissonGradientProductInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + : + ∃ d : ℕ, 3 ≤ d ∧ ∀ enlargement : ℝ, 0 ≤ enlargement → + ∃ (J : ℕ) (A B D H : ℝ), 0 < A ∧ 0 < B ∧ 0 < D ∧ 0 < H ∧ + ∀ {radiusCap ζ : ℝ}, 0 < radiusCap → 0 < ζ → + ∃ R : ℝ, ∃ hR : 0 < R, ∃ _hRcap : R ≤ radiusCap, ∃ lambda : ℝ, ∃ hlambda : 0 < lambda, + ∃ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) (e : ℝ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) (Ccut : ℝ) + (χ : GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (3 * R / 8) Ccut) + (L : ℝ≥0), + R ≤ 1 ∧ lambda * R ^ 2 = 8 * ((m + 2 : ℕ) : ℝ) ^ 2 + 2 ∧ + |K| * R ^ 2 ≤ ζ ∧ 0 < e ∧ e ≤ 1 ∧ + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (32 * R) e u v ∧ + (L : ℝ) ^ 2 ≤ 4 * ((m + 2 : ℕ) : ℝ) ^ 2 ∧ + (∀ z, Nonempty (LocalHarmonicEnergy (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) M |K| p (4 * R) L z)) ∧ + ∀ q ∈ ball p (R / 32), + let Q := dyadicHeatGramAt (hausdorff (m + 2) X) hX.quadratic hk + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) χ q hR hlambda + ((∀ v, ‖v‖ ^ 2 ≤ 2 * ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q R) measurableSet_ball v⟫_ℝ) ∧ + (∀ i, J ≤ i → ∀ v, + (1 - 1 / 64 : ℝ) * ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (1 + 1 / 64 : ℝ) * + ⟪v, sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball v⟫_ℝ) ∧ + (∀ i, J ≤ i → ∀ v, + ⟪v, Q (i + 1) v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ)) ∧ + (∀ (xi : Euclidean (m + 2)) (k : ℕ), + let h := ⟪xi, (Q (J + k)).symm xi⟫_ℝ + let mass := ∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerMass M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ + (∑ i ∈ Finset.range k, + ⟪(Q (J + i)).symm xi, dyadicBochnerEnvelope M (m + 2) q R (J + i) ((Q (J + i)).symm xi)⟫_ℝ) ≤ A * h ∧ + ‖xi‖ ^ 2 + mass ≤ B * h ∧ h ≤ D * (‖xi‖ ^ 2 + mass)) ∧ + (∀ i, J ≤ i → ∀ y, dist q y ≤ enlargement * (R / 2 ^ i) → + ∀ b w : Euclidean (m + 2), + ⟪b, (sobolevMeanGram (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) w⟫_ℝ ^ 2 ≤ + H * ⟪b, Q i b⟫_ℝ * ⟪w, dyadicBochnerEnvelope M (m + 2) q R i w⟫_ℝ) ∧ + (∀ r : ℝ, 0 < r → r ≤ R / 16 → + HasNormalizedAffineImprovement hX u q r ((1 / 2 : ℝ) ^ d)) ∧ + ∃ S : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball q (R / 2 ^ i)) measurableSet_ball (S i)) ∧ + (∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic q (R / 2 ^ i) ζ + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (S i)) + (fun x => (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x))) ∧ + ∀ i, IsPointedApproximation q 0 ((R / 2 ^ i) / 128) 4 ζ + (fun x => ((R / 2 ^ i) / 128)⁻¹ • + ((S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (S i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q))) := by + classical + let μ := hausdorff (m + 2) X + let omega := euclideanUnitVolume (m + 2) + have homega : 0 < omega := euclideanUnitVolume_pos _ + let Lambda := 8 * ((m + 2 : ℕ) : ℝ) ^ 2 + 2 + have hLambda : 0 < Lambda := by dsimp only [Lambda]; positivity + let L : ℝ≥0 := ⟨2 * ((m + 2 : ℕ) : ℝ), by positivity⟩ + have hLeq : (L : ℝ) ^ 2 = 4 * ((m + 2 : ℕ) : ℝ) ^ 2 := by + change (2 * ((m + 2 : ℕ) : ℝ)) ^ 2 = _ + ring + obtain ⟨Ccut, Dsource, hCcut, hDsource, hcut, J₀, hcutoffBuild⟩ := + exists_scaled_fixed_cutoff_neighborhood_with_source hX (by omega) + hhessian hproduct hcutoff hk hg homega + have hVlo : 0 < omega / (2 * (2 : ℝ) ^ (m + 2)) := by positivity + have hVhi : 0 < (3 / 2 : ℝ) * omega := by positivity + obtain ⟨d, hd, δ, hδ, hδ1, haffine⟩ := affine_improvement_from_continuous_coordinates + hX (by omega) hharmonic hgradient heuclidean hmetricmeasure + obtain ⟨ε, εmass, C, N, hε, hε1, hεmass, hC, habsorb, hcontrols⟩ := + scaled_heat_controls_at_of_splitting m hX ha hBG hk hg + (L := 4 * ((m + 2 : ℕ) : ℝ) ^ 2) (B := 2) (C := Ccut) (Lambda := Lambda + 1) + (by positivity) (by norm_num) hVlo hVhi (zero_le_one.trans hCcut) (by positivity) + refine ⟨d, hd, ?_⟩ + intro enlargement henlargement + obtain ⟨Cg, hCg, Jg, hgramBuild⟩ := exists_scaled_neighborhood_gram_envelope_bound + μ hX.quadratic hk m hg hdiff homega henlargement + (show 0 ≤ 4 * ((m + 2 : ℕ) : ℝ) ^ 2 by positivity) hDsource hLambda.le + let J := max Jg (max 4 (max N J₀)) + let Dmass := ((Ccut / 8 + 1) * (4 * ((m + 2 : ℕ) : ℝ) ^ 2) * + (3 / 2 * omega) * 5 ^ (m + 2)) + have hDmass : 0 ≤ Dmass := by dsimp only [Dmass]; positivity + obtain ⟨b, hb, hbackgroundBuild⟩ := exists_scaled_mass_background (X := X) + (E := Euclidean (m + 2)) (m + 2) J hDmass + obtain ⟨T, hT, hbaseBuild⟩ := exists_scaled_dyadic_heat_base μ hX.quadratic hk (m + 2) J + hLambda (show 0 ≤ 4 * ((m + 2 : ℕ) : ℝ) ^ 2 by positivity) + obtain ⟨A, B, D, hA, hB, hD, hresult⟩ := + exists_uniform_heat_cumulative_constants (E := Euclidean (m + 2)) hb hT hεmass hC habsorb + let H := Cg ^ 2 * (b * T + 8 * εmass) + have hH : 0 < H := by + have hb0 : 0 < b := lt_of_lt_of_le zero_lt_one hb + dsimp only [H] + positivity + refine ⟨J, A, B, D, H, hA, hB, hD, hH, ?_⟩ + intro radiusCap ζ hRadiusCap hζ + let β := min ε (min δ ζ) + let ρ := min (δ / 4) (ζ / 8) + have hβ : 0 < β := lt_min hε (lt_min hδ hζ) + have hρ : 0 < ρ := lt_min (by positivity) (by positivity) + have hβε : β ≤ ε := min_le_left _ _ + have hβδ : β ≤ δ := (min_le_right _ _).trans (min_le_left _ _) + have hβζ : β ≤ ζ := (min_le_right _ _).trans (min_le_right _ _) + have hρδ : 4 * ρ ≤ δ := by have hh := min_le_left (δ / 4) (ζ / 8); dsimp only [ρ]; linarith + have hρζ : 8 * ρ ≤ ζ := by have hh := min_le_right (δ / 4) (ζ / 8); dsimp only [ρ]; linarith + obtain ⟨R, e, hR, hRcap, hRsmall, hscale, hcurv, he, he1, L₀, u, v, M, hL₀, hu, hG, hvol, hfamily, hmetric⟩ := + regular_uniform_dyadic_data_with_cap (ρ := ρ) (β := β) (m + 1) hX (by omega) ha hcompact hregular hvolume hmeasured hBG + hdensity hinitial htrans hsplit hrigidity hbochner hRadiusCap hρ hβ + have hcurvδ : |K| * (16 * R) ^ 2 ≤ δ := hcurv.trans hβδ + have hcurvζ : |K| * R ^ 2 ≤ ζ := by + have hh := mul_le_mul_of_nonneg_left + (show R ^ 2 ≤ (16 * R) ^ 2 by nlinarith only [sq_nonneg R]) (abs_nonneg K) + exact hh.trans (hcurv.trans hβζ) + have hcurv : |K| * (16 * R) ^ 2 ≤ ε := hcurv.trans hβε + have hR1 : R ≤ 1 := by linarith only [hRsmall] + have hscale' : a * (3 * R) ≤ 1 := by + have hh := mul_le_mul_of_nonneg_left (show 3 * R ≤ 48 * R by linarith only [hR]) ha + linarith only [hscale, hh] + have hcurv' : |K| * R ^ 2 ≤ ε := by + have hh := mul_le_mul_of_nonneg_left + (show R ^ 2 ≤ (16 * R) ^ 2 by nlinarith only [sq_nonneg R]) (abs_nonneg K) + exact hh.trans hcurv + let lambda := Lambda / R ^ 2 + have hlambda : 0 < lambda := div_pos hLambda (sq_pos_of_pos hR) + have hlambdaScale : lambda * R ^ 2 = Lambda := by dsimp only [lambda]; field_simp + have hlambdaAbs : |lambda| * R ^ 2 ≤ Lambda := by rw [abs_of_pos hlambda, hlambdaScale] + have hlambdaSum : (lambda + (R ^ 2)⁻¹) * R ^ 2 ≤ Lambda + 1 := by + rw [add_mul, hlambdaScale, inv_mul_cancel₀ (ne_of_gt (sq_pos_of_pos hR))] + have hL : (L : ℝ) ^ 2 ≤ 4 * ((m + 2 : ℕ) : ℝ) ^ 2 := hLeq.le + have hcurv1 : |K| * (16 * R) ^ 2 ≤ 1 := hcurv.trans hε1 + have hcurvR : |K| * R ^ 2 ≤ 1 := hcurv'.trans hε1 + have hreg : 2 * |K| * (L : ℝ) ^ 2 + (R ^ 2)⁻¹ ≤ lambda := by + apply (le_div_iff₀ (sq_pos_of_pos hR)).mpr + rw [add_mul, mul_assoc, inv_mul_cancel₀ (ne_of_gt (sq_pos_of_pos hR)), hLeq] + have hh := mul_le_mul_of_nonneg_left hcurvR + (show 0 ≤ 8 * ((m + 2 : ℕ) : ℝ) ^ 2 by positivity) + dsimp only [Lambda] + nlinarith only [hh] + let G := fun z => (Classical.choice (hG z)).enlargeBound μ hX.quadratic (hL₀.trans_eq hLeq.symm) + have hgradient32 : ∀ z : Euclidean (m + 2), ∀ᵐ x ∂μ.restrict (ball p (32 * R)), + localGamma μ hX.quadratic (sobolevColumnMap μ hX.quadratic u z) + (sobolevColumnMap μ hX.quadratic u z) x ≤ (L : ℝ) ^ 2 * ‖z‖ ^ 2 := by + intro z + have hc : (((m + 2 : ℕ) : ℝ) * (1 + e)) ^ 2 ≤ (L : ℝ) ^ 2 := by + rw [hLeq] + have he' : (1 + e) ^ 2 ≤ 4 := by nlinarith only [he, he1] + nlinarith only [mul_le_mul_of_nonneg_left he' (sq_nonneg (((m + 2 : ℕ) : ℝ)))] + filter_upwards [hu.directional_gradient μ hX.quadratic z] with x hx + exact hx.trans (mul_le_mul_of_nonneg_right hc (sq_nonneg ‖z‖)) + obtain ⟨χ, hsourceL1, hχ⟩ := hcutoffBuild R hR hR1 hcurv1 p L u M hL + hu.harmonic hgradient32 hvol G + have hgram := hgramBuild R hR hR1 (sobolevColumnMap μ hX.quadratic u) M |K| p L G Ccut χ + hL (by simpa only [abs_abs] using hcurvR) hsourceL1 lambda hlambdaAbs hvol + have hKR2 : -1 ≤ K * (2 * R) ^ 2 := by + have hh := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (2 * R)) + have hh' := mul_nonneg (abs_nonneg K) (sq_nonneg R) + nlinarith only [hh, hh', hcurv1] + obtain ⟨ψ⟩ := hcut p (2 * R) (by positivity) hKR2 + have hv5 : μ.real (closedBall p (4 * R)) ≤ (3 / 2 * omega) * (5 * R) ^ (m + 2) := by + apply (measureReal_mono (closedBall_subset_ball (show 4 * R < 5 * R by linarith only [hR])) + (hX.finiteOnBounded _ isBounded_ball).ne).trans + have hv := (abs_le.mp (hvol p (by simp; positivity) (5 * R) (by positivity) (by linarith only [hR]))).2 + have hd : 0 < omega * (5 * R) ^ (m + 2) := by positivity + have hratio : μ.real (ball p (5 * R)) / (omega * (5 * R) ^ (m + 2)) ≤ 3 / 2 := by linarith only [hv] + have hh := (div_le_iff₀ hd).mp hratio + nlinarith only [hh] + have hlocal : ∀ z, ⟪z, M.massOperator (ball p (2 * R)) z⟫_ℝ ≤ + Dmass * (R ^ (m + 2) / R ^ 2) * ‖z‖ ^ 2 := + harmonic_scaled_local_mass_bound μ hX.quadratic hR (abs_nonneg K) + (zero_le_one.trans hCcut) (by positivity) hcurvR _ M L G ψ hL hv5 + have hbackground := hbackgroundBuild R hR p M hlocal + have hbase := hbaseBuild R hR _ M |K| (4 * R) (3 * R / 8) Ccut p L G χ (by linarith only [hR]) hL + refine ⟨R, hR, hRcap, lambda, hlambda, u, v, e, M, Ccut, χ, L, + hR1, hlambdaScale, hcurvζ, he, he1, hu, hL, (fun z => ⟨G z⟩), ?_⟩ + intro q hq + have hqp : dist q p < R / 32 := hq + have hqR : q ∈ ball p R := by change dist q p < R; linarith only [hqp, hR] + obtain ⟨S, hexact, hfirst, hS0, hfirstv, hmetricS⟩ := hfamily q hqR + have hfirst' (i : ℕ) : ∃ w : X → Euclidean (m + 2), + FirstOrderSplittingOn μ hX.quadratic q (R / 2 ^ i) ε + (transformedColumn μ hX.quadratic u (S i)) w := by + obtain ⟨w, hw⟩ := hfirst i + exact ⟨w, hw.mono_error μ hX.quadratic hβ.le hβε⟩ + have hsub : ball q (2 * (2 * R)) ⊆ ball p (2 * (4 * R)) := by + intro x hx + have hxq : dist x q < 2 * (2 * R) := hx + change dist x p < 2 * (4 * R) + have hh := dist_triangle x q p + linarith only [hh, hxq, hqp, hR] + let Gq := fun z => (G z).restrict μ hX.quadratic hsub + have hvolq : ∀ y, dist q y ≤ 2 * R → ∀ s, 0 < s → s ≤ R → + |μ.real (ball y s) / (omega * s ^ (m + 2)) - 1| ≤ 1 / 2 := by + intro y hy s hs hsR + apply hvol y ?_ s hs (by linarith only [hsR, hR]) + have hh := dist_triangle p q y + rw [dist_comm p q] at hh + linarith only [hh, hqp, hy, hR] + have hgradient : ∀ z : Euclidean (m + 2), ∀ᵐ x ∂μ.restrict (ball q R), + localGamma μ hX.quadratic (sobolevColumnMap μ hX.quadratic u z) + (sobolevColumnMap μ hX.quadratic u z) x ≤ + (4 * ((m + 2 : ℕ) : ℝ) ^ 2) * ‖z‖ ^ 2 := by + intro z + filter_upwards [LocalHarmonicEnergy.gamma_bound_on_smaller_ball μ hX.quadratic Gq + (show R ≤ 2 * (2 * R) by linarith only [hR]) z] with x hx + exact hx.trans (mul_le_mul_of_nonneg_right hL (sq_nonneg _)) + have hc := hcontrols R hR hR1 hscale' lambda (R ^ 2)⁻¹ hlambda (by positivity) hlambdaSum u M S q ε L Gq hε.le le_rfl hcurv' hreg hS0 + hexact hfirst' (hcut q) (dyadic_heat_volumes_of_common_regime μ (m + 2) q hR homega hvolq) + hgradient p (4 * R) (3 * R / 8) Ccut G χ (by positivity) (by linarith only [hR]) + (hχ q hq).1 (hχ q hq).2.1 J₀ (hχ q hq).2.2 J (le_max_right _ _) + let Q := dyadicHeatGramAt μ hX.quadratic hk (sobolevColumnMap μ hX.quadratic u) χ q hR hlambda + have horder (i : ℕ) (hi : J ≤ i) (v : Euclidean (m + 2)) : + ⟪v, Q (i + 1) v⟫_ℝ ≤ ⟪v, Q i v⟫_ℝ ∧ + ⟪v, Q i v⟫_ℝ ≤ (9 / 8 : ℝ) * ⟪v, Q (i + 1) v⟫_ℝ := by + have hd := (hc.1.decrement i hi v).1 + simp only [sub_apply, inner_sub_right] at hd + change 0 ≤ ⟪v, Q i v⟫_ℝ - ⟪v, Q (i + 1) v⟫_ℝ at hd + exact ⟨sub_nonneg.mp hd, hc.1.step i hi v⟩ + refine ⟨⟨?_, hc.2, horder⟩, ?_, ?_, ?_, S, hexact, ?_, ?_⟩ + · intro v + have h := norm_apply_sq_le_of_norm_sq_le + (S 0 : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)) hS0 ((S 0).symm v) + have he := meanGram_energy_of_exact_normalization μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball q R) measurableSet_ball (S 0) + (by simpa only [pow_zero, div_one] using hexact 0) v + change ‖v‖ ^ 2 ≤ 2 * ⟪v, sobolevMeanGram μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball q R) measurableSet_ball v⟫_ℝ + rw [he] + simpa only [ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] using h + · apply hresult Q (dyadicBochnerMass M (m + 2) q R) (dyadicBochnerEnvelope M (m + 2) q R) J + (dyadicHeatGramAt_isPositive μ hX.quadratic hk _ χ q hR hlambda) + (dyadicBochnerMass_isPositive M (m + 2) q hR.le) hc.1.step hc.1.decrement hc.1.small + (hbackground q hqR) + · exact fun z => (hbase q z).1 + · exact fun z => (hbase q z).2 + + · intro i hi y hy v w + have hpos (j : ℕ) : (Q j : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).IsPositive := + dyadicHeatGramAt_isPositive μ hX.quadratic hk _ χ q hR hlambda j + have hcurrent (z : Euclidean (m + 2)) : + ⟪z, dyadicBochnerEnvelope M (m + 2) q R i z⟫_ℝ ≤ + (b * T + 8 * εmass) * ⟪z, Q i z⟫_ℝ := by + have h := hc.1.envelope_le_current hpos hεmass (zero_le_one.trans hb) hT.le + (fun z => (hbase q z).2) (hbackground q hqR) (i - J) z + simpa only [Nat.add_sub_of_le hi] using h + have hsource (z : Euclidean (m + 2)) : + |⟪z, (sobolevMeanGram μ hX.quadratic (sobolevColumnMap μ hX.quadratic u) + (ball y (R / 2 ^ i)) measurableSet_ball - (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2))) z⟫_ℝ| ≤ + Cg * ⟪z, dyadicBochnerEnvelope M (m + 2) q R i z⟫_ℝ := by + simpa only [Q, dyadicHeatGramAt_coe] using + hgram i ((le_max_left _ _).trans hi) q hq y hy z + have hsym := (sobolevMeanGram_isPositive μ hX.quadratic + (sobolevColumnMap μ hX.quadratic u) (ball y (R / 2 ^ i)) measurableSet_ball).isSymmetric.sub + (hpos i).isSymmetric + exact bilinear_heat_comparison_of_envelope (Q i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)) + (dyadicBochnerEnvelope M (m + 2) q R i) _ + (dyadicBochnerEnvelope_isPositive M (m + 2) q hR.le i) hsym hsource hcurrent v w + + · intro r hr hrR + have hsubr : ball q r ⊆ ball p (32 * R) := by + intro x hx + have hh := dist_triangle x q p + have hxq : dist x q < r := hx + change dist x p < 32 * R + linarith only [hh, hxq, hqp, hrR, hR] + have hsub4 : ball q (4 * r) ⊆ ball p (32 * R) := by + intro x hx + have hh := dist_triangle x q p + have hxq : dist x q < 4 * r := hx + change dist x p < 32 * R + linarith only [hh, hxq, hqp, hrR, hR] + have hcurvr : -δ ≤ K * r ^ 2 := by + have hrsq : r ^ 2 ≤ (16 * R) ^ 2 := + (sq_le_sq₀ hr.le (by positivity)).mpr (by linarith only [hrR, hR]) + have hh := mul_le_mul_of_nonneg_left hrsq (abs_nonneg K) + have hk := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + linarith only [hh, hk, hcurvδ] + obtain ⟨N, hN⟩ := hmetric q hqR r hr hrR + have hN' : IsPointedApproximation q 0 r 2 δ (fun x => + (N : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v x) - + (N : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint (v q)) := by + exact hN.mono_error hρδ + have hη : SobolevSpace.toLp μ hX.quadratic χ.sobolev =ᵐ[μ.restrict (ball q r)] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae χ.representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + rw [hx] + apply χ.one x + have hh := dist_triangle x q p + have hxq : dist x q < r := hxr + change dist x p < 3 * R / 8 + linarith only [hh, hxq, hqp, hrR, hR] + exact haffine q r hr hcurvr u v + (fun i => ae_restrict_of_ae_restrict_of_subset hsubr (hu.representative i)) + (hu.continuous.mono hsub4) N χ.sobolev hη hN' + + · intro i + exact (hfirstv i).mono_error μ hX.quadratic hβ.le hβζ + · intro i + exact (hmetricS i).mono_error hρζ + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularData.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularData.lean new file mode 100644 index 0000000000000000000000000000000000000000..55c6d5baf4fd04975f567c81bee1c33a1e28b2a0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularData.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularBilinearData +import OAI.Geometry.RCD.Coordinates.ScaledRegularBilinear + +namespace OAI + +/-! # Fixed heat constants for arbitrarily small regular neighborhoods -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The constants retained before choosing the pinching tolerance. -/ +structure RegularHeatConstants (n : ℕ) where + degree : ℕ + degree_ge_three : 3 ≤ degree + shift : ℕ + envelope : ℝ + lower : ℝ + upper : ℝ + comparison : ℝ + envelope_pos : 0 < envelope + lower_pos : 0 < lower + upper_pos : 0 < upper + comparison_pos : 0 < comparison + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Exact heat parameters, dimensionless regularizer, and curvature smallness +for the normalized harmonic data. -/ +def RegularHeatConstants.Matches {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [(hausdorff n X).Regular] {p : X} {ker : ℝ → X → X → ℝ} + {hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker} + {enlargement zeta : ℝ} (c : RegularHeatConstants n) + (d : RegularBilinearData hX p hk enlargement zeta) : Prop := + d.degree = c.degree ∧ d.shift = c.shift ∧ d.envelopeConstant = c.envelope ∧ + d.lowerConstant = c.lower ∧ d.upperConstant = c.upper ∧ + d.comparisonConstant = c.comparison ∧ d.lambda * d.radius ^ 2 = 8 * (n : ℝ) ^ 2 + 2 ∧ + |K| * d.radius ^ 2 ≤ zeta + +/-- The published inputs build one such fixed set of constants and then +supply the actual harmonic data for any positive tolerance and radius cap. -/ +theorem exists_scaled_regular_bilinear_data {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hhessian : LocalPoissonHessianInput hX) (hproduct : LocalPoissonGradientProductInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) + : + ∀ enlargement : ℝ, 0 ≤ enlargement → ∃ c : RegularHeatConstants (m + 2), + ∀ {radiusCap zeta : ℝ}, 0 < radiusCap → 0 < zeta → + ∃ d : RegularBilinearData hX p hk enlargement zeta, + d.radius ≤ radiusCap ∧ c.Matches d := by + obtain ⟨degree, hdegree, hconstruct⟩ := scaled_regular_neighborhood_bilinear_heat + m hX ha hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hhessian hproduct hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + intro enlargement henlargement + obtain ⟨J, A, B, D, H, hA, hB, hD, hH, hbuild⟩ := hconstruct enlargement henlargement + let c : RegularHeatConstants (m + 2) := { + degree := degree, degree_ge_three := hdegree, shift := J + envelope := A, lower := B, upper := D, comparison := H + envelope_pos := hA, lower_pos := hB, upper_pos := hD, comparison_pos := hH } + refine ⟨c, ?_⟩ + intro radiusCap zeta hcap hzeta + obtain ⟨R, hR, hRcap, lambda, hlambda, u, V, e, M, Ccut, chi, L, + hR1, hlambdaScale, hcurv, he, he1, hu, hL, henergy, hlocal⟩ := hbuild hcap hzeta + exact ⟨{ + radius := R, radius_pos := hR, radius_le_one := hR1, lambda := lambda, lambda_pos := hlambda + coordinates := u, values := V, initialError := e, initialError_pos := he, initialError_le_one := he1 + mass := M, energyBound := L, energyBound_sq := hL + energy := fun z => Classical.choice (henergy z) + cutoffConstant := Ccut, cutoff := chi, shift := J, degree := degree, degree_ge_three := hdegree + envelopeConstant := A, lowerConstant := B, upperConstant := D, comparisonConstant := H + envelopeConstant_pos := hA, lowerConstant_pos := hB, upperConstant_pos := hD, comparisonConstant_pos := hH + splitting := hu + rootLower := fun q hq => (hlocal q hq).1.1 + heatMeanComparison := fun q hq => (hlocal q hq).1.2.1 + heatOrder := fun q hq => (hlocal q hq).1.2.2 + localData := fun q hq => (hlocal q hq).2 }, hRcap, rfl, rfl, rfl, rfl, rfl, rfl, hlambdaScale, hcurv⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularizer.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularizer.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd0c76b4d81edc5d5849e5cc45f3450afe0127b6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledRegularizer.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.RCD.Heat.HeatGramRebase + +namespace OAI + +/-! # A regularizer threshold fixed before the physical radius -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- A bound on `|lambda| R^2`, rather than on `lambda`, is enough to +choose the scale threshold before the radius or regularizer is chosen. -/ +theorem exists_scaled_regularizer_threshold {B Lambda η : ℝ} + (hB : 0 ≤ B) (hη : 0 < η) : + ∃ N : ℕ, ∀ (R lambda : ℝ), |lambda| * R ^ 2 ≤ Lambda → + ∀ k, N ≤ k → ∀ r, 0 ≤ r → (2 : ℝ) ^ k * r ≤ R → + ∀ T : E →L[ℝ] E, ‖T‖ ^ 2 ≤ B → + |lambda * r ^ 2| * ‖T‖ ^ 2 * (2 : ℝ) ^ k < η := by + have hdecay : Tendsto (fun k : ℕ => (Lambda * B) * (1 / 2 : ℝ) ^ k) + atTop (𝓝 0) := by + simpa only [mul_zero] using + (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 2) + (by norm_num : (1 / 2 : ℝ) < 1)).const_mul (Lambda * B) + obtain ⟨N, hN⟩ := eventually_atTop.mp (hdecay.eventually_lt_const hη) + refine ⟨N, ?_⟩ + intro R lambda hlambda k hk r hr hroot T hT + have h1 := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hT (abs_nonneg (lambda * r ^ 2))) + (by positivity : 0 ≤ (2 : ℝ) ^ k) + have h2 := mul_le_mul_of_nonneg_right (dyadic_regularizer_le_geometric + (lambda := lambda) hr k hroot) hB + have h3 := mul_le_mul_of_nonneg_right hlambda (mul_nonneg hB + (pow_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2) k)) + have h4 : |lambda * r ^ 2| * B * (2 : ℝ) ^ k ≤ + (Lambda * B) * (1 / 2 : ℝ) ^ k := by + nlinarith only [h2, h3] + exact (h1.trans h4).trans_lt (hN k hk) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledSelectedCumulative.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledSelectedCumulative.lean new file mode 100644 index 0000000000000000000000000000000000000000..1675152e65536ea6c4d9f7b320d324dd3a21ac35 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledSelectedCumulative.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.RegularSelectedMass +import OAI.Geometry.RCD.Coordinates.ScaledPatchCumulative + +namespace OAI + +/-! # Fixed cumulative bounds for the actual selected patches -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem exists_scaled_selected_cumulative {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + {base : X} {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (c : RegularHeatConstants n) : + ∃ Theta tau : ℝ, 1 ≤ Theta ∧ 0 < tau ∧ + ∀ {a κ B J C A Cχ enlargement zeta eta Cpin budget : ℝ} + (e : RegularProjectionEnvironment hX base hk a κ B J C A Cχ enlargement zeta eta), + c.Matches e.heat → 0 ≤ zeta → zeta ≤ 1 / 64 → 0 ≤ Cχ → 1 ≤ enlargement → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 8 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 2 → + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ n)⁻¹) * zeta) ≤ 1 / 4 → + ∀ (psi : EuclideanGevreyCutoff n) (f : RegularPinchingField e.heat Cpin budget) + (p : RegularPatchSelection e.heat psi.value f), + ∀ epsilon : ℝ, 0 ≤ epsilon → epsilon ≤ tau → + (∀ i, 4 * pinchingMassUnitFactor n * regularSmallMassCoefficient n Cχ * + (zeta + |K| * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) ^ 2) ≤ epsilon) → + ∀ q, q ∈ e.heat.patchRegion → ∀ (xi : Euclidean n) (k : ℕ), + (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, ⟪xi, patchMass (p.activePatchesAt q i) (p.operator i) xi⟫_ℝ ≤ + Theta * ‖e.heat.frozenAt q k xi‖ ^ 2) ∧ + (‖e.heat.frozenAt q k xi‖ ^ 2 ≤ Theta * (‖xi‖ ^ 2 + ∑ i ∈ Finset.range k, + ⟪xi, patchPrincipal (p.activePatchesAt q i) (fun y => e.heat.patchCutoff psi.value i y (e.heat.values q)) + (p.operator i) xi⟫_ℝ)) := by + classical + obtain ⟨Theta, tau, hTheta, htau, hcBuild⟩ := exists_scaled_patch_cumulative_comparison + hX hk c (patchOverlapBound n (1 / 2) 2 3) + refine ⟨Theta, tau, hTheta, htau, ?_⟩ + intro a κ B J C A Cχ enlargement zeta eta Cpin budget e hmatch hzeta hzeta1 hCχ + henlargement hsmall hnear psi f p + have hc := hcBuild e hmatch hzeta (by linarith only [hzeta1]) hCχ hsmall hnear + intro epsilon hepsilon heps hcoef q hq xi k + have cover (i) := regular_actual_patch_cover hX e hzeta1 psi i + have hroom (i y) (hy : y ∈ p.activePatchesAt q i) : dist (p.center i y).val q ≤ + (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) / 12 := + p.near i y (Finset.mem_filter.mp hy).1 q ⟨hq, (Finset.mem_filter.mp hy).2⟩ + have hbig (i y) (hy : y ∈ p.activePatchesAt q i) : dist q (p.center i y).val ≤ + enlargement * (e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15)) := by + have hr : 0 < e.heat.radius / (2 : ℝ) ^ (e.heat.shift + i + 15) := + div_pos e.heat.radius_pos (by positivity) + have hh := hroom i y hy + rw [dist_comm] at hh + have hm := mul_le_mul_of_nonneg_right henlargement hr.le + linarith + have h := hc epsilon hepsilon heps hcoef (p.activePatchesAt q) p.center + (fun i y => e.heat.patchCutoff psi.value i y (e.heat.values q)) + (fun i => (cover i).active_card q hq) q (e.heat.patch_region_subset hq) + hroom hbig (fun i y _ => (cover i).cutoff_nonneg y _) + (fun i => by + obtain ⟨y, hy, _, hw, ha, _⟩ := (cover i).weight_one_cover q hq + exact ⟨y, Finset.mem_filter.mpr ⟨hy, ha⟩, hw⟩) xi k + simpa only [RegularPatchSelection.operator, patchMass, patchPrincipal, sum_apply, inner_sum, smul_apply, + inner_smul_right] using h + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledSeparatedSources.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledSeparatedSources.lean new file mode 100644 index 0000000000000000000000000000000000000000..af800e3d37eb7885638dc8f4cfc6b58cdbddbac2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledSeparatedSources.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.SeparatedSourceBounds + +namespace OAI + +/-! # Separation estimates with constants fixed before the physical radius -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- Rescaling the scalar Gaussian estimate retains its exact inverse-volume power. -/ +theorem exists_scaled_separated_gaussian_bound (n : ℕ) {c D : ℝ} + (hc : 0 < c) (hD : 0 < D) : + ∃ C : ℝ, 0 < C ∧ ∀ R s d : ℝ, 0 < R → 0 < s → c * R ≤ d → + R ^ n * (s⁻¹ ^ n * Real.exp (-d ^ 2 / (D * s ^ 2))) ≤ C := by + obtain ⟨C, hC, hb⟩ := exists_separated_gaussian_bound n hc hD + refine ⟨C, hC, ?_⟩ + intro R s d hR hs hsep + have h := hb (s / R) (d / R) (div_pos hs hR) ((le_div_iff₀ hR).mpr hsep) + have he : -(d / R) ^ 2 / (D * (s / R) ^ 2) = -d ^ 2 / (D * s ^ 2) := by + field_simp [hR.ne'] + rw [he] at h + have hp : (s / R)⁻¹ ^ n = R ^ n * s⁻¹ ^ n := by + rw [inv_div, div_pow] + simp only [div_eq_mul_inv, inv_pow] + rw [hp] at h + simpa only [mul_assoc] using h + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The short-time source coefficient scales as inverse volume. -/ +theorem exists_scaled_short_source_bound (hg : HasCoordinateHeatBounds μ ker) + (n : ℕ) {A V c : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hc : 0 < c) : + ∃ C : ℝ, 0 < C ∧ ∀ (R r t : ℝ) (x q : X) (S : Set X) (g : X → ℝ), + 0 < R → 0 < r → r ≤ 1 → 0 < t → t ≤ r ^ 2 → + μ (ball q r) ≠ ∞ → V * r ^ n ≤ μ.real (ball q r) → dist x q ≤ A * r → + (∀ z ∈ S, c * R ≤ dist x z) → + (∀ z ∈ S, V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + Integrable g μ → (∀ᵐ z ∂μ, z ∉ S → g z = 0) → + |∫ z, kernelAverage μ ker t (ball q r) z * g z ∂μ| ≤ + (C / R ^ n) * ∫ z, |g z| ∂μ := by + classical + obtain ⟨C₀, hC₀, hb⟩ := exists_cutoff_short_average_bound μ hQ hk hg n hA hV + obtain ⟨H, hH, hh⟩ := exists_scaled_separated_gaussian_bound n hc (by norm_num : (0 : ℝ) < 36) + refine ⟨C₀ * H, mul_pos hC₀ hH, ?_⟩ + intro R r t x q S g hR hr hr1 ht htr hfinite hvol hcenter hsep hsource hgint hgzero + let χ : X → ℝ := S.indicator (fun _ => 1) + have hχ : ∀ z, 0 ≤ χ z ∧ χ z ≤ 1 := by + intro z + by_cases hz : z ∈ S <;> simp [χ, hz] + apply abs_integral_mul_le_of_bound_on μ hgint (by positivity) hgzero + intro z hz + have hb' := hb χ hχ r t x q hr hr1 ht htr hfinite hvol hcenter + (fun y hy => hsource y (by by_contra hn; simp [χ, hn] at hy)) z + have hχz : χ z = 1 := by simp [χ, hz] + rw [hχz, one_mul] at hb' + rw [abs_of_nonneg (kernelAverage_bounds μ hQ hk ht (ball q r) z).1] + apply hb'.trans + apply (le_div_iff₀ (pow_pos hR n)).mpr + have hm := mul_le_mul_of_nonneg_left (hh R r (dist x z) hR hr (hsep z hz)) hC₀.le + nlinarith only [hm] + +include hk in +/-- The long-time source difference has one extra inverse-radius factor. -/ +theorem exists_scaled_long_source_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) + (n : ℕ) {A V c : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hc : 0 < c) : + ∃ C : ℝ, 0 < C ∧ ∀ (R r t : ℝ) (x q : X) (S : Set X) (g : X → ℝ), + 0 < R → 0 < r → 0 < t → t ≤ 1 → r ^ 2 ≤ t → + μ (ball q r) ≠ ∞ → 0 < μ.real (ball q r) → dist x q ≤ A * r → + (∀ z ∈ S, c * R ≤ dist x z) → + (∀ z ∈ S, V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + Integrable g μ → (∀ᵐ z ∂μ, z ∉ S → g z = 0) → + |∫ z, (kernelAverage μ ker t (ball q r) z - ker t x z) * g z ∂μ| ≤ + (C * r / R ^ (n + 1)) * ∫ z, |g z| ∂μ := by + obtain ⟨C₀, D, hC₀, hD, hb⟩ := exists_long_average_difference_bound μ hQ hk hg hdiff n hA hV + obtain ⟨H, hH, hh⟩ := exists_scaled_separated_gaussian_bound (n + 1) hc hD + refine ⟨C₀ * H, mul_pos hC₀ hH, ?_⟩ + intro R r t x q S g hR hr ht ht1 hrt hfinite hvol hcenter hsep hsource hgint hgzero + apply abs_integral_mul_le_of_bound_on μ hgint (by positivity) hgzero + intro z hz + have h := hb r t x q z hr ht ht1 hrt hfinite hvol hcenter (hsource z hz) + have hsmall := hh R (Real.sqrt t) (dist x z) hR (Real.sqrt_pos.mpr ht) (hsep z hz) + rw [Real.sq_sqrt ht.le] at hsmall + apply h.trans + apply (le_div_iff₀ (pow_pos hR (n + 1))).mpr + have hm := mul_le_mul_of_nonneg_left hsmall (mul_pos hC₀ hr).le + nlinarith only [hm] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScaledSharpNeighborhood.lean b/lean/OAI/Geometry/RCD/Coordinates/ScaledSharpNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c76d71637011fabb70bcfe9b6c54fe0ec09bdc4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScaledSharpNeighborhood.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.ScaledRadialEnvironment +import OAI.Geometry.RCD.Coordinates.RegularPairProjection +import OAI.Geometry.RCD.Sobolev.SharpNeighborhoodParameters + +namespace OAI + +/-! # A regular neighborhood carrying the actual sharp projection estimate -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- All sources and coordinates are constructed from the cited inputs. +The positive source has any requested square budget and controls the actual +normalized two-center projection at every admissible center and scale. -/ +theorem exists_scaled_sharp_neighborhood {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ Cg D Ca P : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ 0 < P ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ 1 zeta eta, + c.Matches e.heat ∧ + 128 * (radialFitQualitativeConstant (m + 2) Cχ * zeta + eta) ≤ budget ∧ + ∃ data : ∀ q, q ∈ ball p (e.heat.radius / 32) → + RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q, + ∀ first (hfirst : first ∈ ball p (e.heat.radius / 32)) + center (hcenter : center ∈ ball p (e.heat.radius / 32)), + let d1 := data first hfirst + let d2 := data center hcenter + let sigma := twoCenterProjectionSource + (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) + Summable (fun i => sigma i ^ 2) ∧ (∑' i, sigma i ^ 2) ≤ budget ∧ + ∀ i, dist center first ≤ distanceSourceRadius e.heat.radius i / 4 → + regularPairProjectionSize hX e d1 d2 i ≤ P * sigma i := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, Cg, D, Ca, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hconstruct⟩ := + exists_scaled_radial_environment m hX ha hκ hK hcompact hregular hvolume hmeasured hBG + hdensity hdistance hsobolev hpoisson hhessian hproduct hmean hinitial htrans hsplit hrigidity + hbochner hcutoff hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + let G := ((m + 2 : ℕ) : ℝ) ^ 2 * ((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) + have hG : 0 ≤ G := by dsimp only [G]; positivity + let epsilon := 1 / (2 * (G + 1)) + have hepsilon : 0 < epsilon := by dsimp only [epsilon]; positivity + have hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * + (((5 / 3 : ℝ) * (16384 : ℝ) ^ (m + 2)) * epsilon) ≤ 1 / 2 := by + have hh : epsilon * (2 * (G + 1)) ≤ 1 := (le_div_iff₀ (by positivity)).mp (le_refl epsilon) + dsimp only [G] at hh + nlinarith + obtain ⟨P, tau, hP, htau, hsharp⟩ := regular_sharp_projection_actual_sources m hX + hgradient hmean hmetricmeasure haction hproduct hpoincare hpoissonCompact + hκ hK hB.le hJ.le (zero_le_one.trans hCχ) hA.le hepsilon.le hsmall + obtain ⟨delta, hdelta, hbound⟩ := hsharp (tau / 2) (by positivity) (by linarith) + refine ⟨c, B, J, C, A, Cχ, Cg, D, Ca, P, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hP, ?_⟩ + intro budget hbudget + let c := radialNormalizationRestrictionConstant (m + 2) + let g := ((m + 2 : ℕ) : ℝ) ^ 2 * normalizationVolumeRatio (m + 1) + let a₀ := radialFitQualitativeConstant (m + 2) Cχ + have hc : 0 ≤ c := zero_le_one.trans (radialNormalizationRestrictionConstant_ge_one (m + 2)) + have hg : 0 ≤ g := by dsimp only [g, normalizationVolumeRatio]; positivity + have ha₀ : 0 ≤ a₀ := radialFitQualitativeConstant_nonneg _ (zero_le_one.trans hCχ) + obtain ⟨zeta, eta, cap, hzeta, heta, hcap, hzeps, hzdelta, hzc, hzg, hetatau, hbudgetSmall, hcapK⟩ := + sharp_neighborhood_parameters (K := K) hepsilon hdelta htau hc hg ha₀ hbudget + have hnormalize : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * zeta) ≤ 1 / 64 := by + simpa only [g, mul_assoc] using hzg + obtain ⟨e, hecap, hmatch, hdata⟩ := hconstruct zeta eta cap hzeta hzc hnormalize heta hcap + let data := fun q hq => Classical.choice (hdata q hq) + refine ⟨zeta, eta, hzeta, heta, e, hmatch, hbudgetSmall, data, ?_⟩ + intro first hfirst center hcenter + let d1 := data first hfirst + let d2 := data center hcenter + have hqual : 0 < a₀ := by + have hN : 0 < c := zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + dsimp only [a₀, radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * c * _ + positivity + obtain ⟨_hsource, hsum, hsourceBudget⟩ := actual_two_center_projection_budget d1.source d2.source + hκ (mul_pos hqual hzeta) d1.summable d2.summable + refine ⟨hsum, ?_, ?_⟩ + · have hb : 2 * (a₀ * zeta) + + (∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source i) + + (∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source i) ≤ + 2 * (a₀ * zeta) + 2 * eta := by linarith [d1.budget, d2.budget] + have hh := hsourceBudget.trans (mul_le_mul_of_nonneg_left hb (by norm_num : (0 : ℝ) ≤ 64)) + exact hh.trans (by nlinarith [hbudgetSmall]) + · intro i hroom + have hs : 0 < distanceSourceRadius e.heat.radius i := distanceSourceRadius_pos e.heat.radius_pos i + have hsR : distanceSourceRadius e.heat.radius i ≤ e.heat.radius := by + have hh := distanceSourceRadius_outer_le e.heat.radius_pos.le i + linarith + have hsCap := hsR.trans hecap + have hsq : distanceSourceRadius e.heat.radius i ^ 2 ≤ cap ^ 2 := by nlinarith + have habs := mul_le_mul_of_nonneg_left hsq (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg (distanceSourceRadius e.heat.radius i)) + have hcurv : -delta / 32 ≤ K * distanceSourceRadius e.heat.radius i ^ 2 := by nlinarith + have hh := hbound ha hzeta hzeps hzdelta heta.le hetatau hBG e hfirst hcenter d1 d2 i hroom hcurv + exact hh.2.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScalingDualPotential.lean b/lean/OAI/Geometry/RCD/Coordinates/ScalingDualPotential.lean new file mode 100644 index 0000000000000000000000000000000000000000..143c5b358b1c505243e286ab7cd49b09a878192a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScalingDualPotential.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Coordinates.ScalingNormalizationLimit + +namespace OAI + +/-! # Dual potentials from exact compact scaling normalization + +The support of the second marginal is retained explicitly. Each row has +zero maximal limiting slack on that support. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MetricSpace Y] [CompactSpace Y] + [SecondCountableTopology Y] [MeasurableSpace Y] [BorelSpace Y] + (ν : Measure Y) [IsProbabilityMeasure ν] + +theorem scaling_dual_potential (K : ℕ → C(X × Y, ℝ)) + (F : ℕ → C(X, ℝ)) (G : ℕ → C(Y, ℝ)) (ε : ℕ → ℝ) (x₀ : X) (y₀ : Y) + (hε : ∀ k, 0 < ε k) (hε0 : Tendsto ε atTop (𝓝 0)) + (hK : ∀ k z, 0 < K k z) (hF : ∀ k x, 0 < F k x) (hG : ∀ k y, 0 < G k y) + (hrow : ∀ k x, F k x*(∫ y, K k (x,y)*G k y ∂ν)=1) + (q : X × Y → ℝ) (f : X → ℝ) (g : Y → ℝ) + (hq : Continuous q) (hg : Continuous g) + (hkernel : TendstoUniformly (fun k z => ε k*Real.log (K k z)) q atTop) + (hleft : TendstoUniformly (fun k x => ε k*(Real.log (F k x)-Real.log (F k x₀))) f atTop) + (hright : TendstoUniformly (fun k y => ε k*(Real.log (G k y)-Real.log (G k y₀))) g atTop) : + ∃ c : ℝ, + Tendsto (fun k => ε k*(Real.log (F k x₀)+Real.log (G k y₀))) atTop (𝓝 c) ∧ + (∀ x y, y ∈ ν.support → f x+q (x,y)+g y+c ≤ 0) ∧ + ∀ x, ∃ y ∈ ν.support, f x+q (x,y)+g y+c=0 := by + let row := fun x k => (⟨fun y => K k (x,y), + (K k).continuous.comp (continuous_const.prodMk continuous_id)⟩ : C(Y,ℝ)) + have hlim (x : X) := scaling_normalization_limit ν (row x) G (fun k => F k x) ε y₀ + (fun k => hF k x) hε hε0 (fun k y => hK k (x,y)) hG (fun k => hrow k x) + (fun y => q (x,y)) g (hq.comp (continuous_const.prodMk continuous_id)) hg + (hkernel.comp (fun y => (x,y))) hright + obtain ⟨y,hy,_,hc⟩ := hlim x₀ + let c := -(q (x₀,y)+g y) + refine ⟨c,hc,?_,?_⟩ + · intro x z hz + obtain ⟨w,hw,hm,hl⟩ := hlim x + have he : f x+c = -(q (x,w)+g w) := by + apply tendsto_nhds_unique _ hl + apply ((hleft.tendsto_at x).add hc).congr' + exact Eventually.of_forall fun k => by ring + have hh := hm z hz + linarith + · intro x + obtain ⟨w,hw,_,hl⟩ := hlim x + have he : f x+c = -(q (x,w)+g w) := by + apply tendsto_nhds_unique _ hl + apply ((hleft.tendsto_at x).add hc).congr' + exact Eventually.of_forall fun k => by ring + exact ⟨w,hw,by linarith⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ScalingNormalizationLimit.lean b/lean/OAI/Geometry/RCD/Coordinates/ScalingNormalizationLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffb19f6219eeda77764a6c8bc69b8b76d4c118fe --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ScalingNormalizationLimit.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Heat.CompactLaplaceLimit +import OAI.Geometry.RCD.Heat.ScalingLogPartition +import OAI.Geometry.RCD.Sobolev.UniformRealAlgebra + +namespace OAI + +/-! # The scalar normalization of a positive compact kernel scaling pair + +The exact row identity and the proved compact Laplace limit determine the +otherwise free sum of the two logarithmic gauges. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {Y : Type*} [MetricSpace Y] [CompactSpace Y] [SecondCountableTopology Y] + [MeasurableSpace Y] [BorelSpace Y] (ν : Measure Y) [IsProbabilityMeasure ν] + +theorem scaling_normalization_limit (K G : ℕ → C(Y, ℝ)) (A ε : ℕ → ℝ) (y₀ : Y) + (hA : ∀ k, 0 < A k) (hε : ∀ k, 0 < ε k) (hε0 : Tendsto ε atTop (𝓝 0)) + (hK : ∀ k y, 0 < K k y) (hG : ∀ k y, 0 < G k y) + (hrow : ∀ k, A k*(∫ y, K k y*G k y ∂ν)=1) + (q g : Y → ℝ) (hq : Continuous q) (hg : Continuous g) + (hkernel : TendstoUniformly (fun k y => ε k*Real.log (K k y)) q atTop) + (hweight : TendstoUniformly (fun k y => ε k*(Real.log (G k y)-Real.log (G k y₀))) g atTop) : + ∃ y ∈ ν.support, (∀ z ∈ ν.support, q z+g z ≤ q y+g y) ∧ + Tendsto (fun k => ε k*(Real.log (A k)+Real.log (G k y₀))) atTop (𝓝 (-(q y+g y))) := by + let F := fun k y => ε k*Real.log (K k y)+ε k*(Real.log (G k y)-Real.log (G k y₀)) + have hF (k : ℕ) : Continuous (F k) := by + exact (((K k).continuous.log (fun y => (hK k y).ne')).const_mul (ε k)).add + ((((G k).continuous.log (fun y => (hG k y).ne')).sub continuous_const).const_mul (ε k)) + have hlim : TendstoUniformly F (fun y => q y+g y) atTop := uniform_real_add hkernel hweight + obtain ⟨y,hy,hmax,hl⟩ := compact_laplace_limit ν F (fun y => q y+g y) hF (hq.add hg) hlim ε hε hε0 + refine ⟨y,hy,hmax,?_⟩ + apply hl.neg.congr' + exact Eventually.of_forall fun k => by + have he := scaling_log_partition ν (K k) (G k) y₀ (hA k) (hε k) (hK k) (hG k) (hrow k) + change -(ε k*Real.log (∫ y, Real.exp (F k y/ε k) ∂ν)) = _ + dsimp only [F] + rw [he] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SevenGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/SevenGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..43e98a583f581811da60337d2230e165a2915147 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SevenGeometricInputs.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Coordinates.GeometricInputCoordinates +import OAI.Geometry.RCD.Harmonic.HarmonicMomentConstruction + +namespace OAI + +/-! # Coordinates under harmonic compactness and local geometric estimates -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_seven_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalPoissonHarmonicCompactnessInput hX → + LocalInitialSplittingInput hX → LocalTransformationInput hX → + LocalFlatSplittingInput hX → LocalVolumeRigidityInput hX → + LocalMeasuredCoordinateInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hvol hc hi ht hs hr hm + exact regular_coordinates_of_geometric_inputs hn hX hp hvol hc hi ht hs hr + (hX.harmonicMomentCompactnessInput hn) hm + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmJets.lean b/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..4270bea3896451ff913f313632d13ed3a5302059 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmJets.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Heat.LocalSmoothLogarithmC3 + +namespace OAI + +/-! # The finite scalar jets of a shifted logarithm + +The scalar extension is used only on the nonnegative bounded value range. +Its value at zero vanishes; its first derivative there is epsilon inverse. +-/ + +open Set Filter +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem shifted_logarithm_jets {ε A : ℝ} (hε : 0<ε) (hA : 0≤A) : + ∃ (F F₁ F₂ : ℝ → ℝ) (C D J B E : ℝ≥0), + LipschitzWith C F ∧ LipschitzWith D F₁ ∧ LipschitzWith J F₂ ∧ F 0=0 ∧ + (∀ a, HasDerivAt F (F₁ a) a) ∧ (∀ a, HasDerivAt F₁ (F₂ a) a) ∧ + (∀ a, |F₁ a|≤B) ∧ (∀ a, |F₂ a|≤E) ∧ + ∀ a∈Icc 0 A, F a=Real.log (ε+a)-Real.log ε ∧ + F₁ a=(ε+a)⁻¹ ∧ F₂ a=-((ε+a)^2)⁻¹ := by + obtain ⟨φ,ψ,χ,C,D,J,B,E,hφ,hψ,hχ,hφ0,hψ0,hdφ,hdψ,hB,hE,he⟩ := + exists_local_smooth_log_C3 hε (show ε≤ε+A by linarith) + let F := fun a => φ (ε+a)-φ ε + let F₁ := fun a => ψ (ε+a) + let F₂ := fun a => χ (ε+a) + have ht : LipschitzWith 1 (fun a : ℝ => ε+a) := by + apply LipschitzWith.of_dist_le_mul + intro x y + simp only [Real.dist_eq,NNReal.coe_one,one_mul,add_sub_add_left_eq_sub,le_refl] + have hF : LipschitzWith C F := by + simpa only [F,Function.comp_def,mul_one,add_zero] using (hφ.comp ht).sub (LipschitzWith.const (φ ε)) + have hF₁ : LipschitzWith D F₁ := by simpa only [F₁,Function.comp_def,mul_one] using hψ.comp ht + have hF₂ : LipschitzWith J F₂ := by simpa only [F₂,Function.comp_def,mul_one] using hχ.comp ht + refine ⟨F,F₁,F₂,C,D,J,B,E,hF,hF₁,hF₂,?_,?_,?_,fun a => hB _,fun a => hE _,?_⟩ + · simp only [F,add_zero,sub_self] + · intro a + simpa only [Function.comp_def,id_eq,mul_one] using + ((hdφ (ε+a)).comp a ((hasDerivAt_id a).const_add ε)).sub_const (φ ε) + · intro a + simpa only [Function.comp_def,id_eq,mul_one] using + (hdψ (ε+a)).comp a ((hasDerivAt_id a).const_add ε) + · intro a ha + have h1 := he (ε+a) ⟨by linarith [ha.1],by linarith [ha.2]⟩ + have h0 := (he ε ⟨le_rfl,by linarith⟩).1 + exact ⟨by dsimp only [F]; rw [h1.1,h0],h1.2.1,h1.2.2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmRegularData.lean b/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmRegularData.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e72947b491ff5a96923dddc70982e3db95d2c25 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ShiftedLogarithmRegularData.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.RCD.Coordinates.ShiftedLogarithmJets +import OAI.Geometry.RCD.Sobolev.WeakLaplacianAffineChain +import OAI.Geometry.RCD.Sobolev.BoundedLipschitzMultiplier + +namespace OAI + +/-! # Sobolev source and Gram data of the actual shifted logarithm + +The source is formed from bounded Lipschitz multipliers of the original +Sobolev source and Gram function. It need not be bounded globally. +-/ + +open Set Filter MeasureTheory +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem shifted_logarithm_regular_data (p : X) (u d G : SobolevSpace μ hQ) + (hd : IsWeakLaplacian μ hQ u (SobolevSpace.toLp μ hQ d)) + (hG : SobolevSpace.toLp μ hQ G =ᵐ[μ] localGamma μ hQ u u) + (v : X → ℝ) {L : ℝ≥0} (hv : LipschitzWith L v) + (hu : SobolevSpace.toLp μ hQ u =ᵐ[μ] v) + {ε : ℝ} (hε : 0<ε) (A : ℝ≥0) (hval : ∀ x, v x∈Icc 0 (A:ℝ)) : + ∃ (ℓ S H : SobolevSpace μ hQ) (B C : ℝ≥0), + IsWeakLaplacian μ hQ ℓ (SobolevSpace.toLp μ hQ S) ∧ + (SobolevSpace.toLp μ hQ H =ᵐ[μ] localGamma μ hQ ℓ ℓ) ∧ + (SobolevSpace.toLp μ hQ ℓ =ᵐ[μ] fun x => Real.log (ε+v x)-Real.log ε) ∧ + LipschitzWith C (fun x => Real.log (ε+v x)-Real.log ε) ∧ + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ ℓ x|≤B) ∧ + (SobolevSpace.toLp μ hQ S =ᵐ[μ] fun x => + SobolevSpace.toLp μ hQ d x/(ε+v x)-localGamma μ hQ u u x/(ε+v x)^2) := by + obtain ⟨F,F₁,F₂,C,D,J,B,E,hF,hF₁,hF₂,hF0,hdF,hdF₁,hB,hE,he⟩ := + shifted_logarithm_jets hε A.coe_nonneg + let θ := fun x => F₁ (v x) + let ω := fun x => -F₂ (v x) + have hθ : LipschitzWith (D*L) θ := hF₁.comp hv + have hω : LipschitzWith (J*L) ω := (hF₂.comp hv).neg + have hθb (x : X) : |θ x|≤B := hB _ + have hωb (x : X) : |ω x|≤E := by simpa only [ω,abs_neg] using hE (v x) + have hθ0 (x : X) : 0≤θ x := by + rw [show θ x=(ε+v x)⁻¹ from (he _ (hval x)).2.1] + exact inv_nonneg.mpr (add_nonneg hε.le (hval x).1) + have hω0 (x : X) : 0≤ω x := by + rw [show ω x=((ε+v x)^2)⁻¹ by dsimp only [ω]; rw [(he _ (hval x)).2.2,neg_neg]] + positivity + let T := d.boundedLipschitzMul μ hQ p hθ hθb hθ0 + let H := G.boundedLipschitzMul μ hQ p hω hωb hω0 + let S := T-H + let ℓ := SobolevSpace.comp μ hQ hF hF0 u + have hT := SobolevSpace.boundedLipschitzMul_coe μ hQ d p hθ hθb hθ0 + have hH := SobolevSpace.boundedLipschitzMul_coe μ hQ G p hω hωb hω0 + change SobolevSpace.toLp μ hQ T =ᵐ[μ] fun x => θ x*SobolevSpace.toLp μ hQ d x at hT + change SobolevSpace.toLp μ hQ H =ᵐ[μ] fun x => ω x*SobolevSpace.toLp μ hQ G x at hH + have hSr : SobolevSpace.toLp μ hQ S =ᵐ[μ] fun x => + F₁ (SobolevSpace.toLp μ hQ u x)*SobolevSpace.toLp μ hQ d x+ + F₂ (SobolevSpace.toLp μ hQ u x)*localGamma μ hQ u u x := by + filter_upwards [Lp.coeFn_sub (SobolevSpace.toLp μ hQ T) (SobolevSpace.toLp μ hQ H), + hT,hH,hu,hG] with x hs ht hh hux hg + change (SobolevSpace.toLp μ hQ T-SobolevSpace.toLp μ hQ H) x = _ + simp only [hs,Pi.sub_apply,ht,hh,hux,hg,θ,ω] + ring + have hℓr : SobolevSpace.toLp μ hQ ℓ =ᵐ[μ] fun x => Real.log (ε+v x)-Real.log ε := by + filter_upwards [SobolevSpace.comp_coe μ hQ hF hF0 u,hu] with x hx hux + exact hx.trans (by rw [Function.comp_apply,hux]; exact (he _ (hval x)).1) + have hHr : SobolevSpace.toLp μ hQ H =ᵐ[μ] localGamma μ hQ ℓ ℓ := by + filter_upwards [hH,hG,hu,localGamma_comp_C1 μ hQ u ℓ hF hF0 hF₁.continuous hdF B hB, + localGamma_comp_C1_right μ hQ u u hF hF0 hF₁.continuous hdF B hB] with x hh hg hux hleft hright + change localGamma μ hQ ℓ ℓ x = _ at hleft + change localGamma μ hQ u ℓ x = _ at hright + rw [hleft,hright,hux,(he _ (hval x)).2.1] + rw [hh,hg,show ω x=((ε+v x)^2)⁻¹ by dsimp only [ω]; rw [(he _ (hval x)).2.2,neg_neg]] + rw [←inv_pow] + ring + have hlog : (fun x => Real.log (ε+v x)-Real.log ε) = F ∘ v := by + funext x + exact (he _ (hval x)).1.symm + refine ⟨ℓ,S,H,C*A,C*L, + weakLaplacian_comp_C2_affine μ hQ u (SobolevSpace.toLp μ hQ d) + (SobolevSpace.toLp μ hQ S) hd hF hF0 hF₁ hF₂.continuous hdF hdF₁ B E hB hE hSr, + hHr,hℓr,?_,?_,?_⟩ + · rw [hlog] + exact hF.comp hv + · filter_upwards [hℓr] with x hx + rw [hx,←(he _ (hval x)).1] + have hb := hF.dist_le_mul (v x) 0 + simp only [hF0,Real.dist_eq,sub_zero,abs_of_nonneg (hval x).1] at hb + exact hb.trans (mul_le_mul_of_nonneg_left (hval x).2 C.coe_nonneg) + · filter_upwards [hSr,hu] with x hx hux + rw [hx,hux,(he _ (hval x)).2.1,(he _ (hval x)).2.2] + simp only [div_eq_mul_inv] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SixGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/SixGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..758837607a1a2ad7fea9969268cf1349782f635f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SixGeometricInputs.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.RCD.Coordinates.SevenGeometricInputs +import OAI.Geometry.RCD.Sobolev.PoissonHarmonicCompactnessConstruction + +namespace OAI + +/-! # Coordinates under splitting and local volume estimates -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_six_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalInitialSplittingInput hX → LocalTransformationInput hX → + LocalFlatSplittingInput hX → LocalVolumeRigidityInput hX → + LocalMeasuredCoordinateInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hvol hi ht hs hr hm + exact regular_coordinates_of_seven_geometric_inputs hn hX hp hvol + hX.poissonHarmonicCompactnessInput hi ht hs hr hm + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePathEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePathEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b2ddfd02fad4f778e7dbca7e234278d19d91ee4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePathEnergy.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Coordinates.SobolevFramePlanVariation +import OAI.Geometry.RCD.Transport.CompressedSegmentIntegral + +namespace OAI + +/-! # An integrable envelope for the variation of the actual Sobolev coefficients -/ + +open Set Filter MeasureTheory Finset +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +def framePathEnergy (μ : Measure X) (Q : QuadraticCheegerEnergy μ) {n : ℕ} + (G : Fin n → SobolevSpace μ Q) (γ : C(Time,X)) : ℝ := + ∑ i, ∫ t in Icc (0:ℝ) 1, |localGamma μ Q (G i) (G i) (geodesicExtension γ t)| + +theorem framePathEnergy_nonneg (μ : Measure X) (Q : QuadraticCheegerEnergy μ) {n : ℕ} + (G : Fin n → SobolevSpace μ Q) (γ : C(Time,X)) : 0≤framePathEnergy μ Q G γ := + sum_nonneg (fun _ _ => integral_nonneg (fun _ => abs_nonneg _)) + +theorem compressed_frame_path_energy (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (G : Fin n → SobolevSpace μ Q) (π : Measure C(Time,X)) [IsProbabilityMeasure π] + {C : ℝ≥0∞} (hC : C≠∞) (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • μ) + {Ω : Set X} (hstay : ∀ t : Time, ∀ᵐ x ∂π.map (fun γ => γ t), x∈Ω) : + Integrable (framePathEnergy μ Q G) π ∧ + (∫ γ, framePathEnergy μ Q G γ ∂π)≤ + C.toReal*∑ i, ∫ x in Ω, localGamma μ Q (G i) (G i) x ∂μ := by + have hh (i : Fin n) := compressed_segment_integral μ π hC hcomp hstay + (localGamma_memL1 μ Q (G i) (G i)).abs.integrableOn + (Eventually.of_forall (fun _ => abs_nonneg _)) + refine ⟨integrable_finsetSum _ (fun i _ => (hh i).1),?_⟩ + rw [show (∫ γ, framePathEnergy μ Q G γ ∂π)= + ∑ i, ∫ γ, (∫ t in Icc (0:ℝ) 1, |localGamma μ Q (G i) (G i) (geodesicExtension γ t)|) ∂π from + integral_finsetSum _ (fun i _ => (hh i).1),mul_sum] + apply sum_le_sum + intro i _ + have he : (∫ x in Ω, |localGamma μ Q (G i) (G i) x| ∂μ)= + ∫ x in Ω, localGamma μ Q (G i) (G i) x ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (localGamma_self μ Q (G i))] with x hx + rw [hx,abs_of_nonneg (sq_nonneg _)] + simpa only [he] using (hh i).2.2 + +theorem sobolev_frame_variation_envelope (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (G : Fin n → SobolevSpace μ Q) + (π : Measure C(Time,X)) [IsFiniteMeasure π] + (hgeo : ∀ᵐ γ ∂π, IsGeodesic γ) {C : ℝ≥0∞} (hC : C≠∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π) : + ∀ᵐ γ ∂π, ∃ b : Fin n → ℝ → ℝ, + (∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) ∧ + (∀ i, b i 0=SobolevSpace.toLp μ Q (G i) (γ 0)) ∧ + (∀ i, b i 1=SobolevSpace.toLp μ Q (G i) (γ 1)) ∧ + (∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => SobolevSpace.toLp μ Q (G i) (geodesicExtension γ t)) ∧ + (∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)^2≤ + (n:ℝ)*(dist (γ 0) (γ 1))^2*framePathEnergy μ Q G γ := by + filter_upwards [sobolev_frame_plan_variation μ Q G π hgeo hC hcomp hD] with γ hγ + obtain ⟨b,hb,h0,h1,he,hvar⟩ := hγ + refine ⟨b,hb,h0,h1,he,hvar.trans ?_⟩ + apply mul_le_mul_of_nonneg_left _ (mul_nonneg (Nat.cast_nonneg n) (sq_nonneg _)) + exact sum_le_sum (fun i _ => (le_abs_self _).trans abs_integral_le_integral_abs) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePlanVariation.lean b/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePlanVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a6345c3b0f3b38c1e1287a6c43ddb5addf58793 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SobolevFramePlanVariation.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Transport.SobolevPlanVariation +import OAI.Geometry.RCD.Transport.TestPlanLocalProperty + +namespace OAI + +/-! # One absolutely continuous coefficient family along almost every path -/ + +open Set Filter MeasureTheory Finset +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem sobolev_frame_plan_variation (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (G : Fin n → SobolevSpace μ Q) + (π : Measure C(Time,X)) [IsFiniteMeasure π] + (hgeo : ∀ᵐ γ ∂π, IsGeodesic γ) {C : ℝ≥0∞} (hC : C≠∞) + (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • μ) + (hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π) : + ∀ᵐ γ ∂π, ∃ b : Fin n → ℝ → ℝ, + (∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) ∧ + (∀ i, b i 0=SobolevSpace.toLp μ Q (G i) (γ 0)) ∧ + (∀ i, b i 1=SobolevSpace.toLp μ Q (G i) (γ 1)) ∧ + (∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => SobolevSpace.toLp μ Q (G i) (geodesicExtension γ t)) ∧ + (∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)^2≤ + (n:ℝ)*(dist (γ 0) (γ 1))^2* + ∑ i, ∫ t in Icc (0:ℝ) 1, localGamma μ Q (G i) (G i) (geodesicExtension γ t) := by + have hv (i : Fin n) := (SobolevSpace.minimalSlope_isRelaxed μ Q (G i)).testPlan_ae_sobolev_variation + μ π hgeo hC hcomp hD + have he (i : Fin n) := testPlan_eval_property_on μ π hcomp MeasurableSet.univ + (Eventually.of_forall fun _ _ => mem_univ _) (show ∀ᵐ x ∂μ.restrict univ, + localGamma μ Q (G i) (G i) x=(SobolevSpace.minimalSlope μ Q (G i) x)^2 from by + filter_upwards [ae_restrict_of_ae (localGamma_self μ Q (G i))] with x hx + exact hx) + filter_upwards [ae_all_iff.mpr hv,ae_all_iff.mpr he] with γ hv he + choose b hb h0 h1 heq hvar using hv + refine ⟨b,hb,h0,h1,heq,?_⟩ + have hsum : (∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)^2≤ + (n:ℝ)*∑ i, (∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)^2 := by + have hh := sum_mul_sq_le_sq_mul_sq (univ : Finset (Fin n)) (fun _ => (1:ℝ)) + (fun i => ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|) + simpa only [one_mul,one_pow,sum_const,card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] using hh + apply hsum.trans + calc + _ ≤ (n:ℝ)*∑ i, (dist (γ 0) (γ 1))^2* + ∫ t in Icc (0:ℝ) 1, localGamma μ Q (G i) (G i) (geodesicExtension γ t) := by + apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg n) + apply sum_le_sum + intro i _ + have hh : (∫ t in Icc (0:ℝ) 1, localGamma μ Q (G i) (G i) (geodesicExtension γ t))= + ∫ t in Icc (0:ℝ) 1, (SobolevSpace.minimalSlope μ Q (G i) (geodesicExtension γ t))^2 := + integral_congr_ae (he i) + rw [hh] + exact hvar i + _ = _ := by rw [← mul_sum]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SplittingApproximation.lean b/lean/OAI/Geometry/RCD/Coordinates/SplittingApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..465d4bdbee5f2980487a0e04774066a36afb4f86 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SplittingApproximation.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.RCD.Metric.ProductFactorDiameter +import OAI.Geometry.RCD.Harmonic.NearbyMeanGrams + +namespace OAI + +/-! +# First-order splitting maps and the published almost-splitting input + +`LocalAlmostSplittingInput` is a specialization of Huang--Huang (2024), +Theorem 2.9(2), with the first-order criterion following Definition 2.7. +The first-order data are imposed on B_(16r); the conclusion concerns B_(2r), +leaving the factor two needed for the criterion. Threshold losses include +metric rescaling and the conversion from GH isometries to pointed maps. + +The consequence proved here eliminates the residual product factor when +there is also a Euclidean approximation. No bi-Lipschitz or injectivity +conclusion is included in the published premise. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +universe u + +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The first-order conditions of Huang--Huang Definition 2.7, on actual +Sobolev components with continuous pointwise representatives. The Hessian +condition is obtained on a smaller ball by the published following remark. -/ +structure FirstOrderSplittingOn {n : ℕ} (p : X) (r ε : ℝ) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) : Prop where + representative : ∀ i, SobolevSpace.toLp μ hQ (u i) =ᵐ[μ.restrict (ball p r)] + fun x => v x i + continuous : ContinuousOn v (ball p r) + harmonic : ∀ i, IsSobolevHarmonicOn μ hQ (ball p r) (u i) + gradient : ∀ i, ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (u i) (u i) x ≤ (1 + ε) ^ 2 + gram : ∀ i j, (μ.real (ball p r))⁻¹ * ∫ x in ball p r, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ ε + +/-- The precise product-map consequence used from Huang--Huang Theorem +2.9(2) and its first-order criterion, including the residual product factor. -/ +def LocalAlmostSplittingInput {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) : Prop := + 2 ≤ n → ∀ τ : ℝ, 0 < τ → ∃ ε : ℝ, 0 < ε ∧ + ∀ (p : X) (r : ℝ), 0 < r → -ε ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16 * r) ε u v → + ∃ (Z : Type u) (dZ : MetricSpace Z), letI := dZ + ∃ (z₀ : Z) (w : X → Z), + IsPointedApproximation p (WithLp.toLp 2 (0, z₀)) r 2 τ + (fun x => WithLp.toLp 2 (r⁻¹ • (v x - v p), w x)) + +/-- Only this Euclidean-flat coordinate consequence of the product theorem +is used in the chart construction. It is also proved directly from the +noncollapsed measured-coordinate input in `FlatSplittingApproximation`. -/ +def LocalFlatSplittingInput {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) : Prop := + 2 ≤ n → ∀ ρ : ℝ, 0 < ρ → ∃ τ ε : ℝ, 0 < τ ∧ 0 < ε ∧ + ∀ (p : X) (r : ℝ), 0 < r → -ε ≤ K*r^2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*r) ε u v → + (∃ f : X → Euclidean n, IsPointedApproximation p 0 r 2 τ f) → + IsPointedApproximation p 0 r (1/2) ρ (fun x => r⁻¹ • (v x-v p)) + +omit [MeasurableSpace X] [BorelSpace X] [ProperSpace X] in +/-- Increasing the error preserves a pointed approximation, including +its smaller target-density requirement. -/ +theorem IsPointedApproximation.mono_error {Y : Type*} [MetricSpace Y] + {p : X} {q : Y} {r R ε δ : ℝ} {f : X → Y} + (hf : IsPointedApproximation p q r R ε f) (hεδ : ε ≤ δ) : + IsPointedApproximation p q r R δ f := by + refine ⟨hf.1.trans hεδ, fun x y hx hy => (hf.2.1 x y hx hy).trans hεδ, ?_⟩ + intro y hy + obtain ⟨x, hx, hxy⟩ := hf.2.2 y (by linarith) + exact ⟨x, hx, hxy.trans hεδ⟩ + +omit [ProperSpace X] in +/-- Almost splitting plus metric flatness controls the actual harmonic +coordinates. The tolerances are uniform in the center, scale and map. -/ +theorem splitting_coordinates_approximate {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hpublished : LocalAlmostSplittingInput hX) + {ρ : ℝ} (hρ : 0 < ρ) : + ∃ τ ε : ℝ, 0 < τ ∧ 0 < ε ∧ + ∀ (p : X) (r : ℝ), 0 < r → -ε ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16 * r) ε u v → + (∃ f : X → Euclidean n, IsPointedApproximation p 0 r 2 τ f) → + IsPointedApproximation p 0 r (1 / 2) ρ (fun x => r⁻¹ • (v x - v p)) := by + let C : ℝ := 1 + 80 * ((n + 1 : ℕ) : ℝ) ^ 2 + have hC : 0 < C := by dsimp [C]; positivity + let τ := min (1 / 4 : ℝ) (ρ / C) + have hτ : 0 < τ := lt_min (by norm_num) (div_pos hρ hC) + obtain ⟨ε, hε, happly⟩ := hpublished hn τ hτ + refine ⟨τ, ε, hτ, hε, ?_⟩ + intro p r hr hcurv u v hsplit hflat + obtain ⟨f, hf⟩ := hflat + obtain ⟨Z, dZ, z₀, w, hw⟩ := happly p r hr hcurv u v hsplit + let : MetricSpace Z := dZ + have hcoord := product_projection_approximation n hr hτ.le hτ.le + (min_le_left _ _) f (fun x => WithLp.toLp 2 (r⁻¹ • (v x - v p), w x)) hf hw + apply hcoord.mono_error + have hτC : τ * C ≤ ρ := (le_div_iff₀ hC).mp (min_le_right _ _) + dsimp [C] at hτC + nlinarith + +omit [ProperSpace X] in +theorem LocalAlmostSplittingInput.flatSplittingInput {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} (h : LocalAlmostSplittingInput hX) : + LocalFlatSplittingInput hX := by + intro hn ρ hρ + exact splitting_coordinates_approximate hX hn h hρ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SplittingCoordinateLipschitz.lean b/lean/OAI/Geometry/RCD/Coordinates/SplittingCoordinateLipschitz.lean new file mode 100644 index 0000000000000000000000000000000000000000..839d31d821424650b997d7fac1f04b792b46008a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SplittingCoordinateLipschitz.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Sobolev.ColumnGradientValueBound + +namespace OAI + +/-! # Local Lipschitz control of the actual splitting coordinates -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.splitting_coordinate_lipschitz {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {p : X} {R ε : ℝ} + (hR : 0 < R) (he : 0 ≤ ε) + {u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic} {v : X → Euclidean n} + (hsplit : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (8*R) ε u v) : + LipschitzOnWith ⟨(n:ℝ)*(1+ε),by positivity⟩ v (ball p R) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + let z := v x-v y + let L : ℝ≥0 := ⟨(n:ℝ)*(1+ε)*‖z‖,by positivity⟩ + have hg : ∀ᵐ w ∂(hausdorff n X).restrict (ball p (8*R)), + localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u z) + (sobolevColumnMap (hausdorff n X) hX.quadratic u z) w ≤ (L:ℝ)^2 := by + have hL : (L:ℝ)=(n:ℝ)*(1+ε)*‖z‖ := rfl + rw [hL,mul_pow] + exact hsplit.directional_gradient (hausdorff n X) hX.quadratic z + have hl := hX.continuous_local_gradient_lipschitz hn + (sobolevColumnMap (hausdorff n X) hX.quadratic u z) (fun w => ⟪v w,z⟫_ℝ) p hR L + (hsplit.continuous.inner continuousOn_const) + (sobolevColumnMap_representative (hausdorff n X) hX.quadratic u _ v hsplit.representative z) hg + have hh := hl.dist_le_mul x hx y hy + rw [Real.dist_eq,← inner_sub_left] at hh + change |⟪z,z⟫_ℝ| ≤ ((n:ℝ)*(1+ε)*‖z‖)*dist x y at hh + rw [real_inner_self_eq_norm_sq,abs_of_nonneg (sq_nonneg _)] at hh + change ‖z‖ ≤ (n:ℝ)*(1+ε)*dist x y + by_cases hz : ‖z‖=0 + · rw [hz] + positivity + · have hzpos : 0 < ‖z‖ := lt_of_le_of_ne (norm_nonneg _) (Ne.symm hz) + nlinarith only [hh,hzpos] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/SymmetricDomination.lean b/lean/OAI/Geometry/RCD/Coordinates/SymmetricDomination.lean new file mode 100644 index 0000000000000000000000000000000000000000..713a6c9cd5bdf39eaf10be17e6fb2ca8354948f4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/SymmetricDomination.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Coordinates.PositiveForms + +namespace OAI + +/-! # Bilinear estimates from domination of symmetric quadratic forms -/ + +open scoped InnerProductSpace + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Domination of the absolute quadratic form gives Cauchy--Schwarz with +the dominating form in both directions. The dominated operator may be signed. -/ +theorem symmetric_domination_cauchy_schwarz (D P : E →L[ℝ] E) + (hD : D.IsSymmetric) (hdom : ∀ v, |⟪v, D v⟫_ℝ| ≤ ⟪v, P v⟫_ℝ) + (v w : E) : + ⟪v, D w⟫_ℝ ^ 2 ≤ ⟪v, P v⟫_ℝ * ⟪w, P w⟫_ℝ := by + have hsym : ⟪w, D v⟫_ℝ = ⟪v, D w⟫_ℝ := by + rw [real_inner_comm] + exact hD v w + have hpoly : ∀ t : ℝ, + 0 ≤ ⟪w, P w⟫_ℝ * (t * t) + (-2 * ⟪v, D w⟫_ℝ) * t + ⟪v, P v⟫_ℝ := by + intro t + have hp := (abs_le.mp (hdom (v + t • w))).2 + have hm := (abs_le.mp (hdom (v - t • w))).1 + simp only [map_add, map_sub, map_smul, inner_add_left, inner_sub_left, + inner_add_right, inner_sub_right, inner_smul_left, inner_smul_right, + conj_trivial, hsym] at hp hm + nlinarith only [hp, hm] + have hd := discrim_le_zero hpoly + unfold discrim at hd + nlinarith only [hd] + +/-- A small upper bound for the dominating form in one direction gives +the asymmetric bound used by the heat/mean source comparison. -/ +theorem symmetric_domination_mixed (D P Q : E →L[ℝ] E) + (hD : D.IsSymmetric) (hP : P.IsPositive) + (hdom : ∀ v, |⟪v, D v⟫_ℝ| ≤ ⟪v, P v⟫_ℝ) + {ε : ℝ} (hsmall : ∀ v, ⟪v, P v⟫_ℝ ≤ ε * ⟪v, Q v⟫_ℝ) (v w : E) : + ⟪v, D w⟫_ℝ ^ 2 ≤ ε * ⟪v, P v⟫_ℝ * ⟪w, Q w⟫_ℝ := by + calc + _ ≤ ⟪v, P v⟫_ℝ * ⟪w, P w⟫_ℝ := symmetric_domination_cauchy_schwarz D P hD hdom v w + _ ≤ _ := by + have h := mul_le_mul_of_nonneg_left (hsmall w) (hP.inner_nonneg_right v) + nlinarith only [h] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TaylorControl.lean b/lean/OAI/Geometry/RCD/Coordinates/TaylorControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..c778436058a56a813dc9e82a69c785bd8c994cbc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TaylorControl.lean @@ -0,0 +1,136 @@ +import Mathlib.Analysis.Calculus.MeanValue +import Mathlib.Tactic + +namespace OAI + +/-! +# Taylor control on a coordinate-value segment + +The final pair estimate only differentiates maps in Euclidean coordinate +value space. This lemma isolates that calculation, with an explicit second +derivative and no differentiability assumption on the underlying metric. +The bound has constant one; the final scale can absorb this harmless choice. +-/ + +open Set + +namespace RegularPointCoordinates + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- First-order Taylor control along a unit parameter interval. -/ +theorem norm_unit_interval_taylor_remainder_le + {f g k : ℝ → F} {M : ℝ} (hM : 0 ≤ M) + (hf : ∀ t ∈ Icc (0 : ℝ) 1, HasDerivAt f (g t) t) + (hg : ∀ t ∈ Icc (0 : ℝ) 1, HasDerivAt g (k t) t) + (hk : ∀ t ∈ Icc (0 : ℝ) 1, ‖k t‖ ≤ M) : + ‖f 1 - f 0 - g 0‖ ≤ M := by + have hgdiff (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : ‖g t - g 0‖ ≤ M := by + have h := norm_image_sub_le_of_norm_deriv_le_segment' + (fun s hs => (hg s hs).hasDerivWithinAt) + (fun s hs => hk s (Ico_subset_Icc_self hs)) t ht + exact h.trans (by nlinarith [ht.2]) + have hder (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + HasDerivWithinAt (fun s => f s - s • g 0) (g t - g 0) (Icc (0 : ℝ) 1) t := by + simpa only [Pi.sub_apply, id_eq, one_smul] using + ((hf t ht).fun_sub ((hasDerivAt_id t).smul_const (g 0))).hasDerivWithinAt + have h := norm_image_sub_le_of_norm_deriv_le_segment_01' hder + (fun t ht => hgdiff t (Ico_subset_Icc_self ht)) + simpa only [one_smul, zero_smul, sub_zero, sub_right_comm] using h + +/-- Only the second derivative in the direction of the segment is needed. +This form allows an arbitrary anisotropic frozen metric in the application. -/ +theorem norm_taylor_remainder_le_directional + {f : E → F} {df : E → E →L[ℝ] F} + {ddf : E → E →L[ℝ] (E →L[ℝ] F)} {x z : E} {M : ℝ} + (hM : 0 ≤ M) + (hf : ∀ y ∈ segment ℝ x z, HasFDerivAt f (df y) y) + (hdf : ∀ y ∈ segment ℝ x z, HasFDerivAt df (ddf y) y) + (hbound : ∀ y ∈ segment ℝ x z, ‖ddf y (z - x) (z - x)‖ ≤ M) : + ‖f z - f x - df x (z - x)‖ ≤ M := by + let path : ℝ → E := fun t => x + t • (z - x) + have hpathmem (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : path t ∈ segment ℝ x z := by + have heq : path t = (1 - t) • x + t • z := by dsimp [path]; module + rw [heq] + simpa only [AffineMap.lineMap_apply_module] using lineMap_mem_segment ℝ x z ht + have hpath (t : ℝ) : HasDerivAt path (z - x) t := by + simpa [path] using ((hasDerivAt_id t).smul_const (z - x)).const_add x + have hfpath (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + HasDerivAt (fun s => f (path s)) (df (path t) (z - x)) t := + (hf (path t) (hpathmem t ht)).comp_hasDerivAt t (hpath t) + have hgpath (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + HasDerivAt (fun s => df (path s) (z - x)) (ddf (path t) (z - x) (z - x)) t := by + have h := (hdf (path t) (hpathmem t ht)).comp_hasDerivAt t (hpath t) + have hc : HasDerivAt (fun _ : ℝ => z - x) 0 t := hasDerivAt_const t (z - x) + simpa only [map_zero, add_zero, Function.comp_apply] using h.clm_apply hc + have h := norm_unit_interval_taylor_remainder_le hM hfpath hgpath + (fun t ht => hbound (path t) (hpathmem t ht)) + simpa [path] using h + +/-- A bound on the second derivative gives a quadratic Taylor error along +one segment. No convexity beyond that single segment is required. -/ +theorem norm_taylor_remainder_le + {f : E → F} {df : E → E →L[ℝ] F} + {ddf : E → E →L[ℝ] (E →L[ℝ] F)} {x z : E} {M : ℝ} + (hM : 0 ≤ M) + (hf : ∀ y ∈ segment ℝ x z, HasFDerivAt f (df y) y) + (hdf : ∀ y ∈ segment ℝ x z, HasFDerivAt df (ddf y) y) + (hbound : ∀ y ∈ segment ℝ x z, ‖ddf y‖ ≤ M) : + ‖f z - f x - df x (z - x)‖ ≤ M * ‖z - x‖ ^ 2 := by + have hx : x ∈ segment ℝ x z := left_mem_segment ℝ x z + have hz : z ∈ segment ℝ x z := right_mem_segment ℝ x z + have hdiff (y : E) (hy : y ∈ segment ℝ x z) : + ‖df y - df x‖ ≤ M * ‖z - x‖ := by + have h₁ := (convex_segment x z).norm_image_sub_le_of_norm_hasFDerivWithin_le + (fun y hy => (hdf y hy).hasFDerivWithinAt) hbound hx hy + exact h₁.trans (mul_le_mul_of_nonneg_left (norm_sub_le_of_mem_segment hy) hM) + let g : E → F := fun y => f y - df x y + have hg (y : E) (hy : y ∈ segment ℝ x z) : + HasFDerivWithinAt g (df y - df x) (segment ℝ x z) y := + ((hf y hy).sub (df x).hasFDerivAt).hasFDerivWithinAt + have h := (convex_segment x z).norm_image_sub_le_of_norm_hasFDerivWithin_le + hg hdiff hx hz + simpa [g, map_sub, sub_sub_sub_comm, pow_two, mul_assoc] using h + +/-- Taylor control combined with bounds on the linearized image. -/ +theorem dist_bounds_of_taylor + {f : E → F} {df : E → E →L[ℝ] F} + {ddf : E → E →L[ℝ] (E →L[ℝ] F)} {x z : E} + {M a b t e : ℝ} (hM : 0 ≤ M) + (hf : ∀ y ∈ segment ℝ x z, HasFDerivAt f (df y) y) + (hdf : ∀ y ∈ segment ℝ x z, HasFDerivAt df (ddf y) y) + (hbound : ∀ y ∈ segment ℝ x z, ‖ddf y‖ ≤ M) + (hlower : a * t ≤ ‖df x (z - x)‖) + (hupper : ‖df x (z - x)‖ ≤ b * t) + (hsmall : M * ‖z - x‖ ^ 2 ≤ e * t) : + (a - e) * t ≤ dist (f z) (f x) ∧ dist (f z) (f x) ≤ (b + e) * t := by + have herr := (norm_taylor_remainder_le hM hf hdf hbound).trans hsmall + have hnorm := norm_sub_norm_le (f z - f x) (df x (z - x)) + have hnorm' := norm_sub_norm_le (df x (z - x)) (f z - f x) + rw [norm_sub_rev (df x (z - x)) (f z - f x)] at hnorm' + rw [dist_eq_norm] + constructor <;> nlinarith + +/-- The metric comparison using only the diagonal second derivative. -/ +theorem dist_bounds_of_directional_taylor + {f : E → F} {df : E → E →L[ℝ] F} + {ddf : E → E →L[ℝ] (E →L[ℝ] F)} {x z : E} + {M a b t e : ℝ} (hM : 0 ≤ M) + (hf : ∀ y ∈ segment ℝ x z, HasFDerivAt f (df y) y) + (hdf : ∀ y ∈ segment ℝ x z, HasFDerivAt df (ddf y) y) + (hbound : ∀ y ∈ segment ℝ x z, ‖ddf y (z - x) (z - x)‖ ≤ M) + (hlower : a * t ≤ ‖df x (z - x)‖) + (hupper : ‖df x (z - x)‖ ≤ b * t) + (hsmall : M ≤ e * t) : + (a - e) * t ≤ dist (f z) (f x) ∧ dist (f z) (f x) ≤ (b + e) * t := by + have herr := (norm_taylor_remainder_le_directional hM hf hdf hbound).trans hsmall + have hnorm := norm_sub_norm_le (f z - f x) (df x (z - x)) + have hnorm' := norm_sub_norm_le (df x (z - x)) (f z - f x) + rw [norm_sub_rev (df x (z - x)) (f z - f x)] at hnorm' + rw [dist_eq_norm] + constructor <;> nlinarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ThreeGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/ThreeGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..8fed13f7b10a6ef01203289213887a1d2802bd7c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ThreeGeometricInputs.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.RCD.Coordinates.FourGeometricInputs +import OAI.Geometry.RCD.Coordinates.FlatSplittingApproximation + +namespace OAI + +/-! # Coordinates under volume and measured-coordinate estimates -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_three_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalVolumeRigidityInput hX → LocalMeasuredCoordinateInput hX → + HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + let := hX.hausdorff_regular + dsimp only + intro p hp hv hr hm + exact regular_coordinates_of_five_geometric_inputs hn hX hp hv + (hX.transformationInput_of_measured hm) (hX.flatSplittingInput_of_measured hm) hr hm + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TimeAverageLinearMap.lean b/lean/OAI/Geometry/RCD/Coordinates/TimeAverageLinearMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..398ee8d4c6467b448b7640fba9d4a0a231c3c460 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TimeAverageLinearMap.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Coordinates.TimeIntervalAverage + +namespace OAI + +/-! # Compatibility of time averages with the actual Sobolev inclusion -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] + +theorem timeIntervalAverage_map (T : E →L[ℝ] F) (u : ℝ → E) (hu : Integrable u) + (h t : ℝ) : + T (timeIntervalAverage u h t) = timeIntervalAverage (fun s => T (u s)) h t := by + rw [timeIntervalAverage,timeIntervalAverage,map_smul, + T.intervalIntegral_comp_comm hu.intervalIntegrable] + +omit [CompleteSpace E] in +theorem timeIntervalAverage_congr_ae (u v : ℝ → E) (he : u =ᵐ[volume] v) (h : ℝ) : + timeIntervalAverage u h = timeIntervalAverage v h := by + funext t + rw [timeIntervalAverage,timeIntervalAverage] + congr 1 + exact intervalIntegral.integral_congr_ae (he.mono fun _ hx _ => hx) + +theorem timeIntervalAverage_map_hasDerivAt (T : E →L[ℝ] F) + (u : ℝ → E) (hu : Integrable u) (v : ℝ → F) + (hv : (fun s => T (u s)) =ᵐ[volume] v) (h t : ℝ) + (hp : ContinuousAt v (t+h)) (hm : ContinuousAt v (t-h)) : + HasDerivAt (fun s => T (timeIntervalAverage u h s)) + ((2*h)⁻¹ • (v (t+h)-v (t-h))) t := by + have hi : Integrable v := (T.integrable_comp hu).congr hv + have he : (fun s => T (timeIntervalAverage u h s)) = timeIntervalAverage v h := by + funext s + rw [timeIntervalAverage_map T u hu, + timeIntervalAverage_congr_ae (fun s => T (u s)) v hv] + rw [he] + exact timeIntervalAverage_hasDerivAt v hi h t hp hm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TimeIntervalAverage.lean b/lean/OAI/Geometry/RCD/Coordinates/TimeIntervalAverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..9686c0e1f2affded7b04119dadcb6f25b5e91bc1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TimeIntervalAverage.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Coordinates.BilinearIntervalAverage +import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus +import Mathlib.Analysis.Calculus.Deriv.Mul + +namespace OAI + +/-! # The interior time average and its actual derivative -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +def timeIntervalAverage (u : ℝ → E) (h t : ℝ) : E := + (2*h)⁻¹ • ∫ s in (t-h)..(t+h), u s + +omit [CompleteSpace E] in +theorem timeIntervalAverage_primitive (u : ℝ → E) (hu : Integrable u) (h t : ℝ) : + timeIntervalAverage u h t = + (2*h)⁻¹ • ((∫ s in (0:ℝ)..(t+h), u s)-(∫ s in (0:ℝ)..(t-h), u s)) := by + rw [timeIntervalAverage,intervalIntegral.integral_interval_sub_left + hu.intervalIntegrable hu.intervalIntegrable] + +omit [CompleteSpace E] in +theorem timeIntervalAverage_continuous (u : ℝ → E) (hu : Integrable u) (h : ℝ) : + Continuous (timeIntervalAverage u h) := by + have hc := hu.continuous_primitive 0 + change Continuous (fun t => timeIntervalAverage u h t) + simp_rw [timeIntervalAverage_primitive u hu] + exact ((hc.comp (continuous_id.add continuous_const)).sub + (hc.comp (continuous_id.sub continuous_const))).const_smul _ + +theorem timeIntervalAverage_hasDerivAt (u : ℝ → E) (hu : Integrable u) (h t : ℝ) + (hp : ContinuousAt u (t+h)) (hm : ContinuousAt u (t-h)) : + HasDerivAt (timeIntervalAverage u h) ((2*h)⁻¹ • (u (t+h)-u (t-h))) t := by + have hp' := intervalIntegral.integral_hasDerivAt_right (a := 0) hu.intervalIntegrable + hu.aestronglyMeasurable.stronglyMeasurableAtFilter hp + have hm' := intervalIntegral.integral_hasDerivAt_right (a := 0) hu.intervalIntegrable + hu.aestronglyMeasurable.stronglyMeasurableAtFilter hm + have hplus := hp'.scomp t ((hasDerivAt_id t).add_const h) + have hminus := hm'.scomp t ((hasDerivAt_id t).sub_const h) + rw [show timeIntervalAverage u h = fun s => (2*h)⁻¹ • + ((∫ q in (0:ℝ)..(s+h), u q)-(∫ q in (0:ℝ)..(s-h), u q)) from + funext (timeIntervalAverage_primitive u hu h)] + simpa only [Function.comp_def,id_eq,one_smul,Pi.smul_def,Pi.sub_def] using + HasDerivAt.const_smul ((2*h)⁻¹) (hplus.sub hminus) + +theorem positive_bilinear_timeIntervalAverage + (P : E →L[ℝ] E →L[ℝ] ℝ) (hpos : ∀ x, 0 ≤ P x x) + (hsymm : ∀ x y, P x y = P y x) + (u : ℝ → E) {h : ℝ} (hh : 0 < h) (t : ℝ) + (hu : IntegrableOn u (Icc (t-h) (t+h))) + (hE : IntegrableOn (fun s => P (u s) (u s)) (Icc (t-h) (t+h))) : + P (timeIntervalAverage u h t) (timeIntervalAverage u h t) ≤ + (2*h)⁻¹ * ∫ s in (t-h)..(t+h), P (u s) (u s) := by + have hab : t-h < t+h := by linarith + have he : t+h-(t-h) = 2*h := by ring + simpa only [he,timeIntervalAverage,intervalIntegral.integral_of_le hab.le, + ← integral_Icc_eq_integral_Ioc] using + positive_bilinear_interval_average P hpos hsymm hab u hu hE + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/Transformation.lean b/lean/OAI/Geometry/RCD/Coordinates/Transformation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d848a14a788239e7ae706cefc8f51b1b1618d3e6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/Transformation.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.RCD.Coordinates.UniformTransformation +import OAI.Geometry.RCD.Metric.ModelScaleControl + +namespace OAI + +/-! # The exact transformation input follows from measured Euclidean coordinates -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.transformationInput_of_measured {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] + (hMeasured : LocalMeasuredCoordinateInput hX) : LocalTransformationInput hX := by + intro hn β η hβ _ + obtain ⟨m,hm⟩ : ∃ m : ℕ, n=m+1 := ⟨n-1,(Nat.sub_add_cancel (by omega : 1≤n)).symm⟩ + subst n + obtain ⟨a,ha,hBG,hscale⟩ := hX.model_comparison_with_scale_control hn + have hBG' : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a) := by + simpa only [Nat.add_sub_cancel] using hBG + obtain ⟨δ,hδ,htransform⟩ := hX.uniform_transformation_of_measured m hn ha hBG' hMeasured β hβ + refine ⟨min δ (1/9),lt_min hδ (by norm_num),?_⟩ + intro p R hR hK u v hfirst hflat t ht htR + have hKδ : -δ ≤ K*R^2 := (neg_le_neg (min_le_left _ _)).trans hK + have hKsmall : -(1/9 : ℝ) ≤ K*R^2 := (neg_le_neg (min_le_right _ _)).trans hK + apply htransform p R hR hKδ (hscale R hR hKsmall) u v + (hfirst.mono_error _ _ (le_of_lt (lt_min hδ (by norm_num))) (min_le_left _ _)) + _ t ht htR + intro s hs hsR + obtain ⟨f,hf⟩ := (hflat s hs hsR).1 + exact ⟨f,hf.mono_error (min_le_left _ _)⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TransformationInput.lean b/lean/OAI/Geometry/RCD/Coordinates/TransformationInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9ce82e1c37abe33079a9ef4a84846685cc76cd8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TransformationInput.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Harmonic.TransformedColumns +import OAI.Geometry.RCD.Metric.NoExtraFactor +import OAI.Geometry.RCD.Metric.ApproximationRestriction + +namespace OAI + +/-! +# The exact-normalization part of the published transformation theorem + +This is the pointwise-in-scale consequence of Huang--Huang (2024), +Theorem 4.1(1)--(2), using the first-order criterion after Definition 2.7. +The initial first-order data are on a doubled ball. The additional +no-(n+1)-Euclidean condition is present explicitly, and will be supplied +by the proved finite-dimensional obstruction. +-/ + +open Set Metric MeasureTheory + +noncomputable section + +namespace RegularPointCoordinates + +universe u + +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +theorem FirstOrderSplittingOn.mono_error {n : ℕ} {p : X} {r ε δ : ℝ} + {u : Fin n → SobolevSpace μ hQ} {v : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ p r ε u v) (hε : 0 ≤ ε) (hεδ : ε ≤ δ) : + FirstOrderSplittingOn μ hQ p r δ u v := by + refine ⟨h.representative, h.continuous, h.harmonic, ?_, fun i j => (h.gram i j).trans hεδ⟩ + intro i + filter_upwards [h.gradient i] with x hx + have hs : (1 + ε) ^ 2 ≤ (1 + δ) ^ 2 := by nlinarith + exact hx.trans hs + +/-- A precisely cited conditional input. It retains both the flatness and +no-extra-factor hypotheses of Theorem 4.1. Only its first two conclusions +are requested here; interscale growth is not assumed as part of this input. -/ +def LocalTransformationInput {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) : Prop := + 2 ≤ n → ∀ β η : ℝ, 0 < β → 0 < η → ∃ δ : ℝ, 0 < δ ∧ + ∀ (p : X) (R : ℝ), 0 < R → -δ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * R) δ u v → + (∀ r : ℝ, 0 < r → r ≤ R → + (∃ f : X → Euclidean n, IsPointedApproximation p 0 r 1 δ f) ∧ + NoExtraEuclideanFactor n p r η) → + ∀ r : ℝ, 0 < r → r ≤ R → ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p r β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p r) measurableSet_ball A + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..efa992422dec1267aeb3848c625baf14fa57a823 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateDefect.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Coordinates.MatrixTransverseDefect +import OAI.Geometry.RCD.Coordinates.TransverseCoordinateEnergy + +namespace OAI + +/-! # Quantitative transverse energy for actual bounded coordinate functions -/ + +open Set Filter MeasureTheory Finset +open scoped InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem localGamma_transverse_defect {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (A : Fin n → ℝ≥0) (hA : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (u i) x|≤A i) + (Ω : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (a : Euclidean n) (ha : ‖a‖=1) (B : ℝ≥0) + (hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (sobolevColumnMap μ Q u a) x|≤B) : + ∀ᵐ x ∂μ.restrict Ω, + |localGamma μ Q + ((∑ i, SobolevSpace.square μ Q (u i) (A i))- + SobolevSpace.square μ Q (sobolevColumnMap μ Q u a) B) + (sobolevColumnMap μ Q u a) x|≤ + 2*((n:ℝ)+1)*‖v x‖*gramDefect μ Q u x := by + let w := sobolevColumnMap μ Q u a + have hwrep := sobolevColumnMap_representative μ Q u Ω v hu a + filter_upwards [ae_restrict_of_ae (localGamma_sub_left μ Q + (∑ i, SobolevSpace.square μ Q (u i) (A i)) (SobolevSpace.square μ Q w B) w), + ae_restrict_of_ae (localGamma_finset_sum_left μ Q univ + (fun i => SobolevSpace.square μ Q (u i) (A i)) w), + ae_all_iff.mpr (fun i => ae_restrict_of_ae (localGamma_square μ Q (u i) w (A i) (hA i))), + ae_restrict_of_ae (localGamma_square μ Q w w B hB), + ae_all_iff.mpr (fun i => ae_restrict_of_ae (localGamma_column_right μ Q (u i) u a)), + ae_restrict_of_ae (localGamma_column_pair μ Q u a a),ae_all_iff.mpr hu,hwrep] + with x hs hsum hsq hw hrows hww hux hwr + change |localGamma μ Q ((∑ i, SobolevSpace.square μ Q (u i) (A i))- + SobolevSpace.square μ Q w B) w x|≤_ + rw [hs,hsum,hw,hww,hwr] + change ∀ i, localGamma μ Q (u i) w x=∑ j, a j*localGamma μ Q (u i) (u j) x at hrows + simp_rw [hsq,hrows,hux] + have hh := matrix_transverse_defect (fun i j => localGamma μ Q (u i) (u j) x) + a (v x) ha (le_refl ‖v x‖) + have he : (∑ i, 2*(v x) i*(∑ j, a j*localGamma μ Q (u i) (u j) x))= + 2*(∑ i, (v x) i*(∑ j, a j*localGamma μ Q (u i) (u j) x)) := by + rw [mul_sum] + apply sum_congr rfl + intro i _ + ring + rw [he] + exact hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateEnergy.lean b/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..6335b9e3984e37db32ec5e15b70f53f25af0173e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TransverseCoordinateEnergy.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Coordinates.FrameResidualEnergy +import OAI.Geometry.RCD.Coordinates.GammaCoordinateForm + +namespace OAI + +/-! # Squared transverse coordinates have zero derivative in the axial direction -/ + +open Set Filter MeasureTheory Finset +open scoped InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem localGamma_transverse_coordinate {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (A : Fin n → ℝ≥0) (hA : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (u i) x|≤A i) + (Ω : Set X) + (hgram : ∀ i j, localGamma μ Q (u i) (u j) =ᵐ[μ.restrict Ω] + fun _ => if i=j then 1 else 0) + (a : Euclidean n) (ha : ‖a‖=1) (B : ℝ≥0) + (hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (sobolevColumnMap μ Q u a) x|≤B) : + localGamma μ Q + ((∑ i, SobolevSpace.square μ Q (u i) (A i))- + SobolevSpace.square μ Q (sobolevColumnMap μ Q u a) B) + (sobolevColumnMap μ Q u a) =ᵐ[μ.restrict Ω] fun _ => 0 := by + let w := sobolevColumnMap μ Q u a + have hrow (i : Fin n) : localGamma μ Q (u i) w =ᵐ[μ.restrict Ω] fun _ => a i := by + filter_upwards [ae_restrict_of_ae (localGamma_column_right μ Q (u i) u a), + ae_all_iff.mpr (fun j => hgram i j)] with x hx hg + rw [hx] + simp_rw [hg] + simp only [mul_ite,mul_one,mul_zero,Finset.sum_ite_eq,Finset.mem_univ,ite_true] + have hcol : SobolevSpace.toLp μ Q w =ᵐ[μ.restrict Ω] + fun x => ∑ i, a i*SobolevSpace.toLp μ Q (u i) x := by + have hc := sobolevColumnMap_representative μ Q u Ω + (fun x => WithLp.toLp 2 (fun i => SobolevSpace.toLp μ Q (u i) x)) + (fun _ => EventuallyEq.rfl) a + simpa only [PiLp.inner_apply,RCLike.inner_apply,conj_trivial] using hc + have hww : localGamma μ Q w w =ᵐ[μ.restrict Ω] fun _ => (1:ℝ) := by + simpa only [ha,one_pow] using localGamma_column_orthonormal μ Q u Ω hgram a + filter_upwards [ae_restrict_of_ae (localGamma_sub_left μ Q + (∑ i, SobolevSpace.square μ Q (u i) (A i)) (SobolevSpace.square μ Q w B) w), + ae_restrict_of_ae (localGamma_finset_sum_left μ Q univ + (fun i => SobolevSpace.square μ Q (u i) (A i)) w), + ae_all_iff.mpr (fun i => ae_restrict_of_ae (localGamma_square μ Q (u i) w (A i) (hA i))), + ae_restrict_of_ae (localGamma_square μ Q w w B hB),ae_all_iff.mpr hrow,hcol,hww] + with x hs hsum hsq hw hrows hc hwwx + change localGamma μ Q ((∑ i, SobolevSpace.square μ Q (u i) (A i))- + SobolevSpace.square μ Q w B) w x=0 + rw [hs,hsum,hw,hwwx,hc] + simp_rw [hsq,hrows] + rw [Finset.mul_sum,mul_one] + apply sub_eq_zero.mpr + apply sum_congr rfl + intro i _ + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TransverseFrameData.lean b/lean/OAI/Geometry/RCD/Coordinates/TransverseFrameData.lean new file mode 100644 index 0000000000000000000000000000000000000000..521681e882baabf33fcd59906dc5df85e7397c21 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TransverseFrameData.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Coordinates.TransverseCoordinateEnergy + +namespace OAI + +/-! # Actual bounded axial and transverse functions of an orthonormal frame -/ + +open Set Filter MeasureTheory Finset +open scoped NNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem bounded_transverse_frame_data {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (A : Fin n → ℝ≥0) (hA : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (u i) x|≤A i) + (Ω : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (hH : ∀ i, IsSobolevHarmonicOn μ Q Ω (u i)) + (hgram : ∀ i j, localGamma μ Q (u i) (u j) =ᵐ[μ.restrict Ω] + fun _ => if i=j then 1 else 0) (a : Euclidean n) (ha : ‖a‖=1) : + ∃ (w s : SobolevSpace μ Q) (B D : ℝ≥0), + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x|≤B) ∧ + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q s x|≤D) ∧ + (SobolevSpace.toLp μ Q w =ᵐ[μ.restrict Ω] fun x => ⟪v x,a⟫_ℝ) ∧ + (SobolevSpace.toLp μ Q s =ᵐ[μ.restrict Ω] fun x => ‖v x‖^2-⟪v x,a⟫_ℝ^2) ∧ + (localGamma μ Q w w =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) ∧ + (localGamma μ Q s w =ᵐ[μ.restrict Ω] fun _ => (0:ℝ)) ∧ + IsSobolevHarmonicOn μ Q Ω w := by + let w := sobolevColumnMap μ Q u a + let B : ℝ≥0 := ∑ i, ‖a i‖₊*A i + have hwglobal : SobolevSpace.toLp μ Q w =ᵐ[μ] + fun x => ∑ i, a i*SobolevSpace.toLp μ Q (u i) x := by + have h := sobolevColumnMap_representative μ Q u univ + (fun x => WithLp.toLp 2 (fun i => SobolevSpace.toLp μ Q (u i) x)) + (fun _ => EventuallyEq.rfl) a + simpa only [Measure.restrict_univ,PiLp.inner_apply,RCLike.inner_apply,conj_trivial] using h + have hwB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x|≤B := by + filter_upwards [hwglobal,ae_all_iff.mpr hA] with x hx hb + rw [hx] + calc + _ ≤ ∑ i, |a i*SobolevSpace.toLp μ Q (u i) x| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ i, |a i| * (A i:ℝ) := sum_le_sum (fun i _ => by + rw [abs_mul]; exact mul_le_mul_of_nonneg_left (hb i) (abs_nonneg _)) + _ = B := by simp [B,Real.norm_eq_abs] + let z := ∑ i, SobolevSpace.square μ Q (u i) (A i) + have hz : SobolevSpace.toLp μ Q z =ᵐ[μ] + fun x => ∑ i, (SobolevSpace.toLp μ Q (u i) x)^2 := by + change SobolevSpace.toLpCLM μ Q (∑ i, SobolevSpace.square μ Q (u i) (A i)) =ᵐ[μ] _ + rw [map_sum] + change (∑ i, SobolevSpace.toLp μ Q (SobolevSpace.square μ Q (u i) (A i))) =ᵐ[μ] _ + filter_upwards [Lp.coeFn_finsetSum univ (fun i => SobolevSpace.toLp μ Q + (SobolevSpace.square μ Q (u i) (A i))),ae_all_iff.mpr + (fun i => SobolevSpace.square_coe μ Q (u i) (A i) (hA i))] with x hx hs + rw [hx] + simp only [Finset.sum_apply,hs] + let s := z-SobolevSpace.square μ Q w B + have hs : SobolevSpace.toLp μ Q s =ᵐ[μ] + fun x => (∑ i, (SobolevSpace.toLp μ Q (u i) x)^2)-(SobolevSpace.toLp μ Q w x)^2 := by + filter_upwards [hz,SobolevSpace.square_coe μ Q w B hwB, + Lp.coeFn_sub (SobolevSpace.toLp μ Q z) (SobolevSpace.toLp μ Q (SobolevSpace.square μ Q w B))] + with x hx hy hsub + change (SobolevSpace.toLp μ Q z-SobolevSpace.toLp μ Q (SobolevSpace.square μ Q w B)) x=_ + simp only [hsub,Pi.sub_apply,hx,hy] + let D : ℝ≥0 := (∑ i, A i^2)+B^2 + have hsD : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q s x|≤D := by + filter_upwards [hs,ae_all_iff.mpr hA,hwB] with x hx hb hw + rw [hx] + calc + _ ≤ |∑ i, (SobolevSpace.toLp μ Q (u i) x)^2|+|(SobolevSpace.toLp μ Q w x)^2| := abs_sub _ _ + _ = (∑ i, |SobolevSpace.toLp μ Q (u i) x|^2)+|SobolevSpace.toLp μ Q w x|^2 := by + rw [abs_of_nonneg (sum_nonneg (fun _ _ => sq_nonneg _))] + simp only [abs_pow,sq_abs] + _ ≤ (∑ i, (A i:ℝ)^2)+(B:ℝ)^2 := add_le_add + (sum_le_sum (fun i _ => pow_le_pow_left₀ (abs_nonneg _) (hb i) 2)) + (pow_le_pow_left₀ (abs_nonneg _) hw 2) + _ = D := by simp [D] + have hw := sobolevColumnMap_representative μ Q u Ω v hu a + refine ⟨w,s,B,D,hwB,hsD,hw,?_,?_,?_,IsSobolevHarmonicOn.linearCombination μ Q hH a⟩ + · filter_upwards [ae_restrict_of_ae hs,ae_all_iff.mpr hu,hw] with x hx hux hwx + rw [hx,hwx,EuclideanSpace.real_norm_sq_eq] + simp only [hux] + · simpa only [ha,one_pow] using localGamma_column_orthonormal μ Q u Ω hgram a + · exact localGamma_transverse_coordinate μ Q u A hA Ω hgram a ha B hwB + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TwoCenterCommutatorFit.lean b/lean/OAI/Geometry/RCD/Coordinates/TwoCenterCommutatorFit.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c3f9c2f9d27a7d0d08d2cb104c97bbe7d2f5ccc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TwoCenterCommutatorFit.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Coordinates.TwoCenterRadialFits +import OAI.Geometry.RCD.Harmonic.AffineCommutatorResidual + +namespace OAI + +/-! # The commutator coefficient residual from the two radial W12 fits -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +theorem norm_le_sqrt_mul_of_sq_le {Y : Type*} [SeminormedAddCommGroup Y] + (y : Y) {E r : ℝ} (hE : 0 ≤ E) (hr : 0 ≤ r) (h : ‖y‖ ^ 2 ≤ E * r ^ 2) : + ‖y‖ ≤ Real.sqrt E * r := by + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) hr)).mp + rwa [mul_pow, Real.sq_sqrt hE] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A normalized integral commutator bound is precisely the L2 error +required by the affine coefficient identity, for the chosen representatives. -/ +theorem normalized_commutator_fit_norm (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f v u g h : SobolevSpace μ hQ) {Cf Cv E r : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ Cf) + (hv : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ v v x ≤ Cv) + (hh : SobolevSpace.toLp μ hQ h =ᵐ[μ.restrict Ω] localGamma μ hQ v u) + (hE : 0 ≤ E) (hr : 0 ≤ r) + (he : (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hQ v g x - localGamma μ hQ f h x - localGamma μ hQ v u x) ^ 2 ∂μ) ≤ E * r ^ 2) : + ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω v hv g - + localRadialDerivative μ hQ Ω f hf h - SobolevSpace.restrictLp μ hQ Ω h)‖ ≤ Real.sqrt E * r := by + apply norm_le_sqrt_mul_of_sq_le _ hE hr + rw [normalizeLocalL2_norm_sq, ← l2_norm_sq_eq_integral, + local_radial_commutator_norm_sq μ hQ Ω f v u g h hf hv hh] + exact he + +/-- This is the quantitative affine residual of the actual two-center +argument. Its hypotheses are the two radial fits and the separately proved +full Poisson-mass commutator estimate, all on the same region. -/ +theorem two_center_affine_commutator_bound {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) (fz fx η : SobolevSpace μ hQ) + {Cf Cv Ez Ex Dz Dx K : ℝ} + (hCf : 0 ≤ Cf) (hCv : 0 ≤ Cv) + (hEz : 0 ≤ Ez) (hEx : 0 ≤ Ex) (hDz : 0 ≤ Dz) (hDx : 0 ≤ Dx) (hK : 0 ≤ K) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ fz fz x ≤ Cf ^ 2) + (hv : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ (fz - fx) (fz - fx) x ≤ Cv ^ 2) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U Gz Gx : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (hGz : ∀ a, SobolevSpace.toLp μ hQ (Gz a) =ᵐ[μ.restrict Ω] localGamma μ hQ fz (U a)) + (hGx : ∀ a, SobolevSpace.toLp μ hQ (Gx a) =ᵐ[μ.restrict Ω] localGamma μ hQ fx (U a)) + (Az Ax : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) + (hzv : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (Gz b - U (Az b)))‖ ^ 2 ≤ Ez * ‖b‖ ^ 2) + (hxv : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (Gx b - U (Ax b) + c b • η))‖ ^ 2 ≤ Ex * ‖b‖ ^ 2) + (hze : ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (Gz b - U (Az b)) (Gz b - U (Az b)) x ∂μ) ≤ Dz * ‖b‖ ^ 2) + (hxe : ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (Gx b - U (Ax b) + c b • η) (Gx b - U (Ax b) + c b • η) x ∂μ) ≤ Dx * ‖b‖ ^ 2) + (hcomm : ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hQ (fz - fx) (Gz b) x - localGamma μ hQ fz ((Gz - Gx) b) x - + localGamma μ hQ (fz - fx) (U b) x) ^ 2 ∂μ) ≤ K * ‖b‖ ^ 2) + (b : Euclidean n) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (U ((Az * (Az - Ax) - (Az - Ax) * (Az - 1)) b) - c ((Az - 1) b) • η))‖ ≤ + (Cv * Real.sqrt Dz + Real.sqrt K + Cf * Real.sqrt (2 * Dz + 2 * Dx) + + Real.sqrt (2 * Ez + 2 * Ex) * ‖Az - 1‖ + Real.sqrt Ez * ‖Az - Ax‖) * ‖b‖ := by + have hE : 0 ≤ 2 * Ez + 2 * Ex := by positivity + have hD : 0 ≤ 2 * Dz + 2 * Dx := by positivity + have hH (a) : SobolevSpace.toLp μ hQ ((Gz - Gx) a) =ᵐ[μ.restrict Ω] + localGamma μ hQ (fz - fx) (U a) := + radial_difference_representative μ hQ Ω fz fx (U a) (Gz a) (Gx a) (hGz a) (hGx a) + have hpair (a) := two_center_radial_fit_bounds μ hQ Ω hfin η U Gz Gx Az Ax c hzv hxv hze hxe a + apply normalized_affine_commutator_bound μ hQ Ω hfin fz (fz - fx) η hCf hCv + (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) + hf hv hη U Gz (Gz - Gx) hGz hH Az (Az - Ax) c + · intro a + exact norm_le_sqrt_mul_of_sq_le _ hEz (norm_nonneg a) (hzv a) + · intro a + simpa only [mul_pow, Real.sq_sqrt hDz] using hze a + · intro a + exact norm_le_sqrt_mul_of_sq_le _ hE (norm_nonneg a) (hpair a).1 + · intro a + simpa only [mul_pow, Real.sq_sqrt hD] using (hpair a).2 + · intro a + exact normalized_commutator_fit_norm μ hQ Ω hfin fz (fz - fx) (U a) + (Gz a) ((Gz - Gx) a) hf hv (hH a) hK (norm_nonneg a) (hcomm a) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TwoCenterRadialFits.lean b/lean/OAI/Geometry/RCD/Coordinates/TwoCenterRadialFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d9265cd1ced4cd6bd7634fdd99c6f94f01fd215 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TwoCenterRadialFits.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.RCD.Sobolev.LocalAffineCutoff + +namespace OAI + +/-! # Subtracting the two actual radial fits in their common frame -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Local energy obeys the squared triangle estimate on an arbitrary +common region, retaining its original normalization. -/ +theorem averaged_energy_sub_le (Ω : Set X) (f g : SobolevSpace μ hQ) : + (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ (f - g) (f - g) x ∂μ) ≤ + 2 * ((μ.real Ω)⁻¹ * ∫ x in Ω, localGamma μ hQ f f x ∂μ) + + 2 * ((μ.real Ω)⁻¹ * ∫ x in Ω, localGamma μ hQ g g x ∂μ) := by + have hp : ∀ᵐ x ∂μ, localGamma μ hQ (f - g) (f - g) x ≤ + 2 * localGamma μ hQ f f x + 2 * localGamma μ hQ g g x := by + have hn (q : SobolevSpace μ hQ) : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.minimalSlope μ hQ q x := + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ q) + filter_upwards [(Lp.coeFn_le _ _).mpr (SobolevSpace.minimalSlope_sub_le μ hQ f g), + Lp.coeFn_add (SobolevSpace.minimalSlope μ hQ f) (SobolevSpace.minimalSlope μ hQ g), + hn f, hn g, hn (f - g), localGamma_self μ hQ f, localGamma_self μ hQ g, + localGamma_self μ hQ (f - g)] with x hs ha hf hg hfg hff hgg hsub + simp only [ha, Pi.add_apply] at hs + rw [hff, hgg, hsub] + have hsq := (sq_le_sq₀ hfg (add_nonneg hf hg)).mpr hs + nlinarith only [hsq, sq_nonneg (SobolevSpace.minimalSlope μ hQ f x - + SobolevSpace.minimalSlope μ hQ g x)] + have hi := integral_mono_ae (μ := μ.restrict Ω) + (localGamma_memL1 μ hQ (f - g) (f - g)).integrableOn + (((localGamma_memL1 μ hQ f f).integrableOn.const_mul 2).add + ((localGamma_memL1 μ hQ g g).integrableOn.const_mul 2)) (ae_restrict_of_ae hp) + simp only [Pi.add_apply] at hi + rw [integral_add ((localGamma_memL1 μ hQ f f).integrableOn.const_mul 2) + ((localGamma_memL1 μ hQ g g).integrableOn.const_mul 2), + integral_const_mul, integral_const_mul] at hi + have hh := mul_le_mul_of_nonneg_left hi (show 0 ≤ (μ.real Ω)⁻¹ by positivity) + convert hh using 1 + ring + +omit [BorelSpace X] [ProperSpace X] in +theorem normalized_sobolev_sub_sq_le (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f g : SobolevSpace μ hQ) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (f - g))‖ ^ 2 ≤ + 2 * ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω f)‖ ^ 2 + + 2 * ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω g)‖ ^ 2 := by + let a := normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω f) + let b := normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω g) + have he : normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (f - g)) = a - b := by + simp only [a, b, map_sub, normalizeLocalL2, smul_sub] + rw [he] + have hs := (sq_le_sq₀ (norm_nonneg (a - b)) + (add_nonneg (norm_nonneg a) (norm_nonneg b))).mpr (norm_sub_le a b) + change ‖a - b‖ ^ 2 ≤ 2 * ‖a‖ ^ 2 + 2 * ‖b‖ ^ 2 + nlinarith only [hs, sq_nonneg (‖a‖ - ‖b‖)] + +/-- The difference of the two radial representatives represents the +derivative of the difference of the two actual Poisson replacements. -/ +theorem radial_difference_representative (Ω : Set X) + (fz fx u gz gx : SobolevSpace μ hQ) + (hz : SobolevSpace.toLp μ hQ gz =ᵐ[μ.restrict Ω] localGamma μ hQ fz u) + (hx : SobolevSpace.toLp μ hQ gx =ᵐ[μ.restrict Ω] localGamma μ hQ fx u) : + SobolevSpace.toLp μ hQ (gz - gx) =ᵐ[μ.restrict Ω] localGamma μ hQ (fz - fx) u := by + change SobolevSpace.toLpCLM μ hQ (gz - gx) =ᵐ[μ.restrict Ω] _ + rw [map_sub] + change (SobolevSpace.toLp μ hQ gz - SobolevSpace.toLp μ hQ gx) =ᵐ[μ.restrict Ω] _ + filter_upwards [hz, hx, ae_restrict_of_ae (localGamma_sub_left μ hQ fz fx u), + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ gz) (SobolevSpace.toLp μ hQ gx))] + with x hz hx hg hs + simp only [hs, Pi.sub_apply, hz, hx, hg] + +/-- Subtracting the common-frame fits produces the affine fit of the +two-center derivative, with the original displacement constant. -/ +theorem two_center_radial_fit_bounds {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) (η : SobolevSpace μ hQ) + (U Gz Gx : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (Az Ax : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) + {Ez Ex Dz Dx : ℝ} + (hzv : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (Gz b - U (Az b)))‖ ^ 2 ≤ Ez * ‖b‖ ^ 2) + (hxv : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (Gx b - U (Ax b) + c b • η))‖ ^ 2 ≤ Ex * ‖b‖ ^ 2) + (hze : ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (Gz b - U (Az b)) (Gz b - U (Az b)) x ∂μ) ≤ Dz * ‖b‖ ^ 2) + (hxe : ∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (Gx b - U (Ax b) + c b • η) (Gx b - U (Ax b) + c b • η) x ∂μ) ≤ Dx * ‖b‖ ^ 2) + (b : Euclidean n) : + let R := (Gz - Gx) b - U ((Az - Ax) b) - c b • η + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω R)‖ ^ 2 ≤ + (2 * Ez + 2 * Ex) * ‖b‖ ^ 2 ∧ + (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ R R x ∂μ) ≤ + (2 * Dz + 2 * Dx) * ‖b‖ ^ 2 := by + have he : (Gz - Gx) b - U ((Az - Ax) b) - c b • η = + (Gz b - U (Az b)) - (Gx b - U (Ax b) + c b • η) := by + simp only [sub_apply, map_sub] + module + dsimp only + rw [he] + have hv := normalized_sobolev_sub_sq_le μ hQ Ω hfin + (Gz b - U (Az b)) (Gx b - U (Ax b) + c b • η) + have hh := averaged_energy_sub_le μ hQ Ω + (Gz b - U (Az b)) (Gx b - U (Ax b) + c b • η) + constructor + · nlinarith only [hv, hzv b, hxv b] + · nlinarith only [hh, hze b, hxe b] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TwoFrozenPairingVariation.lean b/lean/OAI/Geometry/RCD/Coordinates/TwoFrozenPairingVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..82cf2632078889797c53bc7d23f7b0e17418a0a7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TwoFrozenPairingVariation.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.RCD.Sobolev.InnerProductVariation + +namespace OAI + +/-! # A pairing derivative from both frozen scalar pairings + +One Lipschitz-order increment and continuity of the other factor make +the mixed increment negligible. Neither factor needs a vector derivative. +-/ + +open Filter Asymptotics +open scoped Topology +namespace RegularPointCoordinates +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem hasDerivAt_inner_of_two_frozen {W Q : ℝ → E} {t a b : ℝ} + (hW : (fun s => W s-W t) =O[𝓝 t] (fun s => s-t)) + (hQ : ContinuousAt Q t) + (hleft : HasDerivAt (fun s => inner ℝ (W s) (Q t)) a t) + (hright : HasDerivAt (fun s => inner ℝ (W t) (Q s)) b t) : + HasDerivAt (fun s => inner ℝ (W s) (Q s)) (a+b) t := by + let e := fun s => inner ℝ (W s-W t) (Q s-Q t) + have hsmall : (fun s => ‖Q s-Q t‖) =o[𝓝 t] (fun _ => (1:ℝ)) := by + apply (isLittleO_one_iff ℝ).mpr + simpa only [sub_self,norm_zero] using (hQ.tendsto.sub_const (Q t)).norm + have hprod : (fun s => ‖W s-W t‖*‖Q s-Q t‖) =o[𝓝 t] (fun s => s-t) := by + simpa only [mul_one] using hW.norm_left.mul_isLittleO hsmall + have he : e =o[𝓝 t] (fun s => s-t) := + (IsBigO.of_norm_le (fun s => norm_inner_le_norm (W s-W t) (Q s-Q t))).trans_isLittleO hprod + have hed : HasDerivAt e 0 t := by + apply HasDerivAt.of_isLittleO + simpa only [e,sub_self,inner_zero_left,smul_zero,sub_zero] using he + have hd := ((hleft.add hright).sub_const (inner ℝ (W t) (Q t))).add hed + simp only [add_zero] at hd + convert hd using 1 + ext s + simp only [Pi.add_apply,e,inner_sub_left,inner_sub_right] + ring + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/TwoGeometricInputs.lean b/lean/OAI/Geometry/RCD/Coordinates/TwoGeometricInputs.lean new file mode 100644 index 0000000000000000000000000000000000000000..586bbcda627c4009ee0c01952fde764d0af4f99f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/TwoGeometricInputs.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.RCD.Coordinates.ThreeGeometricInputs +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinates + +namespace OAI + +/-! # Coordinates under volume convergence and local volume rigidity -/ + +namespace RegularPointCoordinates +noncomputable section +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_two_geometric_inputs {K : ℝ} {n : ℕ} + (hn : 2 ≤ n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → + EuclideanRescalingVolumeConvergence (hausdorff n X) n p (euclideanUnitVolume n) → + LocalVolumeRigidityInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + dsimp only + intro p hp hv hr + exact regular_coordinates_of_three_geometric_inputs hn hX hp hv hr hX.measuredCoordinateInput + +end +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformCenteredFits.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformCenteredFits.lean new file mode 100644 index 0000000000000000000000000000000000000000..5151fd20144ef9dd54c591253021b039222e458a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformCenteredFits.lean @@ -0,0 +1,156 @@ +import OAI.Geometry.RCD.Harmonic.UniformCanonicalCenters +import OAI.Geometry.RCD.Coordinates.CanonicalCenteredFits + +namespace OAI + +/-! # Centered radial fits with constants independent of the center and scale -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The centered-fit constant is fixed before the root radius, center, +source, harmonic map, frame, defect sequence, and splitting error. -/ +theorem canonical_centered_fits_of_squared_bound_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hmean : LocalHarmonicL2MeanValueInput hX) {κ₀ deltaCap Z : ℝ} + (hκ₀ : 0 ≤ κ₀) (hcap : 0 ≤ deltaCap) (hZ : 0 < Z) : + ∃ D : ℝ, 0 < D ∧ ∀ {a κ r0 B J C L δ ε : ℝ} {p : X}, + ∀ (_ha : 0 ≤ a) (_hδ : 0 ≤ δ) (_hδcap : δ ≤ deltaCap) + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) + (_hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u v) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (_hscale : a * (3 * r0) ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (w : ℕ → X → Euclidean (m + 2)) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (w i)) + (_hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) + (_hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (Q : ℕ → ℝ) (_hQ : ∀ i, 0 ≤ Q i) (_hQs : Summable Q) + (_hsquare : ∀ b : Euclidean (m + 2), b ≠ 0 → ∀ i, + (dyadicRadialFit hX T u L hbase i b) ^ 2 ≤ Z * Q i * ‖(F i).symm b‖ ^ 2), + ∀ b : Euclidean (m + 2), b ≠ 0 → + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪v p, A i⟫_ℝ| ≤ D * (distanceSourceRadius r0 i / 64) * + ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i)) ∧ + (∀ i, ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b - + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (-⟪v p, A i⟫_ℝ, A i))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * + Real.sqrt (symmetricDefect (7 / 8) Q i)) := by + obtain ⟨M, hM, hallcenters⟩ := + canonical_dyadic_affine_centers_uniform m hX hmean hκ₀ hcap + let Λ := Real.sqrt ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹) + have hΛ : 0 ≤ Λ := Real.sqrt_nonneg _ + let H := (1 - (9 / 16 : ℝ) / Real.sqrt (7 / 8))⁻¹ * (1 + (Real.sqrt (7 / 8))⁻¹) + have hroot : (9 / 16 : ℝ) < Real.sqrt (7 / 8) := by + have hh := Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 7 / 8) + nlinarith [Real.sqrt_nonneg (7 / 8)] + have hH : 0 ≤ H := by + dsimp only [H] + have hh : (9 / 16 : ℝ) / Real.sqrt (7 / 8) < 1 := + (div_lt_one (Real.sqrt_pos.mpr (by norm_num))).mpr hroot + positivity + let Dc := (M * (Λ + 1) * Real.sqrt Z) * H + have hDc : 0 ≤ Dc := by dsimp only [Dc]; positivity + let D := Real.sqrt Z + Dc + have hD : 0 < D := add_pos_of_pos_of_nonneg (Real.sqrt_pos.mpr hZ) hDc + refine ⟨D, hD, ?_⟩ + intro a κ r0 B J C L δ ε p ha hδ hδcap hBG S T u v hu hbase hscale hsmall + F w hexact hfirst hcurv hquarter Q hQ hQs hsquare + let μ := hausdorff (m + 2) X + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hradius (i k : ℕ) : r (i + k) = (1 / 2 : ℝ) ^ k * r i := by + exact distanceSourceRadius_testing_shift r0 i k + have hrle (i : ℕ) : r i ≤ r0 := by + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + have hs := distanceSourceRadius_pos S.radius_pos i + dsimp only [r] + linarith + have hratio (i : ℕ) : Real.sqrt (μ.real (ball p (r i))) / + Real.sqrt (μ.real (ball p (r (i + 1)))) ≤ Λ := by + rw [hradius i 1, pow_one] + exact radial_sqrt_volume_ratio (hr i) (by norm_num) (euclideanUnitVolume_pos (m + 2)) + (measureReal_nonneg) (hquarter _ (hr i) (hrle i)) + (by simpa only [hradius i 1, pow_one] using hquarter _ (hr (i + 1)) (hrle (i + 1))) + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hgrowth := dyadic_covector_norm_reverse_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨w i, by simpa only [hrad] using hfirst i⟩) + have hcenters := hallcenters ha hδ hδcap hBG S T u v hu hbase hscale hsmall + F w hexact hfirst hcurv + intro b hb + obtain ⟨c, A, hfit, _hsize, hlim, hdiff⟩ := hcenters b + have hc (i : ℕ) : |c i + ⟪v p, A i⟫_ℝ| ≤ + Dc * r i * ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i) := by + have hh := weighted_centers_from_squared_fit (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num : (7 / 8 : ℝ) < 1) hroot (zero_le_one.trans hM) hΛ hZ.le hQ hQs + (fun j => (hr j).le) (fun j => norm_nonneg ((F j).symm b)) + (fun j => dyadicRadialFit_nonneg hX T u L hbase j b) hradius + (fun j k => hgrowth j k b) hlim (hsquare b hb) (fun j => ?_) i + · convert hh using 1 + dsimp only [Dc, H] + ring + · have hs := hdiff j + have hv := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hratio j) (zero_le_one.trans hM)) + (mul_nonneg (hr j).le (dyadicRadialFit_nonneg hX T u L hbase j b)) + apply hs.trans + exact add_le_add (hv.trans_eq (by ring)) (le_of_eq (by dsimp only [r]; ring)) + have herror (i : ℕ) : dyadicRadialFit hX T u L hbase i b ≤ + Real.sqrt Z * ‖(F i).symm b‖ * Real.sqrt (symmetricDefect (7 / 8) Q i) := by + have hsq := hsquare b hb i + have hbound : dyadicRadialFit hX T u L hbase i b ≤ Real.sqrt Z * ‖(F i).symm b‖ * Real.sqrt (Q i) := by + apply (sq_le_sq₀ (dyadicRadialFit_nonneg hX T u L hbase i b) (by positivity)).mp + calc + _ ≤ Z * Q i * ‖(F i).symm b‖ ^ 2 := hsq + _ = _ := by rw [mul_pow, mul_pow, Real.sq_sqrt hZ.le, Real.sq_sqrt (hQ i)]; ring + exact hbound.trans (mul_le_mul_of_nonneg_left + (Real.sqrt_le_sqrt (le_symmetricDefect (by norm_num) (by norm_num) hQ hQs i)) (by positivity)) + refine ⟨c, A, hfit, ?_, ?_⟩ + · intro i + exact (hc i).trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right + (show Dc ≤ D by exact le_add_of_nonneg_left (Real.sqrt_nonneg Z)) (hr i).le) (norm_nonneg _)) + (Real.sqrt_nonneg _)) + · intro i + have hs := centered_affineFit_error μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (ne_of_gt (hX.fullSupport p _ (hr i))) + (v p) (dyadicRadialTarget hX T u hbase i b) (c i) (A i) (hfit i) + rw [dyadicRadialTarget_residual_norm hX T u hbase i b] at hs + have hh := add_le_add (mul_le_mul_of_nonneg_left (herror i) (hr i).le) (hc i) + exact hs.trans (hh.trans_eq (by dsimp only [D]; ring)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformControlledNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformControlledNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a085e57e5478ef2c001eaca88eb2942526cb90f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformControlledNormalization.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.RCD.Coordinates.ControlledNormalization +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization +import OAI.Geometry.RCD.Metric.UniformVolumeRatio + +namespace OAI + +/-! +# Uniform normalization at nearby centers + +A single harmonic map on the enlarged initial ball supplies the maps at all +nearby centers. Only the volume-ratio cost is paid when its first-order +splitting data are restricted. The resulting normalizers and approximation +bounds are uniform in the center and in every smaller scale. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Uniform first-order data and all-center flatness give actual normalized +harmonic coordinates at every center in the inner quarter-ball. -/ +theorem uniform_controlled_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (htrans : LocalTransformationInput hX) (hsplit : LocalFlatSplittingInput hX) + {ρ β C : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) (hC : 1 ≤ C) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -δ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2 * R) δ u v → + (∀ q ∈ ball p (R / 4), + (hausdorff n X).real (ball p (2 * R)) ≤ + C * (hausdorff n X).real (ball q (R / 2))) → + (∀ q ∈ ball p (R / 4), ∀ s : ℝ, 0 < s → s ≤ R / 4 → + ∃ f : X → Euclidean n, IsPointedApproximation q 0 s 2 δ f) → + ∀ q ∈ ball p (R / 4), ∀ r : ℝ, 0 < r → 64 * r ≤ R → + ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball q (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (16 * r) β + (transformedColumn (hausdorff n X) hX.quadratic u A) + (fun x => (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x)) ∧ + IsPointedApproximation q 0 r (1 / 2) ρ + (fun x => r⁻¹ • ((A : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (A : Euclidean n →L[ℝ] Euclidean n).adjoint (v q))) := by + obtain ⟨d, hd, hnormalize⟩ := controlled_normalization_of_published_inputs hX hn htrans hsplit hρ hβ + have hCpos : 0 < C := by linarith + let δ := d / C + have hδ : 0 < δ := div_pos hd hCpos + have hδd : δ ≤ d := by + apply (div_le_iff₀ hCpos).mpr + nlinarith + have hCd : C * δ = d := by dsimp [δ]; field_simp + refine ⟨δ, hδ, ?_⟩ + intro p R hR hcurv u v hu hvol hflat q hq r hr hrR + have hsub : ball q (R / 2) ⊆ ball p (2 * R) := by + intro x hx + have hx' := mem_ball.mp hx + have hq' := mem_ball.mp hq + have ht := dist_triangle x q p + apply mem_ball.mpr + linarith + have hlocal := hu.restrict_ball (hausdorff n X) hX.quadratic hsub hδ.le hC + (ne_of_gt (hX.fullSupport q (R / 2) (by positivity))) + (ne_of_lt (hX.finiteOnBounded (ball q (R / 2)) isBounded_ball)) + (ne_of_gt (hX.fullSupport p (2 * R) (by positivity))) + (ne_of_lt (hX.finiteOnBounded (ball p (2 * R)) isBounded_ball)) (hvol q hq) + rw [hCd] at hlocal + have hcurv' : -d ≤ K * (R / 4) ^ 2 := by + by_cases hK : 0 ≤ K + · have hp := mul_nonneg hK (sq_nonneg (R / 4)) + linarith + · have hs : (R / 4) ^ 2 ≤ R ^ 2 := by nlinarith + have hm := mul_le_mul_of_nonpos_left hs (le_of_not_ge hK) + linarith + have hlocal' : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + q (2 * (R / 4)) d u v := by + convert hlocal using 1 + ring + apply hnormalize q (R / 4) (by positivity) hcurv' u v hlocal' + · intro s hs hsR + obtain ⟨f, hf⟩ := hflat q hq s hs hsR + exact ⟨f, hf.mono_error hδd⟩ + · exact hr + · linarith + +/-- The volume-ratio premise is supplied by Bishop--Gromov with a fixed +constant depending only on dimension. -/ +theorem uniform_controlled_coordinates_of_comparison {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) (hn : 2 ≤ m + 1) + (htrans : LocalTransformationInput hX) (hsplit : LocalFlatSplittingInput hX) + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + {ρ β : ℝ} (hρ : 0 < ρ) (hβ : 0 < β) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -δ ≤ K * R ^ 2 → + a * (3 * R) ≤ 1 → + ∀ (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + (v : X → Euclidean (m + 1)), + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 * R) δ u v → + (∀ q ∈ ball p (R / 4), ∀ s : ℝ, 0 < s → s ≤ R / 4 → + ∃ f : X → Euclidean (m + 1), IsPointedApproximation q 0 s 2 δ f) → + ∀ q ∈ ball p (R / 4), ∀ r : ℝ, 0 < r → 64 * r ≤ R → + ∃ A : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (ball q (16 * r)) measurableSet_ball A ∧ + FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic q (16 * r) β + (transformedColumn (hausdorff (m + 1) X) hX.quadratic u A) + (fun x => (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x)) ∧ + IsPointedApproximation q 0 r (1 / 2) ρ + (fun x => r⁻¹ • ((A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v x) - + (A : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1)).adjoint (v q))) := by + obtain ⟨δ, hδ, happly⟩ := uniform_controlled_coordinates hX hn htrans hsplit hρ hβ + (normalizationVolumeRatio_ge_one m) + refine ⟨δ, hδ, ?_⟩ + intro p R hR hcurv hscale u v hu hflat + exact happly p R hR hcurv u v hu + (fun q hq => nearby_normalization_volume_ratio m hX ha hBG hR hscale hq) hflat + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformNormalizedInnerTests.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformNormalizedInnerTests.lean new file mode 100644 index 0000000000000000000000000000000000000000..17050c8be6b12e1042368037112153059b3b4c70 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformNormalizedInnerTests.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.RCD.Sobolev.UniformPhysicalInnerTests +import OAI.Geometry.RCD.Metric.MeasuredAnnularMass +import OAI.Geometry.RCD.Coordinates.NormalizedQuotientError + +namespace OAI + +/-! # Uniform test convergence with the smaller ball's own normalization -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem uniform_normalized_inner_tests {n : ℕ} {S R : ℝ} + (hS : 0 (φ.norm_coe_le_norm z).trans hφn) + have hi' : |∫ z in ball (0:Euclidean n) R, φ z|≤VR := by + simpa only [VR,Real.norm_eq_abs,Measure.real,Measure.restrict_apply_univ,one_mul] using hi + change |VS⁻¹*(∫ z in ball (0:Euclidean n) R, φ z)|≤VS⁻¹*VR + rw [abs_mul,abs_of_pos (inv_pos.mpr hVS)] + exact mul_le_mul_of_nonneg_left hi' (inv_nonneg.mpr hVS.le) + have he := normalized_quotient_error hb hlk.le ha (ak:=ak) (bk:=bk) + have hea : |ak-a|<δ := htests φ hφ hφn + have heb : |bk-b|<δ := by simpa only [Real.dist_eq] using hmk + have hsmall : (2/b)*(|ak-a|+|bk-b|)<η := by + have hsum : |ak-a|+|bk-b|<2*δ := by linarith + have hx := mul_lt_mul_of_pos_left hsum (show 0<2/b from div_pos (by norm_num) hb) + have hval : (2/b)*(2*δ)=η/2 := by dsimp only [δ]; field_simp [hb.ne']; ring + rw [hval] at hx + exact hx.trans (half_lt_self hη) + have hbki : μ.real (ball (p k) (R*r k))≠0 := by + intro hz + have : bk=0 := by simp only [bk,hz,mul_zero] + change b/2 γ t) ≤ C • μ) + (_hD : MemLp (fun γ : C(Time, X) => dist (γ 0) (γ 1)) 2 π), + (∀ᵐ γ ∂π, dist (γ 0) (γ 1) ≤ δ) → ∀ t : Time, + ‖testPlanPullback μ π hC hcomp t G - testPlanPullback μ π hC hcomp 0 G‖ < ε := by + let A := C.toReal ^ (1 / (2 : ℝ≥0∞)).toReal + have hA : 0 ≤ A := Real.rpow_nonneg ENNReal.toReal_nonneg _ + let r := ε / (4 * (A + 1)) + have hr : 0 < r := div_pos hε (by positivity) + obtain ⟨f, hf, φ, L, hφ, hm, rfl⟩ := (Metric.dense_iff.mp (lp_lipschitz_dense μ)) G r hr + have hnear : ‖G - hm.toLp φ‖ < r := by + simpa only [Metric.mem_ball, dist_eq_norm, norm_sub_rev] using hf + let δ := ε / (2 * ((L : ℝ) + 1)) + have hδ : 0 < δ := div_pos hε (by positivity) + refine ⟨δ, hδ, ?_⟩ + intro π hπ hg hc hD hshort t + let := hπ + let T := testPlanPullback μ π hC hc + have hop (s : Time) (v : Lp ℝ 2 μ) : ‖T s v‖ ≤ A * ‖v‖ := + ((T s).le_opNorm v).trans (mul_le_mul_of_nonneg_right + (compressionPullback_norm_le μ π _ (measurable_path_eval s) hC (hc s)) (norm_nonneg v)) + have hDn : ‖hD.toLp (fun γ : C(Time, X) => dist (γ 0) (γ 1))‖ ≤ δ := by + have hh := Lp.norm_le_of_ae_bound hδ.le (show ∀ᵐ γ ∂π, + ‖hD.toLp (fun γ : C(Time, X) => dist (γ 0) (γ 1)) γ‖ ≤ δ from by + filter_upwards [hD.coeFn_toLp, hshort] with γ hγ hs + simpa only [hγ, Real.norm_eq_abs, abs_of_nonneg dist_nonneg] using hs) + simpa [measureUnivNNReal] using hh + have ht : dist t 0 ≤ (1 : ℝ) := by + change |(t : ℝ) - 0| ≤ 1 + simpa only [sub_zero, abs_of_nonneg t.2.1] using t.2.2 + have hmid : ‖T t (hm.toLp φ) - T 0 (hm.toLp φ)‖ ≤ (L : ℝ) * δ := by + have hh := (testPlanPullback_lipschitz μ π hg hC hc hD hφ hm).dist_le_mul t 0 + rw [dist_eq_norm] at hh + apply hh.trans + change (L : ℝ) * ‖hD.toLp (fun γ : C(Time, X) => dist (γ 0) (γ 1))‖ * dist t 0 ≤ _ + exact (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hDn L.coe_nonneg) + dist_nonneg).trans (mul_le_of_le_one_right (mul_nonneg L.coe_nonneg hδ.le) ht) + have hleft : ‖T t G - T t (hm.toLp φ)‖ ≤ A * r := by + rw [← map_sub] + exact (hop t _).trans (mul_le_mul_of_nonneg_left hnear.le hA) + have hright : ‖T 0 (hm.toLp φ) - T 0 G‖ ≤ A * r := by + rw [norm_sub_rev, ← map_sub] + exact (hop 0 _).trans (mul_le_mul_of_nonneg_left hnear.le hA) + have htotal : ‖T t G - T 0 G‖ ≤ A * r + (L : ℝ) * δ + A * r := by + calc + _ = ‖(T t G - T t (hm.toLp φ)) + (T t (hm.toLp φ) - T 0 (hm.toLp φ)) + + (T 0 (hm.toLp φ) - T 0 G)‖ := by congr 1; abel + _ ≤ _ := norm_add₃_le.trans (add_le_add (add_le_add hleft hmid) hright) + apply htotal.trans_lt + have hr_eq : 4 * (A + 1) * r = ε := by + dsimp only [r] + field_simp + have hδ_eq : 2 * ((L : ℝ) + 1) * δ = ε := by + dsimp only [δ] + field_simp + nlinarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformPolarizedError.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformPolarizedError.lean new file mode 100644 index 0000000000000000000000000000000000000000..72428eec190cedb9cf77c2f6b03b0bd493eeca08 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformPolarizedError.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.OperatorQuadraticDerivative +import OAI.Geometry.RCD.Coordinates.RegularHeatCutoff +import Mathlib.Topology.Order.LeftRightNhds + +namespace OAI + +/-! # Uniform operator control from finitely many scalar cutoff errors -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal + +noncomputable section + +namespace RegularPointCoordinates + +/-- Finitely many coordinate tests turn uniform scalar decay into uniform +operator decay; the scalar threshold may initially depend on the direction. -/ +theorem polarizedDerivative_uniformly_small {X : Type*} {n : ℕ} + (d : ℝ → X → Euclidean n → ℝ) (P : Set X) + (hd : ∀ v, ∀ η : ℝ, 0 < η → ∃ δ : ℝ, 0 < δ ∧ + ∀ t, 0 < t → t < δ → ∀ x ∈ P, |d t x v| < η) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ t, 0 < t → t < δ → ∀ x ∈ P, + ‖polarizedDerivative (d t x)‖ < ε := by + let C : ℝ := (n : ℝ) ^ 2 * (3 / 2) + have hC : 0 ≤ C := mul_nonneg (sq_nonneg _) (by norm_num) + let η := ε / (C + 1) + have hη : 0 < η := div_pos hε (by linarith) + have he (v : Euclidean n) : ∀ᶠ t in 𝓝[>] (0 : ℝ), ∀ x ∈ P, |d t x v| ≤ η := by + obtain ⟨δ, hδ, hb⟩ := hd v η hη + apply mem_nhdsGT_iff_exists_Ioo_subset.mpr + exact ⟨δ, hδ, fun t ht x hx => (hb t ht.1 ht.2 x hx).le⟩ + have hs : ∀ᶠ t in 𝓝[>] (0 : ℝ), ∀ i : Fin n, ∀ x ∈ P, + |d t x (EuclideanSpace.single i 1)| ≤ η := + Filter.eventually_all.mpr fun i => he (EuclideanSpace.single i 1) + have hp : ∀ᶠ t in 𝓝[>] (0 : ℝ), ∀ i j : Fin n, ∀ x ∈ P, + |d t x (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)| ≤ η := + Filter.eventually_all.mpr fun i => Filter.eventually_all.mpr fun j => + he (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) + have hsmall : ∀ᶠ t in 𝓝[>] (0 : ℝ), ∀ x ∈ P, + ‖polarizedDerivative (d t x)‖ < ε := by + filter_upwards [hs, hp] with t ht ht' x hx + have hb := polarizedDerivative_norm_le (d t x) hη.le + (fun i => ht i x hx) (fun i j => ht' i j x hx) + apply hb.trans_lt + change (n : ℝ) ^ 2 * (3 / 2 * η) < ε + have hlt : C * η < ε := by + dsimp only [η] + rw [← mul_div_assoc] + apply (div_lt_iff₀ (by linarith : 0 < C + 1)).mpr + nlinarith + simpa only [C, mul_assoc] using hlt + obtain ⟨δ, hδ, hb⟩ := mem_nhdsGT_iff_exists_Ioo_subset.mp hsmall + exact ⟨δ, hδ, fun t ht htδ => hb ⟨ht, htδ⟩⟩ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : MeasureTheory.Measure X) [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) {k : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel μ hQ k) + +/-- The operator cutoff error is built from the actual scalar product-rule +sources. It is not an additional analytic input. -/ +def harmonicHeatError {n : ℕ} {U : Euclidean n →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean n)} {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) (t : ℝ) (x : X) : + Euclidean n →L[ℝ] Euclidean n := + polarizedDerivative fun v => ∫ z, k t x z * + cutoffSourceDensity μ hQ (G v).energy χ.sobolev χ.laplacian z ∂μ + +include hk in +/-- Local Euclidean volume bounds make the canonical error uniformly +small in operator norm throughout the inner pole ball. -/ +theorem harmonicHeatError_uniformly_small (hg : HasCoordinateHeatBounds μ k) + {n : ℕ} {U : Euclidean n →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean n)} {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C D V : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) + (hρ : 0 < ρ) (hD : 0 < D) (hV : 0 < V) + (hvol : ∀ y, ρ ≤ dist p y → dist p y ≤ 2 * ρ → + ∀ s, 0 < s → s ≤ D → V * s ^ n ≤ μ.real (Metric.ball y s)) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ t, 0 < t → t < δ → ∀ x ∈ Metric.ball p (ρ / 2), + ‖harmonicHeatError μ hQ (k := k) G χ t x‖ < ε := by + apply polarizedDerivative_uniformly_small _ _ _ hε + intro v η hη + exact χ.heat_error_uniformly_small μ k hQ hk hg hρ hD hV n hvol (G v).energy hη + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformProductConvergence.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformProductConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..60b12dd881ddc0abc28e7485a930a0f53cafcbb9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformProductConvergence.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedUniformMean + +namespace OAI + +/-! # Products preserve uniform almost-everywhere convergence with bounded limits -/ + +open Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] + +theorem ae_uniform_product_convergence (μ : ℕ → Measure X) + (u w f g : ℕ → X → ℝ) {A B : ℝ} (hA : 0≤A) (hB : 0≤B) + (hf : ∀ k, ∀ᵐ x ∂μ k, |f k x|≤A) (hg : ∀ k, ∀ᵐ x ∂μ k, |g k x|≤B) + (hu : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |u k x-f k x|≤η) + (hw : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |w k x-g k x|≤η) : + ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂μ k, |u k x*w k x-f k x*g k x|≤η := by + intro η hη + let δ := min 1 (η/(A+B+1)) + have hC : 0 ne_of_lt (hX.finiteOnBounded (ball q r) isBounded_ball)) + let D := min D₁ D₂ + have hD : 0 < D := lt_min hD₁ hD₂ + refine ⟨D, hD, (min_le_left _ _).trans hD₁rho, ?_⟩ + intro q hq r0 hr0 hrD + have hq₁ : dist p q ≤ D₁ := hq.trans (min_le_left _ _) + have hq₂ : dist p q ≤ D₂ := hq.trans (min_le_right _ _) + have hrD₁ : r0 ≤ D₁ := hrD.trans (min_le_left _ _) + have hrD₂ : r0 ≤ D₂ := hrD.trans (min_le_right _ _) + obtain ⟨S, hsum, hsmall⟩ := hsource q hq₁ r0 hr0 hrD₁ + have hrone : r0 ≤ 1 := hrD₂.trans (hD₂cap.trans + ((min_le_right _ _).trans (min_le_left _ _))) + have hrcap : r0 ≤ 1 / (64 * (|K| + 1)) := hrD₂.trans (hD₂cap.trans + ((min_le_right _ _).trans (min_le_right _ _))) + have hradii (i : ℕ) : distanceSourceRadius r0 i ≤ r0 := by + have hh := distanceSourceRadius_outer_le hr0.le i + have hp := distanceSourceRadius_pos hr0 i + linarith + have hcurv (i : ℕ) : -1 ≤ K * (64 * distanceSourceRadius r0 i) ^ 2 := + curvature_bound_sixtyfour (distanceSourceRadius_pos hr0 i).le ((hradii i).trans hrcap) + have hann (i : ℕ) : + 0 < (hausdorff (m + 2) X).real (ball q (distanceSourceRadius r0 i)) ∧ + 2 * (hausdorff (m + 2) X).real (ball q (distanceSourceRadius r0 i)) ≤ + (hausdorff (m + 2) X).real (ball q (2 * distanceSourceRadius r0 i)) := by + apply relative_volume_annulus (n := m + 2) (by omega) (distanceSourceRadius_pos hr0 i) + (euclideanUnitVolume_pos (m + 2)) + · exact hvol q hq₂ _ (distanceSourceRadius_pos hr0 i) ((hradii i).trans hrD₂) + · exact hvol q hq₂ _ (mul_pos (by norm_num) (distanceSourceRadius_pos hr0 i)) + ((distanceSourceRadius_outer_le hr0.le i).trans hrD₂) + exact ⟨S, hreplace q r0 S hrone hcurv (fun i => (hann i).1) (fun i => (hann i).2), hsum, hsmall⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformRegularFlatnessInput.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformRegularFlatnessInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..3045653c5f704a94d1b9286b1d23d5fbad9a7cab --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformRegularFlatnessInput.lean @@ -0,0 +1,21 @@ +import OAI.Geometry.RCD.Metric.VolumeRigidityInput + +namespace OAI + +/-! # The precise local metric-flatness fact used by harmonic normalization -/ + +open Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +def UniformRegularFlatnessInput {K : ℝ} {n : ℕ} (_hX : NoncollapsedRCD K n X) : Prop := + ∀ p : X, IsRegular n p → ∀ θ : ℝ, 0 < θ → + ∃ D : ℝ, 0 < D ∧ ∀ q, dist p q ≤ D → ∀ r : ℝ, 0 < r → r ≤ D/4 → + ∃ f : X → Euclidean n, IsPointedApproximation q 0 r 2 θ f + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformRegularPoissonDefect.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformRegularPoissonDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..3524d39bde269eb9c8010af7d3c0e0147ab93bd9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformRegularPoissonDefect.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Coordinates.UniformRegularDistanceReplacements +import OAI.Geometry.RCD.Sobolev.PoissonDefectBudget + +namespace OAI + +/-! # A fixed Poisson family for arbitrarily small regular-neighborhood defects -/ + +open Set Metric MeasureTheory +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual replacements, their full source-plus-curvature budget and +the volume annulus needed for radial correction all hold in one neighborhood. +The constants precede the center and every smaller root radius. -/ +theorem regular_poisson_defect_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) {p : X} {a κ : ℝ} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) + (hsobolev : LocalDirichletSobolevInput hX) (hcutoff : LocalGoodCutoffInput hX) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J C : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ + ∀ rho eta : ℝ, 0 < rho → 0 < eta → ∃ D : ℝ, 0 < D ∧ D ≤ rho ∧ + ∀ q : X, dist p q ≤ D → ∀ r0 : ℝ, 0 < r0 → r0 ≤ D → + ∃ S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ q r0, + Nonempty (DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) ∧ + Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) ∧ + (∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S i) < eta ∧ + ∀ r : ℝ, 0 < r → r ≤ r0 → + |(hausdorff (m + 2) X).real (ball q r) / + (euclideanUnitVolume (m + 2) * r ^ (m + 2)) - 1| ≤ 1 / 4 := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨B, J, C, hB, hJ, hC, hreplacements⟩ := + regular_distance_replacements_uniform m hX ha hκ hK hcompact hregular hvolume hBG + hdensity hdistance hsobolev hcutoff + refine ⟨B, J, C, hB, hJ, hC, ?_⟩ + intro rho eta hrho heta + let omega := euclideanUnitVolume (m + 2) + have homega : 0 < omega := euclideanUnitVolume_pos _ + let F := κ * (2 * omega) / 3 + have hF : 0 ≤ F := by dsimp only [F]; positivity + let cap := min rho (Real.sqrt (eta / (4 * (F + 1)))) + have hcap : 0 < cap := lt_min hrho (Real.sqrt_pos.mpr (by positivity)) + obtain ⟨D₁, hD₁, hD₁cap, hdata⟩ := hreplacements cap (eta / 2) hcap (half_pos heta) + obtain ⟨D₂, hD₂, hD₂cap, hvol⟩ := exists_uniform_volume_neighborhood (m + 1) ha + homega (by norm_num : (0 : ℝ) < 1 / 4) (by norm_num : (1 / 4 : ℝ) ≤ 1) + hcap hcompact hregular hvolume hBG hdensity + (fun q r => ne_of_lt (hX.finiteOnBounded (ball q r) isBounded_ball)) + let D := min D₁ D₂ + have hD : 0 < D := lt_min hD₁ hD₂ + refine ⟨D, hD, (min_le_left _ _).trans (hD₁cap.trans (min_le_left _ _)), ?_⟩ + intro q hq r0 hr0 hrD + obtain ⟨S, hT, hsum, hsmall⟩ := hdata q (hq.trans (min_le_left _ _)) r0 hr0 + (hrD.trans (min_le_left _ _)) + have hlocal (r : ℝ) (hr : 0 < r) (hrr : r ≤ r0) : + |(hausdorff (m + 2) X).real (ball q r) / (omega * r ^ (m + 2)) - 1| ≤ 1 / 4 := + hvol q (hq.trans (min_le_right _ _)) r hr + (hrr.trans (hrD.trans (min_le_right _ _))) + have hnormalized (i : ℕ) : + (distanceSourceRadius r0 i) ^ (-((m + 2 : ℕ) : ℝ)) * + (hausdorff (m + 2) X).real (ball q (distanceSourceRadius r0 i)) ≤ 2 * omega := by + have hs := distanceSourceRadius_pos hr0 i + have hsle : distanceSourceRadius r0 i ≤ r0 := by + have hh := distanceSourceRadius_outer_le hr0.le i + linarith + have hv := (normalized_volume_bounds hs homega (hlocal _ hs hsle)).2 + linarith + obtain ⟨hPsum, hPbound⟩ := S.poisson_defect_budget (hausdorff (m + 2) X) + hX.quadratic hκ (by positivity : 0 ≤ 2 * omega) hsum hnormalized + have hroot : r0 ≤ Real.sqrt (eta / (4 * (F + 1))) := + hrD.trans ((min_le_left _ _).trans (hD₁cap.trans (min_le_right _ _))) + have hrootsq : r0 ^ 2 ≤ eta / (4 * (F + 1)) := by + have hh := (sq_le_sq₀ hr0.le (Real.sqrt_nonneg _)).mpr hroot + rwa [Real.sq_sqrt (by positivity : 0 ≤ eta / (4 * (F + 1)))] at hh + have hcurv : κ * (2 * omega) * r0 ^ 2 / 3 ≤ eta / 4 := by + have hh := (le_div_iff₀ (by positivity : 0 < 4 * (F + 1))).mp hrootsq + rw [show κ * (2 * omega) * r0 ^ 2 / 3 = F * r0 ^ 2 by dsimp only [F]; ring] + nlinarith [sq_nonneg r0] + exact ⟨S, hT, hPsum, by linarith, hlocal⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UniformTransformation.lean b/lean/OAI/Geometry/RCD/Coordinates/UniformTransformation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b62a3c85e457c9ba08754899db507378d7aabefb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UniformTransformation.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Coordinates.FirstFailingSequence + +namespace OAI + +/-! # Uniform transformation from the first-failure contradiction -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.uniform_transformation_of_measured {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hMeasured : LocalMeasuredCoordinateInput hX) (β : ℝ) (hβ : 0 < β) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (p : X) (R : ℝ), 0 < R → -δ ≤ K*R^2 → a*(3*R) ≤ 1 → + ∀ (u : Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) (v : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic p (2*R) δ u v → + (∀ t : ℝ, 0 < t → t ≤ R → + ∃ f : X → Euclidean (m+1), IsPointedApproximation p 0 t 1 δ f) → + ∀ t : ℝ, 0 < t → t ≤ R → ∃ A : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic p t β + (transformedColumn (hausdorff (m+1) X) hX.quadratic u A) + (fun x => (A : Euclidean (m+1) →L[ℝ] Euclidean (m+1)).adjoint (v x)) ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) (ball p t) measurableSet_ball A := by + classical + let C := ((m+1 : ℕ) : ℝ)^2*normalizationVolumeRatio m + have hC : 0 ≤ C := by + dsimp only [C,normalizationVolumeRatio] + positivity + let κ := 1/(4*(C+1)) + have hκ : 0 < κ := by dsimp only [κ]; positivity + have hκid : 4*(C+1)*κ=1 := by dsimp only [κ]; field_simp + have hκ1 : κ ≤ 1 := by nlinarith [mul_nonneg hC hκ.le] + have hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2 := by + calc + _ = C*κ := by dsimp only [C]; ring + _ ≤ 1/2 := by nlinarith [mul_nonneg hC hκ.le] + obtain ⟨γ₀,hγ₀,hno⟩ := hX.no_first_failing_sequence m hm ha hBG hMeasured hκ hκ1 hsmall + obtain ⟨η,hη,_,hfail⟩ := hX.first_failing_dyadic_scale hm β hβ + let γ := min γ₀ η + have hγ : 0 < γ := lt_min hγ₀ hη + let c := min γ (1/4) + have hc : 0 < c := lt_min hγ (by norm_num) + by_contra hnot + push Not at hnot + let ε := fun k : ℕ => min c (1/((k : ℝ)+1)) + have hεpos (k : ℕ) : 0 < ε k := lt_min hc (by positivity) + have hεγ (k : ℕ) : ε k ≤ γ := (min_le_left _ _).trans (min_le_left _ _) + have hεquarter (k : ℕ) : ε k ≤ 1/4 := (min_le_left _ _).trans (min_le_right _ _) + have hεlim : Tendsto ε atTop (𝓝 0) := squeeze_zero (fun k => (hεpos k).le) + (fun _ => min_le_right _ _) tendsto_one_div_add_atTop_nhds_zero_nat + have hex (k : ℕ) := hnot (ε k) (hεpos k) + choose p R hR hK hscale u v hfirst hflat t ht htR hbad using hex + have hK2 (k : ℕ) : -1 ≤ K*(2*R k)^2 := by + nlinarith [hK k,hεquarter k] + have hγfirst (k : ℕ) : FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic + (p k) (2*R k) γ (u k) (v k) := + (hfirst k).mono_error _ _ (hεpos k).le (hεγ k) + have hdfail (k : ℕ) := hfail γ hγ.le (min_le_right _ _) (p k) (R k) (hR k) (hK2 k) + (u k) (v k) (hγfirst k) ⟨t k,ht k,htR k,by + rintro ⟨A,hA,hAn⟩ + exact hbad k A hA hAn⟩ + choose d hd hbefore using hdfail + have hdlim := hX.failing_depth_tends_to_infinity hm γ hγ p R ε u v d hR hK2 + (fun k => (hεpos k).le) hεlim hfirst hd + obtain ⟨N,hN⟩ := eventually_atTop.mp (hdlim.eventually (eventually_ge_atTop 2)) + let α := fun k : ℕ => k+N + have hα : Tendsto α atTop atTop := tendsto_add_atTop_nat N + apply hno γ hγ (min_le_left _ _) (p∘α) (R∘α) (ε∘α) (d∘α) + (fun k => hR (α k)) (fun k => hN (α k) (Nat.le_add_left N k)) (hdlim.comp hα) + (fun k => hK2 (α k)) _ (fun k => hscale (α k)) (hεlim.comp hα) + (fun k => hflat (α k)) (u∘α) (v∘α) (fun k => hfirst (α k)) + (fun k => hbefore (α k)) (fun k => hd (α k)) + intro δ hδ + filter_upwards [(hεlim.comp hα).eventually (eventually_lt_nhds hδ)] with k hk + have hh := hK (α k) + change ε (α k) < δ at hk + change -δ ≤ K*(R (α k))^2 + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/UnitCoordinateDirections.lean b/lean/OAI/Geometry/RCD/Coordinates/UnitCoordinateDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d14bf9bc54baee6078ed7e97e53ff735e3849cf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/UnitCoordinateDirections.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Harmonic.HomogeneousAffineImprovement + +namespace OAI + +/-! # The finite unit directions used to identify the coordinate Gram matrix -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem coordinate_projection_norm {n : ℕ} (i : Fin n) : + ‖(EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)‖=1 := by + apply le_antisymm + · exact ContinuousLinearMap.opNorm_le_bound _ zero_le_one + (fun z => by simpa using PiLp.norm_apply_le z i) + · have h := (EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ).le_opNorm + (EuclideanSpace.single i 1) + simpa using h + +theorem coordinate_pair_unit_norm {n : ℕ} (i j : Fin n) (hij : i≠j) : + ‖(Real.sqrt 2)⁻¹ • ((EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)+EuclideanSpace.proj j)‖=1 := by + let ei : Euclidean n := EuclideanSpace.single i 1 + let ej : Euclidean n := EuclideanSpace.single j 1 + have heq : ((EuclideanSpace.proj i : Euclidean n →L[ℝ] ℝ)+EuclideanSpace.proj j)= + innerSL ℝ (ei+ej) := by + ext z + simp [ei,ej,EuclideanSpace.inner_single_left] + have hs : ‖ei+ej‖^2=2 := by + rw [norm_add_sq_real] + norm_num [ei,ej,EuclideanSpace.inner_single_left,hij] + have hsn : ‖ei+ej‖=Real.sqrt 2 := by + nlinarith [norm_nonneg (ei+ej),Real.sqrt_nonneg 2,Real.sq_sqrt (by norm_num : (0:ℝ)≤2)] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (by positivity),heq,innerSL_apply_norm,hsn] + exact inv_mul_cancel₀ (ne_of_gt (Real.sqrt_pos.mpr (by norm_num))) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem harmonicTargetNorm_add_le {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (p : X) (r : ℝ) (f g : SobolevSpace (hausdorff n X) hX.quadratic) : + harmonicTargetNorm hX p r (f+g)≤harmonicTargetNorm hX p r f+harmonicTargetNorm hX p r g := by + unfold harmonicTargetNorm + rw [map_add] + unfold normalizeLocalL2 + rw [smul_add] + exact norm_add_le _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/ValueLimitNormalization.lean b/lean/OAI/Geometry/RCD/Coordinates/ValueLimitNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..dac37216688893692c6c3866f706ff213066113f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/ValueLimitNormalization.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Metric.MeasuredValueLimitNorm +import OAI.Geometry.RCD.Harmonic.HarmonicAffineImprovement + +namespace OAI + +/-! # The exact Euclidean L2 normalization of an actual Sobolev value limit -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.value_limit_normalized {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S : ℝ} (hS : 0 (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k)) g hgm + (fun k => (Lp.memLp (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k))).mono_measure + Measure.restrict_le_self) + (fun k => sobolev_mean_sq_le_one_of_normalized (hausdorff n X) hX.quadratic + (ball (p k) (S*r k)) (hX.finiteOnBounded _ isBounded_ball).ne (u k) (hnorm k)) hg hconv + refine ⟨hLp,?_⟩ + have hsq := normalizeLocalL2_norm_sq volume (ball (0:Euclidean n) S) + measure_ball_ne_top (hLp.toLp g) + have he : (∫ z in ball 0 S, ((hLp.toLp g) z)^2)=∫ z in ball 0 S, (g z)^2 := by + apply integral_congr_ae + filter_upwards [MemLp.coeFn_toLp hLp] with z hz + rw [hz] + rw [he] at hsq + nlinarith [norm_nonneg (normalizeLocalL2 volume (ball 0 S) measure_ball_ne_top (hLp.toLp g))] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/VanishingDiagonalCost.lean b/lean/OAI/Geometry/RCD/Coordinates/VanishingDiagonalCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..56eb21922a2cdad93dbe32cbc184767f7ddf6aed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/VanishingDiagonalCost.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.RCD.Coordinates.VanishingRadiusCost + +namespace OAI + +/-! # A slowly varying level retaining vanishing nonnegative costs -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem exists_vanishing_diagonal_cost (e : ℕ → ℕ → ℝ) + (he : ∀ m k, 0 ≤ e m k) + (hlim : ∀ m, Tendsto (e m) atTop (𝓝 0)) : + ∃ d : ℕ → ℕ, Tendsto d atTop atTop ∧ + Tendsto (fun k => e (d k) k) atTop (𝓝 0) := by + let P (m k : ℕ) := e m k ≤ ((m:ℝ)+2)⁻¹ + have hP (m : ℕ) : ∀ᶠ k in atTop, P m k := + ((hlim m).eventually (Iio_mem_nhds (by positivity : (0:ℝ)<((m:ℝ)+2)⁻¹))).mono + (fun _ hk => hk.le) + obtain ⟨d,hd,hbound⟩ := exists_eventual_diagonal_level P hP + refine ⟨d,hd,?_⟩ + have htop : Tendsto (fun k => (d k:ℝ)+2) atTop atTop := + tendsto_atTop_add_const_right _ _ (tendsto_natCast_atTop_atTop.comp hd) + exact squeeze_zero' (Eventually.of_forall (fun k => he (d k) k)) hbound + (tendsto_inv_atTop_zero.comp htop) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/VanishingRadiusCost.lean b/lean/OAI/Geometry/RCD/Coordinates/VanishingRadiusCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a17bb4246a86f1cea8d0aaa50225f5917733ce3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/VanishingRadiusCost.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Sobolev.EventualDiagonalLevel +import OAI.Geometry.RCD.Coordinates.NormalizedL2ProductError + +namespace OAI + +/-! # Shrinking endpoint balls while their normalized error cost vanishes -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem exists_vanishing_radius_cost (e : ℕ → ℝ) (he : ∀ k, 0 ≤ e k) + (he0 : Tendsto e atTop (𝓝 0)) (n : ℕ) : + ∃ δ : ℕ → ℝ, (∀ k, 0 < δ k ∧ δ k ≤ 1/2) ∧ + Tendsto δ atTop (𝓝 0) ∧ + Tendsto (fun k => e k/(δ k)^n) atTop (𝓝 0) := by + let P (m k : ℕ) := e k*((m:ℝ)+2)^n ≤ ((m:ℝ)+2)⁻¹ + have hP (m : ℕ) : ∀ᶠ k in atTop, P m k := by + have hh : Tendsto (fun k => e k*((m:ℝ)+2)^n) atTop (𝓝 0) := by + simpa only [zero_mul] using he0.mul_const (((m:ℝ)+2)^n) + exact (hh.eventually (Iio_mem_nhds (by positivity : (0:ℝ)<((m:ℝ)+2)⁻¹))).mono + (fun _ hk => hk.le) + obtain ⟨d,hd,hbound⟩ := exists_eventual_diagonal_level P hP + let δ (k : ℕ) := ((d k:ℝ)+2)⁻¹ + have hδ (k : ℕ) : 0 < δ k ∧ δ k ≤ 1/2 := by + dsimp only [δ] + constructor + · positivity + · rw [one_div] + exact inv_anti₀ (by norm_num) (by have hh : (0:ℝ) ≤ d k := Nat.cast_nonneg _; linarith) + have htop : Tendsto (fun k => (d k:ℝ)+2) atTop atTop := + tendsto_atTop_add_const_right _ _ (tendsto_natCast_atTop_atTop.comp hd) + have hδ0 : Tendsto δ atTop (𝓝 0) := tendsto_inv_atTop_zero.comp htop + refine ⟨δ,hδ,hδ0,?_⟩ + apply squeeze_zero' (Eventually.of_forall (fun k => div_nonneg (he k) (pow_nonneg (hδ k).1.le n))) + ?_ hδ0 + filter_upwards [hbound] with k hk + change e k*((d k:ℝ)+2)^n ≤ ((d k:ℝ)+2)⁻¹ at hk + simpa only [δ,inv_pow,div_inv_eq_mul] using hk + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/VolumeProfileRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/VolumeProfileRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..9277dd79c13fcade93a9f6e42040770a41826554 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/VolumeProfileRegularity.lean @@ -0,0 +1,158 @@ +import OAI.Geometry.RCD.Metric.ComparisonModel +import Mathlib.MeasureTheory.Integral.IntervalIntegral.AbsolutelyContinuousFun + +namespace OAI + +/-! +# Absolute continuity of the Euclidean-normalized volume profile + +Bishop--Gromov and a positive Lipschitz comparison model make ball volume +Lipschitz on every compact interval of positive radii. Multiplication by the +smooth Euclidean normalization then gives the absolute continuity needed by +the radial source budget. +-/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal NNReal Topology + +noncomputable section + +namespace RegularPointCoordinates + +theorem volume_profile_lipschitzOn {V model : ℝ → ℝ} {a b m0 V0 : ℝ} + (hm0 : 0 < m0) (hV0 : 0 ≤ V0) (K : ℝ≥0) + (hVmono : MonotoneOn V (Icc a b)) (hVnonneg : ∀ t ∈ Icc a b, 0 ≤ V t) + (hVupper : ∀ t ∈ Icc a b, V t ≤ V0) + (hmodel : ∀ t ∈ Icc a b, m0 ≤ model t) + (hLip : LipschitzOnWith K model (Icc a b)) + (hcross : ∀ s ∈ Icc a b, ∀ t ∈ Icc a b, s ≤ t → V t * model s ≤ V s * model t) : + LipschitzOnWith ⟨V0 * K / m0, by positivity⟩ V (Icc a b) := by + let C : ℝ≥0 := ⟨V0 * K / m0, by positivity⟩ + have hdelta (s : ℝ) (hs : s ∈ Icc a b) (t : ℝ) (ht : t ∈ Icc a b) (hst : s ≤ t) : + V t - V s ≤ C * (t - s) := by + have hinc : 0 ≤ V t - V s := sub_nonneg.mpr (hVmono hs ht hst) + have hml := hLip.dist_le_mul t ht s hs + rw [Real.dist_eq, Real.dist_eq, abs_of_nonneg (sub_nonneg.mpr hst)] at hml + have hb : (V t - V s) * m0 ≤ V0 * K * (t - s) := by + calc + _ ≤ (V t - V s) * model s := mul_le_mul_of_nonneg_left (hmodel s hs) hinc + _ ≤ V s * (model t - model s) := by nlinarith [hcross s hs t ht hst] + _ ≤ V s * |model t - model s| := + mul_le_mul_of_nonneg_left (le_abs_self _) (hVnonneg s hs) + _ ≤ V s * (K * (t - s)) := mul_le_mul_of_nonneg_left hml (hVnonneg s hs) + _ ≤ V0 * K * (t - s) := by + have hh := mul_le_mul_of_nonneg_right (hVupper s hs) + (mul_nonneg K.coe_nonneg (sub_nonneg.mpr hst)) + simpa only [mul_assoc] using hh + have hd := (le_div_iff₀ hm0).mpr hb + exact hd.trans_eq (by + change V0 * (K : ℝ) * (t - s) / m0 = (V0 * (K : ℝ) / m0) * (t - s) + ring) + have hordered (s : ℝ) (hs : s ∈ Icc a b) (t : ℝ) (ht : t ∈ Icc a b) (hst : s ≤ t) : + dist (V s) (V t) ≤ C * dist s t := by + have hv := hVmono hs ht hst + simpa only [Real.dist_eq, abs_of_nonpos (sub_nonpos.mpr hv), + abs_of_nonpos (sub_nonpos.mpr hst), neg_sub] using hdelta s hs t ht hst + apply LipschitzOnWith.of_dist_le_mul + intro s hs t ht + rcases le_total s t with hst | hts + · exact hordered s hs t ht hst + · simpa only [dist_comm] using hordered t ht s hs hts + +/-- The fixed negative-curvature comparison volume is continuously differentiable. -/ +theorem contDiff_one_comparisonModelVolume (m : ℕ) (c : ℝ) : + ContDiff ℝ 1 (comparisonModelVolume m c) := by + have hcont : Continuous (fun t => radialComparison c t ^ m) := + (continuous_radialComparison c).pow m + have hd (r : ℝ) : HasDerivAt (comparisonModelVolume m c) + ((m + 1 : ℝ) * radialComparison c r ^ m) r := by + change HasDerivAt (fun r => (m + 1 : ℝ) * ∫ t in 0..r, radialComparison c t ^ m) _ r + exact (intervalIntegral.integral_hasDerivAt_right (hcont.intervalIntegrable 0 r) + hcont.aestronglyMeasurable.stronglyMeasurableAtFilter hcont.continuousAt).const_mul _ + apply contDiff_one_iff_deriv.mpr + refine ⟨fun r => (hd r).differentiableAt, ?_⟩ + have he : deriv (comparisonModelVolume m c) = fun r => (m + 1 : ℝ) * radialComparison c r ^ m := + funext fun r => (hd r).deriv + rw [he] + exact continuous_const.mul hcont + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +/-- Ball volume is absolutely continuous away from radius zero under the +published Bishop--Gromov comparison with the explicit model. -/ +theorem ball_volume_absolutelyContinuous {μ : Measure X} (m : ℕ) {c : ℝ} (hc : 0 ≤ c) + (hBG : BallVolumeComparison μ (comparisonModelVolume m c)) (x : X) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) (hfin : μ (ball x b) ≠ ∞) : + AbsolutelyContinuousOnInterval (fun t => μ.real (ball x t)) a b := by + have hb : 0 < b := ha.trans_le hab + let model := comparisonModelVolume m c + obtain ⟨K, hK⟩ := (contDiff_one_comparisonModelVolume m c).contDiffOn.exists_lipschitzOnWith + (s := Icc a b) (by decide) (convex_Icc a b) isCompact_Icc + have hmono : MonotoneOn (fun t => μ.real (ball x t)) (Icc a b) := by + intro s hs t ht hst + exact measureReal_mono (ball_subset_ball hst) + (measure_ne_top_of_subset (ball_subset_ball ht.2) hfin) + have hupper (t : ℝ) (ht : t ∈ Icc a b) : μ.real (ball x t) ≤ μ.real (ball x b) := + measureReal_mono (ball_subset_ball ht.2) hfin + have hmodel (t : ℝ) (ht : t ∈ Icc a b) : a ^ (m + 1) ≤ model t := by + exact (pow_le_pow_left₀ ha.le ht.1 _).trans + (comparisonModelVolume_bounds m hc (ha.le.trans ht.1)).1 + have hcross (s : ℝ) (hs : s ∈ Icc a b) (t : ℝ) (_ht : t ∈ Icc a b) (hst : s ≤ t) : + μ.real (ball x t) * model s ≤ μ.real (ball x s) * model t := + hBG x s t (ha.trans_le hs.1) hst + have hLip := volume_profile_lipschitzOn (pow_pos ha _) measureReal_nonneg K hmono + (fun _ _ => measureReal_nonneg) hupper hmodel hK hcross + rw [← uIcc_of_le hab] at hLip + exact hLip.absolutelyContinuousOnInterval + +/-- Euclidean-normalized volume retains absolute continuity on positive +radius intervals; this does not assume monotonicity of that normalization. -/ +theorem normalized_ball_volume_absolutelyContinuous {μ : Measure X} (m : ℕ) {c : ℝ} (hc : 0 ≤ c) + (hBG : BallVolumeComparison μ (comparisonModelVolume m c)) (x : X) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) (hfin : μ (ball x b) ≠ ∞) : + AbsolutelyContinuousOnInterval (fun t => μ.real (ball x t) / t ^ (m + 1)) a b := by + have hV := ball_volume_absolutelyContinuous m hc hBG x ha hab hfin + have hpow : ContDiffOn ℝ 1 (fun t : ℝ => (t ^ (m + 1))⁻¹) (uIcc a b) := by + apply (contDiffOn_id.pow (m + 1)).inv + intro t ht + rw [uIcc_of_le hab] at ht + exact pow_ne_zero _ (ne_of_gt (ha.trans_le ht.1)) + have hm := hV.mul hpow.absolutelyContinuousOnInterval + change AbsolutelyContinuousOnInterval + (fun t => μ.real (ball x t) * (t ^ (m + 1))⁻¹) a b at hm + simpa only [div_eq_mul_inv] using hm + +variable [BorelSpace X] [ProperSpace X] {μ : Measure X} [IsFiniteMeasureOnCompacts μ] + +/-- Bishop--Gromov with a positive continuous model excludes mass on every +positive-radius sphere, not merely almost every sphere. -/ +theorem sphere_measure_zero_of_comparison {model : ℝ → ℝ} + (hBG : BallVolumeComparison μ model) (hcont : Continuous model) + (x : X) {r : ℝ} (hr : 0 < r) (hmodel : 0 < model r) : μ (sphere x r) = 0 := by + have hle : μ.real (closedBall x r) * model r ≤ μ.real (ball x r) * model r := by + have ht : Tendsto (fun i : ℕ => r + 1 / ((i : ℝ) + 1)) atTop (𝓝 r) := by + simpa only [add_zero] using tendsto_one_div_add_atTop_nhds_zero_nat.const_add r + apply ge_of_tendsto (tendsto_const_nhds.mul (hcont.continuousAt.tendsto.comp ht)) + apply Eventually.of_forall + intro i + have hd : r < r + 1 / ((i : ℝ) + 1) := lt_add_of_pos_right _ (by positivity) + calc + μ.real (closedBall x r) * model r ≤ + μ.real (ball x (r + 1 / ((i : ℝ) + 1))) * model r := + mul_le_mul_of_nonneg_right + (measureReal_mono (closedBall_subset_ball hd) measure_ball_lt_top.ne) hmodel.le + _ ≤ _ := hBG x r _ hr hd.le + have hreal : μ.real (closedBall x r) = μ.real (ball x r) := + le_antisymm ((mul_le_mul_iff_left₀ hmodel).mp hle) + (measureReal_mono ball_subset_closedBall (isCompact_closedBall x r).measure_ne_top) + have hm : μ (closedBall x r) = μ (ball x r) := + (measureReal_eq_measureReal_iff (isCompact_closedBall x r).measure_ne_top + measure_ball_lt_top.ne).mp hreal + rw [← closedBall_sdiff_ball, measure_sdiff ball_subset_closedBall + isOpen_ball.measurableSet.nullMeasurableSet measure_ball_lt_top.ne, hm, tsub_self] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/VolumeRegularity.lean b/lean/OAI/Geometry/RCD/Coordinates/VolumeRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..84078cc77c61aed3f32bf18296cf742bea6fd56e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/VolumeRegularity.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Metric.VolumeDerivative + +namespace OAI + +/-! # Absolute continuity of radial ball volumes from CD alone -/ + +open Set Metric MeasureTheory + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.ball_volume_absolutelyContinuous {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) + {u v : ℝ} (hu : 0 < u) (huv : u ≤ v) : + AbsolutelyContinuousOnInterval (fun r => (hausdorff n X).real (ball p r)) u v := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + by_cases hK : 0 ≤ K + · exact RegularPointCoordinates.ball_volume_absolutelyContinuous (n - 1) (by norm_num) + (hX.zero_model_ballVolumeComparison hn hK) p hu huv + (hX.finiteOnBounded _ isBounded_ball).ne + have hKneg : K < 0 := lt_of_not_ge hK + let a := Real.sqrt (-K / ((n : ℝ) - 1)) + let model : ℝ → ℝ := fun r => r * Real.sinh (r * a) ^ (n - 1) + have hn1 : (1 : ℝ) < n := by exact_mod_cast (show 1 < n by omega) + have ha : 0 < a := Real.sqrt_pos.mpr (div_pos (neg_pos.mpr hKneg) (sub_pos.mpr hn1)) + have hmodel : ContDiff ℝ 1 model := by dsimp only [model]; fun_prop + obtain ⟨L, hL⟩ := hmodel.contDiffOn.exists_lipschitzOnWith + (s := Icc u v) (by decide) (convex_Icc u v) isCompact_Icc + have hm0 : 0 < model u := mul_pos hu (pow_pos (Real.sinh_pos_iff.mpr (mul_pos hu ha)) _) + have hVmono : MonotoneOn (fun r => (hausdorff n X).real (ball p r)) (Icc u v) := by + intro r hr s hs hrs + exact measureReal_mono (ball_subset_ball hrs) (hX.finiteOnBounded _ isBounded_ball).ne + have hVupper (r : ℝ) (hr : r ∈ Icc u v) : + (hausdorff n X).real (ball p r) ≤ (hausdorff n X).real (ball p v) := + measureReal_mono (ball_subset_ball hr.2) (hX.finiteOnBounded _ isBounded_ball).ne + have hmlower (r : ℝ) (hr : r ∈ Icc u v) : model u ≤ model r := by + have hs : 0 < Real.sinh (u * a) := Real.sinh_pos_iff.mpr (mul_pos hu ha) + have hmon := Real.sinh_le_sinh.mpr (mul_le_mul_of_nonneg_right hr.1 ha.le) + exact mul_le_mul hr.1 (pow_le_pow_left₀ hs.le hmon _) + (pow_nonneg hs.le _) (hu.le.trans hr.1) + have hBG := hX.cd.hyperbolic_radial_ballVolumeComparison (hausdorff n X) + hX.fullSupport hX.finiteOnBounded hn hKneg + have hcross (r : ℝ) (hr : r ∈ Icc u v) (s : ℝ) (_hs : s ∈ Icc u v) (hrs : r ≤ s) : + (hausdorff n X).real (ball p s) * model r ≤ + (hausdorff n X).real (ball p r) * model s := hBG p r s (hu.trans_le hr.1) hrs + have hLip := volume_profile_lipschitzOn hm0 measureReal_nonneg L hVmono + (fun _ _ => measureReal_nonneg) hVupper hmlower hL hcross + rw [← uIcc_of_le huv] at hLip + exact hLip.absolutelyContinuousOnInterval + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/VolumeRigidityMain.lean b/lean/OAI/Geometry/RCD/Coordinates/VolumeRigidityMain.lean new file mode 100644 index 0000000000000000000000000000000000000000..f90b9cb12fc5787146f73a5620d5511aa18c9f61 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/VolumeRigidityMain.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Coordinates.RegularVolumeConvergence +import OAI.Geometry.RCD.Coordinates.TwoGeometricInputs + +namespace OAI + +/-! # Regular-point charts under local volume rigidity + +Absolute regular-point volume convergence follows from first-order +coordinate maps and their image mass. The local volume rigidity +hypothesis is De Philippis--Gigli (2018), Theorem 1.6. +-/ + +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem regular_coordinates_of_volume_rigidity {K : ℝ} {n : ℕ} + (hn : 2≤n) (hX : NoncollapsedRCD K n X) : + let _ := hX.properSpace hn + ∀ {p : X}, IsRegular n p → LocalVolumeRigidityInput hX → HasOpenBilipschitzChart n p := by + let := hX.properSpace hn + dsimp only + intro p hp hrigidity + exact regular_coordinates_of_two_geometric_inputs hn hX hp + (hX.regular_volume_convergence hn hp) hrigidity + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedBilinearMeasure.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedBilinearMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..562a287aacc34a35a970291a47ab12107e5bd8cb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedBilinearMeasure.lean @@ -0,0 +1,177 @@ +import OAI.Geometry.RCD.Coordinates.PositiveBilinearMeasure +import Mathlib.MeasureTheory.VectorMeasure.Integral +import Mathlib.MeasureTheory.VectorMeasure.Variation.SignedMeasure +import Mathlib.Topology.ContinuousMap.Bounded.Normed + +namespace OAI + +/-! +# Integrating full positive measure-valued forms + +Bounded continuous weights act on the full signed measures. In particular, +their singular parts contribute to every weighted quadratic form. These +constructions do not assert existence of the local Bochner measure. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace BoundedContinuousFunction + +noncomputable section + +namespace RegularPointCoordinates +namespace PositiveBilinearMeasure + +variable {X E : Type*} [TopologicalSpace X] [MeasurableSpace X] [BorelSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + (M : PositiveBilinearMeasure X E) + +theorem integrable_weight (w : X →ᵇ ℝ) (ν : SignedMeasure X) : + ν.Integrable w := by + let : IsFiniteMeasure ν.variation := by + rw [← ν.totalVariation_eq_variation] + infer_instance + exact Integrable.of_bound w.continuous.aestronglyMeasurable ‖w‖ + (Filter.Eventually.of_forall w.norm_coe_le_norm) + +/-- Integration is bilinear in the coordinate directions, including the +off-diagonal signed measures. -/ +def weightedBilinear (w : X →ᵇ ℝ) : E →ₗ[ℝ] E →ₗ[ℝ] ℝ := + LinearMap.mk₂ ℝ (fun v z => ∫ᵛ x, w x ∂<•(M.bilinear v z)) + (by + intro u v z + rw [map_add, LinearMap.add_apply] + exact VectorMeasure.integral_add_vectorMeasure + (integrable_weight w _) (integrable_weight w _)) + (by intro c v z; simp) + (by + intro u v z + rw [map_add] + exact VectorMeasure.integral_add_vectorMeasure + (integrable_weight w _) (integrable_weight w _)) + (by intro c v z; simp) + +def weightedContinuous (w : X →ᵇ ℝ) : E →L[ℝ] E →L[ℝ] ℝ := + ((LinearMap.toContinuousLinearMap : (E →ₗ[ℝ] ℝ) ≃ₗ[ℝ] (E →L[ℝ] ℝ)).toLinearMap.comp + (M.weightedBilinear w)).toContinuousLinearMap + +def weightedOperator (w : X →ᵇ ℝ) : E →L[ℝ] E := + InnerProductSpace.continuousLinearMapOfBilin (M.weightedContinuous w) + +theorem weightedOperator_inner (w : X →ᵇ ℝ) (v z : E) : + ⟪M.weightedOperator w v, z⟫_ℝ = ∫ᵛ x, w x ∂<•(M.bilinear v z) := + InnerProductSpace.continuousLinearMapOfBilin_apply _ _ _ + +omit [TopologicalSpace X] [BorelSpace X] [FiniteDimensional ℝ E] in +theorem measure_toSignedMeasure (v : E) : + (M.measure v).toSignedMeasure = M.bilinear v v := + SignedMeasure.toMeasureOfZeroLE_toSignedMeasure _ _ + +/-- Diagonal weighted forms are ordinary integrals against the actual +positive measure, without discarding singular mass. -/ +theorem weightedOperator_energy (w : X →ᵇ ℝ) (v : E) : + ⟪v, M.weightedOperator w v⟫_ℝ = ∫ x, w x ∂(M.measure v) := by + rw [real_inner_comm, weightedOperator_inner, ← M.measure_toSignedMeasure v] + exact VectorMeasure.integral_toSignedMeasure + +/-- A real weighted measure-valued form stays symmetric even when the +weight changes sign. -/ +theorem weightedOperator_isSymmetric (w : X →ᵇ ℝ) : + (M.weightedOperator w).IsSymmetric := by + intro v z + change ⟪M.weightedOperator w v, z⟫_ℝ = ⟪v, M.weightedOperator w z⟫_ℝ + calc + _ = ∫ᵛ x, w x ∂<•(M.bilinear v z) := M.weightedOperator_inner w v z + _ = ∫ᵛ x, w x ∂<•(M.bilinear z v) := by rw [M.symmetric v z] + _ = ⟪M.weightedOperator w z, v⟫_ℝ := (M.weightedOperator_inner w z v).symm + _ = _ := real_inner_comm _ _ + +theorem weightedOperator_isPositive (w : X →ᵇ ℝ) (hw : ∀ x, 0 ≤ w x) : + (M.weightedOperator w).IsPositive := by + constructor + · intro v z + change ⟪M.weightedOperator w v, z⟫_ℝ = ⟪v, M.weightedOperator w z⟫_ℝ + calc + _ = ∫ᵛ x, w x ∂<•(M.bilinear v z) := M.weightedOperator_inner w v z + _ = ∫ᵛ x, w x ∂<•(M.bilinear z v) := by rw [M.symmetric v z] + _ = ⟪M.weightedOperator w z, v⟫_ℝ := (M.weightedOperator_inner w z v).symm + _ = _ := real_inner_comm _ _ + · intro v + change 0 ≤ ⟪M.weightedOperator w v, v⟫_ℝ + rw [real_inner_comm, weightedOperator_energy] + exact integral_nonneg hw + +/-- A change of coordinates commutes with integration of full measures. -/ +theorem comap_weightedOperator (A : E →L[ℝ] E) (w : X →ᵇ ℝ) : + (M.comap A.toLinearMap).weightedOperator w = + A.adjoint.comp ((M.weightedOperator w).comp A) := by + ext v + apply ext_inner_right ℝ + intro z + rw [weightedOperator_inner] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_left, + weightedOperator_inner] + rfl + +theorem weightedOperator_energy_mono (w z : X →ᵇ ℝ) (hwz : ∀ x, w x ≤ z x) + (v : E) : ⟪v, M.weightedOperator w v⟫_ℝ ≤ ⟪v, M.weightedOperator z v⟫_ℝ := by + rw [weightedOperator_energy, weightedOperator_energy] + apply integral_mono + · exact Integrable.of_bound w.continuous.aestronglyMeasurable ‖w‖ + (Filter.Eventually.of_forall w.norm_coe_le_norm) + · exact Integrable.of_bound z.continuous.aestronglyMeasurable ‖z‖ + (Filter.Eventually.of_forall z.norm_coe_le_norm) + · exact hwz + +/-- A kernel lower bound controls the mass of every measurable testing +set, including the singular part of the measure. -/ +theorem massOperator_le_weightedOperator (w : X →ᵇ ℝ) (hw : ∀ x, 0 ≤ w x) + (s : Set X) (hs : MeasurableSet s) (c : ℝ) (hc : ∀ x ∈ s, c ≤ w x) (v : E) : + c * ⟪v, M.massOperator s v⟫_ℝ ≤ ⟪v, M.weightedOperator w v⟫_ℝ := by + rw [weightedOperator_energy, ← M.measure_real v s hs] + have hi : Integrable w (M.measure v) := + Integrable.of_bound w.continuous.aestronglyMeasurable ‖w‖ + (Filter.Eventually.of_forall w.norm_coe_le_norm) + calc + _ = ∫ x in s, c ∂(M.measure v) := by simp [mul_comm] + _ ≤ ∫ x in s, w x ∂(M.measure v) := + setIntegral_mono_on (integrable_const c) hi.integrableOn hs hc + _ ≤ ∫ x, w x ∂(M.measure v) := + setIntegral_le_integral hi (Filter.Eventually.of_forall hw) + +/-- A supported, bounded weight is bounded by the full mass on its support. -/ +theorem weightedOperator_le_massOperator (w : X →ᵇ ℝ) (s : Set X) + (hs : MeasurableSet s) (hws : ∀ x ∉ s, w x = 0) (C : ℝ) + (hC : ∀ x ∈ s, w x ≤ C) (v : E) : + ⟪v, M.weightedOperator w v⟫_ℝ ≤ C * ⟪v, M.massOperator s v⟫_ℝ := by + rw [weightedOperator_energy, ← M.measure_real v s hs] + have hi : Integrable w (M.measure v) := + Integrable.of_bound w.continuous.aestronglyMeasurable ‖w‖ + (Filter.Eventually.of_forall w.norm_coe_le_norm) + calc + _ = ∫ x in s, w x ∂(M.measure v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero hws).symm + _ ≤ ∫ x in s, C ∂(M.measure v) := + setIntegral_mono_on hi.integrableOn (integrable_const C) hs hC + _ = _ := by simp [mul_comm] + +/-- A pointwise kernel-difference bound transfers to the full mass measure, +without assuming that the measure has a density. -/ +theorem weightedOperator_energy_difference_le (w z B : X →ᵇ ℝ) + (hB : ∀ x, |w x - z x| ≤ B x) (v : E) : + |⟪v, (M.weightedOperator w - M.weightedOperator z) v⟫_ℝ| ≤ + ⟪v, M.weightedOperator B v⟫_ℝ := by + have hi (f : X →ᵇ ℝ) : Integrable f (M.measure v) := + Integrable.of_bound f.continuous.aestronglyMeasurable ‖f‖ + (Filter.Eventually.of_forall f.norm_coe_le_norm) + rw [sub_apply, inner_sub_right, weightedOperator_energy, weightedOperator_energy, + weightedOperator_energy, ← integral_sub (hi w) (hi z)] + calc + _ ≤ ∫ x, |w x - z x| ∂(M.measure v) := abs_integral_le_integral_abs + _ ≤ ∫ x, B x ∂(M.measure v) := integral_mono ((hi w).sub (hi z)).abs (hi B) hB + +end PositiveBilinearMeasure +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedConvolution.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedConvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..04b30364f4fb5d84cba5ae2cceab67cf9d88a84f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedConvolution.lean @@ -0,0 +1,192 @@ +import OAI.Geometry.RCD.Coordinates.PositiveForms +import Mathlib.Analysis.SpecificLimits.Normed + +namespace OAI + +/-! # Finite weighted convolution estimates for changing inverse metrics -/ + +open scoped BigOperators InnerProductSpace + +namespace RegularPointCoordinates + +/-- A positive quadratic form of a finite sum is bounded by the number of +terms times their total energy. Degeneracy of the form is allowed. -/ +theorem positive_form_sum_le_card {E ι : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] (D : E →L[ℝ] E) (hD : D.IsPositive) + (s : Finset ι) (v : ι → E) : + ⟪∑ j ∈ s, v j, D (∑ j ∈ s, v j)⟫_ℝ ≤ + (s.card : ℝ) * ∑ j ∈ s, ⟪v j, D (v j)⟫_ℝ := by + have hcross (x y : E) : ⟪x, D y⟫_ℝ ≤ (⟪x, D x⟫_ℝ + ⟪y, D y⟫_ℝ) / 2 := by + have hp := hD.inner_nonneg_right (x - y) + have hs : ⟪y, D x⟫_ℝ = ⟪x, D y⟫_ℝ := by + rw [real_inner_comm, hD.inner_left_eq_inner_right] + simp only [map_sub, inner_sub_left, inner_sub_right, hs] at hp + linarith + calc + _ = ∑ j ∈ s, ∑ l ∈ s, ⟪v j, D (v l)⟫_ℝ := by + simp only [map_sum, sum_inner, inner_sum] + rw [Finset.sum_comm] + _ ≤ ∑ j ∈ s, ∑ l ∈ s, (⟪v j, D (v j)⟫_ℝ + ⟪v l, D (v l)⟫_ℝ) / 2 := by + exact Finset.sum_le_sum fun j _ => Finset.sum_le_sum fun l _ => hcross (v j) (v l) + _ = _ := by + simp only [add_div, Finset.sum_add_distrib, Finset.sum_const, nsmul_eq_mul] + simp only [← Finset.mul_sum, ← Finset.sum_div] + ring + +/-- Reindex the lower triangle by the lag and initial index, then enlarge +to the full square. -/ +theorem triangular_sum_le_square (k : ℕ) (f : ℕ → ℕ → ℝ) + (hf : ∀ m j, 0 ≤ f m j) : + (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), f (i - j) j) ≤ + ∑ m ∈ Finset.range k, ∑ j ∈ Finset.range k, f m j := by + classical + let s := (Finset.range k).sigma (fun i => Finset.range (i + 1)) + let t := (Finset.range k) ×ˢ (Finset.range k) + let g : (Σ _ : ℕ, ℕ) → ℕ × ℕ := fun p => (p.1 - p.2, p.2) + have hg : Set.InjOn g s := by + intro p hp q hq heq + have hp' := Finset.mem_sigma.mp hp + have hq' := Finset.mem_sigma.mp hq + have hpj : p.2 ≤ p.1 := by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hp'.2 + have hqj : q.2 ≤ q.1 := by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hq'.2 + have heq1 := congrArg Prod.fst heq + have heq2 := congrArg Prod.snd heq + simp only [g] at heq1 heq2 + have hfirst : p.1 = q.1 := by omega + cases p + cases q + simp_all + have hsub : s.image g ⊆ t := by + intro p hp + obtain ⟨q, hq, rfl⟩ := Finset.mem_image.mp hp + obtain ⟨hqi, hqj⟩ := Finset.mem_sigma.mp hq + simp only [Finset.mem_range] at hqi hqj + simp only [t, g, Finset.mem_product, Finset.mem_range] + omega + calc + _ = ∑ p ∈ s, f (g p).1 (g p).2 := by simp only [s, g, Finset.sum_sigma'] + _ = ∑ p ∈ s.image g, f p.1 p.2 := by rw [Finset.sum_image hg] + _ ≤ ∑ p ∈ t, f p.1 p.2 := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun p _ _ => hf p.1 p.2) + _ = _ := by simp only [t, Finset.sum_product] + +/-- Each location belongs to at most `m` forward intervals of length `m`. -/ +theorem sliding_interval_sum_le (k m : ℕ) (b : ℕ → ℝ) (hb : ∀ l, 0 ≤ b l) : + (∑ j ∈ Finset.range k, ∑ l ∈ Finset.Ico j (min k (j + m)), b l) ≤ + (m : ℝ) * ∑ l ∈ Finset.range k, b l := by + classical + have hset (j : ℕ) : Finset.Ico j (min k (j + m)) = + (Finset.range k).filter (fun l => j ≤ l ∧ l < j + m) := by + ext l + simp only [Finset.mem_Ico, Finset.mem_filter, Finset.mem_range, lt_min_iff] + omega + have hcount (l : ℕ) : + (((Finset.range k).filter (fun j => j ≤ l ∧ l < j + m)).card : ℝ) ≤ m := by + have hs : (Finset.range k).filter (fun j => j ≤ l ∧ l < j + m) ⊆ + Finset.Ico (l + 1 - m) (l + 1) := by + intro j hj + simp only [Finset.mem_filter, Finset.mem_range] at hj + simp only [Finset.mem_Ico] + omega + have hc := Finset.card_le_card hs + have hc' : (Finset.Ico (l + 1 - m) (l + 1)).card ≤ m := by + rw [Nat.card_Ico] + omega + exact_mod_cast hc.trans hc' + calc + _ = ∑ j ∈ Finset.range k, ∑ l ∈ Finset.range k, + if j ≤ l ∧ l < j + m then b l else 0 := by + simp only [hset, Finset.sum_filter] + _ = ∑ l ∈ Finset.range k, ∑ j ∈ Finset.range k, + if j ≤ l ∧ l < j + m then b l else 0 := Finset.sum_comm + _ = ∑ l ∈ Finset.range k, + (((Finset.range k).filter (fun j => j ≤ l ∧ l < j + m)).card : ℝ) * b l := by + congr 1 + ext l + rw [← Finset.sum_filter] + simp + _ ≤ ∑ l ∈ Finset.range k, (m : ℝ) * b l := + Finset.sum_le_sum fun l _ => mul_le_mul_of_nonneg_right (hcount l) (hb l) + _ = _ := by rw [Finset.mul_sum] + +/-- The interval-convolution coefficient is the first moment of the lag +kernel; no dependence on the final index remains. -/ +theorem weighted_interval_convolution_le (k : ℕ) (w b : ℕ → ℝ) + (hw : ∀ m, 0 ≤ w m) (hb : ∀ l, 0 ≤ b l) : + (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), + w (i - j) * ∑ l ∈ Finset.Ico j i, b l) ≤ + (∑ m ∈ Finset.range k, (m : ℝ) * w m) * ∑ l ∈ Finset.range k, b l := by + have heq : (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), + w (i - j) * ∑ l ∈ Finset.Ico j i, b l) = + ∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), + w (i - j) * ∑ l ∈ Finset.Ico j (min k (j + (i - j))), b l := by + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + have hij : j ≤ i := by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hj + have hi' : i < k := Finset.mem_range.mp hi + rw [Nat.add_sub_of_le hij, min_eq_right hi'.le] + rw [heq] + calc + _ ≤ ∑ m ∈ Finset.range k, ∑ j ∈ Finset.range k, + w m * ∑ l ∈ Finset.Ico j (min k (j + m)), b l := + triangular_sum_le_square k _ (fun m j => mul_nonneg (hw m) + (Finset.sum_nonneg fun l _ => hb l)) + _ = ∑ m ∈ Finset.range k, + w m * (∑ j ∈ Finset.range k, ∑ l ∈ Finset.Ico j (min k (j + m)), b l) := by + simp only [Finset.mul_sum] + _ ≤ ∑ m ∈ Finset.range k, w m * ((m : ℝ) * ∑ l ∈ Finset.range k, b l) := + Finset.sum_le_sum fun m _ => mul_le_mul_of_nonneg_left (sliding_interval_sum_le k m b hb) (hw m) + _ = _ := by rw [Finset.sum_mul]; apply Finset.sum_congr rfl; intro m _; ring + +/-- The stationary part of the triangular convolution has its ordinary +geometric-series coefficient. -/ +theorem weighted_stationary_convolution_le (k : ℕ) (w b : ℕ → ℝ) + (hw : ∀ m, 0 ≤ w m) (hb : ∀ j, 0 ≤ b j) : + (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), w (i - j) * b j) ≤ + (∑ m ∈ Finset.range k, w m) * ∑ j ∈ Finset.range k, b j := by + calc + _ ≤ ∑ m ∈ Finset.range k, ∑ j ∈ Finset.range k, w m * b j := + triangular_sum_le_square k _ (fun m j => mul_nonneg (hw m) (hb j)) + _ = _ := by simp only [Finset.mul_sum, Finset.sum_mul]; rw [Finset.sum_comm] + +/-- The constant controlling intervals with exponentially decaying lags. -/ +noncomputable def geometricIntervalConstant (rho : ℝ) : ℝ := + ∑' m : ℕ, (m : ℝ) ^ 2 * rho ^ m + +theorem geometricIntervalConstant_nonneg {rho : ℝ} (hrho : 0 ≤ rho) : + 0 ≤ geometricIntervalConstant rho := + tsum_nonneg (fun m => mul_nonneg (sq_nonneg _) (pow_nonneg hrho m)) + +theorem weighted_geometric_interval_convolution_le (k : ℕ) (b : ℕ → ℝ) + (hb : ∀ l, 0 ≤ b l) {rho : ℝ} (hrho : 0 ≤ rho) (hrho1 : rho < 1) : + (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), + ((i - j : ℕ) : ℝ) * rho ^ (i - j) * ∑ l ∈ Finset.Ico j i, b l) ≤ + geometricIntervalConstant rho * ∑ l ∈ Finset.range k, b l := by + have hs : Summable (fun m : ℕ => (m : ℝ) ^ 2 * rho ^ m) := + summable_pow_mul_geometric_of_norm_lt_one 2 (by simpa [abs_of_nonneg hrho] using hrho1) + have hsum : (∑ m ∈ Finset.range k, (m : ℝ) * ((m : ℝ) * rho ^ m)) ≤ + geometricIntervalConstant rho := by + simpa only [geometricIntervalConstant, pow_two, mul_assoc] using + hs.sum_le_tsum (Finset.range k) (fun m _ => mul_nonneg (sq_nonneg _) (pow_nonneg hrho m)) + exact (weighted_interval_convolution_le k (fun m => (m : ℝ) * rho ^ m) b + (fun m => by positivity) hb).trans + (mul_le_mul_of_nonneg_right hsum (Finset.sum_nonneg fun l _ => hb l)) + +theorem weighted_geometric_stationary_convolution_le (k : ℕ) (b : ℕ → ℝ) + (hb : ∀ l, 0 ≤ b l) {rho : ℝ} (hrho : 0 ≤ rho) (hrho1 : rho < 1) : + (∑ i ∈ Finset.range k, ∑ j ∈ Finset.range (i + 1), rho ^ (i - j) * b j) ≤ + (1 - rho)⁻¹ * ∑ l ∈ Finset.range k, b l := by + have hs : Summable (fun m : ℕ => rho ^ m) := + summable_geometric_of_abs_lt_one (by simpa [abs_of_nonneg hrho] using hrho1) + have hsum : (∑ m ∈ Finset.range k, rho ^ m) ≤ (1 - rho)⁻¹ := by + have h := hs.sum_le_tsum (Finset.range k) (fun m _ => pow_nonneg hrho m) + rwa [tsum_geometric_of_norm_lt_one (by simpa [abs_of_nonneg hrho] using hrho1)] at h + exact (weighted_stationary_convolution_le k (fun m => rho ^ m) b + (fun m => pow_nonneg hrho m) hb).trans + (mul_le_mul_of_nonneg_right hsum (Finset.sum_nonneg fun l _ => hb l)) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedFitSmoothing.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedFitSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba3d4d3f7ecdef69c434dde8cb210111517b0a33 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedFitSmoothing.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Coordinates.AffineFitSmoothing + +namespace OAI + +/-! # Smoothing radial fits with changing covector norms -/ + +namespace RegularPointCoordinates + +/-- Dividing by the current covector norm introduces only the proved +growth loss across the fixed lag. No uniform Euclidean norm is required. -/ +theorem weighted_fit_normalized_step {e w P : ℕ → ℝ} {a C G : ℝ} {m : ℕ} + (ha : 0 ≤ a) (hC : 0 ≤ C) + (he : ∀ i, 0 ≤ e i) (hw : ∀ i, 0 < w i) + (hgrowth : ∀ i, w i ≤ G * w (i + m)) + (hstep : ∀ i, e (i + m) ≤ a * e i + C * w i * Real.sqrt (P i)) (i : ℕ) : + e (i + m) / w (i + m) ≤ (a * G) * (e i / w i) + (C * G) * Real.sqrt (P i) := by + have hr : 0 ≤ w i / w (i + m) := div_nonneg (hw i).le (hw _).le + have hrG : w i / w (i + m) ≤ G := (div_le_iff₀ (hw _)).mpr (hgrowth i) + have hei : 0 ≤ e i / w i := div_nonneg (he i) (hw i).le + have h₁ := mul_le_mul_of_nonneg_left hrG (mul_nonneg ha hei) + have h₂ := mul_le_mul_of_nonneg_left hrG (mul_nonneg hC (Real.sqrt_nonneg (P i))) + calc + _ ≤ (a * e i + C * w i * Real.sqrt (P i)) / w (i + m) := + div_le_div_of_nonneg_right (hstep i) (hw _).le + _ = (a * (e i / w i)) * (w i / w (i + m)) + + (C * Real.sqrt (P i)) * (w i / w (i + m)) := by + field_simp [(hw i).ne', (hw (i + m)).ne'] + _ ≤ (a * (e i / w i)) * G + (C * Real.sqrt (P i)) * G := add_le_add h₁ h₂ + _ = _ := by ring + +/-- The smoothed error controls each original fit in its own covector +norm. The defect sequence is unchanged by normalization. -/ +theorem weighted_squared_fit_le_forwardDefect {σ η A a C G : ℝ} + (hσ : 0 ≤ σ) (hη : 0 ≤ η) (hA : 0 ≤ A) + (ha : 0 ≤ a) (hC : 0 ≤ C) (hG : 0 ≤ G) + {P e w : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (he : ∀ i, 0 ≤ e i) (hw : ∀ i, 0 < w i) + {m : ℕ} (hm : 0 < m) + (hmargin : (2 * (a * G) ^ 2) * A + 2 * (C * G) ^ 2 ≤ σ ^ m * A) + (hinitial : ∀ i < m, (e i / w i) ^ 2 ≤ A * (η * σ ^ i)) + (hgrowth : ∀ i, w i ≤ G * w (i + m)) + (hstep : ∀ i, e (i + m) ≤ a * e i + C * w i * Real.sqrt (P i)) : + ∀ i, (e i) ^ 2 ≤ A * forwardDefect σ η P i * (w i) ^ 2 := by + have hb := squared_fit_le_forwardDefect hσ hη hA (mul_nonneg ha hG) (mul_nonneg hC hG) + hP (fun i => div_nonneg (he i) (hw i).le) hm hmargin hinitial + (weighted_fit_normalized_step ha hC he hw hgrowth hstep) + intro i + have hh := mul_le_mul_of_nonneg_right (hb i) (sq_nonneg (w i)) + rwa [div_pow, div_mul_cancel₀ _ (pow_ne_zero 2 (hw i).ne')] at hh + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedFramedProjection.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedFramedProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..1410df2081b9eba781321e55eb896a8160c4b766 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedFramedProjection.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Coordinates.FramedAffineProjection + +namespace OAI + +/-! # Radius-weighted coefficients of the actual harmonic projection -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Projection coefficients are bounded in the exact normalization frame; +no bound for the original coordinate change or its inverse is lost. -/ +theorem weighted_framed_affine_projection_coefficients {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (N : Euclidean n ≃L[ℝ] Euclidean n) (R : ℝ) {H : ℝ} (hH : 0 ≤ H) + (hbound : ∀ c a, |c| + R * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ s hfin (affineCoordinateMap μ hQ u s hfin (c, a))‖) + (f : Lp ℝ 2 (μ.restrict s)) : + ∃ (c : ℝ) (b : Euclidean n), + affineProjection μ hQ u s hfin f = affineCoordinateMap μ hQ u s hfin (c, N b) ∧ + |c| + R * ‖b‖ ≤ H * ‖normalizeLocalL2 μ s hfin f‖ := by + obtain ⟨c, a, hfit⟩ := affineProjection_has_coefficients μ hQ u s hfin f + change affineProjection μ hQ u s hfin f = affineCoordinateMap μ hQ u s hfin (c, a) at hfit + refine ⟨c, N.symm a, by simpa only [N.apply_symm_apply] using hfit, ?_⟩ + have hb := hbound c a + rw [← hfit] at hb + exact hb.trans (mul_le_mul_of_nonneg_left + (normalized_affineProjection_norm_le μ hQ u s hfin f) hH) + +variable [BorelSpace X] [ProperSpace X] + +/-- The least-squares residual is an actual harmonic Sobolev function on +the larger working set and equals the orthogonal residual on its inner +projection set. Its coefficients satisfy the exact-frame value bound. -/ +theorem weighted_framed_harmonic_projection_residual {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s Ω : Set X) (hfin : μ s ≠ ∞) + (hsΩ : s ⊆ Ω) (hΩ : MeasurableSet Ω) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j)) + (v η : SobolevSpace μ hQ) (hv : IsSobolevHarmonicOn μ hQ Ω v) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (N : Euclidean n ≃L[ℝ] Euclidean n) (R : ℝ) {H : ℝ} (hH : 0 ≤ H) + (hbound : ∀ c a, |c| + R * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ s hfin (affineCoordinateMap μ hQ u s hfin (c, a))‖) : + ∃ (c : ℝ) (b : Euclidean n) (w : SobolevSpace μ hQ), + w = v - (c • η + sobolevColumnMap μ hQ u (N b)) ∧ + IsSobolevHarmonicOn μ hQ Ω w ∧ + SobolevSpace.restrictLp μ hQ s w = affineResidual μ hQ u s hfin + (SobolevSpace.restrictLp μ hQ s v) ∧ + |c| + R * ‖b‖ ≤ H * ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s v)‖ := by + obtain ⟨c, b, hfit, hb⟩ := weighted_framed_affine_projection_coefficients μ hQ u s hfin N R hH hbound + (SobolevSpace.restrictLp μ hQ s v) + let w := v - (c • η + sobolevColumnMap μ hQ u (N b)) + have hηharm := isSobolevHarmonicOn_of_local_constant μ hQ Ω hΩ η 1 hη + have hwharm : IsSobolevHarmonicOn μ hQ Ω w := by + have haff := (hηharm.smul μ hQ c).add μ hQ + (IsSobolevHarmonicOn.linearCombination μ hQ hu (N b)) + intro φ hφ + change energyForm μ hQ (v - (c • η + sobolevColumnMap μ hQ u (N b))) φ = 0 + rw [energyForm_sub_left, hv φ hφ, haff φ hφ, sub_self] + refine ⟨c, b, w, rfl, hwharm, ?_, hb⟩ + have hηs := ae_restrict_of_ae_restrict_of_subset hsΩ hη + change SobolevSpace.restrictLp μ hQ s w = + SobolevSpace.restrictLp μ hQ s v - affineProjection μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s v) + rw [hfit, affineCoordinateMap_apply] + dsimp only [w] + rw [map_sub, map_add, map_smul, restrictLp_eq_one_of_representative μ hQ η s hfin hηs] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedInverse.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8c63db65d0f7bd35a323882e77a92f745b60dbe --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedInverse.lean @@ -0,0 +1,283 @@ +import OAI.Geometry.RCD.Coordinates.FrozenNorms + +namespace OAI + +/-! +# Inverse increments without commutation assumptions + +The arguments use positive quadratic forms and exact inverse identities. +Operators from different scales are never assumed to commute. +-/ + +open scoped InnerProductSpace BigOperators + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- Positivity is preserved by the inverse of a linear equivalence. -/ +theorem positive_equiv_symm (Q : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) : (Q.symm : E →L[ℝ] E).IsPositive := + LinearMap.IsPositive.toLinearMap_symm (T := Q.toLinearEquiv) hQ + +/-- Exact resolvent identity evaluated on a vector. -/ +theorem inverse_increment_apply (P Q : E ≃L[ℝ] E) (xi : E) : + ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi = + Q.symm (((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)) (P.symm xi)) := by + simp only [sub_apply, ContinuousLinearEquiv.coe_coe, map_sub, + ContinuousLinearEquiv.apply_symm_apply, ContinuousLinearEquiv.symm_apply_apply] + +/-- The inverse increment equals the leading conjugated decrement plus a +nonnegative remainder. -/ +theorem inverse_increment_quadratic_identity (P Q : E ≃L[ℝ] E) + (hP : (P : E →L[ℝ] E).IsPositive) + (hD : ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)).IsPositive) (xi : E) : + let D := (P : E →L[ℝ] E) - (Q : E →L[ℝ] E) + let a := P.symm xi + let e := Q.symm (D a) + ⟪xi, ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi⟫_ℝ = + ⟪a, D a⟫_ℝ + ⟪e, Q e⟫_ℝ := by + dsimp only + let D := (P : E →L[ℝ] E) - (Q : E →L[ℝ] E) + let a := P.symm xi + let e := Q.symm (D a) + have he : Q e = D a := Q.apply_symm_apply (D a) + have hcross : ⟪a, D e⟫_ℝ = ⟪e, Q e⟫_ℝ := by + calc + _ = ⟪D a, e⟫_ℝ := (hD.inner_left_eq_inner_right a e).symm + _ = ⟪Q e, e⟫_ℝ := by rw [he] + _ = _ := real_inner_comm _ _ + change ⟪xi, ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi⟫_ℝ = + ⟪a, D a⟫_ℝ + ⟪e, Q e⟫_ℝ + rw [inverse_increment_apply] + change ⟪xi, e⟫_ℝ = _ + calc + _ = ⟪P a, e⟫_ℝ := by simp [a] + _ = ⟪a, P e⟫_ℝ := hP.inner_left_eq_inner_right a e + _ = ⟪a, Q e + D e⟫_ℝ := by congr 1; simp [D] + _ = _ := by simp only [inner_add_right, he, hcross] + +/-- The sharp two-sided inverse-increment order for a relatively small +positive decrement. This replaces the one-matrix spectral calculation. -/ +theorem inverse_increment_order (P Q : E ≃L[ℝ] E) + (hP : (P : E →L[ℝ] E).IsPositive) (hQ : (Q : E →L[ℝ] E).IsPositive) + (hD : ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)).IsPositive) + {eta : ℝ} (heta : 0 ≤ eta) (heta1 : eta < 1) + (hsmall : ∀ v, ⟪v, ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)) v⟫_ℝ ≤ + eta * ⟪v, P v⟫_ℝ) (xi : E) : + let D := (P : E →L[ℝ] E) - (Q : E →L[ℝ] E) + ⟪P.symm xi, D (P.symm xi)⟫_ℝ ≤ + ⟪xi, ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi⟫_ℝ ∧ + ⟪xi, ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi⟫_ℝ ≤ + ⟪P.symm xi, D (P.symm xi)⟫_ℝ / (1 - eta) := by + dsimp only + let D := (P : E →L[ℝ] E) - (Q : E →L[ℝ] E) + let a := P.symm xi + let e := Q.symm (D a) + have he : Q e = D a := Q.apply_symm_apply (D a) + have hc : 0 ≤ ⟪e, Q e⟫_ℝ := hQ.inner_nonneg_right e + have hb : 0 ≤ ⟪a, D a⟫_ℝ := hD.inner_nonneg_right a + have hcross : ⟪a, D e⟫_ℝ = ⟪e, Q e⟫_ℝ := by + rw [← hD.inner_left_eq_inner_right, ← he, real_inner_comm] + have hcs := positive_form_cauchy_schwarz hD a e + change ⟪a, D e⟫_ℝ ^ 2 ≤ ⟪a, D a⟫_ℝ * ⟪e, D e⟫_ℝ at hcs + rw [hcross] at hcs + have hde : (1 - eta) * ⟪e, D e⟫_ℝ ≤ eta * ⟪e, Q e⟫_ℝ := by + have hs := hsmall e + change ⟪e, D e⟫_ℝ ≤ eta * ⟪e, P e⟫_ℝ at hs + have hid : ⟪e, P e⟫_ℝ = ⟪e, Q e⟫_ℝ + ⟪e, D e⟫_ℝ := by + simp [D, inner_sub_right] + rw [hid] at hs + nlinarith + have hrem : (1 - eta) * ⟪e, Q e⟫_ℝ ≤ eta * ⟪a, D a⟫_ℝ := by + by_cases hz : ⟪e, Q e⟫_ℝ = 0 + · rw [hz, mul_zero] + exact mul_nonneg heta hb + have hcpos : 0 < ⟪e, Q e⟫_ℝ := lt_of_le_of_ne hc (Ne.symm hz) + apply (mul_le_mul_iff_left₀ hcpos).mp + have h₁ := mul_le_mul_of_nonneg_left hcs (by linarith : 0 ≤ 1 - eta) + have h₂ := mul_le_mul_of_nonneg_left hde hb + nlinarith only [h₁, h₂] + have hid := inverse_increment_quadratic_identity P Q hP hD xi + change ⟪xi, ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)) xi⟫_ℝ = + ⟪a, D a⟫_ℝ + ⟪e, Q e⟫_ℝ at hid + change ⟪a, D a⟫_ℝ ≤ _ ∧ _ ≤ ⟪a, D a⟫_ℝ / (1 - eta) + rw [hid] + constructor + · linarith + · apply (le_div_iff₀ (by linarith : 0 < 1 - eta)).mpr + nlinarith only [hrem] + +/-- A positive form bounded by `eta Q` satisfies the weighted square bound +`D Q⁻¹ D ≤ eta D`. -/ +theorem positive_inverse_sandwich_bound (Q : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) {D : E →L[ℝ] E} (hD : D.IsPositive) + {eta : ℝ} (heta : 0 ≤ eta) + (hsmall : ∀ v, ⟪v, D v⟫_ℝ ≤ eta * ⟪v, Q v⟫_ℝ) (w : E) : + ⟪D w, Q.symm (D w)⟫_ℝ ≤ eta * ⟪w, D w⟫_ℝ := by + let v := Q.symm (D w) + have hQv : Q v = D w := Q.apply_symm_apply (D w) + have heq : ⟪w, D v⟫_ℝ = ⟪v, Q v⟫_ℝ := by + rw [← hD.inner_left_eq_inner_right, ← hQv, real_inner_comm] + have hc : 0 ≤ ⟪v, Q v⟫_ℝ := hQ.inner_nonneg_right v + have hb := hD.inner_nonneg_right w + have hcs := positive_form_cauchy_schwarz hD w v + rw [heq] at hcs + have hm := mul_le_mul_of_nonneg_left (hsmall v) hb + have htarget : ⟪v, Q v⟫_ℝ ≤ eta * ⟪w, D w⟫_ℝ := by + by_cases hz : ⟪v, Q v⟫_ℝ = 0 + · rw [hz]; exact mul_nonneg heta hb + have hp : 0 < ⟪v, Q v⟫_ℝ := lt_of_le_of_ne hc (Ne.symm hz) + nlinarith + change ⟪D w, v⟫_ℝ ≤ _ + calc + _ = ⟪v, D w⟫_ℝ := real_inner_comm _ _ + _ = ⟪v, Q v⟫_ℝ := by rw [hQv] + _ ≤ _ := htarget + +/-- A monotone positive metric sequence has positive inverse increments. -/ +theorem inverse_increment_isPositive (P Q : E ≃L[ℝ] E) + (hP : (P : E →L[ℝ] E).IsPositive) (hQ : (Q : E →L[ℝ] E).IsPositive) + (hD : ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)).IsPositive) : + ((Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E)).IsPositive := by + apply (ContinuousLinearMap.isPositive_iff _).mpr + refine ⟨(positive_equiv_symm Q hQ).isSymmetric.sub + (positive_equiv_symm P hP).isSymmetric, ?_⟩ + intro xi + have hid := inverse_increment_quadratic_identity P Q hP hD xi + have h₁ := hD.inner_nonneg_right (P.symm xi) + have h₂ := hQ.inner_nonneg_right + (Q.symm (((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)) (P.symm xi))) + rw [real_inner_comm] + exact hid.symm ▸ add_nonneg h₁ h₂ + +/-- For a half-small decrement the inverse increment satisfies the weighted +square bound used in the convolution argument. -/ +theorem inverse_increment_weighted_square_le (P Q : E ≃L[ℝ] E) + (hP : (P : E →L[ℝ] E).IsPositive) (hQ : (Q : E →L[ℝ] E).IsPositive) + (hD : ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)).IsPositive) + (hsmall : ∀ v, ⟪v, ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)) v⟫_ℝ ≤ + (1 / 2 : ℝ) * ⟪v, P v⟫_ℝ) (xi : E) : + let B := (Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E) + ⟪B xi, P (B xi)⟫_ℝ ≤ ⟪xi, B xi⟫_ℝ := by + let B := (Q.symm : E →L[ℝ] E) - (P.symm : E →L[ℝ] E) + have hB := inverse_increment_isPositive P Q hP hQ hD + have hb : ∀ v, ⟪v, B v⟫_ℝ ≤ ⟪v, P.symm v⟫_ℝ := by + intro v + have ho := (inverse_increment_order P Q hP hQ hD (by norm_num) (by norm_num) hsmall v).2 + have ho' := (le_div_iff₀ (by norm_num : (0 : ℝ) < 1 - 1 / 2)).mp ho + have hs := hsmall (P.symm v) + simp only [ContinuousLinearEquiv.apply_symm_apply] at hs + have hi : ⟪P.symm v, v⟫_ℝ = ⟪v, P.symm v⟫_ℝ := real_inner_comm _ _ + rw [hi] at hs + change ⟪v, B v⟫_ℝ * (1 - 1 / 2) ≤ + ⟪P.symm v, ((P : E →L[ℝ] E) - (Q : E →L[ℝ] E)) (P.symm v)⟫_ℝ at ho' + linarith + have h := positive_inverse_sandwich_bound P.symm (positive_equiv_symm P hP) hB + (by norm_num : (0 : ℝ) ≤ 1) (fun v => by simpa only [B, sub_apply, one_mul] using hb v) xi + simpa only [ContinuousLinearEquiv.symm_symm, one_mul] using h + +/-- The inverse-energy form of a bilinear comparison, obtained by testing +at the actual inverse image rather than assuming a duality formula. -/ +theorem inverse_energy_of_bilinear_bound (Q : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) (z : E) {K : ℝ} (hK : 0 ≤ K) + (hbound : ∀ v, ⟪v, z⟫_ℝ ^ 2 ≤ K * ⟪v, Q v⟫_ℝ) : + ⟪z, Q.symm z⟫_ℝ ≤ K := by + let v := Q.symm z + have hv : Q v = z := Q.apply_symm_apply z + have hc : 0 ≤ ⟪v, z⟫_ℝ := by + simpa only [ContinuousLinearEquiv.coe_coe, hv] using hQ.inner_nonneg_right v + have hb := hbound v + rw [hv] at hb + have ht : ⟪v, z⟫_ℝ ≤ K := by + by_cases hz : ⟪v, z⟫_ℝ = 0 + · simpa only [hz] using hK + · have hp : 0 < ⟪v, z⟫_ℝ := lt_of_le_of_ne hc (Ne.symm hz) + nlinarith + simpa only [real_inner_comm] using ht + +/-- Relative comparison of positive metrics gives both inverse order and +the weighted inverse-square estimate needed for normalization errors. -/ +theorem relative_inverse_bounds (Q R : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) (hR : (R : E →L[ℝ] E).IsPositive) + {c : ℝ} (hc : 0 < c) + (hcompare : ∀ v, c * ⟪v, Q v⟫_ℝ ≤ ⟪v, R v⟫_ℝ) (z : E) : + ⟪z, R.symm z⟫_ℝ ≤ ⟪z, Q.symm z⟫_ℝ / c ∧ + ⟪R.symm z, Q (R.symm z)⟫_ℝ ≤ ⟪z, Q.symm z⟫_ℝ / c ^ 2 := by + let u := Q.symm z + let v := R.symm z + have hu : Q u = z := Q.apply_symm_apply z + have hv : R v = z := R.apply_symm_apply z + have ha : 0 ≤ ⟪z, u⟫_ℝ := by + simpa only [ContinuousLinearEquiv.coe_coe, hu, real_inner_comm] using hQ.inner_nonneg_right u + have hb : 0 ≤ ⟪z, v⟫_ℝ := by + simpa only [ContinuousLinearEquiv.coe_coe, hv, real_inner_comm] using hR.inner_nonneg_right v + have hq : 0 ≤ ⟪v, Q v⟫_ℝ := hQ.inner_nonneg_right v + have hcs := positive_form_cauchy_schwarz hQ u v + change ⟪u, Q v⟫_ℝ ^ 2 ≤ ⟪u, Q u⟫_ℝ * ⟪v, Q v⟫_ℝ at hcs + have hid : ⟪u, Q v⟫_ℝ = ⟪z, v⟫_ℝ := by + have hh := hQ.inner_left_eq_inner_right u v + change ⟪Q u, v⟫_ℝ = ⟪u, Q v⟫_ℝ at hh + rw [hu] at hh + exact hh.symm + rw [hid, hu] at hcs + have hinner : ⟪u, z⟫_ℝ = ⟪z, u⟫_ℝ := real_inner_comm _ _ + rw [hinner] at hcs + have hcomp : c * ⟪v, Q v⟫_ℝ ≤ ⟪z, v⟫_ℝ := by + simpa only [hv, real_inner_comm] using hcompare v + change ⟪z, v⟫_ℝ ≤ ⟪z, u⟫_ℝ / c ∧ ⟪v, Q v⟫_ℝ ≤ ⟪z, u⟫_ℝ / c ^ 2 + constructor + · apply (le_div_iff₀ hc).mpr + by_cases hz : ⟪z, v⟫_ℝ = 0 + · rw [hz, zero_mul]; exact ha + have hp : 0 < ⟪z, v⟫_ℝ := lt_of_le_of_ne hb (Ne.symm hz) + apply (mul_le_mul_iff_left₀ hp).mp + have h₁ := mul_le_mul_of_nonneg_left hcs hc.le + have h₂ := mul_le_mul_of_nonneg_left hcomp ha + nlinarith only [h₁, h₂] + · apply (le_div_iff₀ (sq_pos_of_pos hc)).mpr + by_cases hz : ⟪v, Q v⟫_ℝ = 0 + · rw [hz, zero_mul]; exact ha + have hp : 0 < ⟪v, Q v⟫_ℝ := lt_of_le_of_ne hq (Ne.symm hz) + apply (mul_le_mul_iff_left₀ hp).mp + have hsq := (sq_le_sq₀ (mul_nonneg hc.le hq) hb).mpr hcomp + nlinarith only [hsq, hcs] + +/-- Exact change of inverse normalization. -/ +theorem inverse_normalization_error_identity (Q R : E ≃L[ℝ] E) (xi : E) : + R.symm xi - Q.symm xi = + -(R.symm (((R : E →L[ℝ] E) - (Q : E →L[ℝ] E)) (Q.symm xi))) := by + simp only [sub_apply, ContinuousLinearEquiv.coe_coe, map_sub, + ContinuousLinearEquiv.apply_symm_apply, ContinuousLinearEquiv.symm_apply_apply] + abel + +/-- Bilinear heat comparison and relative metric comparison imply the +normalization-error bound. Neither inverse order nor the error is assumed. -/ +theorem inverse_normalization_error_le (Q R : E ≃L[ℝ] E) + (hQ : (Q : E →L[ℝ] E).IsPositive) (hR : (R : E →L[ℝ] E).IsPositive) + (F : E →L[ℝ] E) (hF : F.IsPositive) {c C : ℝ} (hc : 0 < c) (hC : 0 ≤ C) + (hcompare : ∀ v, c * ⟪v, Q v⟫_ℝ ≤ ⟪v, R v⟫_ℝ) + (hbilinear : ∀ u v, + ⟪v, ((R : E →L[ℝ] E) - (Q : E →L[ℝ] E)) u⟫_ℝ ^ 2 ≤ + (C * ⟪u, F u⟫_ℝ) * ⟪v, Q v⟫_ℝ) (xi : E) : + ⟪R.symm xi - Q.symm xi, Q (R.symm xi - Q.symm xi)⟫_ℝ ≤ + C / c ^ 2 * ⟪Q.symm xi, F (Q.symm xi)⟫_ℝ := by + let z := ((R : E →L[ℝ] E) - (Q : E →L[ℝ] E)) (Q.symm xi) + have henergy : ⟪z, Q.symm z⟫_ℝ ≤ C * ⟪Q.symm xi, F (Q.symm xi)⟫_ℝ := + inverse_energy_of_bilinear_bound Q hQ z + (mul_nonneg hC (hF.inner_nonneg_right _)) (hbilinear (Q.symm xi)) + rw [inverse_normalization_error_identity] + simp only [map_neg, inner_neg_left, inner_neg_right, neg_neg] + calc + _ ≤ ⟪z, Q.symm z⟫_ℝ / c ^ 2 := (relative_inverse_bounds Q R hQ hR hc hcompare z).2 + _ ≤ (C * ⟪Q.symm xi, F (Q.symm xi)⟫_ℝ) / c ^ 2 := + div_le_div_of_nonneg_right henergy (sq_nonneg c) + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WeightedSquaredFitCenters.lean b/lean/OAI/Geometry/RCD/Coordinates/WeightedSquaredFitCenters.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1923c0a4f5c147b981f063bb939f267458e79f9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WeightedSquaredFitCenters.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Harmonic.WeightedInwardConstants + +namespace OAI + +/-! # Inward summation for the squared radial fit estimate -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- The actual two-fit center estimate and the squared radial fit bound +give a quantitative center bound in the current covector norm. -/ +theorem weighted_centers_from_squared_fit {ρ M Λ Z : ℝ} + (hρ : 0 < ρ) (hρ1 : ρ < 1) (hτρ : (9 / 16 : ℝ) < Real.sqrt ρ) + (hM : 0 ≤ M) (hΛ : 0 ≤ Λ) (hZ : 0 ≤ Z) + {P c r w e : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) + (hr : ∀ i, 0 ≤ r i) (hw : ∀ i, 0 ≤ w i) (he : ∀ i, 0 ≤ e i) + (hradius : ∀ i k, r (i + k) = (1 / 2 : ℝ) ^ k * r i) + (hgrowth : ∀ i k, w (i + k) ≤ (9 / 8 : ℝ) ^ k * w i) + (hc : Tendsto c atTop (𝓝 0)) + (hsquare : ∀ i, (e i) ^ 2 ≤ Z * P i * (w i) ^ 2) + (hstep : ∀ i, |c i - c (i + 1)| ≤ M * Λ * r i * e i + M * r (i + 1) * e (i + 1)) + (i : ℕ) : + |c i| ≤ (M * (Λ + 1) * Real.sqrt Z) * r i * w i * + (1 - (9 / 16 : ℝ) / Real.sqrt ρ)⁻¹ * (1 + (Real.sqrt ρ)⁻¹) * + Real.sqrt (symmetricDefect ρ P i) := by + have hfit (j : ℕ) : e j ≤ Real.sqrt Z * w j * Real.sqrt (P j) := by + apply (sq_le_sq₀ (he j) (mul_nonneg + (mul_nonneg (Real.sqrt_nonneg Z) (hw j)) (Real.sqrt_nonneg (P j)))).mp + calc + (e j) ^ 2 ≤ Z * P j * (w j) ^ 2 := hsquare j + _ = (Real.sqrt Z * w j * Real.sqrt (P j)) ^ 2 := by + rw [mul_pow, mul_pow, Real.sq_sqrt hZ, Real.sq_sqrt (hP j)] + ring + have hcoeff : 0 ≤ M * (Λ + 1) * Real.sqrt Z := by positivity + apply weighted_affine_constants_le_envelope hρ hρ1 hτρ hcoeff hP hPs hr hw hradius hgrowth hc + intro j + have hrw : r (j + 1) * w (j + 1) ≤ r j * w j := by + have hg := hgrowth j 1 + simp only [pow_one] at hg + rw [hradius j 1, pow_one] + have hh := mul_le_mul_of_nonneg_left hg + (mul_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2) (hr j)) + nlinarith [mul_nonneg (hr j) (hw j)] + calc + _ ≤ M * Λ * r j * e j + M * r (j + 1) * e (j + 1) := hstep j + _ ≤ M * Λ * r j * (Real.sqrt Z * w j * Real.sqrt (P j)) + + M * r (j + 1) * (Real.sqrt Z * w (j + 1) * Real.sqrt (P (j + 1))) := by + exact add_le_add + (mul_le_mul_of_nonneg_left (hfit j) (mul_nonneg (mul_nonneg hM hΛ) (hr j))) + (mul_le_mul_of_nonneg_left (hfit (j + 1)) (mul_nonneg hM (hr (j + 1)))) + _ = M * Real.sqrt Z * (Λ * (r j * w j) * Real.sqrt (P j) + + (r (j + 1) * w (j + 1)) * Real.sqrt (P (j + 1))) := by ring + _ ≤ M * Real.sqrt Z * (Λ * (r j * w j) * Real.sqrt (P j) + + (r j * w j) * Real.sqrt (P (j + 1))) := by + exact mul_le_mul_of_nonneg_left + (add_le_add_right (mul_le_mul_of_nonneg_right hrw (Real.sqrt_nonneg _)) _) + (by positivity) + _ ≤ (M * (Λ + 1) * Real.sqrt Z) * r j * w j * + (Real.sqrt (P j) + Real.sqrt (P (j + 1))) := by + have h0 := mul_nonneg (mul_nonneg (hr j) (hw j)) (Real.sqrt_nonneg (P j)) + have h1 := mul_nonneg (mul_nonneg (mul_nonneg hΛ (hr j)) (hw j)) + (Real.sqrt_nonneg (P (j + 1))) + have hh := mul_nonneg (mul_nonneg hM (Real.sqrt_nonneg Z)) (add_nonneg h0 h1) + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Coordinates/WorkingNormalizerBound.lean b/lean/OAI/Geometry/RCD/Coordinates/WorkingNormalizerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..580e8006fab3190d66233da68452c4ddf41efc65 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Coordinates/WorkingNormalizerBound.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Coordinates.FiniteNormalizerGrowth +import OAI.Geometry.RCD.Metric.UniformVolumeRatio + +namespace OAI + +/-! # A bounded working frame from a near-identity mean Gram -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Every exact normalizer of a mean Gram within one half of the identity +has squared norm at most two. This is uniform in the chosen normalizer. -/ +theorem normalizer_norm_sq_le_two_of_sub_id (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) (s : Set X) (hs : MeasurableSet s) + (A : E ≃L[ℝ] E) (hA : IsExactMeanNormalization μ hQ U s hs A) + (hgram : ‖sobolevMeanGram μ hQ U s hs - ContinuousLinearMap.id ℝ E‖ ≤ 1 / 2) : + ‖(A : E →L[ℝ] E)‖ ^ 2 ≤ 2 := by + have hbound (v : E) : ‖A v‖ ^ 2 ≤ 2 * ‖v‖ ^ 2 := by + have hlo := inner_lower_of_sub_id_norm (sobolevMeanGram μ hQ U s hs) hgram (A v) + rw [meanGram_energy_of_exact_normalization μ hQ U s hs A hA] at hlo + simp only [ContinuousLinearEquiv.symm_apply_apply] at hlo + linarith + have hn : ‖(A : E →L[ℝ] E)‖ ≤ Real.sqrt 2 := by + apply ContinuousLinearMap.opNorm_le_bound _ (Real.sqrt_nonneg _) + intro v + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + rw [mul_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] + exact hbound v + nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2), norm_nonneg (A : E →L[ℝ] E)] + +/-- The initial splitting error and the fixed Bishop--Gromov volume ratio +construct uniformly bounded working frames at every nearby center. -/ +theorem exists_nearby_working_normalizer {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 1) X) {a : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m + 1) X) (comparisonModelVolume m a)) + (u : Fin (m + 1) → SobolevSpace (hausdorff (m + 1) X) hX.quadratic) + {p q : X} {R ε : ℝ} {w : X → Euclidean (m + 1)} + (hR : 0 < R) (hscale : a * (3 * R) ≤ 1) (hε : 0 ≤ ε) + (hsmall : ((m + 1 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio m * ε) ≤ 1 / 2) + (hfirst : FirstOrderSplittingOn (hausdorff (m + 1) X) hX.quadratic p (2 * R) ε u w) + (hq : q ∈ Metric.ball p (R / 4)) : + ∃ T : Euclidean (m + 1) ≃L[ℝ] Euclidean (m + 1), + IsExactMeanNormalization (hausdorff (m + 1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 1) X) hX.quadratic u) + (Metric.ball q (R / 2)) measurableSet_ball T ∧ + ‖(T : Euclidean (m + 1) →L[ℝ] Euclidean (m + 1))‖ ^ 2 ≤ 2 := by + let μ := hausdorff (m + 1) X + let U := sobolevColumnMap μ hX.quadratic u + have hsub : Metric.ball q (R / 2) ⊆ Metric.ball p (2 * R) := by + intro x hx + have hxp := dist_triangle x q p + have hxq : dist x q < R / 2 := hx + have hqp : dist q p < R / 4 := hq + change dist x p < 2 * R + linarith + have hratio := nearby_normalization_volume_ratio m hX ha hBG hR hscale hq + have hnorm : ‖sobolevMeanGram μ hX.quadratic U (Metric.ball q (R / 2)) measurableSet_ball - + ContinuousLinearMap.id ℝ (Euclidean (m + 1))‖ ≤ 1 / 2 := + (meanGram_sub_id_norm_le_of_subset μ hX.quadratic u measurableSet_ball hsub + (ne_of_gt (hX.fullSupport q _ (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ Metric.isBounded_ball)) + (ne_of_gt (hX.fullSupport p _ (by positivity))) + (ne_of_lt (hX.finiteOnBounded _ Metric.isBounded_ball)) + (zero_le_one.trans (normalizationVolumeRatio_ge_one m)) hε hratio hfirst.gram).trans hsmall + obtain ⟨T, hT⟩ := exists_exact_mean_normalization μ hX.quadratic U + (Metric.ball q (R / 2)) measurableSet_ball (fun v hv => by + have hlo := inner_lower_of_sub_id_norm _ hnorm v + have hpos : 0 < (1 / 2 : ℝ) * ‖v‖ ^ 2 := by + exact mul_pos (by norm_num) (sq_pos_of_ne_zero (norm_ne_zero_iff.mpr hv)) + linarith) + exact ⟨T, hT, normalizer_norm_sq_le_two_of_sub_id μ hX.quadratic U _ measurableSet_ball T hT hnorm⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ACAffinePairing.lean b/lean/OAI/Geometry/RCD/Harmonic/ACAffinePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..548c137984ddc20521040dc0d45b7e69bec2bcf2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ACAffinePairing.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.RCD.Heat.ACDerivativeL2Endpoint + +namespace OAI + +/-! # Pairing a bounded affine residual with a varying coefficient -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem ac_zero_endpoint_pairing_bound {b z : ℝ → ℝ} {η : ℝ} + (hb : AbsolutelyContinuousOnInterval b 0 1) + (hz : AbsolutelyContinuousOnInterval z 0 1) + (hz0 : z 0=0) (hz1 : z 1=0) + (hbound : ∀ t∈Icc (0:ℝ) 1, |z t|≤η) : + |∫ t in Icc (0:ℝ) 1, b t*deriv z t| ≤ + η*(∫ t in Icc (0:ℝ) 1, |deriv b t|) := by + have he := hb.integral_mul_deriv_eq_deriv_mul hz + simp only [hz0,hz1,mul_zero,sub_zero,zero_sub] at he + have hei : (∫ t in Icc (0:ℝ) 1, b t*deriv z t)= + -(∫ t in Icc (0:ℝ) 1, deriv b t*z t) := by + simpa only [intervalIntegral.integral_of_le zero_le_one,integral_Icc_eq_integral_Ioc] using he + have hi : IntegrableOn (fun t => η*|deriv b t|) (Icc (0:ℝ) 1) := + ((intervalIntegrable_iff_integrableOn_Icc_of_le zero_le_one).mp hb.intervalIntegrable_deriv).abs.const_mul η + rw [hei,abs_neg] + calc + |∫ t in Icc (0:ℝ) 1, deriv b t*z t| ≤ + ∫ t in Icc (0:ℝ) 1, η*|deriv b t| := by + rw [← Real.norm_eq_abs] + apply norm_integral_le_of_norm_le hi + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + rw [Real.norm_eq_abs,abs_mul,mul_comm η] + exact mul_le_mul_of_nonneg_left (hbound t ht) (abs_nonneg _) + _ = _ := integral_const_mul _ _ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualGramEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualGramEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdefd284b23b9a38bcffa5e629268358eccdd133 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualGramEnvelope.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.GramSourceEstimate +import OAI.Geometry.RCD.Harmonic.HarmonicEndpointBound +import OAI.Geometry.RCD.Harmonic.HarmonicCurvatureBounds +import OAI.Geometry.RCD.Sobolev.HarmonicCutoffErrorIntegral +import OAI.Geometry.RCD.Metric.LongTimeMassSum +import OAI.Geometry.RCD.Sobolev.DyadicScalarBackground + +namespace OAI + +/-! # The actual mean/heat discrepancy is controlled by the full mass envelope -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {m : ℕ} {U : Euclidean (m + 2) →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean (m + 2))} {κ : ℝ} {p : X} {r₀ : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r₀ L v) + {ρ C₀ : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C₀) + +include G in +/-- All three source components and the terminal value are estimated here +for the same genuine harmonic map, cutoff, kernel and full Bochner measure. -/ +theorem exists_actual_gram_envelope_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) (hρ : 0 < ρ) (hρr : ρ < r₀) + {A V W δ R : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) + (hδ : 0 < δ) (hR : 0 < R) (hR1 : R ≤ 1) (lambda : ℝ) : + ∃ C : ℝ, 0 < C ∧ ∀ (i : ℕ), 1 ≤ i → ∀ (x q : X), + μ (ball q (R / 2 ^ i)) ≠ ∞ → + V * (R / 2 ^ i) ^ (m + 2) ≤ μ.real (ball q (R / 2 ^ i)) → + dist x q ≤ A * (R / 2 ^ i) → + (∀ j, μ.real (ball x (R / 2 ^ j)) ≤ W * (R / 2 ^ j) ^ (m + 2)) → + (∀ t, 0 < t → t ≤ R ^ 2 → ∀ z ∈ ball x R, + V * (Real.sqrt t) ^ (m + 2) ≤ μ.real (ball z (Real.sqrt t))) → + closedBall p (2 * ρ) ⊆ ball x R → + (∀ z ∉ ball x R, χ.weight z = 0) → + (∀ z, ρ ≤ dist p z → dist p z ≤ 2 * ρ → δ ≤ dist x z) → + (∀ z ∈ ball q (R / 2 ^ i), χ.weight z = 1) → + ∀ v : Euclidean (m + 2), + |⟪v, (sobolevMeanGram μ hQ U (ball q (R / 2 ^ i)) measurableSet_ball - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos (div_pos hR (pow_pos (by norm_num : (0 : ℝ) < 2) i))) x lambda) v⟫_ℝ| ≤ + C * ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + obtain ⟨Ce, hCe, he⟩ := exists_harmonic_endpoint_bound (E := Euclidean (m + 2)) μ hQ hk hg hdiff (m + 2) hA hV hW + obtain ⟨Cs, hCs, hs⟩ := exists_short_average_mass_integral_bound μ hQ hk hg m hA hV + obtain ⟨Cl, hCl, hl⟩ := exists_long_time_mass_sum_bound μ hQ hk hg hdiff m hA hV + obtain ⟨Cc, hCc, hc⟩ := exists_harmonic_curvature_integral_bound (E := Euclidean (m + 2)) μ hQ hk hg hdiff (m + 2) hA hV hW + obtain ⟨Cx, hCx, hx⟩ := exists_harmonic_cutoff_error_integral_bound μ hQ hk G χ + hg hdiff hρ hρr hA hV hδ + let C := Ce * (L : ℝ) ^ 2 + |lambda| * R ^ 2 + 2 * (Cs + Cl) + + 4 * |κ| * Cc * (L : ℝ) ^ 2 * R ^ 2 + 2 * Cx * R ^ 2 + refine ⟨C, by dsimp only [C]; positivity, ?_⟩ + intro i hi x q hfinite hvolume hcenter hupper hsource hcontain hzero hsep hone v + let s := R / (2 : ℝ) ^ i + have hspos : 0 < s := div_pos hR (by positivity) + have hsR : s ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsRhalf : s ≤ R / 2 := by + have hp : (2 : ℝ) ≤ 2 ^ i := by simpa using pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hi + exact div_le_div_of_nonneg_left hR.le (by norm_num) hp + have hsq : s ^ 2 ≤ R ^ 2 := (sq_le_sq₀ hspos.le hR.le).mpr hsR + have hpos : 0 < μ.real (ball q s) := (mul_pos hV (pow_pos hspos (m + 2))).trans_le hvolume + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r₀) := by + intro z hz + have hd := χ.tsupport_subset μ hQ hz + rw [mem_closedBall] at hd + exact lt_of_le_of_lt hd (by linarith) + have hsupp : ∀ z, χ.weight z ≠ 0 → z ∈ ball x R := by + intro z hz + by_contra hn + exact hz (hzero z hn) + have hterm := he R s x q hR hR1 hspos hsRhalf hfinite hpos hcenter + (by simpa only [pow_zero, div_one] using hupper 0) + (by simpa only [Real.sqrt_sq hR.le] using hsource (R ^ 2) (sq_pos_of_pos hR) le_rfl) + U M κ p r₀ L v (G v) χ.weight χ.bounds hχΩ hzero χ.sobolev χ.representative + have hshort := hs M R hR hR1 x χ.weight (χ.hasCompactSupport μ hQ) χ.bounds hzero i q + hfinite hvolume hcenter (fun t ht htR z hz => hsource t ht (htR.trans hsq) z (hsupp z hz)) v + have hlong := hl M R hR hR1 x χ.weight (χ.hasCompactSupport μ hQ) χ.bounds hzero i q + hfinite hpos hcenter (fun t ht htR z hz => hsource t ht htR z (hsupp z hz)) v + have hcurv := hc R hR hR1 i x q hfinite hvolume hcenter hupper hsource + U M κ p r₀ L v (G v) χ.weight χ.bounds hχΩ hzero χ.sobolev χ.representative + have herr := (hx R s x q hR hR1 hspos hsR hfinite hvolume hcenter hsep + (fun t ht htR z _ hz => hsource t ht htR z + (hcontain (by simpa only [mem_closedBall, dist_comm] using hz))) v).2.2 + have hmain := (G v).mean_sub_heat_norm_le μ hQ hk χ hρ hρr + (ball q s) measurableSet_ball isBounded_ball hone (sq_pos_of_pos hspos) hsq x lambda + dsimp only at hmain + have hb := dyadic_scalar_background_bounds M (m + 2) x hR hR1 i v + have he' := mul_le_mul_of_nonneg_left hb.1 (by positivity : 0 ≤ Ce * (L : ℝ) ^ 2) + have hregBound := mul_le_mul_of_nonneg_left hb.2.1 (abs_nonneg lambda) + have hc' := mul_le_mul_of_nonneg_left hb.2.2.1 + (by positivity : 0 ≤ 2 * |κ| * Cc * (L : ℝ) ^ 2) + have hx' := mul_le_mul_of_nonneg_left hb.2.2.2 hCx.le + have hcurv' := mul_le_mul_of_nonneg_left hcurv (by positivity : 0 ≤ 2 * |κ|) + rw [abs_mul, abs_of_nonneg (sq_nonneg s)] at hmain + dsimp only [C, s] at * + linear_combination hmain + hterm + 2 * hshort + 2 * hlong + hcurv' + herr + + he' + hregBound + hc' + hx' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionConfiguration.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionConfiguration.lean new file mode 100644 index 0000000000000000000000000000000000000000..d58f71bdf694caa520c9e6aaa88667d26a4fd4d9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionConfiguration.lean @@ -0,0 +1,205 @@ +import OAI.Geometry.RCD.Harmonic.ActualProjectionOuter +import OAI.Geometry.RCD.Sobolev.SmallBallPoissonQuadratic +import OAI.Geometry.RCD.Harmonic.ScaledProjectionData +import OAI.Geometry.RCD.Coordinates.BoundedLocalCoordinates + +namespace OAI + +/-! # The geometric data for one actual two-center projection + +The source measures, equal-Laplacian Poisson replacements and harmonic +coordinate estimates determine the affine projection and its residual. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Equal-Laplacian replacements and harmonic coordinates centered at the +second point, with their source and normalization bounds. -/ +structure ActualProjectionConfiguration {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [IsFiniteMeasureOnCompacts (hausdorff n X)] (κ B J C A Cχ epsilon H D L M : ℝ) where + root : ℝ + root_le_one : root ≤ 1 + first : X + center : X + firstSource : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ first root + secondSource : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ center root + firstReplacement : DyadicDistanceReplacements (hausdorff n X) hX.quadratic firstSource B J C + secondReplacement : DyadicDistanceReplacements (hausdorff n X) hX.quadratic secondSource B J C + index : ℕ + room : dist center first ≤ distanceSourceRadius root index / 4 + curvature : -1 ≤ K * distanceSourceRadius root index ^ 2 + smallCurvature : -κ ≤ K * (distanceSourceRadius root index / 512) ^ 2 + laplacianBound : (n : ℝ) + κ * (4 * distanceSourceRadius root index) ^ 2 ≤ (n : ℝ) + 1 + coordinates : Fin n → SobolevSpace (hausdorff n X) hX.quadratic + coordinateValues : X → Euclidean n + harmonic : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball center (distanceSourceRadius root index / 4)) (coordinates j) + gradient : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball center (distanceSourceRadius root index / 4)), + localGamma (hausdorff n X) hX.quadratic (coordinates j) (coordinates j) x ≤ (1 + epsilon) ^ 2 + firstGradient : ∀ᵐ x ∂(hausdorff n X).restrict (ball center (distanceSourceRadius root index / 4)), + localGamma (hausdorff n X) hX.quadratic (firstReplacement.replacement index) + (firstReplacement.replacement index) x ≤ (A * distanceSourceRadius root index) ^ 2 + secondGradient : ∀ᵐ x ∂(hausdorff n X).restrict (ball center (distanceSourceRadius root index / 4)), + localGamma (hausdorff n X) hX.quadratic (secondReplacement.replacement index) + (secondReplacement.replacement index) x ≤ (A * distanceSourceRadius root index) ^ 2 + cutoff : GoodLaplacianCutoff (hausdorff n X) hX.quadratic center (distanceSourceRadius root index / 64) Cχ + one : SobolevSpace (hausdorff n X) hX.quadratic + oneRepresentative : SobolevSpace.toLp (hausdorff n X) hX.quadratic one =ᵐ[ + (hausdorff n X).restrict (ball center (distanceSourceRadius root index / 512))] fun _ => (1 : ℝ) + volume : ∀ t : ℝ, 0 < t → t ≤ root → + |(hausdorff n X).real (ball center t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4 + sphere : (hausdorff n X) (sphere center (distanceSourceRadius root index / 2048)) = 0 + frame : Euclidean n ≃L[ℝ] Euclidean n + frameBound : ‖(frame : Euclidean n →L[ℝ] Euclidean n)‖ ≤ M + source : ℝ + source_pos : 0 < source + pairBudget : normalizedPoissonDefect (hausdorff n X) hX.quadratic firstSource index + + normalizedPoissonDefect (hausdorff n X) hX.quadratic secondSource index ≤ source ^ 2 + affineBound : ∀ c a, |c| + distanceSourceRadius root index * ‖frame.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball center (distanceSourceRadius root index / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic coordinates + (ball center (distanceSourceRadius root index / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ + affineHalfBound : ∀ c a, |c| + distanceSourceRadius root index * ‖frame.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball center (distanceSourceRadius root index / 4096)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic coordinates + (ball center (distanceSourceRadius root index / 4096)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ + columnBound : ∀ b : Euclidean n, ∀ᵐ x ∂(hausdorff n X).restrict + (ball center (distanceSourceRadius root index / 512)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates (frame b)) x| ≤ + L * distanceSourceRadius root index * ‖b‖ + radialColumns : Euclidean n →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic + radialMatrix : Euclidean n →L[ℝ] Euclidean n + radialRepresentative : ∀ b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (radialColumns b) =ᵐ[ + (hausdorff n X).restrict (ball center (distanceSourceRadius root index / 512))] + localGamma (hausdorff n X) hX.quadratic (secondReplacement.replacement index) + (sobolevColumnMap (hausdorff n X) hX.quadratic coordinates b) + radialFit : ∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball center (distanceSourceRadius root index / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball center (distanceSourceRadius root index / 512)) + (radialColumns (frame b) - sobolevColumnMap (hausdorff n X) hX.quadratic coordinates (radialMatrix (frame b))))‖ ≤ + D * distanceSourceRadius root index * ‖b‖ * source + totalSource : ℝ + totalSource_nonneg : 0 ≤ totalSource + summable : Summable (normalizedPoissonDefect (hausdorff n X) hX.quadratic secondSource) + totalBudget : (∑' j, normalizedPoissonDefect (hausdorff n X) hX.quadratic secondSource j) ≤ totalSource + approximationError : ℝ + approximationError_pos : 0 < approximationError + measured : IsMeasuredEuclideanApproximation (hausdorff n X) n center + (distanceSourceRadius root index) (1 / 1024) approximationError coordinateValues + centered : coordinateValues center = 0 + representative : ∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic + (radiusScaledColumns (hausdorff n X) hX.quadratic (distanceSourceRadius root index) coordinates j) =ᵐ[ + (hausdorff n X).restrict (ball center ((1 / 1024) * distanceSourceRadius root index))] + fun x => coordinateValues x j + +namespace ActualProjectionConfiguration + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [IsFiniteMeasureOnCompacts (hausdorff n X)] + {κ B J C A Cχ epsilon H D L M : ℝ} + +/-- The physical radius is the actual radius of the chosen replacement. -/ +def radius (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : ℝ := + distanceSourceRadius d.root d.index + +theorem radius_pos (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : + 0 < d.radius := distanceSourceRadius_pos d.secondSource.radius_pos d.index + +theorem radius_le_root (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : + d.radius ≤ d.root := by + have hh := distanceSourceRadius_outer_le d.secondSource.radius_pos.le d.index + change 2 * d.radius ≤ d.root at hh + linarith [d.radius_pos] + +/-- One explicit approximation error controls both the measured coordinates +and the actual radial quadratic error. -/ +def error (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : ℝ := + d.approximationError + + 2 * (((5 / 3 : ℝ) * (1024 : ℝ) ^ n) * + (annularPoincareConstant K n * B / (3 / 4 * euclideanUnitVolume n) * d.totalSource)) + + 2 * (d.approximationError * (2 * (1 / 1024 : ℝ) + d.approximationError) / 2) ^ 2 + +theorem approximationError_le (hB : 0 ≤ B) + (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : + d.approximationError ≤ d.error := by + have hP := annularPoincareConstant_pos K n + have hV := euclideanUnitVolume_pos n + have hT := d.totalSource_nonneg + have hterm : 0 ≤ 2 * (((5 / 3 : ℝ) * (1024 : ℝ) ^ n) * + (annularPoincareConstant K n * B / (3 / 4 * euclideanUnitVolume n) * d.totalSource)) := by + positivity + dsimp only [error] + linarith [sq_nonneg (d.approximationError * (2 * (1 / 1024 : ℝ) + d.approximationError) / 2)] + +theorem error_pos (hB : 0 ≤ B) + (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : + 0 < d.error := d.approximationError_pos.trans_le (d.approximationError_le hB) + +/-- The actual radial quadratic estimate on the outer projection ball. -/ +theorem quadratic_error + (hn : 2 ≤ n) (hκ : 0 ≤ κ) (hB : 0 ≤ B) + (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : + ((hausdorff n X).real (ball d.center ((1 / 1024) * d.radius)))⁻¹ * + (∫ x in ball d.center ((1 / 1024) * d.radius), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic + ((d.radius ^ 2)⁻¹ • d.secondReplacement.replacement d.index) x - + ‖d.coordinateValues x‖ ^ 2 / 2) ^ 2 ∂hausdorff n X) ≤ d.error := by + let Ccoord : ℝ≥0 := ⟨1 / 1024 + d.approximationError, by + linarith [d.approximationError_pos]⟩ + let u := radiusScaledColumns (hausdorff n X) hX.quadratic d.radius d.coordinates + have hb (j : Fin n) : ∀ᵐ x ∂(hausdorff n X).restrict + (ball d.center ((1 / 1024) * d.radius)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) x| ≤ Ccoord := by + filter_upwards [d.representative j, ae_restrict_mem measurableSet_ball] with x hx hball + change SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) x = _ at hx + rw [hx] + have hnorm := (d.measured.metric.centered_norm_error d.radius_pos + (by norm_num) d.centered hball.le).2 + exact (show |d.coordinateValues x j| ≤ ‖d.coordinateValues x‖ by + simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le (d.coordinateValues x) j).trans hnorm + let w := fun j => boundedLocalVersion (hausdorff n X) hX.quadratic (u j) Ccoord + have hw (j : Fin n) : SobolevSpace.toLp (hausdorff n X) hX.quadratic (w j) =ᵐ[ + (hausdorff n X).restrict (ball d.center ((1 / 1024) * d.radius))] + fun x => d.coordinateValues x j := + (boundedLocalVersion_eq (hausdorff n X) hX.quadratic (u j) Ccoord (hb j)).trans + (d.representative j) + have hh := actual_poisson_small_ball_quadratic_error hX hn d.secondReplacement + hκ hB d.totalSource_nonneg d.approximationError_pos.le + (by norm_num : (0 : ℝ) < 1 / 1024) (by norm_num : (1 / 1024 : ℝ) ≤ 1 / 4) + d.root_le_one (euclideanUnitVolume_pos n) d.volume d.summable d.totalBudget d.index + w Ccoord d.coordinateValues + (fun j => boundedLocalVersion_bound (hausdorff n X) hX.quadratic (u j) Ccoord) + hw d.measured.metric d.centered + have hpow : ((1 / 1024 : ℝ)⁻¹) ^ n = (1024 : ℝ) ^ n := by norm_num + rw [hpow] at hh + change _ ≤ d.error + exact hh.trans (by dsimp only [error]; linarith [d.approximationError_pos]) + +/-- The exact orthogonal residual norm of the actual two-center target. -/ +def projectionNorm (d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) : ℝ := + ‖normalizeLocalL2 (hausdorff n X) (ball d.center ((1 / 2048) * d.radius)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic + (radiusScaledColumns (hausdorff n X) hX.quadratic d.radius d.coordinates) + (ball d.center ((1 / 2048) * d.radius)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball d.center ((1 / 2048) * d.radius)) + ((d.radius ^ 2)⁻¹ • (d.secondReplacement.replacement d.index - d.firstReplacement.replacement d.index))))‖ + +end ActualProjectionConfiguration +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionOuter.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionOuter.lean new file mode 100644 index 0000000000000000000000000000000000000000..19bf51680ee5dd5df27860f861e3312ea33e37ac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionOuter.lean @@ -0,0 +1,270 @@ +import OAI.Geometry.RCD.Harmonic.ActualTwoCenterProjection +import OAI.Geometry.RCD.Coordinates.NormalizedTransportDefect +import OAI.Geometry.RCD.Harmonic.ScaledProjectionOuter +import OAI.Geometry.RCD.Harmonic.ProjectionResidualValues + +namespace OAI + +/-! # Uniform outer estimates for the actual two-center Poisson projection -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The same actual projection satisfies a uniform outer estimate. The +transport error is constructed from the second Poisson replacement and its +full source measure. All three constants precede the centers and scales. -/ +theorem actual_two_center_projection_outer {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ B J C A Cχ epsilon H D L : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) (hL : 0 ≤ L) : + ∃ F G₀ T₀ : ℝ, 0 ≤ F ∧ 0 ≤ G₀ ∧ 0 ≤ T₀ ∧ ∀ {r0 : ℝ} (p₁ p₂ : X) + (S₁ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₁ r0) + (S₂ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₂ r0) + (T₁ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₁ B J C) + (T₂ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₂ B J C) + (i : ℕ) + (_hroom₁ : dist p₂ p₁ ≤ distanceSourceRadius r0 i / 4) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (_hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p₂ (distanceSourceRadius r0 i / 4)) (u j)) + (_hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p₂ (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (_hf₁ : ∀ᵐ x ∂(hausdorff n X).restrict (ball p₂ (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₁.replacement i) (T₁.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_hf₂ : ∀ᵐ x ∂(hausdorff n X).restrict (ball p₂ (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) (T₂.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p₂ (distanceSourceRadius r0 i / 64) Cχ) + (_hcurv : -κ ≤ K * (distanceSourceRadius r0 i / 512) ^ 2) + (η : SobolevSpace (hausdorff n X) hX.quadratic) + (_hη : SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p₂ (distanceSourceRadius r0 i / 512))] + fun _ => (1 : ℝ)) + (_hvolume : ∀ t : ℝ, 0 < t → t ≤ distanceSourceRadius r0 i → + |(hausdorff n X).real (ball p₂ t) / (euclideanUnitVolume n * t ^ n) - 1| ≤ 1 / 4) + (_ha : (n : ℝ) + κ * (4 * distanceSourceRadius r0 i) ^ 2 ≤ (n : ℝ) + 1) + (_hsphere : (hausdorff n X) (sphere p₂ (distanceSourceRadius r0 i / 2048)) = 0) + (N : Euclidean n ≃L[ℝ] Euclidean n) (σ : ℝ) (_hσ : 0 ≤ σ) + (_hbudget : normalizedPoissonDefect (hausdorff n X) hX.quadratic S₁ i + + normalizedPoissonDefect (hausdorff n X) hX.quadratic S₂ i ≤ σ ^ 2) + (_hbound : ∀ c a, |c| + distanceSourceRadius r0 i * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p₂ (distanceSourceRadius r0 i / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u + (ball p₂ (distanceSourceRadius r0 i / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) + (_hboundHalf : ∀ c a, |c| + distanceSourceRadius r0 i * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p₂ (distanceSourceRadius r0 i / 4096)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u + (ball p₂ (distanceSourceRadius r0 i / 4096)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) + (_hcolumn : ∀ b : Euclidean n, ∀ᵐ x ∂(hausdorff n X).restrict + (ball p₂ (distanceSourceRadius r0 i / 512)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u (N b)) x| ≤ + L * distanceSourceRadius r0 i * ‖b‖) + (G : Euclidean n →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (Az : Euclidean n →L[ℝ] Euclidean n) + (_hG : ∀ b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (G b) =ᵐ[ + (hausdorff n X).restrict (ball p₂ (distanceSourceRadius r0 i / 512))] + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b)) + (_hfit : ∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p₂ (distanceSourceRadius r0 i / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball p₂ (distanceSourceRadius r0 i / 512)) + (G (N b) - sobolevColumnMap (hausdorff n X) hX.quadratic u (Az (N b))))‖ ≤ + D * distanceSourceRadius r0 i * ‖b‖ * σ), + ∃ (c : ℝ) (b : Euclidean n) (k : ℝ) + (w e : SobolevSpace (hausdorff n X) hX.quadratic), + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let Ω := ball p₂ (s / 512) + let I := ball p₂ (s / 2048) + w = T₂.replacement i - T₁.replacement i - c • η - sobolevColumnMap μ hX.quadratic u (N b) ∧ + IsSobolevHarmonicOn μ hX.quadratic Ω w ∧ + SobolevSpace.restrictLp μ hX.quadratic I w = affineResidual μ hX.quadratic u I + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic I (T₂.replacement i - T₁.replacement i)) ∧ + |c| + s * ‖b‖ ≤ H * (2 * max 8 B) * s ^ 2 ∧ + (localGamma μ hX.quadratic (T₂.replacement i) w =ᵐ[μ.restrict Ω] + SobolevSpace.toLp μ hX.quadratic + (w + sobolevColumnMap μ hX.quadratic u (N b - Az (N b)) + k • η + e)) ∧ + ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω e)‖ ≤ F * s ^ 2 * σ ∧ + |(s ^ 2)⁻¹ * k| + (s / 2048) * ‖N.symm ((s ^ 2)⁻¹ • (N b - Az (N b)))‖ ≤ + G₀ * (‖normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic I ((s ^ 2)⁻¹ • w))‖ + σ) ∧ + ‖normalizeLocalL2 μ (ball p₂ (s / 1024)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball p₂ (s / 1024)) ((s ^ 2)⁻¹ • w))‖ ≤ + T₀ * (‖normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic I ((s ^ 2)⁻¹ • w))‖ + σ) := by + obtain ⟨F, hF, hprojection⟩ := actual_two_center_projection hX hhessian hproduct hpoincare + hκ hK hB hJ hCχ hA hepsilon hH hD + let V₀ := Real.sqrt ((5 / 3 : ℝ) * (2 : ℝ) ^ n) + let W₀ := Real.sqrt ((5 / 3 : ℝ) * (4 : ℝ) ^ n) + let D₀ := Real.sqrt (B * (2048 : ℝ) ^ 2 * + ((4 / (3 * euclideanUnitVolume n)) * (2048 : ℝ) ^ n)) + let Cw : ℝ≥0 := ⟨2 * max 8 B + (1 + L) * H * (2 * max 8 B), by positivity⟩ + obtain ⟨G₀, T₀, hG₀, hT₀, houter⟩ := hgradient.scaled_projected_residual_outer hn hκ hH + (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) (mul_nonneg (by norm_num : (0:ℝ) ≤ 2048) hA) + (mul_nonneg (by norm_num : (0:ℝ) ≤ 2048) hL) hF Cw (D := D₀) + refine ⟨F, G₀, T₀, hF, hG₀, hT₀, ?_⟩ + intro r0 p₁ p₂ S₁ S₂ T₁ T₂ i hroom₁ u hu hgrad hf₁ hf₂ χ hcurv η hη hvolume ha hsphere + N σ hσ hbudget hbound hboundHalf hcolumn G Az hG hfit + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + let R := s / 2048 + let Ω := ball p₂ (s / 512) + let I := ball p₂ R + have hs : 0 < s := distanceSourceRadius_pos S₁.radius_pos i + have hR : 0 < R := by dsimp only [R]; positivity + have hv (t : ℝ) (ht : 0 < t) (hts : t ≤ s) := hvolume t ht hts + obtain ⟨c, b, k, w, e, hweq, hwharm, hproj, hcoeff, heuler, he⟩ := + hprojection p₁ p₂ p₂ S₁ S₂ T₁ T₂ i hroom₁ + (by rw [dist_self]; change 0 ≤ s / 4; positivity) u hu hgrad hf₁ hf₂ χ hcurv η hη + (hv (s / 64) (by positivity) (by linarith)) + (hv (s / 512) (by positivity) (by linarith)) N σ hσ hbudget hbound G Az hG hfit + have hpositive : 0 < μ.real I := + (quarter_volume_bounds hR (euclideanUnitVolume_pos n) + (hv R hR (by dsimp only [R]; linarith))).1 + have hhalfpos : 0 < μ.real (ball p₂ (R / 2)) := + (quarter_volume_bounds (by positivity : 0 < R / 2) (euclideanUnitVolume_pos n) + (hv (R / 2) (by positivity) (by dsimp only [R]; linarith))).1 + have hhalf : μ.real (ball p₂ R) ≤ V₀ ^ 2 * μ.real (ball p₂ (R / 2)) := by + have hh := radial_fraction_volume_ratio hR (by norm_num : (0:ℝ) < 1 / 2) + (euclideanUnitVolume_pos n) (hv R hR (by dsimp only [R]; linarith)) + (hv ((1 / 2) * R) (by positivity) (by dsimp only [R]; linarith)) + have hpow : ((1 / 2 : ℝ) ^ n)⁻¹ = (2 : ℝ) ^ n := by simp + rw [one_div_mul_eq_div, hpow] at hh + dsimp only [V₀] + rw [Real.sq_sqrt (by positivity)] + exact (div_le_iff₀ hhalfpos).mp hh + have hfour : μ.real (ball p₂ (4 * R)) ≤ W₀ ^ 2 * μ.real I := by + have hh := radial_fraction_volume_ratio (by positivity : 0 < 4 * R) + (by norm_num : (0:ℝ) < 1 / 4) (euclideanUnitVolume_pos n) + (hv (4 * R) (by positivity) (by dsimp only [R]; linarith)) + (hv ((1 / 4) * (4 * R)) (by positivity) (by dsimp only [R]; linarith)) + have hpow : ((1 / 4 : ℝ) ^ n)⁻¹ = (4 : ℝ) ^ n := by simp + have heq : (1 / 4 : ℝ) * (4 * R) = R := by ring + rw [heq, hpow] at hh + dsimp only [W₀] + rw [Real.sq_sqrt (by positivity)] + exact (div_le_iff₀ hpositive).mp hh + have hwvalue : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ w x| ≤ Cw * s ^ 2 := by + have hvv : ∀ᵐ x ∂μ.restrict Ω, + |SobolevSpace.toLp μ hQ (T₂.replacement i - T₁.replacement i) x| ≤ (2 * max 8 B) * s ^ 2 := by + filter_upwards [ae_restrict_of_ae (T₁.value_bound μ hQ i), + ae_restrict_of_ae (T₂.value_bound μ hQ i), + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ (T₂.replacement i)) + (SobolevSpace.toLp μ hQ (T₁.replacement i)))] with x h1 h2 hsub + rw [map_sub, hsub, Pi.sub_apply] + exact (abs_sub _ _).trans (by dsimp only [s] at *; linarith) + have hb := physical_projection_residual_bound μ hQ Ω u N + (T₂.replacement i - T₁.replacement i) η c b hs hH (by positivity) hL hvv hη (hcolumn b) hcoeff + have hscale : s ^ 2 • ((s ^ 2)⁻¹ • w) = w := by + rw [smul_smul, mul_inv_cancel₀ (ne_of_gt (sq_pos_of_pos hs)), one_smul] + rw [← hweq] at hb + filter_upwards [hb, ae_restrict_of_ae (Lp.coeFn_smul (s ^ 2) + (SobolevSpace.toLp μ hQ ((s ^ 2)⁻¹ • w)))] with x hb heq + have hh := mul_le_mul_of_nonneg_left hb (sq_nonneg s) + rw [← hscale, map_smul, heq, Pi.smul_apply, smul_eq_mul, abs_mul, + abs_of_nonneg (sq_nonneg s)] + exact hh.trans_eq (mul_comm _ _) + have hbound' : ∀ c a, |c| + R * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ (ball p₂ (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p₂ (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + intro c a + have hh := hboundHalf c a + have heq : R / 2 = s / 4096 := by dsimp only [R]; ring + rw [heq] + exact (by dsimp only [R]; nlinarith [norm_nonneg (N.symm a)] : + |c| + R * ‖N.symm a‖ ≤ |c| + s * ‖N.symm a‖).trans hh + have hU (v : Euclidean n) : ‖normalizeLocalL2 μ Ω + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ u v))‖ ≤ (2048 * L) * (R * ‖N.symm v‖) := by + have hh := normalized_norm_le_of_bound μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ u v)) + (by positivity : 0 ≤ L * s * ‖N.symm v‖) ?_ + · convert hh using 1; dsimp only [R]; ring + filter_upwards [hcolumn (N.symm v), SobolevSpace.restrictLp_coe μ hQ Ω + (sobolevColumnMap μ hQ u v)] with x hx heq + rw [heq] + simpa only [N.apply_symm_apply] using hx + have hf : ∀ᵐ x ∂μ.restrict (ball p₂ (4 * R)), + localGamma μ hQ (T₂.replacement i) (T₂.replacement i) x ≤ ((2048 * A) * R) ^ 2 := by + have hh := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (show 4 * R ≤ s / 4 by dsimp only [R]; linarith)) hf₂ + have heq : ((2048 * A) * R) ^ 2 = (A * s) ^ 2 := by dsimp only [R]; ring + rw [heq] + exact hh + have hlap := (T₂.laplacian i).mono μ hQ measurableSet_ball + (ball_subset_ball (show 4 * R ≤ s by dsimp only [R]; linarith)) + have hid : localRadialDerivative μ hQ (ball p₂ (4 * R)) (T₂.replacement i) hf w = + SobolevSpace.restrictLp μ hQ (ball p₂ (4 * R)) + (w + sobolevColumnMap μ hQ u (N b - Az (N b)) + k • η + e) := by + apply localRadialDerivative_eq_restrict + have h4 : 4 * R = s / 512 := by dsimp only [R]; ring + simpa only [h4] using heuler.symm + have hbudget₂ : normalizedPoissonDefect μ hQ S₂ i ≤ σ ^ 2 := by + have hp := normalizedPoissonDefect_nonneg μ hQ S₁ hκ i + linarith + obtain ⟨g, hg, hradial, hgerror⟩ := T₂.normalized_transport_defect μ hQ i hκ hB hbudget₂ + (hv R hR (by dsimp only [R]; linarith)) + have hgerror' : (∫ x in ball p₂ (4 * R), (g x) ^ 2 ∂μ) ≤ + D₀ ^ 2 * R ^ 2 * μ.real I * σ ^ 2 := by + have homega := euclideanUnitVolume_pos n + dsimp only [D₀] + rw [Real.sq_sqrt (by positivity)] + exact hgerror + have hcurvR : -κ ≤ K * R ^ 2 := by + have hh : K * R ^ 2 = (K * (s / 512) ^ 2) / 16 := by dsimp only [R]; ring + rw [hh] + linarith + have hsmall : IsSobolevHarmonicOn μ hQ (ball p₂ R) w := + hwharm.mono μ hQ (ball_subset_ball (show R ≤ s / 512 by dsimp only [R]; linarith)) + have h4 : 4 * R = s / 512 := by dsimp only [R]; ring + have h2 : 2 * R = s / 1024 := by dsimp only [R]; ring + have hb := houter p₂ R ((n : ℝ) + κ * (4 * s) ^ 2) s hR (by positivity) ha hcurvR hs + (T₂.replacement i) w η e u N (N b - Az (N b)) k σ hσ hlap hf + (by simpa only [h4] using hwvalue) hsmall + (by simpa only [h4] using hη) hpositive hhalf hfour hbound' hid + (by + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + have hh := (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr he + rw [normalized_sobolev_mean_sq] at hh ⊢ + simpa only [h4] using hh) (fun v => by + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + have hh := (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr (hU v) + rw [normalized_sobolev_mean_sq] at hh ⊢ + simpa only [h4] using hh) + g hg hradial hsphere hgerror' + refine ⟨c, b, k, w, e, hweq, hwharm, hproj, hcoeff, heuler, he, hb.1, ?_⟩ + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + have hh := (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr hb.2 + rw [normalized_sobolev_mean_sq] at hh ⊢ + simpa only [h2] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionThreshold.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..89190e28d6631a649881fb8667e9e153d3d6231b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionThreshold.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Harmonic.ActualSharpProjection + +namespace OAI + +/-! # A geometric smallness threshold for the actual sharp projection -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [IsFiniteMeasureOnCompacts (hausdorff n X)] + {κ B J C A Cχ epsilon H D L M : ℝ} + +/-- Small metric-approximation error and small total original source mass +make the constructed joint compactness error uniformly small. -/ +theorem actual_projection_error_threshold (hB : 0 ≤ B) {delta : ℝ} (hdelta : 0 < delta) : + ∃ tau : ℝ, 0 < tau ∧ ∀ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M, + d.approximationError ≤ tau → d.totalSource ≤ tau → d.error < delta := by + let Q := 2 * (((5 / 3 : ℝ) * (1024 : ℝ) ^ n) * + (annularPoincareConstant K n * B / (3 / 4 * euclideanUnitVolume n))) + have hQ : 0 ≤ Q := by + have hp := annularPoincareConstant_pos K n + have hv := euclideanUnitVolume_pos n + dsimp only [Q] + positivity + let tau := min 1 (delta / (2 * (Q + 3))) + have htau : 0 < tau := lt_min zero_lt_one (div_pos hdelta (by positivity)) + have htau1 : tau ≤ 1 := min_le_left _ _ + have htaud : (Q + 3) * tau ≤ delta / 2 := by + have hh := (le_div_iff₀ (by positivity : 0 < 2 * (Q + 3))).mp (min_le_right 1 (delta / (2 * (Q + 3)))) + change tau * (2 * (Q + 3)) ≤ delta at hh + linarith + refine ⟨tau, htau, ?_⟩ + intro d he ht + have he0 := d.approximationError_pos.le + have he1 : d.approximationError ≤ 1 := he.trans htau1 + have he2 : d.approximationError ^ 2 ≤ d.approximationError := by nlinarith + let q := d.approximationError * (2 * (1 / 1024 : ℝ) + d.approximationError) / 2 + have hq0 : 0 ≤ q := by dsimp only [q]; positivity + have hq : q ≤ d.approximationError := by dsimp only [q]; nlinarith only [he2, he0] + have hq2 : q ^ 2 ≤ d.approximationError := by + exact ((sq_le_sq₀ hq0 he0).mpr hq).trans he2 + have hsource := mul_le_mul_of_nonneg_left ht hQ + have herr : d.error = d.approximationError + Q * d.totalSource + 2 * q ^ 2 := by + dsimp only [ActualProjectionConfiguration.error, Q, q] + ring + rw [herr] + nlinarith only [he, hsource, hq2, htaud, hdelta] + +/-- The sharp bound now requires only separate geometric approximation +and original source tolerances, as supplied by the regular-neighborhood +construction. -/ +theorem actual_sharp_projection_small_data + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) (hn : 2 ≤ n) + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) (hL : 0 ≤ L) : + ∃ P tau : ℝ, 0 < P ∧ 0 < tau ∧ + ∀ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M, + d.approximationError ≤ tau → d.totalSource ≤ tau → d.projectionNorm ≤ P * d.source := by + obtain ⟨P, hP, delta, hdelta, hbound⟩ := actual_sharp_projection (C := C) (M := M) hX + hhessian hproduct hpoincare hgradient hcompact hn hκ hK hB hJ hCχ hA hepsilon hH hD hL + obtain ⟨tau, htau, herror⟩ := actual_projection_error_threshold (hX := hX) (κ := κ) (J := J) (C := C) + (A := A) (Cχ := Cχ) (epsilon := epsilon) (H := H) (D := D) (L := L) (M := M) hB hdelta + exact ⟨P, tau, hP, htau, fun d he ht => hbound d (herror d he ht)⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionUnits.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..a06723c34d84c632427dd95d7d617bd4b8527468 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualProjectionUnits.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Harmonic.ScaledProjectionData +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits +import OAI.Geometry.RCD.Harmonic.ForcingCoefficient + +namespace OAI + +/-! # The exact coefficient and forcing units of the actual projection -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- Passing from the radius-weighted physical covector to the coefficient +of the rescaled coordinates costs only the fixed radius ratio and frame norm. -/ +theorem projection_coefficient_rescale {n : ℕ} (N : Euclidean n ≃L[ℝ] Euclidean n) + {r M G alpha sigma : ℝ} (hr : 0 < r) (hN : ‖(N : Euclidean n →L[ℝ] Euclidean n)‖ ≤ M) + (ell : Euclidean n) (k : ℝ) + (hbound : |(r ^ 2)⁻¹ * k| + (r / 2048) * ‖N.symm ((r ^ 2)⁻¹ • ell)‖ ≤ + G * (alpha + sigma)) : + ‖r⁻¹ • ell‖ + |(r ^ 2)⁻¹ * k| ≤ + max 1 (2048 * M) * G * (alpha + sigma) := by + have hnorm : ‖(r ^ 2)⁻¹ • ell‖ ≤ M * ‖N.symm ((r ^ 2)⁻¹ • ell)‖ := by + calc + _ = ‖N (N.symm ((r ^ 2)⁻¹ • ell))‖ := by rw [N.apply_symm_apply] + _ ≤ ‖(N : Euclidean n →L[ℝ] Euclidean n)‖ * ‖N.symm ((r ^ 2)⁻¹ • ell)‖ := + by + change ‖(N : Euclidean n →L[ℝ] Euclidean n) (N.symm ((r ^ 2)⁻¹ • ell))‖ ≤ _ + exact (N : Euclidean n →L[ℝ] Euclidean n).le_opNorm _ + _ ≤ _ := mul_le_mul_of_nonneg_right hN (norm_nonneg _) + have heq : r⁻¹ • ell = r • ((r ^ 2)⁻¹ • ell) := by + rw [smul_smul] + congr 1 + field_simp + have hlin : ‖r⁻¹ • ell‖ ≤ (2048 * M) * ((r / 2048) * ‖N.symm ((r ^ 2)⁻¹ • ell)‖) := by + rw [heq, norm_smul, Real.norm_eq_abs, abs_of_pos hr] + nlinarith only [mul_le_mul_of_nonneg_left hnorm hr.le] + have hweight : 0 ≤ (r / 2048) * ‖N.symm ((r ^ 2)⁻¹ • ell)‖ := by positivity + have hterm := mul_le_mul_of_nonneg_right (le_max_right 1 (2048 * M)) hweight + have hconst := mul_le_mul_of_nonneg_right (le_max_left 1 (2048 * M)) (abs_nonneg ((r ^ 2)⁻¹ * k)) + have htotal := mul_le_mul_of_nonneg_left hbound + (le_trans zero_le_one (le_max_left 1 (2048 * M))) + nlinarith only [hlin, hterm, hconst, htotal] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The rescaled Euler equation is exactly the finite-coordinate identity +used by the published compactness theorem, including its constant term. -/ +theorem radius_scaled_projection_euler_sum {n : ℕ} {r B B' : ℝ} (hr : 0 < r) + (Ω : Set X) (hfin : μ Ω ≠ ∞) (u : Fin n → SobolevSpace μ hQ) + (f w eta e : SobolevSpace μ hQ) (ell : Euclidean n) (k : ℝ) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hf' : ∀ᵐ x ∂μ.restrict Ω, + localGamma μ hQ ((r ^ 2)⁻¹ • f) ((r ^ 2)⁻¹ • f) x ≤ B') + (hid : localRadialDerivative μ hQ Ω f hf w = SobolevSpace.restrictLp μ hQ Ω + (w + sobolevColumnMap μ hQ u ell + k • eta + e)) : + r ^ 2 • localRadialDerivative μ hQ Ω ((r ^ 2)⁻¹ • f) hf' ((r ^ 2)⁻¹ • w) = + SobolevSpace.restrictLp μ hQ Ω ((r ^ 2)⁻¹ • w) + + (∑ j, (r⁻¹ • ell) j • SobolevSpace.restrictLp μ hQ Ω (radiusScaledColumns μ hQ r u j)) + + ((r ^ 2)⁻¹ * k) • restrictedOne μ Ω hfin + + SobolevSpace.restrictLp μ hQ Ω ((r ^ 2)⁻¹ • e) := by + rw [radius_scaled_projection_euler μ hQ hr Ω u f w eta e ell k hf hf' hid] + simp only [map_add, map_smul, sobolevColumnMap_apply, map_sum, + restrictLp_eq_one_of_representative μ hQ eta Ω hfin heta, + Finset.smul_sum, smul_smul, PiLp.smul_apply, smul_eq_mul] + +omit [BorelSpace X] [ProperSpace X] in +/-- A mean-square norm is unchanged when only the proof of finiteness or +the presentation of the same measurable set changes. -/ +theorem normalized_sobolev_norm_congr {s t : Set X} (hst : s = t) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (w : SobolevSpace μ hQ) : + ‖normalizeLocalL2 μ s hs (SobolevSpace.restrictLp μ hQ s w)‖ = + ‖normalizeLocalL2 μ t ht (SobolevSpace.restrictLp μ hQ t w)‖ := by + subst t + rfl + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualRadialError.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialError.lean new file mode 100644 index 0000000000000000000000000000000000000000..728bb6861ef2da352b37c64e5082597c5b346414 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialError.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Harmonic.RadialErrorUnits + +namespace OAI + +/-! # Actual radial approximation controlled by one normalized defect -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The coefficient is independent of the center, scale and harmonic column. +The source and curvature terms are exactly the summable complete defect. -/ +theorem actual_distance_radial_error {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) : + let s := distanceSourceRadius r0 i + let q := positiveSquaredDistance (hausdorff n X) hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + ∀ j : Fin n, ∃ h : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (s / 64)) h ∧ + (∫ x in ball p (s / 64), + (localGamma (hausdorff n X) hX.quadratic q (u j) x - + SobolevSpace.toLp (hausdorff n X) hX.quadratic h x) ^ 2 ∂hausdorff n X) ≤ + radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * + (s ^ (n : ℝ) * normalizedPoissonDefect (hausdorff n X) hX.quadratic S i) := by + dsimp only + obtain ⟨L, hL, happrox⟩ := actual_distance_radial_approximation hX hn hhessian + hκ hK hB hJ hA hepsilon hCχ p S T i hs1 u hu hgrad hf χ hvol hdouble + intro j + obtain ⟨h, hh, he⟩ := happrox j + refine ⟨h, hh, he.trans ?_⟩ + rw [normalizedPoissonDefect_units] + exact radial_correction_error_units hs1 hκ measureReal_nonneg measureReal_nonneg + hB hJ hA hepsilon hCχ hL + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualRadialHarmonic.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialHarmonic.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c29f471e8fcff416105765a7a34c9cd16c885f4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialHarmonic.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.RCD.Sobolev.ActualPoissonMass +import OAI.Geometry.RCD.Sobolev.PoissonPairSpan +import OAI.Geometry.RCD.Coordinates.PoissonSpanCoordinates +import OAI.Geometry.RCD.Harmonic.RadialHarmonicApproximation + +namespace OAI + +/-! # Harmonic correction of the actual distance radial derivatives -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The full Poisson mass calculation and localized Hessian input now +construct a harmonic approximation to each actual coordinate radial +derivative, with a squared error linear in the same source mass. -/ +theorem actual_distance_radial_approximation {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hn : 2 ≤ n) (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A epsilon Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (hs1 : distanceSourceRadius r0 i ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64))) + (hdouble : 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i / 64)) ≤ + (hausdorff n X).real (ball p (2 * (distanceSourceRadius r0 i / 64)))) : + let s := distanceSourceRadius r0 i + let q := positiveSquaredDistance (hausdorff n X) hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity : 0 ≤ 4 * s) (T.cutoff i) + let P := annularPoincareConstant K n * (s / 64) ^ 2 + ∃ L : ℝ≥0, (L : ℝ) = ((n + 2 : ℕ) : ℝ) * max (1 + epsilon) (A * s) ∧ + ∀ j : Fin n, ∃ h : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (s / 64)) h ∧ + (∫ x in ball p (s / 64), + (localGamma (hausdorff n X) hX.quadratic q (u j) x - + SobolevSpace.toLp (hausdorff n X) hX.quadratic h x) ^ 2 ∂hausdorff n X) ≤ + 2 * (1 + epsilon) ^ 2 * ((S.source i).real (ball p s) * (B * s ^ 2)) + + 8 * P * (L : ℝ) ^ 2 * + (4096 * Cχ * (J + B / 2) * (S.source i).real (ball p s) + + κ * A ^ 2 * s ^ 2 * (hausdorff n X).real (ball p s)) := by + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + let q := positiveSquaredDistance μ hQ (by positivity : 0 ≤ 4 * s) (T.cutoff i) + let P := annularPoincareConstant K n * (s / 64) ^ 2 + have hP : 0 ≤ P := mul_nonneg (annularPoincareConstant_pos K n).le (sq_nonneg _) + have hpoin := hX.annular_dirichlet_poincare hn p (by positivity : 0 < s / 64) + (by change s ≤ 1 at hs1; linarith : s / 64 ≤ 1) hvol hdouble + obtain ⟨L, hL, M, henergy, hshift, hpair⟩ := actual_poisson_pair_span hX hhessian + hκ hK hA hepsilon p p p S S T T i + (by rw [dist_self]; positivity) (by rw [dist_self]; positivity) u hu hgrad hf hf + let f : Fin 2 → SobolevSpace μ hQ := ![T.replacement i, T.replacement i] + let U := sobolevColumnMap μ hQ (poissonSpan μ hQ u f) + let ell := poissonSpanLaplacian n ((n : ℝ) + κ * (4 * s) ^ 2) + let v : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (0 : Fin 2)) 1 + have hv : U v = T.replacement i := poissonSpanMap_right μ hQ u f 0 + have hell : ell v = (n : ℝ) + κ * (4 * s) ^ 2 := poissonSpanLaplacian_right _ 0 + let _ : IsFiniteMeasure (μ.restrict (ball p (2 * (s / 32)))) := + isFiniteMeasure_restrict.mpr (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + obtain ⟨Genergy⟩ := henergy v + have hfsmall : ∀ᵐ x ∂μ.restrict (ball p (2 * (s / 32))), + localGamma μ hQ (T.replacement i) (T.replacement i) x ≤ A ^ 2 * s ^ 2 := by + have ht := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : 2 * (s / 32) ≤ s / 4)) hf + simpa only [mul_pow] using ht + have hmass := T.shifted_mass_le μ hQ i hκ hCχ + (by rw [dist_self]; positivity) ell Genergy hv hell hshift χ hfsmall + let F := 4096 * Cχ * (J + B / 2) * (S.source i).real (ball p s) + + κ * A ^ 2 * s ^ 2 * μ.real (ball p s) + have hF : 0 ≤ F := by dsimp only [F]; positivity + refine ⟨L, hL, ?_⟩ + intro j + let w : Euclidean (n + 2) := EuclideanSpace.single (Fin.castAdd 2 j) 1 + have hw : U w = u j := poissonSpanMap_left μ hQ u f j + have hwnorm : ‖w‖ = 1 := by simp [w, PiLp.norm_single] + obtain ⟨G, hG⟩ := hpair v w (s / 64) (by positivity) (by linarith) + change LocalHessianPairing μ hQ (ball p (s / 64)) (U v) (U w) at G + change ∀ b : ℝ, ∀ φ : SobolevSpace.dirichlet μ hQ (ball p (s / 64)), + (G.hessian φ - b * energyForm μ hQ (U w) φ.val) ^ 2 ≤ + ((L : ℝ) ^ 2 * ‖w‖ ^ 2 * ((M.measure v).real (ball p (s / 64)) - + (2 * b * ell v - (n : ℝ) * b ^ 2) * μ.real (ball p (s / 64)))) * + energyForm μ hQ φ.val φ.val at hG + have hmass' : (M.measure v).real (ball p (s / 64)) - + (2 * ell v - (n : ℝ)) * μ.real (ball p (s / 64)) ≤ F := by + have hm := ShiftedBochnerMeasure.mass M (μ.restrict (ball p (2 * (s / 32)))) + ell (n : ℝ) hshift v 1 (ball p (s / 64)) measurableSet_ball + rw [measureReal_restrict_apply measurableSet_ball, + inter_eq_left.mpr (ball_subset_ball (by linarith : s / 64 ≤ 2 * (s / 32)))] at hm + simp only [one_pow, mul_one] at hm + change ((shiftedBochnerMeasure M (μ.restrict (ball p (2 * (s / 32)))) + ell (n : ℝ) hshift).measure (WithLp.toLp 2 (v, (1 : ℝ)))).real + (ball p (s / 64)) ≤ F at hmass + rwa [hm] at hmass + have hhessian' (φ : SobolevSpace.dirichlet μ hQ (ball p (s / 64))) : + (G.hessian φ - 1 * energyForm μ hQ (U w) φ.val) ^ 2 ≤ + ((L : ℝ) ^ 2 * F) * energyForm μ hQ φ.val φ.val := by + have ht := hG 1 φ + simp only [one_pow, mul_one, one_mul, hwnorm] at ht + simpa only [one_mul] using ht.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hmass' (sq_nonneg (L : ℝ))) + (by rw [energyForm_self]; exact mul_nonneg (by norm_num) (SobolevSpace.energy_nonneg μ hQ _))) + have ha := (hu j).mono μ hQ (ball_subset_ball (by linarith : s / 64 ≤ s / 4)) + have hcoord := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : s / 64 ≤ s / 4)) (hgrad j) + have hlap := T.laplacian_on_ball μ hQ i p + (by rw [dist_self]; linarith : s / 64 + dist p p ≤ s) + have herr := T.local_energy_error μ hQ i (ball p (s / 64)) + obtain ⟨h, _, hh, _, he⟩ := G.radial_harmonic_approximation μ hQ measurableSet_ball q + (by simpa only [hv] using hlap) (by simpa only [hw] using ha) + 1 hP (mul_nonneg (sq_nonneg (L : ℝ)) hF) (sq_nonneg (1 + epsilon)) + (by simpa only [hw] using hcoord) hpoin (by simpa only [hv] using herr) hhessian' + rw [hw] at he + refine ⟨h, hh, he.trans_eq ?_⟩ + dsimp only [P, F] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualRadialPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..55421c7bc3bca9f2c3c6ee0d24244b78e229367c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualRadialPairing.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Sobolev.ActualPoissonMass +import OAI.Geometry.RCD.Sobolev.PoissonPairSpan +import OAI.Geometry.RCD.Sobolev.PoissonSpanLift + +namespace OAI + +/-! # The genuine Poisson radial derivative in every coordinate covector -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The common published Hessian span supplies the actual radial Sobolev +function in every covector, with the full shifted mass budget. -/ +theorem actual_distance_radial_pairing {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianInput hX) + {κ r0 B J C A ε Cχ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hA : 0 ≤ A) (hε : 0 ≤ ε) (hCχ : 0 ≤ Cχ) + (p : X) (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) (i : ℕ) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 4)) (u j)) + (hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + ε) ^ 2) + (hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) : + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + ∃ L : ℝ≥0, (L : ℝ) = ((n + 2 : ℕ) : ℝ) * max (1 + ε) (A * s) ∧ + ∀ b : Euclidean n, + ∃ G : LocalHessianPairing μ hX.quadratic (ball p (s / 64)) (T.replacement i) + (sobolevColumnMap μ hX.quadratic u b), + ∀ φ : SobolevSpace.dirichlet μ hX.quadratic (ball p (s / 64)), + (G.hessian φ - energyForm μ hX.quadratic (sobolevColumnMap μ hX.quadratic u b) φ.val) ^ 2 ≤ + ((L : ℝ) ^ 2 * ‖b‖ ^ 2 * + (4096 * Cχ * (J + B / 2) * (S.source i).real (ball p s) + + κ * A ^ 2 * s ^ 2 * μ.real (ball p s))) * energyForm μ hX.quadratic φ.val φ.val := by + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + obtain ⟨L, hL, M, henergy, hshift, hpair⟩ := actual_poisson_pair_span hX hhessian + hκ hK hA hε p p p S S T T i + (by rw [dist_self]; positivity) (by rw [dist_self]; positivity) u hu hgrad hf hf + let f : Fin 2 → SobolevSpace μ hQ := ![T.replacement i, T.replacement i] + let U := sobolevColumnMap μ hQ (poissonSpan μ hQ u f) + let ell := poissonSpanLaplacian n ((n : ℝ) + κ * (4 * s) ^ 2) + let v : Euclidean (n + 2) := EuclideanSpace.single (Fin.natAdd n (0 : Fin 2)) 1 + have hv : U v = T.replacement i := poissonSpanMap_right μ hQ u f 0 + have hell : ell v = (n : ℝ) + κ * (4 * s) ^ 2 := poissonSpanLaplacian_right _ 0 + let _ : IsFiniteMeasure (μ.restrict (ball p (2 * (s / 32)))) := + isFiniteMeasure_restrict.mpr (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + obtain ⟨Genergy⟩ := henergy v + have hfsmall : ∀ᵐ x ∂μ.restrict (ball p (2 * (s / 32))), + localGamma μ hQ (T.replacement i) (T.replacement i) x ≤ A ^ 2 * s ^ 2 := by + have ht := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : 2 * (s / 32) ≤ s / 4)) hf + simpa only [mul_pow] using ht + have hmass := T.shifted_mass_le μ hQ i hκ hCχ + (by rw [dist_self]; positivity) ell Genergy hv hell hshift χ hfsmall + let D := 4096 * Cχ * (J + B / 2) * (S.source i).real (ball p s) + + κ * A ^ 2 * s ^ 2 * μ.real (ball p s) + have hmass' : (M.measure v).real (ball p (s / 64)) - + (2 * ell v - (n : ℝ)) * μ.real (ball p (s / 64)) ≤ D := by + have hm := ShiftedBochnerMeasure.mass M (μ.restrict (ball p (2 * (s / 32)))) + ell (n : ℝ) hshift v 1 (ball p (s / 64)) measurableSet_ball + rw [measureReal_restrict_apply measurableSet_ball, + inter_eq_left.mpr (ball_subset_ball (by linarith : s / 64 ≤ 2 * (s / 32)))] at hm + simp only [one_pow, mul_one] at hm + change ((shiftedBochnerMeasure M (μ.restrict (ball p (2 * (s / 32)))) + ell (n : ℝ) hshift).measure (WithLp.toLp 2 (v, (1 : ℝ)))).real (ball p (s / 64)) ≤ D at hmass + rwa [hm] at hmass + refine ⟨L, hL, ?_⟩ + intro b + let w := poissonCoordinateLift b + have hw : U w = sobolevColumnMap μ hQ u b := poissonSpanMap_lift μ hQ u f b + have hwnorm : ‖w‖ = ‖b‖ := poissonCoordinateLift_norm b + obtain ⟨G, hG⟩ := hpair v w (s / 64) (by positivity) (by linarith) + have hresult : ∃ H : LocalHessianPairing μ hQ (ball p (s / 64)) (U v) (U w), + ∀ φ : SobolevSpace.dirichlet μ hQ (ball p (s / 64)), + (H.hessian φ - energyForm μ hQ (U w) φ.val) ^ 2 ≤ + ((L : ℝ) ^ 2 * ‖b‖ ^ 2 * D) * energyForm μ hQ φ.val φ.val := by + refine ⟨G, ?_⟩ + intro φ + have ht := hG 1 φ + simp only [one_pow, mul_one, one_mul, hwnorm] at ht + exact ht.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hmass' (mul_nonneg (sq_nonneg (L : ℝ)) (sq_nonneg ‖b‖))) + (by rw [energyForm_self]; exact mul_nonneg (by norm_num) (SobolevSpace.energy_nonneg μ hQ _))) + rw [hv, hw] at hresult + exact hresult + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualSharpProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualSharpProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..13a3fee6aaca939cd33ba184cdcbe3c874bb1d99 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualSharpProjection.lean @@ -0,0 +1,323 @@ +import OAI.Geometry.RCD.Harmonic.ActualProjectionConfiguration +import OAI.Geometry.RCD.Harmonic.ActualProjectionUnits +import OAI.Geometry.RCD.Sobolev.SharpProjectionGradient + +namespace OAI + +/-! # Sharp projection for the actual two-center Poisson targets -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Construct the compactness family from actual sources and replacements. +No residual, forcing, or outer estimate is assumed in the configuration. -/ +theorem exists_actual_projection_family {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ B J C A Cχ epsilon H D L M : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) (hL : 0 ≤ L) : + ∃ family : SharpProjectionFamily hX + (ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M) (1 / 1024) (1 / 2048), + (∀ d, family.error d = d.error) ∧ + (∀ d, family.source d = d.source) ∧ + (∀ d, family.size d = d.projectionNorm) := by + classical + let μ := hausdorff n X + let hQ := hX.quadratic + let I := ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M + obtain ⟨F, G, T, hF, hG, hT, hchoose⟩ := actual_two_center_projection_outer hX + hhessian hproduct hpoincare hgradient hn hκ hK hB hJ hCχ hA hepsilon hH hD hL + have hdata (d : I) := hchoose d.first d.center d.firstSource d.secondSource + d.firstReplacement d.secondReplacement d.index d.room d.coordinates d.harmonic d.gradient + d.firstGradient d.secondGradient d.cutoff d.smallCurvature d.one d.oneRepresentative + (fun t ht hts => d.volume t ht (hts.trans d.radius_le_root)) d.laplacianBound d.sphere + d.frame d.source d.source_pos.le d.pairBudget d.affineBound d.affineHalfBound d.columnBound + d.radialColumns d.radialMatrix d.radialRepresentative d.radialFit + dsimp only at hdata + choose c b k w e hweq hwharm hproj hcb heuler he hcoef houter using hdata + let s : I → ℝ := fun d => d.radius + let U : I → Fin n → SobolevSpace μ hQ := fun d => radiusScaledColumns μ hQ (s d) d.coordinates + let f : I → SobolevSpace μ hQ := fun d => (s d ^ 2)⁻¹ • d.secondReplacement.replacement d.index + let w' : I → SobolevSpace μ hQ := fun d => (s d ^ 2)⁻¹ • w d + let e' : I → SobolevSpace μ hQ := fun d => (s d ^ 2)⁻¹ • e d + let ell : I → Euclidean n := fun d => d.frame (b d) - d.radialMatrix (d.frame (b d)) + let alpha : I → ℝ := fun d => ‖normalizeLocalL2 μ (ball d.center ((1 / 2048) * s d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 2048) * s d)) (w' d))‖ + let A₀ := max (max 8 B) (max ((n : ℝ) + 1) (A ^ 2)) + let V₀ := Real.sqrt ((5 / 3 : ℝ) * (2 : ℝ) ^ n) + have hA₀ : 0 ≤ A₀ := (by positivity : 0 ≤ max 8 B).trans (le_max_left _ _) + have hAV : max 8 B ≤ A₀ := le_max_left _ _ + have hAn : (n : ℝ) + 1 ≤ A₀ := (le_max_left _ _).trans (le_max_right _ _) + have hAg : A ^ 2 ≤ A₀ := (le_max_right _ _).trans (le_max_right _ _) + have hs (d : I) : 0 < s d := d.radius_pos + have hfrac1024 (d : I) : (1 / 1024 : ℝ) * s d = s d / 1024 := by ring + have hfrac2048 (d : I) : (1 / 2048 : ℝ) * s d = s d / 2048 := by ring + have hvol (d : I) (t : ℝ) (ht : 0 < t) (hts : t ≤ s d) := + d.volume t ht (hts.trans d.radius_le_root) + have hgrad (d : I) : ∀ᵐ x ∂μ.restrict (ball d.center ((1 / 1024) * s d)), + localGamma μ hQ (f d) (f d) x ≤ A₀ / s d ^ 2 := by + have hh := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (show (1 / 1024 : ℝ) * s d ≤ s d / 4 by linarith [hs d])) d.secondGradient + have hh' : ∀ᵐ x ∂μ.restrict (ball d.center ((1 / 1024) * s d)), + localGamma μ hQ (d.secondReplacement.replacement d.index) + (d.secondReplacement.replacement d.index) x ≤ A ^ 2 * s d ^ 2 := by + simpa only [mul_pow, s, ActualProjectionConfiguration.radius, μ, hQ] using hh + filter_upwards [rescaled_radial_energy μ hQ _ _ (hs d) hh'] with x hx + apply (le_div_iff₀ (sq_pos_of_pos (hs d))).mpr + simpa only [mul_comm] using hx.trans hAg + have hp (d : I) : SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 2048) * s d)) (w' d) = + affineResidual μ hQ (U d) (ball d.center ((1 / 2048) * s d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 2048) * s d)) + ((s d ^ 2)⁻¹ • (d.secondReplacement.replacement d.index - d.firstReplacement.replacement d.index))) := by + have hh := radius_scaled_projection μ hQ (hs d).ne' d.coordinates + (ball d.center (s d / 2048)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (d.secondReplacement.replacement d.index - d.firstReplacement.replacement d.index) + (w d) (hproj d) + rw [hfrac2048 d] + exact hh + have hforce (d : I) : ‖normalizeLocalL2 μ (ball d.center ((1 / 1024) * s d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 1024) * s d)) (e' d))‖ ≤ + (V₀ * F) * d.source := by + have hsd := hs d + have hposbig := (quarter_volume_bounds (by positivity : 0 < s d / 512) + (euclideanUnitVolume_pos n) (hvol d (s d / 512) (by positivity) (by linarith [hs d]))).1 + have hpossmall := (quarter_volume_bounds (by positivity : 0 < s d / 1024) + (euclideanUnitVolume_pos n) (hvol d (s d / 1024) (by positivity) (by linarith [hs d]))).1 + have hv := radial_fraction_volume_ratio (by positivity : 0 < s d / 512) + (by norm_num : (0 : ℝ) < 1 / 2) (euclideanUnitVolume_pos n) + (hvol d (s d / 512) (by positivity) (by linarith [hs d])) + (hvol d ((1 / 2) * (s d / 512)) (by positivity) (by linarith [hs d])) + have hrad : (1 / 2 : ℝ) * (s d / 512) = s d / 1024 := by ring + have hpow : ((1 / 2 : ℝ) ^ n)⁻¹ = (2 : ℝ) ^ n := by simp + rw [hrad, hpow] at hv + have hv' : μ.real (ball d.center (s d / 512)) ≤ V₀ ^ 2 * μ.real (ball d.center (s d / 1024)) := by + dsimp only [V₀] + rw [Real.sq_sqrt (by positivity)] + exact (div_le_iff₀ hpossmall).mp hv + have he' : ‖normalizeLocalL2 μ (ball d.center (s d / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball d.center (s d / 512)) (e' d))‖ ≤ F * d.source := by + dsimp only [e'] + rw [map_smul, normalizeLocalL2_smul, norm_smul, Real.norm_eq_abs, + abs_of_pos (inv_pos.mpr (sq_pos_of_pos (hs d)))] + calc + _ ≤ (s d ^ 2)⁻¹ * (F * s d ^ 2 * d.source) := + mul_le_mul_of_nonneg_left (he d) (by positivity) + _ = F * d.source := by field_simp [hsd.ne'] + have hb := normalized_fit_restrict_norm μ hQ + (ball_subset_ball (show s d / 1024 ≤ s d / 512 by linarith [hs d])) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hposbig hpossmall (e' d) + (Real.sqrt_nonneg _) (mul_nonneg hF d.source_pos.le) hv' he' + rw [normalized_sobolev_norm_congr μ hQ (congrArg (ball d.center) (hfrac1024 d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (e' d)] + exact hb.trans_eq (by ring) + have hcoef' (d : I) : ‖(s d)⁻¹ • ell d‖ + |(s d ^ 2)⁻¹ * k d| ≤ + (max 1 (2048 * M) * G) * (alpha d + d.source) := by + have hb := projection_coefficient_rescale d.frame (hs d) d.frameBound (ell d) (k d) (hcoef d) + dsimp only [alpha] + rw [normalized_sobolev_norm_congr μ hQ (congrArg (ball d.center) (hfrac2048 d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (w' d)] + exact hb + let family : SharpProjectionFamily hX I (1 / 1024) (1 / 2048) := { + center := fun d => d.center + radius := s + error := fun d => d.error + source := fun d => d.source + coordinates := U + coordinateValues := fun d => d.coordinateValues + radial := f + target := fun d => (s d ^ 2)⁻¹ • (d.secondReplacement.replacement d.index - d.firstReplacement.replacement d.index) + residual := w' + forcing := e' + coefficient := fun d => (s d)⁻¹ • ell d + constant := fun d => (s d ^ 2)⁻¹ * k d + size := alpha + radialBound := A₀ + outerConstant := T + coefficientConstant := max 1 (2048 * M) * G + sourceConstant := V₀ * F + radius_pos := hs + curvature := fun d => d.curvature + error_pos := fun d => d.error_pos hB + source_pos := fun d => d.source_pos + radialBound_nonneg := hA₀ + outerConstant_nonneg := hT + coefficientConstant_nonneg := mul_nonneg (le_trans zero_le_one (le_max_left _ _)) hG + measured := fun d => d.measured.mono_error (d.approximationError_le hB) + representative := fun d => d.representative + laplacianCoefficient := fun d => (n : ℝ) + κ * (4 * s d) ^ 2 + laplacianCoefficient_bound := by + intro d + rw [abs_of_nonneg (by positivity)] + exact d.laplacianBound.trans hAn + laplacian := by + intro d + apply rescaled_radial_laplacian μ hQ + exact (d.secondReplacement.laplacian d.index).mono μ hQ measurableSet_ball + (ball_subset_ball (show (1 / 1024 : ℝ) * s d ≤ s d by linarith [hs d])) + radial_norm := by + intro d + apply normalized_norm_le_of_bound μ _ _ _ hA₀ + have hvalue := rescaled_radial_value μ hQ (ball d.center ((1 / 1024) * s d)) + (d.secondReplacement.replacement d.index) (hs d) + (ae_restrict_of_ae (d.secondReplacement.value_bound μ hQ d.index)) + filter_upwards [hvalue, SobolevSpace.restrictLp_coe μ hQ _ (f d)] with x hx heq + rw [heq] + exact hx.trans hAV + gradient := hgrad + quadratic_error := fun d => d.quadratic_error hn hκ hB + harmonic := by + intro d + exact ((hwharm d).mono μ hQ (ball_subset_ball + (show (1 / 1024 : ℝ) * s d ≤ s d / 512 by linarith [hs d]))).smul μ hQ _ + projection := hp + size_eq := fun _ => rfl + outer_bound := by + intro d + dsimp only [alpha] + rw [normalized_sobolev_norm_congr μ hQ (congrArg (ball d.center) (hfrac1024 d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (w' d), + normalized_sobolev_norm_congr μ hQ (congrArg (ball d.center) (hfrac2048 d)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (w' d)] + exact houter d + coefficient_bound := hcoef' + forcing_bound := hforce + euler_identity := by + intro d + have hsub : ball d.center ((1 / 1024) * s d) ⊆ ball d.center (s d / 512) := + ball_subset_ball (by linarith [hs d]) + have heta := ae_restrict_of_ae_restrict_of_subset hsub d.oneRepresentative + have hf := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (show (1 / 1024 : ℝ) * s d ≤ s d / 4 by linarith [hs d])) d.secondGradient + have hid : localRadialDerivative μ hQ (ball d.center ((1 / 1024) * s d)) + (d.secondReplacement.replacement d.index) hf (w d) = + SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 1024) * s d)) + (w d + sobolevColumnMap μ hQ d.coordinates (ell d) + k d • d.one + e d) := + localRadialDerivative_eq_restrict μ hQ _ _ _ _ hf + (ae_restrict_of_ae_restrict_of_subset hsub (heuler d).symm) + exact radius_scaled_projection_euler_sum μ hQ (hs d) _ _ d.coordinates + (d.secondReplacement.replacement d.index) (w d) d.one (e d) (ell d) (k d) heta hf (hgrad d) hid + } + refine ⟨family, fun _ => rfl, fun _ => rfl, ?_⟩ + intro d + change alpha d = d.projectionNorm + dsimp only [alpha, ActualProjectionConfiguration.projectionNorm] + rw [hp d] + +/-- One sharp estimate for every actual two-center target satisfying the +preceding geometric estimates. The only compactness input is the precise +published Poisson/harmonic convergence theorem. -/ +theorem actual_sharp_projection {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) (hn : 2 ≤ n) + {κ B J C A Cχ epsilon H D L M : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) (hL : 0 ≤ L) : + ∃ P : ℝ, 0 < P ∧ ∃ delta : ℝ, 0 < delta ∧ + ∀ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M, + d.error < delta → d.projectionNorm ≤ P * d.source := by + obtain ⟨family, herr, hsource, hnorm⟩ := exists_actual_projection_family hX + hhessian hproduct hpoincare hgradient hn hκ hK hB hJ hCχ hA hepsilon hH hD hL + obtain ⟨P, hP, delta, hdelta, hbound⟩ := family.uniform_bound hcompact hgradient hn + (by norm_num) (by norm_num) (by norm_num) + refine ⟨P, hP, delta, hdelta, ?_⟩ + intro d hd + simpa only [hsource d, hnorm d] using hbound d (by simpa only [herr d] using hd) + +/-- The same sharp estimate controls the actual harmonic residual gradient +on the smaller testing ball, in physical radius units. -/ +theorem actual_sharp_projection_gradient {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) (hn : 2 ≤ n) + {κ B J C A Cχ epsilon H D L M : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) (hL : 0 ≤ L) : + ∃ Q : ℝ, 0 < Q ∧ ∃ delta : ℝ, 0 < delta ∧ + ∀ d : ActualProjectionConfiguration hX κ B J C A Cχ epsilon H D L M, + d.error < delta → ∀ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball d.center ((1 / 2048) * d.radius)) w → + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball d.center ((1 / 2048) * d.radius)) w = + affineResidual (hausdorff n X) hX.quadratic + (radiusScaledColumns (hausdorff n X) hX.quadratic d.radius d.coordinates) + (ball d.center ((1 / 2048) * d.radius)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball d.center ((1 / 2048) * d.radius)) + ((d.radius ^ 2)⁻¹ • (d.secondReplacement.replacement d.index - d.firstReplacement.replacement d.index))) → + ∀ᵐ x ∂(hausdorff n X).restrict (ball d.center ((1 / 4096) * d.radius)), + d.radius ^ 2 * localGamma (hausdorff n X) hX.quadratic w w x ≤ Q ^ 2 * d.source ^ 2 := by + obtain ⟨P, hP, delta, hdelta, hbound⟩ := actual_sharp_projection (C := C) (M := M) hX + hhessian hproduct hpoincare hgradient hcompact hn hκ hK hB hJ hCχ hA hepsilon hH hD hL + obtain ⟨Cg, hCg, hgrad⟩ := hgradient hn ((1 / 2048 : ℝ) ^ 2) (1 / 2) + (sq_nonneg _) (by norm_num) (by norm_num) + refine ⟨2048 * Cg * P, mul_pos (mul_pos (by norm_num) (by linarith)) hP, delta, hdelta, ?_⟩ + intro d hd w hwharm hw + let μ := hausdorff n X + let hQ := hX.quadratic + have hr := d.radius_pos + have hcurv : -((1 / 2048 : ℝ) ^ 2) ≤ K * ((1 / 2048) * d.radius) ^ 2 := by + have hc := d.curvature + change -1 ≤ K * d.radius ^ 2 at hc + have hh := mul_le_mul_of_nonneg_left hc (sq_nonneg (1 / 2048 : ℝ)) + nlinarith only [hh] + have hnrm : ‖normalizeLocalL2 μ (ball d.center ((1 / 2048) * d.radius)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball d.center ((1 / 2048) * d.radius)) w)‖ = d.projectionNorm := by + rw [hw] + rfl + have hmean : (μ.real (ball d.center ((1 / 2048) * d.radius)))⁻¹ * + (∫ x in ball d.center ((1 / 2048) * d.radius), (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) = + d.projectionNorm ^ 2 := by + rw [← normalized_sobolev_mean_sq μ hQ _ (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)), hnrm] + have hg := hgrad d.center ((1 / 2048) * d.radius) (by positivity) hcurv w hwharm + change ∀ᵐ x ∂μ.restrict (ball d.center ((1 / 2) * ((1 / 2048) * d.radius))), + localGamma μ hQ w w x ≤ _ at hg + rw [hmean] at hg + have hsize : d.projectionNorm ^ 2 ≤ (P * d.source) ^ 2 := by + apply (sq_le_sq₀ (norm_nonneg _) (mul_pos hP d.source_pos).le).mpr + exact hbound d hd + have hrad : (1 / 2 : ℝ) * ((1 / 2048) * d.radius) = (1 / 4096) * d.radius := by ring + rw [hrad] at hg + filter_upwards [hg] with x hx + calc + _ ≤ d.radius ^ 2 * ((Cg / ((1 / 2048) * d.radius)) ^ 2 * d.projectionNorm ^ 2) := + mul_le_mul_of_nonneg_left hx (sq_nonneg _) + _ ≤ d.radius ^ 2 * ((Cg / ((1 / 2048) * d.radius)) ^ 2 * (P * d.source) ^ 2) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hsize (sq_nonneg _)) (sq_nonneg _) + _ = (2048 * Cg * P) ^ 2 * d.source ^ 2 := by field_simp [hr.ne'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ActualTwoCenterProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/ActualTwoCenterProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca5dd3825abb0c65ae0a0323cd3c486f32e6a4e0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ActualTwoCenterProjection.lean @@ -0,0 +1,184 @@ +import OAI.Geometry.RCD.Sobolev.ActualPoissonEulerForcing +import OAI.Geometry.RCD.Sobolev.PhysicalProjectionEuler + +namespace OAI + +/-! # The actual two-center Poisson projection and its scalar forcing -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The projected function is constructed from the two actual Poisson +replacements. Its scalar forcing is controlled by the original defects +and the already constructed coordinate radial fits. The constant precedes +all centers, root radii and dyadic indices. -/ +theorem actual_two_center_projection {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hhessian : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + {κ B J C A Cχ epsilon H D : ℝ} + (hκ : 0 ≤ κ) (hK : -κ ≤ K) (hB : 0 ≤ B) (hJ : 0 ≤ J) + (hCχ : 0 ≤ Cχ) (hA : 0 ≤ A) (hepsilon : 0 ≤ epsilon) + (hH : 0 ≤ H) (hD : 0 ≤ D) : + ∃ F : ℝ, 0 ≤ F ∧ ∀ {r0 : ℝ} (p₁ p₂ z : X) + (S₁ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₁ r0) + (S₂ : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p₂ r0) + (T₁ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₁ B J C) + (T₂ : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S₂ B J C) + (i : ℕ) + (_hroom₁ : dist z p₁ ≤ distanceSourceRadius r0 i / 4) + (_hroom₂ : dist z p₂ ≤ distanceSourceRadius r0 i / 4) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (_hu : ∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball z (distanceSourceRadius r0 i / 4)) (u j)) + (_hgrad : ∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ (1 + epsilon) ^ 2) + (_hf₁ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₁.replacement i) (T₁.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_hf₂ : ∀ᵐ x ∂(hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) (T₂.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic z (distanceSourceRadius r0 i / 64) Cχ) + (_hcurv : -κ ≤ K * (distanceSourceRadius r0 i / 512) ^ 2) + (η : SobolevSpace (hausdorff n X) hX.quadratic) + (_hη : SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 512))] + fun _ => (1 : ℝ)) + (_hvolume : |(hausdorff n X).real (ball z (distanceSourceRadius r0 i / 64)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 64) ^ n) - 1| ≤ 1 / 4) + (_hvolumeSmall : |(hausdorff n X).real (ball z (distanceSourceRadius r0 i / 512)) / + (euclideanUnitVolume n * (distanceSourceRadius r0 i / 512) ^ n) - 1| ≤ 1 / 4) + (N : Euclidean n ≃L[ℝ] Euclidean n) (σ : ℝ) (_hσ : 0 ≤ σ) + (_hbudget : normalizedPoissonDefect (hausdorff n X) hX.quadratic S₁ i + + normalizedPoissonDefect (hausdorff n X) hX.quadratic S₂ i ≤ σ ^ 2) + (_hbound : ∀ c a, |c| + distanceSourceRadius r0 i * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball z (distanceSourceRadius r0 i / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u + (ball z (distanceSourceRadius r0 i / 2048)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) + (G : Euclidean n →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (Az : Euclidean n →L[ℝ] Euclidean n) + (_hG : ∀ b, SobolevSpace.toLp (hausdorff n X) hX.quadratic (G b) =ᵐ[ + (hausdorff n X).restrict (ball z (distanceSourceRadius r0 i / 512))] + localGamma (hausdorff n X) hX.quadratic (T₂.replacement i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b)) + (_hfit : ∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball z (distanceSourceRadius r0 i / 512)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball z (distanceSourceRadius r0 i / 512)) + (G (N b) - sobolevColumnMap (hausdorff n X) hX.quadratic u (Az (N b))))‖ ≤ + D * distanceSourceRadius r0 i * ‖b‖ * σ), + ∃ (c : ℝ) (b : Euclidean n) (k : ℝ) + (w e : SobolevSpace (hausdorff n X) hX.quadratic), + let μ := hausdorff n X + let s := distanceSourceRadius r0 i + let Ω := ball z (s / 512) + let I := ball z (s / 2048) + w = T₂.replacement i - T₁.replacement i - c • η - sobolevColumnMap μ hX.quadratic u (N b) ∧ + IsSobolevHarmonicOn μ hX.quadratic Ω w ∧ + SobolevSpace.restrictLp μ hX.quadratic I w = affineResidual μ hX.quadratic u I + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic I (T₂.replacement i - T₁.replacement i)) ∧ + |c| + s * ‖b‖ ≤ H * (2 * max 8 B) * s ^ 2 ∧ + (localGamma μ hX.quadratic (T₂.replacement i) w =ᵐ[μ.restrict Ω] + SobolevSpace.toLp μ hX.quadratic + (w + sobolevColumnMap μ hX.quadratic u (N b - Az (N b)) + k • η + e)) ∧ + ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic Ω e)‖ ≤ F * s ^ 2 * σ := by + obtain ⟨Cp, hCp, hforcing⟩ := actual_poisson_euler_forcing hX hhessian hproduct hpoincare hκ + let E := Real.sqrt ((Cp / 512) ^ 2 * ((5 / 3 : ℝ) * (8 : ℝ) ^ n) * + poissonEulerGradientConstant n A B J Cχ) + let V := 2 * max 8 B + have hV : 0 ≤ V := by dsimp only [V]; positivity + refine ⟨E + D * H * V, by dsimp only [E]; positivity, ?_⟩ + intro r0 p₁ p₂ z S₁ S₂ T₁ T₂ i hroom₁ hroom₂ u hu hgrad hf₁ hf₂ χ + hcurv η hη hvolume hvolumeSmall N σ hσ hbudget hbound G Az hG hfit + dsimp only + let μ := hausdorff n X + let hQ := hX.quadratic + let s := distanceSourceRadius r0 i + let Ω := ball z (s / 512) + let I := ball z (s / 2048) + let v := T₂.replacement i - T₁.replacement i + have hs : 0 < s := distanceSourceRadius_pos S₁.radius_pos i + have hsub : I ⊆ Ω := ball_subset_ball (by dsimp only [s]; linarith) + have hbig : Ω ⊆ ball z (s / 4) := ball_subset_ball (by linarith) + have hhu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j) := + fun j => (hu j).mono μ hQ hbig + have hv : IsSobolevHarmonicOn μ hQ Ω v := + common_replacement_difference_harmonic μ hQ T₁ T₂ i z + (by change s / 512 + dist z p₁ ≤ s; change dist z p₁ ≤ s / 4 at hroom₁; linarith) + (by change s / 512 + dist z p₂ ≤ s; change dist z p₂ ≤ s / 4 at hroom₂; linarith) + have hfv : ∀ T : DyadicDistanceReplacements μ hQ S₁ B J C, + ‖normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ I (T.replacement i))‖ ≤ max 8 B * s ^ 2 := by + intro T + apply normalized_norm_le_of_bound μ I _ _ (by have : 0 ≤ max 8 B := le_trans (by norm_num) (le_max_left _ _); positivity) + filter_upwards [ae_restrict_of_ae (T.value_bound μ hQ i), + SobolevSpace.restrictLp_coe μ hQ I (T.replacement i)] with x hx heq + rw [heq] + exact hx + have hfv₂ : ‖normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ I (T₂.replacement i))‖ ≤ max 8 B * s ^ 2 := by + apply normalized_norm_le_of_bound μ I _ _ (by have : 0 ≤ max 8 B := le_trans (by norm_num) (le_max_left _ _); positivity) + filter_upwards [ae_restrict_of_ae (T₂.value_bound μ hQ i), + SobolevSpace.restrictLp_coe μ hQ I (T₂.replacement i)] with x hx heq + rw [heq] + exact hx + have hvalue : ‖normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ I v)‖ ≤ V * s ^ 2 := by + have hh := (norm_sub_le + (normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ I (T₂.replacement i))) + (normalizeLocalL2 μ I (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ I (T₁.replacement i)))).trans (add_le_add hfv₂ (hfv T₁)) + simpa only [v, map_sub, normalizeLocalL2, smul_sub, V, two_mul, add_mul] using hh + obtain ⟨k, ev, hevId, hev⟩ := hforcing hK hB hJ hCχ hA hepsilon p₁ p₂ z S₁ S₂ T₁ T₂ i + hroom₁ hroom₂ u hu hgrad hf₁ hf₂ χ hcurv η hη hvolume hvolumeSmall + have hE2 : E ^ 2 = (Cp / 512) ^ 2 * ((5 / 3 : ℝ) * (8 : ℝ) ^ n) * + poissonEulerGradientConstant n A B J Cχ := by + apply Real.sq_sqrt + have homega := euclideanUnitVolume_pos n + dsimp only [poissonEulerGradientConstant] + positivity + have heScale : ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ Ω ((s ^ 2)⁻¹ • ev))‖ ≤ E * σ := by + apply (sq_le_sq₀ (norm_nonneg _) (by dsimp only [E]; positivity)).mp + rw [mul_pow, hE2] + exact hev.trans (mul_le_mul_of_nonneg_left hbudget (by rw [← hE2]; positivity)) + have hev' : ‖normalizeLocalL2 μ Ω (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ Ω ev)‖ ≤ E * s ^ 2 * σ := by + rw [map_smul, normalizeLocalL2_smul, norm_smul, Real.norm_eq_abs, + abs_inv, abs_of_pos (sq_pos_of_pos hs)] at heScale + have hh := mul_le_mul_of_nonneg_left heScale (sq_nonneg s) + field_simp [hs.ne'] at hh + nlinarith only [hh] + have hf := ae_restrict_of_ae_restrict_of_subset hbig hf₂ + have hvId := localRadialDerivative_eq_of_euler μ hQ Ω (T₂.replacement i) v η ev hf k hη hevId + have hGId (a) := localRadialDerivative_eq_restrict μ hQ Ω (T₂.replacement i) + (sobolevColumnMap μ hQ u a) (G a) hf (hG a) + obtain ⟨c, b, hw, hproj, hcoef, hid, he⟩ := physical_projection_euler μ hQ u I Ω + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hsub measurableSet_ball hhu + (T₂.replacement i) v η ev hv hη N hs hH hV (Real.sqrt_nonneg _) hD hσ + hbound hvalue hf G Az k hvId hGId hev' hfit + let w := v - c • η - sobolevColumnMap μ hQ u (N b) + let e := ev - (G (N b) - sobolevColumnMap μ hQ u (Az (N b))) + refine ⟨c, b, k + c, w, e, rfl, hw, hproj, hcoef, ?_, he⟩ + have hre := localRadialDerivative_representative μ hQ Ω (T₂.replacement i) w hf + rw [hid] at hre + exact hre.symm.trans (SobolevSpace.restrictLp_coe μ hQ Ω _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineCenterBounds.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineCenterBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..80498d7234f0d8db9e275abb413f2bc3646e306b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineCenterBounds.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Coordinates.AffineFitDifference + +namespace OAI + +/-! # Size and centering of actual affine projections -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem normalized_affineProjection_norm_le {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hs : μ s ≠ ∞) + (f : Lp ℝ 2 (μ.restrict s)) : + ‖normalizeLocalL2 μ s hs (affineProjection μ hQ u s hs f)‖ ≤ + ‖normalizeLocalL2 μ s hs f‖ := by + unfold normalizeLocalL2 + rw [← map_smul] + exact affineProjection_norm_le μ hQ u s hs _ + +/-- Any coefficients of the actual fit inherit the harmonic evaluation +bound and the contraction of orthogonal projection. -/ +theorem affineFit_center_bound {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : μ s ≠ ∞) (v : Euclidean n) {C : ℝ} (hC : 0 ≤ C) + (heval : ∀ c a, |c + ⟪v, a⟫_ℝ| ≤ + C * ‖normalizeLocalL2 μ s hs (affineCoordinateMap μ hQ u s hs (c, a))‖) + (f : Lp ℝ 2 (μ.restrict s)) (c : ℝ) (a : Euclidean n) + (hfit : affineProjection μ hQ u s hs f = affineCoordinateMap μ hQ u s hs (c, a)) : + |c + ⟪v, a⟫_ℝ| ≤ C * ‖normalizeLocalL2 μ s hs f‖ := by + have h := heval c a + rw [← hfit] at h + exact h.trans (mul_le_mul_of_nonneg_left + (normalized_affineProjection_norm_le μ hQ u s hs f) hC) + +omit [MetricSpace X] in +theorem normalized_constant_norm (s : Set X) (hs : μ s ≠ ∞) (hs0 : μ s ≠ 0) (c : ℝ) : + ‖normalizeLocalL2 μ s hs (c • restrictedOne μ s hs)‖ = |c| := by + have hn : ‖restrictedOne μ s hs‖ ≠ 0 := by + rw [restrictedOne_norm] + exact ne_of_gt (Real.sqrt_pos.mpr (ENNReal.toReal_pos hs0 hs)) + simp only [normalizeLocalL2, norm_smul, Real.norm_eq_abs, abs_inv, abs_norm] + field_simp + +/-- Subtracting the center value from a fit costs exactly its absolute +value in normalized L². -/ +theorem centered_affineFit_error {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : μ s ≠ ∞) (hs0 : μ s ≠ 0) (v : Euclidean n) + (f : Lp ℝ 2 (μ.restrict s)) (c : ℝ) (a : Euclidean n) + (hfit : affineProjection μ hQ u s hs f = affineCoordinateMap μ hQ u s hs (c, a)) : + ‖normalizeLocalL2 μ s hs + (f - affineCoordinateMap μ hQ u s hs (-⟪v, a⟫_ℝ, a))‖ ≤ + ‖normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs f)‖ + |c + ⟪v, a⟫_ℝ| := by + have he : f - affineCoordinateMap μ hQ u s hs (-⟪v, a⟫_ℝ, a) = + affineResidual μ hQ u s hs f + (c + ⟪v, a⟫_ℝ) • restrictedOne μ s hs := by + change f - affineCoordinateMap μ hQ u s hs (-⟪v, a⟫_ℝ, a) = + (f - affineProjection μ hQ u s hs f) + _ + rw [hfit, affineCoordinateMap_apply, affineCoordinateMap_apply] + module + rw [he, normalizeLocalL2, smul_add] + have hb := norm_add_le + (normalizeLocalL2 μ s hs (affineResidual μ hQ u s hs f)) + (normalizeLocalL2 μ s hs ((c + ⟪v, a⟫_ℝ) • restrictedOne μ s hs)) + rwa [normalized_constant_norm μ s hs hs0] at hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineChange.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineChange.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f0f3f203ee8731de0d6e1a7dc499b43af615892 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineChange.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Harmonic.AffineProjection + +namespace OAI + +/-! # Least-squares affine fits are independent of coordinate normalization -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- An invertible linear coordinate change and a translation by constants +preserve the actual finite-dimensional affine subspace in local L². -/ +theorem affineCoordinateSpace_eq_of_change {n : ℕ} + (u u' : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (B : Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (hchange : ∀ v, SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u' v) = + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u (B v)) + + b v • restrictedOne μ s hfin) : + affineCoordinateSpace μ hQ u' s hfin = affineCoordinateSpace μ hQ u s hfin := by + ext f + constructor + · rintro ⟨⟨c, v⟩, rfl⟩ + refine ⟨(c + b v, B v), ?_⟩ + change (c + b v) • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u (B v)) = + c • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u' v) + rw [hchange, add_smul] + abel + · rintro ⟨⟨c, v⟩, rfl⟩ + refine ⟨(c - b (B.symm v), B.symm v), ?_⟩ + change (c - b (B.symm v)) • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u' (B.symm v)) = + c • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u v) + rw [hchange, B.apply_symm_apply, sub_smul] + abel + +/-- Consequently the least-squares projection itself is unchanged. -/ +theorem affineProjection_eq_of_change {n : ℕ} + (u u' : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (B : Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (hchange : ∀ v, SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u' v) = + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u (B v)) + + b v • restrictedOne μ s hfin) : + affineProjection μ hQ u' s hfin = affineProjection μ hQ u s hfin := by + simp only [affineProjection, + affineCoordinateSpace_eq_of_change μ hQ u u' s hfin B b hchange] + +theorem affineResidual_eq_of_change {n : ℕ} + (u u' : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (B : Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (hchange : ∀ v, SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u' v) = + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u (B v)) + + b v • restrictedOne μ s hfin) : + affineResidual μ hQ u' s hfin = affineResidual μ hQ u s hfin := by + unfold affineResidual + rw [affineProjection_eq_of_change μ hQ u u' s hfin B b hchange] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorIdentity.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..fccb79fb42d9e4279896bfaa4e8687308f62165d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorIdentity.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Harmonic.TwoCenterCommutator +import Mathlib.Tactic.Module + +namespace OAI + +/-! # The affine coefficient identity behind the two-center commutator + +Here U is the centered coordinate column, G its radial derivative at z, +H the difference of the two radial derivatives, and C the constant part +of the affine approximation to H. D and V are the actual radial derivative +maps; J is restriction to the common L2 region. +-/ + +noncomputable section +namespace RegularPointCoordinates + +variable {E F W : Type*} [AddCommGroup E] [Module ℝ E] + [AddCommGroup F] [Module ℝ F] [AddCommGroup W] [Module ℝ W] + +/-- The coefficient expression is a sum of the genuine commutator error +and the four value/gradient errors of the two radial approximations. -/ +theorem affine_commutator_identity + (A B : Module.End ℝ E) (U G H C : E →ₗ[ℝ] F) (D V J : F →ₗ[ℝ] W) + (hDU : ∀ a, D (U a) = J (G a)) + (hVU : ∀ a, V (U a) = J (H a)) + (hDC : ∀ a, D (C a) = 0) (b : E) : + J (U ((A * B - B * (A - 1)) b)) - J (C ((A - 1) b)) = + V (G b - U (A b)) - (V (G b) - D (H b) - J (H b)) - + D (H b - U (B b) - C b) + + J (H ((A - 1) b) - U (B ((A - 1) b)) - C ((A - 1) b)) - + J (G (B b) - U (A (B b))) := by + simp only [LinearMap.sub_apply, Module.End.mul_apply, Module.End.one_apply, + map_sub, hDU, hVU, hDC] + module + +section Norm +variable {Y : Type*} [NormedAddCommGroup Y] [NormedSpace ℝ Y] + +/-- The exact identity keeps the five analytic errors additive. No small +matrix term is absorbed before affine coefficient nondegeneracy is used. -/ +theorem affine_commutator_error_bound + (A B : Module.End ℝ E) (U G H C : E →ₗ[ℝ] F) (D V J : F →ₗ[ℝ] Y) + (hDU : ∀ a, D (U a) = J (G a)) + (hVU : ∀ a, V (U a) = J (H a)) + (hDC : ∀ a, D (C a) = 0) (b : E) + {e₁ e₂ e₃ e₄ e₅ : ℝ} + (h₁ : ‖V (G b - U (A b))‖ ≤ e₁) + (h₂ : ‖V (G b) - D (H b) - J (H b)‖ ≤ e₂) + (h₃ : ‖D (H b - U (B b) - C b)‖ ≤ e₃) + (h₄ : ‖J (H ((A - 1) b) - U (B ((A - 1) b)) - C ((A - 1) b))‖ ≤ e₄) + (h₅ : ‖J (G (B b) - U (A (B b)))‖ ≤ e₅) : + ‖J (U ((A * B - B * (A - 1)) b)) - J (C ((A - 1) b))‖ ≤ + e₁ + e₂ + e₃ + e₄ + e₅ := by + rw [affine_commutator_identity A B U G H C D V J hDU hVU hDC b] + exact (norm_sub_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add + ((norm_sub_le _ _).trans (add_le_add + ((norm_sub_le _ _).trans (add_le_add h₁ h₂)) h₃)) h₄)) h₅) + +end Norm +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorResidual.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..133c5386ddf34f050b8f8875787fb7f15872255e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineCommutatorResidual.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Harmonic.AffineCommutatorIdentity +import OAI.Geometry.RCD.Harmonic.RadialDerivativeNorms +import OAI.Geometry.RCD.Harmonic.RadialLinearRepresentatives + +namespace OAI + +/-! # The actual affine commutator residual from radial W12 errors -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem normalized_radial_derivative_norm_le (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f q : SobolevSpace μ hQ) {B E : ℝ} (hB : 0 ≤ B) (hE : 0 ≤ E) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B ^ 2) + (hq : (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ q q x ∂μ) ≤ E ^ 2) : + ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω f hf q)‖ ≤ B * E := by + have hh := normalized_radial_derivative_norm_sq μ hQ Ω hfin f q hf + have he := mul_le_mul_of_nonneg_left hq (sq_nonneg B) + have hs : ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω f hf q)‖ ^ 2 ≤ + (B * E) ^ 2 := by nlinarith only [hh, he] + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hB hE)).mp hs + +/-- All five terms in the exact coefficient identity are controlled by +the two actual W12 fits and the full-mass commutator error. -/ +theorem normalized_affine_commutator_bound {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) (f v η : SobolevSpace μ hQ) + {Cf Cv eg dg eh dh k : ℝ} + (hCf : 0 ≤ Cf) (hCv : 0 ≤ Cv) (hdg : 0 ≤ dg) (hdh : 0 ≤ dh) + (heg : 0 ≤ eg) (heh : 0 ≤ eh) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ Cf ^ 2) + (hv : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ v v x ≤ Cv ^ 2) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U G H : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (hG : ∀ a, SobolevSpace.toLp μ hQ (G a) =ᵐ[μ.restrict Ω] localGamma μ hQ f (U a)) + (hH : ∀ a, SobolevSpace.toLp μ hQ (H a) =ᵐ[μ.restrict Ω] localGamma μ hQ v (U a)) + (A B : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) + (hgv : ∀ a, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (G a - U (A a)))‖ ≤ eg * ‖a‖) + (hge : ∀ a, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (G a - U (A a)) (G a - U (A a)) x ∂μ) ≤ (dg * ‖a‖) ^ 2) + (hhv : ∀ a, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (H a - U (B a) - c a • η))‖ ≤ eh * ‖a‖) + (hhe : ∀ a, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hQ + (H a - U (B a) - c a • η) (H a - U (B a) - c a • η) x ∂μ) ≤ (dh * ‖a‖) ^ 2) + (hcomm : ∀ a, ‖normalizeLocalL2 μ Ω hfin + (localRadialDerivative μ hQ Ω v hv (G a) - + localRadialDerivative μ hQ Ω f hf (H a) - SobolevSpace.restrictLp μ hQ Ω (H a))‖ ≤ k * ‖a‖) + (b : Euclidean n) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (U ((A * B - B * (A - 1)) b) - c ((A - 1) b) • η))‖ ≤ + (Cv * dg + k + Cf * dh + eh * ‖A - 1‖ + eg * ‖B‖) * ‖b‖ := by + let Z : Lp ℝ 2 (μ.restrict Ω) →ₗ[ℝ] Lp ℝ 2 (μ.restrict Ω) := + ‖restrictedOne μ Ω hfin‖⁻¹ • LinearMap.id + let D := Z.comp (localRadialDerivative μ hQ Ω f hf) + let V := Z.comp (localRadialDerivative μ hQ Ω v hv) + let J := Z.comp (SobolevSpace.restrictLp μ hQ Ω).toLinearMap + let C : Euclidean n →ₗ[ℝ] SobolevSpace μ hQ := c.toLinearMap.smulRight η + have hDU (a) : D (U a) = J (G a) := by + dsimp only [D, J, LinearMap.comp_apply] + rw [localRadialDerivative_eq_restrict μ hQ Ω f (U a) (G a) hf (hG a)] + rfl + have hVU (a) : V (U a) = J (H a) := by + dsimp only [V, J, LinearMap.comp_apply] + rw [localRadialDerivative_eq_restrict μ hQ Ω v (U a) (H a) hv (hH a)] + rfl + have hDC (a) : D (C a) = 0 := by + change Z (localRadialDerivative μ hQ Ω f hf (c a • η)) = 0 + rw [map_smul, localRadialDerivative_constant μ hQ Ω f η hf 1 hη, smul_zero, map_zero] + have h₁ : ‖V (G b - U (A b))‖ ≤ Cv * dg * ‖b‖ := by + exact (normalized_radial_derivative_norm_le μ hQ Ω hfin v _ hCv + (mul_nonneg hdg (norm_nonneg b)) hv (hge b)).trans_eq (by ring) + have h₃ : ‖D (H b - U (B b) - C b)‖ ≤ Cf * dh * ‖b‖ := by + exact (normalized_radial_derivative_norm_le μ hQ Ω hfin f _ hCf + (mul_nonneg hdh (norm_nonneg b)) hf (hhe b)).trans_eq (by ring) + have h₄ : ‖J (H ((A - 1) b) - U (B ((A - 1) b)) - C ((A - 1) b))‖ ≤ + eh * ‖A - 1‖ * ‖b‖ := by + exact (hhv ((A - 1) b)).trans ((mul_le_mul_of_nonneg_left + ((A - 1).le_opNorm b) heh).trans_eq (by ring)) + have h₅ : ‖J (G (B b) - U (A (B b)))‖ ≤ eg * ‖B‖ * ‖b‖ := by + exact (hgv (B b)).trans ((mul_le_mul_of_nonneg_left (B.le_opNorm b) heg).trans_eq (by ring)) + have h₂ : ‖V (G b) - D (H b) - J (H b)‖ ≤ k * ‖b‖ := by + change ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω v hv (G b)) - + normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω f hf (H b)) - + normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (H b))‖ ≤ _ + simpa only [normalizeLocalL2, smul_sub] using hcomm b + have hh := affine_commutator_error_bound A.toLinearMap B.toLinearMap + U.toLinearMap G.toLinearMap H.toLinearMap C D V J hDU hVU hDC b h₁ h₂ h₃ h₄ h₅ + change ‖J (U ((A * B - B * (A - 1)) b)) - J (C ((A - 1) b))‖ ≤ _ at hh + rw [← map_sub] at hh + exact hh.trans_eq (by ring) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..081ae8aaeb9f35e48c6fb35a563252ffb69ae284 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineCompactness.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.RCD.Sobolev.FiniteMomentConvergence +import Mathlib.Topology.Sequences + +namespace OAI + +/-! # The compactness contradiction for a uniform affine improvement + +Convergence of the joint L² moments transfers a strict Euclidean affine +improvement to the approximating harmonic functions. +-/ + +open Filter +open scoped InnerProductSpace Topology BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- Target, constant and coordinate functions, in that order. -/ +def affineMomentFamily {H : Type*} (n : ℕ) (f one : H) (u : Fin n → H) : + Option (Option (Fin n)) → H + | none => f + | some none => one + | some (some i) => u i + +def affineErrorCoefficients {n : ℕ} (c : ℝ) (v : Fin n → ℝ) : + Option (Option (Fin n)) → ℝ + | none => 1 + | some none => -c + | some (some i) => -v i + +theorem affineMomentFamily_sum {H : Type*} [AddCommGroup H] [Module ℝ H] + {n : ℕ} (f one : H) (u : Fin n → H) (c : ℝ) (v : Fin n → ℝ) : + (∑ i, affineErrorCoefficients c v i • affineMomentFamily n f one u i) = + f - c • one - ∑ i, v i • u i := by + simp only [Fintype.sum_option, affineErrorCoefficients, affineMomentFamily, + one_smul, neg_smul, Finset.sum_neg_distrib] + abel + +/-- Strict improvement for the limiting model transfers to the same +coefficients in every sufficiently late actual function space. -/ +theorem affine_error_tendsto_of_moments + {n : ℕ} {H : ℕ → Type*} [∀ k, NormedAddCommGroup (H k)] + [∀ k, InnerProductSpace ℝ (H k)] + {Hlim : Type*} [NormedAddCommGroup Hlim] [InnerProductSpace ℝ Hlim] + (f one : ∀ k, H k) (u : ∀ k, Fin n → H k) + (flim onelim : Hlim) (ulim : Fin n → Hlim) + (h : ∀ i j, Tendsto + (fun k => ⟪affineMomentFamily n (f k) (one k) (u k) i, + affineMomentFamily n (f k) (one k) (u k) j⟫_ℝ) atTop + (𝓝 ⟪affineMomentFamily n flim onelim ulim i, + affineMomentFamily n flim onelim ulim j⟫_ℝ)) + (c : ℝ) (v : Fin n → ℝ) : + Tendsto (fun k => ‖f k - c • one k - ∑ i, v i • u k i‖) atTop + (𝓝 ‖flim - c • onelim - ∑ i, v i • ulim i‖) := by + simpa only [affineMomentFamily_sum] using + norm_sum_smul_tendsto_of_inner_tendsto + (fun k => affineMomentFamily n (f k) (one k) (u k)) + (affineMomentFamily n flim onelim ulim) h (affineErrorCoefficients c v) + +/-- The uniform threshold follows by contradiction from subsequential +compactness of the finite moments and the strict Euclidean candidate bound. +The coefficient choices need not be bounded or continuous in the index. -/ +theorem eventually_affine_fit_of_moment_compactness + {n : ℕ} {H : ℕ → Type*} [∀ k, NormedAddCommGroup (H k)] + [∀ k, InnerProductSpace ℝ (H k)] + {Hlim : Type*} [NormedAddCommGroup Hlim] [InnerProductSpace ℝ Hlim] + (f one : ∀ k, H k) (u : ∀ k, Fin n → H k) + {Models : Type*} (flim onelim : Models → Hlim) (ulim : Models → Fin n → Hlim) + (hcompact : ∀ s : ℕ → ℕ, StrictMono s → + ∃ (t : ℕ → ℕ), StrictMono t ∧ ∃ model : Models, + ∀ i j, Tendsto + (fun k => ⟪affineMomentFamily n (f (s (t k))) (one (s (t k))) (u (s (t k))) i, + affineMomentFamily n (f (s (t k))) (one (s (t k))) (u (s (t k))) j⟫_ℝ) atTop + (𝓝 ⟪affineMomentFamily n (flim model) (onelim model) (ulim model) i, + affineMomentFamily n (flim model) (onelim model) (ulim model) j⟫_ℝ)) + {η : ℝ} + (hmodel : ∀ model : Models, ∃ (c : ℝ) (v : Fin n → ℝ), + ‖flim model - c • onelim model - ∑ i, v i • ulim model i‖ < η) : + ∀ᶠ k in atTop, ∃ (c : ℝ) (v : Fin n → ℝ), + ‖f k - c • one k - ∑ i, v i • u k i‖ < η := by + by_contra hbad + have hb : ∃ᶠ k in atTop, ¬ ∃ (c : ℝ) (v : Fin n → ℝ), + ‖f k - c • one k - ∑ i, v i • u k i‖ < η := by + simpa only [Filter.Frequently, not_not] using hbad + obtain ⟨s, hs, hfail⟩ := extraction_of_frequently_atTop hb + obtain ⟨t, _ht, model, hlimit⟩ := hcompact s hs + obtain ⟨c, v, hcv⟩ := hmodel model + have he := (affine_error_tendsto_of_moments + (fun k => f (s (t k))) (fun k => one (s (t k))) (fun k => u (s (t k))) + (flim model) (onelim model) (ulim model) hlimit c v).eventually (gt_mem_nhds hcv) + obtain ⟨k, hk⟩ := he.exists + exact hfail (t k) ⟨c, v, hk⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineConstantBound.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineConstantBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..772bd4b057366194669f595f1563901dd9f4c24d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineConstantBound.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Harmonic.AffineEvaluation + +namespace OAI + +/-! # Recovering the constant operator of a centered affine residual -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published mean-value estimate recovers the constant coefficient +operator because the same harmonic coordinate map vanishes at the center. -/ +theorem LocalHarmonicL2MeanValueInput.affine_constant_operator_bound + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (V : X → Euclidean n), + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) (u j)) → + ContinuousOn V (ball p R) → V p = 0 → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun x => V x j) → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ (A : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) (d : ℝ), 0 ≤ d → + (∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (c b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u (A b)))‖ ≤ d * ‖b‖) → + ‖c‖ ≤ C * d := by + obtain ⟨C, hC, heval⟩ := affine_evaluation_of_mean_value hX hinput hn hκ + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv u V hu hV hVp hrep η hη A c d hd herror + apply ContinuousLinearMap.opNorm_le_bound _ (mul_nonneg (by linarith) hd) + intro b + have hh := heval p R hR hcurv u V hu hV hrep η hη (c b) (A b) + simp only [hVp, inner_zero_left, add_zero] at hh + have hr : SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (c b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u (A b)) = + affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c b, A b) := by + rw [map_add, map_smul, restrictLp_eq_one_of_representative _ _ η _ _ hη, + affineCoordinateMap_apply] + have hb := herror b + rw [hr] at hb + calc + ‖c b‖ = |c b| := Real.norm_eq_abs _ + _ ≤ C * ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c b, A b))‖ := hh + _ ≤ C * (d * ‖b‖) := mul_le_mul_of_nonneg_left hb (by linarith) + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineEvaluation.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..31a2b42d45c2db7120832cdb9e1b9b6e393d8443 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineEvaluation.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicMeanValueInput +import OAI.Geometry.RCD.Harmonic.LocalConstantHarmonic +import OAI.Geometry.RCD.Harmonic.ColumnRepresentatives +import OAI.Geometry.RCD.Coordinates.AffineFitPerturbation + +namespace OAI + +/-! # Uniform evaluation of affine fits at their center -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [BorelSpace X] [ProperSpace X] in +theorem affineSobolev_representative (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (s : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ hQ (u i) =ᵐ[μ.restrict s] fun x => v x i) + (η : SobolevSpace μ hQ) (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) + (c : ℝ) (a : Euclidean n) : + SobolevSpace.toLp μ hQ (c • η + sobolevColumnMap μ hQ u a) =ᵐ[μ.restrict s] + fun x => c + ⟪v x, a⟫_ℝ := by + change SobolevSpace.toLpCLM μ hQ (c • η + sobolevColumnMap μ hQ u a) =ᵐ[μ.restrict s] _ + rw [map_add, map_smul] + change (c • SobolevSpace.toLp μ hQ η + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u a)) + =ᵐ[μ.restrict s] _ + filter_upwards [ae_restrict_of_ae (Lp.coeFn_add (c • SobolevSpace.toLp μ hQ η) + (SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u a))), + ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ hQ η)), hη, + sobolevColumnMap_representative μ hQ u s v hu a] with x hadd hsmul hconst hcol + rw [hadd] + simp only [Pi.add_apply, hsmul, Pi.smul_apply, smul_eq_mul, hconst, mul_one, hcol] + +/-- Moser's mean-value estimate bounds affine evaluation without requiring +a choice of unique affine coefficients. -/ +theorem affine_evaluation_of_mean_value {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (r : ℝ), 0 < r → -κ ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + (∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u i)) → + ContinuousOn v (ball p r) → + (∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v x i) → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun _ => (1 : ℝ)) → + ∀ (c : ℝ) (a : Euclidean n), + |c + ⟪v p, a⟫_ℝ| ≤ C * + ‖normalizeLocalL2 (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + obtain ⟨C, hC, hcenter⟩ := hmean.center_bound hn hκ + refine ⟨C, hC, ?_⟩ + intro p r hr hcurv u v hu hv hrep η hη c a + let μ := hausdorff n X + let F := c • η + sobolevColumnMap μ hX.quadratic u a + have hηharm := isSobolevHarmonicOn_of_local_constant μ hX.quadratic + (ball p r) measurableSet_ball η 1 hη + have hFharm : IsSobolevHarmonicOn μ hX.quadratic (ball p r) F := + (hηharm.smul μ hX.quadratic c).add μ hX.quadratic + (IsSobolevHarmonicOn.linearCombination μ hX.quadratic hu a) + have hFrep := affineSobolev_representative μ hX.quadratic u (ball p r) v hrep η hη c a + have hFcont : ContinuousOn (fun x => c + ⟪v x, a⟫_ℝ) (ball p r) := + continuousOn_const.add (hv.inner continuousOn_const) + have hb := hcenter p r hr hcurv F (fun x => c + ⟪v x, a⟫_ℝ) hFharm hFcont hFrep + have hrest : SobolevSpace.restrictLp μ hX.quadratic (ball p r) F = + affineCoordinateMap μ hX.quadratic u (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a) := by + rw [affineCoordinateMap_apply] + change SobolevSpace.restrictLp μ hX.quadratic (ball p r) + (c • η + sobolevColumnMap μ hX.quadratic u a) = _ + rw [map_add, map_smul, restrictLp_eq_one_of_representative μ hX.quadratic η _ _ hη] + change |c + ⟪v p, a⟫_ℝ| ≤ C * ‖normalizeLocalL2 μ (ball p r) _ + (SobolevSpace.restrictLp μ hX.quadratic (ball p r) F)‖ at hb + rwa [hrest] at hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineForcingBound.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineForcingBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1b67a5cfb4b8ba44f6ac1011ef33e0e232ed052 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineForcingBound.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Harmonic.ForcingCoefficient + +namespace OAI + +/-! # The full forcing is controlled before residual normalization -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The exact-frame coefficient estimate controls the forcing on the +larger transport ball, including its constant and Sobolev error. -/ +theorem affine_forcing_norm_bound {n : ℕ} (Ω : Set X) (hfin : μ Ω ≠ ∞) + (hpos : μ Ω ≠ 0) (η e : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (ell : Euclidean n) (k : ℝ) {R C D α s : ℝ} + (hR : 0 ≤ R) (hD : 0 ≤ D) (hα : 0 ≤ α) + (hU : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U ell))‖ ≤ R * ‖N.symm ell‖) + (hcoeff : |k| + ‖N.symm ell‖ ≤ C * (α + s)) + (he : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω e)‖ ≤ D * s) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U ell + k • η + e))‖ ≤ + ((1 + R) * C + D) * (α + s) := by + have hconst : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (k • η))‖ = |k| := by + rw [map_smul, restrictLp_eq_one_of_representative μ hQ η Ω hfin hη, + normalized_constant_norm μ Ω hfin hpos] + have hsum : R * ‖N.symm ell‖ + |k| ≤ (1 + R) * (|k| + ‖N.symm ell‖) := by + nlinarith [abs_nonneg k, norm_nonneg (N.symm ell), mul_nonneg hR (abs_nonneg k)] + have hb := hsum.trans (mul_le_mul_of_nonneg_left hcoeff (by positivity : 0 ≤ 1 + R)) + rw [map_add, map_add] + simp only [normalizeLocalL2, smul_add] at hU he hconst ⊢ + apply le_trans ((norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl)) + rw [hconst] + have hh := add_le_add (add_le_add hU (le_rfl : |k| ≤ |k|)) he + exact hh.trans (by nlinarith only [hb, mul_nonneg hD hα]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineGrowthOnInterval.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineGrowthOnInterval.lean new file mode 100644 index 0000000000000000000000000000000000000000..82a4008e45fe6e9e8ddda25b843b93d51639dac2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineGrowthOnInterval.lean @@ -0,0 +1,36 @@ +import Mathlib.Analysis.ODE.Gronwall +import Mathlib.Analysis.Calculus.Deriv.MeanValue + +namespace OAI + +/-! # Gronwall's inequality with only interior differentiation -/ + +open Set +namespace RegularPointCoordinates + +theorem affine_growth_on_interval {F : ℝ → ℝ} {b c : ℝ} (hb : 0 ≤ b) + (hF : ContinuousOn F (Icc 0 b)) + (hd : ∀ t ∈ Ioo 0 b, DifferentiableAt ℝ F t ∧ deriv F t ≤ c*(F t+1)) + {t : ℝ} (ht : t ∈ Icc 0 b) : + F t+1 ≤ Real.exp (c*t)*(F 0+1) := by + have hmono : AntitoneOn (fun s => Real.exp (-c*s)*(F s+1)) (Icc 0 b) := by + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc 0 b) + ((Real.continuous_exp.comp (continuous_const.mul continuous_id)).continuousOn.mul + (hF.add continuousOn_const)) + (fun s hs => ((((hasDerivAt_id s).const_mul (-c)).exp).mul + (((hd s (by simpa only [interior_Icc] using hs)).1.hasDerivAt).add_const 1)).hasDerivWithinAt) + intro s hs + have hs' : s ∈ Ioo 0 b := by simpa only [interior_Icc] using hs + have hh := mul_le_mul_of_nonneg_left (hd s hs').2 (Real.exp_pos (-c*s)).le + simp only [id_eq,mul_one] + nlinarith only [hh] + have hh := hmono (show (0:ℝ) ∈ Icc 0 b from ⟨le_rfl,hb⟩) ht ht.1 + simp only [mul_zero,Real.exp_zero,one_mul] at hh + have hmul := mul_le_mul_of_nonneg_left hh (Real.exp_pos (c*t)).le + have hcancel : Real.exp (c*t)*Real.exp (-c*t) = 1 := by + rw [← Real.exp_add,show c*t+ -c*t = 0 by ring,Real.exp_zero] + simpa only [← mul_assoc,hcancel,one_mul] using hmul + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineImprovementTransfer.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineImprovementTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..425282efcbc65f4a2c9c611398d341eaedb810cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineImprovementTransfer.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicAffineImprovement +import OAI.Geometry.RCD.Coordinates.MeasuredCoordinateInput +import OAI.Geometry.RCD.Harmonic.ColumnRepresentatives + +namespace OAI + +/-! # Affine improvement in the original harmonic coordinate span + +The measured compactness theorem is applied to normalized and recentered +coordinates. Invertibility and the local constant cutoff identify their +affine projection exactly with that of the original columns. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem affine_improvement_from_metric_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hcompact : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmeasured : LocalMeasuredCoordinateInput hX) : + ∃ m : ℕ, 3 ≤ m ∧ ∃ δ : ℝ, 0 < δ ∧ δ ≤ 1 ∧ + ∀ (p : X) (r : ℝ), 0 < r → -δ ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + (∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v x i) → + ∀ (B : Euclidean n ≃L[ℝ] Euclidean n) + (η : SobolevSpace (hausdorff n X) hX.quadratic), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun _ => (1 : ℝ)) → + Measurable (fun x => (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) → + IsPointedApproximation p 0 r 2 δ (fun x => + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) → + ∀ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) w → + ‖normalizeLocalL2 (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) w)‖ ≤ 1 → + ‖normalizeLocalL2 (hausdorff n X) (ball p ((1 / 2 : ℝ) ^ m * r)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic u + (ball p ((1 / 2 : ℝ) ^ m * r)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball p ((1 / 2 : ℝ) ^ m * r)) w))‖ < + (1 / 2 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m) := by + obtain ⟨m, hm, happly⟩ := harmonic_affine_improvement_of_measured_approximation + hX hn hcompact hgradient heuclidean + obtain ⟨ε, hε, hεfit⟩ := happly 1 zero_lt_one + obtain ⟨d, hd, hmeasure⟩ := hmeasured hn 1 ε zero_lt_one hε + let δ := min d 1 + have hδ : 0 < δ := lt_min hd zero_lt_one + refine ⟨m, hm, δ, hδ, min_le_right _ _, ?_⟩ + intro p r hr hcurv u v hrep B η hη hmeas happ w hw hnorm + let μ := hausdorff n X + let b : Euclidean n →L[ℝ] ℝ := -(innerSL ℝ ((B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p))) + let u' := affineChangedColumn μ hX.quadratic u B b η + let f := fun x => (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p) + have hrep' (i : Fin n) : SobolevSpace.toLp μ hX.quadratic (u' i) =ᵐ[μ.restrict (ball p r)] + fun x => f x i := by + have hi := affineChangedColumn_representative μ hX.quadratic u (ball p r) v hrep B b η hη i + have hb : b (EuclideanSpace.single i 1) = + -((B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) i := by + change -⟪(B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p), EuclideanSpace.single i 1⟫_ℝ = _ + simp only [EuclideanSpace.inner_single_right, starRingEnd_apply, star_trivial, one_mul] + filter_upwards [hi] with x hx + change _ = ((B : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) i + rw [PiLp.sub_apply] + simpa only [hb, sub_eq_add_neg] using hx + have hcurvd : -d ≤ K * r ^ 2 := (neg_le_neg (min_le_left d 1)).trans hcurv + have hcurv1 : -1 ≤ K * r ^ 2 := (neg_le_neg (min_le_right d 1)).trans hcurv + have hmeasured' := hmeasure p r hr hcurvd f hmeas + (by simpa only [mul_one] using happ.mono_error (min_le_left d 1)) + let test : NormalizedHarmonicTest hX 1 ε := { + center := p + scale := r + scale_pos := hr + curvature := hcurv1 + coordinates := u' + values := f + target := w + approximation := hmeasured' + representative := fun i => by simpa only [one_mul] using hrep' i + harmonic := by simpa only [one_mul] using hw + normalized := by rw [one_mul]; exact hnorm } + have hfit := hεfit test + dsimp only [NormalizedHarmonicTest.residualNorm, test] at hfit + rw [mul_one] at hfit + have hsub : ball p ((1 / 2 : ℝ) ^ m * r) ⊆ ball p r := + ball_subset_ball (mul_le_of_le_one_left hr.le (pow_le_one₀ (by norm_num) (by norm_num))) + have hη' := ae_restrict_of_ae_restrict_of_subset hsub hη + have hηeq := restrictLp_eq_one_of_representative μ hX.quadratic η + (ball p ((1 / 2 : ℝ) ^ m * r)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hη' + have heq := affineChangedColumn_residual_eq μ hX.quadratic u B b η + (ball p ((1 / 2 : ℝ) ^ m * r)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hηeq + change ‖normalizeLocalL2 μ (ball p ((1 / 2 : ℝ) ^ m * r)) _ + (affineResidual μ hX.quadratic u' (ball p ((1 / 2 : ℝ) ^ m * r)) _ + (SobolevSpace.restrictLp μ hX.quadratic (ball p ((1 / 2 : ℝ) ^ m * r)) w))‖ < _ at hfit + rw [heq] at hfit + exact hfit + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineMomentConvergence.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineMomentConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..15540379e52dcdf4fcd6f999f579c0348c1033f7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineMomentConvergence.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Harmonic.AffineValuePairings + +namespace OAI + +/-! # Finite affine Hilbert moments from the actual pointed value limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.affine_value_moments_of_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S : ℝ} (hS : 0 v k x j) + (g : Euclidean n → ℝ) (hg : MemLp g 2 (volume.restrict (ball 0 S))) + (hmodel : ∀ τ + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u k) (w k) + (ball (p k) (ρ*r k)) (hX.finiteOnBounded _ isBounded_ball).ne i, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u k) (w k) + (ball (p k) (ρ*r k)) (hX.finiteOnBounded _ isBounded_ball).ne j⟫_ℝ) + atTop (𝓝 ⟪euclideanValueMoments g hg hρS.le i,euclideanValueMoments g hg hρS.le j⟫_ℝ) := by + intro ρ hρ hρS i j + let μ := hausdorff n X + let τ := (ρ+S)/2 + have hρτ : ρ<τ := by dsimp only [τ]; linarith + have hτS : τ v k x a := + ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (mul_le_mul_of_nonneg_right hρS.le (hr k).le)) (hrep k a) + have hprod (k) : Integrable (fun x => + affineValueFamily (SobolevSpace.toLp μ hX.quadratic (w k)) (v k) i x* + affineValueFamily (SobolevSpace.toLp μ hX.quadratic (w k)) (v k) j x) + (μ.restrict (ball (p k) (ρ*r k))) := + (affineValueFamily_memLp μ hX.quadratic (u k) (w k) (v k) _ + (hX.finiteOnBounded _ isBounded_ball).ne (hrep' k) i).integrable_mul + (affineValueFamily_memLp μ hX.quadratic (u k) (w k) (v k) _ + (hX.finiteOnBounded _ isBounded_ball).ne (hrep' k) j) + have hconv' (a) : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (ρ*r k)), + |affineValueFamily (SobolevSpace.toLp μ hX.quadratic (w k)) (v k) a x- + affineValueFamily g id a (v k x)|≤η := by + rcases a with _ | (_ | k) + · exact hconv ρ hρ hρS + · intro η hη + exact Eventually.of_forall fun _ => Eventually.of_forall fun _ => by + simpa only [affineValueFamily,affineMomentFamily,sub_self,abs_zero] using hη.le + · intro η hη + exact Eventually.of_forall fun _ => Eventually.of_forall fun _ => by + simpa only [affineValueFamily,affineMomentFamily,id_eq,sub_self,abs_zero] using hη.le + have ht := inner_ball_value_moment_tendsto hS hρ hρτ hτS.le hr hv + (fun _ => (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hρ (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) hε + (fun k => affineValueFamily (SobolevSpace.toLp μ hX.quadratic (w k)) (v k) i) + (fun k => affineValueFamily (SobolevSpace.toLp μ hX.quadratic (w k)) (v k) j) + (affineValueFamily g id i) (affineValueFamily g id j) + hLi hLj hprod (hconv' i) (hconv' j) + rw [euclideanValueMoments_pairing g hg hρS.le i j] + apply ht.congr' + exact Eventually.of_forall fun k => + (localAffineMomentFamily_pairing μ hX.quadratic (u k) (w k) (v k) + (ball (p k) (ρ*r k)) (hX.finiteOnBounded _ isBounded_ball).ne (hrep' k) i j).symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineOperatorBound.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineOperatorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d3c65a40187cdca5a10d71540933fea7ef20fa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineOperatorBound.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Sobolev.AffineCoefficientEnergy +import OAI.Geometry.RCD.Harmonic.AffineEvaluation + +namespace OAI + +/-! # Recovering affine operator coefficients from actual local L2 errors -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Exact half-ball normalization recovers the whole linear coefficient +operator from its affine L2 errors, with one constant before all data. -/ +theorem LocalHarmonicL2GradientInput.affine_operator_bound + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n), + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R / 2)) measurableSet_ball N → + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) (u j)) → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ (A : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) (d : ℝ), 0 ≤ d → + (∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (c b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u (A b)))‖ ≤ d * ‖b‖) → + ‖N.symm.toContinuousLinearMap.comp A‖ ≤ C / R * d := by + obtain ⟨C, hC, hcoef⟩ := hinput.affine_coefficient hn hκ + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv u N hN hu η hη A c d hd hbound + let μ := hausdorff n X + let hQ := hX.quadratic + have hηharm := isSobolevHarmonicOn_of_local_constant μ hQ (ball p R) measurableSet_ball η 1 hη + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro b + change ‖N.symm (A b)‖ ≤ C / R * d * ‖b‖ + let w := c b • η + sobolevColumnMap μ hQ u (A b) + have hw : IsSobolevHarmonicOn μ hQ (ball p R) w := + (hηharm.smul μ hQ (c b)).add μ hQ (IsSobolevHarmonicOn.linearCombination μ hQ hu (A b)) + have hc : SobolevSpace.toLp μ hQ (w - sobolevColumnMap μ hQ u (A b)) + =ᵐ[μ.restrict (ball p R)] fun _ => c b := by + change SobolevSpace.toLp μ hQ ((c b • η + sobolevColumnMap μ hQ u (A b)) - + sobolevColumnMap μ hQ u (A b)) =ᵐ[_] _ + rw [add_sub_cancel_right, map_smul] + filter_upwards [hη, ae_restrict_of_ae (Lp.coeFn_smul (c b) (SobolevSpace.toLp μ hQ η))] + with x hx hs + rw [hs] + change c b * SobolevSpace.toLp μ hQ η x = c b + rw [show SobolevSpace.toLp μ hQ η x = 1 from hx, mul_one] + have hk := hcoef p R hR hcurv u N hN (A b) w (c b) hw hc + have hs := (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hd (norm_nonneg b))).mpr (hbound b) + have hh := hk.trans (mul_le_mul_of_nonneg_left hs (sq_nonneg (C / R))) + apply (sq_le_sq₀ (norm_nonneg (N.symm (A b))) (by positivity : 0 ≤ C / R * d * ‖b‖)).mp + convert hh using 1; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffinePathDerivative.lean b/lean/OAI/Geometry/RCD/Harmonic/AffinePathDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..56f17561e6258ecd4ff9eca6f17cc42297c835bb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffinePathDerivative.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.RCD.Transport.OrthonormalHarmonicGeodesic + +namespace OAI + +/-! # The interior derivative of an affine coordinate path -/ + +open Set Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem affine_path_hasDerivAt {X : Type*} [MetricSpace X] {n : ℕ} + (γ : C(Time,X)) (v : X → Euclidean n) + (hv : ∀ t : Time, v (γ t)=(1-(t:ℝ)) • v (γ 0)+(t:ℝ) • v (γ 1)) + {s : ℝ} (hs : s∈Ioo (0:ℝ) 1) : + HasDerivAt (fun r => v (geodesicExtension γ r)) (v (γ 1)-v (γ 0)) s := by + have hd : HasDerivAt (fun r : ℝ => v (γ 0)+r • (v (γ 1)-v (γ 0))) + (v (γ 1)-v (γ 0)) s := by + simpa only [one_smul,zero_add] using! + (hasDerivAt_const s (v (γ 0))).add ((hasDerivAt_id s).smul_const (v (γ 1)-v (γ 0))) + apply hd.congr_of_eventuallyEq + filter_upwards [Ioo_mem_nhds hs.1 hs.2] with t ht + have he := hv ⟨t,Ioo_subset_Icc_self ht⟩ + rw [← geodesicExtension_eq γ ⟨t,Ioo_subset_Icc_self ht⟩] at he + change v (geodesicExtension γ t)=v (γ 0)+t • (v (γ 1)-v (γ 0)) + rw [he] + module + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffinePathMeans.lean b/lean/OAI/Geometry/RCD/Harmonic/AffinePathMeans.lean new file mode 100644 index 0000000000000000000000000000000000000000..efd7a4ce743cdc5ac221b42a38dba3df8e3821cc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffinePathMeans.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Sobolev.ContinuousAEEqOnTime +import Mathlib.MeasureTheory.Function.AEEqOfIntegral +import Mathlib.Analysis.Normed.Group.Bounded + +namespace OAI + +/-! # Affine means on every normalized subplan imply affine paths -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem affine_paths_of_normalized_means (π : Measure C(Time,X)) [IsProbabilityMeasure π] + (U : X → ℝ) (hU : Continuous U) (hUc : HasCompactSupport U) + (hmean : ∀ κ : Measure C(Time,X), κ ≤ π → κ univ ≠ 0 → ∀ t : Time, + (∫ γ, U (γ t) ∂((κ univ)⁻¹ • κ)) = + (1-(t:ℝ))*(∫ γ, U (γ 0) ∂((κ univ)⁻¹ • κ))+ + (t:ℝ)*(∫ γ, U (γ 1) ∂((κ univ)⁻¹ • κ))) : + ∀ᵐ γ ∂π, ∀ t : Time, U (γ t)=(1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1) := by + obtain ⟨M,hM⟩ := hUc.exists_bound_of_continuous hU + have hi (ν : Measure C(Time,X)) [IsFiniteMeasure ν] (t : Time) : + Integrable (fun γ => U (γ t)) ν := + Integrable.of_bound (hU.measurable.comp (measurable_path_eval t)).aestronglyMeasurable M + (Eventually.of_forall fun γ => hM (γ t)) + apply ae_eq_all_time_of_continuous π (fun γ t => U (γ t)) + (fun γ t => (1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1)) + (Eventually.of_forall fun γ => hU.comp γ.continuous) + (Eventually.of_forall fun _ => by fun_prop) + intro t + let f := fun γ : C(Time,X) => U (γ t)-(1-(t:ℝ))*U (γ 0)-(t:ℝ)*U (γ 1) + have hif : Integrable f π := ((hi π t).sub ((hi π 0).const_mul _)).sub ((hi π 1).const_mul _) + have heq : f =ᵐ[π] 0 := by + apply hif.ae_eq_zero_of_forall_setIntegral_eq_zero + intro S hS _hSf + by_cases hz : π S=0 + · rw [Measure.restrict_eq_zero.mpr hz] + simp + let κ := π.restrict S + have hk0 : κ univ ≠ 0 := by simpa only [κ,Measure.restrict_apply_univ] using hz + have hkt : κ univ ≠ ∞ := measure_ne_top κ univ + have ha : (κ univ)⁻¹ ≠ ∞ := ENNReal.inv_ne_top.mpr hk0 + have ha0 : ((κ univ)⁻¹).toReal ≠ 0 := ENNReal.toReal_ne_zero.mpr + ⟨ENNReal.inv_ne_zero.mpr hkt,ha⟩ + have hh := hmean κ Measure.restrict_le_self hk0 t + have hin (s : Time) : Integrable (fun γ => U (γ s)) ((κ univ)⁻¹ • κ) := + (hi κ s).smul_measure ha + have hfzero : (∫ γ, f γ ∂((κ univ)⁻¹ • κ))=0 := by + change (∫ γ, U (γ t)-(1-(t:ℝ))*U (γ 0)-(t:ℝ)*U (γ 1) ∂((κ univ)⁻¹ • κ))=0 + rw [integral_sub (f := fun γ : C(Time,X) => U (γ t)-(1-(t:ℝ))*U (γ 0)) + (g := fun γ : C(Time,X) => (t:ℝ)*U (γ 1)) + ((hin t).sub ((hin 0).const_mul (1-(t:ℝ)))) ((hin 1).const_mul (t:ℝ)), + integral_sub (f := fun γ : C(Time,X) => U (γ t)) + (g := fun γ : C(Time,X) => (1-(t:ℝ))*U (γ 0)) + (hin t) ((hin 0).const_mul (1-(t:ℝ))),integral_const_mul,integral_const_mul] + linarith only [hh] + rw [integral_smul_measure,smul_eq_mul] at hfzero + exact (mul_eq_zero.mp hfzero).resolve_left ha0 + filter_upwards [heq] with γ hγ + change U (γ t)-(1-(t:ℝ))*U (γ 0)-(t:ℝ)*U (γ 1)=0 at hγ + linarith only [hγ] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..6abfca44ea213e27c794237ca6601daf03062adf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineProjection.lean @@ -0,0 +1,150 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicGrams + +namespace OAI + +/-! # The actual `L²` projection onto the affine coordinate span -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + +def restrictedOne : Lp ℝ 2 (μ.restrict s) := + indicatorConstLp 2 MeasurableSet.univ (by simpa using hfin) 1 + +/-- Constants and linear combinations of the given coordinates, restricted +as actual `L²` functions on the testing set. -/ +def affineCoordinateMap : (ℝ × Euclidean n) →L[ℝ] Lp ℝ 2 (μ.restrict s) := + (ContinuousLinearMap.fst ℝ ℝ (Euclidean n)).smulRight (restrictedOne μ s hfin) + + (SobolevSpace.restrictLp μ hQ s).comp + ((sobolevColumnMap μ hQ u).comp (ContinuousLinearMap.snd ℝ ℝ (Euclidean n))) + +theorem affineCoordinateMap_apply (c : ℝ) (v : Euclidean n) : + affineCoordinateMap μ hQ u s hfin (c, v) = + c • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u v) := rfl + +def affineCoordinateSpace : Submodule ℝ (Lp ℝ 2 (μ.restrict s)) := + (affineCoordinateMap μ hQ u s hfin).range + +instance affineCoordinateSpace_finiteDimensional : + FiniteDimensional ℝ (affineCoordinateSpace μ hQ u s hfin) := + LinearMap.finiteDimensional_range _ + +/-- The least-squares affine fit exists without assuming independence of +its generators. Coefficient uniqueness can be added after normalization. -/ +def affineProjection : Lp ℝ 2 (μ.restrict s) →L[ℝ] Lp ℝ 2 (μ.restrict s) := + (affineCoordinateSpace μ hQ u s hfin).starProjection + +theorem affineProjection_has_coefficients (f : Lp ℝ 2 (μ.restrict s)) : + ∃ c : ℝ, ∃ v : Euclidean n, + affineProjection μ hQ u s hfin f = c • restrictedOne μ s hfin + + SobolevSpace.restrictLp μ hQ s (sobolevColumnMap μ hQ u v) := by + have hm := (affineCoordinateSpace μ hQ u s hfin).starProjection_apply_mem f + rcases hm with ⟨⟨c, v⟩, hcv⟩ + exact ⟨c, v, hcv.symm⟩ + +theorem affineProjection_orthogonal (f : Lp ℝ 2 (μ.restrict s)) + (c : ℝ) (v : Euclidean n) : + ⟪f - affineProjection μ hQ u s hfin f, + affineCoordinateMap μ hQ u s hfin (c, v)⟫_ℝ = 0 := + (affineCoordinateSpace μ hQ u s hfin).starProjection_inner_eq_zero f _ ⟨(c, v), rfl⟩ + +/-- The affine fit minimizes the `L²` error among all coordinate-affine +functions, with the unnormalized integral convention. -/ +theorem affineProjection_best (f : Lp ℝ 2 (μ.restrict s)) + (c : ℝ) (v : Euclidean n) : + ‖f - affineProjection μ hQ u s hfin f‖ ≤ + ‖f - affineCoordinateMap μ hQ u s hfin (c, v)‖ := by + let K := affineCoordinateSpace μ hQ u s hfin + let P := affineProjection μ hQ u s hfin + let g := affineCoordinateMap μ hQ u s hfin (c, v) + have hm : P f - g ∈ K := K.sub_mem (K.starProjection_apply_mem f) ⟨(c, v), rfl⟩ + have ho : ⟪f - P f, P f - g⟫_ℝ = 0 := K.starProjection_inner_eq_zero f _ hm + have he := norm_add_sq_real (f - P f) (P f - g) + have hs : f - P f + (P f - g) = f - g := by abel + rw [hs, ho] at he + change ‖f - P f‖ ≤ ‖f - g‖ + exact (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mp (by nlinarith [sq_nonneg ‖P f - g‖]) + +/-- The residual is a bounded linear map, so all scalar directional fits +can be assembled linearly before taking their matrix coefficients. -/ +def affineResidual : Lp ℝ 2 (μ.restrict s) →L[ℝ] Lp ℝ 2 (μ.restrict s) := + ContinuousLinearMap.id ℝ _ - affineProjection μ hQ u s hfin + +theorem affineResidual_norm_le (f : Lp ℝ 2 (μ.restrict s)) : + ‖affineResidual μ hQ u s hfin f‖ ≤ ‖f‖ := by + have hb := affineProjection_best μ hQ u s hfin f 0 0 + change ‖f - affineProjection μ hQ u s hfin f‖ ≤ + ‖f - affineCoordinateMap μ hQ u s hfin 0‖ at hb + simpa only [map_zero, sub_zero, affineResidual, sub_apply, + ContinuousLinearMap.id_apply] using hb + +theorem affineProjection_norm_le (f : Lp ℝ 2 (μ.restrict s)) : + ‖affineProjection μ hQ u s hfin f‖ ≤ ‖f‖ := + (affineCoordinateSpace μ hQ u s hfin).norm_starProjection_apply_le f + +/-- Orthogonality to constants is the vanishing of the actual integral, +including when the original ambient measure is infinite. -/ +theorem affineResidual_integral (f : Lp ℝ 2 (μ.restrict s)) : + ∫ x, affineResidual μ hQ u s hfin f x ∂μ.restrict s = 0 := by + have ho := affineProjection_orthogonal μ hQ u s hfin f 1 0 + have hi := L2.inner_indicatorConstLp_one + (μ := μ.restrict s) MeasurableSet.univ (by simpa using hfin) + (affineResidual μ hQ u s hfin f) + have ho' : ⟪affineResidual μ hQ u s hfin f, restrictedOne μ s hfin⟫_ℝ = 0 := by + simpa only [affineCoordinateMap_apply, map_zero, one_smul, add_zero, + affineResidual, sub_apply, ContinuousLinearMap.id_apply] using ho + have hi' : ⟪restrictedOne μ s hfin, affineResidual μ hQ u s hfin f⟫_ℝ = + ∫ x, affineResidual μ hQ u s hfin f x ∂μ.restrict s := by + simpa [restrictedOne] using hi + rw [← hi', real_inner_comm] + exact ho' + +/-- The residual is orthogonal to each original coordinate in `L²`. -/ +theorem affineResidual_coordinate_inner (f : Lp ℝ 2 (μ.restrict s)) (i : Fin n) : + ⟪affineResidual μ hQ u s hfin f, + SobolevSpace.restrictLp μ hQ s (u i)⟫_ℝ = 0 := by + have ho := affineProjection_orthogonal μ hQ u s hfin f 0 + (EuclideanSpace.single i 1) + simpa only [affineCoordinateMap_apply, zero_smul, zero_add, + sobolevColumnMap_single, affineResidual, sub_apply, + ContinuousLinearMap.id_apply] using ho + +/-- Uniform nondegeneracy of the value coordinates gives uniform bounds +for the coefficients of their least-squares fit. -/ +theorem affineProjection_controlled_coefficients (f : Lp ℝ 2 (μ.restrict s)) + {C : ℝ} (hC : 0 ≤ C) + (hbound : ∀ c v, |c| + ‖v‖ ≤ C * ‖affineCoordinateMap μ hQ u s hfin (c, v)‖) : + ∃ c : ℝ, ∃ v : Euclidean n, + affineProjection μ hQ u s hfin f = affineCoordinateMap μ hQ u s hfin (c, v) ∧ + |c| + ‖v‖ ≤ C * ‖f‖ := by + obtain ⟨c, v, hcv⟩ := affineProjection_has_coefficients μ hQ u s hfin f + change affineProjection μ hQ u s hfin f = + affineCoordinateMap μ hQ u s hfin (c, v) at hcv + refine ⟨c, v, hcv, ?_⟩ + have hb := hbound c v + rw [← hcv] at hb + exact hb.trans (mul_le_mul_of_nonneg_left + (affineProjection_norm_le μ hQ u s hfin f) hC) + +/-- Vanishing of an affine residual follows from affinity itself. This is +the final contradiction after Euclidean Euler rigidity in sharp projection. -/ +theorem affineResidual_eq_zero_of_mem (f : Lp ℝ 2 (μ.restrict s)) + (hf : f ∈ affineCoordinateSpace μ hQ u s hfin) : + affineResidual μ hQ u s hfin f = 0 := by + have he := (affineCoordinateSpace μ hQ u s hfin).starProjection_eq_self_iff.mpr hf + change f - affineProjection μ hQ u s hfin f = 0 + exact sub_eq_zero.mpr he.symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineScaleChoice.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineScaleChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..9466d1b4d3c3d8bb385e6df56d8909a4d9813b24 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineScaleChoice.lean @@ -0,0 +1,42 @@ +import Mathlib.Analysis.SpecialFunctions.Pow.Real +import Mathlib.Topology.Algebra.InfiniteSum.Real +import Mathlib.Tactic + +namespace OAI + +/-! # One dyadic scale for the Euclidean affine improvement -/ + +open Filter +open scoped Topology + +namespace RegularPointCoordinates + +/-- A quadratic Taylor error is strictly smaller than the required +three-halves decay at one fixed dyadic scale, independent of the function. -/ +theorem exists_dyadic_affine_contraction (C : ℝ) : + ∃ m : ℕ, 3 ≤ m ∧ + C * ((1 / 2 : ℝ) ^ m) ^ 2 < + (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m) := by + have ht : Tendsto (fun m : ℕ => (1 / 2 : ℝ) ^ m) atTop (𝓝 0) := + tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num) + have hs : Tendsto (fun m : ℕ => C * Real.sqrt ((1 / 2 : ℝ) ^ m)) atTop (𝓝 0) := by + simpa only [Function.comp_apply, Real.sqrt_zero, mul_zero] using + tendsto_const_nhds.mul (Real.continuous_sqrt.tendsto 0 |>.comp ht) + obtain ⟨m, hm, hmC⟩ := ((eventually_ge_atTop 3).and + (hs.eventually (gt_mem_nhds (by norm_num : (0 : ℝ) < 1 / 4)))).exists + refine ⟨m, hm, ?_⟩ + have hp : 0 < (1 / 2 : ℝ) ^ m := pow_pos (by norm_num) _ + have hroot : 0 < Real.sqrt ((1 / 2 : ℝ) ^ m) := Real.sqrt_pos.2 hp + have hsq := Real.sq_sqrt hp.le + have hh := mul_lt_mul_of_pos_right hmC (mul_pos hp hroot) + calc + _ = C * (1 / 2 : ℝ) ^ m * (Real.sqrt ((1 / 2 : ℝ) ^ m)) ^ 2 := by + rw [hsq] + ring + _ = (C * Real.sqrt ((1 / 2 : ℝ) ^ m)) * + ((1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m)) := by ring + _ < _ := by simpa only [mul_assoc] using hh + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineSpatialSelection.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineSpatialSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb35216d9f79cfaf706776280684c32b56e9988c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineSpatialSelection.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Transport.FirstOrderNearbyPlanErrors + +namespace OAI + +/-! # Selecting paths with small uniform affine error and small spatial cost -/ + +open Set Filter MeasureTheory Metric +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +omit [MeasurableSpace X] [BorelSpace X] in +theorem affine_spatial_selection {n : ℕ} (π : ℕ → Measure C(Time,X)) + [∀ k, IsProbabilityMeasure (π k)] + (F : ℕ → Fin n → C(Time,X) → C(Time,ℝ)) (E : ℕ → X → ℝ) + (hE : ∀ k z, 0 ≤ E k z) + (hI : ∀ k, Integrable (affineSpatialPathCost (F k) (E k)) (π k)) + (hlim : Tendsto (fun k => ∫ γ, affineSpatialPathCost (F k) (E k) γ ∂π k) atTop (𝓝 0)) + (P : ℕ → C(Time,X) → Prop) (hP : ∀ k, ∀ᵐ γ ∂π k, P k γ) : + ∃ (γ : ℕ → C(Time,X)) (a : ℕ → ℝ), + (∀ k, P k (γ k)) ∧ (∀ k, 0 ≤ a k) ∧ Tendsto a atTop (𝓝 0) ∧ + (∀ k i (t : Time), |F k i (γ k) t| ≤ a k) ∧ + (∀ k, (∫ t in Icc (0:ℝ) 1, E k (geodesicExtension (γ k) t)) ≤ a k) := by + classical + let a k := ∫ γ, affineSpatialPathCost (F k) (E k) γ ∂π k + have hpos (k : ℕ) (γ : C(Time,X)) : 0 ≤ affineSpatialPathCost (F k) (E k) γ := + add_nonneg (Finset.sum_nonneg (fun _ _ => norm_nonneg _)) (integral_nonneg (fun _ => hE k _)) + have hex (k : ℕ) : ∃ γ, P k γ ∧ affineSpatialPathCost (F k) (E k) γ ≤ a k := by + obtain ⟨γ,hγ,hb⟩ := exists_notMem_null_le_integral (hI k) (ae_iff.mp (hP k)) + exact ⟨γ,of_not_not hγ,hb⟩ + choose γ hgood hbound using hex + refine ⟨γ,a,hgood,fun k => integral_nonneg (hpos k),hlim,?_,?_⟩ + · intro k i t + have hi : ‖F k i (γ k)‖ ≤ ∑ j, ‖F k j (γ k)‖ := + Finset.single_le_sum (fun j _ => norm_nonneg (F k j (γ k))) (Finset.mem_univ i) + have ht : |F k i (γ k) t| ≤ ‖F k i (γ k)‖ := (F k i (γ k)).norm_coe_le_norm t + have he : 0 ≤ ∫ s in Icc (0:ℝ) 1, E k (geodesicExtension (γ k) s) := + integral_nonneg (fun _ => hE k _) + exact (ht.trans hi).trans (le_trans (le_add_of_nonneg_right he) (hbound k)) + · intro k + exact (le_add_of_nonneg_left (Finset.sum_nonneg (fun _ _ => norm_nonneg _))).trans (hbound k) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineValuePairings.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineValuePairings.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae23ebad29d6a02df02f1dd733c47b59fb0dc1be --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineValuePairings.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Metric.InnerBallValueMoments +import OAI.Geometry.RCD.Coordinates.NormalizedPairing +import OAI.Geometry.RCD.Harmonic.LocalL2Restriction +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicModel + +namespace OAI + +/-! # Exact value representatives for all affine-family Hilbert pairings -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +/-- The target, constant and coordinate values in the same order as the Hilbert family. -/ +def affineValueFamily {X : Type*} {n : ℕ} (w : X → ℝ) (V : X → Euclidean n) : + Option (Option (Fin n)) → X → ℝ := + affineMomentFamily n w (fun _ => 1) (fun j x => V x j) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +private theorem affineValueFamily_representatives (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (w : SobolevSpace μ hQ) + (V : X → Euclidean n) (s : Set X) (hfin : μ s≠⊤) + (hV : ∀ j, SobolevSpace.toLp μ hQ (u j)=ᵐ[μ.restrict s] fun x => V x j) : + ∀ i, affineMomentFamily n (SobolevSpace.restrictLp μ hQ s w) + (restrictedOne μ s hfin) (fun j => SobolevSpace.restrictLp μ hQ s (u j)) i =ᵐ[μ.restrict s] + affineValueFamily (SobolevSpace.toLp μ hQ w) V i := by + intro i + rcases i with _ | (_ | j) + · exact SobolevSpace.restrictLp_coe μ hQ s w + · exact restrictedOne_coe μ s hfin + · exact (SobolevSpace.restrictLp_coe μ hQ s (u j)).trans (hV j) + +theorem affineValueFamily_memLp (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (w : SobolevSpace μ hQ) + (V : X → Euclidean n) (s : Set X) (hfin : μ s≠⊤) + (hV : ∀ j, SobolevSpace.toLp μ hQ (u j)=ᵐ[μ.restrict s] fun x => V x j) (i) : + MemLp (affineValueFamily (SobolevSpace.toLp μ hQ w) V i) 2 (μ.restrict s) := + (memLp_congr_ae (affineValueFamily_representatives μ hQ u w V s hfin hV i)).mp (Lp.memLp _) + +theorem localAffineMomentFamily_pairing (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (w : SobolevSpace μ hQ) + (V : X → Euclidean n) (s : Set X) (hfin : μ s≠⊤) + (hV : ∀ j, SobolevSpace.toLp μ hQ (u j)=ᵐ[μ.restrict s] fun x => V x j) (i j) : + ⟪localAffineMomentFamily μ hQ u w s hfin i,localAffineMomentFamily μ hQ u w s hfin j⟫_ℝ= + (μ.real s)⁻¹*∫ x in s, + affineValueFamily (SobolevSpace.toLp μ hQ w) V i x* + affineValueFamily (SobolevSpace.toLp μ hQ w) V j x ∂μ := by + let U := affineMomentFamily n (SobolevSpace.restrictLp μ hQ s w) + (restrictedOne μ s hfin) (fun j => SobolevSpace.restrictLp μ hQ s (u j)) + have he (a) : normalizeLocalL2 μ s hfin (U a)=localAffineMomentFamily μ hQ u w s hfin a := by + rcases a with _ | (_ | j) <;> rfl + rw [← he i,← he j] + exact normalized_inner_of_representatives μ s hfin (U i) (U j) _ _ + (affineValueFamily_representatives μ hQ u w V s hfin hV i) + (affineValueFamily_representatives μ hQ u w V s hfin hV j) + +/-- The affine moment family is already meaningful before harmonicity of the limit is identified. -/ +def euclideanValueMoments {n : ℕ} {S : ℝ} (g : Euclidean n → ℝ) + (hg : MemLp g 2 (volume.restrict (ball 0 S))) {ρ : ℝ} (hρS : ρ≤S) : + Option (Option (Fin n)) → Lp ℝ 2 (volume.restrict (ball (0:Euclidean n) ρ)) := + affineMomentFamily n + (normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top + ((hg.mono_measure (Measure.restrict_mono_set volume (ball_subset_ball hρS))).toLp g)) + (normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top + (restrictedOne volume (ball 0 ρ) measure_ball_ne_top)) + (fun j => normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top (euclideanCoordinateLp n ρ j)) + +theorem euclideanValueMoments_pairing {n : ℕ} {S ρ : ℝ} + (g : Euclidean n → ℝ) (hg : MemLp g 2 (volume.restrict (ball 0 S))) + (hρS : ρ≤S) (i j) : + ⟪euclideanValueMoments g hg hρS i,euclideanValueMoments g hg hρS j⟫_ℝ= + (volume.real (ball (0:Euclidean n) ρ))⁻¹* + ∫ z in ball 0 ρ, affineValueFamily g id i z*affineValueFamily g id j z := by + let gLp := (hg.mono_measure (Measure.restrict_mono_set volume (ball_subset_ball hρS))).toLp g + let U := affineMomentFamily n gLp + (restrictedOne volume (ball 0 ρ) measure_ball_ne_top) (euclideanCoordinateLp n ρ) + have he (a) : normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top (U a)= + euclideanValueMoments g hg hρS a := by + rcases a with _ | (_ | j) <;> rfl + have hU (a) : U a=ᵐ[volume.restrict (ball 0 ρ)] affineValueFamily g id a := by + rcases a with _ | (_ | j) + · exact (hg.mono_measure (Measure.restrict_mono_set volume (ball_subset_ball hρS))).coeFn_toLp + · exact restrictedOne_coe volume (ball 0 ρ) measure_ball_ne_top + · exact euclideanCoordinateLp_coe n ρ j + rw [← he i,← he j] + exact normalized_inner_of_representatives volume (ball 0 ρ) measure_ball_ne_top + (U i) (U j) _ _ (hU i) (hU j) + +theorem EuclideanHarmonicModel.moments_pairing {n : ℕ} {S ρ : ℝ} + (model : EuclideanHarmonicModel n S) (hρS : ρ≤S) (i j) : + ⟪model.moments hρS i,model.moments hρS j⟫_ℝ= + (volume.real (ball (0:Euclidean n) ρ))⁻¹* + ∫ z in ball 0 ρ, affineValueFamily model.value id i z*affineValueFamily model.value id j z := + euclideanValueMoments_pairing model.value model.memLp hρS i j + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AffineVariationSelection.lean b/lean/OAI/Geometry/RCD/Harmonic/AffineVariationSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1bc352ba1defe0221c02d5bac2a02eb0e0a3d5d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AffineVariationSelection.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.VanishingRadiusCost +import Mathlib.MeasureTheory.Integral.Average + +namespace OAI + +/-! # Joint selection of a small affine error and controlled coefficient variation -/ + +open Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +private theorem affine_variation_product_bound {a v δ c : ℝ} + (hv : 0≤v) (hδ : 0≤δ) (hδ1 : δ≤1) (ha : a≤δ*c) (hb : δ*v^2≤c) : + a*v≤(c^2+c)/2 := by + have h₁ : 2*(a*v)≤2*(δ*c*v) := by nlinarith [mul_le_mul_of_nonneg_right ha hv] + have h₂ : 2*(δ*c*v)≤δ*c^2+δ*v^2 := by nlinarith [mul_nonneg hδ (sq_nonneg (c-v))] + have h₃ : δ*c^2≤c^2 := mul_le_of_le_one_left (sq_nonneg c) hδ1 + linarith + +theorem affine_variation_selection {Y : Type*} [MeasurableSpace Y] + (μ : ℕ → Measure Y) [∀ k, IsProbabilityMeasure (μ k)] + (A B E : ℕ → Y → ℝ) (P : ℕ → Y → Prop) + (hA : ∀ k, Integrable (A k) (μ k)) (hB : ∀ k, Integrable (B k) (μ k)) + (hE : ∀ k, Integrable (E k) (μ k)) + (hA0 : ∀ k y, 0≤A k y) (hB0 : ∀ k y, 0≤B k y) (hE0 : ∀ k y, 0≤E k y) + (hP : ∀ k, ∀ᵐ y ∂μ k, P k y) + (hAlim : Tendsto (fun k => ∫ y, A k y ∂μ k) atTop (𝓝 0)) + (hElim : Tendsto (fun k => ∫ y, E k y ∂μ k) atTop (𝓝 0)) + {M : ℝ} (hM : ∀ k, (∫ y, B k y ∂μ k)≤M) : + ∃ y : ℕ → Y, (∀ k, P k (y k)) ∧ + Tendsto (fun k => A k (y k)) atTop (𝓝 0) ∧ + Tendsto (fun k => E k (y k)) atTop (𝓝 0) ∧ + Tendsto (fun k => A k (y k)*Real.sqrt (B k (y k))) atTop (𝓝 0) := by + obtain ⟨δ,hδ,hδ0,hδA⟩ := exists_vanishing_radius_cost + (fun k => ∫ y, A k y ∂μ k) (fun k => integral_nonneg (hA0 k)) hAlim 1 + simp only [pow_one] at hδA + have hδB : Tendsto (fun k => δ k*(∫ y, B k y ∂μ k)) atTop (𝓝 0) := by + apply squeeze_zero (fun k => mul_nonneg (hδ k).1.le (integral_nonneg (hB0 k))) + (fun k => mul_le_mul_of_nonneg_left (hM k) (hδ k).1.le) + simpa only [zero_mul] using hδ0.mul_const M + let F k y := A k y/δ k+δ k*B k y+E k y + have hFI (k : ℕ) : Integrable (F k) (μ k) := + (((hA k).div_const (δ k)).add ((hB k).const_mul (δ k))).add (hE k) + have hF0 (k : ℕ) (y : Y) : 0≤F k y := + add_nonneg (add_nonneg (div_nonneg (hA0 k y) (hδ k).1.le) + (mul_nonneg (hδ k).1.le (hB0 k y))) (hE0 k y) + let c k := ∫ y, F k y ∂μ k + have hc0 (k : ℕ) : 0≤c k := integral_nonneg (hF0 k) + have hclim : Tendsto c atTop (𝓝 0) := by + have hh := (hδA.add hδB).add hElim + simp only [add_zero] at hh + apply hh.congr' + filter_upwards [] with k + dsimp only [c,F] + symm + calc + _ = (∫ y, A k y/δ k+δ k*B k y ∂μ k)+(∫ y, E k y ∂μ k) := by + simpa only [Pi.add_apply] using + integral_add (((hA k).div_const (δ k)).add ((hB k).const_mul (δ k))) (hE k) + _ = _ := by + congr 1 + calc + _ = (∫ y, A k y/δ k ∂μ k)+(∫ y, δ k*B k y ∂μ k) := by + simpa only [Pi.add_apply] using integral_add ((hA k).div_const (δ k)) ((hB k).const_mul (δ k)) + _ = _ := by rw [integral_div,integral_const_mul] + have hex (k : ℕ) : ∃ y, P k y ∧ F k y≤c k := by + obtain ⟨y,hy,hb⟩ := exists_notMem_null_le_integral (hFI k) (ae_iff.mp (hP k)) + exact ⟨y,of_not_not hy,hb⟩ + choose y hPy hy using hex + have hAy (k : ℕ) : A k (y k)≤δ k*c k := by + rw [mul_comm (δ k)] + apply (div_le_iff₀ (hδ k).1).mp + have hh := hy k + dsimp only [F] at hh + nlinarith [mul_nonneg (hδ k).1.le (hB0 k (y k)),hE0 k (y k)] + have hBy (k : ℕ) : δ k*B k (y k)≤c k := by + have hh := hy k + dsimp only [F] at hh + linarith [div_nonneg (hA0 k (y k)) (hδ k).1.le,hE0 k (y k)] + have hEy (k : ℕ) : E k (y k)≤c k := by + have hh := hy k + dsimp only [F] at hh + linarith [div_nonneg (hA0 k (y k)) (hδ k).1.le,mul_nonneg (hδ k).1.le (hB0 k (y k))] + refine ⟨y,hPy,?_,squeeze_zero (fun k => hE0 k (y k)) hEy hclim,?_⟩ + · apply squeeze_zero (fun k => hA0 k (y k)) (fun k => (hAy k).trans ?_) hclim + exact mul_le_of_le_one_left (hc0 k) (by linarith [(hδ k).2]) + · apply squeeze_zero (fun k => mul_nonneg (hA0 k (y k)) (Real.sqrt_nonneg _)) + (g := fun k => ((c k)^2+c k)/2) + · intro k + apply affine_variation_product_bound (Real.sqrt_nonneg _) (hδ k).1.le + (by linarith [(hδ k).2]) (hAy k) + simpa only [Real.sq_sqrt (hB0 k (y k))] using hBy k + · simpa only [zero_pow (by decide : (2:ℕ)≠0),add_zero,zero_div] using + ((hclim.pow 2).add hclim).div_const 2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AnnularHarmonicReplacement.lean b/lean/OAI/Geometry/RCD/Harmonic/AnnularHarmonicReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbf53aacdc3a64b9a74d65a772b2d4acb22a0cc2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AnnularHarmonicReplacement.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Sobolev.HarmonicReplacementEnergy +import OAI.Geometry.RCD.Sobolev.UniformAnnularCoercivity + +namespace OAI + +/-! # Uniform normalized bounds for constructed harmonic replacements -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.annular_harmonic_replacement {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) : + ∃ P : ℝ, 0

by rw [Real.norm_eq_abs, abs_of_nonneg (kernelAverage_bounds μ hQ hk ht A z).1] + exact (kernelAverage_bounds μ hQ hk ht A z).2) + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + {U : E →L[ℝ] SobolevSpace μ hQ} {M : PositiveBilinearMeasure X E} + {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} {v : E} + +/-- Exact mass, curvature and cutoff-density decomposition of the actual +averaged signed source. No absolute-continuity replacement of M is made. -/ +theorem LocalHarmonicEnergy.average_cutoffSource + (G : LocalHarmonicEnergy μ hQ U M κ p r L v) + (χ : X →ᵇ ℝ) (hcompact : HasCompactSupport (χ : X → ℝ)) + (c : SobolevSpace μ hQ) (q : Lp ℝ 2 μ) {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hbounded : Bornology.IsBounded A) : + (∫ᵛ z, kernelAverage μ ker t A z ∂<•(G.cutoffSource μ hQ χ c q)) = + 2 * ⟪v, cutoffAverageHeatMass μ hQ hk χ.continuous hcompact M ht A hA hbounded v⟫_ℝ - + 2 * κ * (∫ z, χ z * kernelAverage μ ker t A z * localGamma μ hQ (U v) (U v) z ∂μ) + + ∫ z, kernelAverage μ ker t A z * cutoffSourceDensity μ hQ G.energy c q z ∂μ := by + let w := boundedKernelAverage μ hQ hk ht A hA hbounded + have hM : M.weightedOperator (w * χ) = + cutoffAverageHeatMass μ hQ hk χ.continuous hcompact M ht A hA hbounded := by + unfold cutoffAverageHeatMass + congr 1 + ext z + change kernelAverage μ ker t A z * χ z = χ z * kernelAverage μ ker t A z + ring + have hG : (∫ z, (w * χ) z * localGamma μ hQ (U v) (U v) z ∂μ) = + ∫ z, χ z * kernelAverage μ ker t A z * localGamma μ hQ (U v) (U v) z ∂μ := by + apply integral_congr_ae + exact Filter.Eventually.of_forall fun z => by + change (kernelAverage μ ker t A z * χ z) * _ = _ + ring + have he := G.integral_cutoffSource μ hQ χ w c q + rw [hM, hG] at he + exact he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AverageQuadraticError.lean b/lean/OAI/Geometry/RCD/Harmonic/AverageQuadraticError.lean new file mode 100644 index 0000000000000000000000000000000000000000..162bd6ff19aa277b81b948060cddc82018159ec4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AverageQuadraticError.lean @@ -0,0 +1,62 @@ +import OAI.Analysis.RCDHeat.ExistingAnalytic + +namespace OAI + +/-! # Passing an additive transport error from averages to continuous values -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [SecondCountableTopology X] {μ : Measure X} [IsLocallyFiniteMeasure μ] + [IsUnifLocDoublingMeasure μ] [μ.IsOpenPosMeasure] + +theorem quadratic_comparison_of_average_bound_add + (u v U V : X → ℝ) (hu : LocallyIntegrable u μ) (hv : LocallyIntegrable v μ) + (hU : Continuous U) (hV : Continuous V) (heU : u =ᵐ[μ] U) (heV : v =ᵐ[μ] V) + (c e : ℝ) (h : ∀ x y : X, ∀ r : ℝ, 0 < r → + (⨍z in closedBall x r, u z ∂μ) - (⨍z in closedBall y r, v z ∂μ) ≤ + c*(dist x y + 2*r)^2+e) : + ∀ x y, U x-V y ≤ c*dist x y^2+e := by + let S := {x : X | Tendsto (fun r : ℝ => ⨍z in closedBall x r, u z ∂μ) + (𝓝[>] 0) (𝓝 (U x))} + let T := {x : X | Tendsto (fun r : ℝ => ⨍z in closedBall x r, v z ∂μ) + (𝓝[>] 0) (𝓝 (V x))} + have hS : ∀ᵐ x ∂μ, x ∈ S := by + filter_upwards [IsUnifLocDoublingMeasure.ae_tendsto_average μ hu (1:ℝ),heU] with x hx he + change Tendsto _ _ (𝓝 (U x)) + rw [←he] + exact hx (fun _ : ℝ => x) id tendsto_id (by + filter_upwards [self_mem_nhdsWithin] with r hr + simp only [mem_closedBall,dist_self,one_mul] + exact le_of_lt hr) + have hT : ∀ᵐ x ∂μ, x ∈ T := by + filter_upwards [IsUnifLocDoublingMeasure.ae_tendsto_average μ hv (1:ℝ),heV] with x hx he + change Tendsto _ _ (𝓝 (V x)) + rw [←he] + exact hx (fun _ : ℝ => x) id tendsto_id (by + filter_upwards [self_mem_nhdsWithin] with r hr + simp only [mem_closedBall,dist_self,one_mul] + exact le_of_lt hr) + have hST : ∀ x ∈ S, ∀ y ∈ T, U x-V y ≤ c*dist x y^2+e := by + intro x hx y hy + have hc : Tendsto (fun r : ℝ => c*(dist x y+2*r)^2+e) (𝓝[>] 0) + (𝓝 (c*dist x y^2+e)) := by + have hh : Continuous (fun r : ℝ => c*(dist x y+2*r)^2+e) := by fun_prop + simpa using (hh.continuousAt (x := 0)).tendsto.mono_left nhdsWithin_le_nhds + have hb : ∀ᶠ r in 𝓝[>] (0:ℝ), + (⨍z in closedBall x r, u z ∂μ) - (⨍z in closedBall y r, v z ∂μ) ≤ + c*(dist x y+2*r)^2+e := by + filter_upwards [self_mem_nhdsWithin] with r hr using h x y r hr + exact le_of_tendsto_of_tendsto (hx.sub hy) hc hb + have hd : Dense (S ×ˢ T) := (Measure.dense_of_ae hS).prod (Measure.dense_of_ae hT) + have hc : IsClosed {z : X×X | U z.1-V z.2 ≤ c*dist z.1 z.2^2+e} := + isClosed_le ((hU.comp continuous_fst).sub (hV.comp continuous_snd)) (by fun_prop) + have hs : closure (S ×ˢ T) ⊆ {z : X×X | U z.1-V z.2 ≤ c*dist z.1 z.2^2+e} := + hc.closure_subset_iff.mpr (fun z hz => hST z.1 hz.1 z.2 hz.2) + intro x y + exact hs (hd (x,y)) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AveragedEndpointPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/AveragedEndpointPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..595f167a6fd4e1339f2a8b9a6dc781db37e86bbd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AveragedEndpointPairing.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Sobolev.CompactLaplacian + +namespace OAI + +/-! # Pairing the exact derivative of the averaged potential + +On the inner ball the cutoff is one, so its L2 derivative has precisely +the normalized endpoint pairing appearing in the energy estimate. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] + +theorem averaged_endpoint_pairing (z : X) {r h : ℝ} (hr : 0 < r) (hh : 0 < h) + (F G : X → ℝ) (hF : ContinuousOn F (closedBall z r)) (hG : ContinuousOn G (closedBall z r)) + (D : Lp ℝ 2 μ) + (hD : D =ᵐ[μ] fun x => radialCutoff z r x*((G x-F x)/(2*h))) + (φ : X → ℝ) {L : ℝ≥0} (hφ : LipschitzWith L φ) (hs : tsupport φ ⊆ ball z r) : + h⁻¹*((∫ x in closedBall z r, φ x*G x ∂μ)-(∫ x in closedBall z r, φ x*F x ∂μ)) = + 2*(∫ x, φ x*D x ∂μ) := by + have hzero (x : X) (hx : x ∉ closedBall z r) : φ x = 0 := + image_eq_zero_of_notMem_tsupport (fun hp => hx (ball_subset_closedBall (hs hp))) + have hiF : IntegrableOn (fun x => φ x*F x) (closedBall z r) μ := + (hφ.continuous.continuousOn.mul hF).integrableOn_compact (isCompact_closedBall z r) + have hiG : IntegrableOn (fun x => φ x*G x) (closedBall z r) μ := + (hφ.continuous.continuousOn.mul hG).integrableOn_compact (isCompact_closedBall z r) + have he : (∫ x, φ x*D x ∂μ) = ∫ x in closedBall z r, φ x*D x ∂μ := + (setIntegral_eq_integral_of_ae_compl_eq_zero + (Eventually.of_forall fun x hx => by rw [hzero x hx,zero_mul])).symm + rw [he,← integral_const_mul] + calc + _ = ∫ x in closedBall z r, h⁻¹*(φ x*G x-φ x*F x) ∂μ := by + rw [← integral_sub hiG hiF,← integral_const_mul] + _ = ∫ x in closedBall z r, 2*(φ x*D x) ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae hD] with x hx + by_cases hφx : φ x = 0 + · simp only [hφx,zero_mul,sub_self,mul_zero] + · have hxin := hs (subset_tsupport φ hφx) + rw [hx,radialCutoff_eq_one z hr (mem_closedBall'.mp (ball_subset_closedBall hxin)),one_mul] + field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/AveragedLpPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/AveragedLpPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..ed65b9962c6482ad4b497a2bf3fe25575484e3a9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/AveragedLpPairing.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Heat.HeatTimeContinuity + +namespace OAI + +/-! # Exact averaged kernel pairings with bounded Sobolev densities -/ + +open Set MeasureTheory Filter +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The actual averaged kernel pairing is an L2 heat pairing. This also +justifies its initial-time limit without a pointwise kernel limit. -/ +theorem kernelAverage_integral_lp {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (f : Lp ℝ 2 μ) : + (∫ z, kernelAverage μ ker t A z * f z ∂μ) = + ⟪heatAt μ hQ t (uniformDensityLp μ A hA hAt), f⟫_ℝ := by + rw [L2.inner_def] + apply integral_congr_ae + filter_upwards [kernelAverage_heatSobolev_coe μ hQ hk ht A hA hAt] with z hz + rw [heatSobolev_toLp] at hz + simp only [hz, RCLike.inner_apply, conj_trivial] + ring + +include hk in +/-- The full averaged pairing is integrable down to zero time for L2 +densities, including the compact curvature density. -/ +theorem kernelAverage_integral_lp_intervalIntegrable_zero + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (f : Lp ℝ 2 μ) + {T : ℝ} (hT : 0 ≤ T) : + IntervalIntegrable (fun t => ∫ z, kernelAverage μ ker t A z * f z ∂μ) volume 0 T := by + have hc : Continuous (fun t => ⟪heatAt μ hQ t (uniformDensityLp μ A hA hAt), f⟫_ℝ) := + (heatAt_continuous μ hQ _).inner continuous_const + apply (hc.intervalIntegrable 0 T).congr_ae + filter_upwards [ae_restrict_mem measurableSet_uIoc] with t ht + have ht' : 0 < t := by + rw [uIoc_of_le hT] at ht + exact ht.1 + exact (kernelAverage_integral_lp μ hQ hk ht' A hA hAt f).symm + +include hk in +/-- The same pairing is the actual average of the heat-evolved density. -/ +theorem kernelAverage_integral_lp_eq_average {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (f : Lp ℝ 2 μ) : + (∫ z, kernelAverage μ ker t A z * f z ∂μ) = + (μ.real A)⁻¹ * ∫ z in A, heatAt μ hQ t f z ∂μ := by + rw [kernelAverage_integral_lp μ hQ hk ht A hA hAt f, heatAt_inner, uniformDensityLp_inner] + +include hk in +/-- Each positive-time averaged kernel pairing is an ordinary integrable +product of two L2 representatives. -/ +theorem kernelAverage_mul_lp_integrable {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (f : Lp ℝ 2 μ) : + Integrable (fun z => kernelAverage μ ker t A z * f z) μ := by + have he := kernelAverage_heatSobolev_coe μ hQ hk ht A hA hAt + rw [heatSobolev_toLp] at he + apply (L2.integrable_inner (𝕜 := ℝ) (heatAt μ hQ t (uniformDensityLp μ A hA hAt)) f).congr + filter_upwards [he] with z hz + simp only [hz, RCLike.inner_apply, conj_trivial] + ring + +include hk in +/-- The pointwise kernel pairing is also an integrable L2 product. -/ +theorem kernel_mul_lp_integrable {t : ℝ} (ht : 0 < t) (x : X) (f : Lp ℝ 2 μ) : + Integrable (fun z => ker t x z * f z) μ := by + apply (L2.integrable_inner (𝕜 := ℝ) (heatKernelRow μ hQ hk t x) f).congr + filter_upwards [heatKernelRow_coe μ hQ hk ht x] with z hz + simp only [hz, RCLike.inner_apply, conj_trivial] + ring + +/-- Kernel subtraction is valid for these actual integrable products. -/ +theorem kernelAverage_difference_integral_lp {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (x : X) (f : Lp ℝ 2 μ) : + (∫ z, (kernelAverage μ ker t A z - ker t x z) * f z ∂μ) = + ⟪heatAt μ hQ t (uniformDensityLp μ A hA hAt), f⟫_ℝ - kernelHeat μ hQ hk t f x := by + simp_rw [sub_mul] + rw [integral_sub (kernelAverage_mul_lp_integrable μ hQ hk ht A hA hAt f) + (kernel_mul_lp_integrable μ hQ hk ht x f), + kernelAverage_integral_lp μ hQ hk ht A hA hAt f, kernelHeat_eq_integral μ hQ hk ht f x] + +include hk in +/-- All positive-time difference pairings with an L2 density are +integrable on compact time intervals. -/ +theorem kernelAverage_difference_lp_intervalIntegrable + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (x : X) (f : Lp ℝ 2 μ) + {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) : + IntervalIntegrable (fun r => ∫ z, (kernelAverage μ ker r A z - ker r x z) * f z ∂μ) + volume s t := by + have ha : Continuous (fun r => ⟪heatAt μ hQ r (uniformDensityLp μ A hA hAt), f⟫_ℝ) := + (heatAt_continuous μ hQ _).inner continuous_const + have hp : ContinuousOn (fun r => kernelHeat μ hQ hk r f x) (Icc s t) := + (kernelHeat_continuousOn_time_space μ hQ hk f).comp + (continuous_id.prodMk continuous_const).continuousOn + (fun r hr => ⟨hs.trans_le hr.1, mem_univ _⟩) + apply ((ha.continuousOn.sub hp).intervalIntegrable_of_Icc hst).congr_ae + filter_upwards [ae_restrict_mem measurableSet_uIoc] with r hr + have hr' : 0 < r := by + rw [uIoc_of_le hst] at hr + exact hs.trans hr.1 + exact (kernelAverage_difference_integral_lp μ hQ hk hr' A hA hAt x f).symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BalancedQuadraticError.lean b/lean/OAI/Geometry/RCD/Harmonic/BalancedQuadraticError.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f1bcbf471c47322ec3357ba203d8adabab89bf7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BalancedQuadraticError.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Harmonic.EventualQuadraticError + +namespace OAI + +/-! # Radius-preserving balance of the quadratic Young parameter -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem eventual_balanced_error {Y : Type*} (f : ℕ → Y → ℝ) + {C V M B : ℝ} (hV : 0 localGamma μ hQ (u i) (u j) x + have hd : matrixGramDefect G=gramDefect μ hQ u x := rfl + constructor + · have ht := gram_trace_defect G + rw [hd] at ht + exact ht.trans (by nlinarith [gramDefect_nonneg μ hQ u x]) + · have ht := gram_square_defect G (by simpa only [show (2:ℝ)^2=4 by norm_num] using hx) + simpa only [hd,show (4:ℝ)+1=5 by norm_num] using ht + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbd06d23f8583f55e3dcb656afc56a45dad0e039 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicCompactness.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.RCD.Harmonic.SmoothHarmonicModelCompactness +import OAI.Geometry.RCD.Harmonic.HomogeneousAffineImprovement + +namespace OAI + +/-! # Harmonic compactness for uniformly bounded, unnormalized families -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal ContDiff Laplacian +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_harmonic_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S M : ℝ} (hS : 0 M⁻¹ • w k + have hvnorm (k : ℕ) : harmonicTargetNorm hX (p k) (S*r k) (v k)≤1 := by + rw [harmonicTargetNorm_smul,abs_of_pos (inv_pos.mpr hM)] + exact (mul_le_mul_of_nonneg_left (hnorm k) (inv_pos.mpr hM).le).trans_eq + (inv_mul_cancel₀ hM.ne') + have hvh (k : ℕ) := (hw k).smul (hausdorff n X) hX.quadratic M⁻¹ + obtain ⟨g,a,ha,hgm,hgc,hgL,hconv,_⟩ := hX.open_ball_harmonic_test_compactness hn hS + p r ε hr hcurv hε hε1 hεlim V hV v hvh hvnorm + have hconv' : ∀ W : ℝ, 0 hk.mono fun _ hx => hx.le + have hweak := hX.harmonic_value_limit_weak_of_curvature hn hS (p∘a) (r∘a) (ε∘a) + (fun k => hr (a k)) (fun k => hcurv (a k)) (fun k => hε (a k)) + (fun k => hε1 (a k)) (hεlim.comp ha.tendsto_atTop) (V∘a) (v∘a) + (fun k => hV (a k)) (fun k => hvh (a k)) (fun k => hvnorm (a k)) g hgL hconv' + have hscaledweak : EuclideanWeakHarmonicOn (fun z => M*g z) S := by + intro ψ hψ + simp_rw [mul_assoc] + rw [integral_const_mul,hweak ψ hψ,mul_zero] + refine ⟨a,ha,(fun z => M*g z),measurable_const.mul hgm,continuousOn_const.mul hgc,hscaledweak, + contDiffOn_const.mul (continuous_weak_harmonic_smooth hgc hweak),?_,?_⟩ + · intro W hW + obtain ⟨L,hL⟩ := hgL W hW + refine ⟨⟨M,hM.le⟩*L,LipschitzOnWith.of_dist_le_mul fun x hx y hy => ?_⟩ + have hh := mul_le_mul_of_nonneg_left (hL.dist_le_mul x hx y hy) hM.le + change |M*g x-M*g y|≤(M*(L:ℝ))*dist x y + rw [← mul_sub,abs_mul,abs_of_pos hM] + exact hh.trans_eq (by ring) + · intro W hW hWS δ hδ + filter_upwards [hconv' W hW hWS (δ/M) (div_pos hδ hM)] with k hk + have he : SobolevSpace.toLp (hausdorff n X) hX.quadratic (v (a k))=ᵐ[hausdorff n X] + fun x => M⁻¹*SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x := by + dsimp only [v] + rw [map_smul] + exact Lp.coeFn_smul _ _ + filter_upwards [hk,ae_restrict_of_ae he] with x hx hex + rw [hex] at hx + have hh : |M*(M⁻¹*SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x-g (V (a k) x))|≤M*(δ/M) := by + rw [abs_mul,abs_of_pos hM] + exact mul_le_mul_of_nonneg_left hx hM.le + have heq : M*(M⁻¹*SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x-g (V (a k) x))= + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x-M*g (V (a k) x) := by + field_simp + rw [heq] at hh + exact hh.trans_eq (mul_div_cancel₀ δ hM.ne') + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicNorm.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..98df616576b5c26187116c5c73890ce357cb4478 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicNorm.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicAffineImprovement + +namespace OAI + +/-! # The normalized harmonic L2 norm from an actual local value bound -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.harmonicTargetNorm_le_of_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (p : X) {R M : ℝ} (hR : 0 < R) (hM : 0 ≤ M) + (w : SobolevSpace (hausdorff n X) hX.quadratic) + (hb : ∀ᵐ x ∂(hausdorff n X).restrict (ball p R), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x| ≤ M) : + harmonicTargetNorm hX p R w ≤ M := by + let μ := hausdorff n X + have hf : μ (ball p R) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hm : 0 < μ.real (ball p R) := ENNReal.toReal_pos (hX.fullSupport p R hR).ne' hf + have hi : (∫ x in ball p R, (SobolevSpace.toLp μ hX.quadratic w x)^2 ∂μ) ≤ + M^2*μ.real (ball p R) := by + calc + _ ≤ ∫ _ in ball p R, M^2 ∂μ := integral_mono_ae + (Lp.memLp _).integrable_sq.integrableOn (integrableOn_const hf) (by + filter_upwards [hb] with x hx + change |SobolevSpace.toLp μ hX.quadratic w x| ≤ M at hx + simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg _) hx 2) + _ = _ := by simp only [integral_const,Measure.real,Measure.restrict_apply_univ,smul_eq_mul,mul_comm] + apply (sq_le_sq₀ (norm_nonneg _) hM).mp + change (harmonicTargetNorm hX p R w)^2 ≤ M^2 + have he : (harmonicTargetNorm hX p R w)^2 = (μ.real (ball p R))⁻¹* + ∫ x in ball p R, (SobolevSpace.toLp μ hX.quadratic w x)^2 ∂μ := + normalized_sobolev_mean_sq μ hX.quadratic (ball p R) hf w + rw [he] + exact (mul_le_mul_of_nonneg_left hi (inv_pos.mpr hm).le).trans_eq (by field_simp) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicRecoveryStrong.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicRecoveryStrong.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f691fb7fd1ceafbeb601785e4f5bf0b7f3b0183 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicRecoveryStrong.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Sobolev.BoundedHarmonicScaledEnergy +import OAI.Geometry.RCD.Harmonic.HarmonicRecoveryStrong + +namespace OAI + +/-! # Strong local recovery for the actual bounded harmonic coordinates -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_harmonic_recovery_strong {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S a b R T Q M : ℝ} (hS : 0 r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), (euclideanNestedCutoff n hab (V k x))^2* + localGamma (hausdorff n X) hX.quadratic (q k) (q k) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, (euclideanNestedCutoff n hab z)^2*‖fderiv ℝ F z‖^2))) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), (nestedBallCutoff (p k) (a*r k) (b*r k) x)^2* + localGamma (hausdorff n X) hX.quadratic (w k-q k) (w k-q k) x ∂hausdorff n X) + atTop (𝓝 0) := by + obtain ⟨B,hB,hwb⟩ := hX.bounded_harmonic_scaled_energy_bound hn hS + (ha.le.trans (hab.le.trans (hbR.le.trans hRT.le))) hTS hM p r hr hcurv w hw hnorm + exact hX.harmonic_recovery_strong_of_gradient_bound hn hS ha hab hbR hRT hTS + p r ε V hr hcurv hε hε1 hεlim hV w q hw hB hwb g F hg heq hd hconv hqconv hqg hq + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicStrongRecovery.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicStrongRecovery.lean new file mode 100644 index 0000000000000000000000000000000000000000..021e57e11c33fc85f91de8bf9341162cf2b83b01 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedHarmonicStrongRecovery.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicRecoveryStrong +import OAI.Geometry.RCD.Harmonic.SmoothHarmonicModelCompactness +import OAI.Geometry.RCD.Metric.EuclideanInteriorSmoothExtension +import OAI.Geometry.RCD.Sobolev.SharpWeightedTestRecovery +import OAI.Geometry.RCD.Sobolev.SmoothRecoveryGradientBound + +namespace OAI + +/-! # Constructed strong recoveries at the actual coordinate normalization -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal BoundedContinuousFunction ContDiff +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.bounded_harmonic_strong_recovery {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S a b R T M : ℝ} (hS : 0 r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (S*r (k+N))))⁻¹* + ∫ x in ball (p (k+N)) (S*r (k+N)), φ (V (k+N) x)*localGamma (hausdorff n X) hX.quadratic + (q k).val (q k).val x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, φ z*‖fderiv ℝ F z‖^2))) ∧ + Tendsto (fun k => r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (S*r (k+N))))⁻¹* + ∫ x in ball (p (k+N)) (R*r (k+N)), + (nestedBallCutoff (p (k+N)) (a*r (k+N)) (b*r (k+N)) x)^2* + localGamma (hausdorff n X) hX.quadratic (w (k+N)-(q k).val) (w (k+N)-(q k).val) x + ∂hausdorff n X) atTop (𝓝 0) := by + obtain ⟨F,hF,heq,hd⟩ := exists_interior_smooth_extension + (ha.trans (hab.trans (hbR.trans hRT))) hTS hg + obtain ⟨c,hc,hcS,N,q,hqv,hqg,hqz,hqe⟩ := + hX.sharp_weighted_test_recovery hn hS p r ε V hr hcurv hε hε1 hεlim hV hF + obtain ⟨Q,hQ,hQb⟩ := compact_recovery_scaled_gradient_bound (hausdorff n X) hX.quadratic + (hF.1.of_le (by simp)) hF.2.1 (fun k => p (k+N)) (fun k => r (k+N)) + (fun k => hr (k+N)) (fun k => V (k+N)) (fun k => (q k).val) hqz (hqg c hc.le hcS) + refine ⟨F,hF,heq,hd,N,q,hqv,hqg,⟨Q,hQ,hQb⟩,hqe,?_⟩ + apply hX.bounded_harmonic_recovery_strong hn hS ha hab hbR hRT hTS hM + (fun k => p (k+N)) (fun k => r (k+N)) (fun k => ε (k+N)) (fun k => V (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) (fun k => hε (k+N)) (fun k => hε1 (k+N)) + (hεlim.comp (tendsto_add_atTop_nat N)) (fun k => hV (k+N)) + (fun k => w (k+N)) (fun k => (q k).val) (fun k => hw (k+N)) (fun k => hnorm (k+N)) + g F hgL heq hd + (fun W hW hWS δ hδ => (tendsto_add_atTop_nat N).eventually (hconv W hW hWS δ hδ)) hqv hQb + let φ : Euclidean n →ᵇ ℝ := (euclideanNestedCutoff n hab)^2 + apply hqe φ (fun z => sq_nonneg _) ?_ + have hs : tsupport φ⊆closedBall (0:Euclidean n) b := by + change closure (Function.support φ)⊆closedBall 0 b + apply closure_minimal _ isClosed_closedBall + intro z hz + by_contra hx + have hz' : b M⁻¹ • w k + let g := fun z => M⁻¹*f z + have hunorm (k : ℕ) : harmonicTargetNorm hX (p k) (S*r k) (u k) ≤ 1 := by + rw [harmonicTargetNorm_smul,abs_of_pos (inv_pos.mpr hM)] + exact (mul_le_mul_of_nonneg_left (hnorm k) (inv_pos.mpr hM).le).trans_eq + (inv_mul_cancel₀ hM.ne') + have hgL : ∀ W < S, ∃ L : ℝ≥0, LipschitzOnWith L g (closedBall 0 W) := by + intro W hW + obtain ⟨L,hL⟩ := hfL W hW + refine ⟨⟨M⁻¹,(inv_pos.mpr hM).le⟩*L,LipschitzOnWith.of_dist_le_mul fun x hx y hy => ?_⟩ + have hh := mul_le_mul_of_nonneg_left (hL.dist_le_mul x hx y hy) (inv_pos.mpr hM).le + change |M⁻¹*f x-M⁻¹*f y| ≤ (M⁻¹*(L : ℝ))*dist x y + rw [← mul_sub,abs_mul,abs_of_pos (inv_pos.mpr hM)] + simpa only [Real.dist_eq,mul_assoc] using hh + have huconv : ∀ W : ℝ, 0 < W → W < S → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp μ hX.quadratic (u k) x-g (V k x)| ≤ η := by + intro W hW hWS η hη + filter_upwards [hconv W hW hWS (η*M) (mul_pos hη hM)] with k hk + have he : SobolevSpace.toLp μ hX.quadratic (u k) =ᵐ[μ] + fun x => M⁻¹*SobolevSpace.toLp μ hX.quadratic (w k) x := by + dsimp only [u] + rw [map_smul] + exact Lp.coeFn_smul _ _ + filter_upwards [hk,ae_restrict_of_ae he] with x hx heq + rw [heq] + change |M⁻¹*SobolevSpace.toLp μ hX.quadratic (w k) x-M⁻¹*f (V k x)| ≤ η + rw [← mul_sub,abs_mul,abs_of_pos (inv_pos.mpr hM)] + have hh := mul_le_mul_of_nonneg_left hx (inv_pos.mpr hM).le + exact hh.trans_eq (by field_simp) + have hgweak := hX.harmonic_value_limit_weak_of_curvature hn hS p r ε hr hcurv hε hε1 hεlim + V u hV (fun k => (hw k).smul μ hX.quadratic M⁻¹) hunorm g hgL huconv + have hfweak : EuclideanWeakHarmonicOn f S := by + intro ψ hψ + have hh := hgweak ψ hψ + change (∫ z, (M⁻¹*f z)*_)=0 at hh + simp_rw [mul_assoc] at hh + rw [integral_const_mul] at hh + exact (mul_eq_zero.mp hh).resolve_left (inv_ne_zero hM.ne') + exact continuous_weak_harmonic hfc hfweak + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedScalarProduct.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedScalarProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..50f5c86df2e95453a4857a7928ce2a68d9af7f44 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedScalarProduct.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Harmonic.WeightedAffineComposition + +namespace OAI + +/-! # L² continuity of a bounded scalar coefficient times a density -/ + +open Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +def boundedScalarProduct (f g : Lp ℝ 2 μ) {b : ℝ → ℝ} {D : ℝ≥0} + (hb : LipschitzWith D b) (E : ℝ≥0) (hE : ∀ a, |b a|≤E) : Lp ℝ 2 μ := + let hm : MemLp (fun x => b (f x)) ∞ μ := + memLp_top_of_bound (hb.continuous.comp_aestronglyMeasurable (Lp.aestronglyMeasurable f)) E + (Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hE (f x)) + lpMultiplier μ (hm.toLp _) g + +theorem boundedScalarProduct_coe (f g : Lp ℝ 2 μ) {b : ℝ → ℝ} {D : ℝ≥0} + (hb : LipschitzWith D b) (E : ℝ≥0) (hE : ∀ a, |b a|≤E) : + boundedScalarProduct μ f g hb E hE =ᵐ[μ] fun x => b (f x)*g x := by + let hm : MemLp (fun x => b (f x)) ∞ μ := + memLp_top_of_bound (hb.continuous.comp_aestronglyMeasurable (Lp.aestronglyMeasurable f)) E + (Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hE (f x)) + change lpMultiplier μ (hm.toLp _) g =ᵐ[μ] _ + filter_upwards [lpMultiplier_coe μ (hm.toLp _) g,hm.coeFn_toLp] with x hx hy + exact hx.trans (by rw [hy]) + +theorem boundedScalarProduct_sub_norm_le (f f' g g' : Lp ℝ 2 μ) + {b : ℝ → ℝ} {D : ℝ≥0} (hb : LipschitzWith D b) (E N : ℝ≥0) + (hE : ∀ a, |b a|≤E) (hN : ∀ᵐ x ∂μ, |g' x|≤N) : + ‖boundedScalarProduct μ f g hb E hE-boundedScalarProduct μ f' g' hb E hE‖ ≤ + E*‖g-g'‖+(N:ℝ)*D*‖f-f'‖ := by + let Q := boundedScalarProduct μ f g hb E hE + let R := boundedScalarProduct μ f g' hb E hE + let S := boundedScalarProduct μ f' g' hb E hE + have hQR : ‖Q-R‖≤(E:ℝ)*‖g-g'‖ := by + apply Lp.norm_le_mul_norm_of_ae_le_mul + filter_upwards [boundedScalarProduct_coe μ f g hb E hE, + boundedScalarProduct_coe μ f g' hb E hE,Lp.coeFn_sub Q R,Lp.coeFn_sub g g'] + with x hq hr hd he + change Q x = _ at hq + change R x = _ at hr + rw [hd,he] + simp only [Pi.sub_apply,hq,hr,←mul_sub,norm_mul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_right (hE _) (abs_nonneg _) + have hRS : ‖R-S‖≤((N:ℝ)*D)*‖f-f'‖ := by + apply Lp.norm_le_mul_norm_of_ae_le_mul + filter_upwards [boundedScalarProduct_coe μ f g' hb E hE, + boundedScalarProduct_coe μ f' g' hb E hE,Lp.coeFn_sub R S,Lp.coeFn_sub f f',hN] + with x hr hs hd he hn + change R x = _ at hr + change S x = _ at hs + rw [hd,he] + simp only [Pi.sub_apply,hr,hs,←sub_mul,norm_mul,Real.norm_eq_abs] + have hbd := hb.dist_le_mul (f x) (f' x) + simp only [Real.dist_eq] at hbd + calc + _ ≤ ((D:ℝ)*|f x-f' x|)*(N:ℝ) := mul_le_mul hbd hn (abs_nonneg _) (by positivity) + _ = _ := by ring + have ht : ‖Q-S‖≤‖Q-R‖+‖R-S‖ := by + calc + _ = ‖(Q-R)+(R-S)‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + exact ht.trans (add_le_add hQR hRS) + +theorem boundedScalarProduct_continuousAt {F G : ℝ → Lp ℝ 2 μ} {t : ℝ} + {b : ℝ → ℝ} {D : ℝ≥0} (hb : LipschitzWith D b) (E N : ℝ≥0) + (hE : ∀ a, |b a|≤E) (hN : ∀ᵐ x ∂μ, |G t x|≤N) + (hF : ContinuousAt F t) (hG : ContinuousAt G t) : + ContinuousAt (fun s => boundedScalarProduct μ (F s) (G s) hb E hE) t := by + apply tendsto_iff_norm_sub_tendsto_zero.mpr + apply squeeze_zero (fun _ => norm_nonneg _) (fun s => + boundedScalarProduct_sub_norm_le μ (F s) (F t) (G s) (G t) hb E N hE hN) + simpa only [sub_self,norm_zero,mul_zero,add_zero] using + ((hG.tendsto.sub_const (G t)).norm.const_mul (E:ℝ)).add + ((hF.tendsto.sub_const (F t)).norm.const_mul ((N:ℝ)*D)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedTransverseFormula.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedTransverseFormula.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7fbef6959cf5041072c5c779d1fd07716baca5d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedTransverseFormula.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Sobolev.BoundedTransverseTest +import OAI.Geometry.RCD.Sobolev.TransverseTestFormula + +namespace OAI + +/-! # The bounded transverse test with its actual, possibly nonorthogonal, Gram entries -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem exists_bounded_transverse_formula (w s η : SobolevSpace μ Q) (Ω : Set X) + (W S : X → ℝ) (A B E : ℝ≥0) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x|≤A) + (hs : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q s x|≤B) + (he : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q η x|≤E) + (hW : SobolevSpace.toLp μ Q w =ᵐ[μ.restrict Ω] W) + (hS : SobolevSpace.toLp μ Q s =ᵐ[μ.restrict Ω] S) + (hη : SobolevSpace.toLp μ Q η =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) + (δ c : ℝ) : + ∃ f : SobolevSpace μ Q, + (SobolevSpace.toLp μ Q f =ᵐ[μ.restrict Ω] + fun x => max (W x+δ) 0*max (c-S x) 0) ∧ + (localGamma μ Q f w =ᵐ[μ.restrict Ω] + fun x => (if -δ W x+δ := by + simp only [map_add,map_smul] + filter_upwards [hW,hη,ae_restrict_of_ae (Lp.coeFn_add (SobolevSpace.toLp μ Q w) + (δ • SobolevSpace.toLp μ Q η)),ae_restrict_of_ae (Lp.coeFn_smul δ (SobolevSpace.toLp μ Q η))] + with x hx hy ha hm + simp only [ha,Pi.add_apply,hm,Pi.smul_apply,smul_eq_mul,hx,hy,mul_one] + have hV : SobolevSpace.toLp μ Q (c • η-s) =ᵐ[μ.restrict Ω] fun x => c-S x := by + simp only [map_sub,map_smul] + filter_upwards [hS,hη,ae_restrict_of_ae (Lp.coeFn_sub (c • SobolevSpace.toLp μ Q η) + (SobolevSpace.toLp μ Q s)),ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ Q η))] + with x hx hy ha hm + simp only [ha,Pi.sub_apply,hm,Pi.smul_apply,smul_eq_mul,hx,hy,mul_one] + filter_upwards [ae_restrict_of_ae (SobolevSpace.product_coe μ Q P T C D hP hT),hU,hV, + ae_restrict_of_ae ((w+δ • η).upperPositivePart_coe μ Q (le_refl (0:ℝ))), + ae_restrict_of_ae ((c • η-s).upperPositivePart_coe μ Q (le_refl (0:ℝ)))] + with x hx hu hv hp ht + rw [hx] + change SobolevSpace.toLp μ Q ((w+δ • η).upperPositivePart μ Q (le_refl (0:ℝ))) x * + SobolevSpace.toLp μ Q ((c • η-s).upperPositivePart μ Q (le_refl (0:ℝ))) x = _ + rw [hp,ht] + simp only [upperLevelPart,hu,hv,sub_zero] + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/BoundedTransversePotentials.lean b/lean/OAI/Geometry/RCD/Harmonic/BoundedTransversePotentials.lean new file mode 100644 index 0000000000000000000000000000000000000000..18e5e2fca3ca033e964bffe0b5df938e6f517dac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/BoundedTransversePotentials.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.TransverseFrameData + +namespace OAI + +/-! # Bounded axial and transverse potentials before imposing any Gram identities -/ + +open Set Filter MeasureTheory Finset +open scoped NNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem bounded_transverse_potentials {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (A : Fin n → ℝ≥0) (hA : ∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (u i) x|≤A i) + (Ω : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (hH : ∀ i, IsSobolevHarmonicOn μ Q Ω (u i)) + (a : Euclidean n) : + ∃ (w s : SobolevSpace μ Q) (B D : ℝ≥0), + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x|≤B) ∧ + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q s x|≤D) ∧ + (SobolevSpace.toLp μ Q w =ᵐ[μ.restrict Ω] fun x => ⟪v x,a⟫_ℝ) ∧ + (SobolevSpace.toLp μ Q s =ᵐ[μ.restrict Ω] fun x => ‖v x‖^2-⟪v x,a⟫_ℝ^2) ∧ + IsSobolevHarmonicOn μ Q Ω w ∧ + w=sobolevColumnMap μ Q u a ∧ + s=(∑ i, SobolevSpace.square μ Q (u i) (A i))-SobolevSpace.square μ Q w B := by + let w := sobolevColumnMap μ Q u a + let B : ℝ≥0 := ∑ i, ‖a i‖₊*A i + have hwglobal : SobolevSpace.toLp μ Q w =ᵐ[μ] + fun x => ∑ i, a i*SobolevSpace.toLp μ Q (u i) x := by + have h := sobolevColumnMap_representative μ Q u univ + (fun x => WithLp.toLp 2 (fun i => SobolevSpace.toLp μ Q (u i) x)) + (fun _ => EventuallyEq.rfl) a + simpa only [Measure.restrict_univ,PiLp.inner_apply,RCLike.inner_apply,conj_trivial] using h + have hwB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q w x|≤B := by + filter_upwards [hwglobal,ae_all_iff.mpr hA] with x hx hb + rw [hx] + calc + _ ≤ ∑ i, |a i*SobolevSpace.toLp μ Q (u i) x| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ i, |a i| * (A i:ℝ) := sum_le_sum (fun i _ => by + rw [abs_mul]; exact mul_le_mul_of_nonneg_left (hb i) (abs_nonneg _)) + _ = B := by simp [B,Real.norm_eq_abs] + let z := ∑ i, SobolevSpace.square μ Q (u i) (A i) + have hz : SobolevSpace.toLp μ Q z =ᵐ[μ] + fun x => ∑ i, (SobolevSpace.toLp μ Q (u i) x)^2 := by + change SobolevSpace.toLpCLM μ Q (∑ i, SobolevSpace.square μ Q (u i) (A i)) =ᵐ[μ] _ + rw [map_sum] + change (∑ i, SobolevSpace.toLp μ Q (SobolevSpace.square μ Q (u i) (A i))) =ᵐ[μ] _ + filter_upwards [Lp.coeFn_finsetSum univ (fun i => SobolevSpace.toLp μ Q + (SobolevSpace.square μ Q (u i) (A i))),ae_all_iff.mpr + (fun i => SobolevSpace.square_coe μ Q (u i) (A i) (hA i))] with x hx hs + rw [hx] + simp only [Finset.sum_apply,hs] + let s := z-SobolevSpace.square μ Q w B + have hs : SobolevSpace.toLp μ Q s =ᵐ[μ] + fun x => (∑ i, (SobolevSpace.toLp μ Q (u i) x)^2)-(SobolevSpace.toLp μ Q w x)^2 := by + filter_upwards [hz,SobolevSpace.square_coe μ Q w B hwB, + Lp.coeFn_sub (SobolevSpace.toLp μ Q z) (SobolevSpace.toLp μ Q (SobolevSpace.square μ Q w B))] + with x hx hy hsub + change (SobolevSpace.toLp μ Q z-SobolevSpace.toLp μ Q (SobolevSpace.square μ Q w B)) x=_ + simp only [hsub,Pi.sub_apply,hx,hy] + let D : ℝ≥0 := (∑ i, A i^2)+B^2 + have hsD : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q s x|≤D := by + filter_upwards [hs,ae_all_iff.mpr hA,hwB] with x hx hb hw + rw [hx] + calc + _ ≤ |∑ i, (SobolevSpace.toLp μ Q (u i) x)^2|+|(SobolevSpace.toLp μ Q w x)^2| := abs_sub _ _ + _ = (∑ i, |SobolevSpace.toLp μ Q (u i) x|^2)+|SobolevSpace.toLp μ Q w x|^2 := by + rw [abs_of_nonneg (sum_nonneg (fun _ _ => sq_nonneg _))] + simp only [abs_pow,sq_abs] + _ ≤ (∑ i, (A i:ℝ)^2)+(B:ℝ)^2 := add_le_add + (sum_le_sum (fun i _ => pow_le_pow_left₀ (abs_nonneg _) (hb i) 2)) + (pow_le_pow_left₀ (abs_nonneg _) hw 2) + _ = D := by simp [D] + have hw := sobolevColumnMap_representative μ Q u Ω v hu a + refine ⟨w,s,B,D,hwB,hsD,hw,?_,IsSobolevHarmonicOn.linearCombination μ Q hH a,rfl,rfl⟩ + · filter_upwards [ae_restrict_of_ae hs,ae_all_iff.mpr hu,hw] with x hx hux hwx + rw [hx,hwx,EuclideanSpace.real_norm_sq_eq] + simp only [hux] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CaccioppoliSourceMass.lean b/lean/OAI/Geometry/RCD/Harmonic/CaccioppoliSourceMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..8151492e86e9ac88b530b3bf6f8ca663de36ae77 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CaccioppoliSourceMass.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Harmonic.UnboundedCaccioppoli +import OAI.Geometry.RCD.Sobolev.WeakLaplacianDomain + +namespace OAI + +/-! # Caccioppoli with local value error and absolute source mass -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem caccioppoli_source_mass (u η : SobolevSpace μ Q) (d : Lp ℝ 2 μ) + (hd : IsWeakLaplacian μ Q u d) {v : X → ℝ} {L B A : ℝ≥0} + (hv : LipschitzWith L v) (hs : HasCompactSupport v) + (hb : ∀ x, |v x|≤B) (hn : ∀ x, 0≤v x) + (hη : SobolevSpace.toLp μ Q η =ᵐ[μ] v) + (hgrad : ∀ᵐ x ∂μ, |SobolevSpace.minimalSlope μ Q η x|≤A) + {D : ℝ} (_hD : 0≤D) + (hvalue : ∀ᵐ x ∂μ, v x≠0 → |SobolevSpace.toLp μ Q u x|≤D) + (hdi : Integrable (fun x => (v x)^2*|d x|) μ) : + (∫ x, (SobolevSpace.toLp μ Q η x)^2*(SobolevSpace.minimalSlope μ Q u x)^2 ∂μ) ≤ + 2*D*(∫ x, (v x)^2*|d x| ∂μ)+ + 4*D^2*(∫ x, (SobolevSpace.minimalSlope μ Q η x)^2 ∂μ) := by + let M := SobolevSpace.cutoffCLM μ Q hv hs hb hn + let U := SobolevSpace.toLp μ Q u + have htest : SobolevSpace.toLp μ Q (M (M u)) =ᵐ[μ] fun x => (v x)^2*U x := by + filter_upwards [SobolevSpace.cutoffCLM_coe μ Q hv hs hb hn (M u), + SobolevSpace.cutoffCLM_coe μ Q hv hs hb hn u] with x hx hy + change SobolevSpace.toLp μ Q (M (M u)) x=v x*SobolevSpace.toLp μ Q (M u) x at hx + rw [hx,hy] + ring + have hsource : Integrable (fun x => d x*((v x)^2*U x)) μ := + ((Lp.memLp d).integrable_mul (Lp.memLp (SobolevSpace.toLp μ Q (M (M u))))).congr + (htest.mono fun x hx => congrArg (fun a => d x*a) hx) + have hinner : inner ℝ d (SobolevSpace.toLp μ Q (M (M u))) = + ∫ x, d x*((v x)^2*U x) ∂μ := by + rw [L2.inner_def] + apply integral_congr_ae + filter_upwards [htest] with x hx + simp only [Real.inner_apply,hx] + have hE : energyForm μ Q u (M (M u))≤D*(∫ x, (v x)^2*|d x| ∂μ) := by + have he := hd (M (M u)) + rw [hinner] at he + have hi : (∫ x, -(d x*((v x)^2*U x)) ∂μ)≤ + ∫ x, D*((v x)^2*|d x|) ∂μ := by + apply integral_mono_ae hsource.neg (hdi.const_mul D) + filter_upwards [hvalue] with x hx + change -(d x*((v x)^2*U x))≤D*((v x)^2*|d x|) + by_cases hz : v x=0 + · simp only [hz,zero_pow (by decide : (2:ℕ)≠0),zero_mul,mul_zero,neg_zero] + exact le_rfl + · have hu := hx hz + calc + _ ≤ |d x*((v x)^2*U x)| := neg_le_abs _ + _ = ((v x)^2*|d x|)*|U x| := by rw [abs_mul,abs_mul,abs_of_nonneg (sq_nonneg (v x))]; ring + _ ≤ ((v x)^2*|d x|)*D := mul_le_mul_of_nonneg_left hu (by positivity) + _ = _ := by ring + rw [integral_neg,integral_const_mul] at hi + linarith only [he,hi] + have htail : (∫ x, (U x)^2*(SobolevSpace.minimalSlope μ Q η x)^2 ∂μ) ≤ + D^2*(∫ x, (SobolevSpace.minimalSlope μ Q η x)^2 ∂μ) := by + have hu2 : Integrable (fun x => (U x)^2*(SobolevSpace.minimalSlope μ Q η x)^2) μ := + (bounded_square_weight_integrable μ (SobolevSpace.minimalSlope μ Q η) U hgrad).congr + (Eventually.of_forall fun x => mul_comm _ _) + have hg2 := (Lp.memLp (SobolevSpace.minimalSlope μ Q η)).integrable_sq + rw [← integral_const_mul] + apply integral_mono_ae hu2 (hg2.const_mul (D^2)) + filter_upwards [hvalue,hη,SobolevSpace.minimalSlope_zero_on_level μ Q η 0] with x hx he hz + by_cases hvx : v x=0 + · rw [hz (he.trans hvx)] + simp only [zero_pow (by decide : (2:ℕ)≠0),mul_zero,le_refl] + · exact mul_le_mul_of_nonneg_right + (by simpa only [sq_abs] using pow_le_pow_left₀ (abs_nonneg _) (hx hvx) 2) (sq_nonneg _) + have hc := caccioppoli_cutoffCLM_energy μ Q u η hv hs hb hn hη hgrad + change _ ≤ 2*energyForm μ Q u (M (M u))+4*(∫ x, (U x)^2*_ + ∂μ) at hc + nlinarith only [hc,hE,htail] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineCenter.lean b/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineCenter.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fa83bb19014a4c49a9bb55b00dfe5db1767324d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineCenter.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Harmonic.CanonicalRadialSize +import OAI.Geometry.RCD.Harmonic.AffineCenterBounds + +namespace OAI + +/-! # Center values of the actual least-squares radial fits -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published harmonic mean-value input bounds the center value of +every actual radial fit by radius times the current covector norm. +The same evaluation constant works for all source scales and centers. -/ +theorem canonical_radial_affine_center_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) {κ₀ : ℝ} (hκ₀ : 0 ≤ κ₀) : + ∃ M : ℝ, 1 ≤ M ∧ ∀ {κ r0 B J C ε : ℝ} {p : X} + (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (i : ℕ) (r : ℝ), 0 < r → r ≤ 4 * distanceSourceRadius r0 i → -κ₀ ≤ K * r ^ 2 → 0 ≤ ε → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) (u j)) → + ContinuousOn v (ball p r) → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v x j) → + ∀ F : Euclidean n ≃L[ℝ] Euclidean n, + (∀ j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic + (transformedColumn (hausdorff n X) hX.quadratic u F j) + (transformedColumn (hausdorff n X) hX.quadratic u F j) x ≤ (1 + ε) ^ 2) → + ∀ (b : Euclidean n) {H : ℝ} + (ha : ∀ᵐ x ∂(hausdorff n X).restrict (ball p r), + localGamma (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) x ≤ H), + let μ := hausdorff n X + let hfin := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let f := radialPairingLp μ hX.quadratic (ball p r) (T.distanceDatum μ hX.quadratic i) + (sobolevColumnMap μ hX.quadratic u b) ha + ∃ c : ℝ, ∃ a : Euclidean n, + affineProjection μ hX.quadratic u (ball p r) hfin f = + affineCoordinateMap μ hX.quadratic u (ball p r) hfin (c, a) ∧ + |c + ⟪v p, a⟫_ℝ| ≤ M * r * ((n : ℝ) * (1 + ε)) * ‖F.symm b‖ := by + obtain ⟨M, hM, heval⟩ := affine_evaluation_of_mean_value hX hmean hn hκ₀ + refine ⟨M, hM, ?_⟩ + intro κ r0 B J C ε p S T i r hr hrr hcurv hε u v hu hv hrep F hgrad b H ha + dsimp only + let μ := hausdorff n X + let hfin := ne_of_lt (hX.finiteOnBounded (ball p r) isBounded_ball) + let f := radialPairingLp μ hX.quadratic (ball p r) (T.distanceDatum μ hX.quadratic i) + (sobolevColumnMap μ hX.quadratic u b) ha + have hη : SobolevSpace.toLp μ hX.quadratic (T.cutoff i).sobolev =ᵐ[μ.restrict (ball p r)] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff i).representative, + ae_restrict_mem measurableSet_ball] with x hx hxr + exact hx.trans ((T.cutoff i).one x ((ball_subset_ball hrr) hxr)) + obtain ⟨c, a, hfit⟩ := affineProjection_has_coefficients μ hX.quadratic u (ball p r) hfin f + refine ⟨c, a, hfit, ?_⟩ + have hb := affineFit_center_bound μ hX.quadratic u (ball p r) hfin (v p) + (zero_le_one.trans hM) (heval p r hr hcurv u v hu hv hrep (T.cutoff i).sobolev hη) f c a hfit + have hs := T.radialPairing_size μ hX.quadratic i hr.le hrr hfin + (ne_of_gt (hX.fullSupport p r hr)) hε u F hgrad b ha + exact hb.trans ((mul_le_mul_of_nonneg_left hs (zero_le_one.trans hM)).trans_eq (by ring)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineDifference.lean b/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..08d2dba22fc78bc60bb5ef2a83e30201b6c890c0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CanonicalAffineDifference.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRadialTargets +import OAI.Geometry.RCD.Coordinates.AffineFitDifference + +namespace OAI + +/-! # Center differences of the actual dyadic radial fits -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Both fits concern the same local radial derivative. The change of +outer distance cutoff introduces no extra term in their center difference. -/ +theorem canonical_affine_center_difference {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) {κ₀ : ℝ} (hκ₀ : 0 ≤ κ₀) : + ∃ M : ℝ, 1 ≤ M ∧ ∀ {κ r0 B J C L : ℝ} {p : X} + (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0) + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (v : X → Euclidean n) (i j : ℕ), i ≤ j → + -κ₀ ≤ K * (distanceSourceRadius r0 j / 64) ^ 2 → + (∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball p (distanceSourceRadius r0 j / 64)) (u k)) → + ContinuousOn v (ball p (distanceSourceRadius r0 j / 64)) → + (∀ k, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) =ᵐ[ + (hausdorff n X).restrict (ball p (distanceSourceRadius r0 j / 64))] fun x => v x k) → + ∀ (b ai aj : Euclidean n) (ci cj : ℝ), + let μ := hausdorff n X + let ri := distanceSourceRadius r0 i / 64 + let rj := distanceSourceRadius r0 j / 64 + let hi := ne_of_lt (hX.finiteOnBounded (ball p ri) isBounded_ball) + let hj := ne_of_lt (hX.finiteOnBounded (ball p rj) isBounded_ball) + affineProjection μ hX.quadratic u (ball p ri) hi (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap μ hX.quadratic u (ball p ri) hi (ci, ai) → + affineProjection μ hX.quadratic u (ball p rj) hj (dyadicRadialTarget hX T u hbase j b) = + affineCoordinateMap μ hX.quadratic u (ball p rj) hj (cj, aj) → + |(ci + ⟪v p, ai⟫_ℝ) - (cj + ⟪v p, aj⟫_ℝ)| ≤ + M * (Real.sqrt (μ.real (ball p ri)) / Real.sqrt (μ.real (ball p rj))) * + (ri * dyadicRadialFit hX T u L hbase i b) + + M * (rj * dyadicRadialFit hX T u L hbase j b) := by + obtain ⟨M, hM, hdiff⟩ := affineFit_center_difference hX hmean hn hκ₀ + refine ⟨M, hM, ?_⟩ + intro κ r0 B J C L p S T u hbase v i j hij hcurv hu hv hrep b ai aj ci cj + dsimp only + intro hfi hfj + let μ := hausdorff n X + let ri := distanceSourceRadius r0 i / 64 + let rj := distanceSourceRadius r0 j / 64 + have hri : 0 < ri := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hrj : 0 < rj := div_pos (distanceSourceRadius_pos S.radius_pos j) (by norm_num) + have hrji : rj ≤ ri := div_le_div_of_nonneg_right + (distanceSourceRadius_antitone S.radius_pos.le hij) (by norm_num) + have hη : SobolevSpace.toLp μ hX.quadratic (T.cutoff j).sobolev =ᵐ[μ.restrict (ball p rj)] + fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff j).representative, + ae_restrict_mem measurableSet_ball] with x hx hxr + exact hx.trans ((T.cutoff j).one x ((ball_subset_ball + (show rj ≤ 4 * distanceSourceRadius r0 j by dsimp only [rj] at hrj ⊢; linarith)) hxr)) + have htarget := dyadicRadialTarget_restrict hX T u hbase hij b + dsimp only at htarget + have hfj' : affineProjection μ hX.quadratic u (ball p rj) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (localL2Restriction μ (ball p ri) (ball p rj) (ball_subset_ball hrji) + (dyadicRadialTarget hX T u hbase i b)) = + affineCoordinateMap μ hX.quadratic u (ball p rj) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (cj, aj) := by + rw [htarget] + exact hfj + have hb := hdiff p rj ri hrj hrji hcurv u v hu hv hrep (T.cutoff j).sobolev hη + (dyadicRadialTarget hX T u hbase i b) ci cj ai aj hfi hfj' + rw [htarget] at hb + have hnorm (k : ℕ) : + ‖normalizeLocalL2 μ (ball p (distanceSourceRadius r0 k / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual μ hX.quadratic u (ball p (distanceSourceRadius r0 k / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase k b))‖ = + (distanceSourceRadius r0 k / 64) * dyadicRadialFit hX T u L hbase k b := by + unfold dyadicRadialFit radialFitError dyadicRadialTarget + change _ = (distanceSourceRadius r0 k / 64) * (_ / (distanceSourceRadius r0 k / 64)) + field_simp [(distanceSourceRadius_pos S.radius_pos k).ne'] + rfl + rw [hnorm i, hnorm j] at hb + exact hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CanonicalDyadicCenters.lean b/lean/OAI/Geometry/RCD/Harmonic/CanonicalDyadicCenters.lean new file mode 100644 index 0000000000000000000000000000000000000000..aab17b91bfaa0a42a33915f82185c6997c4a2d23 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CanonicalDyadicCenters.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Harmonic.CanonicalAffineCenter +import OAI.Geometry.RCD.Harmonic.CanonicalAffineDifference +import OAI.Geometry.RCD.Coordinates.DyadicCenterDecay + +namespace OAI + +/-! # The actual affine center sequence of each radial covector -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Choose coefficients of the genuine orthogonal projections. Their +center values tend to zero, and consecutive differences are controlled +by the genuine radial-fit errors. No uniqueness of coefficients is needed. -/ +theorem canonical_dyadic_affine_centers {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hmean : LocalHarmonicL2MeanValueInput hX) {a κ₀ κ r0 B J C L δ ε : ℝ} {p : X} + (hκ₀ : 0 ≤ κ₀) (ha : 0 ≤ a) (hδ : 0 ≤ δ) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) + (hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u v) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (hscale : a * (3 * r0) ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (w : ℕ → X → Euclidean (m + 2)) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (w i)) + (hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) : + ∃ M : ℝ, 1 ≤ M ∧ ∀ b : Euclidean (m + 2), + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪v p, A i⟫_ℝ| ≤ M * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖) ∧ + Tendsto (fun i => c i + ⟪v p, A i⟫_ℝ) atTop (𝓝 0) ∧ + (∀ i, |(c i + ⟪v p, A i⟫_ℝ) - (c (i + 1) + ⟪v p, A (i + 1)⟫_ℝ)| ≤ + M * (Real.sqrt ((hausdorff (m + 2) X).real (ball p (distanceSourceRadius r0 i / 64))) / + Real.sqrt ((hausdorff (m + 2) X).real (ball p (distanceSourceRadius r0 (i + 1) / 64)))) * + ((distanceSourceRadius r0 i / 64) * dyadicRadialFit hX T u L hbase i b) + + M * ((distanceSourceRadius r0 (i + 1) / 64) * dyadicRadialFit hX T u L hbase (i + 1) b)) := by + classical + let μ := hausdorff (m + 2) X + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hsub (i : ℕ) : ball p (r i) ⊆ ball p r0 := by + apply ball_subset_ball + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + dsimp only [r] + linarith [distanceSourceRadius_pos S.radius_pos i] + have hv (i : ℕ) := hu.continuous.mono (hsub i) + have hur (i : ℕ) (j : Fin (m + 2)) := (hu.harmonic j).mono μ hX.quadratic (hsub i) + have hrep (i : ℕ) (j : Fin (m + 2)) := + ae_restrict_of_ae_restrict_of_subset (hsub i) (hu.representative j) + obtain ⟨M₀, hM₀, heval⟩ := canonical_radial_affine_center_bound hX hmean (by omega) hκ₀ + obtain ⟨M₁, hM₁, hdiff⟩ := canonical_affine_center_difference hX hmean (by omega) hκ₀ + let M := max (M₀ * ((m + 2 : ℕ) : ℝ) * (1 + δ)) M₁ + have hM : 1 ≤ M := hM₁.trans (le_max_right _ _) + have hM0 : M₀ * ((m + 2 : ℕ) : ℝ) * (1 + δ) ≤ M := le_max_left _ _ + have hM1 : M₁ ≤ M := le_max_right _ _ + refine ⟨M, hM, ?_⟩ + intro b + have hchoose (i : ℕ) : ∃ c : ℝ, ∃ A : Euclidean (m + 2), + affineProjection μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, A) ∧ + |c + ⟪v p, A⟫_ℝ| ≤ M * r i * ‖(F i).symm b‖ := by + have hri : r i ≤ 4 * distanceSourceRadius r0 i := by dsimp only [r] at hr ⊢; linarith [hr i] + have hgrad (j : Fin (m + 2)) := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (show r i ≤ 2 * distanceSourceRadius r0 i by + dsimp only [r] at hr ⊢; linarith [hr i])) ((hfirst i).gradient j) + obtain ⟨c, A, hf, hb⟩ := heval S T i (r i) (hr i) hri (hcurv i) hδ + u v (hur i) (hv i) (hrep i) (F i) hgrad b + (gamma_column_le_of_diagonal_bounds μ hX.quadratic u _ L (hbase i) b) + refine ⟨c, A, hf, hb.trans ?_⟩ + have hh := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hM0 (hr i).le) (norm_nonneg ((F i).symm b)) + convert hh using 1 + ring + choose c A hfit hsize using hchoose + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hgrowth := dyadic_covector_norm_reverse_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨w i, by simpa only [hrad] using hfirst i⟩) + refine ⟨c, A, hfit, hsize, ?_, ?_⟩ + · apply dyadic_affine_center_tendsto_zero S.radius_pos.le (zero_le_one.trans hM) F b + (fun i => by simpa only [zero_add] using hgrowth 0 i b) _ hsize + · intro i + have hh := hdiff S T u hbase v i (i + 1) (by omega) (hcurv (i + 1)) + (hur (i + 1)) (hv (i + 1)) (hrep (i + 1)) b (A i) (A (i + 1)) (c i) (c (i + 1)) + (hfit i) (hfit (i + 1)) + apply hh.trans + exact add_le_add + (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hM1 (by positivity)) + (mul_nonneg (hr i).le (dyadicRadialFit_nonneg hX T u L hbase i b))) + (mul_le_mul_of_nonneg_right hM1 + (mul_nonneg (hr (i + 1)).le (dyadicRadialFit_nonneg hX T u L hbase (i + 1) b))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CanonicalRadialSize.lean b/lean/OAI/Geometry/RCD/Harmonic/CanonicalRadialSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a599783c872f41b3b72348f4bdd4ec508364c1d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CanonicalRadialSize.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRadialFits +import OAI.Geometry.RCD.Harmonic.RadialPairingSize + +namespace OAI + +/-! # The actual distance derivative has radius times covector size -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +theorem DyadicDistanceReplacements.distanceDatum_energy_bound + {n : ℕ} {κ r0 B J C : ℝ} {p : X} {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) {r : ℝ} + (hr : 0 ≤ r) (hrr : r ≤ 4 * distanceSourceRadius r0 i) : + ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (T.distanceDatum μ hQ i) (T.distanceDatum μ hQ i) x ≤ r ^ 2 := by + let s := distanceSourceRadius r0 i + have hs : 0 ≤ 4 * s := by have := distanceSourceRadius_pos S.radius_pos i; positivity + have hsub : ball p r ⊆ ball p (4 * s) := ball_subset_ball hrr + have he := positiveSquaredDistance_energy_value μ hQ hs (T.cutoff i) (S.eikonal i) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub he, + ae_restrict_of_ae (positiveSquaredDistance_representative μ hQ hs (T.cutoff i)), + ae_restrict_mem measurableSet_ball] with x he hx hxr + have hv := positiveSquaredDistanceValue_on_ball μ hQ (T.cutoff i) (hsub hxr) + have hd : dist p x ≤ r := by + have hx' : dist x p < r := hxr + simpa only [dist_comm] using hx'.le + have hsq : dist p x ^ 2 ≤ r ^ 2 := (sq_le_sq₀ dist_nonneg hr).mpr hd + change (1 / 2 : ℝ) * localGamma μ hQ (T.distanceDatum μ hQ i) + (T.distanceDatum μ hQ i) x = SobolevSpace.toLp μ hQ (T.distanceDatum μ hQ i) x at he + have hv' : SobolevSpace.toLp μ hQ (T.distanceDatum μ hQ i) x = dist p x ^ 2 / 2 := hx.trans hv + rw [hv'] at he + linarith + +/-- The raw radial target of every original covector is bounded in the +current normalizing frame. This supplies the vanishing affine-center bound. -/ +theorem DyadicDistanceReplacements.radialPairing_size + {n : ℕ} {κ r0 B J C ε : ℝ} {p : X} {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) {r : ℝ} + (hr : 0 ≤ r) (hrr : r ≤ 4 * distanceSourceRadius r0 i) + (hfin : μ (ball p r) ≠ ∞) (hzero : μ (ball p r) ≠ 0) (hε : 0 ≤ ε) + (u : Fin n → SobolevSpace μ hQ) (F : Euclidean n ≃L[ℝ] Euclidean n) + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (transformedColumn μ hQ u F j) (transformedColumn μ hQ u F j) x ≤ (1 + ε) ^ 2) + (b : Euclidean n) {H : ℝ} + (ha : ∀ᵐ x ∂μ.restrict (ball p r), + localGamma μ hQ (sobolevColumnMap μ hQ u b) (sobolevColumnMap μ hQ u b) x ≤ H) : + ‖normalizeLocalL2 μ (ball p r) hfin + (radialPairingLp μ hQ (ball p r) (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) ha)‖ ≤ + r * ((n : ℝ) * (1 + ε)) * ‖F.symm b‖ := by + have hbound := gamma_column_le_of_diagonal_bounds μ hQ (transformedColumn μ hQ u F) + (ball p r) (1 + ε) hgrad (F.symm b) + rw [sobolevColumnMap_transformed] at hbound + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.apply_symm_apply] at hbound + have he := radialPairingLp_congr μ hQ (ball p r) (T.distanceDatum μ hQ i) + (sobolevColumnMap μ hQ u b) (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) + ha hbound (Filter.Eventually.of_forall fun _ => rfl) + rw [he] + have hsize := normalized_gamma_size μ hQ (ball p r) hfin hzero + (T.distanceDatum μ hQ i) (sobolevColumnMap μ hQ u b) (sq_nonneg r) (by positivity) + (T.distanceDatum_energy_bound μ hQ i hr hrr) hbound + apply hsize.trans_eq + rw [show r ^ 2 * (((n : ℝ) * (1 + ε)) ^ 2 * ‖F.symm b‖ ^ 2) = + (r * ((n : ℝ) * (1 + ε)) * ‖F.symm b‖) ^ 2 by ring, + Real.sqrt_sq (by positivity)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CappedPairingL2.lean b/lean/OAI/Geometry/RCD/Harmonic/CappedPairingL2.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8ad8fd3e277e2c2125563fcd293e98998623c9c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CappedPairingL2.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Heat.CappedIntegralProduct + +namespace OAI + +/-! # L² control from pairings with capped nonnegative functions -/ + +open Set Filter MeasureTheory +open scoped NNReal ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +/-- Testing only the capped function itself suffices for the L² conclusion. -/ +theorem integral_sq_le_of_capped_pairing {f : X → ℝ} + (hf : Measurable f) (hi : Integrable f μ) (hfn : ∀ x, 0 ≤ f x) + {A : ℝ} (hA : 0 ≤ A) + (hpair : ∀ C : ℝ≥0, (∫ x, f x * min (f x) C ∂μ) ≤ + A * Real.sqrt (∫ x, (min (f x) C)^2 ∂μ)) : + Integrable (fun x => (f x)^2) μ ∧ (∫ x, (f x)^2 ∂μ) ≤ A^2 := by + have hcap (C : ℝ≥0) : Integrable (fun x => (min (f x) C)^2) μ := by + simpa only [pow_two] using integrable_capped_product μ hi hi hfn hfn C + have hfcap (C : ℝ≥0) : Integrable (fun x => f x * min (f x) C) μ := + hi.mul_bdd ((hf.min measurable_const).aestronglyMeasurable) + (Eventually.of_forall fun x => by + rw [Real.norm_eq_abs,abs_of_nonneg (le_min (hfn x) C.coe_nonneg)] + exact min_le_right _ _) + have hb (C : ℝ≥0) : (∫ x, (min (f x) C)^2 ∂μ) ≤ A^2 := by + have hn : 0 ≤ ∫ x, (min (f x) C)^2 ∂μ := integral_nonneg fun x => sq_nonneg _ + have hs := Real.sq_sqrt hn + have hle : (∫ x, (min (f x) C)^2 ∂μ) ≤ ∫ x, f x * min (f x) C ∂μ := by + apply integral_mono (hcap C) (hfcap C) + intro x + simpa only [pow_two] using mul_le_mul_of_nonneg_right (min_le_left (f x) (C:ℝ)) + (le_min (hfn x) C.coe_nonneg) + have hh := hle.trans (hpair C) + have hroot : Real.sqrt (∫ x, (min (f x) C)^2 ∂μ) ≤ A := by + nlinarith [Real.sqrt_nonneg (∫ x, (min (f x) C)^2 ∂μ)] + nlinarith + let F (i : ℕ) (x : X) := ENNReal.ofReal ((min (f x) (i:ℝ))^2) + have hm (i : ℕ) : Measurable (F i) := ((hf.min measurable_const).pow_const 2).ennreal_ofReal + have hmono : Monotone F := by + intro i j hij x + apply ENNReal.ofReal_le_ofReal + exact (sq_le_sq₀ (le_min (hfn x) (by positivity)) (le_min (hfn x) (by positivity))).mpr + (min_le_min_left _ (by exact_mod_cast hij)) + have he (x : X) : (⨆ i, F i x) = ENNReal.ofReal ((f x)^2) := by + apply le_antisymm + · apply iSup_le + intro i + apply ENNReal.ofReal_le_ofReal + exact (sq_le_sq₀ (le_min (hfn x) (by positivity)) (hfn x)).mpr (min_le_left _ _) + · obtain ⟨i,hi⟩ := exists_nat_ge (f x) + apply le_iSup_of_le i + dsimp only [F] + rw [min_eq_left hi] + have hlin : (∫⁻ x, ENNReal.ofReal ((f x)^2) ∂μ) ≤ ENNReal.ofReal (A^2) := by + have hefun : (fun x => ENNReal.ofReal ((f x)^2)) = (fun x => ⨆ i, F i x) := + funext fun x => (he x).symm + rw [hefun] + rw [lintegral_iSup hm hmono] + apply iSup_le + intro i + have heq := ofReal_integral_eq_lintegral_ofReal (hcap (i:ℝ≥0)) + (Eventually.of_forall fun x => sq_nonneg (min (f x) (i:ℝ))) + simp only [NNReal.coe_natCast] at heq + change (∫⁻ x, ENNReal.ofReal ((min (f x) (i:ℝ))^2) ∂μ) ≤ _ + rw [← heq] + exact ENNReal.ofReal_le_ofReal (hb i) + have hsq : Integrable (fun x => (f x)^2) μ := + ⟨(hf.pow_const 2).aestronglyMeasurable, + (hasFiniteIntegral_iff_ofReal (Eventually.of_forall fun x => sq_nonneg (f x))).mpr + (hlin.trans_lt ENNReal.ofReal_lt_top)⟩ + refine ⟨hsq,?_⟩ + have heq := ofReal_integral_eq_lintegral_ofReal hsq + (Eventually.of_forall fun x => sq_nonneg (f x)) + rw [← heq] at hlin + exact (ENNReal.ofReal_le_ofReal_iff (sq_nonneg A)).mp hlin + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredAffineDifference.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredAffineDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..89a647afe0519fe305d0f5940c05967e70be1179 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredAffineDifference.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.RCD.Sobolev.CenteredAffineSobolev +import OAI.Geometry.RCD.Sobolev.AffineCoefficientEnergy + +namespace OAI + +/-! # Recovering affine coefficient errors from two actual fits -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem centeredAffineSobolev_difference_constant {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) + (η ζ : SobolevSpace μ hQ) (v a b : Euclidean n) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) + (hζ : SobolevSpace.toLp μ hQ ζ =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) : + SobolevSpace.toLp μ hQ + ((centeredAffineSobolev μ hQ u η v a - centeredAffineSobolev μ hQ u ζ v b) - + sobolevColumnMap μ hQ u (a - b)) =ᵐ[μ.restrict s] fun _ => -⟪v, a - b⟫_ℝ := by + have hid : (centeredAffineSobolev μ hQ u η v a - centeredAffineSobolev μ hQ u ζ v b) - + sobolevColumnMap μ hQ u (a - b) = (-⟪v, a⟫_ℝ) • η - (-⟪v, b⟫_ℝ) • ζ := by + rw [centeredAffineSobolev, centeredAffineSobolev, map_sub] + abel + rw [hid] + change SobolevSpace.toLpCLM μ hQ ((-⟪v, a⟫_ℝ) • η - (-⟪v, b⟫_ℝ) • ζ) =ᵐ[μ.restrict s] _ + rw [map_sub, map_smul, map_smul] + filter_upwards [hη, hζ, ae_restrict_of_ae (Lp.coeFn_sub + ((-⟪v, a⟫_ℝ) • SobolevSpace.toLp μ hQ η) ((-⟪v, b⟫_ℝ) • SobolevSpace.toLp μ hQ ζ)), + ae_restrict_of_ae (Lp.coeFn_smul (-⟪v, a⟫_ℝ) (SobolevSpace.toLp μ hQ η)), + ae_restrict_of_ae (Lp.coeFn_smul (-⟪v, b⟫_ℝ) (SobolevSpace.toLp μ hQ ζ))] + with x hx hy hs ha hb + change ((-⟪v, a⟫_ℝ) • SobolevSpace.toLp μ hQ η - + (-⟪v, b⟫_ℝ) • SobolevSpace.toLp μ hQ ζ) x = -⟪v, a - b⟫_ℝ + rw [hs] + simp only [Pi.sub_apply, ha, hb, Pi.smul_apply, smul_eq_mul, hx, hy, mul_one, + inner_sub_right] + ring + +/-- Two approximations to the same local target control their difference. +The two compact constant representatives may be different. -/ +theorem normalized_two_fit_difference {s : Set X} (hfin : μ s ≠ ∞) + (t : Lp ℝ 2 (μ.restrict s)) (f g : SobolevSpace μ hQ) {A B : ℝ} + (hf : ‖normalizeLocalL2 μ s hfin (t - SobolevSpace.restrictLp μ hQ s f)‖ ^ 2 ≤ A) + (hg : ‖normalizeLocalL2 μ s hfin (t - SobolevSpace.restrictLp μ hQ s g)‖ ^ 2 ≤ B) : + ‖normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (f - g))‖ ^ 2 ≤ + 2 * A + 2 * B := by + let x := normalizeLocalL2 μ s hfin (t - SobolevSpace.restrictLp μ hQ s g) + let y := normalizeLocalL2 μ s hfin (t - SobolevSpace.restrictLp μ hQ s f) + have heq : normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (f - g)) = x - y := by + dsimp only [x, y, normalizeLocalL2] + rw [map_sub, ← smul_sub] + congr 1 + abel + rw [heq] + have hh := norm_sub_le x y + have hh2 := (sq_le_sq₀ (norm_nonneg (x - y)) + (add_nonneg (norm_nonneg x) (norm_nonneg y))).mpr hh + change ‖y‖ ^ 2 ≤ A at hf + change ‖x‖ ^ 2 ≤ B at hg + nlinarith only [hf, hg, hh2, sq_nonneg (‖x‖ - ‖y‖)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredBoundedGram.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredBoundedGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..372b34887bdc555ac0765d0ab5d75034ef3797fb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredBoundedGram.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.CenteredBoundedFrame + +namespace OAI + +/-! # Bounded centering preserves the full original Gram matrix -/ + +open Set Filter MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem centered_bounded_gram {n : ℕ} (u : Fin n → SobolevSpace μ Q) + (v : X → Euclidean n) (c : Euclidean n) (Ω : Set X) (hΩ : MeasurableSet Ω) + (hu : ∀ i, SobolevSpace.toLp μ Q (u i) =ᵐ[μ.restrict Ω] fun x => v x i) + (hH : ∀ i, IsSobolevHarmonicOn μ Q Ω (u i)) + (η : SobolevSpace μ Q) + (hη : SobolevSpace.toLp μ Q η =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) + (C : ℝ≥0) (hC : ∀ x∈Ω, ∀ i, |v x i-c i|≤C) : + ∃ U : Fin n → SobolevSpace μ Q, + (∀ i, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q (U i) x|≤C) ∧ + (∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ.restrict Ω] fun x => (v x-c) i) ∧ + (∀ i, IsSobolevHarmonicOn μ Q Ω (U i)) ∧ + (∀ i j, localGamma μ Q (U i) (U j) =ᵐ[μ.restrict Ω] + localGamma μ Q (u i) (u j)) := by + let f i := u i-c i • η + have hf (i : Fin n) : SobolevSpace.toLp μ Q (f i) =ᵐ[μ.restrict Ω] + fun x => v x i-c i := by + change SobolevSpace.toLpCLM μ Q (u i-c i • η) =ᵐ[μ.restrict Ω] _ + rw [map_sub,map_smul] + filter_upwards [hu i,hη,ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ Q (u i)) + (c i • SobolevSpace.toLp μ Q η)),ae_restrict_of_ae (Lp.coeFn_smul (c i) (SobolevSpace.toLp μ Q η))] + with x hx hηx hsub hsm + change (SobolevSpace.toLp μ Q (u i)-c i • SobolevSpace.toLp μ Q η) x=_ + simp only [hsub,Pi.sub_apply,hsm,Pi.smul_apply,smul_eq_mul,hx,hηx,mul_one] + have hfbound (i : Fin n) : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ Q (f i) x|≤C := by + filter_upwards [hf i,ae_restrict_mem hΩ] with x hx hxm + rw [hx] + exact hC x hxm i + let U i := boundedLocalVersion μ Q (f i) C + have hUf (i : Fin n) := boundedLocalVersion_eq μ Q (f i) C (hfbound i) + have hconst := isSobolevHarmonicOn_of_local_constant μ Q Ω hΩ η 1 hη + have hfh (i : Fin n) : IsSobolevHarmonicOn μ Q Ω (f i) := by + simpa only [f,sub_eq_add_neg,neg_smul] using (hH i).add μ Q (hconst.smul μ Q (-c i)) + have hd (i : Fin n) : (fun x => SobolevSpace.toLp μ Q (f i) x-SobolevSpace.toLp μ Q (u i) x) + =ᵐ[μ.restrict Ω] fun _ => -c i := by + filter_upwards [hf i,hu i] with x hx hy + simp only [hx,hy] + ring + refine ⟨U,fun i => boundedLocalVersion_bound μ Q (f i) C,?_,?_,?_⟩ + · intro i + exact (hUf i).trans (hf i) + · intro i + exact (hfh i).congr_ae μ Q hΩ (hUf i) + · intro i j + exact (localGamma_pair_congr_ae μ Q (hUf i) (hUf j)).trans + (localGamma_pair_constant_shift μ Q (u i) (f i) (u j) (f j) (-c i) (-c j) + (hd i) (hd j)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredColumns.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..3604dc3c9ab946ba41573e8c10ab548d82ff6187 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredColumns.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Harmonic.AffineChange +import OAI.Geometry.RCD.Harmonic.TransformedColumns + +namespace OAI + +/-! # Actual Sobolev columns after a linear change and local recentering -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A continuous linear Sobolev family is recovered from its finite +standard coordinate columns. -/ +theorem sobolevColumnMap_of_linear {n : ℕ} + (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) : + sobolevColumnMap μ hQ (fun i => U (EuclideanSpace.single i 1)) = U := by + classical + ext v + rw [sobolevColumnMap_apply] + have he : (∑ i : Fin n, v i • EuclideanSpace.single i 1) = v := by + ext j + simp [Pi.single_apply] + simpa only [map_sum, map_smul] using congrArg U he + +/-- The local constant is supplied by a genuine compact Sobolev cutoff. -/ +def affineChangedColumn {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (B : Euclidean n →L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (η : SobolevSpace μ hQ) : Fin n → SobolevSpace μ hQ := + fun i => sobolevColumnMap μ hQ u (B (EuclideanSpace.single i 1)) + + b (EuclideanSpace.single i 1) • η + +theorem sobolevColumnMap_affineChanged {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (B : Euclidean n →L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (η : SobolevSpace μ hQ) : + sobolevColumnMap μ hQ (affineChangedColumn μ hQ u B b η) = + (sobolevColumnMap μ hQ u).comp B + b.smulRight η := by + exact sobolevColumnMap_of_linear μ hQ ((sobolevColumnMap μ hQ u).comp B + b.smulRight η) + +/-- Recentring and normalizing the actual Sobolev columns preserves their +least-squares residual on every set where the cutoff equals one. -/ +theorem affineChangedColumn_residual_eq {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (B : Euclidean n ≃L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (η : SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (hη : SobolevSpace.restrictLp μ hQ s η = restrictedOne μ s hfin) : + affineResidual μ hQ (affineChangedColumn μ hQ u B b η) s hfin = + affineResidual μ hQ u s hfin := by + apply affineResidual_eq_of_change μ hQ u _ s hfin B b + intro v + rw [sobolevColumnMap_affineChanged] + simp only [add_apply, ContinuousLinearMap.comp_apply, + ContinuousLinearMap.smulRight_apply, ContinuousLinearEquiv.coe_coe, map_add, map_smul, hη] + +/-- A local pointwise representative equal to one identifies the +restriction with the constant generator of the affine space. -/ +theorem restrictLp_eq_one_of_representative (η : SobolevSpace μ hQ) + (s : Set X) (hfin : μ s ≠ ∞) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) : + SobolevSpace.restrictLp μ hQ s η = restrictedOne μ s hfin := by + apply Lp.ext + have hone : restrictedOne μ s hfin =ᵐ[μ.restrict s] fun _ => (1 : ℝ) := by + simpa only [restrictedOne, indicator_univ] using + (indicatorConstLp_coeFn (p := (2 : ℝ≥0∞)) (μ := μ.restrict s) + (hs := MeasurableSet.univ) (hμs := by simpa only [Measure.restrict_apply_univ] using hfin) + (c := (1 : ℝ))) + exact (SobolevSpace.restrictLp_coe μ hQ s η).trans (hη.trans hone.symm) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredCompactDirection.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredCompactDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bd92c4f492013a47badca2758070aaf50d6985d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredCompactDirection.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Sobolev.RadialLocalSobolev + +namespace OAI + +/-! # Centered local functions have compact realizations at the same slope scale -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] + (Q : QuadraticCheegerEnergy μ) + +theorem centered_compact_direction (p : X) {r : ℝ} (hr : 0 < r) + (H : X → ℝ) (L : ℝ≥0) (hH : LipschitzOnWith L H (closedBall p (2*r))) : + ∃ (v : SobolevSpace μ Q) (V : X → ℝ), + LipschitzWith (3*L) V ∧ HasCompactSupport V ∧ + (SobolevSpace.toLp μ Q v =ᵐ[μ] V) ∧ + (∀ x, |V x| ≤ 2*r*(L:ℝ)) ∧ + (SobolevSpace.toLp μ Q v =ᵐ[μ.restrict (closedBall p r)] fun x => H x-H p) := by + let f := fun x => H x-H p + have hf : LipschitzOnWith L f (closedBall p (2*r)) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [f,dist_sub_right] using hH.dist_le_mul x hx y hy + let A : ℝ≥0 := ⟨2*r*(L:ℝ),by positivity⟩ + have hB : ∀ x∈closedBall p (2*r), |f x| ≤ A := by + intro x hx + have hh := hH.dist_le_mul x hx p (mem_closedBall_self (by positivity)) + change |H x-H p| ≤ 2*r*(L:ℝ) + rw [Real.dist_eq] at hh + calc + _ ≤ (L:ℝ)*dist x p := hh + _ ≤ (L:ℝ)*(2*r) := mul_le_mul_of_nonneg_left hx L.coe_nonneg + _ = _ := by ring + have hC : A*⟨r⁻¹,inv_nonneg.mpr hr.le⟩+L=3*L := by + apply NNReal.eq + change (2*r*(L:ℝ))*r⁻¹+(L:ℝ)=3*(L:ℝ) + field_simp [hr.ne']; ring + refine ⟨radialLocalSobolev μ Q p hr hf hB,fun x => radialCutoff p r x*f x,?_, + (radialCutoff_hasCompactSupport p hr).mul_right, + radialLocalSobolev_coe μ Q p hr hf hB, + (radial_local_lipschitz_cutoff p hr hf hB).2, + radialLocalSobolev_eq_on_ball μ Q p hr hf hB⟩ + rw [← hC] + exact (radial_local_lipschitz_cutoff p hr hf hB).1 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredFirstOrderMetricCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredFirstOrderMetricCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..a80c9e36d69d6044fa9e7bf81cd66818c6da3c2c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredFirstOrderMetricCompactness.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderMetricCompactness +import OAI.Geometry.RCD.Metric.CenteredMetricLimit + +namespace OAI + +/-! # The common first-order metric limit retains the exact center -/ + +open Set Metric Filter MeasureTheory TopologicalSpace +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +universe u +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.centered_first_order_metric_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) + (hr : ∀ k, 0 (v (a k) x i-v (a k) (p (a k)) i)/r (a k)) (g i) + (hg i).continuous.continuousAt hδ0 (fun k => (hV k).1) (by intro k; simp) + intro η hη + filter_upwards [hvalues i η hη] with k hk + exact hk (p (a k)) (by + simpa only [dist_self] using mul_nonneg (by norm_num : (0:ℝ)≤5) (hr (a k)).le) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredHamiltonJacobiPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredHamiltonJacobiPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef858a671cb341155d875e8058a7388d444077ed --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredHamiltonJacobiPairing.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Sobolev.WeakHamiltonJacobiPairing +import OAI.Geometry.RCD.Sobolev.CompactLaplacian + +namespace OAI + +/-! # The gradient pairing in a fixed constant gauge + +The compact test and its weak Laplacian have zero boundary contribution. +The Laplacian has total mass zero, so the value pairing uses the same +centered potential as the small-noise compactness construction. +-/ + +open Set Filter MeasureTheory Metric +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (Q : QuadraticCheegerEnergy μ) + +theorem local_centered_hamilton_jacobi_test_pairing + (w φ : SobolevSpace μ Q) (q ξ : Lp ℝ 2 μ) + (hq : IsWeakLaplacian μ Q w q) (hξ : IsWeakLaplacian μ Q φ ξ) + (z : X) {r : ℝ} (hr : 0 < r) (H D : X → ℝ) (ε c : ℝ) + (hw : SobolevSpace.toLp μ Q w =ᵐ[μ.restrict (closedBall z r)] H) + (hD : D =ᵐ[μ.restrict (closedBall z r)] fun x => ε/2*q x + localGamma μ Q w w x/2) + (hφs : ∀ᵐ x ∂μ, x ∉ closedBall z r → SobolevSpace.toLp μ Q φ x = 0) + (hξs : ∀ᵐ x ∂μ, x ∉ closedBall z r → ξ x = 0) + {B : ℝ} (hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q φ x| ≤ B) : + (∫ x in closedBall z r, SobolevSpace.toLp μ Q φ x * localGamma μ Q w w x ∂μ) = + 2*(∫ x in closedBall z r, SobolevSpace.toLp μ Q φ x * D x ∂μ) - + ε*(∫ x in closedBall z r, ξ x * (H x-c) ∂μ) := by + have hzero : ∫ x, ξ x ∂μ = 0 := integral_weakLaplacian_eq_zero μ Q φ ξ hξ z hr + (by + filter_upwards [hφs] with x hx hdist + apply hx + intro hm + have hh : dist z x ≤ r := by simpa only [dist_comm] using mem_closedBall.mp hm + exact (not_lt_of_ge hh) hdist) + (by + filter_upwards [hξs] with x hx hdist + apply hx + intro hm + have hh : dist z x ≤ r := by simpa only [dist_comm] using mem_closedBall.mp hm + exact (not_lt_of_ge hh) hdist) + have hz : ∫ x in closedBall z r, ξ x ∂μ = 0 := by + rw [setIntegral_eq_integral_of_ae_compl_eq_zero hξs,hzero] + have hiξ : IntegrableOn ξ (closedBall z r) μ := + lp_integrableOn_of_finite μ ξ (closedBall z r) (isCompact_closedBall z r).measure_lt_top.ne + have hiW : Integrable (fun x => ξ x * SobolevSpace.toLp μ Q w x) μ := by + simpa only [Real.inner_apply] using + (L2.integrable_inner (𝕜 := ℝ) ξ (SobolevSpace.toLp μ Q w)) + have hiH : IntegrableOn (fun x => ξ x * H x) (closedBall z r) μ := by + apply hiW.integrableOn.congr + filter_upwards [hw] with x hx + rw [hx] + have hcenter : (∫ x in closedBall z r, ξ x*(H x-c) ∂μ) = + ∫ x in closedBall z r, ξ x*H x ∂μ := by + simp_rw [mul_sub] + rw [integral_sub hiH (hiξ.mul_const c),integral_mul_const,hz,zero_mul,sub_zero] + rw [hcenter] + exact local_hamilton_jacobi_test_pairing μ Q w φ q ξ hq hξ H D ε hw hD hφs hξs hB + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..90e6bd3f30551124bfd87c2be32577eebc2fd4e1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicCompactness.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Harmonic.ExpandingHarmonicCompactness +import OAI.Geometry.RCD.Harmonic.CenteredHarmonicDirection + +namespace OAI + +/-! # Entire limits of the original centered and rescaled harmonic functions -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.centered_harmonic_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε T : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) + (hεlim : Tendsto ε atTop (𝓝 0)) (hT : Tendsto T atTop atTop) + (u : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) (v : ℕ → X → ℝ) + (hu : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (T k*r k)) (u k)) + (hrep : ∀ k, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (T k*r k))] v k) + (L : ℕ → ℝ≥0) (A : ℕ → ℝ) (hA : ∀ m, 0 ≤ A m) + (hdata : ∀ m : ℕ, ∀ᶠ k in atTop, -1 ≤ K*(r k)^2 ∧ + IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) + ((m : ℝ)+1) (ε k) (V k) ∧ + (∀ x, dist x (p k) ≤ ((m : ℝ)+1)*r k → |(v k x-v k (p k))/r k| ≤ A m) ∧ + (∀ x y, dist x (p k) ≤ ((m : ℝ)+1)*r k → dist y (p k) ≤ ((m : ℝ)+1)*r k → + |(v k x-v k (p k))/r k-(v k y-v k (p k))/r k| ≤ (L m : ℝ)*(dist x y/r k))) : + ∃ (a : ℕ → ℕ) (f : Euclidean n → ℝ), StrictMono a ∧ Continuous f ∧ + InnerProductSpace.HarmonicOnNhd f univ ∧ + (∀ ρ : ℝ, ∃ C : ℝ≥0, LipschitzOnWith C f (closedBall 0 ρ)) ∧ + ∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x, + dist x (p (a k)) ≤ W*r (a k) → + |(v (a k) x-v (a k) (p (a k)))/r (a k)-f (V (a k) x)| < η := by + classical + let μ := hausdorff n X + let f₀ := fun k x => (v k x-v k (p k))/r k + let Good := fun (m k : ℕ) => (m : ℝ)+1 ≤ T k ∧ + ∀ x, dist x (p k) ≤ ((m : ℝ)+1)*r k → |f₀ k x| ≤ A m + have hex (m k : ℕ) : ∃ w : SobolevSpace μ hX.quadratic, Good m k → + IsSobolevHarmonicOn μ hX.quadratic (ball (p k) (((m : ℝ)+1)*r k)) w ∧ + (SobolevSpace.toLp μ hX.quadratic w =ᵐ[ + μ.restrict (ball (p k) (((m : ℝ)+1)*r k))] f₀ k) ∧ + harmonicTargetNorm hX (p k) (((m : ℝ)+1)*r k) w ≤ A m := by + by_cases hg : Good m k + · have hsub : ball (p k) (((m : ℝ)+1)*r k) ⊆ ball (p k) (T k*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right hg.1 (hr k).le) + obtain ⟨w,hw,hwr,hwn⟩ := hX.centered_harmonic_direction hn (p k) + (mul_pos (by positivity : 0 < (m : ℝ)+1) (hr k)) (hr k) (hA m) + (u k) (v k) (v k (p k)) ((hu k).mono μ hX.quadratic hsub) + (ae_restrict_of_ae_restrict_of_subset hsub (hrep k)) (by + intro x hx + have hh := hg.2 x hx.le + rw [abs_div,abs_of_pos (hr k)] at hh + exact (div_le_iff₀ (hr k)).mp hh) + exact ⟨w,fun _ => ⟨hw,hwr,hwn⟩⟩ + · exact ⟨0,fun hh => (hg hh).elim⟩ + choose w hw using hex + apply hX.expanding_harmonic_compactness hn p r ε V hr hε hε1 hεlim f₀ w L A + (fun m => A m+1) hA (fun m => by linarith [hA m]) + intro m + filter_upwards [hdata m,hT.eventually (eventually_ge_atTop ((m : ℝ)+1))] with k hk ht + have hgood : Good m k := ⟨ht,hk.2.2.1⟩ + have hloc := hw m k hgood + exact ⟨hk.1,hk.2.1,hloc.1,hloc.2.1,hloc.2.2.trans (by linarith),hk.2.2.1,hk.2.2.2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicDirection.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..94e9bc1aa11c5508e38991ed00900d7e9b5e230a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredHarmonicDirection.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicNorm +import OAI.Geometry.RCD.Coordinates.LocalConstantRepresentative +import OAI.Geometry.RCD.Harmonic.LocalConstantHarmonic + +namespace OAI + +/-! # Actual centered and physically rescaled harmonic directions -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.centered_harmonic_direction_with_energy {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) {R r M : ℝ} + (hR : 0 < R) (hr : 0 < r) (hM : 0 ≤ M) + (u : SobolevSpace (hausdorff n X) hX.quadratic) (v : X → ℝ) (c : ℝ) + (hu : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) u) + (hrep : SobolevSpace.toLp (hausdorff n X) hX.quadratic u =ᵐ[ + (hausdorff n X).restrict (ball p R)] v) + (hb : ∀ x ∈ ball p R, |v x-c| ≤ M*r) : + ∃ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[ + (hausdorff n X).restrict (ball p R)] (fun x => (v x-c)/r) ∧ + harmonicTargetNorm hX p R w ≤ M ∧ + ∀ q : SobolevSpace (hausdorff n X) hX.quadratic, + localGamma (hausdorff n X) hX.quadratic w q =ᵐ[(hausdorff n X).restrict (ball p R)] + fun x => r⁻¹*localGamma (hausdorff n X) hX.quadratic u q x := by + let μ := hausdorff n X + obtain ⟨d,_,hd⟩ := hX.local_constant_representative hn p R c + let w := r⁻¹ • (u-d) + have hdH := isSobolevHarmonicOn_of_local_constant μ hX.quadratic + (ball p R) measurableSet_ball d c hd + have hsub : IsSobolevHarmonicOn μ hX.quadratic (ball p R) (u-d) := by + simpa only [neg_one_smul,sub_eq_add_neg] using + hu.add μ hX.quadratic (hdH.smul μ hX.quadratic (-1)) + have hw : IsSobolevHarmonicOn μ hX.quadratic (ball p R) w := + hsub.smul μ hX.quadratic r⁻¹ + have hwrep : SobolevSpace.toLp μ hX.quadratic w =ᵐ[μ.restrict (ball p R)] + (fun x => (v x-c)/r) := by + have he : SobolevSpace.toLp μ hX.quadratic w =ᵐ[μ] + fun x => r⁻¹*(SobolevSpace.toLp μ hX.quadratic u x-SobolevSpace.toLp μ hX.quadratic d x) := by + dsimp only [w] + rw [map_smul,map_sub] + filter_upwards [Lp.coeFn_smul r⁻¹ (SobolevSpace.toLp μ hX.quadratic u-SobolevSpace.toLp μ hX.quadratic d), + Lp.coeFn_sub (SobolevSpace.toLp μ hX.quadratic u) (SobolevSpace.toLp μ hX.quadratic d)] + with x hs hx + simp only [Pi.smul_apply,smul_eq_mul] at hs + rw [hs,hx] + rfl + filter_upwards [ae_restrict_of_ae he,hrep,hd] with x hx hu hd + rw [hx,hu,hd,div_eq_inv_mul] + refine ⟨w,hw,hwrep,hX.harmonicTargetNorm_le_of_bound p hR hM w ?_,?_⟩ + · filter_upwards [hwrep,ae_restrict_mem measurableSet_ball] with x hx hball + rw [hx,abs_div,abs_of_pos hr] + exact (div_le_iff₀ hr).mpr (hb x hball) + · intro q + filter_upwards [hd, + ae_restrict_of_ae (localGamma_smul_left μ hX.quadratic r⁻¹ (u-d) q), + ae_restrict_of_ae (localGamma_sub_left μ hX.quadratic u d q), + ae_restrict_of_ae (localGamma_zero_on_level μ hX.quadratic d q c)] with x hx hs hdq hz + change localGamma μ hX.quadratic (r⁻¹ • (u-d)) q x = _ + rw [hs,hdq,hz hx,sub_zero] + +theorem NoncollapsedRCD.centered_harmonic_direction {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) {R r M : ℝ} + (hR : 0 < R) (hr : 0 < r) (hM : 0 ≤ M) + (u : SobolevSpace (hausdorff n X) hX.quadratic) (v : X → ℝ) (c : ℝ) + (hu : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) u) + (hrep : SobolevSpace.toLp (hausdorff n X) hX.quadratic u =ᵐ[ + (hausdorff n X).restrict (ball p R)] v) + (hb : ∀ x ∈ ball p R, |v x-c| ≤ M*r) : + ∃ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[ + (hausdorff n X).restrict (ball p R)] (fun x => (v x-c)/r) ∧ + harmonicTargetNorm hX p R w ≤ M := by + obtain ⟨w,hw,hrep,hnorm,_⟩ := + hX.centered_harmonic_direction_with_energy hn p hR hr hM u v c hu hrep hb + exact ⟨w,hw,hrep,hnorm⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CenteredProjectionRows.lean b/lean/OAI/Geometry/RCD/Harmonic/CenteredProjectionRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a7efc03c98cec7bc1eeda6edf2b374bf5c5593f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CenteredProjectionRows.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.RCD.Harmonic.ProjectionRadialRows +import OAI.Geometry.RCD.Coordinates.RadialFitRestriction + +namespace OAI + +/-! # Restricting the actual radial rows to the centered projection coordinates -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +/-- Changing the representative of the local constant preserves the +restricted centered affine function. -/ +theorem centered_affine_restrict_cutoff_eq {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (z a : Euclidean n) + (s : Set X) (hs : μ s ≠ ∞) (eta chi : SobolevSpace μ hQ) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) + (hchi : SobolevSpace.toLp μ hQ chi =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) : + SobolevSpace.restrictLp μ hQ s (centeredAffineSobolev μ hQ u eta z a) = + SobolevSpace.restrictLp μ hQ s (centeredAffineSobolev μ hQ u chi z a) := by + rw [centeredAffineSobolev_restrict μ hQ u eta z a s hs + (restrictLp_eq_one_of_representative μ hQ eta s hs heta), + centeredAffineSobolev_restrict μ hQ u chi z a s hs + (restrictLp_eq_one_of_representative μ hQ chi s hs hchi)] + +omit [BorelSpace X] [ProperSpace X] in +/-- A row fit on the radial ball transfers to the smaller projection +ball and to the centered exact frame, with just the volume-ratio loss. -/ +theorem normalized_centered_frame_fit {n : ℕ} {s t : Set X} (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (hs0 : 0 < μ.real s) (ht0 : 0 < μ.real t) + (u : Fin n → SobolevSpace μ hQ) (g eta chi : SobolevSpace μ hQ) + (N : Euclidean n ≃L[ℝ] Euclidean n) (z a : Euclidean n) + {C E : ℝ} (hE : 0 ≤ E) (hvol : μ.real s ≤ C * μ.real t) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict t] fun _ => (1 : ℝ)) + (hchi : SobolevSpace.toLp μ hQ chi =ᵐ[μ.restrict t] fun _ => (1 : ℝ)) + (hfit : ‖normalizeLocalL2 μ s hs (SobolevSpace.restrictLp μ hQ s + (g - centeredAffineSobolev μ hQ u chi z a))‖ ^ 2 ≤ E) : + let uc := centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta + ‖normalizeLocalL2 μ t ht (SobolevSpace.restrictLp μ hQ t + (g - sobolevColumnMap μ hQ uc (N.symm a)))‖ ^ 2 ≤ C * E := by + dsimp only + have hframe := centered_frame_covector_eq μ hQ u N eta z + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) a + (by + have hh := ContinuousLinearMap.adjoint_inner_left (N : Euclidean n →L[ℝ] Euclidean n) + (N.symm a) z + simpa only [ContinuousLinearEquiv.coe_coe, N.apply_symm_apply] using hh) + rw [hframe, map_sub, centered_affine_restrict_cutoff_eq μ hQ u z a t ht eta chi heta hchi, + ← map_sub] + exact normalized_fit_restrict_sq μ hQ hts hs ht hs0 ht0 _ hE hvol hfit + +/-- Centering a coordinate changes its local representative by a constant +and therefore preserves its pairing with the actual Poisson gradient. -/ +theorem centered_radial_representative {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (f g eta : SobolevSpace μ hQ) + (z : Euclidean n) (s : Set X) (j : Fin n) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) + (hrep : SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict s] + localGamma μ hQ f (u j)) : + SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict s] + localGamma μ hQ f (centeredColumn μ hQ u z eta j) := by + have hd := localGamma_eq_of_constant_difference μ hQ s + (centeredColumn μ hQ u z eta j) (u j) f (-z j) + (centeredColumn_difference μ hQ u s z eta heta j) + filter_upwards [hrep, hd, ae_restrict_of_ae (localGamma_comm μ hQ f (u j)), + ae_restrict_of_ae (localGamma_comm μ hQ (centeredColumn μ hQ u z eta j) f)] + with x hg hc hcomm hcomm' + exact hg.trans (hcomm.trans (hc.symm.trans hcomm')) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ColumnRepresentatives.lean b/lean/OAI/Geometry/RCD/Harmonic/ColumnRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6f7e7b9ad2e5a39bf0523827181f1c1d71cd218 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ColumnRepresentatives.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Harmonic.CenteredColumns + +namespace OAI + +/-! # Pointwise representatives of the actual affine coordinate changes -/ + +open Set MeasureTheory +open scoped ENNReal BigOperators InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A Sobolev linear combination represents the corresponding scalar +pairing with the pointwise coordinate vector. -/ +theorem sobolevColumnMap_representative {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ hQ (u i) =ᵐ[μ.restrict s] fun x => v x i) + (a : Euclidean n) : + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u a) =ᵐ[μ.restrict s] + fun x => ⟪v x, a⟫_ℝ := by + classical + change (SobolevSpace.toLpCLM μ hQ (sobolevColumnMap μ hQ u a)) =ᵐ[μ.restrict s] _ + rw [sobolevColumnMap_apply, map_sum] + simp_rw [map_smul] + change (∑ i, a i • SobolevSpace.toLp μ hQ (u i)) =ᵐ[μ.restrict s] _ + filter_upwards [ae_restrict_of_ae (Lp.coeFn_finsetSum Finset.univ + (fun i => a i • SobolevSpace.toLp μ hQ (u i))), + ae_all_iff.2 (fun i => ae_restrict_of_ae (Lp.coeFn_smul (a i) (SobolevSpace.toLp μ hQ (u i)))), + ae_all_iff.2 hu] with x hsum hsmul hrep + rw [hsum] + simp only [Finset.sum_apply] + calc + _ = ∑ i, a i * v x i := by + apply Finset.sum_congr rfl + intro i hi + rw [hsmul i] + simp only [Pi.smul_apply, smul_eq_mul, hrep i] + _ = ⟪v x, a⟫_ℝ := by simp only [PiLp.inner_apply, real_inner_comm, Real.inner_apply] + +/-- Adding a compact local constant to transformed Sobolev columns gives +exactly the affine change of their pointwise vector representative. -/ +theorem affineChangedColumn_representative {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (v : X → Euclidean n) + (hu : ∀ i, SobolevSpace.toLp μ hQ (u i) =ᵐ[μ.restrict s] fun x => v x i) + (B : Euclidean n →L[ℝ] Euclidean n) (b : Euclidean n →L[ℝ] ℝ) + (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => (1 : ℝ)) (i : Fin n) : + SobolevSpace.toLp μ hQ (affineChangedColumn μ hQ u B b η i) =ᵐ[μ.restrict s] + fun x => (B.adjoint (v x)) i + b (EuclideanSpace.single i 1) := by + change SobolevSpace.toLpCLM μ hQ + (sobolevColumnMap μ hQ u (B (EuclideanSpace.single i 1)) + b (EuclideanSpace.single i 1) • η) + =ᵐ[μ.restrict s] _ + rw [map_add, map_smul] + change (SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (B (EuclideanSpace.single i 1))) + + b (EuclideanSpace.single i 1) • SobolevSpace.toLp μ hQ η) =ᵐ[μ.restrict s] _ + filter_upwards [ae_restrict_of_ae (Lp.coeFn_add + (SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (B (EuclideanSpace.single i 1)))) + (b (EuclideanSpace.single i 1) • SobolevSpace.toLp μ hQ η)), + ae_restrict_of_ae (Lp.coeFn_smul (b (EuclideanSpace.single i 1)) (SobolevSpace.toLp μ hQ η)), + sobolevColumnMap_representative μ hQ u s v hu (B (EuclideanSpace.single i 1)), hη] + with x hadd hsmul hcol hconst + rw [hadd] + simp only [Pi.add_apply, hcol, hsmul, Pi.smul_apply, smul_eq_mul, hconst, mul_one] + congr 1 + have hh := ContinuousLinearMap.adjoint_inner_left B (EuclideanSpace.single i 1) (v x) + simpa only [EuclideanSpace.inner_single_right, starRingEnd_apply, star_trivial, one_mul] + using hh.symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CommutatorRepresentatives.lean b/lean/OAI/Geometry/RCD/Harmonic/CommutatorRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0ec7e05cacb49a99a3254367fd1870199a77f65 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CommutatorRepresentatives.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Sobolev.HessianCommutatorEnergy + +namespace OAI + +/-! # Independence of the chosen Sobolev gradient representatives -/ + +open Set MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The commutator estimate applies to the representatives selected by +radial approximation, even when the Hessian construction chose others. -/ +theorem commutator_error_transfer {Ω : Set X} + (f v u g₀ h₀ g h : SobolevSpace μ hQ) + (hg₀ : SobolevSpace.toLp μ hQ g₀ =ᵐ[μ.restrict Ω] localGamma μ hQ f u) + (hh₀ : SobolevSpace.toLp μ hQ h₀ =ᵐ[μ.restrict Ω] localGamma μ hQ v u) + (hg : SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict Ω] localGamma μ hQ f u) + (hh : SobolevSpace.toLp μ hQ h =ᵐ[μ.restrict Ω] localGamma μ hQ v u) + {D : ℝ} + (herror : (∫ x in Ω, (localGamma μ hQ v g₀ x - localGamma μ hQ f h₀ x - + localGamma μ hQ v u x) ^ 2 ∂μ) ≤ D) : + (∫ x in Ω, (localGamma μ hQ v g x - localGamma μ hQ f h x - + localGamma μ hQ v u x) ^ 2 ∂μ) ≤ D := by + have hvg := localGamma_pair_congr_ae μ hQ (f := v) (f' := v) + Filter.EventuallyEq.rfl (hg.trans hg₀.symm) + have hfh := localGamma_pair_congr_ae μ hQ (f := f) (f' := f) + Filter.EventuallyEq.rfl (hh.trans hh₀.symm) + have heq : (fun x => (localGamma μ hQ v g x - localGamma μ hQ f h x - + localGamma μ hQ v u x) ^ 2) =ᵐ[μ.restrict Ω] + fun x => (localGamma μ hQ v g₀ x - localGamma μ hQ f h₀ x - + localGamma μ hQ v u x) ^ 2 := by + filter_upwards [hvg, hfh] with x hx hy + rw [hx, hy] + rwa [integral_congr_ae heq] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactDifferencePairing.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactDifferencePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b548a9a1ee54716804efa6678a2508d2508c201 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactDifferencePairing.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Metric.TranslatedDensityLaw + +namespace OAI + +/-! # Translation moves a difference quotient onto its compact test -/ + +open MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem compact_difference_pairing {n : ℕ} {f ψ : Euclidean n → ℝ} + (hf : Continuous f) (hψ : Continuous ψ) (hs : HasCompactSupport ψ) + (h : Euclidean n) (t : ℝ) : + (∫ x, ((f (x+h)-f x)/t)*ψ x)= + ∫ x, f x*((ψ (x-h)-ψ x)/t) := by + have hi0 : Integrable (fun x => f x*ψ x) volume := + (hf.mul hψ).integrable_of_hasCompactSupport hs.mul_left + have hi1 : Integrable (fun x => f (x+h)*ψ x) volume := + ((hf.comp (by fun_prop)).mul hψ).integrable_of_hasCompactSupport hs.mul_left + have hshift : HasCompactSupport (fun x => ψ (x-h)) := by + simpa only [Function.comp_def,Homeomorph.coe_addRight,sub_eq_add_neg] using + hs.comp_homeomorph (Homeomorph.addRight (-h)) + have hi2 : Integrable (fun x => f x*ψ (x-h)) volume := + (hf.mul (hψ.comp (by fun_prop))).integrable_of_hasCompactSupport hshift.mul_left + have he : (∫ x, f (x+h)*ψ x)=(∫ x, f x*ψ (x-h)) := by + calc + (∫ x, f (x+h)*ψ x) = (∫ x, f ((x-h)+h)*ψ (x-h)) := + (integral_sub_right_eq_self (fun x => f (x+h)*ψ x) h).symm + _ = _ := by simp only [sub_add_cancel] + have hleft : (fun x => ((f (x+h)-f x)/t)*ψ x)= + fun x => t⁻¹*(f (x+h)*ψ x-f x*ψ x) := by funext x; ring + have hright : (fun x => f x*((ψ (x-h)-ψ x)/t))= + fun x => t⁻¹*(f x*ψ (x-h)-f x*ψ x) := by funext x; ring + rw [hleft,hright,integral_const_mul,integral_const_mul, + integral_sub hi1 hi0,integral_sub hi2 hi0,he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactHarmonicTransfer.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactHarmonicTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..81c23fa38d3f80658bb64131ec1289868a37f0d4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactHarmonicTransfer.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Harmonic.CompactMixedTransfer +import OAI.Geometry.RCD.Sobolev.SupportedWeightedGamma +import OAI.Geometry.RCD.Sobolev.RescaledLocalEnergyBound +import OAI.Geometry.RCD.Sobolev.MeasuredRadialCutoff + +namespace OAI + +/-! # Strong local harmonic recovery preserves compact-test mixed integrals -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.compact_harmonic_transfer {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S c a b R : ℝ} + (hS : 0 r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), (nestedBallCutoff (p k) (a*r k) (b*r k) x)^2* + localGamma (hausdorff n X) hX.quadratic (w k-q k) (w k-q k) x ∂hausdorff n X) + atTop (𝓝 0)) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), F (V k x)*localGamma (hausdorff n X) hX.quadratic + (u k) (w k) x ∂hausdorff n X)- + r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), F (V k x)*localGamma (hausdorff n X) hX.quadratic + (u k) (q k) x ∂hausdorff n X)) atTop (𝓝 0) := by + let μ := hausdorff n X + let Ω := fun k => ball (p k) (R*r k) + let U := fun k => ball (p k) (S*r k) + let A := fun k => ball (p k) (c*r k) + let C := fun k => r k^2*(μ.real (U k))⁻¹ + let χ := fun k => nestedBallCutoff (p k) (a*r k) (b*r k) + have hm (k : ℕ) : 0<μ.real (U k) := ENNReal.toReal_pos + (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hzero (k : ℕ) : ∀ᵐ x ∂μ, x∉Ω k → SobolevSpace.toLp μ hX.quadratic (u k) x=0 := + (huz k).mono fun x hx hn => hx (fun hy => hn + ((ball_subset_ball (mul_le_mul_of_nonneg_right (hca.trans (hab.trans hbR)).le (hr k).le)) hy)) + have henergy : ∀ᶠ k in atTop, C k*(∫ x in Ω k, localGamma μ hX.quadratic (u k) (u k) x ∂μ)≤Q^2 := by + filter_upwards [hub] with k hk + have hh := rescaled_local_energy_bound μ hX.quadratic (u k) + (ball_subset_ball (mul_le_mul_of_nonneg_right hRS.le (hr k).le)) + (hX.finiteOnBounded (U k) isBounded_ball).ne (hm k) (sq_nonneg Q) (ae_restrict_of_ae hk) + simpa only [C,div_eq_mul_inv] using hh + have he := compact_mixed_transfer μ hX.quadratic Ω A C + (fun k => mul_nonneg (sq_nonneg _) (inv_nonneg.mpr (hm k).le)) u w q + (fun k x => F (V k x)) χ (norm_nonneg F) (sq_nonneg Q) + (fun k => (F.continuous.measurable.comp (hV k)).aestronglyMeasurable) + (fun k => (nestedBallCutoff_lipschitz (p k) (mul_lt_mul_of_pos_right hab (hr k))).continuous.aestronglyMeasurable) + (fun k => Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using F.norm_coe_le_norm (V k x)) + (fun k => Eventually.of_forall fun x => by + rw [abs_of_nonneg (nestedBallCutoff_bounds _ _ _ _).1] + exact (nestedBallCutoff_bounds _ _ _ _).2) + (fun k x hx => nestedBallCutoff_eq_one (p k) (mul_lt_mul_of_pos_right hab (hr k)) + (by rw [dist_comm]; exact hx.le.trans (mul_le_mul_of_nonneg_right hca.le (hr k).le))) huz henergy herror + apply he.congr' + apply Eventually.of_forall + intro k + have hsub : Ω k⊆U k := ball_subset_ball (mul_le_mul_of_nonneg_right hRS.le (hr k).le) + dsimp only [C] + rw [supported_weighted_gamma μ hX.quadratic (u k) (w k) (fun x => F (V k x)) hsub (hzero k), + supported_weighted_gamma μ hX.quadratic (u k) (q k) (fun x => F (V k x)) hsub (hzero k)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactMixedTransfer.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactMixedTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..7617b415fae78dc434ae822de287172e4fbe91b6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactMixedTransfer.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Harmonic.YoungPairingLimit + +namespace OAI + +/-! # Strong local harmonic recovery transfers a compact-test mixed pairing -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +private theorem gamma_sub_right (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (u w q : SobolevSpace μ hQ) : + localGamma μ hQ u (w-q)=ᵐ[μ] fun x => localGamma μ hQ u w x-localGamma μ hQ u q x := by + filter_upwards [localGamma_sub_left μ hQ w q u,localGamma_comm μ hQ u (w-q), + localGamma_comm μ hQ w u,localGamma_comm μ hQ q u] with x hs hc hw hq + rw [hc,hs,hw,hq] + +theorem compact_mixed_transfer (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (Ω A : ℕ → Set X) (c : ℕ → ℝ) (hc : ∀ k, 0≤c k) + (u w q : ℕ → SobolevSpace μ hQ) (F χ : ℕ → X → ℝ) + {B C : ℝ} (hB : 0≤B) (hC : 0≤C) + (hF : ∀ k, AEStronglyMeasurable (F k) (μ.restrict (Ω k))) + (hχ : ∀ k, AEStronglyMeasurable (χ k) (μ.restrict (Ω k))) + (hFb : ∀ k, ∀ᵐ x ∂μ.restrict (Ω k), |F k x|≤B) + (hχb : ∀ k, ∀ᵐ x ∂μ.restrict (Ω k), |χ k x|≤1) + (hχone : ∀ k x, x∈A k → χ k x=1) + (huzero : ∀ k, ∀ᵐ x ∂μ, x∉A k → SobolevSpace.toLp μ hQ (u k) x=0) + (henergy : ∀ᶠ k in atTop, c k*(∫ x in Ω k, localGamma μ hQ (u k) (u k) x ∂μ)≤C) + (herror : Tendsto (fun k => c k*∫ x in Ω k, (χ k x)^2* + localGamma μ hQ (w k-q k) (w k-q k) x ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => + c k*(∫ x in Ω k, F k x*localGamma μ hQ (u k) (w k) x ∂μ)- + c k*(∫ x in Ω k, F k x*localGamma μ hQ (u k) (q k) x ∂μ)) + atTop (𝓝 0) := by + let φ := fun k x => F k x*χ k x + have hφb (k : ℕ) : ∀ᵐ x ∂μ.restrict (Ω k), |φ k x|≤B := by + filter_upwards [hFb k,hχb k] with x hx hy + change |F k x*χ k x|≤B + rw [abs_mul] + exact (mul_le_mul hx hy (abs_nonneg _) hB).trans_eq (mul_one B) + have hdom : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), |φ k x|≤B*|χ k x| := by + apply Eventually.of_forall + intro k + filter_upwards [hFb k] with x hx + change |F k x*χ k x|≤B*|χ k x| + rw [abs_mul] + exact mul_le_mul_of_nonneg_right hx (abs_nonneg _) + have ht := cutoff_mixed_error_tendsto μ hQ Ω c hc (fun k => w k-q k) u φ χ hB hC + (fun k => (hF k).mul (hχ k)) hχ hφb hχb hdom henergy herror + have heq (k : ℕ) : + (∫ x in Ω k, F k x*localGamma μ hQ (u k) (w k) x ∂μ)- + (∫ x in Ω k, F k x*localGamma μ hQ (u k) (q k) x ∂μ)= + ∫ x in Ω k, φ k x*localGamma μ hQ (w k-q k) (u k) x ∂μ := by + have hi (v : SobolevSpace μ hQ) : + IntegrableOn (fun x => F k x*localGamma μ hQ (u k) v x) (Ω k) μ := + (localGamma_memL1 μ hQ (u k) v).restrict.bdd_mul (hF k) + ((hFb k).mono fun x hx => by simpa only [Real.norm_eq_abs] using hx) + rw [← integral_sub (hi (w k)) (hi (q k))] + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (huzero k), + ae_restrict_of_ae (gamma_sub_right μ hQ (u k) (w k) (q k)), + ae_restrict_of_ae (localGamma_comm μ hQ (w k-q k) (u k)), + ae_restrict_of_ae (localGamma_zero_on_level μ hQ (u k) (w k-q k) 0)] + with x hz hsub hcomm hzero + change F k x*localGamma μ hQ (u k) (w k) x- + F k x*localGamma μ hQ (u k) (q k) x=_ + dsimp only [φ] + rw [hcomm,hsub] + by_cases hx : x∈A k + · rw [hχone k x hx] + ring + · have h0 := hzero (hz hx) + rw [hsub] at h0 + rw [← mul_sub,h0,mul_zero,mul_zero] + convert ht using 1 + funext k + rw [← heq k] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactRadialPairingIdentity.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactRadialPairingIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..0511170102ad619858218d9a24832a57cd78ddac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactRadialPairingIdentity.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Harmonic.CompactRadialWeight + +namespace OAI + +/-! # The exact radial integral obtained from compact smooth recoveries -/ + +open Set Filter MeasureTheory Metric InnerProductSpace +open scoped BoundedContinuousFunction Topology ContDiff NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem compact_radial_pairing_identity {n : ℕ} {S R : ℝ} (hS : 0 ‖x‖^2/2) (closedBall 0 R)) + (hψ : InteriorSmoothTest n S ψ) (hs : tsupport ψ⊆ball 0 R) : + (∫ x in ball 0 S, Q x*inner ℝ (gradient ψ x) (gradient G x))= + -(∫ x in ball 0 S, ψ x*fderiv ℝ g x x) := by + have hψc : Continuous (gradient ψ) := + (toDual ℝ (Euclidean n)).symm.continuous.comp (hψ.1.continuous_fderiv (by simp)) + have hGc : Continuous (gradient G) := + (toDual ℝ (Euclidean n)).symm.continuous.comp (hG.continuous_fderiv (by simp)) + have hgzero (x : Euclidean n) (hx : x∉tsupport ψ) : gradient ψ x=0 := by + simp only [gradient,fderiv_of_notMem_tsupport ℝ hx,map_zero] + have hi1 : Integrable (fun x => (‖x‖^2/2)*inner ℝ (gradient ψ x) (gradient G x)) volume := by + apply (((continuous_norm.pow 2).div_const 2).mul (hψc.inner hGc)).integrable_of_hasCompactSupport + apply hψ.2.1.mono' + intro x hx + by_contra hn + exact hx (by + change (‖x‖^2/2)*inner ℝ (gradient ψ x) (gradient G x)=0 + simp only [hgzero x hn,inner_zero_left,mul_zero]) + have hi2 : Integrable (fun x => ψ x*fderiv ℝ G x x) volume := by + apply (hψ.1.continuous.mul ((hG.continuous_fderiv (by simp)).clm_apply continuous_id)).integrable_of_hasCompactSupport + exact hψ.2.1.mul_right + have he1 (x : Euclidean n) : + (‖x‖^2/2)*inner ℝ (gradient ψ x) (gradient G x)= + (‖x‖^2/2)*inner ℝ (gradient ψ x) (gradient g x) := by + by_cases hx : x∈tsupport ψ + · simp only [gradient,hd (hs hx)] + · simp only [hgzero x hx,inner_zero_left,mul_zero] + have he2 (x : Euclidean n) : ψ x*fderiv ℝ G x x=ψ x*fderiv ℝ g x x := by + by_cases hx : x∈tsupport ψ + · rw [hd (hs hx)] + · rw [image_eq_zero_of_notMem_tsupport hx,zero_mul,zero_mul] + have hid := weak_harmonic_radial_pairing hS hg hweak hψ + (hi1.congr (Eventually.of_forall he1)) (hi2.congr (Eventually.of_forall he2)) + have hleft (x : Euclidean n) : Q x*inner ℝ (gradient ψ x) (gradient G x)= + (‖x‖^2/2)*inner ℝ (gradient ψ x) (gradient g x) := by + by_cases hx : x∈tsupport ψ + · rw [hQ (ball_subset_closedBall (hs hx)),he1 x] + · simp only [hgzero x hx,inner_zero_left,mul_zero] + have hzero (x : Euclidean n) (hx : x∉ball (0:Euclidean n) S) : x∉tsupport ψ := + fun hh => hx ((ball_subset_ball hRS.le) (hs hh)) + rw [setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx => by + rw [hgzero x (hzero x hx),inner_zero_left,mul_zero]), + setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx => by + rw [image_eq_zero_of_notMem_tsupport (hzero x hx),zero_mul]), + integral_congr_ae (Eventually.of_forall hleft)] + exact hid + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactRadialWeight.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactRadialWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..a09a18d5a2c24b5c9ba199ad794d30352df2c1dc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactRadialWeight.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Sobolev.WeakHarmonicRadialPairing +import OAI.Geometry.RCD.Metric.EuclideanInteriorSmoothExtension + +namespace OAI + +/-! # A compact nonnegative weight equal to half the squared radius -/ + +open Set Metric Filter MeasureTheory +open scoped BoundedContinuousFunction Topology ContDiff +noncomputable section +namespace RegularPointCoordinates + +theorem exists_compact_radial_weight {n : ℕ} {T S : ℝ} (hT : 0 ‖x‖^2/2) (closedBall 0 T) ∧ + ∀ x∈ball (0:Euclidean n) T, gradient F x=x := by + let b := (T+S)/2 + have hTb : T χ x*(‖x‖^2/2) + have hG : InteriorSmoothTest n S G := by + refine ⟨χ.contDiff.mul ((contDiff_id.norm_sq ℝ).div_const 2),χ.hasCompactSupport.mul_right,?_⟩ + exact tsupport_mul_subset_left.trans ((by rw [χ.tsupport_eq]; exact closedBall_subset_ball hbS)) + obtain ⟨C,hC⟩ := hG.2.1.exists_bound_of_continuous hG.1.continuous + let F : Euclidean n →ᵇ ℝ := ⟨⟨G,hG.1.continuous⟩,2*C,by + intro x y + rw [Real.dist_eq] + have hx : |G x|≤C := by simpa only [Real.norm_eq_abs] using hC x + have hy : |G y|≤C := by simpa only [Real.norm_eq_abs] using hC y + exact (abs_sub (G x) (G y)).trans (by linarith)⟩ + have he : EqOn F (fun x => ‖x‖^2/2) (closedBall 0 T) := by + intro x hx + change χ x*(‖x‖^2/2)=‖x‖^2/2 + rw [χ.one_of_mem_closedBall hx,one_mul] + refine ⟨F,hG,fun x => mul_nonneg χ.nonneg (div_nonneg (sq_nonneg _) (by norm_num)),he,?_⟩ + intro x hx + have heq : (F : Euclidean n → ℝ)=ᶠ[𝓝 x] (fun y => ‖y‖^2/2) := by + filter_upwards [isOpen_ball.mem_nhds hx] with y hy + exact he (ball_subset_closedBall hy) + rw [show gradient F x=gradient (fun y : Euclidean n => ‖y‖^2/2) x by + simp only [gradient,heq.fderiv_eq]] + exact gradient_half_norm_sq x + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompactRecoveryCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/CompactRecoveryCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..5956e9488fde1f12b53c4925033d3f8ef3678b8e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompactRecoveryCoefficient.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.RCD.Harmonic.SupportedCoefficientL2Error +import OAI.Geometry.RCD.Metric.ContainingMassUniformL2 +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance + +namespace OAI + +/-! # Uniform compact-test recovery preserves the original mixed pairing -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem compact_recovery_coefficient (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} {S c d T : ℝ} (hS : 0 r k^2*(μ.real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), ψ (V k x)*localGamma μ hQ (f k) (w k) x ∂μ)- + r k^2*(μ.real (ball (p k) (S*r k)))⁻¹* + (∫ x in ball (p k) (S*r k), SobolevSpace.toLp μ hQ (u k) x* + localGamma μ hQ (f k) (w k) x ∂μ)) atTop (𝓝 0) := by + let U := fun k => ball (p k) (S*r k) + let Ω := fun k => ball (p k) (T*r k) + let z := fun k x => ψ (V k x)-SobolevSpace.toLp μ hQ (u k) x + have hψL (k : ℕ) : MemLp (fun x => ψ (V k x)) 2 (μ.restrict (U k)) := + MemLp.of_bound (hψ.measurable.comp (hV k).measurable).aestronglyMeasurable B + (Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hψB (V k x)) + have hzL (k : ℕ) : MemLp (z k) 2 (μ.restrict (U k)) := + (hψL k).sub ((Lp.memLp (SobolevSpace.toLp μ hQ (u k))).restrict (U k)) + have hzl : Tendsto (fun k => (μ.real (U k))⁻¹*∫ x in U k, (z k x)^2 ∂μ) atTop (𝓝 0) := by + apply containing_mass_uniform_l2 (fun k => μ.restrict (U k)) (fun k => μ.real (U k)) hmass + (fun k => by simp only [Measure.real,Measure.restrict_apply_univ]; exact le_rfl) z + (fun k => (hzL k).aestronglyMeasurable) + intro δ hδ + exact (hconv δ hδ).mono fun k hk => hk.mono fun x hx => by + simpa only [z,abs_sub_comm] using hx + have hzero : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (U k), x∉Ω k → z k x=0 := by + filter_upwards [hε.eventually (gt_mem_nhds (show 0<(T-d)/2 by linarith))] with k hk + filter_upwards [ae_restrict_of_ae (huz k),ae_restrict_mem measurableSet_ball] with x hz hx hn + have hu : SobolevSpace.toLp μ hQ (u k) x=0 := hz (fun hy => hn + ((ball_subset_ball (mul_le_mul_of_nonneg_right hcT.le (hr k).le)) hy)) + have hdist : T≤dist x (p k)/r k := (le_div_iff₀ (hr k)).mpr (le_of_not_gt hn) + have hd := (abs_le.mp (pointed_radial_distance (hr k) hS.le (hV k).metric hx.le)).1 + have hnorm : d<‖V k x‖ := by linarith + have hψ0 : ψ (V k x)=0 := image_eq_zero_of_notMem_tsupport + (fun hs => (lt_irrefl d) (lt_trans hnorm (by simpa only [mem_ball,dist_zero_right] using hψs hs))) + change ψ (V k x)-SobolevSpace.toLp μ hQ (u k) x=0 + rw [hψ0,hu,sub_self] + have he := supported_coefficient_l2_gamma_error μ hQ Ω U (fun _ => measurableSet_ball) + (fun k => ball_subset_ball (mul_le_mul_of_nonneg_right hTS.le (hr k).le)) hmass + r (fun k => (hr k).le) f w z hM hL hf hw hzero hzL hzl + apply he.congr' + filter_upwards [hconv 1 zero_lt_one] with k hk + have hm : AEStronglyMeasurable (fun x => ψ (V k x)) (μ.restrict (U k)) := + (hψ.measurable.comp (hV k).measurable).aestronglyMeasurable + have hi : IntegrableOn (fun x => ψ (V k x)*localGamma μ hQ (f k) (w k) x) (U k) μ := + (localGamma_memL1 μ hQ (f k) (w k)).restrict.bdd_mul hm + (Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hψB (V k x)) + have huB : ∀ᵐ x ∂μ.restrict (U k), ‖SobolevSpace.toLp μ hQ (u k) x‖≤B+1 := by + filter_upwards [hk] with x hx + rw [Real.norm_eq_abs] + calc |SobolevSpace.toLp μ hQ (u k) x| + = |(SobolevSpace.toLp μ hQ (u k) x-ψ (V k x))+ψ (V k x)| := by congr 1; ring + _ ≤ |SobolevSpace.toLp μ hQ (u k) x-ψ (V k x)|+|ψ (V k x)| := abs_add_le _ _ + _ ≤ B+1 := by linarith [hψB (V k x)] + have hj : IntegrableOn (fun x => SobolevSpace.toLp μ hQ (u k) x*localGamma μ hQ (f k) (w k) x) (U k) μ := + (localGamma_memL1 μ hQ (f k) (w k)).restrict.bdd_mul + ((Lp.memLp (SobolevSpace.toLp μ hQ (u k))).restrict (U k)).aestronglyMeasurable huB + change r k^2*(μ.real (U k))⁻¹*(∫ x in U k, z k x*localGamma μ hQ (f k) (w k) x ∂μ)=_ + simp only [z,sub_mul] + rw [integral_sub hi hj] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CompressedRadialTime.lean b/lean/OAI/Geometry/RCD/Harmonic/CompressedRadialTime.lean new file mode 100644 index 0000000000000000000000000000000000000000..98f69f6d0378a9f01237919909b1282a005f6389 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CompressedRadialTime.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Harmonic.RadialTime +import OAI.Geometry.RCD.Transport.OptimalRadialTime +import OAI.Geometry.RCD.Harmonic.RadialDensityEnvelope + +namespace OAI + +/-! # Small-time radial contraction with uniform path compression + +The prescribed marginal retains the sharp small-time density bound. +Replacing the intervening transport by a bounded-compression plan preserves +that marginal and, by optimal cost rigidity, its radial displacement. +-/ + +open Set Filter Metric MeasureTheory TopologicalSpace +open scoped ENNReal + +namespace RegularPointCoordinates + +noncomputable def radialPathBudget (K : ℝ) (n : ℕ) (κ D : ℝ) (C₀ : ℝ≥0∞) : ℝ≥0∞ := + compressionBudget K n (6 * D) (C₀ * ENNReal.ofReal (1 + 2 ^ n * Real.exp (κ * D ^ 2 / 6))) + +theorem radialPathBudget_ne_top (K : ℝ) (n : ℕ) (κ D : ℝ) {C₀ : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) : + radialPathBudget K n κ D C₀ ≠ ∞ := + compressionBudget_ne_top K n _ (ENNReal.mul_ne_top hC₀ ENNReal.ofReal_ne_top) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.exists_compressed_radial_time {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) (ν₀ : ProbabilityMeasure X) + {C₀ : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) (h0 : (ν₀ : Measure X) ≤ C₀ • hausdorff n X) + (p : X) {R D : ℝ} (hR : 0 < R) (hRD : R < D) + (hs0 : ∀ᵐ x ∂(ν₀ : Measure X), dist x p ≤ R) + (t : Time) (ht : 0 < (t : ℝ)) (ht1 : (t : ℝ) ≤ 1 / 2) : + ∃ π : Measure C(Time, X), IsProbabilityMeasure π ∧ + π.map (fun γ => γ 0) = (ν₀ : Measure X) ∧ + (∀ᵐ γ ∂π, IsGeodesic γ) ∧ + MemLp (fun γ : C(Time, X) => dist (γ 0) (γ 1)) 2 π ∧ + (∀ s : Time, π.map (fun γ => γ s) ≤ radialPathBudget K n κ D C₀ • hausdorff n X) ∧ + π.map (fun γ => γ 1) ≤ + (C₀ * ENNReal.ofReal (radialContractionDensity n κ D t)) • hausdorff n X ∧ + ∀ᵐ γ ∂π, dist (γ 0) (γ 1) = (t : ℝ) * dist (γ 0) p ∧ + dist (γ 1) p = (1 - (t : ℝ)) * dist (γ 0) p ∧ + dist (γ 0) p = dist (γ 0) (γ 1) + dist (γ 1) p := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + have ht1' : (t : ℝ) < 1 := by linarith + obtain ⟨q, hq, hq0, hq1, hqm⟩ := hX.exists_radial_time_plan hn hκ hK ν₀ hC₀ h0 + p hR hRD hs0 t ht1' + let η : Measure X := (q.map (fun γ => γ t) : Measure X) + let M := 1 + 2 ^ n * Real.exp (κ * D ^ 2 / 6) + let A := C₀ * ENNReal.ofReal M + have hA : A ≠ ∞ := ENNReal.mul_ne_top hC₀ ENNReal.ofReal_ne_top + have hM : 1 ≤ M := by + have hh : 0 ≤ (2 : ℝ) ^ n * Real.exp (κ * D ^ 2 / 6) := by positivity + dsimp only [M] + linarith + have hb0 : (ν₀ : Measure X) ≤ A • μ := by + have hone : (1 : ℝ≥0∞) ≤ ENNReal.ofReal M := by + simpa only [ENNReal.ofReal_one] using ENNReal.ofReal_le_ofReal hM + have hh : C₀ ≤ A := by simpa only [mul_one] using mul_le_mul_right hone C₀ + intro S + exact (h0 S).trans (mul_le_mul_left hh (μ S)) + have hb1 : η ≤ A • μ := by + have hle : radialContractionDensity n κ D t ≤ M := + (radialContractionDensity_le n hκ t.2.1 ht1).trans (by dsimp [M]; linarith) + intro S + exact (hqm S).trans (mul_le_mul_left + (mul_le_mul_right (ENNReal.ofReal_le_ofReal hle) C₀) (μ S)) + have hη : ∀ᵐ x ∂η, dist x p ≤ 3 * D := by + change ∀ᵐ x ∂(q.map (fun γ => γ t) : Measure X), dist x p ≤ 3 * D + rw [ProbabilityMeasure.toMeasure_map] + apply (ae_map_iff (measurable_path_eval t).aemeasurable + (measurableSet_le (measurable_id.dist measurable_const) measurable_const)).mpr + exact hq.mono fun _ hγ => hγ.2 t + have hs0' : ∀ᵐ x ∂(ν₀ : Measure X), dist x p ≤ 3 * D := + hs0.mono fun _ hx => by linarith + obtain ⟨π, hπ, hg, hp, hi, hcomp⟩ := hX.exists_bounded_entropy_plan K n hn + (ν₀ : Measure X) η hA hb0 hb1 p (by linarith : 0 ≤ 3 * D) hs0' hη + let := hπ + have hq1' : (q : Measure C(Time, X)).map (fun γ => γ 1) = Measure.dirac p := by + have hh := congrArg (fun ν : ProbabilityMeasure X => (ν : Measure X)) hq1 + change (q.map (fun γ => γ 1) : Measure X) = Measure.dirac p at hh + simpa only [ProbabilityMeasure.toMeasure_map] using hh + have hq0' : (q : Measure C(Time, X)).map (fun γ => γ 0) = (ν₀ : Measure X) := by + have hh := congrArg (fun ν : ProbabilityMeasure X => (ν : Measure X)) hq0 + simpa only [ProbabilityMeasure.toMeasure_map] using hh + have hp' : IsOptimalCoupling ((q : Measure C(Time, X)).map (fun γ => γ 0)) + ((q : Measure C(Time, X)).map (fun γ => γ t)) (π.map (fun γ => (γ 0, γ 1))) := by + rw [hq0'] + exact hp + have he := optimalPlan_endpoints _ _ π hp + refine ⟨π, hπ, he.1, hg, + (memLp_two_iff_integrable_sq + ((measurable_path_eval 0).dist (measurable_path_eval 1)).aestronglyMeasurable).mpr hi, + ?_, he.2 ▸ hqm, ?_⟩ + · intro s + simpa only [radialPathBudget, A, M, show 2 * (3 * D) = 6 * D by ring] using (hcomp s).1 + · exact optimal_radial_time (q : Measure C(Time, X)) p (by linarith : 0 ≤ 3 * D) + hq hq1' t ht ht1' π hi hp' + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ConstantDirectionError.lean b/lean/OAI/Geometry/RCD/Harmonic/ConstantDirectionError.lean new file mode 100644 index 0000000000000000000000000000000000000000..457a9e8cc0a048b0b9eefb884dda5c070be093f2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ConstantDirectionError.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.RCD.Harmonic.AffineCenterBounds +import OAI.Geometry.RCD.Sobolev.LocalAffineCutoff +import OAI.Geometry.RCD.Coordinates.CovectorConstantRecovery + +namespace OAI + +/-! # From recovered affine coefficients to the constant direction -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The two-center radial derivative is close to the actual displacement +once its affine linear and constant coefficients have been recovered. -/ +theorem normalized_constant_direction_error {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) (hpos : μ Ω ≠ 0) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U H : Euclidean n →L[ℝ] SobolevSpace μ hQ) (B : Euclidean n →L[ℝ] Euclidean n) + (c d : Euclidean n →L[ℝ] ℝ) {e R L D : ℝ} (hR : 0 ≤ R) + (hU : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U b))‖ ≤ R * ‖b‖) + (hfit : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (H b - U (B b) - c b • η))‖ ≤ e * ‖b‖) + (hB : ‖B‖ ≤ L) (hconst : ‖c - d‖ ≤ D) (b : Euclidean n) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (H b - d b • η))‖ ≤ + (e + R * L + D) * ‖b‖ := by + have hlin : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U (B b)))‖ ≤ + R * L * ‖b‖ := by + apply (hU (B b)).trans + have hb := (B.le_opNorm b).trans (mul_le_mul_of_nonneg_right hB (norm_nonneg b)) + exact (mul_le_mul_of_nonneg_left hb hR).trans_eq (by ring) + have hc : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω ((c - d) b • η))‖ ≤ + D * ‖b‖ := by + rw [map_smul, restrictLp_eq_one_of_representative μ hQ η Ω hfin hη, + normalized_constant_norm μ Ω hfin hpos] + change ‖(c - d) b‖ ≤ _ + exact ((c - d).le_opNorm b).trans (mul_le_mul_of_nonneg_right hconst (norm_nonneg b)) + have he : H b - d b • η = + (H b - U (B b) - c b • η) + U (B b) + (c - d) b • η := by + simp only [sub_apply, sub_smul] + module + rw [he, map_add, map_add] + simp only [normalizeLocalL2, smul_add] + apply ((norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl)).trans + have hf := hfit b + dsimp only [normalizeLocalL2] at hf hlin hc + nlinarith only [hf, hlin, hc] + +/-- In the two-center application the affine constant is the displaced +coordinate covector composed with the first radial matrix. Both recovered +coefficient estimates therefore give the desired constant direction. -/ +theorem normalized_two_center_direction_error {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) (hpos : μ Ω ≠ 0) (η : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U H : Euclidean n →L[ℝ] SobolevSpace μ hQ) + (Ax Az : Euclidean n →L[ℝ] Euclidean n) (c d : Euclidean n →L[ℝ] ℝ) + {e R L D M : ℝ} (hR : 0 ≤ R) (hx : ‖Ax - 1‖ ≤ 1 / 2) (hc : c = d.comp Ax) + (hU : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U b))‖ ≤ R * ‖b‖) + (hfit : ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (H b - U ((Az - Ax) b) - c b • η))‖ ≤ e * ‖b‖) + (hB : ‖Az - Ax‖ ≤ L) (hM : ‖c‖ ≤ M) (hconst : ‖c.comp (Az - 1)‖ ≤ D) + (b : Euclidean n) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (H b - d b • η))‖ ≤ + (e + R * L + 2 * (D + M * L)) * ‖b‖ := by + exact normalized_constant_direction_error μ hQ Ω hfin hpos η hη U H (Az - Ax) c d hR hU hfit + hB (covector_constant_recovery Ax Az d c hx hc hB hM hconst) b + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ContinuousAffineImprovement.lean b/lean/OAI/Geometry/RCD/Harmonic/ContinuousAffineImprovement.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7882f92917658e1e89eb4ef088d42f3cd46a102 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ContinuousAffineImprovement.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Harmonic.AffineImprovementTransfer +import OAI.Geometry.RCD.Coordinates.LocalCoordinateExtension + +namespace OAI + +/-! # Uniform affine improvement for continuous local harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +/-- The normalized harmonic estimate in the original affine coordinate span. -/ +def HasNormalizedAffineImprovement {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) (r θ : ℝ) : Prop := + ∀ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) w → + ‖normalizeLocalL2 (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) w)‖ ≤ 1 → + ‖normalizeLocalL2 (hausdorff n X) (ball p (θ * r)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic u (ball p (θ * r)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (θ * r)) w))‖ < + (1 / 2 : ℝ) * θ * Real.sqrt θ + +theorem affine_improvement_from_continuous_coordinates [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hcompact : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) + (hmeasured : LocalMeasuredCoordinateInput hX) : + ∃ m : ℕ, 3 ≤ m ∧ ∃ δ : ℝ, 0 < δ ∧ δ ≤ 1 ∧ + ∀ (p : X) (r : ℝ), 0 < r → -δ ≤ K * r ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : X → Euclidean n), + (∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v x i) → + ContinuousOn v (ball p (4 * r)) → + ∀ (B : Euclidean n ≃L[ℝ] Euclidean n) + (η : SobolevSpace (hausdorff n X) hX.quadratic), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun _ => (1 : ℝ)) → + IsPointedApproximation p 0 r 2 δ (fun x => + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v p)) → + HasNormalizedAffineImprovement hX u p r ((1 / 2 : ℝ) ^ m) := by + obtain ⟨m, hm, δ, hδ, hδ1, hfit⟩ := affine_improvement_from_metric_coordinates + hX hn hcompact hgradient heuclidean hmeasured + refine ⟨m, hm, δ, hδ, hδ1, ?_⟩ + intro p r hr hcurv u v hrep hv B η hη happ + obtain ⟨v', hv', heq⟩ := exists_measurable_local_extension measurableSet_ball hv + have hp : p ∈ ball p (4 * r) := mem_ball_self (by positivity) + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have hrep' (i : Fin n) : SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p r)] fun x => v' x i := by + filter_upwards [hrep i, ae_restrict_mem measurableSet_ball] with x hx hxs + rw [← heq (hsub hxs)] + exact hx + have hmeas : Measurable (fun x => (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v' x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v' p)) := + ((B : Euclidean n →L[ℝ] Euclidean n).adjoint.continuous.measurable.comp hv').sub measurable_const + have happ' : IsPointedApproximation p 0 r 2 δ (fun x => + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v' x) - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint (v' p)) := by + apply happ.congr_on_ball (by positivity) + intro x hx + have hx' : x ∈ ball p (4 * r) := by + change dist x p < 4 * r + exact lt_of_le_of_lt (show dist x p ≤ 2 * r from hx) (by linarith) + exact congrArg₂ (fun a b => + (B : Euclidean n →L[ℝ] Euclidean n).adjoint a - + (B : Euclidean n →L[ℝ] Euclidean n).adjoint b) (heq hx') (heq hp) + exact hfit p r hr hcurv u v' hrep' B η hη hmeas happ' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ContinuousApproximateRepresentative.lean b/lean/OAI/Geometry/RCD/Harmonic/ContinuousApproximateRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..8580ed61516ba7a85129be917a32592f97aec4f4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ContinuousApproximateRepresentative.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance +import Mathlib.MeasureTheory.Measure.OpenPos +import Mathlib.Topology.Sequences + +namespace OAI + +/-! # From almost everywhere to every point against an approximate map -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem continuous_approximate_representative {X Y : Type*} + [MetricSpace X] [MeasurableSpace X] [OpensMeasurableSpace X] + [MetricSpace Y] (μ : Measure X) [μ.IsOpenPosMeasure] + {Ω : Set X} (hΩ : IsOpen Ω) (u F : X → Y) (hu : ContinuousOn u Ω) + {L ε δ : ℝ} + (hF : ∀ x ∈ Ω, ∀ y ∈ Ω, dist (F x) (F y) ≤ L*dist x y+ε) + (hAE : ∀ᵐ x ∂μ.restrict Ω, dist (u x) (F x) ≤ δ) : + ∀ x ∈ Ω, dist (u x) (F x) ≤ δ+ε := by + intro x hx + let A := {y | y ∈ Ω ∧ dist (u y) (F y) ≤ δ} + have hdense := Measure.dense_of_ae (μ := μ) (ae_imp_of_ae_restrict hAE) + have hxcl : x ∈ closure A := by + apply Metric.mem_closure_iff.mpr + intro η hη + obtain ⟨y,hy,hgood⟩ := hdense.exists_mem_open (isOpen_ball.inter hΩ) + ⟨x,mem_ball_self hη,hx⟩ + exact ⟨y,⟨hgood.2,hy hgood.2⟩,by simpa only [mem_ball,dist_comm] using hgood.1⟩ + obtain ⟨y,hy,hyt⟩ := mem_closure_iff_seq_limit.mp hxcl + have hut : Tendsto (fun k => u (y k)) atTop (𝓝 (u x)) := + (hu.continuousAt (hΩ.mem_nhds hx)).tendsto.comp hyt + have hdist : Tendsto (fun k => dist (u x) (u (y k))+δ+(L*dist (y k) x+ε)) + atTop (𝓝 (δ+ε)) := by + have h1 := (tendsto_const_nhds : Tendsto (fun _ : ℕ => u x) atTop (𝓝 (u x))).dist hut + have h2 := hyt.dist (tendsto_const_nhds : Tendsto (fun _ : ℕ => x) atTop (𝓝 x)) + simpa only [dist_self,mul_zero,zero_add] using (h1.add_const δ).add ((h2.const_mul L).add_const ε) + apply ge_of_tendsto hdist + exact Eventually.of_forall fun k => calc + dist (u x) (F x) ≤ dist (u x) (u (y k))+dist (u (y k)) (F x) := dist_triangle _ _ _ + _ ≤ dist (u x) (u (y k))+(dist (u (y k)) (F (y k))+dist (F (y k)) (F x)) := by + linarith [dist_triangle (u (y k)) (F (y k)) (F x)] + _ ≤ dist (u x) (u (y k))+δ+(L*dist (y k) x+ε) := by + have h1 := (hy k).2 + have h2 := hF (y k) (hy k).1 x hx + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ContinuousHamiltonJacobiComparison.lean b/lean/OAI/Geometry/RCD/Harmonic/ContinuousHamiltonJacobiComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..186f364edc81d29b4e44ade3c8c7ed93d4d4b6f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ContinuousHamiltonJacobiComparison.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Harmonic.TimeAveragePairing + +namespace OAI + +/-! # Removing the time average in an endpoint action inequality -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem continuous_comparison_of_time_averages + {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [MeasurableSpace Y] (ν : Measure Y) [IsFiniteMeasure ν] + (H : ℝ → X → ℝ) (hH : Measurable (Function.uncurry H)) + {Ω : Set X} (hΩ : IsCompact Ω) {δ a b E : ℝ} {L : ℝ≥0} + (hL : LipschitzOnWith L (Function.uncurry H) (Ioo δ 1 ×ˢ Ω)) + (e₀ e₁ : Y → X) (he₀ : Measurable e₀) (he₁ : Measurable e₁) + (hs₀ : ∀ᵐ y ∂ν, e₀ y ∈ Ω) (hs₁ : ∀ᵐ y ∂ν, e₁ y ∈ Ω) + (ha : δ < a) (hab : a < b) (hb : b < 1) + (hav : ∀ h : ℝ, 0 < h → δ < a-h → b+h < 1 → + (∫ y, timeIntervalAverage (fun q => H q (e₀ y)) h a ∂ν) - + (∫ y, timeIntervalAverage (fun q => H q (e₁ y)) h b ∂ν) ≤ E) : + (∫ y, H a (e₀ y) ∂ν)-(∫ y, H b (e₁ y) ∂ν) ≤ E := by + let M := ν.real univ*(L:ℝ) + have hM : 0 ≤ M := mul_nonneg measureReal_nonneg L.coe_nonneg + apply le_of_forall_pos_le_add + intro ε hε + have hsmall : 0 < min ((a-δ)/2) (min ((1-b)/2) (ε/(2*(M+1)))) := by positivity + obtain ⟨h,hh,hlim⟩ := exists_between hsmall + have hha : h < (a-δ)/2 := hlim.trans_le (min_le_left _ _) + have hrest := hlim.trans_le (min_le_right _ _) + have hhb : h < (1-b)/2 := hrest.trans_le (min_le_left _ _) + have hhM : h < ε/(2*(M+1)) := hrest.trans_le (min_le_right _ _) + have hha' : δ < a-h := by linarith + have hhb' : b+h < 1 := by linarith + have herror : 2*M*h < ε := by + have hm := (lt_div_iff₀ (by positivity : 0 < 2*(M+1))).mp hhM + nlinarith + have he₀ := time_average_pairing_error ν H hH hΩ hL e₀ he₀ hs₀ hh hha' + (show a+h < 1 by linarith) + have he₁ := time_average_pairing_error ν H hH hΩ hL e₁ he₁ hs₁ hh + (show δ < b-h by linarith) hhb' + have hcmp := hav h hh hha' hhb' + have h₀ := (abs_le.mp he₀).1 + have h₁ := (abs_le.mp he₁).2 + dsimp only [M] at herror + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ContinuousRadialMoment.lean b/lean/OAI/Geometry/RCD/Harmonic/ContinuousRadialMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..45cff4331a891d2df22ae419d7768228d19bf30f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ContinuousRadialMoment.lean @@ -0,0 +1,40 @@ +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import Mathlib.MeasureTheory.Function.LocallyIntegrable + +namespace OAI + +/-! # A finite quadratic tail gives a global weighted moment -/ + +open Set MeasureTheory Metric Filter +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] {μ : Measure X} [IsFiniteMeasureOnCompacts μ] + +theorem integrable_one_add_sq_of_tail {f : X → ℝ} (hf : Continuous f) + (hf0 : ∀ x, 0 ≤ f x) (p : X) {R : ℝ} (hR : 0 < R) + (htail : IntegrableOn (fun x => f x*(dist x p)^2) (ball p R)ᶜ μ) : + Integrable (fun x => f x*(1+(dist x p)^2)) μ := by + have hc : Continuous (fun x => f x*(1+(dist x p)^2)) := by fun_prop + have hi : IntegrableOn (fun x => f x*(1+(dist x p)^2)) (ball p R) μ := + (hc.continuousOn.integrableOn_compact (isCompact_closedBall p R)).mono_set + (ball_subset_closedBall : ball p R ⊆ closedBall p R) + have ho : IntegrableOn (fun x => f x*(1+(dist x p)^2)) (ball p R)ᶜ μ := by + apply (htail.const_mul ((R^2)⁻¹+1)).mono' hc.aestronglyMeasurable + filter_upwards [ae_restrict_mem measurableSet_ball.compl] with x hx + have hd : R ≤ dist x p := le_of_not_gt hx + have hs : R^2 ≤ (dist x p)^2 := pow_le_pow_left₀ hR.le hd 2 + have hsq : 0 < R^2 := sq_pos_of_pos hR + have hinv : (R^2)⁻¹*R^2 = 1 := inv_mul_cancel₀ hsq.ne' + have hh := mul_le_mul_of_nonneg_left hs (inv_nonneg.mpr hsq.le) + rw [hinv] at hh + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (hf0 x) (by positivity))] + have hm := mul_le_mul_of_nonneg_left hh (hf0 x) + nlinarith + simpa only [union_compl_self,integrableOn_univ] using hi.union ho + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ControlledCoefficientPathSelection.lean b/lean/OAI/Geometry/RCD/Harmonic/ControlledCoefficientPathSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef9558694af3010344b64b2dcbdbbb88af1727f6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ControlledCoefficientPathSelection.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Coordinates.SobolevFramePathEnergy +import OAI.Geometry.RCD.Harmonic.AffineVariationSelection + +namespace OAI + +/-! # Actual coefficient representatives on paths with vanishing affine-variation error -/ + +open Set Filter MeasureTheory Finset +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem controlled_coefficient_path_selection (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} (G : ℕ → Fin n → SobolevSpace μ Q) + (π : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (π k)] + (hgeo : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) (C : ℕ → ℝ≥0∞) (hC : ∀ k, C k≠∞) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t)≤C k • μ) + (hD : ∀ k, MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 (π k)) + (r : ℕ → ℝ) + (hspeed : ∀ k, ∀ᵐ γ ∂π k, dist (γ 0) (γ 1)≤r k) + (Ω : ℕ → Set X) (hstay : ∀ k (t : Time), ∀ᵐ x ∂(π k).map (fun γ => γ t), x∈Ω k) + {M : ℝ} (henergy : ∀ k, (n:ℝ)*(r k)^2*(C k).toReal* + (∑ i, ∫ x in Ω k, localGamma μ Q (G k i) (G k i) x ∂μ)≤M) + (F : ℕ → Fin n → C(Time,X) → C(Time,ℝ)) + (hFI : ∀ k i, Integrable (fun γ => ‖F k i γ‖) (π k)) + (hFlim : Tendsto (fun k => ∫ γ, ∑ i, ‖F k i γ‖ ∂π k) atTop (𝓝 0)) + (E : ℕ → X → ℝ) (hE : ∀ k x, 0≤E k x) + (hEI : ∀ k, IntegrableOn (E k) (Ω k) μ) + (hElim : Tendsto (fun k => ∫ γ, (∫ t in Icc (0:ℝ) 1, + E k (geodesicExtension γ t)) ∂π k) atTop (𝓝 0)) + (P : ℕ → C(Time,X) → Prop) (hP : ∀ k, ∀ᵐ γ ∂π k, P k γ) : + ∃ (γ : ℕ → C(Time,X)) (b : ℕ → Fin n → ℝ → ℝ), + (∀ k, P k (γ k)) ∧ + (∀ k i, AbsolutelyContinuousOnInterval (b k i) 0 1) ∧ + (∀ k i, b k i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => SobolevSpace.toLp μ Q (G k i) (geodesicExtension (γ k) t)) ∧ + Tendsto (fun k => ∑ i, ‖F k i (γ k)‖) atTop (𝓝 0) ∧ + Tendsto (fun k => ∫ t in Icc (0:ℝ) 1, E k (geodesicExtension (γ k) t)) atTop (𝓝 0) ∧ + Tendsto (fun k => (∑ i, ‖F k i (γ k)‖)* + (∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b k i) t|)) atTop (𝓝 0) := by + let A k γ := ∑ i, ‖F k i γ‖ + let B k γ := (n:ℝ)*(r k)^2*framePathEnergy μ Q (G k) γ + let Z k γ := ∫ t in Icc (0:ℝ) 1, E k (geodesicExtension γ t) + have hB (k : ℕ) := compressed_frame_path_energy μ Q (G k) (π k) (hC k) (hcomp k) (hstay k) + have hZ (k : ℕ) := compressed_segment_integral μ (π k) (hC k) (hcomp k) (hstay k) + (hEI k) (Eventually.of_forall (hE k)) + have hBI (k : ℕ) : Integrable (B k) (π k) := (hB k).1.const_mul _ + have hBm (k : ℕ) : (∫ γ, B k γ ∂π k)≤M := by + rw [show (∫ γ, B k γ ∂π k)=(n:ℝ)*(r k)^2*(∫ γ, framePathEnergy μ Q (G k) γ ∂π k) from + integral_const_mul _ _] + exact (mul_le_mul_of_nonneg_left (hB k).2 (by positivity)).trans (by + simpa only [mul_assoc] using henergy k) + let R k γ := ∃ b : Fin n → ℝ → ℝ, + (∀ i, AbsolutelyContinuousOnInterval (b i) 0 1) ∧ + (∀ i, b i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => SobolevSpace.toLp μ Q (G k i) (geodesicExtension γ t)) ∧ + (∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b i) t|)^2≤B k γ + have hR (k : ℕ) : ∀ᵐ γ ∂π k, R k γ := by + filter_upwards [sobolev_frame_variation_envelope μ Q (G k) (π k) (hgeo k) (hC k) (hcomp k) (hD k), + hspeed k] with γ hγ hs + obtain ⟨b,hb,_h0,_h1,he,hv⟩ := hγ + refine ⟨b,hb,he,hv.trans ?_⟩ + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ dist_nonneg hs 2) (Nat.cast_nonneg n)) + (framePathEnergy_nonneg μ Q (G k) γ) + obtain ⟨γ,hγ,hA,hZlim,hprod⟩ := affine_variation_selection π A B Z + (fun k γ => P k γ ∧ R k γ) + (fun k => integrable_finsetSum _ (fun i _ => hFI k i)) hBI (fun k => (hZ k).1) + (fun k γ => sum_nonneg (fun _ _ => norm_nonneg _)) + (fun k γ => mul_nonneg (by positivity) (framePathEnergy_nonneg μ Q (G k) γ)) + (fun k γ => integral_nonneg (fun _ => hE k _)) (fun k => (hP k).and (hR k)) hFlim hElim hBm + choose b hb he hv using fun k => (hγ k).2 + refine ⟨γ,b,fun k => (hγ k).1,hb,he,hA,hZlim,?_⟩ + apply squeeze_zero (fun k => mul_nonneg (sum_nonneg (fun _ _ => norm_nonneg _)) + (sum_nonneg (fun _ _ => integral_nonneg (fun _ => abs_nonneg _)))) _ hprod + intro k + apply mul_le_mul_of_nonneg_left (Real.le_sqrt_of_sq_le (hv k)) + (sum_nonneg (fun _ _ => norm_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..240e6a3ea4c7dce76c391135105c5908f1ee5e32 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicLimit.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.RCD.Harmonic.CurvatureHarmonicVariation +import OAI.Geometry.RCD.Sobolev.CompactEnergyHarmonic +import OAI.Geometry.RCD.Sobolev.SharpRecoveryEnergy +import OAI.Geometry.RCD.Sobolev.HarmonicScaledEnergy +import OAI.Geometry.RCD.Coordinates.EuclideanWeakHarmonicRegularity + +namespace OAI + +/-! # The weak Euclidean equation under the original curvature-scale bound + +Sharp recovered test energies and harmonic orthogonality force the compact +Euclidean gradient pairing to vanish. No energy convergence is assumed. +-/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_value_limit_weak_of_curvature {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 p (k+N)) (fun k => r (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) (fun k => w (k+N)) + (fun k => hw (k+N)) (fun k => hnorm (k+N)) + obtain ⟨_,_,_,L,_,hL,_,_⟩ := hψ.metric_bounds hS + let G := smoothGradientTest (hψ.1.of_le (by simp)) hψ.2.1 + have hqb : ∀ᶠ k in atTop, ∀ᵐ x ∂hausdorff n X, + r (k+N)^2*localGamma (hausdorff n X) hX.quadratic (q k).val (q k).val x≤(‖G‖+1)^2 := by + filter_upwards [hqg c hc.le hcS 1 zero_lt_one] with k hk + have hfull := supported_recovery_slope (hausdorff n X) hX.quadratic (q k).val + measurableSet_ball (fun x => add_nonneg (norm_nonneg _) zero_le_one) (hqz k) hk + filter_upwards [hfull,localGamma_self (hausdorff n X) hX.quadratic (q k).val, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg (hausdorff n X) hX.quadratic (q k).val)] + with x hx he hn' + have hb : ‖fderiv ℝ ψ (v (k+N) x)‖≤‖G‖ := by + simpa only [G,smoothGradientTest_apply,abs_of_nonneg (norm_nonneg _)] using + (le_abs_self (G (v (k+N) x))).trans (G.norm_coe_le_norm _) + rw [he] + simpa only [mul_pow] using pow_le_pow_left₀ (mul_nonneg (hr (k+N)).le hn') + (hx.trans (add_le_add hb le_rfl)) 2 + have hqupper := hX.recovery_energy_upper hS (fun k => p (k+N)) + (fun k => r (k+N)) (fun k => ε (k+N)) (fun k => v (k+N)) + (fun k => hr (k+N)) (hεlim.comp (tendsto_add_atTop_nat N)) + (fun k => hv (k+N)) (hψ.1.of_le (by simp)) hψ.2.1 (fun k => (q k).val) + hqz (hqg c hc.le hcS) + apply compact_energy_variation_harmonic hS hρS hg hψ + (hs.trans (ball_subset_ball haρ.le)) (M := volume.real (ball (0:Euclidean n) S)*M) + intro t + have hvar := hX.curvature_harmonic_variation hn hS hτ hρτ hτR hRS hcR + (fun k => p (k+N)) (fun k => r (k+N)) (fun k => ε (k+N)) (fun k => v (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) + (fun k => hε (k+N)) (fun k => hε1 (k+N)) (hεlim.comp (tendsto_add_atTop_nat N)) + (fun k => hv (k+N)) (fun k => w (k+N)) (fun k => hw (k+N)) g ψ hg hL + (fun W hW hWS δ hδ => (tendsto_add_atTop_nat N).eventually (hconv W hW hWS δ hδ)) + q hqc hqz hM (sq_nonneg (‖G‖+1)) hwb hqb + (by simpa only [div_eq_mul_inv] using hqupper) t + have hV : volume.real (ball (0:Euclidean n) S)≠0 := + (ENNReal.toReal_pos (measure_ball_pos volume (0:Euclidean n) hS).ne' measure_ball_ne_top).ne' + convert hvar using 1 + field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicVariation.lean b/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..dec10dc3a49390fcdc59986c62ea65388a37de80 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/CurvatureHarmonicVariation.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.RCD.Sobolev.UniformEventualLowerEnergy +import OAI.Geometry.RCD.Sobolev.SupportedGammaIntegral +import OAI.Geometry.RCD.Sobolev.RescaledLocalEnergyBound +import OAI.Geometry.RCD.Sobolev.DirichletTestRecoverySequence +import OAI.Geometry.RCD.Sobolev.CorrectionInteriorEnergy + +namespace OAI + +/-! # The variational lower bound for actual harmonic perturbations + +The test is in the original Dirichlet space. Its compact support makes the +mixed source energy vanish on any containing interior ball. +-/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.curvature_harmonic_variation {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + {S ρ τ R c : ℝ} (hS : 0 g y+t*ψ y) z‖^2)≤ + volume.real (ball (0:Euclidean n) S)*(M+t^2*P) := by + let μ := hausdorff n X + let F := fun k => w k+t • (q k).val + have hFconv (W : ℝ) (hW : 0 SobolevSpace.toLp μ hX.quadratic (w k) x+z) hsmul) + rw [he] + calc + _ = |(SobolevSpace.toLp μ hX.quadratic (w k) x-g (v k x))+ + t*(SobolevSpace.toLp μ hX.quadratic (q k).val x-ψ (v k x))| := by congr 1; ring + _ ≤ |SobolevSpace.toLp μ hX.quadratic (w k) x-g (v k x)|+ + |t| * |SobolevSpace.toLp μ hX.quadratic (q k).val x-ψ (v k x)| := + (abs_add_le _ _).trans_eq (by rw [abs_mul]) + _ ≤ a+|t| * a := add_le_add hx (mul_le_mul_of_nonneg_left hqx (abs_nonneg _)) + _ ≤ δ := by dsimp only [a]; field_simp; nlinarith [abs_nonneg t] + have hFlip : ∀ W g y+t*ψ y) (closedBall 0 W) := by + intro W hWS + obtain ⟨B,hB⟩ := hg W hWS + exact ⟨_,hB.add ((lipschitzWith_smul t).comp hψ).lipschitzOnWith⟩ + have hFb : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (closedBall (p k) (R*r k)), + r k^2*localGamma μ hX.quadratic (F k) (F k) x≤2*M+2*t^2*Q := by + filter_upwards [hqb] with k hk + filter_upwards [hwb k,ae_restrict_of_ae hk, + ae_restrict_of_ae (localGamma_add_self_le μ hX.quadratic (w k) (t • (q k).val)), + ae_restrict_of_ae (localGamma_smul_left μ hX.quadratic t (q k).val (t • (q k).val)), + ae_restrict_of_ae (localGamma_smul_right μ hX.quadratic t (q k).val (q k).val)] + with x hwx hqx hx hl hr' + have ht : localGamma μ hX.quadratic (t • (q k).val) (t • (q k).val) x= + t^2*localGamma μ hX.quadratic (q k).val (q k).val x := by rw [hl,hr']; ring + rw [ht] at hx + have hh := mul_le_mul_of_nonneg_left hx (sq_nonneg (r k)) + nlinarith [mul_le_mul_of_nonneg_left hqx (sq_nonneg t)] + have hFupper (δ : ℝ) (hδ : 0<δ) : ∀ᶠ k in atTop, + (r k^2/μ.real (ball (p k) (S*r k)))* + (∫ x in closedBall (p k) (R*r k), localGamma μ hX.quadratic (F k) (F k) x ∂μ)≤ + (M+t^2*P)+δ := by + let a := δ/(1+t^2) + have ha : 0 hx (fun hm => hn (ball_subset_closedBall + ((ball_subset_ball (mul_le_mul_of_nonneg_right hcR.le (hr k).le)) hm))) + have hzeroU : ∀ᵐ x ∂μ, x∉ball (p k) (S*r k) → SobolevSpace.toLp μ hX.quadratic (q k).val x=0 := + hzeroA.mono fun x hx hn => hx (fun hm => hn (hsub hm)) + have horth : (∫ x in closedBall (p k) (R*r k), localGamma μ hX.quadratic (w k) (q k).val x ∂μ)=0 := by + rw [supported_gamma_integral μ hX.quadratic _ _ _ hzeroA, + ← supported_gamma_integral μ hX.quadratic _ _ _ hzeroU] + exact recovered_dirichlet_harmonic_pairing_zero μ hX.quadratic measurableSet_ball (hw k) (q k) + have hqe : (∫ x in closedBall (p k) (R*r k), localGamma μ hX.quadratic (q k).val (q k).val x ∂μ)= + ∫ x in ball (p k) (S*r k), localGamma μ hX.quadratic (q k).val (q k).val x ∂μ := by + rw [supported_gamma_integral μ hX.quadratic _ _ _ hzeroA, + supported_gamma_integral μ hX.quadratic _ _ _ hzeroU] + have hpos : 0<μ.real (ball (p k) (S*r k)) := ENNReal.toReal_pos + (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hb := rescaled_local_energy_bound μ hX.quadratic (w k) hsub + (hX.finiteOnBounded _ isBounded_ball).ne hpos hM (hwb k) + change _≤P+a at hk + change _≤M at hb + dsimp only [F] + rw [integral_harmonic_perturbation μ hX.quadratic _ _ t _ horth,hqe,mul_add] + have he : (r k^2/μ.real (ball (p k) (S*r k)))* + (t^2*∫ x in ball (p k) (S*r k), localGamma μ hX.quadratic (q k).val (q k).val x ∂μ)= + t^2*((r k^2/μ.real (ball (p k) (S*r k)))* + ∫ x in ball (p k) (S*r k), localGamma μ hX.quadratic (q k).val (q k).val x ∂μ) := by ring + rw [he] + have hh := add_le_add hb (mul_le_mul_of_nonneg_left hk (sq_nonneg t)) + apply hh.trans + have he' : a*(1+t^2)=δ := by dsimp only [a]; field_simp + nlinarith [ha.le] + exact (hX.gradient_energy_lower_of_curvature_eventual_sequence hn hS hτ hρτ hτR hRS p r ε v + hr hcurv hε hε1 hεlim hv F (fun y => g y+t*ψ y) hFlip hFconv + (by positivity : 0≤2*M+2*t^2*Q) hFb hFupper).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DefectSegment.lean b/lean/OAI/Geometry/RCD/Harmonic/DefectSegment.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6b89d9eba54f2360ae4904dc68a030210ae494e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DefectSegment.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Transport.CompressedSegmentNullSet +import OAI.Geometry.RCD.Transport.TransportLevelBound + +namespace OAI + +/-! # An actual geodesic with controlled local defect + +Positive endpoint sets are connected by the already constructed RCD +bounded-compression plan. First-moment selection retains its endpoints, +geodesicity, and whole-path containment. No segment or splitting input is +assumed. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.exists_defect_segment {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (p : X) {R : ℝ} (hR : 0 < R) {A B : Set X} + (hA : MeasurableSet A) (hB : MeasurableSet B) + (hA0 : hausdorff n X A ≠ 0) (hB0 : hausdorff n X B ≠ 0) + (hsA : A ⊆ closedBall p R) (hsB : B ⊆ closedBall p R) + {F : X → ℝ} (hF : IntegrableOn F (ball p (8*R)) (hausdorff n X)) + (hFpos : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (8*R)), 0 ≤ F x) + {P : X → Prop} (hP : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (8*R)), P x) : + ∃ γ : C(Time,X), IsGeodesic γ ∧ γ 0 ∈ A ∧ γ 1 ∈ B ∧ + (∀ t : Time, dist (γ t) p ≤ 3*R) ∧ + (∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), P (geodesicExtension γ t)) ∧ + IntegrableOn (fun t => F (geodesicExtension γ t)) (Icc (0:ℝ) 1) ∧ + (∫ t in Icc (0:ℝ) 1, F (geodesicExtension γ t)) ≤ + (compressionBudget K n (2*R) + (max (hausdorff n X A)⁻¹ (hausdorff n X B)⁻¹)).toReal * + ∫ x in ball p (8*R), F x ∂hausdorff n X := by + let μ := hausdorff n X + let C : ℝ≥0∞ := max (μ A)⁻¹ (μ B)⁻¹ + have hAt : μ A ≠ ∞ := (hX.finiteOnBounded A (isBounded_closedBall.subset hsA)).ne + have hBt : μ B ≠ ∞ := (hX.finiteOnBounded B (isBounded_closedBall.subset hsB)).ne + have hC : C ≠ ∞ := max_ne_top (ENNReal.inv_ne_top.mpr hA0) (ENNReal.inv_ne_top.mpr hB0) + let := uniformOn_probability μ A hA0 hAt + let := uniformOn_probability μ B hB0 hBt + have hbA : ∀ᵐ x ∂uniformOn μ A, dist x p ≤ R := + (uniformOn_ae_mem μ A hA).mono fun _ hx => hsA hx + have hbB : ∀ᵐ x ∂uniformOn μ B, dist x p ≤ R := + (uniformOn_ae_mem μ B hB).mono fun _ hx => hsB hx + obtain ⟨π,hπ,hgeo,hopt,_hi,hall⟩ := hX.exists_bounded_entropy_plan K n hn + (uniformOn μ A) (uniformOn μ B) hC (uniformOn_le_scaled μ A (le_max_left _ _)) + (uniformOn_le_scaled μ B (le_max_right _ _)) p hR.le hbA hbB + let := hπ + have hend := optimalPlan_endpoints (uniformOn μ A) (uniformOn μ B) π hopt + have hpaths := optimal_geodesic_plan_bounded (uniformOn μ A) (uniformOn μ B) + π hgeo hopt p hR.le hbA hbB + have hstay (t : Time) : ∀ᵐ x ∂π.map (fun γ => γ t), x ∈ ball p (8*R) := by + apply (ae_map_iff (measurable_path_eval t).aemeasurable measurableSet_ball).mpr + filter_upwards [hpaths] with γ hγ + linarith [hγ.2 t] + have hstart : ∀ᵐ γ ∂π, γ 0 ∈ A := by + apply ae_of_ae_map (measurable_path_eval 0).aemeasurable + rw [hend.1] + exact uniformOn_ae_mem μ A hA + have hfinish : ∀ᵐ γ ∂π, γ 1 ∈ B := by + apply ae_of_ae_map (measurable_path_eval 1).aemeasurable + rw [hend.2] + exact uniformOn_ae_mem μ B hB + have hgood : ∀ᵐ γ ∂π, IsGeodesic γ ∧ γ 0 ∈ A ∧ γ 1 ∈ B ∧ + (∀ t : Time, dist (γ t) p ≤ 3*R) ∧ + (∀ᵐ t ∂volume.restrict (Icc (0:ℝ) 1), P (geodesicExtension γ t)) := by + have hPa := compressed_segment_ae μ π (fun t => (hall t).1) hstay hP + filter_upwards [hpaths,hstart,hfinish,hPa] with γ hγ ha hb hp + exact ⟨hγ.1,ha,hb,hγ.2,hp⟩ + obtain ⟨γ,hγ,hinner,hbound⟩ := exists_compressed_segment μ π + (compressionBudget_ne_top K n (2*R) hC) (fun t => (hall t).1) hstay hF hFpos hgood + exact ⟨γ,hγ.1,hγ.2.1,hγ.2.2.1,hγ.2.2.2.1,hγ.2.2.2.2,hinner,hbound⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DirectionRecoveryScale.lean b/lean/OAI/Geometry/RCD/Harmonic/DirectionRecoveryScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..e26bc06be773fe7aa9854716fdf3cc0beac981cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DirectionRecoveryScale.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Harmonic.TwoCenterDirectionEstimate + +namespace OAI + +/-! # Uniform physical scaling of the constant-direction estimate -/ + +namespace RegularPointCoordinates + +noncomputable def directionRecoveryError (A V E C : ℝ) : ℝ := + 2 * A * Real.sqrt E + Real.sqrt C + A * Real.sqrt (2 * E) + Real.sqrt (2 * V) / 4 + +noncomputable def directionRecoveryConstant (A V E C G M : ℝ) : ℝ := + Real.sqrt (2 * V) + (81920 * G + 4 * M) * directionRecoveryError A V E C + +/-- The error obtained from the actual radial fits has one length factor +and one square root of the original pair source envelope. -/ +theorem direction_recovery_scaled_error {s A V E C x z p : ℝ} + (hs : 0 < s) (hA : 0 ≤ A) (hV : 0 ≤ V) (hE : 0 ≤ E) (hC : 0 ≤ C) + (hx : 0 ≤ x) (hz : 0 ≤ z) (_hp : 0 ≤ p) (hpS : p ≤ x + z) : + (2 * A * s) * Real.sqrt (E * z) + Real.sqrt (C * s ^ 2 * p) + + (A * s) * Real.sqrt (2 * (E * z) + 2 * (E * x)) + + Real.sqrt (2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x)) / 4 ≤ + s * directionRecoveryError A V E C * Real.sqrt (x + z) := by + have hS : 0 ≤ x + z := add_nonneg hx hz + have hzS : z ≤ x + z := by linarith + have hzroot := Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_left hzS hE) + simp only [Real.sqrt_mul hE] at hzroot + have hroot (c : ℝ) (hc : 0 ≤ c) : Real.sqrt (c * s ^ 2 * (x + z)) = + s * Real.sqrt c * Real.sqrt (x + z) := by + rw [show c * s ^ 2 * (x + z) = s ^ 2 * (c * (x + z)) by ring, + Real.sqrt_mul (sq_nonneg s), Real.sqrt_sq hs.le, Real.sqrt_mul hc] + ring + have hpbound := Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_left hpS + (mul_nonneg hC (sq_nonneg s))) + rw [hroot C hC] at hpbound + have heq : Real.sqrt (2 * (E * z) + 2 * (E * x)) = + Real.sqrt (2 * E) * Real.sqrt (x + z) := by + rw [show 2 * (E * z) + 2 * (E * x) = (2 * E) * (x + z) by ring, + Real.sqrt_mul (by positivity : 0 ≤ 2 * E)] + have hvq : Real.sqrt (2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x)) = + s * Real.sqrt (2 * V) * Real.sqrt (x + z) := by + rw [show 2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x) = (2 * V) * s ^ 2 * (x + z) by ring] + exact hroot (2 * V) (by positivity) + have hfirst := mul_le_mul_of_nonneg_left hzroot (by positivity : 0 ≤ 2 * A * s) + rw [heq, hvq, Real.sqrt_mul hE] + dsimp only [directionRecoveryError] + nlinarith only [hfirst, hpbound] + +/-- The reciprocal length from coefficient recovery cancels the length +in the error, leaving a uniform physical direction bound. -/ +theorem direction_recovery_scaled_bound {s A V E C G M x z p : ℝ} + (hs : 0 < s) (hA : 0 ≤ A) (hV : 0 ≤ V) (hE : 0 ≤ E) (hC : 0 ≤ C) + (hG : 0 ≤ G) (hM : 0 ≤ M) (hx : 0 ≤ x) (hz : 0 ≤ z) + (hp : 0 ≤ p) (hpS : p ≤ x + z) : + let a := 4 * (G / (s / 2048)) + let err := (2 * A * s) * Real.sqrt (E * z) + Real.sqrt (C * s ^ 2 * p) + + (A * s) * Real.sqrt (2 * (E * z) + 2 * (E * x)) + + Real.sqrt (2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x)) / 4 + Real.sqrt (2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x)) + + s * (2 * a * err) + 2 * (2 * M * err + (2 * s) * (2 * a * err)) ≤ + directionRecoveryConstant A V E C G M * s * Real.sqrt (x + z) := by + intro a err + have he := direction_recovery_scaled_error hs hA hV hE hC hx hz hp hpS + have ha : 0 ≤ a := by dsimp only [a]; positivity + have hcoeff : 0 ≤ s * (2 * a) + 4 * M + 4 * s * (2 * a) := by positivity + have hmul := mul_le_mul_of_nonneg_left he hcoeff + have hroot : Real.sqrt (2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x)) = + s * Real.sqrt (2 * V) * Real.sqrt (x + z) := by + rw [show 2 * (V * s ^ 2 * z) + 2 * (V * s ^ 2 * x) = s ^ 2 * ((2 * V) * (x + z)) by ring, + Real.sqrt_mul (sq_nonneg s), Real.sqrt_sq hs.le, + Real.sqrt_mul (by positivity : 0 ≤ 2 * V)] + ring + have hscale : (s * (2 * a) + 4 * M + 4 * s * (2 * a)) * + (s * directionRecoveryError A V E C * Real.sqrt (x + z)) = + (81920 * G + 4 * M) * s * directionRecoveryError A V E C * Real.sqrt (x + z) := by + dsimp only [a] + field_simp; ring + rw [hscale] at hmul + change (s * (2 * a) + 4 * M + 4 * s * (2 * a)) * err ≤ _ at hmul + rw [hroot] + change _ ≤ _ at hmul + dsimp only [directionRecoveryConstant] + nlinarith only [hmul] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DirectionSmallness.lean b/lean/OAI/Geometry/RCD/Harmonic/DirectionSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec02ef5334f19e6f7b31ddf4e68b37eb8ec636d8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DirectionSmallness.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.RCD.Harmonic.DirectionRecoveryScale + +namespace OAI + +/-! # One scale-independent tolerance for actual direction recovery -/ + +namespace RegularPointCoordinates + +/-- A single tolerance controls the two Gram restrictions, the radial +matrix error, and the absorption term at every positive physical radius. -/ +theorem direction_smallness_parameters (n : ℕ) (Ca D Q V G : ℝ) + (hQ : 0 ≤ Q) (hV : 0 ≤ V) (hG : 0 ≤ G) : + ∃ tau : ℝ, 0 < tau ∧ tau ≤ 1 ∧ + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (2 : ℝ) ^ n) * tau) ≤ 1 / 3 ∧ + (n : ℝ) ^ 2 * (((5 / 3 : ℝ) * (8192 : ℝ) ^ n) * tau) ≤ 1 / 2 ∧ + ∀ z E : ℝ, 0 ≤ z → z ≤ tau → 0 ≤ E → E ≤ tau → + 2 * ((n : ℝ) ^ 4 * Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + Q * z))) ≤ 1 / 4 ∧ + ∀ s : ℝ, 0 < s → + (4 * (G / (s / 2048))) * Real.sqrt (V * s ^ 2 * E) ≤ 1 / 2 := by + let L1 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * (2 : ℝ) ^ n) + let L2 := (n : ℝ) ^ 2 * ((5 / 3 : ℝ) * (8192 : ℝ) ^ n) + let a := 2 * (n : ℝ) ^ 4 * Real.sqrt (2 * Ca ^ 2 * (D ^ 2 + Q)) + let b := 8192 * G * Real.sqrt V + have hL1 : 0 ≤ L1 := by dsimp only [L1]; positivity + have hL2 : 0 ≤ L2 := by dsimp only [L2]; positivity + have ha : 0 ≤ a := by dsimp only [a]; positivity + have hb : 0 ≤ b := by dsimp only [b]; positivity + let t := 1 / (4 * (a + b + 1)) + have ht : 0 < t := by dsimp only [t]; positivity + have hteq : (a + b + 1) * t = 1 / 4 := by + dsimp only [t] + field_simp + let tau := min (1 / (3 * (L1 + 1))) (min (1 / (2 * (L2 + 1))) (min 1 (t ^ 2))) + have htau : 0 < tau := by dsimp only [tau]; positivity + have hbounds : tau ≤ 1 / (3 * (L1 + 1)) ∧ tau ≤ 1 / (2 * (L2 + 1)) ∧ + tau ≤ 1 ∧ tau ≤ t ^ 2 := by + have h : tau ≤ tau := le_rfl + simpa only [tau, le_min_iff] using h + have h1 := (le_div_iff₀ (by positivity : 0 < 3 * (L1 + 1))).mp hbounds.1 + have h2 := (le_div_iff₀ (by positivity : 0 < 2 * (L2 + 1))).mp hbounds.2.1 + have hroot : Real.sqrt tau ≤ t := by + have hh := Real.sqrt_le_sqrt hbounds.2.2.2 + simpa only [Real.sqrt_sq ht.le] using hh + refine ⟨tau, htau, hbounds.2.2.1, ?_, ?_, ?_⟩ + · have hh : L1 * tau ≤ 1 / 3 := by nlinarith only [h1, htau.le] + simpa only [L1, mul_assoc] using hh + · have hh : L2 * tau ≤ 1 / 2 := by nlinarith only [h2, htau.le] + simpa only [L2, mul_assoc] using hh + · intro z E hz hzt hE hEt + have hsum : D ^ 2 * E + Q * z ≤ (D ^ 2 + Q) * tau := by + nlinarith only [mul_le_mul_of_nonneg_left hEt (sq_nonneg D), + mul_le_mul_of_nonneg_left hzt hQ] + have hmatrix := Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_left hsum (by positivity : 0 ≤ 2 * Ca ^ 2)) + rw [show 2 * Ca ^ 2 * ((D ^ 2 + Q) * tau) = (2 * Ca ^ 2 * (D ^ 2 + Q)) * tau by ring, + Real.sqrt_mul (by positivity : 0 ≤ 2 * Ca ^ 2 * (D ^ 2 + Q))] at hmatrix + have hmatrix' := mul_le_mul_of_nonneg_left hmatrix (by positivity : 0 ≤ 2 * (n : ℝ) ^ 4) + have haroot := mul_le_mul_of_nonneg_left hroot ha + have hat : a * t ≤ 1 / 4 := by + nlinarith only [hteq, mul_nonneg hb ht.le, ht.le] + refine ⟨?_, ?_⟩ + · calc + _ ≤ a * Real.sqrt tau := by simpa only [a, mul_assoc] using hmatrix' + _ ≤ a * t := haroot + _ ≤ 1 / 4 := hat + · intro s hs + have hEroot := Real.sqrt_le_sqrt hEt + have hbt : b * t ≤ 1 / 4 := by + nlinarith only [hteq, mul_nonneg ha ht.le, ht.le] + have hbe : b * Real.sqrt E ≤ 1 / 4 := + (mul_le_mul_of_nonneg_left (hEroot.trans hroot) hb).trans hbt + have heq : (4 * (G / (s / 2048))) * Real.sqrt (V * s ^ 2 * E) = b * Real.sqrt E := by + rw [show V * s ^ 2 * E = s ^ 2 * (V * E) by ring, + Real.sqrt_mul (sq_nonneg s), Real.sqrt_sq hs.le, Real.sqrt_mul hV] + dsimp only [b] + field_simp; ring + rw [heq] + linarith only [hbe] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DirectionalToGramError.lean b/lean/OAI/Geometry/RCD/Harmonic/DirectionalToGramError.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee96b4dd71c896f2ba8bc312cde5eb6a99175c40 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DirectionalToGramError.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Sobolev.SobolevQuadraticEnergy +import OAI.Geometry.RCD.Harmonic.GramDirectionalError + +namespace OAI + +/-! # Recovering all Gram entries from directional L1 errors -/ + +open Set MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem directional_error_implies_gram (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (S : Set X) (hf : μ S ≠ ⊤) + {D : ℝ} (hD : 0 ≤ D) + (herr : ∀ z : Euclidean n, (μ.real S)⁻¹*(∫ x in S, + |localGamma μ hQ (sobolevColumnMap μ hQ u z) (sobolevColumnMap μ hQ u z) x-‖z‖^2| ∂μ) + ≤ D*‖z‖^2) : + ∀ i j : Fin n, (μ.real S)⁻¹*(∫ x in S, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ) ≤ 2*D := by + classical + have hd (i : Fin n) : (μ.real S)⁻¹*(∫ x in S, + |localGamma μ hQ (u i) (u i) x-1| ∂μ) ≤ D := by + simpa only [sobolevColumnMap_single,PiLp.norm_single,norm_one,one_pow,mul_one] + using herr (EuclideanSpace.single i 1) + intro i j + by_cases hij : i=j + · subst j + simpa using (hd i).trans (by linarith : D ≤ 2*D) + let ei : Euclidean n := EuclideanSpace.single i 1 + let ej : Euclidean n := EuclideanSpace.single j 1 + have hn : ‖ei+ej‖^2=2 := by + rw [norm_add_sq_real] + norm_num [ei,ej,EuclideanSpace.inner_single_left,hij] + have hsum : (μ.real S)⁻¹*(∫ x in S, + |localGamma μ hQ (u i+u j) (u i+u j) x-2| ∂μ) ≤ 2*D := by + have he := herr (ei+ej) + rw [hn,map_add,sobolevColumnMap_single,sobolevColumnMap_single] at he + simpa only [mul_comm] using he + have hi (g : SobolevSpace μ hQ) (a : ℝ) : + IntegrableOn (fun x => |localGamma μ hQ g g x-a|) S μ := + ((localGamma_memL1 μ hQ g g).integrableOn.sub (integrableOn_const hf)).abs + have he := localGamma_add_smul_square μ hQ (u i) (u j) 1 + simp only [one_smul,one_pow,mul_one,one_mul] at he + have hpt : ∀ᵐ x ∂μ.restrict S, + 2*|localGamma μ hQ (u i) (u j) x| ≤ + |localGamma μ hQ (u i+u j) (u i+u j) x-2|+ + (|localGamma μ hQ (u i) (u i) x-1|+|localGamma μ hQ (u j) (u j) x-1|) := by + filter_upwards [ae_restrict_of_ae he] with x hx + have habs : 2*|localGamma μ hQ (u i) (u j) x| = + |(localGamma μ hQ (u i+u j) (u i+u j) x-2)- + (localGamma μ hQ (u i) (u i) x-1)- + (localGamma μ hQ (u j) (u j) x-1)| := by + rw [hx] + have hr : localGamma μ hQ (u i) (u i) x+2*localGamma μ hQ (u i) (u j) x+ + localGamma μ hQ (u j) (u j) x-2-(localGamma μ hQ (u i) (u i) x-1)- + (localGamma μ hQ (u j) (u j) x-1)=2*localGamma μ hQ (u i) (u j) x := by ring + rw [hr,abs_mul,abs_of_pos (by norm_num : (0 : ℝ) < 2)] + rw [habs] + exact (abs_sub _ _).trans (by + have hh := abs_sub (localGamma μ hQ (u i+u j) (u i+u j) x-2) + (localGamma μ hQ (u i) (u i) x-1) + linarith) + have hint := integral_mono_ae + ((localGamma_memL1 μ hQ (u i) (u j)).abs.integrableOn.const_mul 2) + ((hi (u i+u j) 2).add ((hi (u i) 1).add (hi (u j) 1))) hpt + have hadd := integral_add (hi (u i+u j) 2) ((hi (u i) 1).add (hi (u j) 1)) + have hadd' := integral_add (hi (u i) 1) (hi (u j) 1) + simp only [Pi.add_apply] at hint hadd hadd' + rw [integral_const_mul,hadd,hadd'] at hint + have hh := mul_le_mul_of_nonneg_left hint (inv_nonneg.mpr (measureReal_nonneg : 0 ≤ μ.real S)) + simp only [ite_eq_right hij,sub_zero] + nlinarith [hd i,hd j] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DistanceQuadraticPathLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/DistanceQuadraticPathLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf0a13b5daa7aeb909de6e83d7adf4834c59cef9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DistanceQuadraticPathLimit.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.RCD.Sobolev.PoissonPathDefectLimit +import OAI.Geometry.RCD.Sobolev.DistancePoissonAbsoluteValues +import OAI.Geometry.RCD.Harmonic.InteriorQuadraticComparison + +namespace OAI + +/-! # Absolute quadratic path errors for the actual distance functions -/ + +open Set Filter Metric MeasureTheory TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} {hn : 2≤n} [SeparableSpace X] + [IsLocallyFiniteMeasure (hausdorff n X)] [(hausdorff n X).Regular] + {κ B J C : ℝ} {p : ℕ → X} {r : ℕ → ℝ} {hr : ∀ k, 0 (F.source k).real (ball (p k) (r k))/ + (hausdorff n X).real (ball (p k) (r k))) atTop (𝓝 0)) + (π : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (π k)] + (hgeo : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) + (hopt : ∀ k, IsOptimalCoupling ((π k).map (fun γ => γ 0)) ((π k).map (fun γ => γ 1)) + ((π k).map (fun γ => (γ 0,γ 1)))) + (Bπ : ℕ → ℝ≥0∞) (hBπ : ∀ k, Bπ k≠∞) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t)≤Bπ k • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k)≤r k/512) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k)≤r k/512) + (hcompression : ∀ k, (Bπ k).toReal*(hausdorff n X).real (ball (p k) (r k))≤Cπ) + (l h t : Time) (hl : 0<(l:ℝ)) (hlh : (l:ℝ) (∫ γ, |interiorQuadraticDefect + (fun x => dist (p k) x^2/2) l h t γ| ∂π k)/(r k)^2) atTop (𝓝 0) := by + let q k x := dist (p k) x^2/2 + have hstay k (s : Time) : ∀ᵐ x ∂(π k).map (fun γ => γ s), x∈ball (p k) (r k/16) := by + have hk := hr k + have hb := optimal_geodesic_plan_bounded ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) (π k) (hgeo k) (hopt k) (p k) + (by positivity : 0≤r k/512) (hs₀ k) (hs₁ k) + apply (ae_map_iff (measurable_path_eval s).aemeasurable measurableSet_ball).mpr + filter_upwards [hb] with γ hγ + have hdist := hγ.2 s + change dist (γ s) (p k) + (∫ γ, |q k (γ s)-W.representative k (γ s)| ∂π k)/(r k)^2) atTop (𝓝 0) := by + have hv := W.normalized_distance_L1_error hP hCπ hV hpoin hmass + (fun k => (π k).map (fun γ => γ s)) Bπ hBπ (fun k => hcomp k s) + (fun k => hstay k s) hcompression + convert hv using 1 + funext k + obtain ⟨L,A,hL,_hc,_he,_hA⟩ := W.representative_spec k + have hcont := hL.continuous + rw [integral_map (measurable_path_eval s).aemeasurable (by fun_prop)] + have hpoisson := W.normalized_path_error_tendsto_zero (hX := hX) (hn := hn) p₀ + hK hκ hBJ hr1 hV hr0 hmass π hgeo hopt Bπ hBπ hcomp hs₀ hs₁ hcompression l h t hl hlh hh ht + have hsum := ((hpoisson.add (hvalues t)).add (hvalues l)).add (hvalues h) + simp only [zero_add] at hsum + apply squeeze_zero (fun k => div_nonneg (integral_nonneg fun _ => abs_nonneg _) (sq_nonneg _)) _ hsum + intro k + obtain ⟨L,A,hU,hUc,_hu,_hA⟩ := W.representative_spec k + obtain ⟨M,hM⟩ := hUc.exists_bound_of_continuous hU.continuous + have hui (s : Time) : Integrable (fun γ => W.representative k (γ s)) (π k) := + Integrable.of_bound (hU.continuous.measurable.comp (measurable_path_eval s)).aestronglyMeasurable M + (Eventually.of_forall fun γ => hM (γ s)) + have hqi (s : Time) : Integrable (fun γ => q k (γ s)) (π k) := by + have hqcont : Continuous (q k) := by dsimp only [q]; fun_prop + apply Integrable.of_bound (hqcont.comp (continuous_eval_const s)).aestronglyMeasurable ((r k)^2/2) + filter_upwards [ae_of_ae_map (measurable_path_eval s).aemeasurable (hstay k s)] with γ hγ + have hdist : dist (p k) (γ s) γ 0)) (p k) (hs₀ k)) + (finiteSecondMoment_of_bounded ((π k).map (fun γ => γ 1)) (p k) (hs₁ k)) (hopt k).1 (hopt k).2.1 + have hd := path_cost_integrable (π k) hfin + have hip := interiorQuadraticDefect_integrable (π k) hU.continuous hUc hd l h t + have hiq : Integrable (interiorQuadraticDefect (q k) l h t) (π k) := + ((hqi t).sub (hqi l) |>.sub (((hqi h).sub (hqi l)).div_const _ |>.mul_const _)).sub + ((hd.mul_const _).mul_const _ |>.div_const _) + have he (s : Time) := ((hqi s).sub (hui s)).abs + have hbound := integral_mono_ae hiq.abs (((hip.abs.add (he t)).add (he l)).add (he h)) + (Eventually.of_forall fun γ => interiorQuadraticDefect_comparison (q k) (W.representative k) l h t hlh ht γ) + have hadd : (∫ γ, |interiorQuadraticDefect (W.representative k) l h t γ|+ + |q k (γ t)-W.representative k (γ t)|+|q k (γ l)-W.representative k (γ l)|+ + |q k (γ h)-W.representative k (γ h)| ∂π k)= + (∫ γ, |interiorQuadraticDefect (W.representative k) l h t γ| ∂π k)+ + (∫ γ, |q k (γ t)-W.representative k (γ t)| ∂π k)+ + (∫ γ, |q k (γ l)-W.representative k (γ l)| ∂π k)+ + (∫ γ, |q k (γ h)-W.representative k (γ h)| ∂π k) := by + have h1 := integral_add ((hip.abs.add (he t)).add (he l)) (he h) + have h2 := integral_add (hip.abs.add (he t)) (he l) + have h3 := integral_add hip.abs (he t) + simp only [Pi.add_apply,Pi.sub_apply] at h1 h2 h3 + rw [h1,h2,h3] + simp only [Pi.add_apply,Pi.sub_apply] at hbound + rw [hadd] at hbound + rw [← add_div,← add_div,← add_div] + exact div_le_div_of_nonneg_right hbound (sq_nonneg _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DualSegmentEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/DualSegmentEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..2bd243e16a43f614d19e53fd66eedd585e29c7e9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DualSegmentEnvelope.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Harmonic.QuadraticSegmentCost +import Mathlib.Topology.MetricSpace.Basic + +namespace OAI + +/-! # Exact envelope values along a saturated transport segment -/ + +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] {S : Set X} + +theorem dual_segment_envelope (f : S → ℝ) (a m : S) (b x : X) (β s : ℝ) + (hs : 0 < s) (hs1 : s ≤ 1) + (hdual : ∀ u, f u+β ≤ dist (u : X) b^2) + (ha : f a+β=dist (a : X) b^2) + (hxa : dist x (a : X)=s*dist (a : X) b) + (hxb : dist x b=(1-s)*dist (a : X) b) + (hmax : f a-dist x (a : X)^2/s ≤ f m-dist x (m : X)^2/s) : + f m-dist x (m : X)^2/s=f a-s*dist (a : X) b^2 := by + have htri := dist_triangle (m : X) x b + rw [dist_comm (m : X) x,hxb] at htri + have hq := quadratic_segment_cost dist_nonneg hs hs1 htri + have hd := hdual m + have he : f a-dist x (a : X)^2/s=f a-s*dist (a : X) b^2 := by + rw [hxa] + field_simp + rw [he] at hmax + linarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicAffineCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicAffineCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd2bcac56c7cf46861551ce6d2cb2291ab207166 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicAffineCoefficient.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Sobolev.AffineCoefficientEnergy +import OAI.Geometry.RCD.Coordinates.DyadicCovectorGrowth + +namespace OAI + +/-! # Affine nondegeneracy in the actual dyadic normalizing frame -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The exact normalization eight levels inward controls the coefficients +on the radial testing ball. Slow frame growth returns the estimate to the +frame used by the radial fit, with a constant independent of scale. -/ +theorem dyadic_affine_coefficient {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) + (hgradient : LocalHarmonicL2GradientInput hX) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ {a R ε : ℝ}, 0 ≤ a → 0 < R → a * (3 * R) ≤ 1 → + BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a) → + ∀ p : X, + ∀ (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic), + ∀ F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2), + 0 ≤ ε → ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * ε) ≤ 1 / 64 → + (∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (R / 2 ^ i)) measurableSet_ball (F i)) → + (∀ i, ∃ v : X → Euclidean (m + 2), + FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p (R / 2 ^ i) ε + (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) v) → + ∀ i, -κ ≤ K * ((R / 2 ^ i) / 128) ^ 2 → + ∀ (b : Euclidean (m + 2)) (w : SobolevSpace (hausdorff (m + 2) X) hX.quadratic) (c : ℝ), + IsSobolevHarmonicOn (hausdorff (m + 2) X) hX.quadratic (ball p ((R / 2 ^ i) / 128)) w → + SobolevSpace.toLp (hausdorff (m + 2) X) hX.quadratic + (w - sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u b) =ᵐ[ + (hausdorff (m + 2) X).restrict (ball p ((R / 2 ^ i) / 128))] (fun _ => c) → + ‖(F i).symm b‖ ^ 2 ≤ (C / ((R / 2 ^ i) / 128)) ^ 2 * + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p ((R / 2 ^ i) / 128)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball p ((R / 2 ^ i) / 128)) w)‖ ^ 2 := by + obtain ⟨C₀, hC₀, hcoef⟩ := hgradient.affine_coefficient (by omega) hκ + let C := C₀ * (9 / 8 : ℝ) ^ 8 + have hpow : (1 : ℝ) ≤ (9 / 8 : ℝ) ^ 8 := one_le_pow₀ (by norm_num) + have hC : 1 ≤ C := by + exact (show (1 : ℝ) = 1 * 1 by norm_num).trans_le + (mul_le_mul hC₀ hpow (by norm_num) (zero_le_one.trans hC₀)) + refine ⟨C, hC, ?_⟩ + intro a R ε ha hR hscale hBG p u F hε hsmall hexact hfirst i hcurv b w c hw hc + have hgrowth := dyadic_covector_norm_growth (m + 1) hX ha hBG u p hR hscale hε hsmall + F hexact hfirst i 8 b + have hrad : R / (2 : ℝ) ^ (i + 8) = ((R / 2 ^ i) / 128) / 2 := by + rw [pow_add] + norm_num + ring + have hn := hcoef p ((R / 2 ^ i) / 128) (by positivity) hcurv u (F (i + 8)) + (by rw [← hrad]; exact hexact (i + 8)) b w c hw hc + have hsq : ‖(F i).symm b‖ ^ 2 ≤ ((9 / 8 : ℝ) ^ 8) ^ 2 * ‖(F (i + 8)).symm b‖ ^ 2 := by + rw [← mul_pow] + exact (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr hgrowth + apply hsq.trans + have hh := mul_le_mul_of_nonneg_left hn (sq_nonneg ((9 / 8 : ℝ) ^ 8)) + convert hh using 1 + dsimp only [C] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicCenteredRadial.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicCenteredRadial.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd2294959e9029f7556fa99fa342d119ea06d78b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicCenteredRadial.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.RCD.Coordinates.CanonicalCenteredFits + +namespace OAI + +/-! # Centered radial fits with the actual summable Poisson defect -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The original distance replacements, common harmonic map and exact +normalizing frames produce centered radial fits with the two-convolution +Poisson envelope. No radial-fit estimate is assumed. -/ +theorem dyadic_centered_radial_estimate {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) + {a κ r0 B J C A Cχ L δ : ℝ} {p : X} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) + (hr01 : r0 ≤ 1) (hscale : a * (3 * r0) ≤ 1) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + {d : ℕ} (hd : 0 < d) + (hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)) + (hmean : LocalHarmonicL2MeanValueInput hX) {κ₀ ε : ℝ} (hκ₀ : 0 ≤ κ₀) + (V : X → Euclidean (m + 2)) + (hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) : + ∃ D : ℝ, 0 < D ∧ ∀ b : Euclidean (m + 2), b ≠ 0 → + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪V p, A i⟫_ℝ| ≤ D * (distanceSourceRadius r0 i / 64) * + ‖(F i).symm b‖ * Real.sqrt (pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i)) ∧ + (∀ i, ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b - + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (-⟪V p, A i⟫_ℝ, A i))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * + Real.sqrt (pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i)) := by + obtain ⟨Z, hZ, hfits⟩ := dyadic_radial_fit_summability m hX hhessian ha hκ hK hB hJ hA hCχ + hr01 hscale hBG S T hP hquarter u hbase F v hδ hδ1 hsmall hexact hfirst hmetric hf χ hd hfit + have hη : 0 ≤ radialFitQualitativeConstant (m + 2) Cχ * δ := + mul_nonneg (radialFitQualitativeConstant_nonneg (m + 2) hCχ) hδ + have hPN := normalizedPoissonDefect_nonneg (hausdorff (m + 2) X) hX.quadratic S hκ + have hQ := forwardDefect_nonneg (by norm_num : (0 : ℝ) ≤ 3 / 4) hη hPN + have hQs := (forwardDefect_budget (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hη hPN hP).1 + exact canonical_centered_fits_of_squared_bound m hX hmean hκ₀ ha hδ hBG + S T u V hu hbase hscale hsmall F v hexact hfirst hcurv hquarter hZ + (forwardDefect (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + hQ hQs (fun b hb => (hfits b hb).1) + +/-- The envelope used above is summable with its original full Poisson +budget. The two fixed geometric convolutions cost the explicit factor 64. -/ +theorem radial_fit_pinching_envelope_budget {μ : Measure X} {hQ : QuadraticCheegerEnergy μ} + [IsFiniteMeasureOnCompacts μ] + {n : ℕ} {κ r0 Cχ δ : ℝ} {p : X} + (S : DyadicDistanceSources μ hQ n κ p r0) + (hκ : 0 ≤ κ) (hCχ : 0 ≤ Cχ) (hδ : 0 ≤ δ) + (hP : Summable (normalizedPoissonDefect μ hQ S)) : + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant n Cχ * δ) + (normalizedPoissonDefect μ hQ S) + Summable E ∧ (∑' i, E i) ≤ + 64 * (radialFitQualitativeConstant n Cχ * δ + ∑' i, normalizedPoissonDefect μ hQ S i) ∧ + ∀ i, 0 ≤ E i ∧ normalizedPoissonDefect μ hQ S i ≤ E i := by + dsimp only + have hη := mul_nonneg (radialFitQualitativeConstant_nonneg n hCχ) hδ + have hPN := normalizedPoissonDefect_nonneg μ hQ S hκ + have hQn := forwardDefect_nonneg (by norm_num : (0 : ℝ) ≤ 3 / 4) hη hPN + obtain ⟨hQs, hQsum⟩ := forwardDefect_budget (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hη hPN hP + obtain ⟨hEs, hEsum⟩ := symmetricDefect_budget (by norm_num : (0 : ℝ) ≤ 7 / 8) + (by norm_num : (7 / 8 : ℝ) < 1) hQn hQs + refine ⟨hEs, ?_, fun i => ⟨symmetricDefect_nonneg (by norm_num) hQn i, ?_⟩⟩ + · have hh := hEsum.trans (mul_le_mul_of_nonneg_left hQsum (by norm_num)) + norm_num at hh + simpa only [pinchingEnvelope, ← mul_assoc, show (16 : ℝ) * 4 = 64 by norm_num] using hh + · exact (le_forwardDefect (by norm_num) hη hPN i).trans + (le_symmetricDefect (by norm_num) (by norm_num) hQn hQs i) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicDistanceReplacements.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicDistanceReplacements.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c228929b98655e926b0e7c34f1dd91b39467782 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicDistanceReplacements.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.RCD.Sobolev.DirichletSobolevInput +import OAI.Geometry.RCD.Metric.DyadicDistanceSources + +namespace OAI + +/-! # Actual dyadic Poisson replacements with uniform constants -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +private theorem curvature_lower_bound_mono {K r R : ℝ} (hr : 0 ≤ r) (hrR : r ≤ R) + (hcurv : -1 ≤ K * R ^ 2) : -1 ≤ K * r ^ 2 := by + by_cases hK : 0 ≤ K + · exact (by norm_num : (-1 : ℝ) ≤ 0).trans (mul_nonneg hK (sq_nonneg _)) + · have hsq : r ^ 2 ≤ R ^ 2 := (sq_le_sq₀ hr (hr.trans hrR)).mpr hrR + exact hcurv.trans (mul_le_mul_of_nonpos_left hsq (le_of_not_ge hK)) + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- These are actual solutions for the sources in `S`, not replacement +existence or error estimates supplied as additional assumptions. -/ +structure DyadicDistanceReplacements {n : ℕ} {κ r0 : ℝ} {p : X} + (S : DyadicDistanceSources μ hQ n κ p r0) (B J C : ℝ) where + cutoff : ∀ i, GoodLaplacianCutoff μ hQ p (4 * distanceSourceRadius r0 i) C + replacement : ℕ → SobolevSpace μ hQ + boundary : ∀ i, replacement i - positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i) ∈ + SobolevSpace.dirichlet μ hQ (ball p (distanceSourceRadius r0 i)) + laplacian : ∀ i, IsConstantLaplacianOn μ hQ (ball p (distanceSourceRadius r0 i)) + (replacement i) ((n : ℝ) + κ * (4 * distanceSourceRadius r0 i) ^ 2) + height : ∀ i, ∀ᵐ x ∂μ, + 0 ≤ SobolevSpace.toLp μ hQ (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i) - replacement i) x ∧ + SobolevSpace.toLp μ hQ (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i) - replacement i) x ≤ + B * (distanceSourceRadius r0 i) ^ 2 + gradient_error : ∀ i, + (∫ x in ball p (distanceSourceRadius r0 i), SobolevSpace.minimalSlope μ hQ + (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i) - replacement i) x ∂μ) ≤ + (S.source i).real (ball p (distanceSourceRadius r0 i)) * distanceSourceRadius r0 i * J + energy_error : ∀ i, + (∫ x, (SobolevSpace.minimalSlope μ hQ + (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i) - replacement i) x) ^ 2 ∂μ) ≤ + (S.source i).real (ball p (distanceSourceRadius r0 i)) * (B * (distanceSourceRadius r0 i) ^ 2) + density_error : ∀ i, + (∫ x in ball p (distanceSourceRadius r0 i), + |(1 / 2 : ℝ) * localGamma μ hQ (replacement i) (replacement i) x - + (1 / 2 : ℝ) * localGamma μ hQ + (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i)) + (positiveSquaredDistance μ hQ + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) (cutoff i)) x| ∂μ) ≤ + (J + B / 2) * (distanceSourceRadius r0 i) ^ 2 * + (S.source i).real (ball p (distanceSourceRadius r0 i)) + +omit [IsFiniteMeasureOnCompacts μ] in +/-- The constants precede the center, root radius and selected source +family, allowing the same constants in the two-center radial argument. -/ +theorem dyadic_distance_replacements_of_published {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hsobolev : LocalDirichletSobolevInput hX) (hcutoff : LocalGoodCutoffInput hX) + {κ : ℝ} (hκ : 0 ≤ κ) : + letI : IsLocallyFiniteMeasure (hausdorff n X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ B J Cχ : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ Cχ ∧ ∀ (p : X) (r0 : ℝ) + (S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0), + r0 ≤ 1 → + (∀ i, -1 ≤ K * (64 * distanceSourceRadius r0 i) ^ 2) → + (∀ i, 0 < (hausdorff n X).real (ball p (distanceSourceRadius r0 i))) → + (∀ i, 2 * (hausdorff n X).real (ball p (distanceSourceRadius r0 i)) ≤ + (hausdorff n X).real (ball p (2 * distanceSourceRadius r0 i))) → + Nonempty (DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J Cχ) := by + let : IsLocallyFiniteMeasure (hausdorff n X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨d, C, hd, hC, hsob⟩ := hsobolev hn + obtain ⟨Cχ, hCχ, hχ⟩ := hcutoff hn + obtain ⟨H, hH, hsolve⟩ := normalized_distance_poisson_estimates (hausdorff n X) hX.quadratic hd hC + let B := 1 / 2 + ((n : ℝ) + 16 * κ) * H + let J := Real.sqrt (balancedGradientConstant d ((1 + d) / 2) * C) + have hB : 0 < B := by dsimp only [B]; positivity + have hJ : 0 < J := Real.sqrt_pos.mpr + (mul_pos (balancedGradientConstant_pos (by linarith) (by linarith)) hC) + refine ⟨B, J, Cχ, hB, hJ, hCχ, ?_⟩ + intro p r0 S hr01 hcurv hvol hdouble + have hex (i : ℕ) : ∃ χ : GoodLaplacianCutoff (hausdorff n X) hX.quadratic p + (4 * distanceSourceRadius r0 i) Cχ, + ∃ f : SobolevSpace (hausdorff n X) hX.quadratic, + let q := positiveSquaredDistance (hausdorff n X) hX.quadratic + (by have := distanceSourceRadius_pos S.radius_pos i; positivity) χ + f - q ∈ SobolevSpace.dirichlet (hausdorff n X) hX.quadratic (ball p (distanceSourceRadius r0 i)) ∧ + IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball p (distanceSourceRadius r0 i)) f + ((n : ℝ) + κ * (4 * distanceSourceRadius r0 i) ^ 2) ∧ + (∀ᵐ x ∂hausdorff n X, 0 ≤ SobolevSpace.toLp (hausdorff n X) hX.quadratic (q - f) x ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic (q - f) x ≤ B * (distanceSourceRadius r0 i) ^ 2) ∧ + (∫ x in ball p (distanceSourceRadius r0 i), + SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (q - f) x ∂hausdorff n X) ≤ + (S.source i).real (ball p (distanceSourceRadius r0 i)) * distanceSourceRadius r0 i * J ∧ + (∫ x, (SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (q - f) x) ^ 2 ∂hausdorff n X) ≤ + (S.source i).real (ball p (distanceSourceRadius r0 i)) * (B * (distanceSourceRadius r0 i) ^ 2) ∧ + (∫ x in ball p (distanceSourceRadius r0 i), + |(1 / 2 : ℝ) * localGamma (hausdorff n X) hX.quadratic f f x - + (1 / 2 : ℝ) * localGamma (hausdorff n X) hX.quadratic q q x| ∂hausdorff n X) ≤ + (J + B / 2) * (distanceSourceRadius r0 i) ^ 2 * + (S.source i).real (ball p (distanceSourceRadius r0 i)) := by + let r := distanceSourceRadius r0 i + have hr : 0 < r := distanceSourceRadius_pos S.radius_pos i + have hrle : r ≤ 1 := by + have ho := distanceSourceRadius_outer_le S.radius_pos.le i + change 2 * r ≤ r0 at ho + linarith + have h4 := curvature_lower_bound_mono (by positivity : 0 ≤ 4 * r) (by linarith : 4 * r ≤ 64 * r) (hcurv i) + obtain ⟨χ⟩ := hχ p (4 * r) (by positivity) h4 + let _ := S.finite i + have hpoin := hX.annular_dirichlet_poincare hn p hr hrle (hvol i) (hdouble i) + have hsource := positiveSquaredDistance_source (hausdorff n X) hX.quadratic + (by positivity : 0 ≤ 4 * r) χ (by linarith : r ≤ 4 * r) (S.source i) (S.defect i) + obtain ⟨f, hfq, hf, hh, hg, he, hdens⟩ := hsolve p r (4 * r) Cχ (by positivity) χ + hr (by linarith) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (hvol i) + (annularPoincareConstant K n * r ^ 2) (mul_nonneg (annularPoincareConstant_pos K n).le (sq_nonneg r)) + hpoin (hsob p r hr (hcurv i) (hdouble i)) (S.eikonal i) + ((n : ℝ) + κ * (4 * r) ^ 2) (by positivity) (S.source i) (S.finite i) hsource + have haB : 1 / 2 + ((n : ℝ) + κ * (4 * r) ^ 2) * H ≤ B := by + have hrsq : r ^ 2 ≤ 1 := by nlinarith + have hb := mul_le_mul_of_nonneg_left hrsq hκ + dsimp only [B] + nlinarith + have hmass : 0 ≤ (S.source i).real (ball p r) := measureReal_nonneg + refine ⟨χ, f, hfq, hf, ?_, hg, ?_, ?_⟩ + · exact hh.mono fun x hx => ⟨hx.1, hx.2.trans (mul_le_mul_of_nonneg_right haB (sq_nonneg r))⟩ + · exact he.trans (mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right haB (sq_nonneg r)) hmass) + · exact hdens.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (add_le_add (le_refl J) + (div_le_div_of_nonneg_right haB (by norm_num : (0 : ℝ) ≤ 2))) + (sq_nonneg r)) hmass) + choose χ f hfq hf hh hg he hdens using hex + exact ⟨⟨χ, f, hfq, hf, hh, hg, he, hdens⟩⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..79a566030117666a03fdc3fb66f715242b4af13d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialCoefficient.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.RCD.Harmonic.DyadicAffineCoefficient +import OAI.Geometry.RCD.Coordinates.NormalizedRadialCandidate +import OAI.Geometry.RCD.Harmonic.CenteredAffineDifference +import OAI.Geometry.RCD.Harmonic.DyadicRadialTargets + +namespace OAI + +/-! # Near-identity coefficient estimates for the actual centered radial fits -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The error of an actual centered fit bounds its coefficient error from +the identity covector. The reference candidate is the original coordinate +function, whose quantitative error has already been proved. -/ +theorem dyadic_radial_coefficient_bound {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hgradient : LocalHarmonicL2GradientInput hX) + {a κ r0 B J C Cχ L δ κ₀ ε D : ℝ} {p : X} + (ha : 0 ≤ a) (hCχ : 0 ≤ Cχ) (hκ₀ : 0 ≤ κ₀) (hD : 0 ≤ D) + (hscale : a * (3 * r0) ≤ 1) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (V : X → Euclidean (m + 2)) + (hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) : + ∃ Ca : ℝ, 1 ≤ Ca ∧ ∀ (b : Euclidean (m + 2)) + (coeff : ℕ → Euclidean (m + 2)) (E : ℕ → ℝ), + (∀ i, 0 ≤ E i) → + (∀ i, + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b - + SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 64)) + (centeredAffineSobolev (hausdorff (m + 2) X) hX.quadratic u (χ i).sobolev (V p) (coeff i)))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * Real.sqrt (E i)) → + ∀ i, + ‖(F i).symm (coeff i - b)‖ ^ 2 ≤ + 2 * Ca ^ 2 * (D ^ 2 * E i + radialFitQualitativeConstant (m + 2) Cχ * δ) * + ‖(F i).symm b‖ ^ 2 := by + let μ := hausdorff (m + 2) X + let hQ := hX.quadratic + let _ := hX.openPos K (m + 2) + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have htest (i : ℕ) : (r0 / (2 : ℝ) ^ i) / 128 = r i := by + dsimp only [r, distanceSourceRadius] + rw [pow_succ] + ring + obtain ⟨Ca, hCa, hcoef⟩ := dyadic_affine_coefficient m hX hgradient hκ₀ + have hcoef' := hcoef ha S.radius_pos hscale hBG p u F hδ hsmall + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨v i, by simpa only [hrad] using hfirst i⟩) + refine ⟨Ca, hCa, ?_⟩ + intro b coeff E hE hfit i + have hri := hr i + have hs := distanceSourceRadius_pos S.radius_pos i + have hle := distanceSourceRadius_outer_le S.radius_pos.le i + have hsub : ball p (r i) ⊆ ball p r0 := ball_subset_ball (by dsimp only [r]; linarith) + have hsub2 : ball p (2 * distanceSourceRadius r0 i) ⊆ ball p r0 := ball_subset_ball hle + let H := centeredAffineSobolev μ hQ u (χ i).sobolev (V p) (coeff i) + let H₀ := centeredAffineSobolev μ hQ u (T.cutoff i).sobolev (V p) b + have hη : SobolevSpace.toLp μ hQ (χ i).sobolev =ᵐ[μ.restrict (ball p (r i))] fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (χ i).representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans ((χ i).one x hxr) + have hζ : SobolevSpace.toLp μ hQ (T.cutoff i).sobolev =ᵐ[μ.restrict (ball p (r i))] fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff i).representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans ((T.cutoff i).one x ((ball_subset_ball (by dsimp only [r]; linarith)) hxr)) + have hhu (j : Fin (m + 2)) := (hu.harmonic j).mono μ hQ hsub + have hH := centeredAffineSobolev_harmonic μ hQ u (χ i).sobolev (V p) (coeff i) _ hhu + (isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball _ 1 hη) + have hH₀ := centeredAffineSobolev_harmonic μ hQ u (T.cutoff i).sobolev (V p) b _ hhu + (isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball _ 1 hζ) + have hcand := T.normalized_radial_candidate μ hQ i (euclideanUnitVolume_pos (m + 2)) + hδ hδ1 hCχ (fun t ht hts => hquarter t ht (hts.trans hle)) u (F i) V (v i) + (hu.continuous.mono hsub2) (fun j => ae_restrict_of_ae_restrict_of_subset hsub2 (hu.representative j)) + (hfirst i) (hmetric i) (χ i) b + (gamma_column_le_of_diagonal_bounds μ hQ u _ L (hbase i) b) + dsimp only at hcand + have hfit2 := (sq_le_sq₀ (norm_nonneg _) + (show 0 ≤ D * r i * ‖(F i).symm b‖ * Real.sqrt (E i) by positivity)).mpr (hfit i) + rw [mul_pow, mul_pow, mul_pow, Real.sq_sqrt (hE i)] at hfit2 + have hdiff := normalized_two_fit_difference μ hQ + (ne_of_lt (hX.finiteOnBounded (ball p (r i)) isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b) H H₀ hfit2 hcand + have hci := hcoef' i + rw [htest] at hci + have hb := hci (hcurv i) (coeff i - b) (H - H₀) (-⟪V p, coeff i - b⟫_ℝ) + (by simpa only [sub_eq_add_neg, neg_one_smul] using + hH.add μ hQ (hH₀.smul μ hQ (-1))) + (centeredAffineSobolev_difference_constant μ hQ u _ (χ i).sobolev (T.cutoff i).sobolev + (V p) (coeff i) b hη hζ) + apply hb.trans + have hh := mul_le_mul_of_nonneg_left hdiff (sq_nonneg (Ca / r i)) + convert hh using 1 + field_simp [hri.ne'] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialMatrices.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialMatrices.lean new file mode 100644 index 0000000000000000000000000000000000000000..41805f1f4e75c8a5d120c4a49cd44da5621b37a5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialMatrices.lean @@ -0,0 +1,141 @@ +import OAI.Geometry.RCD.Sobolev.DyadicRadialEnergy +import OAI.Geometry.RCD.Harmonic.DyadicRadialCoefficient +import OAI.Geometry.RCD.Coordinates.RadialCoefficientMatrix + +namespace OAI + +/-! # The actual dyadic radial matrices and their common error bounds -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Stacking the actual scalar fits gives a radial matrix close to the +identity and bounds for the values and gradients of its Poisson residual. +All constants are uniform in the scale and in the selected basis row. -/ +theorem dyadic_radial_matrices {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) + {a κ r0 B J C A Cχ L δ : ℝ} {p : X} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) + (hr01 : r0 ≤ 1) (hscale : a * (3 * r0) ≤ 1) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + {d : ℕ} (hd : 0 < d) + (hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)) + (hmean : LocalHarmonicL2MeanValueInput hX) {κ₀ ε : ℝ} (hκ₀ : 0 ≤ κ₀) + (V : X → Euclidean (m + 2)) + (hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) + (hgradient : LocalHarmonicL2GradientInput hX) : + ∃ Cg D Ca : ℝ, 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ ∀ i, + ∃ coeff : Fin (m + 2) → Euclidean (m + 2), + ∃ g : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic, + let μ := hausdorff (m + 2) X + let s := distanceSourceRadius r0 i + let r := s / 64 + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect μ hX.quadratic S) i + ‖Matrix.toEuclideanCLM (n := Fin (m + 2)) (𝕜 := ℝ) (radialCoefficientMatrix (F i) coeff) - + ContinuousLinearMap.id ℝ (Euclidean (m + 2))‖ ≤ + ((m + 2 : ℕ) : ℝ) ^ 2 * + Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant (m + 2) Cχ * δ)) ∧ + ∀ j, + let H := centeredAffineSobolev μ hX.quadratic u (χ i).sobolev (V p) (coeff j) + (SobolevSpace.toLp μ hX.quadratic (g j) =ᵐ[μ.restrict (ball p r)] + localGamma μ hX.quadratic (T.replacement i) + (sobolevColumnMap μ hX.quadratic u (F i (EuclideanSpace.single j 1)))) ∧ + ‖normalizeLocalL2 μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball p r) (g j - H))‖ ^ 2 ≤ + (2 * D ^ 2 + 8192 * (((m + 2 : ℕ) : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume (m + 2))) * (64 : ℝ) ^ (m + 2))) * r ^ 2 * E ∧ + (μ.real (ball p (r / 2)))⁻¹ * + (∫ x in ball p (r / 2), localGamma μ hX.quadratic (g j - H) (g j - H) x ∂μ) ≤ + radialEnergyConstant K (m + 2) Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume (m + 2))) * (128 : ℝ) ^ (m + 2)) * E := by + classical + let μ := hausdorff (m + 2) X + let hQ := hX.quadratic + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect μ hQ S) + obtain ⟨Cg, D, hCg, hD, hscalar⟩ := dyadic_radial_value_energy m hX hhessian + ha hκ hK hB hJ hA hCχ hr01 hscale hBG S T hP hquarter u hbase F v hδ hδ1 hsmall + hexact hfirst hmetric hf χ hd hfit hmean hκ₀ V hu hcurv hgradient + obtain ⟨Ca, hCa, hcoeff⟩ := dyadic_radial_coefficient_bound m hX hgradient + ha hCχ hκ₀ hD.le hscale hBG S T hquarter u hbase F v hδ hδ1 hsmall + hexact hfirst hmetric χ V hu hcurv + obtain ⟨_, _, hE⟩ := radial_fit_pinching_envelope_budget S hκ hCχ hδ hP + refine ⟨Cg, D, Ca, hCg, hD, hCa, ?_⟩ + intro i + have hchoose (j : Fin (m + 2)) : + ∃ a : Euclidean (m + 2), ∃ g : SobolevSpace μ hQ, + ‖(F i).symm (a - F i (EuclideanSpace.single j 1))‖ ^ 2 ≤ + 2 * Ca ^ 2 * (D ^ 2 * E i + radialFitQualitativeConstant (m + 2) Cχ * δ) ∧ + let r := distanceSourceRadius r0 i / 64 + let H := centeredAffineSobolev μ hQ u (χ i).sobolev (V p) a + (SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict (ball p r)] + localGamma μ hQ (T.replacement i) + (sobolevColumnMap μ hQ u (F i (EuclideanSpace.single j 1)))) ∧ + ‖normalizeLocalL2 μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p r) (g - H))‖ ^ 2 ≤ + (2 * D ^ 2 + 8192 * (((m + 2 : ℕ) : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume (m + 2))) * (64 : ℝ) ^ (m + 2))) * r ^ 2 * E i ∧ + (μ.real (ball p (r / 2)))⁻¹ * + (∫ x in ball p (r / 2), localGamma μ hQ (g - H) (g - H) x ∂μ) ≤ + radialEnergyConstant K (m + 2) Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume (m + 2))) * (128 : ℝ) ^ (m + 2)) * E i := by + let b := F i (EuclideanSpace.single j 1) + have hb : b ≠ 0 := by + intro hz + have he := congrArg (fun w => ((F i).symm w) j) hz + simp [b] at he + obtain ⟨a, g, hall⟩ := hscalar b hb + have ha := hcoeff b a E (fun k => (hE k).1) (fun k => (hall k).2.1) i + have hi := hall i + have hunit : ‖(F i).symm b‖ = 1 := by simp [b] + rw [hunit] at ha hi + simp only [one_pow, mul_one] at ha hi + refine ⟨a i, g i, ?_, ?_⟩ + · exact ha + · exact ⟨hi.1, hi.2.2.1, hi.2.2.2⟩ + choose coeff g hrow using hchoose + refine ⟨coeff, g, ?_, fun j => (hrow j).2⟩ + apply radialCoefficientMatrix_sub_id_norm _ _ (Real.sqrt_nonneg _) + intro j + have hh := Real.sqrt_le_sqrt (hrow j).1 + simpa only [Real.sqrt_sq (norm_nonneg _)] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialSummability.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialSummability.lean new file mode 100644 index 0000000000000000000000000000000000000000..fec72eda85aafb308fa05b9ce6f2e01abe6d7761 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialSummability.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRadialFitEstimates +import OAI.Geometry.RCD.Coordinates.DyadicCovectorGrowth +import OAI.Geometry.RCD.Coordinates.RadialFitEnvelope + +namespace OAI + +/-! # Summable errors for the actual radial derivative and original covectors -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The actual distance replacements and the same dyadic normalizing +frames give summable normalized squared fit errors. All analytic error +terms are the original Poisson defect; no radial estimate is assumed. -/ +theorem dyadic_radial_fit_summability {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) + {a κ r0 B J C A Cχ L δ : ℝ} {p : X} + (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) + (hr01 : r0 ≤ 1) (hscale : a * (3 * r0) ≤ 1) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (hδ : 0 ≤ δ) + (hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + {d : ℕ} (hd : 0 < d) + (hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)) : + ∃ Z : ℝ, 0 < Z ∧ ∀ b : Euclidean (m + 2), b ≠ 0 → + (∀ i, (dyadicRadialFit hX T u L hbase i b) ^ 2 ≤ + Z * forwardDefect (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i * ‖(F i).symm b‖ ^ 2) ∧ + Summable (fun i => (dyadicRadialFit hX T u L hbase i b / ‖(F i).symm b‖) ^ 2) ∧ + (∑' i, (dyadicRadialFit hX T u L hbase i b / ‖(F i).symm b‖) ^ 2) ≤ + 4 * Z * (radialFitQualitativeConstant (m + 2) Cχ * δ + + ∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S i) := by + let μ := hausdorff (m + 2) X + let P := normalizedPoissonDefect μ hX.quadratic S + let E := dyadicRadialFit hX T u L hbase + let η := radialFitQualitativeConstant (m + 2) Cχ * δ + have hη : 0 ≤ η := mul_nonneg (radialFitQualitativeConstant_nonneg (m + 2) hCχ) hδ + have hδle : δ ≤ 1 := by + have hh := mul_le_mul_of_nonneg_right (radialNormalizationRestrictionConstant_ge_one (m + 2)) hδ + linarith + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hfirst' (i : ℕ) : ∃ w : X → Euclidean (m + 2), + FirstOrderSplittingOn μ hX.quadratic p (r0 / 2 ^ i) δ + (transformedColumn μ hX.quadratic u (F i)) w := by + exact ⟨v i, by simpa only [hrad] using hfirst i⟩ + have hgrowth := dyadic_covector_norm_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) hfirst' + obtain ⟨Z, hZ, henv⟩ := radial_fit_forward_envelope hd + (radialFitStepConstant_nonneg K (m + 2) A B J Cχ d) + refine ⟨Z, hZ, ?_⟩ + intro b hb + have hw (i : ℕ) : 0 < ‖(F i).symm b‖ := by + apply norm_pos_iff.mpr + intro hz + apply hb + have he := congrArg (F i) hz + simpa only [ContinuousLinearEquiv.apply_symm_apply, map_zero] using he + have hPN (i : ℕ) : 0 ≤ P i := normalizedPoissonDefect_nonneg μ hX.quadratic S hκ i + have hqual (i : ℕ) : (E i b) ^ 2 ≤ η * ‖(F i).symm b‖ ^ 2 := by + apply dyadicRadialFit_smallness hX T u hbase hδ hδ1 hCχ i (F i) (v i) + (hfirst i) (hmetric i) (χ i) + intro t ht hts + exact hquarter t ht (hts.trans (distanceSourceRadius_outer_le S.radius_pos.le i)) + have hstep (i : ℕ) : E (i + d) b ≤ + (1 / 2 : ℝ) * Real.sqrt ((1 / 2 : ℝ) ^ d) * E i b + + radialFitStepConstant K (m + 2) A B J Cχ d * ‖(F i).symm b‖ * Real.sqrt (P i) := by + have hs := distanceSourceRadius_pos S.radius_pos i + have hsle : distanceSourceRadius r0 i ≤ r0 := by + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + linarith + have hsub : ball p (distanceSourceRadius r0 i / 4) ⊆ ball p (2 * distanceSourceRadius r0 i) := + ball_subset_ball (by linarith) + have hu1 := (hfirst i).mono_error μ hX.quadratic hδ hδle + have hann := relative_volume_annulus (show 2 ≤ m + 2 by omega) + (show 0 < distanceSourceRadius r0 i / 64 by positivity) (euclideanUnitVolume_pos (m + 2)) + (hquarter (distanceSourceRadius r0 i / 64) (by positivity) (by linarith)) + (hquarter (2 * (distanceSourceRadius r0 i / 64)) (by positivity) (by linarith)) + exact dyadicRadialFit_step hX T u hbase (by omega) hhessian hκ hK hB hJ hA hCχ i + (hsle.trans hr01) (F i) (fun j => (hu1.harmonic j).mono μ hX.quadratic hsub) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hu1.gradient j)) (hf i) (χ i) + hann.1 hann.2 d (hfit i) (fun t ht hts => hquarter t ht (hts.trans hsle)) b + have hbound := henv hη hPN (fun i => dyadicRadialFit_nonneg hX T u L hbase i b) hw hqual + (fun i => hgrowth i d b) hstep + have hbudget := normalized_squared_fit_budget (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hη hZ.le hPN hP hw hbound + refine ⟨hbound, hbudget.1, ?_⟩ + simpa only [show (1 - (3 / 4 : ℝ))⁻¹ = 4 by norm_num, mul_comm Z 4] using hbudget.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialTargets.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialTargets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a33d58d15ee04148ffd080fa68d3d090f9709667 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRadialTargets.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.DyadicRadialFit + +namespace OAI + +/-! # Compatible local L2 targets for consecutive actual affine fits -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + [IsFiniteMeasureOnCompacts (hausdorff n X)] + {κ r0 B J C L : ℝ} {p : X} + {S : DyadicDistanceSources (hausdorff n X) hX.quadratic n κ p r0} + (T : DyadicDistanceReplacements (hausdorff n X) hX.quadratic S B J C) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff n X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + +def dyadicRadialTarget (i : ℕ) (b : Euclidean n) : + Lp ℝ 2 ((hausdorff n X).restrict (ball p (distanceSourceRadius r0 i / 64))) := + radialPairingLp (hausdorff n X) hX.quadratic (ball p (distanceSourceRadius r0 i / 64)) + (T.distanceDatum (hausdorff n X) hX.quadratic i) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b) + (gamma_column_le_of_diagonal_bounds (hausdorff n X) hX.quadratic u _ L (hbase i) b) + +theorem dyadicRadialTarget_residual_norm (i : ℕ) (b : Euclidean n) : + ‖normalizeLocalL2 (hausdorff n X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic u (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b))‖ = + (distanceSourceRadius r0 i / 64) * dyadicRadialFit hX T u L hbase i b := by + unfold dyadicRadialTarget dyadicRadialFit radialFitError + field_simp [(distanceSourceRadius_pos S.radius_pos i).ne'] + +/-- Although the compact distance primitives change with scale, their +actual radial derivatives agree under restriction. -/ +theorem dyadicRadialTarget_restrict {i j : ℕ} (hij : i ≤ j) (b : Euclidean n) : + let hsub := ball_subset_ball (div_le_div_of_nonneg_right + (distanceSourceRadius_antitone S.radius_pos.le hij) (by norm_num : (0 : ℝ) ≤ 64)) + localL2Restriction (hausdorff n X) (ball p (distanceSourceRadius r0 i / 64)) + (ball p (distanceSourceRadius r0 j / 64)) hsub (dyadicRadialTarget hX T u hbase i b) = + dyadicRadialTarget hX T u hbase j b := by + dsimp only + let μ := hausdorff n X + let a := sobolevColumnMap μ hX.quadratic u b + have hsub : ball p (distanceSourceRadius r0 j / 64) ⊆ ball p (distanceSourceRadius r0 i / 64) := + ball_subset_ball (div_le_div_of_nonneg_right + (distanceSourceRadius_antitone S.radius_pos.le hij) (by norm_num)) + have hi := gamma_column_le_of_diagonal_bounds μ hX.quadratic u _ L (hbase i) b + have hj := gamma_column_le_of_diagonal_bounds μ hX.quadratic u _ L (hbase j) b + have hit := ae_restrict_of_ae_restrict_of_subset hsub hi + change localL2Restriction μ _ _ hsub (radialPairingLp μ hX.quadratic _ _ a hi) = + radialPairingLp μ hX.quadratic _ _ a hj + rw [radialPairingLp_restrict μ hX.quadratic hsub _ a hi hit] + exact radialPairingLp_congr μ hX.quadratic _ _ a _ a hit hj + (T.distanceDatum_pairing_later μ hX.quadratic hij a) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionConvergence.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..08de89e6eb23cd62cd32903dea7869dcb1f60a3c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionConvergence.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRootLinearLimit +import OAI.Geometry.RCD.Sobolev.EverySubsequenceEventual + +namespace OAI + +/-! # Sharp estimates for the full sequence of root-normalized directions -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_unit_direction_convergence {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (p : ℕ → X) (r ε : ℕ → ℝ) (d : ℕ → ℕ) + (hr : ∀ k, 0 < r k) (hd : Tendsto d atTop atTop) + (hcurv : ∀ k, -1 ≤ K*(r k)^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (V : ℕ → X → Euclidean (m+1)) + (hV : ∀ j : ℕ, ∀ᶠ k in atTop, IsMeasuredEuclideanApproximation (hausdorff (m+1) X) + (m+1) (p k) (r k) ((j : ℝ)+1) (ε k) (V k)) + (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)) (A : ℕ → Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : ∀ k, IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (r k)) measurableSet_ball (A k)) + (hscale : ∀ k j, j ≤ d k → a*(3*((2 : ℝ)^j*r k)) ≤ 1) + (hframes : ∀ k j, j ≤ d k → ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) ((2 : ℝ)^j*r k) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) ((2 : ℝ)^j*r k)) measurableSet_ball S) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) ((2 : ℝ)^(d k)*r k))) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u k i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] fun x => v k x i) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (u k i)) (z : Euclidean (m+1)) (hz : ‖z‖ = 1) : + (∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff (m+1) X).restrict (ball (p k) (3*r k)), + localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k) (A k z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k) (A k z)) x ≤ 1+β) ∧ + Tendsto (fun k => ((hausdorff (m+1) X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), + |localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k) (A k z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k) (A k z)) x-1| + ∂hausdorff (m+1) X) atTop (𝓝 0) := by + let μ := hausdorff (m+1) X + let G := fun k => sobolevColumnMap μ hX.quadratic (u k) (A k z) + let E := fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), |localGamma μ hX.quadratic (G k) (G k) x-1| ∂μ + have hex (α : ℕ → ℕ) (hα : Tendsto α atTop atTop) : ∃ b : ℕ → ℕ, + (∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p (α (b k))) (3*r (α (b k)))), + localGamma μ hX.quadratic (G (α (b k))) (G (α (b k))) x ≤ 1+β) ∧ + Tendsto (fun k => E (α (b k))) atTop (𝓝 0) := by + obtain ⟨b,_,_,_,_,hs,he⟩ := dyadic_root_unit_linear_limit m hm hX ha hBG hκ hκ1 hsmall + (p∘α) (r∘α) (ε∘α) (d∘α) (fun k => hr (α k)) (hd.comp hα) + (fun k => hcurv (α k)) (fun k => hcurv5 (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα) (V∘α) + (fun j => hα.eventually (hV j)) (u∘α) (v∘α) (A∘α) + (fun k => hA (α k)) (fun k => hscale (α k)) (fun k => hframes (α k)) + (fun k => hv (α k)) (fun k => hrep (α k)) (fun k => hu (α k)) z hz + exact ⟨b,hs,he⟩ + constructor + · intro β hβ + apply eventually_of_every_subsequence + intro α hα + obtain ⟨b,hs,_⟩ := hex α hα.tendsto_atTop + exact ⟨b,hs β hβ⟩ + · apply tendsto_of_subseq_tendsto + intro α hα + obtain ⟨b,_,he⟩ := hex α hα + exact ⟨b,he⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionData.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionData.lean new file mode 100644 index 0000000000000000000000000000000000000000..f06f62ed205b547090046002c9cf290d9471d163 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootDirectionData.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Metric.RescaledRootBounds +import OAI.Geometry.RCD.Sobolev.CenteredHarmonicEnergy + +namespace OAI + +/-! # Actual centered root directions, with their exact energy normalization -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_direction_data {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (u : Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : X → Euclidean (m+1)) (p : X) {r : ℝ} {d : ℕ} + (hr : 0 < r) (hd : 6 ≤ d) (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (A : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) (ball p r) measurableSet_ball A) + (hscale : ∀ j ≤ d, a*(3*((2 : ℝ)^j*r)) ≤ 1) + (hframes : ∀ j ≤ d, ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic p ((2 : ℝ)^j*r) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic u S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u) + (ball p ((2 : ℝ)^j*r)) measurableSet_ball S) + (hv : ContinuousOn v (ball p ((2 : ℝ)^d*r))) + (hrep : ∀ i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball p ((2 : ℝ)^d*r))] fun x => v x i) + (hu : ∀ i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball p ((2 : ℝ)^d*r)) (u i)) (z : Euclidean (m+1)) : + ∃ w : SobolevSpace (hausdorff (m+1) X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic (ball p (5*r)) w ∧ + SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic w =ᵐ[ + (hausdorff (m+1) X).restrict (ball p (5*r))] + (fun x => ⟪v x-v p,A z⟫_ℝ/r) ∧ + harmonicTargetNorm hX p (5*r) w ≤ 80*((m+1 : ℕ) : ℝ)*‖z‖ ∧ + ((hausdorff (m+1) X).real (ball p r))⁻¹* + (∫ x in ball p r, r^2*localGamma (hausdorff (m+1) X) hX.quadratic w w x + ∂hausdorff (m+1) X) = ‖z‖^2 ∧ + (fun x => r^2*localGamma (hausdorff (m+1) X) hX.quadratic w w x) =ᵐ[ + (hausdorff (m+1) X).restrict (ball p (5*r))] + localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic u (A z)) := by + let μ := hausdorff (m+1) X + let U := sobolevColumnMap μ hX.quadratic u + have hs₆ : ball p ((2 : ℝ)^6*r) ⊆ ball p ((2 : ℝ)^d*r) := + ball_subset_ball (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hd) hr.le) + have hs : ball p (5*r) ⊆ ball p ((2 : ℝ)^d*r) := + (ball_subset_ball (by norm_num; linarith : 5*r ≤ (2 : ℝ)^6*r)).trans hs₆ + have hb := (dyadic_root_rescaled_bounds m hm hX ha hBG u v p hr hκ hκ1 hsmall A hA 6 + (fun j hj => hscale j (hj.trans hd)) (fun j hj => hframes j (hj.trans hd)) + (hv.mono hs₆) (fun i => ae_restrict_of_ae_restrict_of_subset hs₆ (hrep i)) z + (by norm_num : (0:ℝ)≤5) (by norm_num : (5:ℝ)<2^6/8)).1 + have hbound : ∀ x ∈ ball p (5*r), + |⟪v x,A z⟫_ℝ-⟪v p,A z⟫_ℝ| ≤ (80*((m+1 : ℕ) : ℝ)*‖z‖)*r := by + intro x hx + have h := hb x hx.le + simp only [abs_div,abs_of_pos hr] at h + have hh := (div_le_iff₀ hr).mp h + norm_num at hh + calc + _ = |⟪v x-v p,A z⟫_ℝ| := by rw [inner_sub_left] + _ ≤ 2*((m : ℝ)+1)*8*‖z‖*5*r := hh + _ = _ := by push_cast; ring + have hU : SobolevSpace.toLp μ hX.quadratic (U (A z)) =ᵐ[μ.restrict (ball p (5*r))] + fun x => ⟪v x,A z⟫_ℝ := + sobolevColumnMap_representative μ hX.quadratic u _ v + (fun i => ae_restrict_of_ae_restrict_of_subset hs (hrep i)) (A z) + have hUH : IsSobolevHarmonicOn μ hX.quadratic (ball p (5*r)) (U (A z)) := + (IsSobolevHarmonicOn.linearCombination μ hX.quadratic hu (A z)).mono μ hX.quadratic hs + obtain ⟨w,hw,hwrep,hwnorm,hwe⟩ := hX.centered_harmonic_direction_with_energy hm p + (mul_pos (by norm_num) hr) hr (by positivity) (U (A z)) (fun x => ⟪v x,A z⟫_ℝ) + ⟪v p,A z⟫_ℝ hUH hU hbound + have he := rescaled_local_pairing_of_centering μ hX.quadratic (ball p (5*r)) hr.ne' + (U (A z)) (U (A z)) w w hwe hwe + refine ⟨w,hw,by simpa only [inner_sub_left] using hwrep,hwnorm,?_,he⟩ + rw [integral_congr_ae (ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : r≤5*r)) he)] + rw [← sobolevMeanGram_inner μ hX.quadratic U (ball p r) measurableSet_ball, + real_inner_comm,meanGram_energy_of_exact_normalization μ hX.quadratic U + (ball p r) measurableSet_ball A hA,A.symm_apply_apply] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRootGramConvergence.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootGramConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..904ba86ce92d0afb2a48c779fd06dd612edb6980 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootGramConvergence.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRootDirectionConvergence +import OAI.Geometry.RCD.Coordinates.UnitCoordinateDirections +import OAI.Geometry.RCD.Harmonic.MixedGramL1 + +namespace OAI + +/-! # Finite Gram convergence in the original root frame -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_gram_convergence {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (p : ℕ → X) (r ε : ℕ → ℝ) (d : ℕ → ℕ) + (hr : ∀ k, 0 < r k) (hd : Tendsto d atTop atTop) + (hcurv : ∀ k, -1 ≤ K*(r k)^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (V : ℕ → X → Euclidean (m+1)) + (hV : ∀ j : ℕ, ∀ᶠ k in atTop, IsMeasuredEuclideanApproximation (hausdorff (m+1) X) + (m+1) (p k) (r k) ((j : ℝ)+1) (ε k) (V k)) + (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)) (A : ℕ → Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : ∀ k, IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (r k)) measurableSet_ball (A k)) + (hscale : ∀ k j, j ≤ d k → a*(3*((2 : ℝ)^j*r k)) ≤ 1) + (hframes : ∀ k j, j ≤ d k → ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) ((2 : ℝ)^j*r k) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) ((2 : ℝ)^j*r k)) measurableSet_ball S) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) ((2 : ℝ)^(d k)*r k))) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u k i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] fun x => v k x i) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (u k i)) : + (∀ i : Fin (m+1), ∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff (m+1) X).restrict (ball (p k) (3*r k)), + localGamma (hausdorff (m+1) X) hX.quadratic + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) (A k) i) + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) (A k) i) x ≤ 1+β) ∧ + (∀ i j : Fin (m+1), Tendsto (fun k => ((hausdorff (m+1) X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), + |localGamma (hausdorff (m+1) X) hX.quadratic + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) (A k) i) + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) (A k) j) x- + (if i=j then 1 else 0)| ∂hausdorff (m+1) X) atTop (𝓝 0)) := by + let μ := hausdorff (m+1) X + let e : Fin (m+1) → Euclidean (m+1) := fun i => EuclideanSpace.single i 1 + let G := fun (i : Fin (m+1)) k => transformedColumn μ hX.quadratic (u k) (A k) i + have hdir (z : Euclidean (m+1)) (hz : ‖z‖=1) := + dyadic_root_unit_direction_convergence m hm hX ha hBG hκ hκ1 hsmall p r ε d hr hd + hcurv hcurv5 hε hε1 hεlim V hV u v A hA hscale hframes hv hrep hu z hz + have he (i : Fin (m+1)) : ‖e i‖=1 := by simp [e] + have hdiag (i : Fin (m+1)) : Tendsto (fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), |localGamma μ hX.quadratic (G i k) (G i k) x-1| ∂μ) + atTop (𝓝 0) := (hdir (e i) (he i)).2 + refine ⟨fun i => (hdir (e i) (he i)).1,?_⟩ + intro i j + by_cases hij : i=j + · subst j + simpa using hdiag i + · let z := (Real.sqrt 2)⁻¹ • (e i+e j) + have hsum : ‖e i+e j‖^2=2 := by + rw [norm_add_sq_real,he i,he j] + norm_num [e,EuclideanSpace.inner_single_left,hij] + have hsum' : ‖e i+e j‖=Real.sqrt 2 := by + nlinarith [norm_nonneg (e i+e j),Real.sqrt_nonneg 2, + Real.sq_sqrt (by norm_num : (0:ℝ)≤2)] + have hz : ‖z‖=1 := by + change ‖(Real.sqrt 2)⁻¹ • (e i+e j)‖=1 + rw [norm_smul,Real.norm_of_nonneg (by positivity),hsum'] + exact inv_mul_cancel₀ (ne_of_gt (Real.sqrt_pos.mpr (by norm_num))) + have hpair := (hdir z hz).2 + have hG (k : ℕ) : sobolevColumnMap μ hX.quadratic (u k) (A k z) = + (Real.sqrt 2)⁻¹ • (G i k+G j k) := by + simp only [z,map_smul,map_add] + rfl + change Tendsto (fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), |localGamma μ hX.quadratic + (sobolevColumnMap μ hX.quadratic (u k) (A k z)) + (sobolevColumnMap μ hX.quadratic (u k) (A k z)) x-1| ∂μ) atTop (𝓝 0) at hpair + simp_rw [hG] at hpair + have hmix := mixed_gram_l1_tendsto μ hX.quadratic + (fun k => ball (p k) (2*r k)) (fun k => (hX.finiteOnBounded _ isBounded_ball).ne) + (fun _ => 1) (fun k => (μ.real (ball (p k) (2*r k)))⁻¹) (fun _ => by positivity) + (G i) (G j) + (by simpa only [one_pow,one_mul] using hdiag i) + (by simpa only [one_pow,one_mul] using hdiag j) + (by simpa only [one_pow,one_mul] using hpair) + simpa only [one_pow,one_mul,ite_eq_right hij,sub_zero] using hmix + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRootHarmonicLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootHarmonicLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf0dadb87702e960dccf62b60f77a3d14c60ccc9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootHarmonicLimit.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.RCD.Harmonic.CenteredHarmonicCompactness +import OAI.Geometry.RCD.Metric.RescaledRootBounds +import OAI.Geometry.RCD.Metric.DyadicPointedRigidity + +namespace OAI + +/-! # Entire limits of the actual dyadic root-normalized directions -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_harmonic_limit {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (p : ℕ → X) (r ε : ℕ → ℝ) (d : ℕ → ℕ) + (hr : ∀ k, 0 < r k) (hd : Tendsto d atTop atTop) + (hcurv : ∀ k, -1 ≤ K*(r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (V : ℕ → X → Euclidean (m+1)) + (hV : ∀ j : ℕ, ∀ᶠ k in atTop, IsMeasuredEuclideanApproximation (hausdorff (m+1) X) + (m+1) (p k) (r k) ((j : ℝ)+1) (ε k) (V k)) + (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)) (A : ℕ → Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : ∀ k, IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (r k)) measurableSet_ball (A k)) + (hscale : ∀ k j, j ≤ d k → a*(3*((2 : ℝ)^j*r k)) ≤ 1) + (hframes : ∀ k j, j ≤ d k → ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) ((2 : ℝ)^j*r k) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) ((2 : ℝ)^j*r k)) measurableSet_ball S) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) ((2 : ℝ)^(d k)*r k))) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u k i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] fun x => v k x i) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (u k i)) (z : Euclidean (m+1)) : + ∃ (b : ℕ → ℕ) (f : Euclidean (m+1) → ℝ), StrictMono b ∧ Continuous f ∧ + InnerProductSpace.HarmonicOnNhd f univ ∧ + (∀ x, f x = f 0+fderiv ℝ f 0 x) ∧ + (∀ ρ : ℝ, ∃ C : ℝ≥0, LipschitzOnWith C f (closedBall 0 ρ)) ∧ + ∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x, + dist x (p (b k)) ≤ W*r (b k) → + |⟪v (b k) x-v (b k) (p (b k)),A (b k) z⟫_ℝ/r (b k)-f (V (b k) x)| < η := by + have hpow : Tendsto (fun j : ℕ => (2 : ℝ)^j) atTop atTop := + tendsto_pow_atTop_atTop_of_one_lt (by norm_num) + have hex (j : ℕ) : ∃ N : ℕ, (j : ℝ)+1 < (2 : ℝ)^N/8 := by + obtain ⟨N,hN⟩ := (hpow.eventually_gt_atTop (8*((j : ℝ)+1))).exists + exact ⟨N,by linarith⟩ + choose N hN using hex + let C : ℕ → ℝ := fun j => 2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^(N j))*‖z‖ + have hC (j : ℕ) : 0 ≤ C j := by dsimp only [C]; positivity + let L : ℕ → ℝ≥0 := fun j => ⟨C j,hC j⟩ + let B : ℕ → ℝ := fun j => C j*((j : ℝ)+1) + let U := fun k => sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k) (A k z) + let v₀ := fun k x => ⟪v k x,A k z⟫_ℝ + have hH (k : ℕ) : IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (U k) := + IsSobolevHarmonicOn.linearCombination (hausdorff (m+1) X) hX.quadratic (hu k) (A k z) + have hU (k : ℕ) : SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (U k) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] v₀ k := + sobolevColumnMap_representative (hausdorff (m+1) X) hX.quadratic (u k) _ (v k) (hrep k) (A k z) + have hdata : ∀ j : ℕ, ∀ᶠ k in atTop, -1 ≤ K*(r k)^2 ∧ + IsMeasuredEuclideanApproximation (hausdorff (m+1) X) (m+1) (p k) (r k) + ((j : ℝ)+1) (ε k) (V k) ∧ + (∀ x, dist x (p k) ≤ ((j : ℝ)+1)*r k → |(v₀ k x-v₀ k (p k))/r k| ≤ B j) ∧ + (∀ x y, dist x (p k) ≤ ((j : ℝ)+1)*r k → dist y (p k) ≤ ((j : ℝ)+1)*r k → + |(v₀ k x-v₀ k (p k))/r k-(v₀ k y-v₀ k (p k))/r k| ≤ (L j : ℝ)*(dist x y/r k)) := by + intro j + filter_upwards [hV j,hd.eventually (eventually_ge_atTop (N j))] with k hVk hNk + have hs : ball (p k) ((2 : ℝ)^(N j)*r k) ⊆ ball (p k) ((2 : ℝ)^(d k)*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hNk) (hr k).le) + have hb := dyadic_root_rescaled_bounds m hm hX ha hBG (u k) (v k) (p k) + (hr k) hκ hκ1 hsmall (A k) (hA k) (N j) + (fun i hi => hscale k i (hi.trans hNk)) (fun i hi => hframes k i (hi.trans hNk)) + ((hv k).mono hs) (fun i => ae_restrict_of_ae_restrict_of_subset hs (hrep k i)) + z (by positivity : 0 ≤ (j : ℝ)+1) (hN j) + refine ⟨hcurv k,hVk,?_,?_⟩ + · simpa only [v₀,inner_sub_left] using hb.1 + · have hLval : (L j : ℝ) = 2*((m+1 : ℕ) : ℝ)*Real.sqrt ((2 : ℝ)^(N j))*‖z‖ := rfl + rw [hLval] + simpa only [v₀,inner_sub_left] using hb.2 + obtain ⟨b,f,hb,hfc,hfh,hfL,hconv⟩ := hX.centered_harmonic_compactness hm p r ε + (fun k => (2 : ℝ)^(d k)) V hr hε hε1 hεlim (hpow.comp hd) U v₀ hH hU L B + (fun j => mul_nonneg (hC j) (by positivity)) hdata + have hconv' : ∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x, + dist x (p (b k)) ≤ W*r (b k) → + |⟪v (b k) x-v (b k) (p (b k)),A (b k) z⟫_ℝ/r (b k)-f (V (b k) x)| < η := by + simpa only [v₀,inner_sub_left] using hconv + let C₀ := 8*((m+1 : ℕ) : ℝ)*(‖z‖+1) + have hC₀ : 0 < C₀ := by dsimp only [C₀]; positivity + have hε' : Tendsto (fun k => 3*ε (b k)) atTop (𝓝 0) := by + simpa only [mul_zero,Function.comp_def] using (hεlim.comp hb.tendsto_atTop).const_mul 3 + have hgrowth (j : ℕ) : ∀ᶠ k in atTop, + IsPointedApproximation (p k) 0 (r k) ((2 : ℝ)^j) (3*ε k) (V k) ∧ + ∀ x, dist x (p k) ≤ (2 : ℝ)^j*r k → + |⟪v k x-v k (p k),A k z⟫_ℝ/r k| ≤ C₀*(3 : ℝ)^j := by + filter_upwards [hV ((2 : ℕ)^j),hd.eventually (eventually_ge_atTop (j+4))] + with k hVk hj + have hrad : (2 : ℝ)^j ≤ (((2 : ℕ)^j : ℕ) : ℝ)+1 := by + push_cast + linarith + refine ⟨hVk.metric.restrict_radius (hr k) (by positivity) hrad (hε k),?_⟩ + have hs : ball (p k) ((2 : ℝ)^(j+4)*r k) ⊆ ball (p k) ((2 : ℝ)^(d k)*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hj) (hr k).le) + have hroom : (2 : ℝ)^j < (2 : ℝ)^(j+4)/8 := by + rw [pow_add] + norm_num + nlinarith [pow_pos (by norm_num : (0 : ℝ) < 2) j] + have hbound := (dyadic_root_rescaled_bounds m hm hX ha hBG (u k) (v k) (p k) + (hr k) hκ hκ1 hsmall (A k) (hA k) (j+4) + (fun i hi => hscale k i (hi.trans hj)) (fun i hi => hframes k i (hi.trans hj)) + ((hv k).mono hs) (fun i => ae_restrict_of_ae_restrict_of_subset hs (hrep k i)) + z (by positivity : 0 ≤ (2 : ℝ)^j) hroom).1 + intro x hx + apply (hbound x hx).trans + have hgeom := dyadic_root_growth_geometric + (a := ((m+1 : ℕ) : ℝ)*‖z‖) (by positivity) j + have hcoef : 8*(((m+1 : ℕ) : ℝ)*‖z‖) ≤ C₀ := by + dsimp only [C₀] + nlinarith [Nat.cast_nonneg (α := ℝ) (m+1)] + calc + _ = 2*(((m+1 : ℕ) : ℝ)*‖z‖)*Real.sqrt ((2 : ℝ)^(j+4))*(2 : ℝ)^j := by ring + _ ≤ (8*(((m+1 : ℕ) : ℝ)*‖z‖))*(3 : ℝ)^j := hgeom + _ ≤ C₀*(3 : ℝ)^j := mul_le_mul_of_nonneg_right hcoef (by positivity) + have haffine := pointed_harmonic_limit_affine (by omega : 0 < m+1) + (p∘b) (r∘b) (fun k => 3*ε (b k)) (V∘b) hε' + (fun k x => ⟪v (b k) x-v (b k) (p (b k)),A (b k) z⟫_ℝ/r (b k)) f hfc hfh + hC₀ (by norm_num : (0 : ℝ) < 3) (by norm_num : (3 : ℝ) < 4) + (fun j => hb.tendsto_atTop.eventually (hgrowth j)) + (fun j => hconv' ((2 : ℝ)^j) (by positivity)) + exact ⟨b,f,hb,hfc,hfh,haffine,hfL,hconv'⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/DyadicRootLinearLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootLinearLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..86d0db61fe25c895b513d26c70389eac48687cc4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/DyadicRootLinearLimit.lean @@ -0,0 +1,142 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRootHarmonicLimit +import OAI.Geometry.RCD.Harmonic.DyadicRootDirectionData +import OAI.Geometry.RCD.Metric.PointedCenteredLimit +import OAI.Geometry.RCD.Coordinates.NormalizedHarmonicLinearLimit + +namespace OAI + +/-! # Unit linear limits and sharp energy convergence of actual root directions -/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem dyadic_root_unit_linear_limit {K : ℝ} (m : ℕ) (hm : 2 ≤ m+1) + (hX : NoncollapsedRCD K (m+1) X) [(hausdorff (m+1) X).Regular] + {a κ : ℝ} (ha : 0 ≤ a) + (hBG : BallVolumeComparison (hausdorff (m+1) X) (comparisonModelVolume m a)) + (hκ : 0 ≤ κ) (hκ1 : κ ≤ 1) + (hsmall : ((m+1 : ℕ) : ℝ)^2*(normalizationVolumeRatio m*κ) ≤ 1/2) + (p : ℕ → X) (r ε : ℕ → ℝ) (d : ℕ → ℕ) + (hr : ∀ k, 0 < r k) (hd : Tendsto d atTop atTop) + (hcurv : ∀ k, -1 ≤ K*(r k)^2) + (hcurv5 : ∀ k, -1 ≤ K*(5*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (V : ℕ → X → Euclidean (m+1)) + (hV : ∀ j : ℕ, ∀ᶠ k in atTop, IsMeasuredEuclideanApproximation (hausdorff (m+1) X) + (m+1) (p k) (r k) ((j : ℝ)+1) (ε k) (V k)) + (u : ℕ → Fin (m+1) → SobolevSpace (hausdorff (m+1) X) hX.quadratic) + (v : ℕ → X → Euclidean (m+1)) (A : ℕ → Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (hA : ∀ k, IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) (r k)) measurableSet_ball (A k)) + (hscale : ∀ k j, j ≤ d k → a*(3*((2 : ℝ)^j*r k)) ≤ 1) + (hframes : ∀ k j, j ≤ d k → ∃ (S : Euclidean (m+1) ≃L[ℝ] Euclidean (m+1)) + (w : X → Euclidean (m+1)), + FirstOrderSplittingOn (hausdorff (m+1) X) hX.quadratic (p k) ((2 : ℝ)^j*r k) κ + (transformedColumn (hausdorff (m+1) X) hX.quadratic (u k) S) w ∧ + IsExactMeanNormalization (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u k)) + (ball (p k) ((2 : ℝ)^j*r k)) measurableSet_ball S) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) ((2 : ℝ)^(d k)*r k))) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff (m+1) X) hX.quadratic (u k i) =ᵐ[ + (hausdorff (m+1) X).restrict (ball (p k) ((2 : ℝ)^(d k)*r k))] fun x => v k x i) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff (m+1) X) hX.quadratic + (ball (p k) ((2 : ℝ)^(d k)*r k)) (u k i)) (z : Euclidean (m+1)) (hz : ‖z‖ = 1) : + ∃ (b : ℕ → ℕ) (L : Euclidean (m+1) →L[ℝ] ℝ), StrictMono b ∧ ‖L‖ = 1 ∧ + (∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x, + dist x (p (b k)) ≤ W*r (b k) → + |⟪v (b k) x-v (b k) (p (b k)),A (b k) z⟫_ℝ/r (b k)-L (V (b k) x)| < η) ∧ + (∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff (m+1) X).restrict (ball (p (b k)) (3*r (b k))), + localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u (b k)) (A (b k) z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u (b k)) (A (b k) z)) x ≤ 1+β) ∧ + Tendsto (fun k => ((hausdorff (m+1) X).real (ball (p (b k)) (2*r (b k))))⁻¹* + ∫ x in ball (p (b k)) (2*r (b k)), + |localGamma (hausdorff (m+1) X) hX.quadratic + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u (b k)) (A (b k) z)) + (sobolevColumnMap (hausdorff (m+1) X) hX.quadratic (u (b k)) (A (b k) z)) x-1| + ∂hausdorff (m+1) X) atTop (𝓝 0) := by + obtain ⟨b,f,hb,hfc,_,hfa,_,hconv⟩ := dyadic_root_harmonic_limit m hm hX ha hBG + hκ hκ1 hsmall p r ε d hr hd hcurv hε hε1 hεlim V hV u v A hA hscale hframes hv hrep hu z + have hf0 : f 0 = 0 := by + apply pointed_centered_limit (by norm_num : (0:ℝ)≤1) (p∘b) (r∘b) (ε∘b) (V∘b) + (fun k => (hr (b k)).le) (hεlim.comp hb.tendsto_atTop) + ((hb.tendsto_atTop.eventually (hV 0)).mono (fun k hk => by simpa using hk.metric)) + (fun k x => ⟪v (b k) x-v (b k) (p (b k)),A (b k) z⟫_ℝ/r (b k)) + (fun k => by simp) f hfc.continuousAt + exact hconv 1 (by norm_num) + let L := fderiv ℝ f 0 + have hfL : ∀ x, f x = L x := by + intro x + simpa only [hf0,zero_add] using hfa x + have hgood : ∀ᶠ k in atTop, 6 ≤ d (b k) ∧ + IsMeasuredEuclideanApproximation (hausdorff (m+1) X) (m+1) + (p (b k)) (r (b k)) 5 (ε (b k)) (V (b k)) := by + filter_upwards [(hd.comp hb.tendsto_atTop).eventually (eventually_ge_atTop 6), + hb.tendsto_atTop.eventually (hV 4)] with k hk hVk + exact ⟨hk,by convert hVk using 1; norm_num⟩ + obtain ⟨N,hN⟩ := eventually_atTop.mp hgood + let α : ℕ → ℕ := fun k => b (k+N) + have hα : StrictMono α := hb.comp (fun _ _ h => Nat.add_lt_add_right h N) + have hgood' (k : ℕ) := hN (k+N) (Nat.le_add_left N k) + let μ := hausdorff (m+1) X + choose w hw hwrep hwnorm hwmean hwe using fun k => + dyadic_root_direction_data m hm hX ha hBG (u (α k)) (v (α k)) (p (α k)) (hr (α k)) + (hgood' k).1 hκ hκ1 hsmall (A (α k)) (hA (α k)) (hscale (α k)) (hframes (α k)) + (hv (α k)) (hrep (α k)) (hu (α k)) z + have hwconv : ∀ W : ℝ, 0 < W → W < 5 → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p (α k)) (W*r (α k))), + |SobolevSpace.toLp μ hX.quadratic (w k) x-L (V (α k) x)| ≤ η := by + intro W hW hW5 η hη + filter_upwards [(tendsto_add_atTop_nat N).eventually (hconv W hW η hη)] with k hk + have hs : ball (p (α k)) (W*r (α k)) ⊆ ball (p (α k)) (5*r (α k)) := + ball_subset_ball (mul_le_mul_of_nonneg_right hW5.le (hr (α k)).le) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hs (hwrep k), + ae_restrict_mem measurableSet_ball] with x hx hball + rw [hx] + have hh := hk x (show dist x (p (α k)) ≤ W*r (α k) from hball.le) + rw [hfL] at hh + exact hh.le + have hM : 0 < 80*((m+1 : ℕ) : ℝ)*‖z‖ := by rw [hz]; positivity + have hwmean' (k : ℕ) : (μ.real (ball (p (α k)) (r (α k))))⁻¹* + (∫ x in ball (p (α k)) (r (α k)), r (α k)^2*localGamma μ hX.quadratic (w k) (w k) x ∂μ) = 1 := by + simpa only [hz,one_pow] using hwmean k + have hLn := hX.normalized_harmonic_linear_limit_norm hm (p∘α) (r∘α) (ε∘α) (V∘α) + (fun k => hr (α k)) (fun k => hcurv (α k)) (fun k => hcurv5 (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) + (fun k => (hgood' k).2) w hw hM hwnorm hwmean' L hwconv + have hs := hX.harmonic_linear_sharp hm (p∘α) (r∘α) (ε∘α) (V∘α) + (fun k => hr (α k)) (fun k => hcurv (α k)) (fun k => hcurv5 (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) + (fun k => (hgood' k).2) w hw hM hwnorm L hLn.le hwconv + have he := hX.harmonic_linear_energy_l1 hm (p∘α) (r∘α) (ε∘α) (V∘α) + (fun k => hr (α k)) (fun k => hcurv (α k)) (fun k => hcurv5 (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) + (fun k => (hgood' k).2) w hw hM hwnorm L hLn hwconv + refine ⟨α,L,hα,hLn,?_,?_,?_⟩ + · intro W hW η hη + filter_upwards [(tendsto_add_atTop_nat N).eventually (hconv W hW η hη)] with k hk + simpa only [hfL] using hk + · intro β hβ + filter_upwards [hs β hβ] with k hk + filter_upwards [hk,ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith [hr (α k)] : 3*r (α k) ≤ 5*r (α k))) (hwe k)] with x hx heq + change r (α k)^2*localGamma μ hX.quadratic (w k) (w k) x ≤ 1+β at hx + rwa [heq] at hx + · convert he using 1 + funext k + congr 1 + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith [hr (α k)] : 2*r (α k) ≤ 5*r (α k))) (hwe k)] with x hx + exact congrArg (fun t : ℝ => |t-1|) hx.symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanAffineImprovement.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanAffineImprovement.lean new file mode 100644 index 0000000000000000000000000000000000000000..4be7f12442c405f2c782884317dac3b0ef9a7589 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanAffineImprovement.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicModel +import OAI.Geometry.RCD.Harmonic.AffineScaleChoice + +namespace OAI + +/-! # The strict Euclidean candidate for harmonic affine improvement -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- The Taylor coefficients give a normalized local L² affine candidate. -/ +theorem EuclideanHarmonicModel.affine_candidate {n : ℕ} {S ρ C : ℝ} + (w : EuclideanHarmonicModel n S) (_hS : 0 < S) (hρ : 0 < ρ) + (hρS : ρ ≤ S / 2) (hC : 0 ≤ C) + (hbound : ∀ z ∈ ball (0 : Euclidean n) (S / 2), + ‖fderiv ℝ (fderiv ℝ w.value) z‖ ≤ C) : + ∃ (c : ℝ) (v : Euclidean n), + ‖∑ i, affineErrorCoefficients c (fun j => v j) i • + w.moments (show ρ ≤ S by linarith) i‖ ≤ C * ρ ^ 2 := by + let one : Lp ℝ 2 (volume.restrict (ball (0 : Euclidean n) ρ)) := + restrictedOne volume (ball 0 ρ) measure_ball_ne_top + let F := w.localLp (show ρ ≤ S by linarith) + let u := euclideanCoordinateLp n ρ + let v : Euclidean n := WithLp.toLp 2 (fun i => fderiv ℝ w.value 0 (EuclideanSpace.single i 1)) + have hone : one =ᵐ[volume.restrict (ball (0 : Euclidean n) ρ)] fun _ => (1 : ℝ) := by + simpa only [one, restrictedOne, indicator_univ] using + (indicatorConstLp_coeFn (p := (2 : ℝ≥0∞)) (μ := volume.restrict (ball (0 : Euclidean n) ρ)) + (hs := MeasurableSet.univ) (hμs := by simpa only [Measure.restrict_apply_univ] + using (measure_ball_ne_top (μ := (volume : Measure (Euclidean n))) (x := 0) (r := ρ))) + (c := (1 : ℝ))) + have hsmall : ball (0 : Euclidean n) (S / 2) ⊆ ball 0 S := + ball_subset_ball (by linarith) + have hsmooth := w.harmonic.contDiffOn + have hf (z : Euclidean n) (hz : z ∈ ball (0 : Euclidean n) (S / 2)) : + HasFDerivAt w.value (fderiv ℝ w.value z) z := + ((hsmooth.contDiffAt (isOpen_ball.mem_nhds (hsmall hz))).differentiableAt + (by norm_num)).hasFDerivAt + have hdf (z : Euclidean n) (hz : z ∈ ball (0 : Euclidean n) (S / 2)) : + HasFDerivAt (fderiv ℝ w.value) (fderiv ℝ (fderiv ℝ w.value) z) z := by + have hh : ContDiffOn ℝ 1 (fderiv ℝ w.value) (ball 0 S) := + hsmooth.fderiv_of_isOpen isOpen_ball (by norm_num) + exact ((hh.contDiffAt (isOpen_ball.mem_nhds (hsmall hz))).differentiableAt + (by norm_num)).hasFDerivAt + have ht := l2_coordinate_affine_taylor_bound volume hρ hρS hC hf hdf hbound F one u + (w.localLp_coe _) hone (euclideanCoordinateLp_coe n ρ) + refine ⟨w.value 0, v, ?_⟩ + change ‖∑ i, affineErrorCoefficients (w.value 0) (fun j => v j) i • + affineMomentFamily n (normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top F) + (normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top one) + (fun j => normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top (u j)) i‖ ≤ _ + rw [affineMomentFamily_sum] + have heq : normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top F - + w.value 0 • normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top one - + ∑ j, v j • normalizeLocalL2 volume (ball 0 ρ) measure_ball_ne_top (u j) = + ‖one‖⁻¹ • (F - w.value 0 • one - ∑ j, v j • u j) := by + simp only [normalizeLocalL2, smul_sub, Finset.smul_sum, smul_comm _ (‖one‖⁻¹), one] + rw [heq, norm_smul, Real.norm_eq_abs, abs_inv, abs_norm] + have ht' : ‖F - w.value 0 • one - ∑ j, v j • u j‖ ≤ C * ρ ^ 2 * ‖one‖ := ht + by_cases hzero : ‖one‖ = 0 + · simp only [hzero, inv_zero, zero_mul] + positivity + calc + _ ≤ ‖one‖⁻¹ * (C * ρ ^ 2 * ‖one‖) := + mul_le_mul_of_nonneg_left ht' (inv_nonneg.mpr (norm_nonneg _)) + _ = _ := by field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicCompactExtension.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicCompactExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf7414848443ba596d820d17704695667f7a989f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicCompactExtension.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.RCD.Metric.EuclideanGreenIdentity +import OAI.Geometry.RCD.Coordinates.GevreyCutoffConstruction + +namespace OAI + +/-! # Compact extensions of local Euclidean harmonic functions -/ + +open Set Metric Filter MeasureTheory InnerProductSpace Laplacian +open scoped ContDiff Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- A smooth cutoff supported inside the differentiability region produces +a global smooth product, even when the original function is only local. -/ +theorem contDiff_mul_of_tsupport_subset {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {Ω : Set E} (hΩ : IsOpen Ω) {f χ : E → ℝ} {k : ℕ∞ω} + (hf : ContDiffOn ℝ k f Ω) (hχ : ContDiff ℝ k χ) (hs : tsupport χ ⊆ Ω) : + ContDiff ℝ k (fun x => χ x*f x) := by + apply contDiff_iff_contDiffAt.mpr + intro x + by_cases hx : x ∈ Ω + · exact hχ.contDiffAt.mul (hf.contDiffAt (hΩ.mem_nhds hx)) + · have ht : x ∉ tsupport χ := fun h => hx (hs h) + apply (contDiffAt_const (c := (0:ℝ))).congr_of_eventuallyEq + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp ht] with y hy + simp only [hy,Pi.zero_apply,zero_mul] + +/-- A normalized local harmonic model has a global compact C² extension +which agrees on the half ball and never increases its pointwise magnitude. -/ +theorem EuclideanHarmonicModel.compact_extension {n : ℕ} {S : ℝ} + (w : EuclideanHarmonicModel n S) (hS : 0 < S) : + ∃ F : Euclidean n → ℝ, ContDiff ℝ 2 F ∧ HasCompactSupport F ∧ + tsupport F ⊆ closedBall 0 (3*S/4) ∧ + (∀ x ∈ ball (0 : Euclidean n) (S/2), F x = w.value x) ∧ + (∀ x, |F x| ≤ |w.value x|) := by + obtain ⟨ψ⟩ := euclideanGevreyCutoffInput n + let a := 4/S + have ha : 0 < a := by positivity + let χ := fun x : Euclidean n => ψ.value (a • x) + have hc : ContDiff ℝ 2 χ := (ψ.smooth.comp (contDiff_id.const_smul a)).of_le (by simp) + have hs : tsupport χ ⊆ closedBall 0 (3*S/4) := by + apply closure_minimal _ isClosed_closedBall + intro x hx + have hx' : a • x ∈ tsupport ψ.value := subset_tsupport ψ.value hx + have hb := ψ.support hx' + have hn : a*‖x‖ ≤ 3 := by + simpa only [mem_closedBall,dist_zero_right,norm_smul,Real.norm_eq_abs,abs_of_pos ha] using hb + simp only [mem_closedBall,dist_zero_right] + dsimp only [a] at hn + rw [div_mul_eq_mul_div] at hn + have hh := (div_le_iff₀ hS).mp hn + linarith + have hsΩ : tsupport χ ⊆ ball 0 S := hs.trans (closedBall_subset_ball (by linarith)) + let F := fun x => χ x*w.value x + have hF : ContDiff ℝ 2 F := contDiff_mul_of_tsupport_subset isOpen_ball w.harmonic.contDiffOn hc hsΩ + have hFs : tsupport F ⊆ closedBall 0 (3*S/4) := tsupport_mul_subset_left.trans hs + refine ⟨F,hF,(isCompact_closedBall _ _).of_isClosed_subset (isClosed_tsupport _) hFs,hFs,?_,?_⟩ + · intro x hx + have hx' : ‖x‖ < S/2 := by simpa only [mem_ball,dist_zero_right] using hx + have hh : ‖a • x‖ ≤ 2 := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos ha] + dsimp only [a] + rw [div_mul_eq_mul_div] + apply (div_le_iff₀ hS).mpr + linarith + change ψ.value (a • x)*w.value x = w.value x + rw [ψ.core _ hh,one_mul] + · intro x + change |ψ.value (a • x)*w.value x| ≤ |w.value x| + rw [abs_mul,abs_of_nonneg (ψ.nonneg _)] + exact mul_le_of_le_one_left (abs_nonneg _) (ψ.le_one _) + +/-- The distributional Laplacian has no support outside the original +function's support. -/ +theorem laplacian_eq_zero_of_notMem_tsupport {n : ℕ} (g : Euclidean n → ℝ) + {x : Euclidean n} (hx : x ∉ tsupport g) : (Δ g) x = 0 := by + have he := laplacian_congr_nhds (notMem_tsupport_iff_eventuallyEq.mp hx) + have he' : (Δ g) x = (Δ (fun _ : Euclidean n => (0:ℝ))) x := he.self_of_nhds + simpa only [laplacian_const,Pi.zero_apply] using he' + +/-- Classical harmonicity implies the exact zero compact-test pairing +needed for local smoothing. -/ +theorem EuclideanHarmonicModel.integral_mul_laplacian_eq_zero {n : ℕ} {S : ℝ} + (w : EuclideanHarmonicModel n S) (hS : 0 < S) {g : Euclidean n → ℝ} + (hg : ContDiff ℝ 2 g) (hgs : HasCompactSupport g) + (hs : tsupport g ⊆ ball 0 (S/2)) : + (∫ x, w.value x*(Δ g) x) = 0 := by + obtain ⟨F,hF,_,_,hEq,_⟩ := w.compact_extension hS + have hreplace : (∫ x, w.value x*(Δ g) x) = ∫ x, F x*(Δ g) x := by + apply integral_congr_ae + filter_upwards with x + by_cases hx : x ∈ tsupport g + · rw [hEq x (hs hx)] + · rw [laplacian_eq_zero_of_notMem_tsupport g hx,mul_zero,mul_zero] + rw [hreplace,integral_laplacian_commute hF hg hgs] + apply integral_eq_zero_of_ae + filter_upwards with x + by_cases hx : x ∈ tsupport g + · have hin := hs hx + have hn : F =ᶠ[𝓝 x] w.value := by + filter_upwards [isOpen_ball.mem_nhds hin] with y hy + exact hEq y hy + have he := (laplacian_congr_nhds hn).self_of_nhds + have hz := (w.harmonic x ((ball_subset_ball (by linarith : S/2 ≤ S)) hin)).2.self_of_nhds + rw [he,hz] + simp only [Pi.zero_apply,zero_mul] + · have hg0 : g x = 0 := by + by_contra hne + exact hx (subset_tsupport g hne) + simp only [hg0,mul_zero,Pi.zero_apply] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicContraction.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicContraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..a901f8102b324fa493bc11d2ae246f54423c4273 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicContraction.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanAffineImprovement + +namespace OAI + +/-! # A single strict affine contraction for all normalized harmonic models -/ + +open Set Metric +open scoped InnerProductSpace BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- The Euclidean derivative estimate chooses the dyadic scale before +any harmonic function, working radius, or RCD sequence is chosen. -/ +theorem EuclideanHarmonicHessianInput.affine_contraction {n : ℕ} + (hinput : EuclideanHarmonicHessianInput n) : + ∃ m : ℕ, 3 ≤ m ∧ ∀ S : ℝ, 0 < S → + let θ := (1 / 2 : ℝ) ^ m + ∀ w : EuclideanHarmonicModel n S, + ∃ (c : ℝ) (v : Euclidean n), ∃ hρS : θ * S ≤ S, + ‖∑ i, affineErrorCoefficients c (fun j => v j) i • w.moments hρS i‖ < + (1 / 4 : ℝ) * θ * Real.sqrt θ := by + obtain ⟨C, hC, hbound⟩ := hinput + obtain ⟨m, hm, hscale⟩ := exists_dyadic_affine_contraction C + refine ⟨m, hm, ?_⟩ + intro S hS θ w + have hθ : 0 < θ := pow_pos (by norm_num) _ + have hθhalf : θ ≤ 1 / 2 := by + have hh : θ = (1 / 2 : ℝ) ^ (m - 1) * (1 / 2) := by + dsimp only [θ] + rw [← pow_succ] + congr 1 + omega + rw [hh] + exact mul_le_of_le_one_left (by norm_num) (pow_le_one₀ (by norm_num) (by norm_num)) + have hρ : 0 < θ * S := mul_pos hθ hS + have hhalf : θ * S ≤ S / 2 := by nlinarith + have hρS : θ * S ≤ S := by linarith + obtain ⟨c, v, hcv⟩ := w.affine_candidate hS hρ hhalf + (div_nonneg hC.le (sq_nonneg S)) (hbound S hS w) + refine ⟨c, v, hρS, ?_⟩ + have heq : C / S ^ 2 * (θ * S) ^ 2 = C * θ ^ 2 := by + field_simp + exact lt_of_le_of_lt (hcv.trans_eq heq) hscale + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicL1.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicL1.lean new file mode 100644 index 0000000000000000000000000000000000000000..5734af8eccd5e46e078b54aac0697902b986d09d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicL1.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicWideExtension +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # L¹ mass of normalized compact harmonic extensions -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- The normalized L² bound controls the entire L¹ mass of any compact +extension dominated by the model. -/ +theorem EuclideanHarmonicModel.extension_l1_le {n : ℕ} {S : ℝ} + (w : EuclideanHarmonicModel n S) (hS : 0 < S) + {F : Euclidean n → ℝ} (hF : Continuous F) (hfs : HasCompactSupport F) + (hs : tsupport F ⊆ ball 0 S) (hb : ∀ x, |F x| ≤ |w.value x|) : + (∫ x, |F x|) ≤ volume.real (ball (0 : Euclidean n) S) := by + let B := ball (0 : Euclidean n) S + have hV : 0 < volume.real B := ENNReal.toReal_pos (measure_ball_pos volume (0 : Euclidean n) hS).ne' measure_ball_ne_top + have hnorm := normalizeLocalL2_norm_sq volume B measure_ball_ne_top (w.memLp.toLp w.value) + have he : (∫ x in B, ((w.memLp.toLp w.value) x)^2) = ∫ x in B, (w.value x)^2 := by + apply integral_congr_ae + filter_upwards [w.memLp.coeFn_toLp] with x hx + rw [hx] + rw [he] at hnorm + have hN : ‖normalizeLocalL2 volume B measure_ball_ne_top (w.memLp.toLp w.value)‖^2 ≤ 1 := by + simpa using pow_le_pow_left₀ (norm_nonneg _) w.normalized 2 + rw [hnorm] at hN + have hsq : (∫ x in B, (w.value x)^2) ≤ volume.real B := by + have hh := mul_le_mul_of_nonneg_left hN hV.le + simpa only [← mul_assoc,mul_inv_cancel₀ hV.ne',one_mul,mul_one] using hh + have hzero : ∀ᵐ x ∂(volume : Measure (Euclidean n)), x ∉ B → |F x| = 0 := by + filter_upwards with x hx + have hz : F x = 0 := by + by_contra hn + exact hx (hs (subset_tsupport F hn)) + simp only [hz,abs_zero] + have hfi : Integrable (fun x => |F x|) volume := hF.abs.integrable_of_hasCompactSupport hfs.abs + have hi : IntegrableOn (fun x => (w.value x)^2+1) B volume := + w.memLp.integrable_sq.add (integrableOn_const measure_ball_ne_top) + have hbound : 2*(∫ x in B, |F x|) ≤ (∫ x in B, (w.value x)^2)+volume.real B := by + calc + _ = ∫ x in B, 2*|F x| := (integral_const_mul _ _).symm + _ ≤ ∫ x in B, (w.value x)^2+1 := by + apply integral_mono_ae (hfi.const_mul 2).integrableOn hi + filter_upwards with x + have hh := hb x + nlinarith [sq_nonneg (|w.value x|-1),sq_abs (w.value x)] + _ = _ := by rw [integral_add w.memLp.integrable_sq (integrableOn_const measure_ball_ne_top),setIntegral_const,smul_eq_mul,mul_one] + have heF : (∫ x in B, |F x|) = ∫ x, |F x| := setIntegral_eq_integral_of_ae_compl_eq_zero hzero + rw [heF] at hbound + linarith only [hbound,hsq] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicModel.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8743f36ac4e54d1f303cc2021f0fa0547b98e00 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicModel.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Harmonic.LocalAffineMoments +import OAI.Geometry.RCD.Coordinates.EuclideanAffineTaylor +import Mathlib.Analysis.InnerProductSpace.Harmonic.Basic + +namespace OAI + +/-! # The Euclidean harmonic model in the affine-improvement limit + +The model retains its actual function, local L² representatives, and +normalization. No affine approximation property is included in its data. +-/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +/-- Each standard coordinate belongs to L² on a finite Euclidean ball. -/ +theorem euclideanCoordinate_memLp (n : ℕ) (r : ℝ) (i : Fin n) : + MemLp (fun z : Euclidean n => z i) 2 (volume.restrict (ball 0 r)) := by + let : IsFiniteMeasure (volume.restrict (ball (0 : Euclidean n) r)) := + ⟨by simpa only [Measure.restrict_apply_univ] using + (measure_ball_lt_top (μ := (volume : Measure (Euclidean n))) (x := 0) (r := r))⟩ + apply MemLp.of_bound (EuclideanSpace.proj i).continuous.aestronglyMeasurable |r| + filter_upwards [ae_restrict_mem measurableSet_ball] with z hz + have hz' : ‖z‖ < r := by simpa only [mem_ball, dist_zero_right] using hz + exact (PiLp.norm_apply_le z i).trans (hz'.le.trans (le_abs_self r)) + +def euclideanCoordinateLp (n : ℕ) (r : ℝ) (i : Fin n) : + Lp ℝ 2 (volume.restrict (ball (0 : Euclidean n) r)) := + (euclideanCoordinate_memLp n r i).toLp (fun z => z i) + +theorem euclideanCoordinateLp_coe (n : ℕ) (r : ℝ) (i : Fin n) : + euclideanCoordinateLp n r i =ᵐ[volume.restrict (ball 0 r)] fun z => z i := + MemLp.coeFn_toLp _ + +/-- An L²-normalized harmonic function on the limiting Euclidean ball. -/ +structure EuclideanHarmonicModel (n : ℕ) (S : ℝ) where + value : Euclidean n → ℝ + harmonic : InnerProductSpace.HarmonicOnNhd value (ball 0 S) + memLp : MemLp value 2 (volume.restrict (ball 0 S)) + normalized : ‖normalizeLocalL2 volume (ball 0 S) measure_ball_ne_top + (memLp.toLp value)‖ ≤ 1 + +def EuclideanHarmonicModel.localLp {n : ℕ} {S : ℝ} + (w : EuclideanHarmonicModel n S) {r : ℝ} (hr : r ≤ S) : + Lp ℝ 2 (volume.restrict (ball (0 : Euclidean n) r)) := + (w.memLp.mono_measure (Measure.restrict_mono_set volume (ball_subset_ball hr))).toLp w.value + +theorem EuclideanHarmonicModel.localLp_coe {n : ℕ} {S r : ℝ} + (w : EuclideanHarmonicModel n S) (hr : r ≤ S) : + w.localLp hr =ᵐ[volume.restrict (ball 0 r)] w.value := MemLp.coeFn_toLp _ + +/-- Target, constant and identity coordinates, all in the normalized +local L² space. Their finite moments are the compactness output needed. -/ +def EuclideanHarmonicModel.moments {n : ℕ} {S r : ℝ} + (w : EuclideanHarmonicModel n S) (hr : r ≤ S) : + Option (Option (Fin n)) → Lp ℝ 2 (volume.restrict (ball (0 : Euclidean n) r)) := + affineMomentFamily n + (normalizeLocalL2 volume (ball 0 r) measure_ball_ne_top (w.localLp hr)) + (normalizeLocalL2 volume (ball 0 r) measure_ball_ne_top + (restrictedOne volume (ball 0 r) measure_ball_ne_top)) + (fun i => normalizeLocalL2 volume (ball 0 r) measure_ball_ne_top + (euclideanCoordinateLp n r i)) + +/-- Evans, PDE (second edition), §2.2.3(c), Theorem 7, degree two, +combined with Cauchy--Schwarz on the outer ball. The input only bounds the +second derivative of a normalized Euclidean harmonic function. -/ +def EuclideanHarmonicHessianInput (n : ℕ) : Prop := + ∃ C : ℝ, 0 < C ∧ ∀ S : ℝ, 0 < S → ∀ w : EuclideanHarmonicModel n S, + ∀ z ∈ ball (0 : Euclidean n) (S / 2), + ‖fderiv ℝ (fderiv ℝ w.value) z‖ ≤ C / S ^ 2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicSquare.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicSquare.lean new file mode 100644 index 0000000000000000000000000000000000000000..770feb5f8d5cfc73eb74d4d706aa8cdc121ab61b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicSquare.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.RCD.Metric.EuclideanGreenIdentity +import Mathlib.Analysis.Calculus.FDeriv.Pow + +namespace OAI + +/-! # Positivity of the Laplacian of a squared harmonic function -/ + +open Set Metric MeasureTheory InnerProductSpace Laplacian +open scoped ContDiff BigOperators +noncomputable section +namespace RegularPointCoordinates + +theorem laplacian_square_formula {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) (x : Euclidean n) : + (Δ (fun z => (f z)^2)) x=2*f x*(Δ f) x+ + 2*∑ i : Fin n, (fderiv ℝ f x (EuclideanSpace.single i 1))^2 := by + have hd (z v : Euclidean n) : fderiv ℝ (fun y => (f y)^2) z v= + 2*f z*fderiv ℝ f z v := by + rw [fderiv_fun_pow 2 (hf.differentiable (by norm_num) z)] + simp only [Nat.reduceSub,pow_one,nsmul_eq_mul,smul_apply,smul_eq_mul,Nat.cast_ofNat] + have hdd (v : Euclidean n) : + fderiv ℝ (fun z => fderiv ℝ (fun y => (f y)^2) z v) x v= + 2*f x*fderiv ℝ (fun z => fderiv ℝ f z v) x v+2*(fderiv ℝ f x v)^2 := by + simp_rw [hd] + have hdf₁ : ContDiff ℝ 1 (fun z => fderiv ℝ f z v) := + (hf.fderiv_right (by norm_num)).clm_apply contDiff_const + have hdf : DifferentiableAt ℝ (fun z => fderiv ℝ f z v) x := + hdf₁.differentiable (by norm_num) x + rw [fderiv_fun_mul ((hf.differentiable (by norm_num) x).const_mul 2) hdf, + fderiv_const_mul (hf.differentiable (by norm_num) x)] + simp only [add_apply,smul_apply,smul_eq_mul] + ring + rw [laplacian_eq_sum_second_directional (hf.pow 2),laplacian_eq_sum_second_directional hf] + simp_rw [hdd] + rw [Finset.sum_add_distrib,Finset.mul_sum,Finset.mul_sum] + +theorem harmonic_square_laplacian_nonneg {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) (x : Euclidean n) (hx : (Δ f) x=0) : + 0≤(Δ (fun z => (f z)^2)) x := by + rw [laplacian_square_formula hf x,hx,mul_zero,zero_add] + exact mul_nonneg (by norm_num) (Finset.sum_nonneg fun _ _ => sq_nonneg _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicWideExtension.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicWideExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..b48b88c07502d08a1d8833d665400200f5def2fb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanHarmonicWideExtension.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicCompactExtension +import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct + +namespace OAI + +/-! # A compact extension with fixed room around the half ball -/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped ContDiff Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- A C² compact extension equal to the harmonic model on the three-quarter +ball; this leaves fixed room for a mean kernel around every half-ball point. -/ +theorem EuclideanHarmonicModel.wide_compact_extension {n : ℕ} {S : ℝ} + (w : EuclideanHarmonicModel n S) (hS : 0 < S) : + ∃ F : Euclidean n → ℝ, ContDiff ℝ 2 F ∧ HasCompactSupport F ∧ + tsupport F ⊆ closedBall 0 (7*S/8) ∧ + (∀ x ∈ ball (0 : Euclidean n) (3*S/4), F x = w.value x) ∧ + (∀ x, |F x| ≤ |w.value x|) ∧ + HarmonicOnNhd F (ball 0 (3*S/4)) := by + let χ : ContDiffBump (0 : Euclidean n) := + { rIn := 3*S/4, rOut := 7*S/8, rIn_pos := by positivity, rIn_lt_rOut := by linarith } + have hs : tsupport (χ : Euclidean n → ℝ) ⊆ ball 0 S := by + rw [χ.tsupport_eq] + exact closedBall_subset_ball (by dsimp only [χ]; linarith) + let F := fun x => χ x*w.value x + have hF : ContDiff ℝ 2 F := + contDiff_mul_of_tsupport_subset isOpen_ball w.harmonic.contDiffOn χ.contDiff hs + have hFs : tsupport F ⊆ closedBall 0 (7*S/8) := by + exact tsupport_mul_subset_left.trans (by rw [χ.tsupport_eq]) + have he (x : Euclidean n) (hx : x ∈ ball 0 (3*S/4)) : F x = w.value x := by + have hh : χ x = 1 := χ.one_of_mem_closedBall (mem_closedBall.mpr (le_of_lt hx)) + change χ x*w.value x = w.value x + rw [hh,one_mul] + refine ⟨F,hF,(isCompact_closedBall _ _).of_isClosed_subset (isClosed_tsupport _) hFs,hFs,he,?_,?_⟩ + · intro x + change |χ x*w.value x| ≤ |w.value x| + rw [abs_mul,abs_of_nonneg χ.nonneg] + exact mul_le_of_le_one_left (abs_nonneg _) χ.le_one + · intro x hx + apply (harmonicAt_congr_nhds (f₁ := F) (f₂ := w.value) ?_).mpr + · exact w.harmonic x ((ball_subset_ball (by linarith : 3*S/4 ≤ S)) hx) + · filter_upwards [isOpen_ball.mem_nhds hx] with y hy + exact he y hy + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanQuadraticDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanQuadraticDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..40e75bed9139873179f3a87ea55f862a468b485a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanQuadraticDefect.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Sobolev.EuclideanScalarLaplacian +import Mathlib.Analysis.InnerProductSpace.Calculus + +namespace OAI + +/-! # Derivatives of the quadratic defining an interior torsion test -/ + +open Set Metric MeasureTheory InnerProductSpace Laplacian +open scoped ContDiff BigOperators +noncomputable section +namespace RegularPointCoordinates + +def euclideanQuadraticDefect (n : ℕ) (R : ℝ) (x : Euclidean n) : ℝ := R^2-‖x‖^2 + +theorem euclideanQuadraticDefect_smooth (n : ℕ) (R : ℝ) : + ContDiff ℝ ∞ (euclideanQuadraticDefect n R) := + contDiff_const.sub (contDiff_norm_sq ℝ) + +theorem euclideanQuadraticDefect_fderiv {n : ℕ} (R : ℝ) (x v : Euclidean n) : + fderiv ℝ (euclideanQuadraticDefect n R) x v = -2*inner ℝ x v := by + have h := (hasFDerivAt_const (R^2) x).sub (hasStrictFDerivAt_norm_sq x).hasFDerivAt + have he := congrArg (fun L : Euclidean n →L[ℝ] ℝ => L v) h.fderiv + change fderiv ℝ (euclideanQuadraticDefect n R) x v=_ at he + simp only [two_smul,zero_sub,neg_apply,add_apply,innerSL_apply_apply] at he + linarith + +theorem euclideanQuadraticDefect_basis {n : ℕ} (R : ℝ) (x : Euclidean n) (i : Fin n) : + fderiv ℝ (euclideanQuadraticDefect n R) x (EuclideanSpace.single i 1) = -2*x i := by + rw [euclideanQuadraticDefect_fderiv] + simp only [EuclideanSpace.inner_single_right,conj_trivial,one_mul] + +theorem euclideanQuadraticDefect_laplacian {n : ℕ} (R : ℝ) (x : Euclidean n) : + (Δ (euclideanQuadraticDefect n R)) x= -2*(n:ℝ) := by + rw [laplacian_eq_sum_second_directional ((euclideanQuadraticDefect_smooth n R).of_le (by simp))] + have hd (i : Fin n) : + fderiv ℝ (fun z => fderiv ℝ (euclideanQuadraticDefect n R) z (EuclideanSpace.single i 1)) x + (EuclideanSpace.single i 1)= -2 := by + simp_rw [euclideanQuadraticDefect_basis] + have he : HasFDerivAt (fun z : Euclidean n => -2*z i) ((-2:ℝ) • EuclideanSpace.proj i) x := + ((EuclideanSpace.proj i) : Euclidean n →L[ℝ] ℝ).hasFDerivAt.const_mul (-2:ℝ) + rw [he.fderiv] + simp + simp_rw [hd] + simp only [Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul] + ring + +theorem euclideanQuadraticDefect_gradient_sq {n : ℕ} (R : ℝ) (x : Euclidean n) : + (∑ i : Fin n, (fderiv ℝ (euclideanQuadraticDefect n R) x (EuclideanSpace.single i 1))^2)= + 4*‖x‖^2 := by + simp_rw [euclideanQuadraticDefect_basis,mul_pow] + rw [EuclideanSpace.real_norm_sq_eq,Finset.mul_sum] + norm_num + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialAverageDerivative.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialAverageDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..e13894f1f1940ae59621a245b571bbce9954ff47 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialAverageDerivative.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanRadialWeight +import Mathlib.Analysis.Calculus.ParametricIntegral + +namespace OAI + +/-! # Differentiating a compactly supported radial average -/ + +open Set Metric Filter MeasureTheory +open scoped ContDiff Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- A global C² compact extension permits differentiation in the averaging +radius with an integrable bound independent of that radius. -/ +theorem hasDerivAt_radial_average {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) (hfs : HasCompactSupport f) (p : Euclidean n) (t : ℝ) : + HasDerivAt (fun s : ℝ => ∫ x, f (p+s • x)*euclideanRadialWeight n x) + (∫ x, fderiv ℝ f (p+t • x) x*euclideanRadialWeight n x) t := by + let ρ := euclideanRadialWeight n + have hρ : Continuous ρ := (euclideanRadialWeight_smooth n).continuous + have hρs : HasCompactSupport ρ := euclideanRadialWeight_compact n + have hdf := hf.continuous_fderiv (by norm_num) + obtain ⟨C,hC⟩ := hdf.bounded_above_of_compact_support (hfs.fderiv ℝ) + have hF (s : ℝ) : Continuous (fun x => f (p+s • x)*ρ x) := + (hf.continuous.comp (continuous_const.add (continuous_const_smul s))).mul hρ + have hD (s : ℝ) : Continuous (fun x => fderiv ℝ f (p+s • x) x*ρ x) := + ((hdf.comp (continuous_const.add (continuous_const_smul s))).clm_apply continuous_id).mul hρ + have hderiv (x : Euclidean n) (s : ℝ) : + HasDerivAt (fun s : ℝ => f (p+s • x)*ρ x) (fderiv ℝ f (p+s • x) x*ρ x) s := by + have ha : HasDerivAt (fun s : ℝ => p+s • x) x s := by + simpa only [zero_add,one_smul] using! (hasDerivAt_const s p).add ((hasDerivAt_id s).smul_const x) + exact (((hf.differentiable (by norm_num) _).hasFDerivAt.comp_hasDerivAt s ha).mul_const (ρ x)) + have hb : Integrable (fun x : Euclidean n => C*‖x‖*ρ x) := + ((continuous_const.mul continuous_norm).mul hρ).integrable_of_hasCompactSupport hρs.mul_left + have hbound (x : Euclidean n) (s : ℝ) : + ‖fderiv ℝ f (p+s • x) x*ρ x‖ ≤ C*‖x‖*ρ x := by + rw [norm_mul,Real.norm_eq_abs (ρ x),abs_of_nonneg (euclideanRadialWeight_nonneg n x)] + exact mul_le_mul_of_nonneg_right + (((fderiv ℝ f (p+s • x)).le_opNorm x).trans + (mul_le_mul_of_nonneg_right (hC _) (norm_nonneg x))) (euclideanRadialWeight_nonneg n x) + exact (hasDerivAt_integral_of_dominated_loc_of_deriv_le + (s := (univ : Set ℝ)) (Filter.univ_mem) + (Eventually.of_forall fun s => (hF s).aestronglyMeasurable) + ((hF t).integrable_of_hasCompactSupport hρs.mul_left) + (hD t).aestronglyMeasurable + (Eventually.of_forall fun x s _ => hbound x s) hb + (Eventually.of_forall fun x s _ => hderiv x s)).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialGreen.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialGreen.lean new file mode 100644 index 0000000000000000000000000000000000000000..54f1ec216f722f4f752cd2bfb26cade4c18434e4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialGreen.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanRadialWeight + +namespace OAI + +/-! # The radial dilation pairing of a Euclidean harmonic function -/ + +open Set Metric MeasureTheory InnerProductSpace Laplacian +open scoped ContDiff InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The derivative of radial averages is a compactly supported Laplacian +pairing. This identity is valid before imposing harmonicity. -/ +theorem integral_radial_dilation_eq_laplacian {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) : + (∫ x, fderiv ℝ f x x*euclideanRadialWeight n x) = + ∫ x, (Δ f) x*euclideanRadialPotential n x := by + classical + let ψ := euclideanRadialPotential n + have hψ : ContDiff ℝ 1 ψ := (euclideanRadialPotential_smooth n).of_le (by simp) + have hsψ : HasCompactSupport ψ := euclideanRadialPotential_compact n + have heq (x : Euclidean n) : fderiv ℝ f x x*euclideanRadialWeight n x = + -∑ i : Fin n, fderiv ℝ f x (EuclideanSpace.single i 1)* + fderiv ℝ ψ x (EuclideanSpace.single i 1) := by + simp only [ψ,euclideanRadialPotential_fderiv,EuclideanSpace.inner_single_right, + RCLike.conj_to_real,one_mul] + have hsum := euclidean_linear_form_sum (fderiv ℝ f x) x + calc + _ = (∑ i : Fin n, fderiv ℝ f x (EuclideanSpace.single i 1)*x i)*euclideanRadialWeight n x := by rw [hsum] + _ = _ := by rw [Finset.sum_mul,← Finset.sum_neg_distrib]; apply Finset.sum_congr rfl; intro i _; ring + have hi (i : Fin n) : Integrable (fun x => fderiv ℝ f x (EuclideanSpace.single i 1)* + fderiv ℝ ψ x (EuclideanSpace.single i 1)) := by + have hdf : ContDiff ℝ 1 (fun x => fderiv ℝ f x (EuclideanSpace.single i 1)) := + (hf.fderiv_right (by norm_num)).clm_apply contDiff_const + exact (hdf.continuous.mul ((hψ.continuous_fderiv (by norm_num)).clm_apply continuous_const)).integrable_of_hasCompactSupport + (hsψ.fderiv_apply ℝ (EuclideanSpace.single i 1)).mul_left + have hdi (i : Fin n) : Integrable (fun x => + fderiv ℝ (fun y => fderiv ℝ f y (EuclideanSpace.single i 1)) x (EuclideanSpace.single i 1)*ψ x) := by + have hdf : ContDiff ℝ 1 (fun x => fderiv ℝ f x (EuclideanSpace.single i 1)) := + (hf.fderiv_right (by norm_num)).clm_apply contDiff_const + exact (((hdf.continuous_fderiv (by norm_num)).clm_apply continuous_const).mul hψ.continuous).integrable_of_hasCompactSupport hsψ.mul_left + simp_rw [heq] + rw [integral_neg,integral_finsetSum _ (fun i _ => hi i)] + simp_rw [integral_directional_pairing hf hψ hsψ] + rw [Finset.sum_neg_distrib,neg_neg] + rw [laplacian_eq_sum_second_directional hf] + simp_rw [Finset.sum_mul] + exact (integral_finsetSum _ (fun i _ => hdi i)).symm + +/-- Harmonicity on the support of the potential makes the radial dilation +pairing vanish. -/ +theorem integral_radial_dilation_eq_zero {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) + (hh : InnerProductSpace.HarmonicOnNhd f (closedBall 0 1)) : + (∫ x, fderiv ℝ f x x*euclideanRadialWeight n x) = 0 := by + rw [integral_radial_dilation_eq_laplacian hf] + apply integral_eq_zero_of_ae + filter_upwards with x + by_cases hx : x ∈ tsupport (euclideanRadialPotential n) + · have hz := (hh x (euclideanRadialPotential_support n hx)).2.self_of_nhds + rw [hz] + simp only [Pi.zero_apply,zero_mul] + · have hz : euclideanRadialPotential n x = 0 := by + by_contra hn + exact hx (subset_tsupport _ hn) + simp only [hz,mul_zero,Pi.zero_apply] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialMean.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..1af367e2581cebf76770cfdfe5bd23e62c6adb5c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialMean.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Sobolev.EuclideanLaplacianDilation +import OAI.Geometry.RCD.Harmonic.EuclideanRadialAverageDerivative + +namespace OAI + +/-! # The radial mean identity derived from classical harmonicity -/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped ContDiff Topology + +noncomputable section +namespace RegularPointCoordinates + +private theorem fderiv_affine_dilation_apply {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) (p : Euclidean n) (t : ℝ) (x v : Euclidean n) : + fderiv ℝ (fun y => f (p+t • y)) x v = t*fderiv ℝ f (p+t • x) v := by + have h := ((hf.differentiable (by norm_num) _).hasFDerivAt).comp x + ((hasFDerivAt_const p x).add ((hasFDerivAt_id x).const_smul t)) + have he := congrArg (fun L : Euclidean n →L[ℝ] ℝ => L v) h.fderiv + simpa only [Function.comp_def,ContinuousLinearMap.comp_apply,add_apply,zero_apply, + smul_apply,ContinuousLinearMap.id_apply,zero_add,map_smul,smul_eq_mul] using! he + +/-- Every smooth radial weight constructed above reproduces a harmonic +function whenever its rescaled support remains inside the harmonic ball. -/ +theorem harmonic_radial_mean {n : ℕ} {f : Euclidean n → ℝ} + (hf : ContDiff ℝ 2 f) (hfs : HasCompactSupport f) (p : Euclidean n) + {R r : ℝ} (hR : 0 < R) (hr : 0 < r) (hrR : r < R) + (hh : HarmonicOnNhd f (ball p R)) : + (∫ x, f (p+r • x)*euclideanRadialWeight n x) = + f p*(∫ x, euclideanRadialWeight n x) := by + let A := fun t : ℝ => ∫ x, f (p+t • x)*euclideanRadialWeight n x + have hAc : Continuous A := continuous_iff_continuousAt.mpr fun t => + (hasDerivAt_radial_average hf hfs p t).continuousAt + have hd (t : ℝ) (ht : t ∈ Ioo 0 R) : HasDerivAt A 0 t := by + have hcompose : ContDiff ℝ 2 (fun y => f (p+t • y)) := + hf.comp (contDiff_const.add (contDiff_id.const_smul t)) + have hharm : HarmonicOnNhd (fun y => f (p+t • y)) (closedBall 0 1) := by + apply (harmonicOnNhd_affine_dilation hf hh p t).mono + intro y hy + change p+t • y ∈ ball p R + rw [mem_ball,dist_eq_norm] + have hyn : ‖y‖ ≤ 1 := by simpa only [mem_closedBall,dist_zero_right] using hy + have he : p+t • y-p = t • y := by abel + rw [he,norm_smul,Real.norm_eq_abs,abs_of_pos ht.1] + exact (mul_le_mul_of_nonneg_left hyn ht.1.le).trans_lt (by simpa using ht.2) + have hz := integral_radial_dilation_eq_zero hcompose hharm + simp_rw [fderiv_affine_dilation_apply hf p t,mul_assoc] at hz + rw [integral_const_mul] at hz + have hdz : (∫ x, fderiv ℝ f (p+t • x) x*euclideanRadialWeight n x) = 0 := + (mul_eq_zero.mp hz).resolve_left ht.1.ne' + simpa only [hdz] using hasDerivAt_radial_average hf hfs p t + have hdiff : DifferentiableOn ℝ A (Ioo 0 R) := fun t ht => (hd t ht).differentiableAt.differentiableWithinAt + have hzder : EqOn (deriv A) 0 (Ioo 0 R) := fun t ht => (hd t ht).deriv + obtain ⟨c,hc⟩ := isOpen_Ioo.exists_is_const_of_deriv_eq_zero (convex_Ioo 0 R).isPreconnected hdiff hzder + have hccl : EqOn A (fun _ => c) (Icc 0 R) := by + rw [← closure_Ioo hR.ne] + exact (show EqOn A (fun _ => c) (Ioo 0 R) from hc).closure hAc continuous_const + have h0 := hccl (show (0:ℝ) ∈ Icc 0 R from ⟨le_rfl,hR.le⟩) + have hr' := hccl (show r ∈ Icc 0 R from ⟨hr.le,hrR.le⟩) + have heq : A r = A 0 := hr'.trans h0.symm + simpa only [A,zero_smul,add_zero,integral_const_mul] using heq + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialWeight.lean b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..cedc53f1617e27b772091048c4bd5cc92ae42a7f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EuclideanRadialWeight.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicCompactExtension +import Mathlib.Analysis.InnerProductSpace.Calculus + +namespace OAI + +/-! # A smooth radial averaging weight and its potential -/ + +open Set Metric MeasureTheory +open scoped ContDiff InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +private theorem glue_derivative (t : ℝ) : + deriv expNegInvGlue t = (t⁻¹)^2*expNegInvGlue t := by + have h := expNegInvGlue.hasDerivAt_polynomial_eval_inv_mul (1 : Polynomial ℝ) t + simpa using h.deriv + +def euclideanRadialPotential (n : ℕ) (x : Euclidean n) : ℝ := + expNegInvGlue (1-‖x‖^2) + +def euclideanRadialWeight (n : ℕ) (x : Euclidean n) : ℝ := + 2*deriv expNegInvGlue (1-‖x‖^2) + +theorem euclideanRadialPotential_smooth (n : ℕ) : ContDiff ℝ ∞ (euclideanRadialPotential n) := + expNegInvGlue.contDiff.comp (contDiff_const.sub (contDiff_norm_sq ℝ)) + +theorem euclideanRadialWeight_smooth (n : ℕ) : ContDiff ℝ ∞ (euclideanRadialWeight n) := by + have hd : ContDiff ℝ ∞ (deriv expNegInvGlue) := + by + apply ContDiff.deriv' + simpa using (expNegInvGlue.contDiff (n := (⊤ : ℕ∞))) + exact contDiff_const.mul (hd.comp (contDiff_const.sub (contDiff_norm_sq ℝ))) + +theorem euclideanRadialWeight_nonneg (n : ℕ) (x : Euclidean n) : + 0 ≤ euclideanRadialWeight n x := by + dsimp only [euclideanRadialWeight] + rw [glue_derivative] + exact mul_nonneg (by norm_num) (mul_nonneg (sq_nonneg _) (expNegInvGlue.nonneg _)) + +theorem euclideanRadialWeight_zero_pos (n : ℕ) : 0 < euclideanRadialWeight n 0 := by + simp only [euclideanRadialWeight,norm_zero,zero_pow (by decide : (2:ℕ) ≠ 0),sub_zero, + glue_derivative,inv_one,one_pow,one_mul] + exact mul_pos (by norm_num) (expNegInvGlue.pos_of_pos zero_lt_one) + +theorem euclideanRadialWeight_support (n : ℕ) : + tsupport (euclideanRadialWeight n) ⊆ closedBall 0 1 := by + apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + have hx1 : 1 < ‖x‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hn + apply hx + dsimp only [euclideanRadialWeight] + rw [glue_derivative,expNegInvGlue.zero_of_nonpos (by nlinarith),mul_zero,mul_zero] + +theorem euclideanRadialPotential_support (n : ℕ) : + tsupport (euclideanRadialPotential n) ⊆ closedBall 0 1 := by + apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + have hx1 : 1 < ‖x‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hn + exact hx (expNegInvGlue.zero_of_nonpos (by nlinarith)) + +theorem euclideanRadialWeight_compact (n : ℕ) : HasCompactSupport (euclideanRadialWeight n) := + (isCompact_closedBall _ _).of_isClosed_subset (isClosed_tsupport _) (euclideanRadialWeight_support n) + +theorem euclideanRadialPotential_compact (n : ℕ) : HasCompactSupport (euclideanRadialPotential n) := + (isCompact_closedBall _ _).of_isClosed_subset (isClosed_tsupport _) (euclideanRadialPotential_support n) + +theorem euclideanRadialWeight_mass_pos (n : ℕ) : + 0 < ∫ x, euclideanRadialWeight n x := + (euclideanRadialWeight_smooth n).continuous.integral_pos_of_hasCompactSupport_nonneg_nonzero + (euclideanRadialWeight_compact n) (euclideanRadialWeight_nonneg n) + (euclideanRadialWeight_zero_pos n).ne' + +/-- The radial potential converts a dilation derivative into a gradient +pairing, to which the compact-test Green identity applies. -/ +theorem euclideanRadialPotential_fderiv (n : ℕ) (x v : Euclidean n) : + fderiv ℝ (euclideanRadialPotential n) x v = + -euclideanRadialWeight n x*inner ℝ x v := by + have hinner := (hasFDerivAt_const (1:ℝ) x).sub (hasStrictFDerivAt_norm_sq x).hasFDerivAt + have hd : HasDerivAt expNegInvGlue (deriv expNegInvGlue (1-‖x‖^2)) (1-‖x‖^2) := + ((expNegInvGlue.contDiff (n := (⊤ : ℕ∞))).differentiable (by simp) _).hasDerivAt + have hf := hd.comp_hasFDerivAt x hinner + have he := congrArg (fun L : Euclidean n →L[ℝ] ℝ => L v) hf.fderiv + change fderiv ℝ (euclideanRadialPotential n) x v = _ at he + rw [he] + simp only [smul_apply,sub_apply,zero_apply,smul_eq_mul,euclideanRadialWeight] + simp only [innerSL_apply_apply] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/EventualQuadraticError.lean b/lean/OAI/Geometry/RCD/Harmonic/EventualQuadraticError.lean new file mode 100644 index 0000000000000000000000000000000000000000..5944de736bc65a7d2ffee58905b480843f50a8e5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/EventualQuadraticError.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Harmonic.QuantitativeQuadraticMean +import Mathlib.Analysis.SpecialFunctions.Pow.Continuity + +namespace OAI + +/-! # Square-root errors from uniform Young estimates + +The free Young parameter may be chosen after the mass budget. The choice +also works when the limiting mass is zero. +-/ + +open Set Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem eventual_error_le_sqrt {Y : Type*} (f : ℕ → Y → ℝ) + {C V M B : ℝ} (hB : 0≤B) + (h : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, ∀ y (a : ℝ), 0 1 / ((i : ℝ) + 1) + have hδ (i : ℕ) : 0 < δ i := by dsimp only [δ]; positivity + have hδzero : Tendsto δ atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_zero_nat + have hδanti : Antitone δ := by + intro i j hij + apply one_div_le_one_div_of_le (by positivity : 0 < (i : ℝ) + 1) + exact_mod_cast Nat.add_le_add_right hij 1 + let A := ball p R \ closedBall p r + let B : ℕ → Set X := fun i => + ball p (t * R + (1 + t) * δ i) \ closedBall p (t * r - (1 - t) * δ i) + have hBmeas (i : ℕ) : MeasurableSet (B i) := + measurableSet_ball.diff measurableSet_closedBall + have hBanti : Antitone B := by + intro i j hij x hx + have hh := hδanti hij + change dist x p < t * R + (1 + t) * δ j ∧ + ¬dist x p ≤ t * r - (1 - t) * δ j at hx + change dist x p < t * R + (1 + t) * δ i ∧ + ¬dist x p ≤ t * r - (1 - t) * δ i + constructor <;> nlinarith only [hx.1, hx.2, hh, ht, ht1] + have hupper : Tendsto (fun i => t * R + (1 + t) * δ i) atTop (𝓝 (t * R)) := by + simpa only [mul_zero, add_zero] using (hδzero.const_mul (1 + t)).const_add (t * R) + have hlower : Tendsto (fun i => t * r - (1 - t) * δ i) atTop (𝓝 (t * r)) := by + simpa only [mul_zero, sub_zero] using tendsto_const_nhds.sub (hδzero.const_mul (1 - t)) + have hBi : (⋂ i, B i) = closedBall p (t * R) \ ball p (t * r) := by + ext x + simp only [mem_iInter, Set.mem_sdiff, mem_ball, mem_closedBall] + constructor + · intro hx + have hu : dist x p ≤ t * R := + ge_of_tendsto hupper (Eventually.of_forall fun i => (hx i).1.le) + have hl : t * r ≤ dist x p := + le_of_tendsto hlower (Eventually.of_forall fun i => (lt_of_not_ge (hx i).2).le) + exact ⟨hu, not_lt_of_ge hl⟩ + · rintro ⟨hu, hl⟩ i + have hl' := le_of_not_gt hl + have hd := hδ i + have hp : 0 < (1 + t) * δ i := mul_pos (by linarith) hd + have hm : 0 < (1 - t) * δ i := mul_pos (sub_pos.mpr ht1) hd + change dist x p < t * R + (1 + t) * δ i ∧ + ¬dist x p ≤ t * r - (1 - t) * δ i + constructor <;> linarith only [hu, hl', hp, hm] + have hBfin : μ (B 0) ≠ ∞ := (hfin _ (isBounded_ball.subset sdiff_subset)).ne + have hlimB := tendsto_measure_iInter_atTop (fun i => (hBmeas i).nullMeasurableSet) + hBanti ⟨0, hBfin⟩ + rw [hBi] at hlimB + have hmap : Tendsto (fun i => (t, R + δ i)) atTop (𝓝 (t, R)) := by + exact tendsto_const_nhds.prodMk_nhds (by + simpa only [add_zero] using hδzero.const_add R) + have hc := (continuousAt_tau_nat_power_of_neg hK hn ht ht1 hR).tendsto.comp hmap + have hAfin : μ A ≠ ∞ := (hfin _ (isBounded_ball.subset sdiff_subset)).ne + have hcM := (ENNReal.continuous_mul_const hAfin).continuousAt.tendsto.comp hc + apply le_of_tendsto_of_tendsto hcM hlimB + exact Eventually.of_forall fun i => + hcd.annular_contraction μ hpos hfin hn hK.le p hR (hδ i) ht ht1 + +variable [ProperSpace X] + +theorem NoncollapsedRCD.exact_annular_contraction {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (hK : K < 0) (p : X) + {r R t : ℝ} (hr : 0 < r) (hrR : r < R) (ht : 0 < t) (ht1 : t < 1) : + tau K n t R ^ n * (hausdorff n X) (ball p R \ closedBall p r) ≤ + (hausdorff n X) (ball p (t * R) \ closedBall p (t * r)) := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + have hR : 0 < R := hr.trans hrR + have htr : t * r < t * R := mul_lt_mul_of_pos_left hrR ht + have h := hX.cd.closed_annular_contraction (hausdorff n X) hX.fullSupport + hX.finiteOnBounded hn hK p hR ht ht1 (r := r) + have hout := hX.closedBall_measure_eq_ball hn p (mul_pos ht hR) + have hin := hX.closedBall_measure_eq_ball hn p (mul_pos ht hr) + have heq : (hausdorff n X) (closedBall p (t * R) \ ball p (t * r)) = + (hausdorff n X) (ball p (t * R) \ closedBall p (t * r)) := by + rw [measure_sdiff ((ball_subset_ball htr.le).trans ball_subset_closedBall) + measurableSet_ball.nullMeasurableSet (hX.finiteOnBounded _ isBounded_ball).ne, + measure_sdiff (closedBall_subset_ball htr) measurableSet_closedBall.nullMeasurableSet + (hX.finiteOnBounded _ isBounded_closedBall).ne, hout, hin] + exact h.trans_eq heq + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..c51ebe994e1423f1902675a4325fa4c7116a094c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicCompactness.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Harmonic.ExpandingHarmonicLimit + +namespace OAI + +/-! # Entire harmonic limits from actual local Sobolev families -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.expanding_harmonic_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) + (hεlim : Tendsto ε atTop (𝓝 0)) (u : ℕ → X → ℝ) + (w : ℕ → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (L : ℕ → ℝ≥0) (A M : ℕ → ℝ) (hA : ∀ m, 0 ≤ A m) (hM : ∀ m, 0 < M m) + (hdata : ∀ m : ℕ, ∀ᶠ k in atTop, -1 ≤ K*(r k)^2 ∧ + IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) + ((m : ℝ)+1) (ε k) (V k) ∧ + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (p k) (((m : ℝ)+1)*r k)) (w m k) ∧ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w m k) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (((m : ℝ)+1)*r k))] u k) ∧ + harmonicTargetNorm hX (p k) (((m : ℝ)+1)*r k) (w m k) ≤ M m ∧ + (∀ x, dist x (p k) ≤ ((m : ℝ)+1)*r k → |u k x| ≤ A m) ∧ + (∀ x y, dist x (p k) ≤ ((m : ℝ)+1)*r k → dist y (p k) ≤ ((m : ℝ)+1)*r k → + |u k x-u k y| ≤ (L m : ℝ)*(dist x y/r k))) : + ∃ (a : ℕ → ℕ) (f : Euclidean n → ℝ), StrictMono a ∧ Continuous f ∧ + InnerProductSpace.HarmonicOnNhd f univ ∧ + (∀ ρ : ℝ, ∃ C : ℝ≥0, LipschitzOnWith C f (closedBall 0 ρ)) ∧ + ∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x, + dist x (p (a k)) ≤ W*r (a k) → |u (a k) x-f (V (a k) x)| < η := by + obtain ⟨a,f,ha,hfc,hfL,hconv⟩ := expanding_pointed_value_limit + (fun m : ℕ => (m : ℝ)+1) (fun m => by positivity) + (tendsto_atTop_add_const_right _ 1 tendsto_natCast_atTop_atTop) + p r ε V hεlim u L A hA (by + intro m + filter_upwards [hdata m] with k hk + exact ⟨hr k,hε k,hε1 k,hk.2.1.metric,hk.2.2.2.2.2.1,hk.2.2.2.2.2.2⟩) + have hharm := hX.expanding_harmonic_limit hn (p∘a) (r∘a) (ε∘a) (V∘a) + (fun k => hr (a k)) (fun k => hε (a k)) (fun k => hε1 (a k)) + (hεlim.comp ha.tendsto_atTop) (u∘a) (fun m k => w m (a k)) M hM (by + intro m + filter_upwards [ha.tendsto_atTop.eventually (hdata m)] with k hk + exact ⟨hk.1,hk.2.1,hk.2.2.1,hk.2.2.2.1,hk.2.2.2.2.1⟩) f hfc hfL hconv + exact ⟨a,f,ha,hfc,hharm,hfL,hconv⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ad4e31b3b78564600b4446d1ae808da8a6031c6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ExpandingHarmonicLimit.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicValueLimit +import OAI.Geometry.RCD.Metric.ExpandingPointedValueLimit + +namespace OAI + +/-! # Harmonic identification of the common expanding-domain value limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.expanding_harmonic_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) + (hεlim : Tendsto ε atTop (𝓝 0)) (u : ℕ → X → ℝ) + (w : ℕ → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) (M : ℕ → ℝ) + (hM : ∀ m, 0 < M m) + (hdata : ∀ m : ℕ, ∀ᶠ k in atTop, -1 ≤ K*(r k)^2 ∧ + IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) + ((m : ℝ)+1) (ε k) (V k) ∧ + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (p k) (((m : ℝ)+1)*r k)) (w m k) ∧ + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w m k) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (((m : ℝ)+1)*r k))] u k) ∧ + harmonicTargetNorm hX (p k) (((m : ℝ)+1)*r k) (w m k) ≤ M m) + (f : Euclidean n → ℝ) (hfc : Continuous f) + (hfL : ∀ ρ : ℝ, ∃ L : ℝ≥0, LipschitzOnWith L f (closedBall 0 ρ)) + (hconv : ∀ W : ℝ, 0 < W → ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, + ∀ x, dist x (p k) ≤ W*r k → |u k x-f (V k x)| < η) : + InnerProductSpace.HarmonicOnNhd f univ := by + have hlocal (m : ℕ) : InnerProductSpace.HarmonicOnNhd f (ball 0 ((m : ℝ)+1)) := by + obtain ⟨N,hN⟩ := eventually_atTop.1 (hdata m) + let b : ℕ → ℕ := fun k => k+N + have hb : Tendsto b atTop atTop := tendsto_add_atTop_nat N + have hd (k : ℕ) := hN (b k) (Nat.le_add_left N k) + apply hX.bounded_harmonic_value_limit hn (by positivity) (hM m) + (p∘b) (r∘b) (ε∘b) (V∘b) (fun k => hr (b k)) (fun k => (hd k).1) + (fun k => hε (b k)) (fun k => hε1 (b k)) (hεlim.comp hb) + (fun k => (hd k).2.1) (fun k => w m (b k)) + (fun k => (hd k).2.2.1) (fun k => (hd k).2.2.2.2) f hfc.continuousOn + (fun W _ => hfL W) + intro W hW hWS η hη + filter_upwards [hb.eventually (hconv W hW η hη)] with k hk + have hs : ball (p (b k)) (W*r (b k)) ⊆ + ball (p (b k)) (((m : ℝ)+1)*r (b k)) := + ball_subset_ball (mul_le_mul_of_nonneg_right hWS.le (hr (b k)).le) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hs (hd k).2.2.2.1, + ae_restrict_mem measurableSet_ball] with x hx hball + rw [hx] + exact (hk x (show dist x (p (b k)) ≤ W*r (b k) from hball.le)).le + intro z _ + obtain ⟨m,hm⟩ := exists_nat_gt ‖z‖ + apply hlocal m z + simp only [mem_ball,dist_zero_right] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FiniteGramIsometricLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/FiniteGramIsometricLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a04357127b29bff83236b1bbe46d1c21393f822 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FiniteGramIsometricLimit.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.RCD.Harmonic.FiniteHarmonicLimits +import OAI.Geometry.RCD.Sobolev.HarmonicEnergyRigidity +import OAI.Geometry.RCD.Sobolev.SumEnergyConvergence +import OAI.Geometry.RCD.Sobolev.SobolevSumValueConvergence +import OAI.Geometry.RCD.Coordinates.EuclideanCovectorIsometry +import OAI.Geometry.RCD.Harmonic.FiniteMeasuredHarmonicSequence +import OAI.Geometry.RCD.Coordinates.UnitCoordinateDirections + +namespace OAI + +/-! # Almost orthonormal harmonic families have affine isometric limits -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal ContDiff +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.finite_harmonic_isometric_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*r k^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w i k)) + {M : ℝ} (hM : 0 < M) (hnorm : ∀ i k, harmonicTargetNorm hX (p k) (5*r k) (w i k) ≤ M) + (hgram : ∀ i j, Tendsto (fun k => ((hausdorff n X).real (ball (p k) (5*r k)))⁻¹* + ∫ x in ball (p k) (4*r k), + |r k^2*localGamma (hausdorff n X) hX.quadratic (w i k) (w j k) x- + (if i=j then 1 else 0)| ∂hausdorff n X) atTop (𝓝 0)) : + ∃ α : ℕ → ℕ, StrictMono α ∧ ∃ g : Fin n → Euclidean n → ℝ, + ∃ T : Euclidean n ≃ₗᵢ[ℝ] Euclidean n, + (∀ i x, x ∈ ball (0 : Euclidean n) 3 → g i x = g i 0+T x i) ∧ + ∀ i W, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (α k)) (W*r (α k))), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i (α k)) x-g i (V (α k) x)| ≤ δ := by + obtain ⟨α,hα,g,hh,hg,hL,hconv⟩ := hX.finite_bounded_harmonic_limits hn + (by norm_num : (0:ℝ)<5) hM p r ε V hr hcurv hε hε1 hεlim hV w hw hnorm + let μ := hausdorff n X + let p' := p∘α + let r' := r∘α + let ε' := ε∘α + let V' := V∘α + let w' := fun i => w i∘α + have heps : Tendsto ε' atTop (𝓝 0) := hεlim.comp hα.tendsto_atTop + have herr (i j : Fin n) : Tendsto (fun k => (μ.real (ball (p' k) (5*r' k)))⁻¹* + ∫ x in ball (p' k) (4*r' k), + |r' k^2*localGamma μ hX.quadratic (w' i k) (w' j k) x-(if i=j then 1 else 0)| ∂μ) + atTop (𝓝 0) := (hgram i j).comp hα.tendsto_atTop + have hdiag (i : Fin n) : Tendsto (fun k => (μ.real (ball (p' k) (5*r' k)))⁻¹* + ∫ x in ball (p' k) (4*r' k), + |r' k^2*localGamma μ hX.quadratic (w' i k) (w' i k) x-1| ∂μ) atTop (𝓝 0) := by + simpa only [ite_true] using herr i i + have hgrad (i : Fin n) : ∀ x ∈ ball (0 : Euclidean n) 3, ‖fderiv ℝ (g i) x‖^2=1 := + hX.harmonic_constant_energy_gradient_limit hn p' r' ε' V' (fun k => hr (α k)) + (fun k => hcurv (α k)) (fun k => hε (α k)) (fun k => hε1 (α k)) heps + (fun k => hV (α k)) (w' i) (fun k => hw i (α k)) hM (fun k => hnorm i (α k)) + (g i) (hg i) (hL i) (hconv i) (hdiag i) + have haff (i : Fin n) : ∀ x ∈ ball (0 : Euclidean n) 3, + g i x=g i 0+fderiv ℝ (g i) 0 x := + local_harmonic_constant_energy_affine (by norm_num) ((hg i).mono (ball_subset_ball (by norm_num))) + ((hh i).mono (ball_subset_ball (by norm_num))) (hgrad i) + have hsum (i j : Fin n) (hij : i ≠ j) : ‖fderiv ℝ (g i) 0+fderiv ℝ (g j) 0‖^2=2 := by + have hpair : Tendsto (fun k => (μ.real (ball (p' k) (5*r' k)))⁻¹* + ∫ x in ball (p' k) (4*r' k), + |r' k^2*localGamma μ hX.quadratic (w' i k) (w' j k) x| ∂μ) atTop (𝓝 0) := by + simpa only [hij,ite_false,sub_zero] using herr i j + have hsumerr := sum_energy_l1_tendsto μ hX.quadratic + (fun k => ball (p' k) (4*r' k)) (fun k => (hX.finiteOnBounded _ isBounded_ball).ne) + r' (fun k => (μ.real (ball (p' k) (5*r' k)))⁻¹) + (fun k => inv_nonneg.mpr (measureReal_nonneg)) (w' i) (w' j) 1 0 1 + (hdiag i) (by simpa only [sub_zero] using hpair) (hdiag j) + have hconvsum : ∀ W : ℝ, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p' k) (W*r' k)), + |SobolevSpace.toLp μ hX.quadratic (w' i k+w' j k) x- + (g i (V' k x)+g j (V' k x))| ≤ δ := by + intro W hW hW5 + exact sobolev_sum_value_convergence μ hX.quadratic (fun k => ball (p' k) (W*r' k)) V' + (w' i) (w' j) (g i) (g j) (hconv i W hW hW5) (hconv j W hW hW5) + have hLip : ∀ W < (5:ℝ), ∃ L : ℝ≥0, + LipschitzOnWith L (fun z => g i z+g j z) (closedBall 0 W) := by + intro W hW + obtain ⟨Li,hi⟩ := hL i W hW + obtain ⟨Lj,hj⟩ := hL j W hW + exact ⟨Li+Lj,hi.add hj⟩ + have hnormsum (k : ℕ) : harmonicTargetNorm hX (p' k) (5*r' k) (w' i k+w' j k) ≤ 2*M := by + have hi : harmonicTargetNorm hX (p' k) (5*r' k) (w' i k) ≤ M := hnorm i (α k) + have hj : harmonicTargetNorm hX (p' k) (5*r' k) (w' j k) ≤ M := hnorm j (α k) + exact (harmonicTargetNorm_add_le hX _ _ _ _).trans (by linarith) + have hgradsum := hX.harmonic_constant_energy_gradient_limit hn p' r' ε' V' + (fun k => hr (α k)) (fun k => hcurv (α k)) (fun k => hε (α k)) (fun k => hε1 (α k)) + heps (fun k => hV (α k)) (fun k => w' i k+w' j k) + (fun k => (hw i (α k)).add μ hX.quadratic (hw j (α k))) (by positivity : 0<2*M) + hnormsum (fun z => g i z+g j z) ((hg i).add (hg j)) hLip hconvsum + (by simpa only [mul_zero,add_zero,zero_add,show (1:ℝ)+1=2 by norm_num] using hsumerr) + have h0 := hgradsum 0 (mem_ball_self (by norm_num : (0:ℝ)<3)) + rw [fderiv_fun_add ((hg i).differentiableOn (by simp) |>.differentiableAt + (isOpen_ball.mem_nhds (mem_ball_self (by norm_num : (0:ℝ)<5)))) + ((hg j).differentiableOn (by simp) |>.differentiableAt + (isOpen_ball.mem_nhds (mem_ball_self (by norm_num : (0:ℝ)<5))))] at h0 + exact h0 + obtain ⟨T,hT⟩ := euclidean_isometry_of_covector_norms (fun i => fderiv ℝ (g i) 0) + (fun i => hgrad i 0 (mem_ball_self (by norm_num))) hsum + exact ⟨α,hα,g,T,fun i x hx => (haff i x hx).trans (by rw [hT]),hconv⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicLimits.lean b/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebfaec595e3bfd8a1e0918781201279ab8138ba2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicLimits.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Harmonic.FiniteHarmonicSubsequence +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicCompactness + +namespace OAI + +/-! # A common smooth harmonic limit for a prescribed finite family -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal ContDiff +noncomputable section +namespace RegularPointCoordinates + +theorem finite_subsequence_value_choice {ι D : Type*} [Fintype ι] [Inhabited D] + (P : ι → (ℕ → ℕ) → D → Prop) + (hsub : ∀ i α g β, P i α g → StrictMono β → P i (α∘β) g) + (hex : ∀ α : ℕ → ℕ, StrictMono α → ∀ i, ∃ β : ℕ → ℕ, StrictMono β ∧ ∃ g, P i (α∘β) g) : + ∃ α, StrictMono α ∧ ∃ g : ι → D, ∀ i, P i α (g i) := by + classical + have hfinite (s : Finset ι) : ∃ α, StrictMono α ∧ ∃ g : ι → D, ∀ i ∈ s, P i α (g i) := by + induction s using Finset.induction_on with + | empty => exact ⟨id,strictMono_id,fun _ => default,by simp⟩ + | @insert i s hi ih => + obtain ⟨α,hα,g,hg⟩ := ih + obtain ⟨β,hβ,v,hv⟩ := hex α hα i + refine ⟨α∘β,hα.comp hβ,Function.update g i v,?_⟩ + intro j hj + by_cases hji : j=i + · subst j + simpa only [Function.update_self] using hv + · rw [Function.update_of_ne hji] + exact hsub j α (g j) β (hg j ((Finset.mem_insert.mp hj).resolve_left hji)) hβ + obtain ⟨α,hα,g,hg⟩ := hfinite Finset.univ + exact ⟨α,hα,g,fun i => hg i (Finset.mem_univ i)⟩ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.finite_bounded_harmonic_limits {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {S M : ℝ} (hS : 0 < S) (hM : 0 < M) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1 ≤ K*r k^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) S (ε k) (V k)) + {ι : Type*} [Fintype ι] (w : ι → ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (S*r k)) (w i k)) + (hnorm : ∀ i k, harmonicTargetNorm hX (p k) (S*r k) (w i k) ≤ M) : + ∃ α : ℕ → ℕ, StrictMono α ∧ ∃ g : ι → Euclidean n → ℝ, + (∀ i, InnerProductSpace.HarmonicOnNhd (g i) (ball 0 S)) ∧ + (∀ i, ContDiffOn ℝ ∞ (g i) (ball 0 S)) ∧ + (∀ i W, W < S → ∃ L : ℝ≥0, LipschitzOnWith L (g i) (closedBall 0 W)) ∧ + ∀ i W, 0 < W → W < S → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (α k)) (W*r (α k))), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i (α k)) x-g i (V (α k) x)| ≤ δ := by + let P := fun (i : ι) (α : ℕ → ℕ) (g : Euclidean n → ℝ) => + InnerProductSpace.HarmonicOnNhd g (ball 0 S) ∧ ContDiffOn ℝ ∞ g (ball 0 S) ∧ + (∀ W < S, ∃ L : ℝ≥0, LipschitzOnWith L g (closedBall 0 W)) ∧ + ∀ W : ℝ, 0 < W → W < S → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (α k)) (W*r (α k))), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (w i (α k)) x-g (V (α k) x)| ≤ δ + have hsub : ∀ i α g β, P i α g → StrictMono β → P i (α∘β) g := by + rintro i α g β ⟨hh,hg,hL,hconv⟩ hβ + exact ⟨hh,hg,hL,fun W hW hWS δ hδ => hβ.tendsto_atTop.eventually (hconv W hW hWS δ hδ)⟩ + have hex : ∀ α : ℕ → ℕ, StrictMono α → ∀ i, ∃ β : ℕ → ℕ, StrictMono β ∧ ∃ g, P i (α∘β) g := by + intro α hα i + obtain ⟨β,hβ,g,_,hgc,hgw,hgs,hgL,hconv⟩ := hX.bounded_harmonic_compactness hn hS hM + (p∘α) (r∘α) (ε∘α) (V∘α) (fun k => hr (α k)) (fun k => hcurv (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) + (fun k => hV (α k)) (w i∘α) (fun k => hw i (α k)) (fun k => hnorm i (α k)) + exact ⟨β,hβ,g,continuous_weak_harmonic hgc hgw,hgs,hgL,hconv⟩ + obtain ⟨α,hα,g,hg⟩ := finite_subsequence_value_choice P hsub hex + exact ⟨α,hα,g,fun i => (hg i).1,fun i => (hg i).2.1, + fun i => (hg i).2.2.1,fun i => (hg i).2.2.2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicSubsequence.lean b/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicSubsequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..16889fb0c35488ed63043717cc99e860e50b5629 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FiniteHarmonicSubsequence.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Coordinates.InnerCoordinateSequence + +namespace OAI + +/-! # One subsequence for the finite harmonic coordinate family -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem finite_subsequence_choice {ι D : Type*} [Fintype ι] [Inhabited D] + (P : ι → (ℕ → ℕ) → (ℕ → D) → Prop) + (hsub : ∀ i α w β, P i α w → StrictMono β → P i (α∘β) (w∘β)) + (hex : ∀ α : ℕ → ℕ, StrictMono α → ∀ i, ∃ β : ℕ → ℕ, StrictMono β ∧ ∃ w, P i (α∘β) w) : + ∃ α, StrictMono α ∧ ∃ w : ι → ℕ → D, ∀ i, P i α (w i) := by + classical + have hfinite (s : Finset ι) : + ∃ α, StrictMono α ∧ ∃ w : ι → ℕ → D, ∀ i∈s, P i α (w i) := by + induction s using Finset.induction_on with + | empty => exact ⟨id,strictMono_id,(fun _ _ => default),by simp⟩ + | @insert i s hi ih => + obtain ⟨α,hα,w,hw⟩ := ih + obtain ⟨β,hβ,v,hv⟩ := hex α hα i + refine ⟨α∘β,hα.comp hβ,Function.update (fun j => w j∘β) i v,?_⟩ + intro j hj + by_cases hji : j=i + · subst j + simpa only [Function.update_self] using hv + · rw [Function.update_of_ne hji] + exact hsub j α (w j) β (hw j ((Finset.mem_insert.mp hj).resolve_left hji)) hβ + obtain ⟨α,hα,w,hw⟩ := hfinite Finset.univ + exact ⟨α,hα,w,fun i => hw i (Finset.mem_univ i)⟩ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.finite_harmonic_coordinate_sequence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*(16*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 16 (ε k) (V k)) : + ∃ α : ℕ → ℕ, StrictMono α ∧ ∃ w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic, + (∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p (α k)) (5*r (α k))) (w i k)) ∧ + (∀ i k, harmonicTargetNorm hX (p (α k)) (5*r (α k)) (w i k)≤7) ∧ + (∀ i W, 0 + (∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p (α k)) (5*r (α k))) (w k)) ∧ + (∀ k, harmonicTargetNorm hX (p (α k)) (5*r (α k)) (w k)≤7) ∧ + (∀ W, 0 hh (β k),fun k => hnm (β k), + fun W hW hW5 δ hδ => hβ.tendsto_atTop.eventually (hv W hW hW5 δ hδ)⟩ + have hsmall (k : ℕ) {t : ℝ} (ht : 0≤t) (ht16 : t≤16) : -1≤K*(t*r k)^2 := by + by_cases hK : 0≤K + · exact (by norm_num : (-1:ℝ)≤0).trans (mul_nonneg hK (sq_nonneg _)) + · exact (hcurv k).trans (mul_le_mul_of_nonpos_left + (pow_le_pow_left₀ (mul_nonneg ht (hr k).le) (mul_le_mul_of_nonneg_right ht16 (hr k).le) 2) + (le_of_not_ge hK)) + have hex : ∀ α : ℕ → ℕ, StrictMono α → ∀ i, ∃ β : ℕ → ℕ, StrictMono β ∧ ∃ w, P i (α∘β) w := by + intro α hα i + have hc1 (k : ℕ) : -1≤K*(r (α k))^2 := by + simpa using hsmall (α k) (t:=1) (by norm_num) (by norm_num) + have hc14 (k : ℕ) : -1≤K*(2*(7*r (α k)))^2 := by + convert hsmall (α k) (t:=14) (by norm_num) (by norm_num) using 1; ring + obtain ⟨β,hβ,w,_,hh,hnm,hv⟩ := hX.inner_coordinate_sequence hn + (S:=16) (R:=7) (T:=5) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) + (p∘α) (r∘α) (ε∘α) (V∘α) (fun k => hr (α k)) hc1 hc14 (fun k => hcurv (α k)) + (fun k => hε (α k)) (fun k => hε1 (α k)) (hεlim.comp hα.tendsto_atTop) (fun k => hV (α k)) i + exact ⟨β,hβ,w,hh,by simpa only [Function.comp_def,show (5:ℝ)+2=7 by norm_num] using hnm,hv⟩ + let : Inhabited (SobolevSpace (hausdorff n X) hX.quadratic) := ⟨0⟩ + obtain ⟨α,hα,w,hw⟩ := finite_subsequence_choice P hsub hex + exact ⟨α,hα,w,fun i => (hw i).1,fun i => (hw i).2.1,fun i => (hw i).2.2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FiniteMeasuredHarmonicSequence.lean b/lean/OAI/Geometry/RCD/Harmonic/FiniteMeasuredHarmonicSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b42395d84a2603f0f15212da31640d91e649835 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FiniteMeasuredHarmonicSequence.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.RCD.Harmonic.FiniteHarmonicSubsequence + +namespace OAI + +/-! # The whole coordinate family on one measured inner sequence -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.finite_measured_harmonic_sequence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*(16*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 16 (ε k) (V k)) : + ∃ α : ℕ → ℕ, StrictMono α ∧ ∃ w : Fin n → ℕ → SobolevSpace (hausdorff n X) hX.quadratic, + (∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p (α k)) (r (α k)) 5 + (1/((k:ℝ)+1)) (V (α k))) ∧ + (∀ i k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p (α k)) (5*r (α k))) (w i k)) ∧ + (∀ i k, harmonicTargetNorm hX (p (α k)) (5*r (α k)) (w i k)≤7) ∧ + (∀ i W, 0 1/((k:ℝ)+1)) + (fun k => hr (a k)) (fun k => hε (a k)) (fun k => hV (a k)) + (fun _ => (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos (by norm_num) (hr (a k)))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) + (hεlim.comp ha.tendsto_atTop) (fun k => by positivity) + refine ⟨a∘b,ha.comp hb,(fun i k => w i (b k)),hbV,?_,?_,?_⟩ + · exact fun i k => hw i (b k) + · exact fun i k => hnorm i (b k) + · intro i W hW hW5 δ hδ + exact hb.tendsto_atTop.eventually (hconv i W hW hW5 δ hδ) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAbsoluteAffineMean.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAbsoluteAffineMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ac9d373fa7496c3cde661d7e3ef4595a16d14c0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAbsoluteAffineMean.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderAffineMean +import OAI.Geometry.RCD.Transport.HalfRestrictedOptimalPlan + +namespace OAI + +/-! # Mean absolute affine defects of the original splitting coordinates -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.first_order_absolute_affine_mean {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K*(16*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hε0 : Tendsto ε atTop (𝓝 0)) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (hsplit : ∀ k, FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (16*r k) (ε k) (u k) (v k)) + (π : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (π k)] + (hgeo : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) + (hopt : ∀ k, IsOptimalCoupling ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) ((π k).map (fun γ => (γ 0,γ 1)))) + {B : ℝ} (hB : 0 ≤ B) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t) ≤ + ENNReal.ofReal (B/(hausdorff n X).real (ball (p k) (4*r k))) • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k) ≤ r k/12) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k) ≤ r k/12) + (i : Fin n) (t : Time) : + Tendsto (fun k => (∫ γ, |v k (γ t) i- + ((1-(t:ℝ))*v k (γ 0) i+(t:ℝ)*v k (γ 1) i)| ∂π k)/r k) atTop (𝓝 0) := by + let m := hausdorff n X + let q := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded m hX.finiteOnBounded + let := hX.openPos K n + obtain ⟨g,d,V,L,A,_hd,hV,hVc,hg,_hA,hrep,_hd0,_herr⟩ := + hX.first_order_compact_heat_data hn p r ε hr hcurv hε hε0 u v hsplit i + have hEq (k : ℕ) : EqOn (V k) (fun x => v k x i) (ball (p k) (6*r k)) := by + have hsmall : ball (p k) (6*r k) ⊆ ball (p k) (16*r k) := + ball_subset_ball (by linarith [hr k]) + have h1 : V k =ᵐ[m.restrict (ball (p k) (6*r k))] SobolevSpace.toLp m q (g k) := + Filter.EventuallyEq.symm (ae_restrict_of_ae (hg k)) + have h2 : SobolevSpace.toLp m q (g k) =ᵐ[m.restrict (ball (p k) (6*r k))] + fun x => v k x i := + (hrep k).trans (ae_restrict_of_ae_restrict_of_subset hsmall ((hsplit k).representative i)) + exact Measure.eqOn_open_of_ae_eq (h1.trans h2) isOpen_ball (hV k).continuous.continuousOn + (((EuclideanSpace.proj i).continuous.comp_continuousOn (hsplit k).continuous).mono hsmall) + let f (k : ℕ) (γ : C(Time,X)) := + (V k (γ t)-((1-(t:ℝ))*V k (γ 0)+(t:ℝ)*V k (γ 1)))/r k + have hf (k : ℕ) : Measurable (f k) := by + have hVk : Measurable (V k) := (hV k).continuous.measurable + exact ((hVk.comp (measurable_path_eval t)).sub + (((hVk.comp (measurable_path_eval 0)).const_mul (1-(t:ℝ))).add + ((hVk.comp (measurable_path_eval 1)).const_mul (t:ℝ)))).div_const (r k) + have hi (θ : Measure C(Time,X)) [IsFiniteMeasure θ] (k : ℕ) (z : Time) : + Integrable (fun γ => V k (γ z)) θ := by + obtain ⟨C,hC⟩ := (hVc k).exists_bound_of_continuous (hV k).continuous + exact Integrable.of_bound + (((hV k).continuous.measurable.comp (measurable_path_eval z)).aestronglyMeasurable) + C (Eventually.of_forall fun γ => hC (γ z)) + have hfi (θ : Measure C(Time,X)) [IsFiniteMeasure θ] (k : ℕ) : Integrable (f k) θ := + ((hi θ k t).sub (((hi θ k 0).const_mul (1-(t:ℝ))).add + ((hi θ k 1).const_mul (t:ℝ)))).div_const (r k) + have hres (θ : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (θ k)] + (hgθ : ∀ k, ∀ᵐ γ ∂θ k, IsGeodesic γ) + (hoθ : ∀ k, IsOptimalCoupling ((θ k).map (fun γ => γ 0)) + ((θ k).map (fun γ => γ 1)) ((θ k).map (fun γ => (γ 0,γ 1)))) + (C : ℝ) (hC : 0 ≤ C) + (hcθ : ∀ k (z : Time), (θ k).map (fun γ => γ z) ≤ + ENNReal.ofReal (C/m.real (ball (p k) (4*r k))) • m) + (hs0 : ∀ k, ∀ᵐ x ∂(θ k).map (fun γ => γ 0), dist x (p k) ≤ r k/12) + (hs1 : ∀ k, ∀ᵐ x ∂(θ k).map (fun γ => γ 1), dist x (p k) ≤ r k/12) : + Tendsto (fun k => ∫ γ, f k γ ∂θ k) atTop (𝓝 0) := by + have hb (k : ℕ) := optimal_geodesic_plan_bounded ((θ k).map (fun γ => γ 0)) + ((θ k).map (fun γ => γ 1)) (θ k) (hgθ k) (hoθ k) (p k) + (by linarith [hr k] : 0 ≤ r k/12) (hs0 k) (hs1 k) + have he (k : ℕ) (z : Time) : (∫ γ, V k (γ z) ∂θ k)=∫ γ, v k (γ z) i ∂θ k := by + apply integral_congr_ae + filter_upwards [hb k] with γ hγ + exact hEq k ((hγ.2 z).trans_lt (by linarith [hr k])) + have heint (k : ℕ) : (∫ γ, f k γ ∂θ k)= + ((∫ γ, v k (γ t) i ∂θ k)-((1-(t:ℝ))*(∫ γ, v k (γ 0) i ∂θ k)+ + (t:ℝ)*(∫ γ, v k (γ 1) i ∂θ k)))/r k := by + change (∫ γ, (V k (γ t)-((1-(t:ℝ))*V k (γ 0)+(t:ℝ)*V k (γ 1)))/r k ∂θ k)=_ + rw [integral_div,integral_sub (f := fun γ : C(Time,X) => V k (γ t)) + (g := fun γ : C(Time,X) => (1-(t:ℝ))*V k (γ 0)+(t:ℝ)*V k (γ 1)) + (hi (θ k) k t) (((hi (θ k) k 0).const_mul _).add ((hi (θ k) k 1).const_mul _)), + integral_add (f := fun γ : C(Time,X) => (1-(t:ℝ))*V k (γ 0)) + (g := fun γ : C(Time,X) => (t:ℝ)*V k (γ 1)) + ((hi (θ k) k 0).const_mul _) ((hi (θ k) k 1).const_mul _)] + simp only [integral_const_mul,he] + simpa only [heint] using hX.first_order_affine_mean hn hK p r ε hr hr0 hcurv + hε hε1 hε0 u v hsplit θ hgθ hoθ hC hcθ hs0 hs1 i t + let S k := {γ | 0 ≤ f k γ} + let κ k := halfRestrictedMeasure (π k) (S k) + let ρ k := (κ k univ)⁻¹ • κ k + have hdata (k : ℕ) := half_restricted_optimal_plan (π k) (hgeo k) (hopt k) + (finite_second_moment_cost + (finiteSecondMoment_of_bounded ((π k).map (fun γ => γ 0)) (p k) (hs₀ k)) + (finiteSecondMoment_of_bounded ((π k).map (fun γ => γ 1)) (p k) (hs₁ k)) + (hopt k).1 (hopt k).2.1) + m (hcomp k) (p k) (hs₀ k) (hs₁ k) (S k) + let (k : ℕ) : IsProbabilityMeasure (ρ k) := (hdata k).1 + have hcρ (k : ℕ) (z : Time) : (ρ k).map (fun γ => γ z) ≤ + ENNReal.ofReal ((2*B)/m.real (ball (p k) (4*r k))) • m := by + rw [show (2*B)/m.real (ball (p k) (4*r k))=2*(B/m.real (ball (p k) (4*r k))) by ring, + ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2)] + simpa only [ENNReal.ofReal_ofNat] using (hdata k).2.2.2.1 z + have hlim := integral_abs_tendsto_of_halfRestrictedMeans π f hf (fun k => hfi (π k) k) + (hres π hgeo hopt B hB hcomp hs₀ hs₁) + (hres ρ (fun k => (hdata k).2.1) (fun k => (hdata k).2.2.1) (2*B) (by positivity) hcρ + (fun k => (hdata k).2.2.2.2.1) (fun k => (hdata k).2.2.2.2.2)) + have hb (k : ℕ) := optimal_geodesic_plan_bounded ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) (π k) (hgeo k) (hopt k) (p k) + (by linarith [hr k] : 0 ≤ r k/12) (hs₀ k) (hs₁ k) + have he (k : ℕ) : (∫ γ, |f k γ| ∂π k)= + (∫ γ, |v k (γ t) i-((1-(t:ℝ))*v k (γ 0) i+(t:ℝ)*v k (γ 1) i)| ∂π k)/r k := by + rw [← integral_div] + apply integral_congr_ae + filter_upwards [hb k] with γ hγ + have hsame (z : Time) : V k (γ z)=v k (γ z) i := + hEq k ((hγ.2 z).trans_lt (by linarith [hr k])) + simp only [f,hsame,abs_div,abs_of_pos (hr k)] + simpa only [he] using hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAffineMean.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAffineMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..777e996e5445e5201df2291ff7af6bd15500bbd0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderAffineMean.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.RCD.Heat.FirstOrderHeatMass +import OAI.Geometry.RCD.Heat.ScaledHeatAffinePlan +import OAI.Geometry.RCD.Transport.LocalLipschitzPlanMean +import OAI.Geometry.RCD.Sobolev.ContinuousLocalGradientBound + +namespace OAI + +/-! # Affine mean limits for the original first-order splitting coordinates -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.first_order_affine_mean {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K*(16*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hε0 : Tendsto ε atTop (𝓝 0)) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (hsplit : ∀ k, FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (16*r k) (ε k) (u k) (v k)) + (π : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (π k)] + (hgeo : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) + (hopt : ∀ k, IsOptimalCoupling ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) ((π k).map (fun γ => (γ 0,γ 1)))) + {B : ℝ} (hB : 0 ≤ B) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t) ≤ + ENNReal.ofReal (B/(hausdorff n X).real (ball (p k) (4*r k))) • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k) ≤ r k/12) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k) ≤ r k/12) + (i : Fin n) (t : Time) : + Tendsto (fun k => ((∫ γ, v k (γ t) i ∂π k)- + ((1-(t:ℝ))*(∫ γ, v k (γ 0) i ∂π k)+(t:ℝ)*(∫ γ, v k (γ 1) i ∂π k)))/r k) + atTop (𝓝 0) := by + let m := hausdorff n X + let q := hX.quadratic + let := hX.separable + let := locallyFinite_of_finiteOnBounded m hX.finiteOnBounded + let a k := r k/2 + have ha (k : ℕ) : 0 < a k := half_pos (hr k) + obtain ⟨g,V,L,A,hV,hVc,hg,hA,hrep,s,hs,hs1,hs0,hval,hvalnorm,G,σ,hσ,hG,hsrc,hmass⟩ := + hX.first_order_heat_mass hn hK p r ε hr hr0 hcurv hε hε0 u v hsplit i + let (k : ℕ) : IsFiniteMeasure (σ k) := hσ k + have hcomp' (k : ℕ) (z : Time) : (π k).map (fun γ => γ z) ≤ + ENNReal.ofReal (B/m.real (ball (p k) (8*a k))) • m := by + simpa only [a,show ∀ k,8*(r k/2)=4*r k from fun k => by ring] using hcomp k z + have hs₀' (k : ℕ) : ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k) ≤ a k/6 := by + simpa only [a,show ∀ k,(r k/2)/6=r k/12 from fun k => by ring] using hs₀ k + have hs₁' (k : ℕ) : ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k) ≤ a k/6 := by + simpa only [a,show ∀ k,(r k/2)/6=r k/12 from fun k => by ring] using hs₁ k + have hbounded (k : ℕ) := optimal_geodesic_plan_bounded ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) (π k) (hgeo k) (hopt k) (p k) + (by linarith [ha k] : 0 ≤ a k/6) (hs₀' k) (hs₁' k) + have hloc (k : ℕ) : LipschitzOnWith 2 (V k) (ball (p k) (a k)) := by + have hsmall : ball (p k) (8*a k) ⊆ ball (p k) (6*r k) := + ball_subset_ball (by dsimp only [a]; linarith [hr k]) + have he := ae_restrict_of_ae_restrict_of_subset hsmall + (localGamma_pair_congr_ae m q (hrep k) (hrep k)) + have huGrad := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by dsimp only [a]; linarith [hr k]) : + ball (p k) (8*a k) ⊆ ball (p k) (16*r k)) ((hsplit k).gradient i) + apply hX.continuous_local_gradient_lipschitz hn (g k) (V k) (p k) (ha k) 2 + (hV k).continuous.continuousOn (ae_restrict_of_ae (hg k)) + filter_upwards [he,huGrad] with x hx hy + rw [hx] + norm_num only [NNReal.coe_ofNat] + nlinarith [hε k,hε1 k] + have hmeanLip (k : ℕ) : LipschitzWith 2 (fun z : Time => (∫ γ, V k (γ z) ∂π k)/a k) := by + obtain ⟨C,hC⟩ := (hVc k).exists_bound_of_continuous (hV k).continuous + have hI (z : Time) : Integrable (fun γ => V k (γ z)) (π k) := + (integrable_const |C|).mono' + (((hV k).continuous.measurable.comp (measurable_path_eval z)).aestronglyMeasurable) + (Eventually.of_forall fun γ => (hC (γ z)).trans (le_abs_self C)) + have hstay : ∀ᵐ γ ∂π k, ∀ z : Time, γ z∈ball (p k) (a k) := by + filter_upwards [hbounded k] with γ hγ z + exact (hγ.2 z).trans_lt (by linarith [ha k]) + have hlen : ∀ᵐ γ ∂π k, dist (γ 0) (γ 1) ≤ (1:ℝ≥0)*a k := by + have h0 := ae_of_ae_map (measurable_path_eval 0).aemeasurable (hs₀' k) + have h1 := ae_of_ae_map (measurable_path_eval 1).aemeasurable (hs₁' k) + filter_upwards [h0,h1] with γ h0 h1 + have ht := dist_triangle (γ 0) (p k) (γ 1) + rw [dist_comm (p k) (γ 1)] at ht + norm_num only [NNReal.coe_one,one_mul] + linarith [ha k] + simpa only [mul_one] using normalized_path_mean_lipschitz (π k) (V k) hI (hloc k) + (hgeo k) hstay (ha k) hlen + have hsrc' (k : ℕ) (ψ : SobolevSpace m q) (b : X → ℝ) + (hb : Continuous b) (hc : HasCompactSupport b) (hbs : tsupport b ⊆ ball (p k) (2*a k)) + (hbψ : SobolevSpace.toLp m q ψ =ᵐ[m] b) := + hsrc k ψ b hb hc (hbs.trans (ball_subset_ball (by dsimp only [a]; linarith [hr k]))) hbψ + have hlim := hX.scaled_heat_affine_plan hn (p 0) hK p a s ha hs π hgeo hopt hB hcomp' + hs₀' hs₁' g V (fun k => (hV k).continuous) hg A hA 2 hmeanLip G σ hG hsrc' hmass hvalnorm t + have heq (k : ℕ) (z : Time) : (∫ γ, V k (γ z) ∂π k)=∫ γ, v k (γ z) i ∂π k := by + have hsmall : ball (p k) (6*r k) ⊆ ball (p k) (16*r k) := + ball_subset_ball (by linarith [hr k]) + have h1 : V k =ᵐ[m.restrict (ball (p k) (6*r k))] SobolevSpace.toLp m q (g k) := + Filter.EventuallyEq.symm (ae_restrict_of_ae (hg k)) + have h2 : SobolevSpace.toLp m q (g k) =ᵐ[m.restrict (ball (p k) (6*r k))] + fun x => v k x i := + (hrep k).trans (ae_restrict_of_ae_restrict_of_subset hsmall ((hsplit k).representative i)) + have hVV := h1.trans h2 + have hh := ((Measure.absolutelyContinuous_of_le_smul (hcomp k z)).restrict + (ball (p k) (6*r k))).ae_eq hVV + change ∀ᵐ x ∂((π k).map (fun γ => γ z)).restrict (ball (p k) (6*r k)), + V k x=v k x i at hh + rw [ae_restrict_iff' measurableSet_ball] at hh + have hp := ae_of_ae_map (measurable_path_eval z).aemeasurable hh + apply integral_congr_ae + filter_upwards [hp,hbounded k] with γ he hb + exact he ((hb.2 z).trans_lt (by dsimp only [a]; linarith [hr k])) + have hh := hlim.const_mul (1/2:ℝ) + convert hh using 1 + · funext k + simp only [heq,a] + ring + · simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderBarrierMass.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderBarrierMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..adbcf696ba6ca9992044a01481c2d39aa69af380 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderBarrierMass.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Harmonic.TransverseBarrierLocalization + +namespace OAI + +/-! # A supported original frame forces a quantitative lower Gram-error mass -/ + +open Set Filter MeasureTheory Metric +open scoped InnerProductSpace NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_barrier_mass {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} {r ε : ℝ} + (hr : 0 v x-v p) + measurableSet_ball hsub (by positivity : 0 γ 0)) + ((π k).map (fun γ => γ 1)) ((π k).map (fun γ => (γ 0,γ 1)))) + {B : ℝ} (hB : 0≤B) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t)≤ + ENNReal.ofReal (B/(hausdorff n X).real (ball (p k) (4*r k))) • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k)≤r k/12) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k)≤r k/12) + (G : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + {M : ℝ} (henergy : ∀ k, (r k)^2* + (∑ i, ∫ x in ball (p k) (r k), localGamma (hausdorff n X) hX.quadratic (G k i) (G k i) x + ∂hausdorff n X)≤M*(hausdorff n X).real (ball (p k) (4*r k))) + (E : ℕ → X → ℝ) (hE : ∀ k x, 0≤E k x) + (hEI : ∀ k, IntegrableOn (E k) (ball (p k) (r k)) (hausdorff n X)) + (hE0 : Tendsto (fun k => ((hausdorff n X).real (ball (p k) (4*r k)))⁻¹* + ∫ x in ball (p k) (r k), E k x ∂hausdorff n X) atTop (𝓝 0)) + (P : ℕ → C(Time,X) → Prop) (hP : ∀ k, ∀ᵐ γ ∂π k, P k γ) : + ∃ (γ : ℕ → C(Time,X)) (b : ℕ → Fin n → ℝ → ℝ) (a : ℕ → ℝ), + (∀ k, P k (γ k)) ∧ (∀ k, IsGeodesic (γ k)) ∧ + (∀ k (t : Time), dist (γ k t) (p k)≤r k/4) ∧ + (∀ k, 0≤a k) ∧ Tendsto a atTop (𝓝 0) ∧ + (∀ k i (t : Time), + |(v k (γ k t) i-((1-(t:ℝ))*v k (γ k 0) i+(t:ℝ)*v k (γ k 1) i))/r k|≤a k) ∧ + (∀ k i, AbsolutelyContinuousOnInterval (b k i) 0 1) ∧ + (∀ k i, b k i =ᵐ[volume.restrict (Icc (0:ℝ) 1)] + fun t => SobolevSpace.toLp (hausdorff n X) hX.quadratic (G k i) (geodesicExtension (γ k) t)) ∧ + Tendsto (fun k => ∫ t in Icc (0:ℝ) 1, E k (geodesicExtension (γ k) t)) atTop (𝓝 0) ∧ + Tendsto (fun k => a k*(∑ i, ∫ t in Icc (0:ℝ) 1, |deriv (b k i) t|)) atTop (𝓝 0) := by + let μ := hausdorff n X + let Q := hX.quadratic + have hm (k : ℕ) : 0<μ.real (ball (p k) (4*r k)) := ENNReal.toReal_pos + (hX.fullSupport _ _ (by linarith [hr k])).ne' (hX.finiteOnBounded _ isBounded_ball).ne + let C k := ENNReal.ofReal (B/μ.real (ball (p k) (4*r k))) + have hbounded (k : ℕ) := optimal_geodesic_plan_bounded ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) (π k) (hgeo k) (hopt k) (p k) + (show 0≤r k/12 by linarith [hr k]) (hs₀ k) (hs₁ k) + have hstay (k : ℕ) (t : Time) : ∀ᵐ x ∂(π k).map (fun γ => γ t), x∈ball (p k) (r k) := by + apply (ae_map_iff (measurable_path_eval t).aemeasurable measurableSet_ball).mpr + filter_upwards [hbounded k] with γ hγ + exact (hγ.2 t).trans_lt (by linarith [hr k]) + have hspeed (k : ℕ) : ∀ᵐ γ ∂π k, dist (γ 0) (γ 1)≤r k := by + filter_upwards [hbounded k] with γ hγ + have hh := dist_triangle (γ 0) (p k) (γ 1) + rw [dist_comm (p k) (γ 1)] at hh + linarith [hγ.2 0,hγ.2 1,hr k] + have hD (k : ℕ) : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 (π k) := by + apply MemLp.of_bound ((continuous_eval_const 0).dist (continuous_eval_const 1)).aestronglyMeasurable (r k) + filter_upwards [hspeed k] with γ hγ + simpa only [Real.norm_eq_abs,abs_of_nonneg dist_nonneg] using hγ + choose F hFc hFeq hFI hF0 using fun i => + hX.first_order_uniform_affine_mean hn hK p r ε hr hr0 hcurv hε hε1 hε0 u v hsplit + π hgeo hopt hB hcomp hs₀ hs₁ i + have hFsum : Tendsto (fun k => ∫ γ, ∑ i, ‖F i k γ‖ ∂π k) atTop (𝓝 0) := by + have hh := tendsto_finsetSum univ (fun i _ => hF0 i) + simpa only [integral_finsetSum _ (fun i _ => hFI i _),sum_const_zero] using hh + have hI (k : ℕ) := compressed_segment_integral μ (π k) ENNReal.ofReal_ne_top (hcomp k) (hstay k) + (hEI k) (Eventually.of_forall (hE k)) + have hEplan : Tendsto (fun k => ∫ γ, (∫ t in Icc (0:ℝ) 1, + E k (geodesicExtension γ t)) ∂π k) atTop (𝓝 0) := by + apply squeeze_zero (fun k => integral_nonneg (fun γ => integral_nonneg (fun _ => hE k _))) + (g := fun k => B*(μ.real (ball (p k) (4*r k)))⁻¹* + ∫ x in ball (p k) (r k), E k x ∂μ) + · intro k + have hh := (hI k).2.2 + rw [ENNReal.toReal_ofReal (div_nonneg hB (hm k).le)] at hh + convert hh using 1 + ring + · simpa only [mul_zero,mul_assoc] using hE0.const_mul B + have hGbound (k : ℕ) : (n:ℝ)*(r k)^2*(C k).toReal* + (∑ i, ∫ x in ball (p k) (r k), localGamma μ Q (G k i) (G k i) x ∂μ)≤(n:ℝ)*B*M := by + rw [show (C k).toReal=B/μ.real (ball (p k) (4*r k)) from ENNReal.toReal_ofReal (div_nonneg hB (hm k).le)] + calc + _ = ((n:ℝ)*B/μ.real (ball (p k) (4*r k)))*((r k)^2* + (∑ i, ∫ x in ball (p k) (r k), localGamma μ Q (G k i) (G k i) x ∂μ)) := by ring + _ ≤ ((n:ℝ)*B/μ.real (ball (p k) (4*r k)))*(M*μ.real (ball (p k) (4*r k))) := + mul_le_mul_of_nonneg_left (henergy k) (by positivity) + _ = _ := by field_simp [(hm k).ne'] + let R k γ := P k γ ∧ (IsGeodesic γ ∧ ∀ t : Time, dist (γ t) (p k)≤r k/4) ∧ + ∀ i (t : Time), F i k γ t= + (v k (γ t) i-((1-(t:ℝ))*v k (γ 0) i+(t:ℝ)*v k (γ 1) i))/r k + have hR (k : ℕ) : ∀ᵐ γ ∂π k, R k γ := by + filter_upwards [hP k,hbounded k,ae_all_iff.mpr (fun i => hFeq i k)] with γ hp hb he + exact ⟨hp,⟨hb.1,fun t => by linarith [hb.2 t]⟩,he⟩ + obtain ⟨γ,b,hRγ,hb,he,hAlim,hZlim,hprod⟩ := controlled_coefficient_path_selection μ Q G π + hgeo C (fun _ => ENNReal.ofReal_ne_top) hcomp hD r hspeed + (fun k => ball (p k) (r k)) hstay hGbound (fun k i => F i k) + (fun k i => hFI i k) hFsum E hE hEI hEplan R hR + refine ⟨γ,b,fun k => ∑ i, ‖F i k (γ k)‖,fun k => (hRγ k).1,fun k => (hRγ k).2.1.1, + fun k => (hRγ k).2.1.2,fun k => sum_nonneg (fun _ _ => norm_nonneg _),hAlim,?_,hb,he,hZlim,hprod⟩ + intro k i t + rw [← (hRγ k).2.2 i t] + exact ((F i k (γ k)).norm_coe_le_norm t).trans + (single_le_sum (fun j _ => norm_nonneg (F j k (γ k))) (mem_univ i)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderColumnEndpoint.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderColumnEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..680c1676405e803dd016558118a7a5be24235224 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderColumnEndpoint.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Transport.ColumnPlanGramEndpoint +import OAI.Geometry.RCD.Coordinates.FirstOrderRegularFamily +import OAI.Geometry.RCD.Harmonic.GramDefectLocality + +namespace OAI + +/-! # Integrated Gram endpoint bounds for the original coordinates -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal ENNReal InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.first_order_column_endpoint {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} {r ε : ℝ} + (hr : 0 γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1)))) + {C : ℝ≥0∞} (hC : C≠∞) (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • hausdorff n X) + (hs₀ : ∀ᵐ x ∂π.map (fun γ => γ 0), dist x p≤r/12) + (hs₁ : ∀ᵐ x ∂π.map (fun γ => γ 1), dist x p≤r/12) : + ∀ᵐ γ ∂π, + ⟪v (γ 1)-v (γ 0),a⟫_ℝ^2≤(dist (γ 0) (γ 1))^2*‖a‖^2* + (1+∫ t in Icc (0:ℝ) 1, gramDefect (hausdorff n X) hX.quadratic u (geodesicExtension γ t)) := by + let μ := hausdorff n X + let Q := hX.quadratic + obtain ⟨U,d,W,_L,_A,_hd,_hL,_hWc,hW,_hA,hu,_hd0,hv,_hgrad⟩ := + hX.first_order_regular_family hn hr hε hε1 u v hsplit + let F (x : X) : Euclidean n := WithLp.toLp 2 (fun i => W i x) + have hF : Continuous F := (PiLp.continuous_toLp 2 (fun _ : Fin n => ℝ)).comp + (continuous_pi (fun i => (W i).continuous)) + have hFv : EqOn F v (ball p (6*r)) := by + intro x hx + apply PiLp.ext + intro i + exact hv i hx + have hbounded := optimal_geodesic_plan_bounded (π.map (fun γ => γ 0)) + (π.map (fun γ => γ 1)) π hgeo hopt p (show 0≤r/12 by linarith) hs₀ hs₁ + have hstay : ∀ᵐ γ ∂π, ∀ t : Time, γ t∈ball p (6*r) := by + filter_upwards [hbounded] with γ hγ t + exact (hγ.2 t).trans_lt (by linarith) + have hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π := by + apply MemLp.of_bound ((continuous_eval_const 0).dist (continuous_eval_const 1)).aestronglyMeasurable r + filter_upwards [hbounded] with γ hγ + rw [Real.norm_eq_abs,abs_of_nonneg dist_nonneg] + have hh := dist_triangle (γ 0) p (γ 1) + rw [dist_comm p (γ 1)] at hh + linarith [hγ.2 0,hγ.2 1] + have hcol := column_plan_gram_endpoint μ Q (fun i => (U i).val) F hF hW a π hgeo hC hcomp hD + measurableSet_ball hstay (gramDefect_integrableOn μ Q _ (hX.finiteOnBounded _ isBounded_ball).ne) + have he := testPlan_eval_property_on μ π hcomp measurableSet_ball hstay (gramDefect_congr_ae μ Q hu) + filter_upwards [hcol,he,hstay] with γ hcol he hs + rw [hFv (hs 0),hFv (hs 1),integral_congr_ae he] at hcol + exact hcol + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderCompactRepresentative.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderCompactRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..db2f81475975b764d76c5ca32f065ea217ba390e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderCompactRepresentative.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Coordinates.RegularCoreRepresentative +import OAI.Geometry.RCD.Coordinates.LocalPoissonRegularExtension +import OAI.Geometry.RCD.Coordinates.SplittingApproximation +import OAI.Geometry.RCD.Sobolev.ContinuousLocalGradientBound + +namespace OAI + +/-! # Compact continuous representatives of the original local coordinates -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_compact_representative {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {p : X} {r ε : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n) + (hs : FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (16*r) ε u v) (i : Fin n) : + ∃ (V : C(X,ℝ)) (L A : ℝ≥0), LipschitzWith L V ∧ HasCompactSupport V ∧ + (∀ x, |V x| ≤ A) ∧ EqOn V (fun x => v x i) (ball p (6*r)) ∧ + LipschitzOnWith 2 V (ball p (r/2)) := by + let m := hausdorff n X + let q := hX.quadratic + let := hX.openPos K n + let ℓ : ℝ≥0 := ⟨1+ε,by linarith⟩ + obtain ⟨g,d,_hd,hrep,_hd0⟩ := hX.local_poisson_regular_extension hn (u i) 0 + (show 0 < 6*r by linarith) (show 2*(6*r)<16*r by linarith) + ((isConstantLaplacianOn_zero_iff m q _ _).mpr (hs.harmonic i)) ℓ (hs.gradient i) + obtain ⟨V,L,_A,hV,hVc,hg,_hA⟩ := regular_core_representative m q g + obtain ⟨A,hA⟩ := hVc.exists_bound_of_continuous hV.continuous + let A' : ℝ≥0 := ⟨max A 0,le_max_right _ _⟩ + have hsmall : ball p (6*r) ⊆ ball p (16*r) := ball_subset_ball (by linarith) + have h1 : V =ᵐ[m.restrict (ball p (6*r))] SobolevSpace.toLp m q g.val := + Filter.EventuallyEq.symm (ae_restrict_of_ae hg) + have h2 : SobolevSpace.toLp m q g.val =ᵐ[m.restrict (ball p (6*r))] fun x => v x i := + hrep.trans (ae_restrict_of_ae_restrict_of_subset hsmall (hs.representative i)) + have hEq := Measure.eqOn_open_of_ae_eq (h1.trans h2) isOpen_ball hV.continuous.continuousOn + (((EuclideanSpace.proj i).continuous.comp_continuousOn hs.continuous).mono hsmall) + refine ⟨⟨V,hV.continuous⟩,L,A',hV,hVc,?_,hEq,?_⟩ + · intro x + exact (show |V x| ≤ A by simpa only [Real.norm_eq_abs] using hA x).trans (le_max_left _ _) + · have h4 : ball p (8*(r/2)) ⊆ ball p (6*r) := ball_subset_ball (by linarith) + have he := ae_restrict_of_ae_restrict_of_subset h4 (localGamma_pair_congr_ae m q hrep hrep) + have hgrad := ae_restrict_of_ae_restrict_of_subset + (h4.trans hsmall) (hs.gradient i) + apply hX.continuous_local_gradient_lipschitz hn g.val V p (half_pos hr) 2 + hV.continuous.continuousOn (ae_restrict_of_ae hg) + filter_upwards [he,hgrad] with x hx hy + rw [hx] + norm_num only [NNReal.coe_ofNat] + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderDistanceDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderDistanceDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..b87ed3adf54162f4f4b3504b4d13dc5abff46d96 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderDistanceDefect.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Sobolev.FirstOrderTestMetricDefect +import OAI.Geometry.RCD.Metric.InwardDistance + +namespace OAI + +/-! # The original first-order coordinates asymptotically recover distance -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_distance_defect {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p x y : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 max 0 (dist (x k) (y k)/r k- + dist (v k (x k)) (v k (y k))/r k)) atTop (𝓝 0) := by + let μ := hausdorff n X + let Q := hX.quadratic + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let W k := inwardSobolev μ Q (x k) (r k) + let V k := inwardDistance (x k) (r k) + let A (k : ℕ) : ℝ≥0 := ⟨r k,(hr k).le⟩ + have hrep (k : ℕ) : V k =ᵐ[μ] SobolevSpace.toLp μ Q (W k) := + (inwardSobolev_coe μ Q (x k) (r k)).symm + have hA (k : ℕ) : ∀ᵐ z ∂μ, |SobolevSpace.toLp μ Q (W k) z|≤A k := by + filter_upwards [inwardSobolev_bounds μ Q (x k) (hr k).le] with z hz + change |SobolevSpace.toLp μ Q (W k) z|≤r k + change 0≤SobolevSpace.toLp μ Q (W k) z ∧ SobolevSpace.toLp μ Q (W k) z≤r k at hz + rw [abs_of_nonneg hz.1] + exact hz.2 + have hlim := hX.first_order_test_metric_defect hn hK p x y r ε hr hr0 hcurv hε hε1 hε0 + u v hsplit hx hy (fun k => SobolevSpace.toLp μ Q (W k)) V 1 1 A + (fun k => inwardDistance_lipschitz (x k) (r k)) + (fun k => inwardDistance_compact (x k) (r k)) hrep hA (fun k => by change r k≤1*r k; simp) + have hval (k : ℕ) : |V k (y k)-V k (x k)|=dist (x k) (y k) := by + have hd : dist (x k) (y k)≤r k := by + have hh := dist_triangle (x k) (p k) (y k) + rw [dist_comm (p k) (y k)] at hh + linarith [hx k,hy k,hr k] + simp only [V,inwardDistance,dist_self,sub_zero,max_eq_left (hr k).le, + max_eq_left (sub_nonneg.mpr hd),sub_sub_cancel_left,abs_neg,abs_of_nonneg dist_nonneg] + simpa only [hval,NNReal.coe_one,one_mul] using hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderEuclideanLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderEuclideanLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..3284431e87ed4cf09ef78e7b10385c836a48d991 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderEuclideanLimit.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderIsometricCompactness +import OAI.Geometry.RCD.Harmonic.FirstOrderLimitNoSupport +import OAI.Geometry.RCD.Metric.MetricLimitConvexImage +import OAI.Geometry.RCD.Metric.MetricLimitBallImage + +namespace OAI + +/-! # The actual first-order coordinates fill a Euclidean ball in the metric limit -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +universe u +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_euclidean_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε : ℕ → ℝ) + (hr : ∀ k, 0 WithLp.toLp 2 (fun i => g i y) + have hF : Continuous F := (PiLp.continuous_toLp 2 (fun _ : Fin n => ℝ)).comp + (continuous_pi (fun i => (hg i).1.continuous)) + have hFq : F q=0 := by + ext i + exact (hg i).2 + have hv := finite_metric_value_limit (p∘a) (r∘a) V + (fun k x => (r (a k))⁻¹ • (v (a k) x-v (a k) (p (a k)))) g + (fun i η hη => by + simpa only [Function.comp_apply,PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul,div_eq_inv_mul] + using hvalues i η hη) + refine ⟨a,ha,Y,dY,hproper,q,δ,V,F,hδ,hδ0,hV,hF,hFq,hv,hiso,?_⟩ + obtain ⟨hc,hconv⟩ := metric_limit_convex_image hX.geodesic (p∘a) (r∘a) δ V + (fun k => hr (a k)) hδ0 hV F hF hiso + have himage := metric_limit_closedBall_image F q hc hconv hiso (by + intro y hy b hb hs + exact hX.first_order_limit_no_support hn hK (p∘a) (r∘a) (ε∘a) δ V q + (fun k => hr (a k)) (hr0.comp ha.tendsto_atTop) (fun k => hcurv (a k)) + (fun k => hε (a k)) (fun k => hε1 (a k)) (hε0.comp ha.tendsto_atTop) + hδ0 hV (U∘a) (v∘a) (fun k => hsplit (a k)) F hF hv hy b hb hs) + simpa only [hFq] using himage + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromConvergingGrams.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromConvergingGrams.lean new file mode 100644 index 0000000000000000000000000000000000000000..f353a732b6c7b21ca20cf1b59c673772eae71222 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromConvergingGrams.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Harmonic.NearbyMeanGrams +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # Converging Gram errors give splitting for the prescribed original family -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.first_order_of_converging_grams {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) + (p : ℕ → X) (r : ℕ → ℝ) (hr : ∀ k, 0 < r k) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (hrep : ∀ k i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k i) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (r k))] fun x => v k x i) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) (r k))) + (hu : ∀ k i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (r k)) (u k i)) + {C : ℝ} (hC : 1 ≤ C) + (hvol : ∀ k, (hausdorff n X).real (ball (p k) (2*r k)) ≤ + C*(hausdorff n X).real (ball (p k) (r k))) + (hgrad : ∀ i : Fin n, ∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + ∀ᵐ x ∂(hausdorff n X).restrict (ball (p k) (3*r k)), + localGamma (hausdorff n X) hX.quadratic (u k i) (u k i) x ≤ 1+β) + (hgram : ∀ i j : Fin n, Tendsto (fun k => ((hausdorff n X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), + |localGamma (hausdorff n X) hX.quadratic (u k i) (u k j) x-(if i=j then 1 else 0)| + ∂hausdorff n X) atTop (𝓝 0)) : + ∀ β : ℝ, 0 < β → ∀ᶠ k in atTop, + FirstOrderSplittingOn (hausdorff n X) hX.quadratic (p k) (r k) β (u k) (v k) := by + let μ := hausdorff n X + intro β hβ + have hC0 : 0 < C := zero_lt_one.trans_le hC + have hg : ∀ᶠ k in atTop, ∀ i : Fin n, + ∀ᵐ x ∂μ.restrict (ball (p k) (3*r k)), + localGamma μ hX.quadratic (u k i) (u k i) x ≤ 1+β := + eventually_all.mpr (fun i => hgrad i β hβ) + have he : ∀ᶠ k in atTop, ∀ i j : Fin n, + (μ.real (ball (p k) (2*r k)))⁻¹*(∫ x in ball (p k) (2*r k), + |localGamma μ hX.quadratic (u k i) (u k j) x-(if i=j then 1 else 0)| ∂μ) ≤ β/C := by + apply eventually_all.mpr + intro i + apply eventually_all.mpr + intro j + exact ((hgram i j).eventually (eventually_lt_nhds (div_pos hβ hC0))).mono (fun _ h => h.le) + filter_upwards [hg,he] with k hgk hek + refine ⟨hrep k,hv k,hu k,?_,?_⟩ + · intro i + filter_upwards [ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith [hr k] : r k ≤ 3*r k)) (hgk i)] with x hx + exact hx.trans (by nlinarith : 1+β ≤ (1+β)^2) + · intro i j + have hzero (a : ℝ) (ha : 0 < a) : 0 < μ.real (ball (p k) (a*r k)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos ha (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hfinite : μ (ball (p k) (2*r k)) ≠ ⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have hh := average_nonneg_le_of_subset μ + (ball_subset_ball (by linarith [hr k] : r k ≤ 2*r k)) + (by simpa only [one_mul] using hzero 1 zero_lt_one) (hzero 2 (by norm_num)) + (((localGamma_memL1 μ hX.quadratic (u k i) (u k j)).integrableOn.sub + (integrableOn_const hfinite)).abs) + (fun x => abs_nonneg (localGamma μ hX.quadratic (u k i) (u k j) x-(if i=j then 1 else 0))) + (div_nonneg hβ.le hC0.le) (hvol k) (hek i j) + exact hh.trans_eq (by field_simp) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromScaledFamily.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromScaledFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..651d5e05a97fa2681f024044cf2ea490090a4aaf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderFromScaledFamily.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicContinuousRepresentative +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization + +namespace OAI + +/-! # Packaging an actual scaled harmonic family as a first-order splitting map -/ + +open Set Metric Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_splitting_of_scaled_family {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : X) {r β : ℝ} (hr : 0 < r) (hβ : 0<β) (hcurv : -1≤K*(5*r)^2) + (w : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (5*r)) (w i)) + (hnorm : ∀ i, harmonicTargetNorm hX p (5*r) (w i)≤7) + (hgrad : ∀ i, ∀ᵐ x ∂(hausdorff n X).restrict (ball p (3*r)), + r^2*localGamma (hausdorff n X) hX.quadratic (w i) (w i) x≤1+β) + (hgram : ∀ i j, ((hausdorff n X).real (ball p (2*r)))⁻¹* + ∫ x in ball p (2*r), + |r^2*localGamma (hausdorff n X) hX.quadratic (w i) (w j) x-(if i=j then 1 else 0)| + ∂hausdorff n X≤β) : + ∃ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (v : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic p (2*r) β u v := by + classical + let μ := hausdorff n X + choose c hc hrep using fun i => hX.harmonic_continuous_representative hn p hr hcurv (w i) (hw i) (hnorm i) + let u := fun i => r • w i + let v : X → Euclidean n := fun x => WithLp.toLp 2 (fun i => r*c i x) + have hGamma (i j : Fin n) : localGamma μ hX.quadratic (u i) (u j) =ᵐ[μ] + fun x => r^2*localGamma μ hX.quadratic (w i) (w j) x := by + filter_upwards [localGamma_smul_left μ hX.quadratic r (w i) (u j), + localGamma_smul_right μ hX.quadratic r (w i) (w j)] with x hl hr' + change localGamma μ hX.quadratic (r • w i) (u j) x=_ + rw [hl,hr'] + ring + refine ⟨u,v,?_,?_,?_,?_,?_⟩ + · intro i + have hu : SobolevSpace.toLp μ hX.quadratic (u i) =ᵐ[μ] + fun x => r*SobolevSpace.toLp μ hX.quadratic (w i) x := by + dsimp only [u] + rw [map_smul] + exact Lp.coeFn_smul _ _ + filter_upwards [ae_restrict_of_ae hu,hrep i] with x hx hi + change SobolevSpace.toLp μ hX.quadratic (u i) x=r*c i x + rw [hx,hi] + · exact ((PiLp.continuous_toLp 2 (fun _ : Fin n => ℝ)).comp + (continuous_pi (fun i => continuous_const.mul (hc i)))).continuousOn + · intro i + exact ((hw i).mono μ hX.quadratic + (ball_subset_ball (by linarith : 2*r≤5*r))).smul μ hX.quadratic r + · intro i + filter_upwards [ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : 2*r≤3*r)) (hgrad i),ae_restrict_of_ae (hGamma i i)] with x hx he + rw [he] + nlinarith + · intro i j + convert hgram i j using 1 + congr 1 + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (hGamma i j)] with x hx + rw [hx] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderGramDefectLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderGramDefectLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..dff7edcfc3b8fc3f4c4593bcaf5224fe4350732c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderGramDefectLimit.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderVelocityErrorLimit + +namespace OAI + +/-! # Vanishing normalized Gram error on the physical working balls -/ + +open Set Filter MeasureTheory Metric +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.first_order_gram_defect_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 ((hausdorff n X).real (ball (p k) (4*r k)))⁻¹* + ∫ z in ball (p k) (4*r k), gramDefect (hausdorff n X) hX.quadratic (u k) z + ∂hausdorff n X) atTop (𝓝 0) := by + let μ := hausdorff n X + let Q := hX.quadratic + obtain ⟨D,_hD,hvol⟩ := hX.rescaled_ball_volume_factor hn (by norm_num : (0:ℝ)≤1) + (by norm_num : (0:ℝ)<1/4) (by norm_num : (1/4:ℝ)≤1) + have hpos (k : ℕ) (a : ℝ) (ha : 0 mul_nonneg (inv_nonneg.mpr (hpos k 4 (by norm_num)).le) + (integral_nonneg (gramDefect_nonneg μ Q (u k)))) + (g := fun k => ((n:ℝ)^2*D)*ε k) + · intro k + have hv : μ.real (ball (p k) (16*r k))≤D*μ.real (ball (p k) (4*r k)) := by + have hh := hvol (p k) (16*r k) (mul_pos (by norm_num) (hr k)) (hcurv k) (p k) + (by simpa only [dist_self] using mul_nonneg (by norm_num : (0:ℝ)≤16) (hr k).le) + simpa only [show (1/4:ℝ)*(16*r k)=4*r k by ring] using hh + have hi := gramDefect_integrableOn μ Q (u k) (hX.finiteOnBounded (ball (p k) (16*r k)) isBounded_ball).ne + have hb := (setIntegral_mono_set hi (Eventually.of_forall (gramDefect_nonneg μ Q (u k))) + (Eventually.of_forall (ball_subset_ball (by linarith [hr k] : 4*r k≤16*r k)))).trans + (gramDefect_integral_bound μ Q (hpos k 16 (by norm_num)) + (hX.finiteOnBounded _ isBounded_ball).ne (hsplit k)) + rw [← div_eq_inv_mul,div_le_iff₀ (hpos k 4 (by norm_num))] + have hh := mul_le_mul_of_nonneg_left hv (mul_nonneg (sq_nonneg (n:ℝ)) (hε k)) + exact hb.trans (by convert hh using 1; ring) + · simpa only [mul_zero] using hε0.const_mul ((n:ℝ)^2*D) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderInteriorRestriction.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderInteriorRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..c5e520cc2df69cda6452ee12c5bfdde603755395 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderInteriorRestriction.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Restriction of the original splitting maps to moving interior centers -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.first_order_interior_restriction {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {c : ℝ} (hc : 0 g i y)) (WithLp.toLp 2 (fun i => g i z))=dist y z := by + have hc (k : ℕ) : -1≤K*(r k)^2 := by + have hh := hcurv k + have he : K*(80*r k)^2=6400*(K*(r k)^2) := by ring + rw [he] at hh + nlinarith + obtain ⟨a,ha,Y,dY,hproper,q,δ,V,g,hδ,hδ0,hV,hg,hvalues⟩ := + hX.centered_first_order_metric_compactness hn p r ε hr hc hε hε1 hε0 U v hsplit + let := dY + let := hproper + refine ⟨a,ha,Y,dY,hproper,q,δ,V,g,hδ,hδ0,hV,hg,hvalues,?_⟩ + exact hX.first_order_metric_limit_isometry hn hK (p∘a) (r∘a) (ε∘a) δ V q + (fun k => hr (a k)) (hr0.comp ha.tendsto_atTop) (fun k => hcurv (a k)) + (fun k => hε (a k)) (fun k => hε1 (a k)) (hε0.comp ha.tendsto_atTop) + hδ0 hV (U∘a) (v∘a) (fun k => hsplit (a k)) g (fun i => (hg i).1.continuous) hvalues + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderLimitNoSupport.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderLimitNoSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac9e0400b9e87e73e5ea5683adc7cce4ace7978a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderLimitNoSupport.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderMovingNoSupport +import OAI.Geometry.RCD.Metric.LimitSupportTransfer + +namespace OAI + +/-! # No supporting boundary for the actual coordinate limit -/ + +open Set Filter Metric MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [MetricSpace Y] + +theorem NoncollapsedRCD.first_order_limit_no_support {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε δ : ℕ → ℝ) (V : ℕ → X → Y) (q : Y) + (hr : ∀ k, 0 ae_restrict_of_ae_restrict_of_subset hsub (h.representative i), + h.continuous.mono hsub, fun i => (h.harmonic i).mono μ hQ hsub, ?_, ?_⟩ + · intro i + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub (h.gradient i)] with x hx + have hsq : (1 + ε) ^ 2 ≤ (1 + C * ε) ^ 2 := by nlinarith + exact hx.trans hsq + · intro i j + have hf : IntegrableOn (fun x => |localGamma μ hQ (u i) (u j) x - + (if i = j then 1 else 0)|) (ball p R) μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const htfin)).abs + exact average_nonneg_le_of_subset μ hsub (ENNReal.toReal_pos hszero hsfin) + (ENNReal.toReal_pos htzero htfin) hf (fun _ => abs_nonneg _) hε hvol (h.gram i j) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricBounds.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3df98278a6999d95d5bd67d82621220f0a71037 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricBounds.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.CenteredFirstOrderFrame + +namespace OAI + +/-! # Bounds for the actual centered scalar coordinate functions -/ + +open Set Metric MeasureTheory +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.first_order_metric_bounds {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} {r ε : ℝ} + (hr : 0 v x i) (ball p (8*(10*r))) := by + have hh : ContinuousOn (fun x => v x i) (ball p (80*r)) := + (EuclideanSpace.proj i).continuous.comp_continuousOn hsplit.continuous + simpa only [show (8:ℝ)*(10*r)=80*r by ring] using hh + have hrep : SobolevSpace.toLp (hausdorff n X) hX.quadratic (u i) =ᵐ[ + (hausdorff n X).restrict (ball p (8*(10*r)))] fun x => v x i := by + simpa only [show (8:ℝ)*(10*r)=80*r by ring] using hsplit.representative i + have hg' : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (8*(10*r))), + localGamma (hausdorff n X) hX.quadratic (u i) (u i) x≤((2:ℝ≥0):ℝ)^2 := by + simpa only [show (8:ℝ)*(10*r)=80*r by ring] using hg + have hl := hX.continuous_local_gradient_lipschitz hn (u i) (fun x => v x i) p + (show 0<10*r by positivity) 2 hv hrep hg' + have hin (x : X) (hx : dist x p≤5*r) : x∈ball p (10*r) := by + change dist x p<10*r + linarith + have hpair (x y : X) (hx : dist x p≤5*r) (hy : dist y p≤5*r) : + |v x i-v y i|≤2*dist x y := by + simpa only [Real.dist_eq,NNReal.coe_ofNat] using hl.dist_le_mul x (hin x hx) y (hin y hy) + constructor + · intro x hx + rw [abs_div,abs_of_pos hr] + apply (div_le_iff₀ hr).mpr + have hp : dist p p≤5*r := by simp; positivity + nlinarith [hpair x p hx hp] + · intro x y hx hy + rw [← sub_div,sub_sub_sub_cancel_right,abs_div,abs_of_pos hr] + change |v x i-v y i|/r≤2*(dist x y/r) + simpa only [mul_div_assoc] using div_le_div_of_nonneg_right (hpair x y hx hy) hr.le + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..395d8ba4063f02210c8a9b452c54e4e49568b12f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricCompactness.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderMetricLimit +import OAI.Geometry.RCD.Metric.MovingPointedData + +namespace OAI + +/-! # A metric limit and the actual first-order coordinate limits together + +Centers and physical radii may both vary. The metric space and its +approximations are constructed from CD finite nets; the finite coordinate +family is transferred through those same maps. No curvature-dimension or +harmonicity assertion about the limit is assumed here. +-/ + +open Set Metric Filter MeasureTheory TopologicalSpace +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +universe u +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.first_order_metric_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) + (hr : ∀ k, 0 max (1/((k:ℝ)+1)) (ε (α k)) + have hδ (k : ℕ) : 0<δ k ∧ δ k≤1 := by + constructor + · exact (show 0<1/((k:ℝ)+1) by positivity).trans_le (le_max_left _ _) + · apply max_le + · apply (div_le_one (by positivity)).mpr + linarith [Nat.cast_nonneg (α := ℝ) k] + · exact hε1 (α k) + have hδ0 : Tendsto δ atTop (𝓝 0) := by + simpa only [δ,Function.comp_def,max_self] using tendsto_one_div_add_atTop_nhds_zero_nat.max + (hε0.comp hα.tendsto_atTop) + have hVδ (k : ℕ) : IsPointedApproximation (p (α k)) q (r (α k)) 5 (δ k) (V k) := + (hV k).mono_error (le_max_left _ _) + have hsδ (k : ℕ) : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p (α k)) (80*r (α k)) (δ k) (u (α k)) (v (α k)) := + (hsplit (α k)).mono_error _ _ (hε (α k)) (le_max_right _ _) + obtain ⟨c,hc,g,hg,hvalues⟩ := hX.first_order_metric_value_limit hn q + (p∘α) (r∘α) δ V (fun k => hr (α k)) (fun k => (hδ k).1.le) + (fun k => (hδ k).2) hδ0 hVδ (u∘α) (v∘α) hsδ + exact ⟨α∘c,hα.comp hc,Y,dY,hproper,q,δ∘c,V∘c,g, + fun k => hδ (c k),hδ0.comp hc.tendsto_atTop,fun k => hVδ (c k),hg,hvalues⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..84238f9c1d1bf4aa6513eb19d7e65098eeda7644 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimit.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderMetricBounds +import OAI.Geometry.RCD.Metric.PointedMetricFunctionCompactness +import OAI.Geometry.RCD.Harmonic.FiniteHarmonicLimits + +namespace OAI + +/-! # Common value limits of the prescribed first-order coordinate family -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MetricSpace Y] [ProperSpace Y] + [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.first_order_metric_value_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) (q : Y) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Y) + (hr : ∀ k, 0 + LipschitzWith 2 g ∧ ∀ η, 0<η → ∀ᶠ k in atTop, + ∀ x, dist x (p (a k))≤5*r (a k) → + |(v (a k) x i-v (a k) (p (a k)) i)/r (a k)-g (V (a k) x)|<η + have hsub : ∀ i a g b, P i a g → StrictMono b → P i (a∘b) g := by + rintro i a g b ⟨hL,hg⟩ hb + exact ⟨hL,fun η hη => hb.tendsto_atTop.eventually (hg η hη)⟩ + have hex : ∀ a : ℕ → ℕ, StrictMono a → ∀ i, ∃ b : ℕ → ℕ, StrictMono b ∧ ∃ g, P i (a∘b) g := by + intro a ha i + have hb (k : ℕ) := hX.first_order_metric_bounds hn (hr (a k)) (hε (a k)) (hε1 (a k)) (hsplit (a k)) i + obtain ⟨g,b,hbmono,hg,hconv⟩ := pointed_metric_function_compactness (by norm_num : (0:ℝ)≤5) + (p∘a) (r∘a) (ε∘a) (V∘a) (fun k => hr (a k)) (fun k => hε (a k)) + (fun k => hε1 (a k)) (hε0.comp ha.tendsto_atTop) (fun k => hV (a k)) + (fun k x => (v (a k) x i-v (a k) (p (a k)) i)/r (a k)) 2 + (fun k => (hb k).1) (fun k => (hb k).2) + exact ⟨b,hbmono,g,hg,hconv⟩ + obtain ⟨a,ha,g,hg⟩ := finite_subsequence_value_choice P hsub hex + exact ⟨a,ha,g,fun i => (hg i).1,fun i => (hg i).2⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimitIsometry.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimitIsometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..f85d34e2b39b208c94f93dc19c681a160b167ce7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMetricLimitIsometry.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Metric.FiniteMetricValues +import OAI.Geometry.RCD.Transport.FirstOrderUniformDistortion + +namespace OAI + +/-! # The original coordinate limit is locally isometric on the metric limit -/ + +open Set Filter MeasureTheory Metric +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [MetricSpace Y] + +theorem NoncollapsedRCD.first_order_metric_limit_isometry {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε δ : ℕ → ℝ) (V : ℕ → X → Y) (q : Y) + (hr : ∀ k, 0 g i y)) (WithLp.toLp 2 (fun i => g i z))=dist y z := by + let w k x := (r k)⁻¹ • (v k x-v k (p k)) + let F y := WithLp.toLp 2 (fun i => g i y) + have hF : Continuous F := (PiLp.continuous_toLp 2 (fun _ : Fin n => ℝ)).comp (continuous_pi hg) + have hw (k : ℕ) (x y : X) : dist (w k x) (w k y)=dist (v k x) (v k y)/r k := by + dsimp [w] + rw [dist_smul₀,Real.norm_of_nonneg (inv_pos.mpr (hr k)).le,dist_sub_right,div_eq_inv_mul] + apply metric_limit_distance_identification p r δ V w F hr hδ0 hV + (by norm_num : (1/16:ℝ)<5) hF + · have hvw := finite_metric_value_limit p r V w g (fun i η hη => by + simpa only [w,PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul,div_eq_inv_mul] using hvalues i η hη) + intro η hη + filter_upwards [hvw η hη] with k hk + intro x hx + exact hk x (hx.trans (by nlinarith [hr k] : (1/16:ℝ)*r k≤5*r k)) + · intro η hη + have hs (k : ℕ) : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (16*(5*r k)) (ε k) (u k) (v k) := by + simpa only [show (16:ℝ)*(5*r k)=80*r k by ring] using hsplit k + have hc (k : ℕ) : -1≤K*(16*(5*r k))^2 := by + simpa only [show (16:ℝ)*(5*r k)=80*r k by ring] using hcurv k + have hr' : Tendsto (fun k => 5*r k) atTop (𝓝 0) := by + simpa only [mul_zero] using hr0.const_mul 5 + have hd := hX.first_order_uniform_distortion hn hK p (fun k => 5*r k) ε + (fun k => mul_pos (by norm_num) (hr k)) hr' hc hε hε1 hε0 u v hs + (show 0<η/5 by positivity) + filter_upwards [hd] with k hk + intro x y hx hy + have hx' : dist x (p k)≤5*r k/48 := hx.trans (by nlinarith [hr k]) + have hy' : dist y (p k)≤5*r k/48 := hy.trans (by nlinarith [hr k]) + have hh := hk x y hx' hy' + rw [hw] + have he : dist (v k x) (v k y)/r k-dist x y/r k= + 5*(dist (v k x) (v k y)/(5*r k)-dist x y/(5*r k)) := by field_simp + rw [he,abs_mul,abs_of_pos (by norm_num : (0:ℝ)<5)] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMovingNoSupport.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMovingNoSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..1021c947cdd1c6caf707eed03077da00f31af652 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderMovingNoSupport.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderInteriorRestriction +import OAI.Geometry.RCD.Harmonic.FirstOrderNoSupport + +namespace OAI + +/-! # Excluding vanishing supporting errors at moving interior centers -/ + +open Set Filter Metric MeasureTheory +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_moving_no_support {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p q : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 mul_pos (by norm_num) (hr k) + have hcurv5 : ∀ k, -1≤K*(16*(5*r k))^2 := by + intro k + simpa only [show 16*(5*r k)=80*r k by ring] using hcurv k + have hm := hX.first_order_uniform_distortion hn hK p (fun k => 5*r k) ε hr5 + (by simpa using hr0.const_mul 5) hcurv5 hε hε1 hε0 u v + (by intro k; simpa only [show 16*(5*r k)=80*r k by ring] using hs k) + (show 0 D*ε k) atTop (𝓝 0) := by + simpa using hε0.const_mul D + have hlower : ∀ᶠ k in atTop, 1≤C*(D*ε k) := by + filter_upwards [hqp,hm,hsupport (c/4096) (by positivity), + hDe.eventually (gt_mem_nhds (by norm_num : (0:ℝ)<1))] with k hq hmetric hsup hsmall + have hq1 : dist (q k) (p k)≤r k := by linarith [hr k] + have hcr : 0 C*(D*ε k)) atTop (𝓝 0) := by + simpa using hDe.const_mul C + have hh : (1:ℝ)≤0 := le_of_tendsto_of_tendsto tendsto_const_nhds hzero hlower + norm_num at hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderNoSupport.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderNoSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..73f10c3ba091174cf8def6f6dee66cbdabf3ca91 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderNoSupport.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderSupportThreshold +import OAI.Geometry.RCD.Transport.FirstOrderUniformDistortion + +namespace OAI + +/-! # No limiting supporting halfspace for the original coordinate images -/ + +open Set Filter MeasureTheory Metric +open scoped Topology InnerProductSpace +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_no_asymptotic_support {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 C*ε k) atTop (𝓝 0) := by + simpa only [mul_zero] using hε0.const_mul C + have hh : (1:ℝ)≤0 := le_of_tendsto_of_tendsto tendsto_const_nhds hlimit hlower + norm_num at hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderPathVelocity.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderPathVelocity.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d5736925b322e5325f88f7fa6c61ce3c2715357 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderPathVelocity.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.LocalFramePathVelocity +import OAI.Geometry.RCD.Coordinates.FirstOrderRegularFamily + +namespace OAI + +/-! # Actual first-order coordinates give scalar path velocities -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.first_order_path_velocity {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} {r ε : ℝ} + (hr : 0 γ 0)) (π.map (fun γ => γ 1)) + (π.map (fun γ => (γ 0,γ 1)))) + {C : ℝ≥0∞} (hC : C≠∞) (hcomp : ∀ t : Time, π.map (fun γ => γ t)≤C • hausdorff n X) + (hs₀ : ∀ᵐ x ∂π.map (fun γ => γ 0), dist x p≤r/12) + (hs₁ : ∀ᵐ x ∂π.map (fun γ => γ 1), dist x p≤r/12) : + ∀ᵐ γ ∂π, + AbsolutelyContinuousOnInterval (fun t => φ (geodesicExtension γ t)) 0 1 ∧ + (∀ i, AbsolutelyContinuousOnInterval (fun t => v (geodesicExtension γ t) i) 0 1) ∧ + ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → + (deriv (fun s => φ (geodesicExtension γ s)) t- + ∑ i, localGamma (hausdorff n X) hX.quadratic (u i) g (geodesicExtension γ t)* + deriv (fun s => v (geodesicExtension γ s) i) t)^2≤ + (dist (γ 0) (γ 1))^2* + frameVelocityError (hausdorff n X) hX.quadratic u g (geodesicExtension γ t) := by + let μ := hausdorff n X + let Q := hX.quadratic + obtain ⟨U,d,W,_L,_A,_hd,_hL,_hWc,hW,_hA,hu,_hd0,hv,_hgrad⟩ := + hX.first_order_regular_family hn hr hε hε1 u v hsplit + let F (x : X) : Euclidean n := WithLp.toLp 2 (fun i => W i x) + have hF : Continuous F := (PiLp.continuous_toLp 2 (fun _ : Fin n => ℝ)).comp + (continuous_pi (fun i => (W i).continuous)) + have hFv : EqOn F v (ball p (6*r)) := by + intro x hx + apply PiLp.ext + intro i + exact hv i hx + have hbounded := optimal_geodesic_plan_bounded (π.map (fun γ => γ 0)) + (π.map (fun γ => γ 1)) π hgeo hopt p (show 0≤r/12 by linarith) hs₀ hs₁ + have hstay : ∀ᵐ γ ∂π, ∀ t : Time, γ t∈ball p (6*r) := by + filter_upwards [hbounded] with γ hγ t + exact (hγ.2 t).trans_lt (by linarith) + have hD : MemLp (fun γ : C(Time,X) => dist (γ 0) (γ 1)) 2 π := by + apply MemLp.of_bound ((continuous_eval_const 0).dist (continuous_eval_const 1)).aestronglyMeasurable r + filter_upwards [hbounded] with γ hγ + rw [Real.norm_eq_abs,abs_of_nonneg dist_nonneg] + have hh := dist_triangle (γ 0) p (γ 1) + rw [dist_comm p (γ 1)] at hh + linarith [hγ.2 0,hγ.2 1] + exact local_frame_path_velocity μ Q u (fun i => (U i).val) g v F φ hF hφ hW hg + measurableSet_ball hu hFv π hgeo hC hcomp hD hstay + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSmallScaleApproximation.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSmallScaleApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9eb63be0f50644f507def9529769ac6636e27d58 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSmallScaleApproximation.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderSubsequenceApproximation + +namespace OAI + +/-! # Uniform small-scale Euclidean approximation by the original coordinates -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_small_scale_approximation {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + {τ : ℝ} (hτ : 0<τ) : + ∃ s₀ ε : ℝ, 0 s⁻¹ • (v x-v p)) := by + classical + by_contra hnot + push Not at hnot + let e : ℕ → ℝ := fun k => 1/((k:ℝ)+1) + have he (k : ℕ) : 0 hnot (e k) (e k) (he k) (he k)) + let r : ℕ → ℝ := fun k => 1024*s k + have hr (k : ℕ) : 0 (hr k).le) (fun k => ?_) (by + simpa only [mul_zero] using he0.const_mul 1024) + exact mul_le_mul_of_nonneg_left (hs0 k) (by norm_num) + have hc (k : ℕ) : -1≤K*(80*r k)^2 := by + simpa only [show 80*r k=81920*s k by dsimp [r]; ring] using hcurv k + have hsp (k : ℕ) : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (80*r k) (e k) (u k) (v k) := by + simpa only [show 80*r k=81920*s k by dsimp [r]; ring] using hsplit k + obtain ⟨a,_ha,ha⟩ := hX.first_order_subsequence_approximation hn hK p r e hr hr0 hc + (fun k => (he k).le) he1 he0 u v hsp hτ + obtain ⟨k,hk⟩ := ha.exists + apply hbad (a k) + simpa only [show r (a k)/1024=s (a k) by dsimp [r]; ring] using hk + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSubsequenceApproximation.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSubsequenceApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..aeb38946dcfd40994cdc9e6ee09a6478866770d9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSubsequenceApproximation.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderEuclideanLimit +import OAI.Geometry.RCD.Metric.LocalIsometryDensityTransfer + +namespace OAI + +/-! # Actual pointed Euclidean approximations along first-order sequences -/ + +open Set Filter Metric MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +universe u +variable {X : Type u} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_subsequence_approximation {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε : ℕ → ℝ) + (hr : ∀ k, 0 (r (a k)/1024)⁻¹ • (v (a k) x-v (a k) (p (a k)))) := by + obtain ⟨a,ha,Y,dY,hproper,q,δ,V,F,_hδ,hδ0,hV,_hF,hFq,hvalues,hiso,himage⟩ := + hX.first_order_euclidean_limit hn hK p r ε hr hr0 hcurv hε hε1 hε0 U v hsplit + let := dY + let := hproper + have hcurv5 (k : ℕ) : -1≤K*(16*(5*r (a k)))^2 := by + simpa only [show 16*(5*r (a k))=80*r (a k) by ring] using hcurv (a k) + have hsplit5 (k : ℕ) : FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p (a k)) (16*(5*r (a k))) (ε (a k)) (U (a k)) (v (a k)) := by + simpa only [show 16*(5*r (a k))=80*r (a k) by ring] using hsplit (a k) + have hm := hX.first_order_uniform_distortion hn hK (p∘a) (fun k => 5*r (a k)) (ε∘a) + (fun k => mul_pos (by norm_num) (hr (a k))) + (by simpa only [mul_zero,Function.comp_apply] using (hr0.comp ha.tendsto_atTop).const_mul 5) + hcurv5 (fun k => hε (a k)) (fun k => hε1 (a k)) (hε0.comp ha.tendsto_atTop) + (U∘a) (v∘a) hsplit5 (show 0<τ/5120 by positivity) + refine ⟨a,ha,?_⟩ + filter_upwards [hm,hvalues (τ/8192) (by positivity), + hδ0.eventually (gt_mem_nhds (by norm_num : (0:ℝ)<1/8192)), + hδ0.eventually (gt_mem_nhds (show 0<τ/8192 by positivity))] with k hk hv hd hdt + have hrk := hr (a k) + let f : X → Euclidean n := fun x => (r (a k)/1024)⁻¹ • (v (a k) x-v (a k) (p (a k))) + have hf (x : X) : f x=(1024:ℝ) • ((r (a k))⁻¹ • (v (a k) x-v (a k) (p (a k)))) := by + dsimp [f] + rw [smul_smul] + congr 1 + field_simp + refine ⟨?_,?_,?_⟩ + · simpa [f] using hτ.le + · intro x y hx hy + have hx' : dist x (p (a k))≤5*r (a k)/48 := by linarith + have hy' : dist y (p (a k))≤5*r (a k)/48 := by linarith + have hh := hk x y hx' hy' + simp only [Function.comp_apply] at hh + have he : dist (f x) (f y)=dist (v (a k) x) (v (a k) y)/(r (a k)/1024) := by + dsimp [f] + rw [dist_smul₀,Real.norm_of_nonneg (by positivity),dist_sub_right,div_eq_inv_mul] + ring + change |dist (f x) (f y)-dist x y/(r (a k)/1024)|≤τ + rw [he] + have he' : dist (v (a k) x) (v (a k) y)/(r (a k)/1024)-dist x y/(r (a k)/1024)= + 5120*(dist (v (a k) x) (v (a k) y)/(5*r (a k))-dist x y/(5*r (a k))) := by + field_simp + ring + rw [he',abs_mul,abs_of_pos (by norm_num : (0:ℝ)<5120)] + linarith + · intro y hy + obtain ⟨x,hx,hxy⟩ := local_isometry_density_transfer hrk hτ hd.le hdt.le le_rfl + (V k) (fun x => (r (a k))⁻¹ • (v (a k) x-v (a k) (p (a k)))) F + (hV k) hFq hiso himage hv y hy + refine ⟨x,hx,?_⟩ + change dist (f x) y≤τ + rw [hf] + exact hxy + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSupportThreshold.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSupportThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce1918111fcf383294a47babc6b3b37e82c8ec1f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderSupportThreshold.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderBarrierMass +import OAI.Geometry.RCD.Harmonic.FirstOrderGramDefectLimit + +namespace OAI + +/-! # A supporting halfspace forces a definite first-order Gram error -/ + +open Set Filter MeasureTheory Metric +open scoped InnerProductSpace NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_support_threshold {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) : + ∃ C : ℝ, 0 ring + dsimp [C] + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderTransverseBarrier.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderTransverseBarrier.lean new file mode 100644 index 0000000000000000000000000000000000000000..85b4a86ec8dfb34cd5602b3396f239b96155e6a2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderTransverseBarrier.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Coordinates.BoundedFrameBarrier +import OAI.Geometry.RCD.Harmonic.CenteredBoundedGram +import OAI.Geometry.RCD.Coordinates.SplittingCoordinateLipschitz +import OAI.Geometry.RCD.Sobolev.GoodCutoffFromResolvent + +namespace OAI + +/-! # The transverse barrier estimate for the original first-order coordinates -/ + +open Set Filter MeasureTheory Metric +open scoped InnerProductSpace NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_transverse_barrier {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {p : X} {r ε δ c : ℝ} + (hr : 0 + if -δ<⟪v x-v p,a⟫_ℝ then max (c-(‖v x-v p‖^2-⟪v x-v p,a⟫_ℝ^2)) 0 else 0) + (ball p (r/48)) (hausdorff n X) ∧ + (∫ x in ball p (r/48), + (if -δ<⟪v x-v p,a⟫_ℝ then max (c-(‖v x-v p‖^2-⟪v x-v p,a⟫_ℝ^2)) 0 else 0) + ∂hausdorff n X) ≤ + (c+(2*(n:ℝ)*r+|δ|)*2*((n:ℝ)+1)*(2*(n:ℝ)*r))* + ∫ x in ball p (r/48), gramDefect (hausdorff n X) hX.quadratic u x ∂hausdorff n X := by + let μ := hausdorff n X + let Q := hX.quadratic + let Ω := ball p (r/48) + let V x := v x-v p + let M := 2*(n:ℝ)*r + have hM : 0≤M := by dsimp [M]; positivity + let A : ℝ≥0 := ⟨M,hM⟩ + have hsub : Ω⊆ball p (16*r) := ball_subset_ball (by linarith) + have hV (x : X) (hx : x∈Ω) : ‖V x‖≤M := by + have hs' : FirstOrderSplittingOn μ Q p (8*(2*r)) ε u v := by + simpa only [show (8:ℝ)*(2*r)=16*r by ring] using hs + have hL := hX.splitting_coordinate_lipschitz hn (by positivity : 0<2*r) hε hs' + have hh := hL.dist_le_mul x (by change dist x p<2*r; exact lt_trans hx (by linarith)) + p (by change dist p p<2*r; simp; positivity) + have hC : (n:ℝ)*(1+ε)≤2*(n:ℝ) := by nlinarith [Nat.cast_nonneg (α:=ℝ) n] + change ‖v x-v p‖≤2*(n:ℝ)*r + rw [← dist_eq_norm] + apply (hh.trans (mul_le_mul_of_nonneg_right hC dist_nonneg)).trans + exact mul_le_mul_of_nonneg_left (by have hd : dist x p (1:ℝ) := by + filter_upwards [ae_restrict_of_ae η.representative,ae_restrict_mem measurableSet_ball] with x hx hxm + exact hx.trans (η.one x (by have hd : dist x p ae_restrict_of_ae_restrict_of_subset hsub (hs.representative i)) + (fun i => (hs.harmonic i).mono μ Q hsub) η.sobolev hη A (by + intro x hx i + have hh : |(V x) i|≤‖V x‖ := by + simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le (V x) i + exact hh.trans (hV x hx)) + obtain ⟨Cχ,_hCχ,⟨χ⟩⟩ := hX.goodCutoff_exists hn p (by positivity : 0 ae_all_iff.mpr (hUg i))] with x hx + dsimp only [gramDefect] + simp_rw [hx] + have hb := bounded_frame_transverse_barrier μ Q U (fun _ => A) hUb isOpen_ball + (hX.finiteOnBounded Ω isBounded_ball).ne V hUr hUh a ha hM hc hV δ + η.sobolev hηb hη χ.sobolev χ.lipschitz (χ.hasCompactSupport μ Q) hχb + (fun x => (χ.bounds x).1) hχs χ.representative (fun x hx hax hsx => χ.one x (hsmall x hx hax hsx)) + refine ⟨hb.1,?_⟩ + have hi := hb.2 + rw [integral_congr_ae hg] at hi + exact hi + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderUniformAffineMean.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderUniformAffineMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..6dac82f04a6b3f36ab2d9bcb7d1e19272dd8529a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderUniformAffineMean.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderAbsoluteAffineMean +import OAI.Geometry.RCD.Harmonic.FirstOrderCompactRepresentative +import OAI.Geometry.RCD.Harmonic.PathAffineResidual + +namespace OAI + +/-! # Mean uniform path defects for the original splitting coordinates -/ + +open Set Filter MeasureTheory Metric TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.first_order_uniform_affine_mean {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) (hK : K ≤ 0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 < r k) (hr0 : Tendsto r atTop (𝓝 0)) + (hcurv : ∀ k, -1 ≤ K*(16*r k)^2) + (hε : ∀ k, 0 ≤ ε k) (hε1 : ∀ k, ε k ≤ 1) (hε0 : Tendsto ε atTop (𝓝 0)) + (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (hsplit : ∀ k, FirstOrderSplittingOn (hausdorff n X) hX.quadratic + (p k) (16*r k) (ε k) (u k) (v k)) + (π : ℕ → Measure C(Time,X)) [∀ k, IsProbabilityMeasure (π k)] + (hgeo : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) + (hopt : ∀ k, IsOptimalCoupling ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) ((π k).map (fun γ => (γ 0,γ 1)))) + {B : ℝ} (hB : 0 ≤ B) + (hcomp : ∀ k (t : Time), (π k).map (fun γ => γ t) ≤ + ENNReal.ofReal (B/(hausdorff n X).real (ball (p k) (4*r k))) • hausdorff n X) + (hs₀ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 0), dist x (p k) ≤ r k/12) + (hs₁ : ∀ k, ∀ᵐ x ∂(π k).map (fun γ => γ 1), dist x (p k) ≤ r k/12) + (i : Fin n) : + ∃ F : ℕ → C(Time,X) → C(Time,ℝ), + (∀ k, Continuous (F k)) ∧ + (∀ k, ∀ᵐ γ ∂π k, ∀ t : Time, F k γ t= + (v k (γ t) i-((1-(t:ℝ))*v k (γ 0) i+(t:ℝ)*v k (γ 1) i))/r k) ∧ + (∀ k, Integrable (fun γ => ‖F k γ‖) (π k)) ∧ + Tendsto (fun k => ∫ γ, ‖F k γ‖ ∂π k) atTop (𝓝 0) := by + let := hX.separable + choose V L A hV hVc hA hEq hloc using fun k => + hX.first_order_compact_representative hn (hr k) (hε k) (hε1 k) (u k) (v k) (hsplit k) i + let F k γ := pathAffineResidual (V k) (r k) γ + have hF (k : ℕ) : Continuous (F k) := pathAffineResidual_continuous (V k) (r k) + have hbound (k : ℕ) := optimal_geodesic_plan_bounded ((π k).map (fun γ => γ 0)) + ((π k).map (fun γ => γ 1)) (π k) (hgeo k) (hopt k) (p k) + (by linarith [hr k] : 0 ≤ r k/12) (hs₀ k) (hs₁ k) + have hnorm (k : ℕ) (γ : C(Time,X)) : ‖F k γ‖ ≤ 3*(A k:ℝ)/r k := + pathAffineResidual_norm_le (V k) (hr k) (A k).coe_nonneg (hA k) γ + have hI (k : ℕ) : Integrable (fun γ => ‖F k γ‖) (π k) := + Integrable.of_bound (hF k).norm.aestronglyMeasurable (3*(A k:ℝ)/r k) + (Eventually.of_forall fun γ => by simpa only [norm_norm] using hnorm k γ) + have hEval (k : ℕ) (z : Time) : Integrable (fun γ => F k γ z) (π k) := + Integrable.of_bound ((continuous_eval_const z).comp (hF k)).aestronglyMeasurable + (3*(A k:ℝ)/r k) (Eventually.of_forall fun γ => + ((F k γ).norm_coe_le_norm z).trans (hnorm k γ)) + have hLip (k : ℕ) : ∀ᵐ γ ∂π k, LipschitzWith 4 (F k γ) := by + filter_upwards [hbound k] with γ hγ + have hs : ∀ z : Time, γ z∈ball (p k) (r k/2) := fun z => + (hγ.2 z).trans_lt (by linarith [hr k]) + have hlen : dist (γ 0) (γ 1) ≤ (1:ℝ≥0)*r k := by + have ht := dist_triangle (γ 0) (p k) (γ 1) + rw [dist_comm (p k) (γ 1)] at ht + norm_num only [NNReal.coe_one,one_mul] + linarith [hγ.2 0,hγ.2 1,hr k] + simpa only [mul_one,show (2:ℝ≥0)*2=4 by norm_num] using + pathAffineResidual_lipschitz (V k) (hr k) γ hγ.1 hs (hloc k) hlen + have heq (k : ℕ) : ∀ᵐ γ ∂π k, ∀ z : Time, F k γ z= + (v k (γ z) i-((1-(z:ℝ))*v k (γ 0) i+(z:ℝ)*v k (γ 1) i))/r k := by + filter_upwards [hbound k] with γ hγ z + have hs (t : Time) : V k (γ t)=v k (γ t) i := + hEq k ((hγ.2 t).trans_lt (by linarith [hr k])) + simp only [F,pathAffineResidual_apply,hs] + have hpt (z : Time) : Tendsto (fun k => ∫ γ, |F k γ z| ∂π k) atTop (𝓝 0) := by + have hlim := hX.first_order_absolute_affine_mean hn hK p r ε hr hr0 hcurv + hε hε1 hε0 u v hsplit π hgeo hopt hB hcomp hs₀ hs₁ i z + have he (k : ℕ) : (∫ γ, |F k γ z| ∂π k)= + (∫ γ, |v k (γ z) i-((1-(z:ℝ))*v k (γ 0) i+(z:ℝ)*v k (γ 1) i)| ∂π k)/r k := by + rw [← integral_div] + apply integral_congr_ae + filter_upwards [heq k] with γ hγ + rw [hγ z,abs_div,abs_of_pos (hr k)] + simpa only [he] using hlim + exact ⟨F,hF,heq,hI,time_uniform_mean_limit π F 4 hI hEval hLip hpt⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FirstOrderVelocityErrorLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderVelocityErrorLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..d221cdb4090bd7f37c60a79d65daa5f8ad2fc5fa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FirstOrderVelocityErrorLimit.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.FrameVelocityErrorLimit +import OAI.Geometry.RCD.Coordinates.FirstOrderFrameErrorIntegral +import OAI.Geometry.RCD.Metric.RescaledBallVolume + +namespace OAI + +/-! # Vanishing actual velocity error on the original radius-two balls -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.first_order_velocity_error_tendsto {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) (hK : K≤0) + (p : ℕ → X) (r ε : ℕ → ℝ) (hr : ∀ k, 0 ((hausdorff n X).real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), frameVelocityError (hausdorff n X) hX.quadratic (u k) (g k).val x + ∂hausdorff n X) atTop (𝓝 0) := by + let μ := hausdorff n X + let Q := hX.quadratic + have hpos (k : ℕ) (a : ℝ) (ha : 0 gramDefect_nonneg μ Q (u k) x)) + (Eventually.of_forall hsub)).trans (gramDefect_integral_bound μ Q (hpos k 16 (by norm_num)) + (hX.finiteOnBounded _ isBounded_ball).ne (hs k)) + have hDbound (k : ℕ) : (μ.real (ball (p k) (2*r k)))⁻¹* + (∫ x in ball (p k) (2*r k), gramDefect μ Q (u k) x ∂μ)≤((n:ℝ)^2*D)*ε k := by + rw [← div_eq_inv_mul,div_le_iff₀ (hpos k 2 (by norm_num))] + have hh := mul_le_mul_of_nonneg_left (hv k) (mul_nonneg (sq_nonneg (n:ℝ)) (hε k)) + exact (hDint k).trans (by + convert hh using 1 + ring) + have hEzero : Tendsto (fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), (frameEnergyError μ Q (u k) (g k).val x)^2 ∂μ) atTop (𝓝 0) := by + apply squeeze_zero (fun k => mul_nonneg (inv_nonneg.mpr (hpos k 2 (by norm_num)).le) + (integral_nonneg (fun _ => sq_nonneg _))) hEbound + simpa only [mul_zero] using hε0.const_mul (frameDefectConstant n*L^4*(n:ℝ)^2*D) + have hDzero : Tendsto (fun k => (μ.real (ball (p k) (2*r k)))⁻¹* + ∫ x in ball (p k) (2*r k), gramDefect μ Q (u k) x ∂μ) atTop (𝓝 0) := by + apply squeeze_zero (fun k => mul_nonneg (inv_nonneg.mpr (hpos k 2 (by norm_num)).le) + (integral_nonneg (gramDefect_nonneg μ Q (u k)))) hDbound + simpa only [mul_zero] using hε0.const_mul ((n:ℝ)^2*D) + apply frame_velocity_error_tendsto μ Q u (fun k => (g k).val) (fun k => ball (p k) (2*r k)) + (fun _ => (hX.finiteOnBounded _ isBounded_ball).ne) (fun k => hpos k 2 (by norm_num)) + ?_ hg (fun k => (hEsq k).1) hEzero hDzero + intro k i + filter_upwards [ae_restrict_of_ae_restrict_of_subset (ball_subset_ball (by linarith [hr k])) + ((hs k).gradient i)] with x hx + nlinarith [hε k,hε1 k] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ForcingCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/ForcingCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..8fc3fe40ba414969338faecb9a1c9ae2ef64027d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ForcingCoefficient.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Sobolev.ProjectedEulerIdentity +import OAI.Geometry.RCD.Harmonic.HarmonicRadialBound +import OAI.Geometry.RCD.Coordinates.RadialFitRestriction + +namespace OAI + +/-! # Small forcing coefficients from the harmonic residual -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [BorelSpace X] [ProperSpace X] in +theorem normalized_fit_restrict_norm (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + {s t : Set X} (hts : t ⊆ s) (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) + (hs0 : 0 < μ.real s) (ht0 : 0 < μ.real t) (f : SobolevSpace μ hQ) + {C E : ℝ} (hC : 0 ≤ C) (hE : 0 ≤ E) + (hvol : μ.real s ≤ C ^ 2 * μ.real t) + (hfit : ‖normalizeLocalL2 μ s hs (SobolevSpace.restrictLp μ hQ s f)‖ ≤ E) : + ‖normalizeLocalL2 μ t ht (SobolevSpace.restrictLp μ hQ t f)‖ ≤ C * E := by + have hh := normalized_fit_restrict_sq μ hQ hts hs ht hs0 ht0 f (sq_nonneg E) hvol + ((sq_le_sq₀ (norm_nonneg _) hE).mpr hfit) + rw [← mul_pow] at hh + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hC hE)).mp hh + +/-- On the half ball, the affine forcing is bounded by the original +residual norm and its Euler error. This supplies the coefficients needed +by radial transport without assuming their smallness. -/ +theorem LocalHarmonicL2GradientInput.forcing_coefficients + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (f w η e : SobolevSpace (hausdorff n X) hX.quadratic) (B : ℝ), 0 ≤ B → + ∀ hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R / 2)), + localGamma (hausdorff n X) hX.quadratic f f x ≤ B ^ 2, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w → + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p (R / 2))] fun _ => (1 : ℝ)) → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n) (ell : Euclidean n) (k H V E : ℝ), + 0 ≤ H → 0 ≤ V → 0 ≤ E → + (hausdorff n X).real (ball p R) ≤ V ^ 2 * (hausdorff n X).real (ball p (R / 2)) → + (∀ c a, |c| + ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) → + (localRadialDerivative (hausdorff n X) hX.quadratic (ball p (R / 2)) f hf w = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (R / 2)) + (w + sobolevColumnMap (hausdorff n X) hX.quadratic u ell + k • η + e)) → + ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) e)‖ ≤ E → + |k| + ‖N.symm ell‖ ≤ H * + ((B * C / R + V) * ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) w)‖ + V * E) := by + obtain ⟨C, hC, hrad⟩ := hinput.radial_derivative_bound hn hκ + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv f w η e B hB hf hw hη u N ell k H V E hH hV hE hvol hbound heuler he + let μ := hausdorff n X + let hQ := hX.quadratic + let α := ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p R) w)‖ + have hs : ball p (R / 2) ⊆ ball p R := ball_subset_ball (by linarith) + have hpos (r : ℝ) (hr : 0 < r) : 0 < μ.real (ball p r) := + ENNReal.toReal_pos (ne_of_gt (hX.fullSupport p r hr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + have hrestrict (q : SobolevSpace μ hQ) (A : ℝ) (hA : 0 ≤ A) + (hq : ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p R) q)‖ ≤ A) : + ‖normalizeLocalL2 μ (ball p (R / 2)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p (R / 2)) q)‖ ≤ V * A := + normalized_fit_restrict_norm μ hQ hs _ _ (hpos R hR) (hpos (R / 2) (by linarith)) + q hV hA hvol hq + have hD : ‖normalizeLocalL2 μ (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (localRadialDerivative μ hQ (ball p (R / 2)) f hf w)‖ ≤ (B * C / R) * α := by + exact hrad p R hR hcurv f w B hB hf hw + exact projected_euler_coefficient_bound μ hQ (ball p (R / 2)) _ f w η e hf hη u N ell k hH + hbound heuler hD (hrestrict w α (norm_nonneg _) le_rfl) (hrestrict e E hE he) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/FullMassPinching.lean b/lean/OAI/Geometry/RCD/Harmonic/FullMassPinching.lean new file mode 100644 index 0000000000000000000000000000000000000000..046790a3125b68eb1610f8120089cc477dae8aec --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/FullMassPinching.lean @@ -0,0 +1,175 @@ +import OAI.Geometry.RCD.Sobolev.ResidualBochnerMass +import OAI.Geometry.RCD.Harmonic.PinchingFromProjection +import OAI.Geometry.RCD.Harmonic.MeanDirectionFromPairings + +namespace OAI + +/-! # Directional pinching from the actual full residual mass -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X E F : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] + (hQ : QuadraticCheegerEnergy μ) + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + [NormedAddCommGroup F] [InnerProductSpace ℝ F] [FiniteDimensional ℝ F] + +/-- The full measure of the actual coordinate displacement is controlled +by the Poisson-difference mass, the residual gradient and the constant-direction +error. The residual mass is derived from its Bochner equation and the cutoff. -/ +theorem directional_mass_from_cutoff_residual + (U : F →L[ℝ] SobolevSpace μ hQ) (A : E →L[ℝ] F) + (M : PositiveBilinearMeasure X F) (a : F) (b δ : E) + {p : X} {r ρ C κ β d P K : ℝ} {L : ℝ≥0} + (χ : GoodLaplacianCutoff μ hQ p ρ C) (hρ : 0 < ρ) (hρr : ρ < r) + (hC : 0 ≤ C) (hκ : 0 ≤ κ) (hK : 0 ≤ K) + (hvol : 0 < μ.real (ball p ρ)) + (hnormal : sobolevMeanGram μ hQ (U.comp A) (ball p ρ) measurableSet_ball = + ContinuousLinearMap.id ℝ E) + (G : LocalHarmonicEnergy μ hQ U M κ p r L (a - A b)) + (hgradient : ∀ᵐ x ∂μ.restrict (closedBall p (2 * ρ)), + localGamma μ hQ (U (a - A b)) (U (a - A b)) x ≤ β) + (hdirection : ‖meanGradientVector μ hQ (U.comp A) (ball p ρ) + measurableSet_ball (U a) - δ‖ ^ 2 ≤ d) + (hraw : ⟪a, M.massOperator (ball p ρ) a⟫_ℝ ≤ P) + (hupper : ∀ v, ⟪A v, M.massOperator (ball p ρ) (A v)⟫_ℝ ≤ K * ‖v‖ ^ 2) : + ⟪A δ, M.massOperator (ball p ρ) (A δ)⟫_ℝ ≤ + 4 * (P + ((C / ρ ^ 2) / 2 + κ) * β * μ.real (closedBall p (2 * ρ))) + + 4 * K * (d + β) := by + let D := M.massOperator (ball p ρ) + let w := a - A b + let Q := ((C / ρ ^ 2) / 2 + κ) * β * μ.real (closedBall p (2 * ρ)) + have hw : U w = U a - (U.comp A) b := by simp [w] + have hmassw : ⟪w, D w⟫_ℝ ≤ Q := + χ.mass_le_of_gradient μ hQ hρ hρr hC hκ G hgradient + have hmassb : ⟪A b, D (A b)⟫_ℝ ≤ 2 * (P + Q) := by + have htri := M.measure_add_le a (-w) (ball p ρ) measurableSet_ball + rw [M.measure_real _ _ measurableSet_ball, M.measure_real _ _ measurableSet_ball, + M.measure_real _ _ measurableSet_ball] at htri + have hab : a + -w = A b := by dsimp only [w]; abel + rw [hab] at htri + simp only [map_neg, inner_neg_left, inner_neg_right, neg_neg] at htri + change ⟪A b, D (A b)⟫_ℝ ≤ _ at htri + change ⟪a, D a⟫_ℝ ≤ P at hraw + linarith + have hfin : μ (ball p ρ) < ∞ := + (measure_mono (show ball p ρ ⊆ closedBall p ρ from ball_subset_closedBall)).trans_lt + (isCompact_closedBall p ρ).measure_lt_top + let : IsFiniteMeasure (μ.restrict (ball p ρ)) := + ⟨by simpa only [Measure.restrict_apply_univ] using hfin⟩ + have hgradball : ∀ᵐ x ∂μ.restrict (ball p ρ), + localGamma μ hQ (U w) (U w) x ≤ β := by + exact ae_restrict_of_ae_restrict_of_subset + ((ball_subset_closedBall).trans (closedBall_subset_closedBall (by linarith))) hgradient + have hint : (∫ x in ball p ρ, localGamma μ hQ (U w) (U w) x ∂μ) ≤ β * μ.real (ball p ρ) := by + calc + _ ≤ ∫ _x in ball p ρ, β ∂μ := + integral_mono_ae (localGamma_memL1 μ hQ (U w) (U w)).integrableOn + (integrable_const _) hgradball + _ = _ := by simp only [integral_const, smul_eq_mul, measureReal_restrict_apply_univ, mul_comm] + have henergy : (μ.real (ball p ρ))⁻¹ * ∫ x in ball p ρ, + (SobolevSpace.minimalSlope μ hQ (U a - (U.comp A) b) x) ^ 2 ∂μ ≤ β := by + have heq : (∫ x in ball p ρ, (SobolevSpace.minimalSlope μ hQ (U a - (U.comp A) b) x) ^ 2 ∂μ) = + ∫ x in ball p ρ, localGamma μ hQ (U w) (U w) x ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (localGamma_self μ hQ (U w))] with x hx + rw [hw] at hx ⊢ + exact hx.symm + rw [heq] + have hbound := mul_le_mul_of_nonneg_left hint (inv_nonneg.mpr hvol.le) + calc + _ ≤ _ := hbound + _ = β := by field_simp + let D' : E →L[ℝ] E := A.adjoint.comp (D.comp A) + have hD' : D'.IsPositive := (M.massOperator_isPositive _ measurableSet_ball).adjoint_conj A + have hpair (v : E) : ⟪v, D' v⟫_ℝ = ⟪A v, D (A v)⟫_ℝ := by + simp only [D', ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right] + have hpinch := directional_mass_of_projection μ hQ (U.comp A) (ball p ρ) + measurableSet_ball hnormal (U a) b δ D' hD' (m := 2 * (P + Q)) hK henergy hdirection + (by rw [hpair]; exact hmassb) (fun v => by rw [hpair]; exact hupper v) + rw [hpair] at hpinch + change ⟪A δ, D (A δ)⟫_ℝ ≤ _ + dsimp only [Q] at hpinch + linarith + +/-- A coordinate gradient bound also supplies the full mass upper bound +used in coefficient transfer, through the same local Bochner family. +No separate trace or coordinate mass estimate is assumed. -/ +theorem directional_mass_from_gradient_bounds + (U : F →L[ℝ] SobolevSpace μ hQ) (A : E →L[ℝ] F) + (M : PositiveBilinearMeasure X F) (a : F) (b δ : E) + {p : X} {r ρ C κ β d P H : ℝ} {L : ℝ≥0} + (χ : GoodLaplacianCutoff μ hQ p ρ C) (hρ : 0 < ρ) (hρr : ρ < r) + (hC : 0 ≤ C) (hκ : 0 ≤ κ) (hH : 0 ≤ H) + (hvol : 0 < μ.real (ball p ρ)) + (hnormal : sobolevMeanGram μ hQ (U.comp A) (ball p ρ) measurableSet_ball = + ContinuousLinearMap.id ℝ E) + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + (hgradient : ∀ᵐ x ∂μ.restrict (closedBall p (2 * ρ)), + localGamma μ hQ (U (a - A b)) (U (a - A b)) x ≤ β) + (hcoordinates : ∀ v, ∀ᵐ x ∂μ.restrict (closedBall p (2 * ρ)), + localGamma μ hQ (U (A v)) (U (A v)) x ≤ H * ‖v‖ ^ 2) + (hdirection : ‖meanGradientVector μ hQ (U.comp A) (ball p ρ) + measurableSet_ball (U a) - δ‖ ^ 2 ≤ d) + (hraw : ⟪a, M.massOperator (ball p ρ) a⟫_ℝ ≤ P) : + let F := ((C / ρ ^ 2) / 2 + κ) * μ.real (closedBall p (2 * ρ)) + ⟪A δ, M.massOperator (ball p ρ) (A δ)⟫_ℝ ≤ + 4 * (P + F * β) + 4 * (F * H) * (d + β) := by + dsimp only + let F₀ := ((C / ρ ^ 2) / 2 + κ) * μ.real (closedBall p (2 * ρ)) + have hF₀ : 0 ≤ F₀ := by dsimp only [F₀]; positivity + have hupper (v : E) : ⟪A v, M.massOperator (ball p ρ) (A v)⟫_ℝ ≤ + (F₀ * H) * ‖v‖ ^ 2 := by + have hm := χ.mass_le_of_gradient μ hQ hρ hρr hC hκ (G (A v)) (hcoordinates v) + apply hm.trans_eq + dsimp only [F₀] + ring + have hm := directional_mass_from_cutoff_residual μ hQ U A M a b δ χ hρ hρr + hC hκ (mul_nonneg hF₀ hH) hvol hnormal (G (a - A b)) hgradient hdirection hraw hupper + apply hm.trans_eq + dsimp only [F₀] + ring + +/-- Constant-direction pairings give the displacement estimate needed in +full-mass pinching. Thus the averaged-gradient comparison is a conclusion, +not an extra hypothesis of the mass estimate. -/ +theorem directional_mass_from_pairing_bounds + (U : F →L[ℝ] SobolevSpace μ hQ) (A : E →L[ℝ] F) + (Hpair : E →L[ℝ] SobolevSpace μ hQ) + (M : PositiveBilinearMeasure X F) (a : F) (b δ : E) + {p : X} {r ρ C κ β P H D : ℝ} {L : ℝ≥0} + (χ : GoodLaplacianCutoff μ hQ p ρ C) (hρ : 0 < ρ) (hρr : ρ < r) + (hC : 0 ≤ C) (hκ : 0 ≤ κ) (hH : 0 ≤ H) (hD : 0 ≤ D) + (hvol : 0 < μ.real (ball p ρ)) + (hfin : μ (ball p ρ) ≠ ∞) (hpos : μ (ball p ρ) ≠ 0) + (hnormal : sobolevMeanGram μ hQ (U.comp A) (ball p ρ) measurableSet_ball = + ContinuousLinearMap.id ℝ E) + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + (hgradient : ∀ᵐ x ∂μ.restrict (closedBall p (2 * ρ)), + localGamma μ hQ (U (a - A b)) (U (a - A b)) x ≤ β) + (hcoordinates : ∀ v, ∀ᵐ x ∂μ.restrict (closedBall p (2 * ρ)), + localGamma μ hQ (U (A v)) (U (A v)) x ≤ H * ‖v‖ ^ 2) + (hrep : ∀ v, SobolevSpace.toLp μ hQ (Hpair v) =ᵐ[μ.restrict (ball p ρ)] + localGamma μ hQ (U a) ((U.comp A) v)) + (herror : ∀ v, ‖normalizeLocalL2 μ (ball p ρ) hfin + (SobolevSpace.restrictLp μ hQ (ball p ρ) (Hpair v) - + ⟪δ, v⟫_ℝ • restrictedOne μ (ball p ρ) hfin)‖ ≤ D * ‖v‖) + (hraw : ⟪a, M.massOperator (ball p ρ) a⟫_ℝ ≤ P) : + let F₀ := ((C / ρ ^ 2) / 2 + κ) * μ.real (closedBall p (2 * ρ)) + ⟪A δ, M.massOperator (ball p ρ) (A δ)⟫_ℝ ≤ + 4 * (P + F₀ * β) + 4 * (F₀ * H) * (D ^ 2 + β) := by + have hmean := meanGradientVector_error_of_pairings μ hQ (U.comp A) Hpair (U a) + (ball p ρ) measurableSet_ball hfin hpos δ hD hrep herror + have hmean2 := (sq_le_sq₀ (norm_nonneg _) hD).mpr hmean + exact directional_mass_from_gradient_bounds μ hQ U A M a b δ χ hρ hρr hC hκ hH + hvol hnormal G hgradient hcoordinates hmean2 hraw + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GeometricProjectionOuter.lean b/lean/OAI/Geometry/RCD/Harmonic/GeometricProjectionOuter.lean new file mode 100644 index 0000000000000000000000000000000000000000..b60423a7a16568bf32582615a6bf2bd1a5d872f6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GeometricProjectionOuter.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedResidualOuter +import OAI.Geometry.RCD.Harmonic.ScaledForcingCoefficient + +namespace OAI + +/-! # Uniform outer control for the actual projected Euler equation -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The local harmonic estimate controls the affine forcing from the +inner residual. The radial transport estimate then controls its outer +norm, with both constants preceding all centers and radii. -/ +theorem LocalHarmonicL2GradientInput.projected_residual_outer + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ H V W B J E D : ℝ} (hκ : 0 ≤ κ) (hH : 0 ≤ H) (hV : 0 ≤ V) + (hW : 0 ≤ W) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hE : 0 ≤ E) (Cw : ℝ≥0) : + ∃ G T : ℝ, 0 ≤ G ∧ 0 ≤ T ∧ + ∀ (p : X) (R a : ℝ), 0 < R → 0 ≤ a → a ≤ (n : ℝ) + 1 → -κ ≤ K * R ^ 2 → + ∀ (f w η e : SobolevSpace (hausdorff n X) hX.quadratic) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n) (ell : Euclidean n) (k σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball p (4 * R)) f a → + ∀ hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (4 * R)), + localGamma (hausdorff n X) hX.quadratic f f x ≤ (B * R) ^ 2, + (∀ᵐ x ∂(hausdorff n X).restrict (ball p (4 * R)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x| ≤ Cw) → + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w → + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p (4 * R))] fun _ => (1 : ℝ)) → + 0 < (hausdorff n X).real (ball p R) → + (hausdorff n X).real (ball p R) ≤ V ^ 2 * (hausdorff n X).real (ball p (R / 2)) → + (hausdorff n X).real (ball p (4 * R)) ≤ W ^ 2 * (hausdorff n X).real (ball p R) → + (∀ c v, |c| + R * ‖N.symm v‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, v))‖) → + (localRadialDerivative (hausdorff n X) hX.quadratic (ball p (4 * R)) f hf w = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) + (w + sobolevColumnMap (hausdorff n X) hX.quadratic u ell + k • η + e)) → + ‖normalizeLocalL2 (hausdorff n X) (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) e)‖ ≤ E * σ → + ‖normalizeLocalL2 (hausdorff n X) (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) + (sobolevColumnMap (hausdorff n X) hX.quadratic u ell))‖ ≤ J * (R * ‖N.symm ell‖) → + ∀ g : X → ℝ, MemLp g 2 (hausdorff n X) → + localGamma (hausdorff n X) hX.quadratic f + (inwardSobolev (hausdorff n X) hX.quadratic p (3 * R)) =ᵐ[ + (hausdorff n X).restrict (ball p (3 * R))] (fun x => g x - dist p x) → + (hausdorff n X) (sphere p R) = 0 → + (∫ x in ball p (4 * R), (g x) ^ 2 ∂hausdorff n X) ≤ + D ^ 2 * R ^ 2 * (hausdorff n X).real (ball p R) * σ ^ 2 → + |k| + R * ‖N.symm ell‖ ≤ G * + (‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) w)‖ + σ) ∧ + ‖normalizeLocalL2 (hausdorff n X) (ball p (2 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (2 * R)) w)‖ ≤ T * + (‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) w)‖ + σ) := by + let μ := hausdorff n X + let hQ := hX.quadratic + obtain ⟨C, hC, hc⟩ := hinput.scaled_forcing_coefficients hn hκ + have hC0 : 0 ≤ C := le_trans zero_le_one hC + let G := H * (B * C + V + V * W * E) + let F := (1 + J) * G + E + have hG : 0 ≤ G := by dsimp only [G]; positivity + have hF : 0 ≤ F := by dsimp only [F]; positivity + obtain ⟨T, hT, ht⟩ := normalized_residual_outer_bound μ hQ n (E := D) hF hW Cw + refine ⟨G, T, hG, hT, ?_⟩ + intro p R a hR ha han hcurv f w η e u N ell k σ hσ hlap hf hw hwharm hη hpos hhalf hvol hbound heuler he hU g hg hradial hsphere herror + let α := ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p R) w)‖ + let U := sobolevColumnMap μ hQ u + let q := U ell + k • η + e + have hsub : ball p (R / 2) ⊆ ball p (4 * R) := ball_subset_ball (by linarith) + have hsubR : ball p R ⊆ ball p (4 * R) := ball_subset_ball (by linarith) + have hfsmall := ae_restrict_of_ae_restrict_of_subset hsub hf + have heulersmall : localRadialDerivative μ hQ (ball p (R / 2)) f hfsmall w = + SobolevSpace.restrictLp μ hQ (ball p (R / 2)) (w + U ell + k • η + e) := by + apply localRadialDerivative_eq_restrict + have hgamma := localRadialDerivative_representative μ hQ (ball p (4 * R)) f w hf + rw [heuler] at hgamma + exact ae_restrict_of_ae_restrict_of_subset hsub + ((SobolevSpace.restrictLp_coe μ hQ _ _).symm.trans hgamma) + have hposlarge : 0 < μ.real (ball p (4 * R)) := hpos.trans_le + (measureReal_mono hsubR (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))) + have heR := normalized_fit_restrict_norm μ hQ hsubR + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hposlarge hpos e hW + (mul_nonneg hE hσ) hvol he + have hcoeff := hc p R hR hcurv f w η e (B * R) (mul_nonneg hB hR.le) + hfsmall hwharm (ae_restrict_of_ae_restrict_of_subset hsub hη) u N ell k H V + (W * (E * σ)) hH hV (by positivity) hhalf hbound heulersmall heR + have hcoeff' : |k| + R * ‖N.symm ell‖ ≤ G * (α + σ) := by + have hcancel : B * R * C / R = B * C := by field_simp + rw [hcancel] at hcoeff + change |k| + R * ‖N.symm ell‖ ≤ H * ((B * C + V) * α + V * (W * (E * σ))) at hcoeff + have hα : 0 ≤ α := norm_nonneg _ + have hinner : (B * C + V) * α + V * (W * (E * σ)) ≤ + (B * C + V + V * W * E) * (α + σ) := by + nlinarith [mul_nonneg (mul_nonneg (mul_nonneg hV hW) hE) hα, + mul_nonneg (add_nonneg (mul_nonneg hB hC0) hV) hσ] + calc + _ ≤ H * ((B * C + V + V * W * E) * (α + σ)) := + hcoeff.trans (mul_le_mul_of_nonneg_left hinner hH) + _ = G * (α + σ) := by dsimp only [G]; ring + have hforce := weighted_affine_forcing_norm_bound μ hQ (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (ne_of_gt (hX.fullSupport p (4 * R) (by positivity))) η e hη U N ell k + hR.le hJ hE (norm_nonneg _) hU hcoeff' he + have heuler' : localRadialDerivative μ hQ (ball p (4 * R)) f hf w = + SobolevSpace.restrictLp μ hQ (ball p (4 * R)) (w + q) := by + rw [heuler] + congr 1 + dsimp only [q, U] + module + exact ⟨hcoeff', ht R a hR ha han p f w q σ hσ hlap hf hw g hg heuler' + hradial hsphere (fun _ => ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) hpos hvol hforce herror⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/GramDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..6796cf30e394b562b78e05f5b736b6d0bbaa6b6a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramDefect.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # A single nonnegative defect for the finite harmonic coordinate family -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +def gramDefect {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (x : X) : ℝ := + ∑ i, ∑ j, |localGamma μ hQ (u i) (u j) x - (if i=j then 1 else 0)| + +theorem gramDefect_nonneg {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (x : X) : + 0 ≤ gramDefect μ hQ u x := + Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => abs_nonneg _)) + +theorem gramDefect_entry_le {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (i j : Fin n) (x : X) : + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ≤ gramDefect μ hQ u x := by + have hinner : |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ≤ + ∑ k : Fin n, |localGamma μ hQ (u i) (u k) x-(if i=k then 1 else 0)| := + Finset.single_le_sum (fun k _ => abs_nonneg + (localGamma μ hQ (u i) (u k) x-(if i=k then 1 else 0))) (Finset.mem_univ j) + apply hinner.trans + exact Finset.single_le_sum (fun k _ => Finset.sum_nonneg (fun l _ => + abs_nonneg (localGamma μ hQ (u k) (u l) x-(if k=l then 1 else 0)))) (Finset.mem_univ i) + +theorem gramDefect_integrableOn {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + {Ω : Set X} (hΩ : μ Ω ≠ ⊤) : IntegrableOn (gramDefect μ hQ u) Ω μ := by + apply integrable_finsetSum + intro i _ + apply integrable_finsetSum + intro j _ + exact ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub + (integrableOn_const (C := (if i=j then (1:ℝ) else 0)) hΩ)).abs + +theorem gramDefect_integral_bound + {n : ℕ} {p : X} {R ε : ℝ} {u : Fin n → SobolevSpace μ hQ} {v : X → Euclidean n} + (hvol : 0 < μ.real (ball p R)) (hfin : μ (ball p R) ≠ ⊤) + (hsplit : FirstOrderSplittingOn μ hQ p R ε u v) : + (∫ x in ball p R, gramDefect μ hQ u x ∂μ) ≤ (n:ℝ)^2*ε*μ.real (ball p R) := by + have hint (i j : Fin n) : IntegrableOn + (fun x => |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)|) (ball p R) μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const hfin)).abs + have hb (i j : Fin n) : (∫ x in ball p R, + |localGamma μ hQ (u i) (u j) x-(if i=j then 1 else 0)| ∂μ) ≤ ε*μ.real (ball p R) := by + have hh := hsplit.gram i j + rw [← div_eq_inv_mul,div_le_iff₀ hvol] at hh + exact hh + unfold gramDefect + rw [integral_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => hint i j))] + simp_rw [integral_finsetSum _ (fun j _ => hint _ j)] + calc + _ ≤ ∑ _i : Fin n, ∑ _j : Fin n, ε*μ.real (ball p R) := + Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hb i j)) + _ = _ := by simp only [Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramDefectLocality.lean b/lean/OAI/Geometry/RCD/Harmonic/GramDefectLocality.lean new file mode 100644 index 0000000000000000000000000000000000000000..979ce264cd48177a30c02240d52abc5e8df17dce --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramDefectLocality.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.RCD.Harmonic.GramDefect +import OAI.Geometry.RCD.Coordinates.BoundedSplittingCoordinates + +namespace OAI + +/-! # Locality of the finite Gram matrix error -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem gramDefect_congr_ae (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + {n : ℕ} {u U : Fin n → SobolevSpace μ Q} {Ω : Set X} + (hu : ∀ i, SobolevSpace.toLp μ Q (U i) =ᵐ[μ.restrict Ω] SobolevSpace.toLp μ Q (u i)) : + gramDefect μ Q U =ᵐ[μ.restrict Ω] gramDefect μ Q u := by + have hG (i j : Fin n) := localGamma_pair_congr_ae μ Q (hu i) (hu j) + filter_upwards [ae_all_iff.mpr (fun i => ae_all_iff.mpr (hG i))] with x hx + unfold gramDefect + exact Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => by rw [hx i j])) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramDirectionalError.lean b/lean/OAI/Geometry/RCD/Harmonic/GramDirectionalError.lean new file mode 100644 index 0000000000000000000000000000000000000000..647e65e62257573da0fffd7ce26ed0421997f2c6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramDirectionalError.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.RCD.Harmonic.MeanGramControl + +namespace OAI + +/-! # From coordinatewise Gram errors to every constant direction -/ + +open Set MeasureTheory +open scoped BigOperators InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +private theorem gamma_sum_left {ι : Type*} (s : Finset ι) + (u : ι → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) : + localGamma μ hQ (∑ i ∈ s, u i) g =ᵐ[μ] + fun x => ∑ i ∈ s, localGamma μ hQ (u i) g x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty, zero_smul, zero_mul] using + localGamma_smul_left μ hQ 0 (0 : SobolevSpace μ hQ) g + | @insert a s ha ih => + simp only [Finset.sum_insert ha] + filter_upwards [localGamma_add_left μ hQ (u a) (∑ i ∈ s, u i) g, ih] with x hx hi + exact hx.trans (congrArg (fun r => localGamma μ hQ (u a) g x + r) hi) + +private theorem gamma_sum_right {ι : Type*} (s : Finset ι) + (u : ι → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) : + localGamma μ hQ g (∑ i ∈ s, u i) =ᵐ[μ] + fun x => ∑ i ∈ s, localGamma μ hQ g (u i) x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty, zero_smul, zero_mul] using + localGamma_smul_right μ hQ 0 g (0 : SobolevSpace μ hQ) + | @insert a s ha ih => + simp only [Finset.sum_insert ha] + filter_upwards [localGamma_add_right μ hQ g (u a) (∑ i ∈ s, u i), ih] with x hx hi + exact hx.trans (congrArg (fun r => localGamma μ hQ g (u a) x + r) hi) + +/-- Finite coordinate expansion of the actual local carré du champ. -/ +theorem localGamma_column_pair {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (v w : Euclidean n) : + localGamma μ hQ (sobolevColumnMap μ hQ u v) (sobolevColumnMap μ hQ u w) =ᵐ[μ] + fun x => ∑ i : Fin n, ∑ j : Fin n, (v i * w j) * localGamma μ hQ (u i) (u j) x := by + classical + have hleft := gamma_sum_left μ hQ Finset.univ (fun i => v i • u i) (∑ j, w j • u j) + have hright (i : Fin n) := + gamma_sum_right μ hQ Finset.univ (fun j => w j • u j) (v i • u i) + have hscalar (i j : Fin n) : + localGamma μ hQ (v i • u i) (w j • u j) =ᵐ[μ] + fun x => (v i * w j) * localGamma μ hQ (u i) (u j) x := by + filter_upwards [localGamma_smul_left μ hQ (v i) (u i) (w j • u j), + localGamma_smul_right μ hQ (w j) (u i) (u j)] with x hx hy + rw [hx, hy] + ring + have hr : ∀ᵐ x ∂μ, ∀ i : Fin n, + localGamma μ hQ (v i • u i) (∑ j, w j • u j) x = + ∑ j, localGamma μ hQ (v i • u i) (w j • u j) x := by + simpa only [Finset.mem_univ, forall_true_left] using + (Filter.eventually_all_finset Finset.univ).mpr (fun i _ => hright i) + have hs : ∀ᵐ x ∂μ, ∀ i j : Fin n, + localGamma μ hQ (v i • u i) (w j • u j) x = + (v i * w j) * localGamma μ hQ (u i) (u j) x := by + suffices hh : ∀ᵐ x ∂μ, ∀ i ∈ (Finset.univ : Finset (Fin n)), + ∀ j ∈ (Finset.univ : Finset (Fin n)), + localGamma μ hQ (v i • u i) (w j • u j) x = + (v i * w j) * localGamma μ hQ (u i) (u j) x by + simpa only [Finset.mem_univ, forall_true_left] using hh + apply (Filter.eventually_all_finset Finset.univ).mpr + intro i _ + apply (Filter.eventually_all_finset Finset.univ).mpr + intro j _ + exact hscalar i j + simp only [sobolevColumnMap_apply] + filter_upwards [hleft, hr, hs] with x hl hr hs + rw [hl] + apply Finset.sum_congr rfl + intro i _ + rw [hr i] + exact Finset.sum_congr rfl (fun j _ => hs i j) + +omit [MetricSpace X] [BorelSpace X] [ProperSpace X] in +private theorem integral_abs_sum_le {ι : Type*} (s : Finset ι) (F : ι → X → ℝ) + (hF : ∀ i ∈ s, Integrable (F i) μ) : + (∫ x, |∑ i ∈ s, F i x| ∂μ) ≤ ∑ i ∈ s, ∫ x, |F i x| ∂μ := by + have hh := integral_mono_ae (integrable_finsetSum s hF).abs + (integrable_finsetSum s (fun i hi => (hF i hi).abs)) + (Filter.Eventually.of_forall fun x => Finset.abs_sum_le_sum_abs _ _) + rw [integral_finsetSum s (fun i hi => (hF i hi).abs)] at hh + exact hh + +/-- Coordinatewise L1 Gram errors control the error in every constant +direction, with one dimension-dependent factor and the squared norm of +the direction. This supplies the directional premise of the mass estimate. -/ +theorem directional_gram_error_le {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (S : Set X) (hSfin : μ S ≠ ∞) {epsilon : ℝ} (heps : 0 ≤ epsilon) + (herror : ∀ i j : Fin n, ∫ x in S, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ epsilon) + (v : Euclidean n) : + (∫ x in S, |localGamma μ hQ (sobolevColumnMap μ hQ u v) + (sobolevColumnMap μ hQ u v) x - ‖v‖ ^ 2| ∂μ) ≤ + (n : ℝ) ^ 2 * epsilon * ‖v‖ ^ 2 := by + classical + let : IsFiniteMeasure (μ.restrict S) := + ⟨by simpa only [Measure.restrict_apply_univ] using hSfin.lt_top⟩ + let F := fun (i j : Fin n) (x : X) => (v i * v j) * + (localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)) + have hF (i j : Fin n) : IntegrableOn (F i j) S μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub + (integrable_const _)).const_mul _ + have hdiag : (∑ i : Fin n, ∑ j : Fin n, + (v i * v j) * (if i = j then (1 : ℝ) else 0)) = ‖v‖ ^ 2 := by + calc + _ = ∑ i : Fin n, (v i) ^ 2 := by simp [mul_ite, pow_two] + _ = _ := (EuclideanSpace.real_norm_sq_eq v).symm + have hpoint : (fun x => localGamma μ hQ (sobolevColumnMap μ hQ u v) + (sobolevColumnMap μ hQ u v) x - ‖v‖ ^ 2) =ᵐ[μ] + fun x => ∑ i : Fin n, ∑ j : Fin n, F i j x := by + filter_upwards [localGamma_column_pair μ hQ u v v] with x hx + dsimp only [F] + simp only [mul_sub, Finset.sum_sub_distrib] + rw [← hx, hdiag] + have hterm (i j : Fin n) : (∫ x in S, |F i j x| ∂μ) ≤ epsilon * ‖v‖ ^ 2 := by + have hi : |v i| ≤ ‖v‖ := by simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le v i + have hj : |v j| ≤ ‖v‖ := by simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le v j + have hc : |v i * v j| ≤ ‖v‖ ^ 2 := by + rw [abs_mul, pow_two] + exact mul_le_mul hi hj (abs_nonneg _) (norm_nonneg _) + calc + _ = |v i * v j| * ∫ x in S, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ := by + simp only [F, abs_mul, integral_const_mul] + _ ≤ |v i * v j| * epsilon := mul_le_mul_of_nonneg_left (herror i j) (abs_nonneg _) + _ ≤ _ := by nlinarith + calc + _ = ∫ x in S, |∑ i : Fin n, ∑ j : Fin n, F i j x| ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae hpoint] with x hx + rw [hx] + _ ≤ ∑ i : Fin n, ∫ x in S, |∑ j : Fin n, F i j x| ∂μ := + integral_abs_sum_le (μ.restrict S) Finset.univ _ + (fun i _ => integrable_finsetSum Finset.univ (fun j _ => hF i j)) + _ ≤ ∑ i : Fin n, ∑ j : Fin n, ∫ x in S, |F i j x| ∂μ := + Finset.sum_le_sum fun i _ => integral_abs_sum_le (μ.restrict S) Finset.univ _ + (fun j _ => hF i j) + _ ≤ ∑ _i : Fin n, ∑ _j : Fin n, epsilon * ‖v‖ ^ 2 := + Finset.sum_le_sum fun i _ => Finset.sum_le_sum fun j _ => hterm i j + _ = _ := by simp; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramL1Continuity.lean b/lean/OAI/Geometry/RCD/Harmonic/GramL1Continuity.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd11379f6e9a205816f0987893f0d19439377e28 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramL1Continuity.lean @@ -0,0 +1,84 @@ +import OAI.Analysis.RCDHeat.ExistingAnalytic + +namespace OAI + +/-! # Strong Sobolev convergence gives L1 convergence of Gram densities -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem integral_abs_localGamma_le (f g : SobolevSpace μ Q) : + (∫ x, |localGamma μ Q f g x| ∂μ) ≤ ‖f‖*‖g‖ := by + let F := SobolevSpace.minimalSlope μ Q f + let G := SobolevSpace.minimalSlope μ Q g + have hi : Integrable (fun x => F x*G x) μ := (Lp.memLp F).integrable_mul (Lp.memLp G) + have he : (∫ x, F x*G x ∂μ)=inner ℝ F G := by + simp only [L2.inner_def,Real.inner_apply] + calc + _ ≤ ∫ x, F x*G x ∂μ := integral_mono_ae (localGamma_memL1 μ Q f g).abs hi + (localGamma_abs_le μ Q f g) + _ ≤ ‖F‖*‖G‖ := by + rw [he] + exact (le_abs_self _).trans (by simpa only [Real.norm_eq_abs] using norm_inner_le_norm (𝕜 := ℝ) F G) + _ ≤ ‖f‖*‖g‖ := mul_le_mul (SobolevSpace.minimalSlope_norm_le μ Q f) + (SobolevSpace.minimalSlope_norm_le μ Q g) (norm_nonneg _) (norm_nonneg _) + +theorem integral_abs_gram_difference_le (u v : SobolevSpace μ Q) : + (∫ x, |localGamma μ Q u u x-localGamma μ Q v v x| ∂μ) ≤ + (‖u‖+‖v‖)*‖u-v‖ := by + have he : (fun x => localGamma μ Q u u x-localGamma μ Q v v x) =ᵐ[μ] + fun x => localGamma μ Q (u-v) u x+localGamma μ Q (u-v) v x := by + filter_upwards [localGamma_sub_left μ Q u v u,localGamma_sub_left μ Q u v v, + localGamma_comm μ Q u v] with x h1 h2 h3 + rw [h1,h2,h3] + ring + have heabs : (fun x => |localGamma μ Q u u x-localGamma μ Q v v x|) =ᵐ[μ] + fun x => |localGamma μ Q (u-v) u x+localGamma μ Q (u-v) v x| := + he.mono fun _ hx => congrArg abs hx + rw [integral_congr_ae heabs] + calc + _ ≤ ∫ x, |localGamma μ Q (u-v) u x|+|localGamma μ Q (u-v) v x| ∂μ := + integral_mono_ae ((localGamma_memL1 μ Q (u-v) u).add (localGamma_memL1 μ Q (u-v) v)).abs + ((localGamma_memL1 μ Q (u-v) u).abs.add (localGamma_memL1 μ Q (u-v) v).abs) + (Eventually.of_forall fun x => abs_add_le _ _) + _ = (∫ x, |localGamma μ Q (u-v) u x| ∂μ)+(∫ x, |localGamma μ Q (u-v) v x| ∂μ) := + integral_add (localGamma_memL1 μ Q (u-v) u).abs (localGamma_memL1 μ Q (u-v) v).abs + _ ≤ ‖u-v‖*‖u‖+‖u-v‖*‖v‖ := add_le_add + (integral_abs_localGamma_le μ Q (u-v) u) (integral_abs_localGamma_le μ Q (u-v) v) + _ = _ := by ring + +theorem weighted_gram_L1_tendsto {Ω : Set X} + (u : ℕ → SobolevSpace μ Q) (v : SobolevSpace μ Q) + (hu : Tendsto u atTop (𝓝 v)) (φ : X → ℝ) (hφ : AEStronglyMeasurable φ μ) + (B : ℝ≥0) (hB : ∀ᵐ x ∂μ, |φ x|≤B) : + Tendsto (fun k => ∫ x in Ω, + |φ x*(localGamma μ Q (u k) (u k) x-localGamma μ Q v v x)| ∂μ) atTop (𝓝 0) := by + have hnorm : Tendsto (fun k => ‖u k-v‖) atTop (𝓝 0) := by + simpa only [sub_self,norm_zero] using (hu.sub (tendsto_const_nhds (x := v))).norm + have hb : Tendsto (fun k => (B:ℝ)*(‖u k‖+‖v‖)*‖u k-v‖) atTop (𝓝 0) := by + simpa only [mul_zero] using ((hu.norm.add tendsto_const_nhds).const_mul (B:ℝ)).mul hnorm + apply squeeze_zero (fun k => integral_nonneg fun x => abs_nonneg _) (fun k => ?_) hb + have hi := (localGamma_memL1 μ Q (u k) (u k)).sub (localGamma_memL1 μ Q v v) + calc + _ ≤ ∫ x in Ω, (B:ℝ)*|localGamma μ Q (u k) (u k) x-localGamma μ Q v v x| ∂μ := by + apply integral_mono_ae (hi.bdd_mul hφ (hB.mono fun _ hx => by simpa only [Real.norm_eq_abs] using hx)).abs.integrableOn + (hi.abs.const_mul (B:ℝ)).integrableOn + filter_upwards [ae_restrict_of_ae hB] with x hx + rw [abs_mul] + exact mul_le_mul_of_nonneg_right hx (abs_nonneg _) + _ ≤ ∫ x, (B:ℝ)*|localGamma μ Q (u k) (u k) x-localGamma μ Q v v x| ∂μ := + setIntegral_le_integral (hi.abs.const_mul (B:ℝ)) + (Eventually.of_forall fun x => mul_nonneg B.coe_nonneg (abs_nonneg _)) + _ ≤ _ := by + rw [integral_const_mul,mul_assoc] + exact mul_le_mul_of_nonneg_left (integral_abs_gram_difference_le μ Q (u k) v) B.coe_nonneg + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramProductMeasure.lean b/lean/OAI/Geometry/RCD/Harmonic/GramProductMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3f8d62c5eb7518b4800a13e6ae78fb38c9930d2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramProductMeasure.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Metric.LocalMeasureProduct +import OAI.Geometry.RCD.Sobolev.MeasureLaplacianAlgebra +import OAI.Geometry.RCD.Sobolev.FiniteEnergyRepresentatives + +namespace OAI + +/-! # The full measure equation for a product Gram entry -/ + +open Set Filter MeasureTheory +open scoped NNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The Gram entry of a product is represented by genuine Sobolev +products. Its local Laplacian keeps both weighted full measures and the +ordinary cross terms. -/ +theorem gram_product_measure {Ω : Set X} + (f g h Fg Fh : SobolevSpace μ hQ) + (G H : X →ᵇ ℝ) + (hG : SobolevSpace.toLp μ hQ g =ᵐ[μ] G) + (hH : SobolevSpace.toLp μ hQ h =ᵐ[μ] H) + (dg dh : Lp ℝ 2 μ) (hdg : IsWeakLaplacian μ hQ g dg) + (hdh : IsWeakLaplacian μ hQ h dh) + (νg νh : SignedMeasure X) + (hνg : IsMeasureLaplacianOn μ hQ Ω Fg νg) + (hνh : IsMeasureLaplacianOn μ hQ Ω Fh νh) + (hFg : SobolevSpace.toLp μ hQ Fg =ᵐ[μ.restrict Ω] localGamma μ hQ f g) + (hFh : SobolevSpace.toLp μ hQ Fh =ᵐ[μ.restrict Ω] localGamma μ hQ f h) + (A B : ℝ≥0) + (hA : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ Fg x|≤A) + (hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ Fh x|≤B) : + let P := SobolevSpace.product μ hQ Fh g B ‖G‖₊+ + SobolevSpace.product μ hQ Fg h A ‖H‖₊ + SobolevSpace.toLp μ hQ P =ᵐ[μ.restrict Ω] + localGamma μ hQ f (SobolevSpace.product μ hQ g h ‖G‖₊ ‖H‖₊) ∧ + IsMeasureLaplacianOn μ hQ Ω P + (cutoffMeasureSource μ hQ Fh g dg νh G+cutoffMeasureSource μ hQ Fg h dh νg H) := by + have hg : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ g x|≤(‖G‖₊:ℝ) := by + filter_upwards [hG] with x hx + simpa only [hx,Real.norm_eq_abs,coe_nnnorm] using G.norm_coe_le_norm x + have hh : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ h x|≤(‖H‖₊:ℝ) := by + filter_upwards [hH] with x hx + simpa only [hx,Real.norm_eq_abs,coe_nnnorm] using H.norm_coe_le_norm x + constructor + · change (SobolevSpace.toLpCLM μ hQ (_+_)) =ᵐ[μ.restrict Ω] _ + rw [map_add] + filter_upwards [ae_restrict_of_ae (Lp.coeFn_add + (SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ Fh g B ‖G‖₊)) + (SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ Fg h A ‖H‖₊))), + ae_restrict_of_ae (SobolevSpace.product_coe μ hQ Fh g B ‖G‖₊ hB hg), + ae_restrict_of_ae (SobolevSpace.product_coe μ hQ Fg h A ‖H‖₊ hA hh), + ae_restrict_of_ae (localGamma_product_right μ hQ f g h ‖G‖₊ ‖H‖₊ hg hh), + hFg,hFh] with x hadd hprod₁ hprod₂ hΓ hfg hfh + change ((SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ Fh g B ‖G‖₊)+ + SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ Fg h A ‖H‖₊)) : Lp ℝ 2 μ) x = _ + rw [hadd] + simp only [Pi.add_apply] + rw [hprod₁,hprod₂,hΓ,hfg,hfh] + ring + · exact (hνh.mul μ hQ G g hG dg hdg B hB).add μ hQ (hνg.mul μ hQ H h hH dh hdh A hA) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramQuadraticDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/GramQuadraticDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..605b78e22efcf57874333aa32cc5c48361108907 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramQuadraticDefect.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Harmonic.GramTraceDefect +import OAI.Geometry.RCD.Coordinates.FrameResidualEnergy +import OAI.Geometry.RCD.Harmonic.GramDefect + +namespace OAI + +/-! # Quadratic-form error from the same finite Gram defect -/ + +open Set Finset Filter MeasureTheory +open scoped InnerProductSpace +noncomputable section +namespace RegularPointCoordinates + +theorem matrix_gram_quadratic_defect {n : ℕ} (G : Fin n → Fin n → ℝ) (a : Euclidean n) : + |(∑ i, ∑ j, a i*a j*G i j)-‖a‖^2|≤ matrixGramDefect G*‖a‖^2 := by + classical + have hid : (∑ i, ∑ j, a i*a j*(if i=j then (1:ℝ) else 0))=‖a‖^2 := by + rw [EuclideanSpace.real_norm_sq_eq] + simp [mul_ite,pow_two] + have he : (∑ i, ∑ j, a i*a j*G i j)-‖a‖^2= + ∑ i, ∑ j, a i*a j*(G i j-(if i=j then 1 else 0)) := by + simp only [mul_sub,sum_sub_distrib,hid] + have ha (i : Fin n) : |a i|≤‖a‖ := by + simpa only [Real.norm_eq_abs] using PiLp.norm_apply_le a i + have hp (i j : Fin n) : |a i*a j|≤‖a‖^2 := by + rw [abs_mul,pow_two] + exact mul_le_mul (ha i) (ha j) (abs_nonneg _) (norm_nonneg _) + rw [he] + calc + _≤∑ i, |∑ j, a i*a j*(G i j-(if i=j then 1 else 0))| := abs_sum_le_sum_abs _ _ + _≤∑ i, ∑ j, |a i*a j*(G i j-(if i=j then 1 else 0))| := + sum_le_sum (fun _ _ => abs_sum_le_sum_abs _ _) + _≤∑ i, ∑ j, ‖a‖^2*|G i j-(if i=j then 1 else 0)| := by + apply sum_le_sum + intro i _ + apply sum_le_sum + intro j _ + rw [abs_mul] + exact mul_le_mul_of_nonneg_right (hp i j) (abs_nonneg _) + _=matrixGramDefect G*‖a‖^2 := by + rw [mul_comm (matrixGramDefect G) (‖a‖^2)] + simp only [matrixGramDefect,mul_sum] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem localGamma_column_defect {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (a : Euclidean n) : + ∀ᵐ x ∂μ, |localGamma μ hQ (sobolevColumnMap μ hQ u a) + (sobolevColumnMap μ hQ u a) x-‖a‖^2|≤gramDefect μ hQ u x*‖a‖^2 := by + filter_upwards [localGamma_column_pair μ hQ u a a] with x hx + rw [hx] + exact matrix_gram_quadratic_defect (fun i j => localGamma μ hQ (u i) (u j) x) a + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramSourceEstimate.lean b/lean/OAI/Geometry/RCD/Harmonic/GramSourceEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a25311cfc119b8cd756245ff5519c8a0aa2fc34 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramSourceEstimate.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicSourceIntegral +import OAI.Geometry.RCD.Harmonic.HarmonicGramSourceComparison + +namespace OAI + +/-! # The actual mean/heat discrepancy in the three source budgets -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +private theorem three_source_triangle (a b m₀ m₁ c₀ c₁ e₀ e₁ κ : ℝ) : + |a - b - (2 * m₀ - 2 * κ * c₀ + e₀) - (2 * m₁ - 2 * κ * c₁ + e₁)| ≤ + |a| + |b| + 2 * (|m₀| + |m₁|) + 2 * |κ| * (|c₀| + |c₁|) + |e₀| + |e₁| := by + have h := abs_sub (a - b - (2 * m₀ - 2 * κ * c₀ + e₀)) (2 * m₁ - 2 * κ * c₁ + e₁) + have h' := abs_sub (a - b) (2 * m₀ - 2 * κ * c₀ + e₀) + have hab := abs_sub a b + have h₀ := abs_add_le (2 * m₀ - 2 * κ * c₀) e₀ + have h₁ := abs_add_le (2 * m₁ - 2 * κ * c₁) e₁ + have h₀' := abs_sub (2 * m₀) (2 * κ * c₀) + have h₁' := abs_sub (2 * m₁) (2 * κ * c₁) + simp only [abs_mul, show |(2 : ℝ)| = 2 by norm_num] at h₀' h₁' + nlinarith only [h, h', hab, h₀, h₁, h₀', h₁'] + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {U : E →L[ℝ] SobolevSpace μ hQ} {M : PositiveBilinearMeasure X E} + {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} {v : E} + (G : LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) + +/-- The actual metric discrepancy is bounded by the terminal heat value, +regularizer, full positive-source integrals, curvature integrals and annular +error integrals. No comparison estimate is assumed. -/ +theorem LocalHarmonicEnergy.mean_sub_heat_norm_le (hρ : 0 < ρ) (hρr : ρ < r) + (A : Set X) (hA : MeasurableSet A) (hbounded : Bornology.IsBounded A) + (hχA : ∀ z ∈ A, χ.weight z = 1) {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) + (x : X) (lambda : ℝ) : + let f := SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ.weight χ.sobolev) + let c := fun z => χ.weight z * localGamma μ hQ (U v) (U v) z + let e := cutoffSourceDensity μ hQ G.energy χ.sobolev χ.laplacian + |⟪v, (sobolevMeanGram μ hQ U A hA - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) U hs x lambda) v⟫_ℝ| ≤ + |(μ.real A)⁻¹ * (∫ z in A, heatAt μ hQ t f z ∂μ) - kernelHeat μ hQ hk t f x| + + |lambda * s| * ‖v‖ ^ 2 + + 2 * (|∫ τ in (0 : ℝ)..s, ⟪v, cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded τ v⟫_ℝ| + + |∫ τ in s..t, ⟪v, (cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded τ - + cutoffHeatMassAt μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) M τ x) v⟫_ℝ|) + + 2 * |κ| * (|∫ τ in (0 : ℝ)..s, ∫ z, kernelAverage μ ker τ A z * c z ∂μ| + + |∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * c z ∂μ|) + + |∫ τ in (0 : ℝ)..s, ∫ z, kernelAverage μ ker τ A z * e z ∂μ| + + |∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * e z ∂μ| := by + dsimp only + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r) := by + intro z hz + have hd := χ.tsupport_subset μ hQ hz + rw [mem_closedBall] at hd + exact lt_of_le_of_lt hd (by linarith) + have hqzero : ∀ᵐ z ∂μ, z ∉ closedBall p (2 * ρ) → χ.laplacian z = 0 := by + filter_upwards [χ.laplacian_locality] with z hz hn + exact hz (Or.inr (by simpa only [mem_closedBall, dist_comm, not_le] using hn)) + have hid := G.mean_sub_heat_source μ hQ hk χ.weight (χ.hasCompactSupport μ hQ) + hχΩ χ.sobolev χ.representative χ.laplacian χ.weak_laplacian p + (mul_pos (by norm_num) hρ) + (fun z hz => χ.zero z (by simpa only [mem_closedBall, dist_comm, not_le] using hz)) hqzero + A hA hbounded.measure_lt_top.ne hχA hs hst x lambda + rw [G.integrated_average_source_components μ hQ hk χ A hA hbounded hs.le, + G.integrated_difference_source_components μ hQ hk χ hρ A hA hbounded x hs hst] at hid + rw [hid] + have h := three_source_triangle + ((μ.real A)⁻¹ * (∫ z in A, heatAt μ hQ t + (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ.weight χ.sobolev)) z ∂μ) - + kernelHeat μ hQ hk t (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ.weight χ.sobolev)) x) + (lambda * s * ‖v‖ ^ 2) + (∫ τ in (0 : ℝ)..s, ⟪v, cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded τ v⟫_ℝ) + (∫ τ in s..t, ⟪v, (cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded τ - + cutoffHeatMassAt μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) M τ x) v⟫_ℝ) + (∫ τ in (0 : ℝ)..s, ∫ z, kernelAverage μ ker τ A z * + (χ.weight z * localGamma μ hQ (U v) (U v) z) ∂μ) + (∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * + (χ.weight z * localGamma μ hQ (U v) (U v) z) ∂μ) + (∫ τ in (0 : ℝ)..s, ∫ z, kernelAverage μ ker τ A z * + cutoffSourceDensity μ hQ G.energy χ.sobolev χ.laplacian z ∂μ) + (∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * + cutoffSourceDensity μ hQ G.energy χ.sobolev χ.laplacian z ∂μ) κ + simpa only [abs_mul, abs_of_nonneg (sq_nonneg ‖v‖)] using h + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/GramTraceDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/GramTraceDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..a18986dc2883228fd01b9d0d656b4d4bf1d92158 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/GramTraceDefect.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Coordinates.BochnerFrameDefect + +namespace OAI + +/-! # Trace and square moments controlled by the original Gram defect -/ + +open Finset +noncomputable section +namespace RegularPointCoordinates + +def matrixGramDefect {n : ℕ} (G : Fin n → Fin n → ℝ) : ℝ := + ∑ i, ∑ j, |G i j-(if i=j then 1 else 0)| + +theorem matrixGramDefect_nonneg {n : ℕ} (G : Fin n → Fin n → ℝ) : + 0≤ matrixGramDefect G := sum_nonneg (fun _ _ => sum_nonneg (fun _ _ => abs_nonneg _)) + +theorem gram_trace_defect {n : ℕ} (G : Fin n → Fin n → ℝ) : + |∑ i, G i i-(n:ℝ)|≤ matrixGramDefect G := by + classical + have he : (∑ i, G i i)-(n:ℝ)=∑ i, (G i i-1) := by simp [sum_sub_distrib] + rw [he] + apply (abs_sum_le_sum_abs _ _).trans + apply sum_le_sum + intro i _ + have hh := single_le_sum (s := (univ : Finset (Fin n))) + (f := fun j => |G i j-(if i=j then 1 else 0)|) (fun _ _ => abs_nonneg _) (mem_univ i) + simpa only [ite_true] using hh + +theorem gram_square_defect {n : ℕ} (G : Fin n → Fin n → ℝ) {C : ℝ} + (hG : ∀ i j, |G i j|≤C) : + |∑ i, ∑ j, (G i j)^2-(n:ℝ)|≤(C+1)*matrixGramDefect G := by + classical + have he : (∑ i, ∑ j, (G i j)^2)-(n:ℝ)= + ∑ i, ∑ j, ((G i j)^2-(if i=j then 1 else 0)) := by + simp [sum_sub_distrib] + have hterm (i j : Fin n) : |(G i j)^2-(if i=j then 1 else 0)|≤ + (C+1)*|G i j-(if i=j then 1 else 0)| := by + let d : ℝ := if i=j then 1 else 0 + have hd : |d|≤1 := by dsimp [d]; split_ifs <;> norm_num + have hsum : |G i j+d|≤C+1 := (abs_add_le _ _).trans (add_le_add (hG i j) hd) + have hsq : (G i j)^2-d=(G i j-d)*(G i j+d) := by + dsimp [d] + split_ifs <;> ring + change |(G i j)^2-d|≤(C+1)*|G i j-d| + rw [hsq,abs_mul,mul_comm (C+1)] + exact mul_le_mul_of_nonneg_left hsum (abs_nonneg _) + rw [he] + calc + _≤∑ i, |∑ j, ((G i j)^2-(if i=j then 1 else 0))| := abs_sum_le_sum_abs _ _ + _≤∑ i, ∑ j, |(G i j)^2-(if i=j then 1 else 0)| := + sum_le_sum (fun _ _ => abs_sum_le_sum_abs _ _) + _≤∑ i, ∑ j, (C+1)*|G i j-(if i=j then 1 else 0)| := + sum_le_sum (fun i _ => sum_le_sum (fun j _ => hterm i j)) + _=(C+1)*matrixGramDefect G := by simp only [matrixGramDefect,mul_sum] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineImprovement.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineImprovement.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8775e9cd9f6bfe0d95a773a7e816488178573b5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineImprovement.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.RCD.Sobolev.HarmonicSequenceEnergy + +namespace OAI + +/-! # Uniform affine improvement from published harmonic compactness + +The threshold is uniform in the center, radius, coordinates and harmonic +function. All inputs are measured approximation, a rescaled curvature +bound, harmonicity and an actual normalized L² bound. The affine estimate +itself is proved by a compactness contradiction. +-/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The averaged norm, with its radius dependence exposed for rescaling. -/ +def harmonicTargetNorm {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (p : X) (r : ℝ) (w : SobolevSpace (hausdorff n X) hX.quadratic) : ℝ := + ‖normalizeLocalL2 (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) w)‖ + +/-- The averaged affine residual, with its radius dependence exposed. -/ +def harmonicAffineResidualNorm {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) (r : ℝ) (w : SobolevSpace (hausdorff n X) hX.quadratic) : ℝ := + ‖normalizeLocalL2 (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic u (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) w))‖ + +/-- One normalized harmonic test on a measured almost-Euclidean ball. -/ +structure NormalizedHarmonicTest {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (S ε : ℝ) where + center : X + scale : ℝ + scale_pos : 0 < scale + curvature : -1 ≤ K * scale ^ 2 + coordinates : Fin n → SobolevSpace (hausdorff n X) hX.quadratic + values : X → Euclidean n + target : SobolevSpace (hausdorff n X) hX.quadratic + approximation : IsMeasuredEuclideanApproximation (hausdorff n X) n center scale S ε values + representative : ∀ i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (coordinates i) =ᵐ[ + (hausdorff n X).restrict (ball center (S * scale))] fun x => values x i + harmonic : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball center (S * scale)) target + normalized : harmonicTargetNorm hX center (S * scale) target ≤ 1 + +namespace NormalizedHarmonicTest + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} {S ε : ℝ} + +def residualNorm (d : NormalizedHarmonicTest hX S ε) (ρ : ℝ) : ℝ := + harmonicAffineResidualNorm hX d.coordinates d.center (ρ * d.scale) d.target + +end NormalizedHarmonicTest + +omit [ProperSpace X] in +/-- The quantitative affine-improvement theorem for normalized harmonic +functions. There is no energy-bound or affine-fit premise: the former is +derived from Jiang's estimate and the latter from the Euclidean limit. -/ +theorem harmonic_affine_improvement_of_measured_approximation + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hcompact : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput n) : + ∃ m : ℕ, 3 ≤ m ∧ ∀ S : ℝ, 0 < S → + ∃ ε : ℝ, 0 < ε ∧ ∀ d : NormalizedHarmonicTest hX S ε, + d.residualNorm ((1 / 2 : ℝ) ^ m * S) < + (1 / 2 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m) := by + classical + obtain ⟨m, hm, hmodel⟩ := heuclidean.affine_contraction + refine ⟨m, hm, ?_⟩ + intro S hS + by_contra hbad + push Not at hbad + let ε : ℕ → ℝ := fun k => 1 / ((k : ℝ) + 1) + have hε : ∀ k, 0 < ε k := fun k => by dsimp only [ε]; positivity + have hchoice : ∀ k, ∃ d : NormalizedHarmonicTest hX S (ε k), + (1 / 2 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m) ≤ + d.residualNorm ((1 / 2 : ℝ) ^ m * S) := fun k => hbad (ε k) (hε k) + choose d hd using hchoice + let data : HarmonicCompactnessSequence hX S := { + center := fun k => (d k).center + scale := fun k => (d k).scale + error := ε + scale_pos := fun k => (d k).scale_pos + curvature := fun k => (d k).curvature + error_pos := hε + error_zero := tendsto_one_div_add_atTop_nhds_zero_nat + coordinates := fun k => (d k).coordinates + values := fun k => (d k).values + target := fun k => (d k).target + approximation := fun k => (d k).approximation + representative := fun k => (d k).representative + harmonic := fun k => (d k).harmonic + normalized := fun k => (d k).normalized + energy := rescaled_harmonic_energy_of_gradient hgradient hn hS + (fun k => (d k).center) (fun k => (d k).scale) + (fun k => (d k).scale_pos) (fun k => (d k).curvature) + (fun k => (d k).target) (fun k => (d k).harmonic) (fun k => (d k).normalized) } + obtain ⟨k, hk⟩ := (data.eventual_affine_contraction hcompact hm hmodel hS).exists + exact (not_lt_of_ge (hd k)) hk + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineNondegeneracy.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineNondegeneracy.lean new file mode 100644 index 0000000000000000000000000000000000000000..1117cd7271a0c49ef1220033dea664585caab886 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineNondegeneracy.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Sobolev.AffineCoefficientEnergy +import OAI.Geometry.RCD.Harmonic.AffineEvaluation + +namespace OAI + +/-! # Value nondegeneracy of the actual centered harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The constant and the coefficient in the exact energy frame are both +controlled by the value norm of one affine function. This follows from +the published harmonic gradient and mean-value inputs already in use. -/ +theorem harmonic_affine_nondegeneracy {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hgradient : LocalHarmonicL2GradientInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ Cg Cm : ℝ, 1 ≤ Cg ∧ 1 ≤ Cm ∧ + ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (V : X → Euclidean n), + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) (u j)) → + ContinuousOn V (ball p R) → V p = 0 → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun x => V x j) → + ∀ (N : Euclidean n ≃L[ℝ] Euclidean n), + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R / 2)) measurableSet_ball N → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ (c : ℝ) (a : Euclidean n), + |c| + ‖N.symm a‖ ≤ (Cm + Cg / R) * + ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + obtain ⟨Cg, hCg, hcoeff⟩ := hgradient.affine_coefficient hn hκ + obtain ⟨Cm, hCm, heval⟩ := affine_evaluation_of_mean_value hX hmean hn hκ + refine ⟨Cg, Cm, hCg, hCm, ?_⟩ + intro p R hR hcurv u V hu hV hVp hrep N hN η hη c a + let μ := hausdorff n X + let hQ := hX.quadratic + let w := c • η + sobolevColumnMap μ hQ u a + have hηharm := isSobolevHarmonicOn_of_local_constant μ hQ (ball p R) measurableSet_ball η 1 hη + have hw : IsSobolevHarmonicOn μ hQ (ball p R) w := + (hηharm.smul μ hQ c).add μ hQ (IsSobolevHarmonicOn.linearCombination μ hQ hu a) + have hdiff : SobolevSpace.toLp μ hQ (w - sobolevColumnMap μ hQ u a) =ᵐ[ + μ.restrict (ball p R)] fun _ => c := by + simp only [w, add_sub_cancel_right, map_smul] + filter_upwards [hη, ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ hQ η))] + with x hx hc + simp only [hc, Pi.smul_apply, smul_eq_mul] + change c * SobolevSpace.toLp (hausdorff n X) hX.quadratic η x = c + rw [hx, mul_one] + have hrest : SobolevSpace.restrictLp μ hQ (ball p R) w = + affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a) := by + rw [affineCoordinateMap_apply] + dsimp only [w] + rw [map_add, map_smul, restrictLp_eq_one_of_representative μ hQ η _ _ hη] + have hc := hcoeff p R hR hcurv u N hN a w c hw hdiff + rw [hrest] at hc + have hv := heval p R hR hcurv u V hu hV hrep η hη c a + rw [hVp, inner_zero_left, add_zero] at hv + have hlin : ‖N.symm a‖ ≤ Cg / R * + ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (div_nonneg (by linarith) hR.le) (norm_nonneg _))).mp + simpa only [mul_pow] using hc + nlinarith only [hv, hlin] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineSequence.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0d5635fbc1de31d0b844a4592b418e0c1934418 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicAffineSequence.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicMomentCompactnessInput +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicContraction + +namespace OAI + +/-! # Harmonic affine improvement along an actual RCD rescaling sequence -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The local bounds and measured approximations appearing in the +published harmonic-compactness input, bundled for subsequence restriction. -/ +structure HarmonicCompactnessSequence {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (S : ℝ) where + center : ℕ → X + scale : ℕ → ℝ + error : ℕ → ℝ + scale_pos : ∀ k, 0 < scale k + curvature : ∀ k, -1 ≤ K * scale k ^ 2 + error_pos : ∀ k, 0 < error k + error_zero : Tendsto error atTop (𝓝 0) + coordinates : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic + values : ℕ → X → Euclidean n + target : ℕ → SobolevSpace (hausdorff n X) hX.quadratic + approximation : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n + (center k) (scale k) S (error k) (values k) + representative : ∀ k i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (coordinates k i) =ᵐ[ + (hausdorff n X).restrict (ball (center k) (S * scale k))] fun x => values k x i + harmonic : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (center k) (S * scale k)) (target k) + normalized : ∀ k, ‖normalizeLocalL2 (hausdorff n X) (ball (center k) (S * scale k)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center k) (S * scale k)) (target k))‖ ≤ 1 + energy : ∀ ρ : ℝ, 0 < ρ → ρ < S → ∃ C : ℝ, 0 ≤ C ∧ ∀ k, + scale k ^ 2 * ((hausdorff n X).real (ball (center k) (S * scale k)))⁻¹ * + (∫ x in ball (center k) (ρ * scale k), localGamma (hausdorff n X) hX.quadratic + (target k) (target k) x ∂hausdorff n X) ≤ C + +namespace HarmonicCompactnessSequence + +variable {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} {S : ℝ} + +/-- Restricting to an increasing subsequence preserves precisely the +analytic and geometric hypotheses of local harmonic compactness. -/ +def subsequence (d : HarmonicCompactnessSequence hX S) (s : ℕ → ℕ) (hs : StrictMono s) : + HarmonicCompactnessSequence hX S where + center := d.center ∘ s + scale := d.scale ∘ s + error := d.error ∘ s + scale_pos := fun k => d.scale_pos (s k) + curvature := fun k => d.curvature (s k) + error_pos := fun k => d.error_pos (s k) + error_zero := d.error_zero.comp hs.tendsto_atTop + coordinates := d.coordinates ∘ s + values := d.values ∘ s + target := d.target ∘ s + approximation := fun k => d.approximation (s k) + representative := fun k => d.representative (s k) + harmonic := fun k => d.harmonic (s k) + normalized := fun k => d.normalized (s k) + energy := fun ρ hρ hρS => by + obtain ⟨C, hC, hb⟩ := d.energy ρ hρ hρS + exact ⟨C, hC, fun k => hb (s k)⟩ + +def residualNorm (d : HarmonicCompactnessSequence hX S) (ρ : ℝ) (k : ℕ) : ℝ := + ‖normalizeLocalL2 (hausdorff n X) (ball (d.center k) (ρ * d.scale k)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineResidual (hausdorff n X) hX.quadratic (d.coordinates k) + (ball (d.center k) (ρ * d.scale k)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center k) (ρ * d.scale k)) (d.target k)))‖ + +omit [ProperSpace X] in +/-- Actual local harmonic compactness gives the affine contraction for +all sufficiently late members of each admissible rescaling sequence. -/ +theorem eventual_affine_contraction (hcompact : LocalHarmonicMomentCompactnessInput hX) + {m : ℕ} (hm : 3 ≤ m) + (hmodel : ∀ S : ℝ, 0 < S → ∀ w : EuclideanHarmonicModel n S, + ∃ (c : ℝ) (v : Euclidean n), ∃ hρS : (1 / 2 : ℝ) ^ m * S ≤ S, + ‖∑ i, affineErrorCoefficients c (fun j => v j) i • w.moments hρS i‖ < + (1 / 4 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m)) + (hS : 0 < S) (d : HarmonicCompactnessSequence hX S) : + ∀ᶠ k in atTop, d.residualNorm ((1 / 2 : ℝ) ^ m * S) k < + (1 / 2 : ℝ) * (1 / 2 : ℝ) ^ m * Real.sqrt ((1 / 2 : ℝ) ^ m) := by + let θ := (1 / 2 : ℝ) ^ m + have hθ : 0 < θ := pow_pos (by norm_num) _ + have hθhalf : θ ≤ 1 / 2 := by + have hh : θ = (1 / 2 : ℝ) ^ (m - 1) * (1 / 2) := by + dsimp only [θ] + rw [← pow_succ] + congr 1 + omega + rw [hh] + exact mul_le_of_le_one_left (by norm_num) (pow_le_one₀ (by norm_num) (by norm_num)) + have hρ : 0 < θ * S := mul_pos hθ hS + have hρS : θ * S < S := by nlinarith + by_contra hbad + have hb : ∃ᶠ k in atTop, ¬ d.residualNorm (θ * S) k < + (1 / 2 : ℝ) * θ * Real.sqrt θ := by + simpa only [Filter.Frequently, not_not] using hbad + obtain ⟨s, hs, hfail⟩ := extraction_of_frequently_atTop hb + let d' := d.subsequence s hs + obtain ⟨t, _ht, model, hlimit⟩ := hcompact S hS d'.center d'.scale d'.error + d'.scale_pos d'.curvature d'.error_pos d'.error_zero d'.coordinates d'.values d'.target + d'.approximation d'.representative d'.harmonic d'.normalized d'.energy + obtain ⟨c, v, hboundRadius, hc⟩ := hmodel S hS model + have hc' : ‖∑ i, affineErrorCoefficients c (fun j => v j) i • + model.moments hboundRadius i‖ < (1 / 2 : ℝ) * θ * Real.sqrt θ := by + have hroot : 0 < Real.sqrt θ := Real.sqrt_pos.2 hθ + exact hc.trans (by change (1 / 4 : ℝ) * θ * Real.sqrt θ < _; nlinarith) + have he := eventually_normalized_affineResidual_lt (hausdorff n X) hX.quadratic + (fun k => d'.coordinates (t k)) (fun k => d'.target (t k)) + (fun k => ball (d'.center (t k)) ((θ * S) * d'.scale (t k))) + (fun _ => ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (model.moments hboundRadius) (hlimit (θ * S) hρ hρS) c v hc' + obtain ⟨k, hk⟩ := he.exists + exact hfail (t k) hk + +end HarmonicCompactnessSequence +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryIdentification.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryIdentification.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3135ad62cd2dd29f63e448b6785d5881c6b3c8d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryIdentification.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Metric.EuclideanBoundaryLayerLimit +import OAI.Geometry.RCD.Harmonic.HarmonicBoundaryUniqueness + +namespace OAI + +/-! # The actual harmonic replacement retains harmonic boundary data -/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped Topology ContDiff NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem CompactHarmonicBoundaryLimit.eq_harmonic_boundary {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} (hn : 2≤n) + {p : ℕ → X} {r ε : ℕ → ℝ} {V : ℕ → X → Euclidean n} {S R : ℝ} {ψ : Euclidean n → ℝ} + (d : CompactHarmonicBoundaryLimit hX p r V S R ψ) + (hS : 0 ((continuous_weak_harmonic d.continuous d.weak x hx).sub (hψh x hx)).2.self_of_nhds) + hη hlayer + intro x hx + have he := hz hx + change d.value x-ψ x=0 at he + exact sub_eq_zero.mp he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryLayer.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryLayer.lean new file mode 100644 index 0000000000000000000000000000000000000000..647b07c6b3282f2097bc6c7974cef00fb331b2d6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryLayer.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Sobolev.BoundaryDirichletLayer +import OAI.Geometry.RCD.Sobolev.HarmonicReplacementEnergy + +namespace OAI + +/-! # The boundary values retained by actual harmonic replacements -/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_replacement_boundary_layer {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) : + ∃ C : ℝ, 0 ring + have hm : 0<(hausdorff n X).real (ball p (S*r)) := + ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos (by linarith) hr)).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + calc _ ≤ ((hausdorff n X).real (ball p (S*r)))⁻¹* + (C*E*δ^2*(hausdorff n X).real (ball p (S*r))) := + mul_le_mul_of_nonneg_left hpoint (inv_pos.mpr hm).le + _ = _ := by field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryUniqueness.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryUniqueness.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5cf6ea20a37ee986f8ca8b84b6d8d6e0523758d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicBoundaryUniqueness.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLayerMassBound + +namespace OAI + +/-! # Squared-thickness boundary control determines a harmonic function -/ + +open Set Metric Filter MeasureTheory Laplacian +open scoped ContDiff Topology +noncomputable section +namespace RegularPointCoordinates + +theorem harmonic_zero_of_squared_boundary_layer {n : ℕ} (hn : 0 (f x)^2) (ball (0:Euclidean n) ρ) volume := + (((hf.continuousOn.pow 2).mono (closedBall_subset_ball hρR)).integrableOn_compact + (isCompact_closedBall _ _)).mono_set ball_subset_closedBall + have hevent : ∀ᶠ δ : ℝ in 𝓝[>] 0, + 2*(n:ℝ)*(∫ x in ball (0:Euclidean n) ρ, (f x)^2)≤C*A*δ := by + filter_upwards [self_mem_nhdsWithin, + (eventually_lt_nhds hη).filter_mono nhdsWithin_le_nhds, + (eventually_lt_nhds (show 0 (f x)^2) (ball (0:Euclidean n) (R-δ)) volume := + (((hf.continuousOn.pow 2).mono (closedBall_subset_ball (by linarith : R-δ sq_nonneg (f x)) + (Eventually.of_forall (ball_subset_ball (by linarith : ρ≤R-δ))) + have h₁ := mul_le_mul_of_nonneg_left hmono (show 0≤2*(n:ℝ) by positivity) + have h₂ := mul_le_mul_of_nonneg_left (hlayer δ hδ hδη b hab hbR) + (show 0≤C/δ by positivity) + have he : C/δ*(A*δ^2)=C*A*δ := by field_simp + rw [he] at h₂ + exact h₁.trans (hm.trans h₂) + have ht : Tendsto (fun δ : ℝ => C*A*δ) (𝓝[>] 0) (𝓝 0) := by + have hc : Continuous (fun δ : ℝ => C*A*δ) := continuous_const.mul continuous_id + simpa using (hc.continuousAt (x:=0)).tendsto.mono_left nhdsWithin_le_nhds + have hz : 2*(n:ℝ)*(∫ x in ball (0:Euclidean n) ρ, (f x)^2)=0 := + le_antisymm (ge_of_tendsto ht hevent) (by positivity) + exact (mul_eq_zero.mp hz).resolve_left (by positivity) + intro x hx + have hxR : ‖x‖ (f x)^2) (ball (0:Euclidean n) ρ) volume := + (((hf.continuousOn.pow 2).mono (closedBall_subset_ball hρR)).integrableOn_compact + (isCompact_closedBall _ _)).mono_set ball_subset_closedBall + have hae := (integral_eq_zero_iff_of_nonneg (fun x => sq_nonneg (f x)) hfi).mp (hzero ρ hρ hρR) + have heq := Measure.eqOn_open_of_ae_eq hae isOpen_ball + ((hf.continuousOn.pow 2).mono (ball_subset_ball hρR.le)) continuousOn_const + have hxρ : x∈ball (0:Euclidean n) ρ := by + simp only [mem_ball,dist_zero_right] + dsimp only [ρ] + linarith + exact sq_eq_zero_iff.mp (heq hxρ) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicContinuousRepresentative.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicContinuousRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0fd1793815fedb25ddd470c67b56d4e775e2354 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicContinuousRepresentative.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicInteriorRepresentative +import OAI.Geometry.RCD.Sobolev.HarmonicGradientConstruction +import OAI.Geometry.RCD.Harmonic.HomogeneousAffineImprovement + +namespace OAI + +/-! # Continuous representatives of the actual normalized harmonic coordinates -/ + +open Set Metric Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_continuous_representative {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : X) {r : ℝ} (hr : 0 < r) (hcurv : -1≤K*(5*r)^2) + (f : SobolevSpace (hausdorff n X) hX.quadratic) + (hf : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p (5*r)) f) + (hnorm : harmonicTargetNorm hX p (5*r) f≤7) : + ∃ v : X → ℝ, Continuous v ∧ + SobolevSpace.toLp (hausdorff n X) hX.quadratic f =ᵐ[(hausdorff n X).restrict (ball p (2*r))] v := by + let μ := hausdorff n X + let f₀ := (1/7:ℝ) • f + have hnorm₀ : harmonicTargetNorm hX p (5*r) f₀≤1 := by + rw [harmonicTargetNorm_smul] + norm_num + linarith + obtain ⟨C,_,hrep⟩ := harmonic_interior_bounded_representative hX hn hX.harmonicMeanValueInput + (hX.harmonicGradientInput hn p) (a:=1) (τ:=2/5) zero_le_one (by norm_num) (by norm_num) + obtain ⟨v,hv,_,he⟩ := hrep p (5*r) (by positivity) hcurv f₀ (hf.smul μ hX.quadratic (1/7)) hnorm₀ + have hrad : (2/5:ℝ)*(5*r)=2*r := by ring + rw [hrad] at he + refine ⟨fun x => 7*v x,continuous_const.mul hv.continuous,?_⟩ + have hcoe : SobolevSpace.toLp μ hX.quadratic f₀ =ᵐ[μ] + fun x => (1/7:ℝ)*SobolevSpace.toLp μ hX.quadratic f x := by + dsimp only [f₀] + rw [map_smul] + exact Lp.coeFn_smul _ _ + filter_upwards [he,ae_restrict_of_ae hcoe] with x hx hc + rw [hx] at hc + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicCorrection.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d18e1a430ed180b34a29c541feb3caa5086b721 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCorrection.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Sobolev.DirichletPoisson + +namespace OAI + +/-! # Quantitative harmonic corrections of a small divergence defect -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A bound for the energy-dual defect gives a harmonic correction with +that energy bound and the corresponding Poincare `L²` bound. This is the +functional step in the manuscript's radial harmonic correction. -/ +theorem exists_harmonic_correction (Ω : Set X) {P D : ℝ} + (hP : 0 ≤ P) (hD : 0 ≤ D) + (hbound : ∀ f : SobolevSpace.dirichlet μ hQ Ω, + ‖SobolevSpace.toLp μ hQ f.val‖ ^ 2 ≤ P * energyForm μ hQ f.val f.val) + (g : SobolevSpace μ hQ) + (hdefect : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (energyForm μ hQ g φ.val) ^ 2 ≤ D * energyForm μ hQ φ.val φ.val) : + ∃ h : SobolevSpace μ hQ, g - h ∈ SobolevSpace.dirichlet μ hQ Ω ∧ + IsSobolevHarmonicOn μ hQ Ω h ∧ + energyForm μ hQ (g - h) (g - h) ≤ D ∧ + ‖SobolevSpace.toLp μ hQ (g - h)‖ ^ 2 ≤ P * D := by + obtain ⟨h, hb, hh⟩ := exists_harmonic_replacement μ hQ Ω hP hbound g + have hmem : g - h ∈ SobolevSpace.dirichlet μ hQ Ω := by + simpa only [neg_sub] using (SobolevSpace.dirichlet μ hQ Ω).neg_mem hb + let v : SobolevSpace.dirichlet μ hQ Ω := ⟨g - h, hmem⟩ + let e := energyForm μ hQ v.val v.val + have he : 0 ≤ e := by + dsimp [e] + rw [energyForm_self] + exact mul_nonneg (by norm_num) (SobolevSpace.energy_nonneg μ hQ v.val) + have hid : e = energyForm μ hQ g v.val := by + change energyForm μ hQ (g - h) v.val = _ + rw [energyForm_sub_left, hh v.val v.property, sub_zero] + have hs : e ^ 2 ≤ D * e := by + have hs := hdefect v + rwa [← hid] at hs + have henergy : e ≤ D := by + by_cases hz : e = 0 + · simpa only [hz] using hD + · have hp : 0 < e := lt_of_le_of_ne he (Ne.symm hz) + apply (mul_le_mul_iff_left₀ hp).mp + nlinarith only [hs] + refine ⟨h, hmem, hh, henergy, ?_⟩ + exact (hbound v).trans (mul_le_mul_of_nonneg_left henergy hP) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicCountableCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCountableCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e6b77bb371b1d94c0aef98dbfdf77dbc767b9aa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCountableCompactness.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicInteriorRepresentative +import OAI.Geometry.RCD.Metric.CountablePointedCompactness +import OAI.Geometry.RCD.Metric.PointedLimitCompatibility + +namespace OAI + +/-! # Simultaneous harmonic limits on countably many interior balls + +All local limits use the same original subsequence. Full support identifies +the continuous source representatives, so the Euclidean limits agree on +every overlap. +-/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem harmonic_countable_value_limits {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (hmean : LocalHarmonicL2MeanValueInput hX) (hgradient : LocalHarmonicL2GradientInput hX) + {S : ℝ} (hS : 0 harmonic_interior_bounded_representative hX hn hmean hgradient + (sq_nonneg S) (div_pos (hT m) hS) ((div_lt_one hS).mpr (hTS m)) + have hC0 (m : ℕ) : 0≤C m := zero_le_one.trans (hC m) + have hcurv' (k : ℕ) : -(S^2)≤K*(S*r k)^2 := by + have hh := mul_le_mul_of_nonneg_left (hcurv k) (sq_nonneg S) + nlinarith only [hh] + have hreps (m k : ℕ) : ∃ w : X → ℝ, LipschitzWith (C m/(S*r k)).toNNReal w ∧ + (∀ x, |w x|≤C m) ∧ SobolevSpace.toLp μ hX.quadratic (u k) =ᵐ[ + μ.restrict (ball (p k) (T m*r k))] w := by + have hh := hrep m (p k) (S*r k) (mul_pos hS (hr k)) (hcurv' k) (u k) (hu k) (hnorm k) + have hrad : T m/S*(S*r k)=T m*r k := by field_simp + simpa only [hrad] using hh + choose w hw hwb hwr using hreps + let L : ℕ → ℝ≥0 := fun m => ⟨C m/S,div_nonneg (hC0 m) hS.le⟩ + have hl (m k : ℕ) (x z : X) : |w m k x-w m k z|≤(L m:ℝ)*(dist x z/r k) := by + have hh := (hw m k).dist_le_mul x z + rw [Real.dist_eq,Real.coe_toNNReal _ (div_nonneg (hC0 m) (mul_pos hS (hr k)).le)] at hh + change |w m k x-w m k z|≤(C m/S)*(dist x z/r k) + convert hh using 1; ring + obtain ⟨g,a,ha,hg⟩ := countable_pointed_function_compactness hS.le p r ε v hr hε hε1 hεlim hv + w L C (fun m k x _ => hwb m k x) (fun m k x z _ _ => hl m k x z) + have hsame (i j k : ℕ) : EqOn (w i k) (w j k) (ball (p k) (min (T i) (T j)*r k)) := by + have hi : ball (p k) (min (T i) (T j)*r k) ⊆ ball (p k) (T i*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (min_le_left _ _) (hr k).le) + have hj : ball (p k) (min (T i) (T j)*r k) ⊆ ball (p k) (T j*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (min_le_right _ _) (hr k).le) + have hij : w i k =ᵐ[μ.restrict (ball (p k) (min (T i) (T j)*r k))] w j k := by + filter_upwards [ae_restrict_of_ae_restrict_of_subset hi (hwr i k), + ae_restrict_of_ae_restrict_of_subset hj (hwr j k)] with x hxi hxj + exact hxi.symm.trans hxj + exact Measure.eqOn_open_of_ae_eq hij isOpen_ball + (hw i k).continuous.continuousOn (hw j k).continuous.continuousOn + refine ⟨g,L,a,ha,fun m => (hg m).1,?_,?_⟩ + · intro m η hη + filter_upwards [(hg m).2 η hη] with k hk + filter_upwards [hwr m (a k),ae_restrict_mem measurableSet_ball] with x hx hball + rw [hx] + apply hk x + have hd : dist x (p (a k)) hr (a k)) (fun k => hε (a k)) + (hεlim.comp ha.tendsto_atTop) (fun k => hv (a k)) + (fun k => w i (a k)) (fun k => w j (a k)) (hg i).1 (hg j).1 + (fun k x hx => hsame i j (a k) hx) (hg i).2 (hg j).2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicCurvatureBounds.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCurvatureBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c120780b7046b7d118de651ad7a7776f9a448b2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicCurvatureBounds.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.BoundedSourceIntegral +import OAI.Geometry.RCD.Sobolev.CutoffEnergyBound + +namespace OAI + +/-! # Actual curvature-source integrals for the harmonic coordinate map -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + +omit [FiniteDimensional ℝ E] in +include hk in +/-- The short- and long-time curvature pairings of the genuine cutoff +energy have a uniform vanishing bound. The same constant works in every +direction and does not depend on the working radius. -/ +theorem exists_harmonic_curvature_integral_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) + (n : ℕ) {A V W : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) : + ∃ C : ℝ, 0 < C ∧ ∀ (R : ℝ), 0 < R → R ≤ 1 → ∀ (i : ℕ) (x q : X), + μ (ball q (R / 2 ^ i)) ≠ ∞ → + V * (R / 2 ^ i) ^ n ≤ μ.real (ball q (R / 2 ^ i)) → dist x q ≤ A * (R / 2 ^ i) → + (∀ j, μ.real (ball x (R / 2 ^ j)) ≤ W * (R / 2 ^ j) ^ n) → + (∀ t, 0 < t → t ≤ R ^ 2 → ∀ z ∈ ball x R, + V * (Real.sqrt t) ^ n ≤ μ.real (ball z (Real.sqrt t))) → + ∀ (U : E →L[ℝ] SobolevSpace μ hQ) (M : PositiveBilinearMeasure X E) + (κ : ℝ) (p : X) (r : ℝ) (L : ℝ≥0) (v : E) + (_G : LocalHarmonicEnergy μ hQ U M κ p r L v) (χ : X →ᵇ ℝ), + (∀ z, 0 ≤ χ z ∧ χ z ≤ 1) → tsupport (χ : X → ℝ) ⊆ ball p (2 * r) → + (∀ z ∉ ball x R, χ z = 0) → ∀ (c : SobolevSpace μ hQ), + SobolevSpace.toLp μ hQ c =ᵐ[μ] χ → + |∫ t in (0 : ℝ)..(R / 2 ^ i) ^ 2, + ∫ z, kernelAverage μ ker t (ball q (R / 2 ^ i)) z * + (χ z * localGamma μ hQ (U v) (U v) z) ∂μ| + + |∫ t in (R / 2 ^ i) ^ 2..R ^ 2, + ∫ z, (kernelAverage μ ker t (ball q (R / 2 ^ i)) z - ker t x z) * + (χ z * localGamma μ hQ (U v) (U v) z) ∂μ| ≤ + C * ((L : ℝ) ^ 2 * ‖v‖ ^ 2) * ((R / 2 ^ i) ^ 2 + (R / 2 ^ i) * R) := by + obtain ⟨C₀, hC₀, hsbound⟩ := exists_short_bounded_source_integral_bound μ hQ hk hg n hA hV hW + obtain ⟨C₁, hC₁, hlbound⟩ := exists_long_bounded_source_integral_bound μ hQ hk hg hdiff n hA hV hW + refine ⟨C₀ + C₁, add_pos hC₀ hC₁, ?_⟩ + intro R hR hR1 i x q hfinite hvolume hcenter hupper hsource U M κ p r L v G χ hχ hχΩ hzero c hc + let f := SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c) + let B := (L : ℝ) ^ 2 * ‖v‖ ^ 2 + have hB : 0 ≤ B := by dsimp [B]; positivity + have hfb : ∀ᵐ z ∂μ, |f z| ≤ B := G.cutoffEnergy_bound μ hQ χ hχ c hc + have hfzero : ∀ᵐ z ∂μ, z ∉ ball x R → f z = 0 := G.cutoffEnergy_zero_off μ hQ χ c hc hzero + have hroot : (2 : ℝ) ^ i * (R / (2 : ℝ) ^ i) = R := by field_simp + have hvol : ∀ j ≤ i, μ.real (ball x (2 ^ j * (R / (2 : ℝ) ^ i))) ≤ + W * (2 ^ j * (R / (2 : ℝ) ^ i)) ^ n := by + intro j hj + have he := outward_radius_eq_ancestor hroot (Nat.sub_le i j) + simp only [Nat.sub_sub_self hj] at he + rw [he] + exact hupper (i - j) + have hs := hsbound R hR hR1 i x q hfinite hvolume hcenter hvol hsource f B hB hfb hfzero + have hpos : 0 < μ.real (ball q (R / (2 : ℝ) ^ i)) := + (mul_pos hV (pow_pos (div_pos hR (by positivity)) n)).trans_le hvolume + have hl := hlbound R hR hR1 i x q hfinite hpos hcenter hupper hsource f B hB hfb hfzero + have hf : f =ᵐ[μ] fun z => χ z * localGamma μ hQ (U v) (U v) z := by + filter_upwards [G.cutoffEnergy_coe μ hQ χ hχΩ c hc, localGamma_self μ hQ (U v)] with z hz hΓ + simpa only [f, hΓ] using hz + have he (k : X → ℝ) : (∫ z, k z * (χ z * localGamma μ hQ (U v) (U v) z) ∂μ) = + ∫ z, k z * f z ∂μ := by + apply integral_congr_ae + filter_upwards [hf] with z hz + rw [hz] + simp_rw [he] + have hr : 0 < R / (2 : ℝ) ^ i := div_pos hR (by positivity) + have hcross₀ : 0 ≤ C₀ * B * ((R / (2 : ℝ) ^ i) * R) := by positivity + have hcross₁ : 0 ≤ C₁ * B * (R / (2 : ℝ) ^ i) ^ 2 := by positivity + change _ ≤ (C₀ + C₁) * B * ((R / (2 : ℝ) ^ i) ^ 2 + (R / (2 : ℝ) ^ i) * R) + nlinarith only [hs, hl, hcross₀, hcross₁] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicEndpointBound.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicEndpointBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ee41e30f302cb33c5ac407eec4689652dd3157e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicEndpointBound.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.LongBoundedSource +import OAI.Geometry.RCD.Sobolev.CutoffEnergyBound +import OAI.Geometry.RCD.Harmonic.AveragedLpPairing + +namespace OAI + +/-! # The terminal heat value in the actual Gram comparison -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +include hk in +/-- At the fixed terminal time R², the genuine bounded cutoff energy +acquires the averaging displacement ratio r/R. -/ +theorem exists_harmonic_endpoint_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) + (n : ℕ) {A V W : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) : + ∃ C : ℝ, 0 < C ∧ ∀ (R r : ℝ) (x q : X), + 0 < R → R ≤ 1 → 0 < r → r ≤ R / 2 → + μ (ball q r) ≠ ∞ → 0 < μ.real (ball q r) → dist x q ≤ A * r → + μ.real (ball x R) ≤ W * R ^ n → + (∀ z ∈ ball x R, V * R ^ n ≤ μ.real (ball z R)) → + ∀ (U : E →L[ℝ] SobolevSpace μ hQ) (M : PositiveBilinearMeasure X E) + (κ : ℝ) (p : X) (s : ℝ) (L : ℝ≥0) (v : E) + (G : LocalHarmonicEnergy μ hQ U M κ p s L v) (χ : X →ᵇ ℝ), + (∀ z, 0 ≤ χ z ∧ χ z ≤ 1) → tsupport (χ : X → ℝ) ⊆ ball p (2 * s) → + (∀ z ∉ ball x R, χ z = 0) → ∀ (c : SobolevSpace μ hQ), + SobolevSpace.toLp μ hQ c =ᵐ[μ] χ → + |(μ.real (ball q r))⁻¹ * (∫ y in ball q r, + heatAt μ hQ (R ^ 2) (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c)) y ∂μ) - + kernelHeat μ hQ hk (R ^ 2) (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c)) x| ≤ + C * ((L : ℝ) ^ 2 * ‖v‖ ^ 2) * (r / R) := by + obtain ⟨C, hC, hb⟩ := exists_long_bounded_source_bound μ hQ hk hg hdiff n hA hV hW + refine ⟨C, hC, ?_⟩ + intro R r x q hR hR1 hr hrR hfinite hvol hcenter hupper hsource U M κ p s L v G χ hχ hχΩ hzero c hc + let f := SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c) + have ht := sq_pos_of_pos hR + have hupper' : ∀ j ≤ 0, μ.real (ball x ((2 : ℝ) ^ j * (R / (2 : ℝ) ^ 0))) ≤ + W * ((2 : ℝ) ^ j * (R / (2 : ℝ) ^ 0)) ^ n := by + intro j hj + have : j = 0 := Nat.eq_zero_of_le_zero hj + simpa only [this, pow_zero, div_one, one_mul] using hupper + have hsqrt : Real.sqrt (R ^ 2) = R := Real.sqrt_sq hR.le + have he := hb R hR hR1 0 r x q hr (by simpa using hrR) hfinite hvol hcenter hupper' + (R ^ 2) ht (by simp only [pow_zero, div_one, mem_Icc]; constructor <;> nlinarith [sq_nonneg R]) + (by simpa only [hsqrt] using hsource) f ((L : ℝ) ^ 2 * ‖v‖ ^ 2) (by positivity) + (G.cutoffEnergy_bound μ hQ χ hχ c hc) (G.cutoffEnergy_zero_off μ hQ χ c hc hzero) + have hid := kernelAverage_difference_integral_lp μ hQ hk ht + (ball q r) measurableSet_ball hfinite x f + have havg := kernelAverage_integral_lp_eq_average μ hQ hk ht + (ball q r) measurableSet_ball hfinite f + rw [hid, ← kernelAverage_integral_lp μ hQ hk ht (ball q r) measurableSet_ball hfinite f, havg] at he + simpa only [pow_zero, div_one, f] using he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicGramSourceComparison.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicGramSourceComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..3829af639ef3f9bfe0d30adef3db069763c1af0c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicGramSourceComparison.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Heat.SourceComparisonIdentity +import OAI.Geometry.RCD.Heat.HarmonicBochnerHeat + +namespace OAI + +/-! # Exact source formula for the actual mean and heat Gram forms -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal BoundedContinuousFunction ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + {U : E →L[ℝ] SobolevSpace μ hQ} {M : PositiveBilinearMeasure X E} + {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} {v : E} + +/-- Applying the genuine compact-source identity to the actual cutoff +energy gives the mean-minus-heat formula, including its scalar regularizer. -/ +theorem LocalHarmonicEnergy.mean_sub_heat_source + (G : LocalHarmonicEnergy μ hQ U M κ p r L v) + (χ : X →ᵇ ℝ) (hχs : HasCompactSupport (χ : X → ℝ)) + (hχΩ : tsupport (χ : X → ℝ) ⊆ ball p (2 * r)) + (c : SobolevSpace μ hQ) (hc : SobolevSpace.toLp μ hQ c =ᵐ[μ] χ) + (q : Lp ℝ 2 μ) (hq : IsWeakLaplacian μ hQ c q) + (a : X) {R : ℝ} (hR : 0 < R) + (hχR : ∀ z ∉ closedBall a R, χ z = 0) + (hqR : ∀ᵐ z ∂μ, z ∉ closedBall a R → q z = 0) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (hχA : ∀ z ∈ A, χ z = 1) + {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) (x : X) (lambda : ℝ) : + ⟪v, (sobolevMeanGram μ hQ U A hA - + cutoffHeatGram μ hQ hk χ.continuous hχs U hs x lambda) v⟫_ℝ = + ((μ.real A)⁻¹ * (∫ z in A, + heatAt μ hQ t (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c)) z ∂μ) - + kernelHeat μ hQ hk t (SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c)) x) - + lambda * s * ‖v‖ ^ 2 - + (∫ τ in 0..s, (∫ᵛ z, kernelAverage μ ker τ A z ∂<•(G.cutoffSource μ hQ χ c q))) - + (∫ τ in s..t, ((∫ᵛ z, kernelAverage μ ker τ A z ∂<•(G.cutoffSource μ hQ χ c q)) - + (∫ᵛ z, ker τ x z ∂<•(G.cutoffSource μ hQ χ c q)))) := by + have hfs := cutoffProduct_zero_off μ hQ G.energy c χ hc _ G.bounded hχR + have hνs := cutoffMeasureSource_variation_compl μ hQ G.energy c q + (harmonicBochnerSource μ hQ U M κ v) χ hc measurableSet_closedBall hχR hqR + have hzero : ∀ᵐ z ∂μ, R < dist a z → + SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c) z = 0 := by + filter_upwards [hfs] with z hz hd + exact hz (by simpa only [mem_closedBall, dist_comm, not_le] using hd) + have he := (G.cutoffEnergy_laplacian μ hQ χ hχs hχΩ c hc q hq).average_initial_sub_point_heat_difference μ hQ hk a hR hzero hνs A hA hAt hs hst x + have hmean : (μ.real A)⁻¹ * (∫ z in A, + SobolevSpace.toLp μ hQ (G.cutoffEnergy μ hQ χ c) z ∂μ) = + ⟪v, sobolevMeanGram μ hQ U A hA v⟫_ℝ := by + rw [sobolevMeanGram_energy] + congr 1 + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (G.cutoffEnergy_coe μ hQ χ hχΩ c hc), + ae_restrict_mem hA] with z hz hAz + rw [hz, hχA z hAz, one_mul] + rw [hmean] at he + rw [sub_apply, inner_sub_right, + cutoffHeatGram_kernel_energy μ hQ hk χ.continuous hχs U v + (G.cutoffEnergy μ hQ χ c) (G.cutoffEnergy_coe μ hQ χ hχΩ c hc)] + linarith only [he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicGrams.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicGrams.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd1d4e1b5542a6ee0796c37e23cfa3c988a572de --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicGrams.lean @@ -0,0 +1,223 @@ +import OAI.Analysis.RCDHeat.ExistingAnalytic +import Mathlib.Analysis.InnerProductSpace.Positive + +namespace OAI + +/-! +# Gram operators of Sobolev coordinate columns + +These operators use the canonical carré du champ of the Cheeger energy. +The change-of-coordinates formula is therefore an identity for the actual +energy, rather than an assumption about an auxiliary matrix field. +-/ + +open Set MeasureTheory +open scoped BigOperators InnerProductSpace NNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Linear combinations of the scalar coordinate functions. -/ +def sobolevColumnMap {n : ℕ} (u : Fin n → SobolevSpace μ hQ) : + Euclidean n →L[ℝ] SobolevSpace μ hQ := + ∑ a, (EuclideanSpace.proj a).smulRight (u a) + +omit [BorelSpace X] [ProperSpace X] in +theorem sobolevColumnMap_apply {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (v : Euclidean n) : sobolevColumnMap μ hQ u v = ∑ a, v a • u a := by + simp [sobolevColumnMap] + +omit [BorelSpace X] [ProperSpace X] in +theorem sobolevColumnMap_single {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (a : Fin n) : + sobolevColumnMap μ hQ u (EuclideanSpace.single a 1) = u a := by + classical + simp [sobolevColumnMap_apply, PiLp.single_apply] + +variable (U : E →L[ℝ] SobolevSpace μ hQ) + {w : X → ℝ} (hw : AEStronglyMeasurable w μ) {C : ℝ≥0} + (hb : ∀ᵐ x ∂μ, ‖w x‖ ≤ (C : ℝ)) + +/-- The weighted mean energy as a continuous symmetric bilinear form. -/ +def sobolevGramForm : E →L[ℝ] E →L[ℝ] ℝ := + (weightedGammaCLM μ hQ hw hb).bilinearComp U U + +omit [CompleteSpace E] in +theorem sobolevGramForm_apply (v z : E) : + sobolevGramForm μ hQ U hw hb v z = + ∫ x, w x * localGamma μ hQ (U v) (U z) x ∂μ := rfl + +/-- Riesz representation of the weighted Sobolev Gram form. -/ +def sobolevGram : E →L[ℝ] E := + InnerProductSpace.continuousLinearMapOfBilin (sobolevGramForm μ hQ U hw hb) + +theorem sobolevGram_inner (v z : E) : + ⟪sobolevGram μ hQ U hw hb v, z⟫_ℝ = + weightedGamma μ hQ w (U v) (U z) := by + exact InnerProductSpace.continuousLinearMapOfBilin_apply _ _ _ + +theorem sobolevGram_energy (v : E) : + ⟪v, sobolevGram μ hQ U hw hb v⟫_ℝ = + ∫ x, w x * (SobolevSpace.minimalSlope μ hQ (U v) x) ^ 2 ∂μ := by + rw [real_inner_comm, sobolevGram_inner, weightedGamma_self] + +theorem sobolevGram_isSymmetric : (sobolevGram μ hQ U hw hb).IsSymmetric := by + intro v z + change ⟪sobolevGram μ hQ U hw hb v, z⟫_ℝ = ⟪v, sobolevGram μ hQ U hw hb z⟫_ℝ + calc + _ = weightedGamma μ hQ w (U v) (U z) := sobolevGram_inner μ hQ U hw hb v z + _ = weightedGamma μ hQ w (U z) (U v) := weightedGamma_comm μ hQ w (U v) (U z) + _ = ⟪sobolevGram μ hQ U hw hb z, v⟫_ℝ := (sobolevGram_inner μ hQ U hw hb z v).symm + _ = _ := real_inner_comm _ _ + +theorem sobolevGram_isPositive (hwpos : ∀ᵐ x ∂μ, 0 ≤ w x) : + (sobolevGram μ hQ U hw hb).IsPositive := by + refine ⟨sobolevGram_isSymmetric μ hQ U hw hb, fun v => ?_⟩ + change 0 ≤ ⟪sobolevGram μ hQ U hw hb v, v⟫_ℝ + rw [sobolevGram_inner, weightedGamma_self] + apply integral_nonneg_of_ae + filter_upwards [hwpos] with x hx + exact mul_nonneg hx (sq_nonneg _) + +/-- Changing the coordinate columns conjugates their actual Gram operator. -/ +theorem sobolevGram_comp (A : E →L[ℝ] E) : + sobolevGram μ hQ (U.comp A) hw hb = + A.adjoint.comp ((sobolevGram μ hQ U hw hb).comp A) := by + apply ContinuousLinearMap.ext + intro v + apply ext_inner_right ℝ + intro z + rw [sobolevGram_inner] + simp only [ContinuousLinearMap.comp_apply] + rw [ContinuousLinearMap.adjoint_inner_left, sobolevGram_inner] + +/-- Pointwise comparison of weights gives comparison of every Gram energy. -/ +theorem sobolevGram_energy_mono {w' : X → ℝ} + (hw' : AEStronglyMeasurable w' μ) {C' : ℝ≥0} + (hb' : ∀ᵐ x ∂μ, ‖w' x‖ ≤ (C' : ℝ)) + (hle : ∀ᵐ x ∂μ, w x ≤ w' x) (v : E) : + ⟪v, sobolevGram μ hQ U hw hb v⟫_ℝ ≤ + ⟪v, sobolevGram μ hQ U hw' hb' v⟫_ℝ := by + rw [sobolevGram_energy, sobolevGram_energy] + have hi := localGamma_memL1 μ hQ (U v) (U v) + have hself := localGamma_self μ hQ (U v) + apply integral_mono_ae + · exact (hi.bdd_mul hw hb).congr (by + filter_upwards [hself] with x hx + rw [hx]) + · exact (hi.bdd_mul hw' hb').congr (by + filter_upwards [hself] with x hx + rw [hx]) + · filter_upwards [hle] with x hx + exact mul_le_mul_of_nonneg_right hx (sq_nonneg _) + +/-- The Gram average on a measurable set, with its actual reference measure. -/ +def sobolevMeanGram (s : Set X) (hs : MeasurableSet s) : E →L[ℝ] E := + (μ.real s)⁻¹ • sobolevGram μ hQ U + (w := s.indicator fun _ => (1 : ℝ)) + ((measurable_const.indicator hs).aestronglyMeasurable) + (C := 1) (Filter.Eventually.of_forall fun x => by + by_cases hx : x ∈ s <;> simp [hx]) + +theorem sobolevMeanGram_energy (s : Set X) (hs : MeasurableSet s) (v : E) : + ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ = + (μ.real s)⁻¹ * ∫ x in s, + (SobolevSpace.minimalSlope μ hQ (U v) x) ^ 2 ∂μ := by + simp only [sobolevMeanGram, smul_apply, inner_smul_right, + sobolevGram_energy] + congr 1 + rw [← integral_indicator hs] + apply integral_congr_ae + exact Filter.Eventually.of_forall fun x => by + by_cases hx : x ∈ s <;> simp [hx] + +theorem sobolevMeanGram_inner (s : Set X) (hs : MeasurableSet s) (v z : E) : + ⟪sobolevMeanGram μ hQ U s hs v, z⟫_ℝ = + (μ.real s)⁻¹ * ∫ x in s, localGamma μ hQ (U v) (U z) x ∂μ := by + simp only [sobolevMeanGram, smul_apply, real_inner_smul_left, + sobolevGram_inner, weightedGamma] + congr 1 + rw [← integral_indicator hs] + apply integral_congr_ae + exact Filter.Eventually.of_forall fun x => by + by_cases hx : x ∈ s <;> simp [hx] + +theorem sobolevMeanGram_column_entry {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : MeasurableSet s) (a b : Fin n) : + ⟪sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs + (EuclideanSpace.single a 1), EuclideanSpace.single b 1⟫_ℝ = + (μ.real s)⁻¹ * ∫ x in s, localGamma μ hQ (u a) (u b) x ∂μ := by + rw [sobolevMeanGram_inner, sobolevColumnMap_single, sobolevColumnMap_single] + +theorem sobolevMeanGram_isPositive (s : Set X) (hs : MeasurableSet s) : + (sobolevMeanGram μ hQ U s hs).IsPositive := by + apply ContinuousLinearMap.IsPositive.smul_of_nonneg + · apply sobolevGram_isPositive + exact Filter.Eventually.of_forall fun x => by + by_cases hx : x ∈ s <;> simp [hx] + · exact inv_nonneg.mpr ENNReal.toReal_nonneg + +theorem sobolevMeanGram_comp (s : Set X) (hs : MeasurableSet s) + (A : E →L[ℝ] E) : + sobolevMeanGram μ hQ (U.comp A) s hs = + A.adjoint.comp ((sobolevMeanGram μ hQ U s hs).comp A) := by + ext v + simp only [sobolevMeanGram, sobolevGram_comp, smul_apply, + ContinuousLinearMap.comp_apply, map_smul] + +end RegularPointCoordinates + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Local harmonicity is tested against the existing zero-boundary Sobolev +space, using the canonical Dirichlet energy. -/ +def IsSobolevHarmonicOn (Ω : Set X) (f : SobolevSpace μ hQ) : Prop := + ∀ φ : SobolevSpace μ hQ, φ ∈ SobolevSpace.dirichlet μ hQ Ω → + energyForm μ hQ f φ = 0 + +omit [BorelSpace X] [ProperSpace X] in +theorem IsSobolevHarmonicOn.add {Ω : Set X} {f g : SobolevSpace μ hQ} + (hf : IsSobolevHarmonicOn μ hQ Ω f) (hg : IsSobolevHarmonicOn μ hQ Ω g) : + IsSobolevHarmonicOn μ hQ Ω (f + g) := by + intro φ hφ + rw [energyForm_add_left, hf φ hφ, hg φ hφ, add_zero] + +omit [BorelSpace X] [ProperSpace X] in +theorem IsSobolevHarmonicOn.smul {Ω : Set X} {f : SobolevSpace μ hQ} + (hf : IsSobolevHarmonicOn μ hQ Ω f) (c : ℝ) : + IsSobolevHarmonicOn μ hQ Ω (c • f) := by + intro φ hφ + rw [energyForm_smul_left, hf φ hφ, mul_zero] + +omit [BorelSpace X] [ProperSpace X] in +theorem IsSobolevHarmonicOn.linearCombination {Ω : Set X} {n : ℕ} + {u : Fin n → SobolevSpace μ hQ} + (hu : ∀ a, IsSobolevHarmonicOn μ hQ Ω (u a)) (v : Euclidean n) : + IsSobolevHarmonicOn μ hQ Ω (sobolevColumnMap μ hQ u v) := by + classical + rw [sobolevColumnMap_apply] + have hs (s : Finset (Fin n)) : + IsSobolevHarmonicOn μ hQ Ω (∑ a ∈ s, v a • u a) := by + induction s using Finset.induction_on with + | empty => + intro φ _ + simp [energyForm] + | @insert a s ha ih => + rw [Finset.sum_insert ha] + exact IsSobolevHarmonicOn.add μ hQ + (IsSobolevHarmonicOn.smul μ hQ (hu a) (v a)) ih + exact hs Finset.univ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorMean.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0fb62e1a6e49f96ba71e04ef8af73ba52c48e00 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorMean.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicMeanConstruction + +namespace OAI + +/-! # Harmonic mean bounds on every strict interior fraction + +The fixed half-ball estimate and nearby-ball volume comparison suffice. +The constants depend only on the curvature bound and interior fraction. +-/ + +open Set Metric Filter MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem harmonic_target_norm_le_of_ball_volume {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {p q : X} {R r D : ℝ} + (hR : 0 < R) (hr : 0 < r) (hD : 0 ≤ D) + (hsub : ball q r ⊆ ball p R) + (hvol : (hausdorff n X).real (ball p R) ≤ D*(hausdorff n X).real (ball q r)) + (w : SobolevSpace (hausdorff n X) hX.quadratic) : + harmonicTargetNorm hX q r w ≤ Real.sqrt D*harmonicTargetNorm hX p R w := by + have hfinR := (hX.finiteOnBounded (ball p R) isBounded_ball).ne + have hfinr := (hX.finiteOnBounded (ball q r) isBounded_ball).ne + have hposR := ENNReal.toReal_pos (hX.fullSupport p R hR).ne' hfinR + have hposr := ENNReal.toReal_pos (hX.fullSupport q r hr).ne' hfinr + have hnormR : (harmonicTargetNorm hX p R w)^2 = + ((hausdorff n X).real (ball p R))⁻¹* + ∫ x in ball p R, (SobolevSpace.toLp (hausdorff n X) hX.quadratic w x)^2 + ∂hausdorff n X := normalized_sobolev_mean_sq _ _ _ hfinR w + have hnormr : (harmonicTargetNorm hX q r w)^2 = + ((hausdorff n X).real (ball q r))⁻¹* + ∫ x in ball q r, (SobolevSpace.toLp (hausdorff n X) hX.quadratic w x)^2 + ∂hausdorff n X := normalized_sobolev_mean_sq _ _ _ hfinr w + have hb := average_nonneg_le_of_subset (hausdorff n X) hsub hposr hposR + (Lp.memLp (SobolevSpace.toLp (hausdorff n X) hX.quadratic w)).integrable_sq.integrableOn + (fun _ => sq_nonneg _) (sq_nonneg (harmonicTargetNorm hX p R w)) hvol hnormR.ge + rw [← hnormr] at hb + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + rwa [mul_pow,Real.sq_sqrt hD] + +theorem harmonic_interior_mean_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (hmean : LocalHarmonicL2MeanValueInput hX) {a τ : ℝ} + (ha : 0≤a) (hτ : 0<τ) (hτ1 : τ<1) : + ∃ C : ℝ, 1≤C ∧ ∀ (p : X) (R : ℝ), 0 ball q.val (δ*R/2) + obtain ⟨s,hs,hcover⟩ := (HereditarilyLindelofSpace.isLindelof (ball p (τ*R))).elim_countable_subcover + U (fun _ => isOpen_ball) (by + intro x hx + exact mem_iUnion.mpr ⟨⟨x,hx⟩,mem_ball_self (by positivity)⟩) + exact ae_restrict_of_ae_restrict_of_subset hcover + ((ae_restrict_biUnion_iff U hs _).mpr (fun q _ => hlocal q)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorRepresentative.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..a01a3b090e637ea28b2cbbd2e411e23938bb3d56 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicInteriorRepresentative.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicInteriorMean +import OAI.Geometry.RCD.Sobolev.InteriorBoundedGradientRepresentative +import OAI.Geometry.RCD.Sobolev.HarmonicGradientInput + +namespace OAI + +/-! # Uniform harmonic representatives on arbitrary strict interior balls -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem harmonic_interior_bounded_representative {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (hmean : LocalHarmonicL2MeanValueInput hX) (hgradient : LocalHarmonicL2GradientInput hX) + {a τ : ℝ} (ha : 0≤a) (hτ : 0<τ) (hτ1 : τ<1) : + ∃ C : ℝ, 1≤C ∧ ∀ (p : X) (R : ℝ), 0 hx (hloc x hdist)) + (hgrad.mono fun x hx hdist => hx (hloc x hdist)) + refine ⟨v,hv.weaken ?_,fun x => (hvM x).trans ?_,hvrep⟩ + · change Real.sqrt (2*(G/R)^2+2*M^2*((σ*R-τ*R)⁻¹)^2)≤(C/R).toNNReal + rw [Real.coe_toNNReal _ (div_nonneg hC0 hR.le)] + apply Real.sqrt_le_iff.mpr + refine ⟨div_nonneg hC0 hR.le,?_⟩ + have hgap : σ*R-τ*R=δ*R := by dsimp only [δ]; ring + rw [hgap] + have hb : 2*G^2+2*(M/δ)^2≤C^2 := by + dsimp only [C] + nlinarith [mul_nonneg hG0 hMd,mul_nonneg hG0 hM0, + mul_nonneg hMd hM0,sq_nonneg G,sq_nonneg (M/δ),sq_nonneg M] + convert div_le_div_of_nonneg_right hb (sq_nonneg R) using 1 <;> ring_nf + · change M≤C + dsimp only [C] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLayerMassBound.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLayerMassBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..dfaa0153eeac0127938db5c0407d6926ff7f94c1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLayerMassBound.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Sobolev.CompactTorsionMassBound +import OAI.Geometry.RCD.Sobolev.InteriorTorsionLayer +import OAI.Geometry.RCD.Metric.EuclideanInteriorSmoothExtension + +namespace OAI + +/-! # Local harmonic square mass from a truncated boundary layer -/ + +open Set Metric Filter MeasureTheory InnerProductSpace Laplacian +open scoped ContDiff Topology +noncomputable section +namespace RegularPointCoordinates + +theorem harmonic_layer_mass_bound {n : ℕ} {R : ℝ} {f : Euclidean n → ℝ} + (hR : 0 ∫ y in closedBall x (R/2+R/(4*2^i)), + (max (SobolevSpace.toLp (hausdorff n X) hX.quadratic u y-(1-(2^i:ℝ)⁻¹)) 0)^2 + ∂hausdorff n X) atTop (𝓝 0) := by + obtain ⟨p,C,hp,hC,hstep⟩ := hX.harmonic_level_step hn + have hp0 : 0 < p := by linarith + let α := 1-2/p + have hα : 0 < α := by + have hh : 2/p < 1 := (div_lt_one hp0).mpr hp + dsimp only [α] + linarith + let C₀ := C*641*(4:ℝ)^α + let b := (4:ℝ)^(1+α) + have hC₀ : 0 < C₀ := by dsimp only [C₀]; positivity + have hb : 0 < b := by dsimp only [b]; positivity + obtain ⟨δ,hδ,hdecay⟩ := exists_superlinear_decay_threshold hC₀ hb hα + refine ⟨δ,hδ,?_⟩ + intro x R hR hcurv u hu hsmall + let μ := hausdorff n X + let V := μ.real (ball x R) + let U := SobolevSpace.toLp μ hX.quadratic u + let J (i : ℕ) := ∫ y in closedBall x (R/2+R/(4*2^i)), + (max (U y-(1-(2^i:ℝ)⁻¹)) 0)^2 ∂μ + let Y (i : ℕ) := J i/V + have hV : 0 < V := ENNReal.toReal_pos (hX.fullSupport x R hR).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hJ (i : ℕ) : 0 ≤ J i := integral_nonneg fun _ => sq_nonneg _ + have hY (i : ℕ) : 0 ≤ Y i := div_nonneg (hJ i) hV.le + have hstart : Y 0 ≤ δ := by + have hJ0 : J 0 ≤ ∫ y in ball x R, (U y)^2 ∂μ := by + have hsub : closedBall x (R/2+R/(4*2^0)) ⊆ ball x R := + closedBall_subset_ball (dyadic_inner_radii hR 0).2.2 + have hfirst : J 0 ≤ ∫ y in closedBall x (R/2+R/(4*2^0)), (U y)^2 ∂μ := by + dsimp only [J] + simp only [pow_zero,inv_one,sub_self,sub_zero] + have hi0 : Integrable (fun y => (max (U y) 0)^2) μ := by + simpa only [Function.comp_apply,upperLevelPart,sub_zero] using + ((upperLevelPart_lipschitz 0).comp_memLp (upperLevelPart_zero (by norm_num)) + (Lp.memLp U)).integrable_sq + apply integral_mono_ae hi0.integrableOn (Lp.memLp U).integrable_sq.integrableOn + exact Eventually.of_forall fun y => by + change (max (U y) 0)^2 ≤ (U y)^2 + by_cases hh : 0 ≤ U y + · rw [max_eq_left hh] + · rw [max_eq_right (le_of_not_ge hh),zero_pow (by decide)] + exact sq_nonneg _ + exact hfirst.trans (setIntegral_mono_set (Lp.memLp U).integrable_sq.integrableOn + (Eventually.of_forall fun y => sq_nonneg _) (Eventually.of_forall hsub)) + exact (div_le_iff₀ hV).mpr (hJ0.trans hsmall) + have hrec (i : ℕ) : Y (i+1) ≤ C₀*b^i*(Y i)^(1+α) := by + have hr := dyadic_inner_radii hR i + have hk := dyadic_level_gap_bounds hR i + have hh := hstep x R hR hcurv u hu + (R/2+R/(4*2^(i+1))) (R/2+R/(4*2^i)) + (1-(2^i:ℝ)⁻¹) (1-(2^(i+1):ℝ)⁻¹) hr.1 hr.2.1 hr.2.2 hk.1 hk.2.1 + change J (i+1) ≤ C*V^(2/p-1)* + (10*R^2*(((R/2+R/(4*2^i))-(R/2+R/(4*2^(i+1))))⁻¹)^2+1)* + J i*(J i/((1-(2^(i+1):ℝ)⁻¹)-(1-(2^i:ℝ)⁻¹))^2)^(1-2/p) at hh + have hgap : J i/((1-(2^(i+1):ℝ)⁻¹)-(1-(2^i:ℝ)⁻¹))^2 = (4*4^i)*J i := by + rw [div_eq_mul_inv,← inv_pow,hk.2.2.1] + ring + have hexp : 2/p-1 = -α := by dsimp only [α]; ring + rw [hgap,hexp] at hh + have hbnd : J (i+1) ≤ C*V^(-α)*(641*4^i)*J i*((4*4^i)*J i)^α := by + apply hh.trans + gcongr + exact hk.2.2.2 + have hnorm := div_le_div_of_nonneg_right hbnd hV.le + rw [normalized_level_identity hV (hJ i) (by norm_num : (0:ℝ)<4) + (by norm_num : (0:ℝ)<4) hα i] at hnorm + exact hnorm + have hlim := hdecay Y hY hstart hrec + have hJlim := hlim.mul_const V + have heq (i : ℕ) : Y i*V = J i := div_mul_cancel₀ _ hV.ne' + simpa only [heq,zero_mul] using hJlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelMoment.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..6680cf42d0402f680328d61c7809f41714e299b1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelMoment.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Sobolev.LocalizedCutoffNorms +import OAI.Geometry.RCD.Harmonic.UpperLevelCaccioppoli +import OAI.Geometry.RCD.Sobolev.InhomogeneousSobolev + +namespace OAI + +/-! # A superquadratic moment for harmonic upper-level cutoff functions -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Caccioppoli and the relative Sobolev estimate give a moment bound for +the actual cutoff of each harmonic upper-level part. -/ +theorem NoncollapsedRCD.harmonic_level_cutoff_moment {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) : + ∃ p C : ℝ, 2 < p ∧ 0 < C ∧ ∀ (x : X) (R : ℝ), 0 < R → -1 ≤ K*R^2 → + ∀ u : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball x R) u → + ∀ k : ℝ, 0 ≤ k → ∀ (χ : X → ℝ) (L : ℝ≥0), + LipschitzWith L χ → HasCompactSupport χ → + (∀ y, |χ y| ≤ (1:ℝ≥0)) → (∀ y, 0 ≤ χ y) → + tsupport χ ⊆ ball x R → ∀ A : Set X, MeasurableSet A → tsupport χ ⊆ A → + ∃ w : SobolevSpace.dirichlet (hausdorff n X) hX.quadratic (ball x R), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val =ᵐ[hausdorff n X] + fun y => χ y*max (SobolevSpace.toLp (hausdorff n X) hX.quadratic u y-k) 0) ∧ + IntegrableOn (fun y => |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p) + (ball x R) (hausdorff n X) ∧ + (∫ y in ball x R, |SobolevSpace.toLp (hausdorff n X) hX.quadratic w.val y|^p + ∂hausdorff n X)^(2/p) ≤ + C*((hausdorff n X).real (ball x R))^(2/p-1)*(10*R^2*(L:ℝ)^2+1)* + ∫ y in A, (max (SobolevSpace.toLp (hausdorff n X) hX.quadratic u y-k) 0)^2 + ∂hausdorff n X := by + obtain ⟨p,C,hp,hC,hS⟩ := hX.inhomogeneous_dirichlet_sobolev hn + refine ⟨p,C,hp,hC,?_⟩ + intro x R hR hcurv u hu k hk χ L hχ hs hb hχn hΩ A hA hsA + let μ := hausdorff n X + let := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let η := SobolevSpace.ofLipschitzCompact μ hX.quadratic hχ hs + have hη := SobolevSpace.ofLipschitzCompact_coe μ hX.quadratic hχ hs + have hgrad : ∀ᵐ y ∂μ, |SobolevSpace.minimalSlope μ hX.quadratic η y| ≤ L := by + filter_upwards [SobolevSpace.ofLipschitzCompact_minimalSlope_le_lip μ hX.quadratic hχ hs, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hX.quadratic η)] with y hle hnonneg + rwa [abs_of_nonneg hnonneg] + let v := u.upperPositivePart μ hX.quadratic hk + let z := SobolevSpace.cutoffCLM μ hX.quadratic hχ hs hb hχn v + let w : SobolevSpace.dirichlet μ hX.quadratic (ball x R) := + ⟨z,SobolevSpace.cutoffCLM_mem_dirichlet μ hX.quadratic hχ hs hb hχn hΩ v⟩ + let J := ∫ y in A, (SobolevSpace.toLp μ hX.quadratic v y)^2 ∂μ + let I := ∫ y, (SobolevSpace.toLp μ hX.quadratic v y)^2* + (SobolevSpace.minimalSlope μ hX.quadratic η y)^2 ∂μ + have hcacc : (∫ y, (SobolevSpace.toLp μ hX.quadratic η y)^2* + (SobolevSpace.minimalSlope μ hX.quadratic v y)^2 ∂μ) ≤ 4*I := + hu.upper_level_caccioppoli μ hX.quadratic u η hk hχ hs hb hχn hΩ hη hgrad + have hI : I ≤ (L:ℝ)^2*J := + cutoff_gradient_weight_le_setIntegral μ hX.quadratic v η hη hgrad hA hsA + have hE : energyForm μ hX.quadratic w.val w.val ≤ 10*(L:ℝ)^2*J := by + have he := energy_cutoffCLM_le μ hX.quadratic v η hχ hs hb hχn hη hgrad + change energyForm μ hX.quadratic w.val w.val ≤ _ at he + nlinarith only [he,hcacc,hI] + have hN : ‖SobolevSpace.toLp μ hX.quadratic w.val‖^2 ≤ J := by + simpa only [NNReal.coe_one,one_pow,one_mul] using + cutoffCLM_norm_sq_le_setIntegral μ hX.quadratic v hχ hs hb hχn hA hsA + obtain ⟨hi,hbound⟩ := hS x R hR hcurv w + have hv : SobolevSpace.toLp μ hX.quadratic v =ᵐ[μ] + fun y => max (SobolevSpace.toLp μ hX.quadratic u y-k) 0 := + u.upperPositivePart_coe μ hX.quadratic hk + have hJ : J = ∫ y in A, (max (SobolevSpace.toLp μ hX.quadratic u y-k) 0)^2 ∂μ := + integral_congr_ae ((ae_restrict_of_ae hv).mono fun y hy => congrArg (fun t : ℝ => t^2) hy) + refine ⟨w,?_,hi,?_⟩ + · filter_upwards [SobolevSpace.cutoffCLM_coe μ hX.quadratic hχ hs hb hχn v,hv] with y hz hvy + exact hz.trans (by rw [hvy]) + · have henergy : R^2*energyForm μ hX.quadratic w.val w.val+ + ‖SobolevSpace.toLp μ hX.quadratic w.val‖^2 ≤ (10*R^2*(L:ℝ)^2+1)*J := by + have hh := mul_le_mul_of_nonneg_left hE (sq_nonneg R) + nlinarith only [hh,hN] + calc + _ ≤ C*(μ.real (ball x R))^(2/p-1)*((10*R^2*(L:ℝ)^2+1)*J) := + hbound.trans (mul_le_mul_of_nonneg_left henergy (by positivity)) + _ = _ := by rw [hJ]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelStep.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..32e47b4a8167f6ca76a7ca204069798c9dbb8ad6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLevelStep.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLevelMoment +import OAI.Geometry.RCD.Sobolev.LevelSetHolderStep +import OAI.Geometry.RCD.Sobolev.NestedBallCutoff + +namespace OAI + +/-! # One quantitative step of the harmonic level-set iteration -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The same constants work for every nested pair of interior balls and +every pair of nonnegative levels. -/ +theorem NoncollapsedRCD.harmonic_level_step {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) : + ∃ p C : ℝ, 2 < p ∧ 0 < C ∧ ∀ (x : X) (R : ℝ), 0 < R → -1 ≤ K*R^2 → + ∀ u : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball x R) u → + ∀ r s k h : ℝ, 0 ≤ r → r < s → s < R → 0 ≤ k → k < h → + let U := SobolevSpace.toLp (hausdorff n X) hX.quadratic u + let J := ∫ y in closedBall x s, (max (U y-k) 0)^2 ∂hausdorff n X + (∫ y in closedBall x r, (max (U y-h) 0)^2 ∂hausdorff n X) ≤ + C*((hausdorff n X).real (ball x R))^(2/p-1)* + (10*R^2*((s-r)⁻¹)^2+1)*J*(J/(h-k)^2)^(1-2/p) := by + obtain ⟨p,C,hp,hC,hM⟩ := hX.harmonic_level_cutoff_moment hn + refine ⟨p,C,hp,hC,?_⟩ + intro x R hR hcurv u hu r s k h _hr hrs hsR hk hkh + let μ := hausdorff n X + let U := SobolevSpace.toLp μ hX.quadratic u + let J := ∫ y in closedBall x s, (max (U y-k) 0)^2 ∂μ + let χ := nestedBallCutoff x r s + let L : ℝ≥0 := ⟨(s-r)⁻¹,inv_nonneg.mpr (sub_pos.mpr hrs).le⟩ + have hχ : LipschitzWith L χ := nestedBallCutoff_lipschitz x hrs + have hc := nestedBallCutoff_hasCompactSupport x hrs + have hb (y : X) : |χ y| ≤ (1:ℝ≥0) := by + rw [abs_of_nonneg (nestedBallCutoff_bounds x r s y).1] + exact (nestedBallCutoff_bounds x r s y).2 + have hχn (y : X) : 0 ≤ χ y := (nestedBallCutoff_bounds x r s y).1 + have hsupp : tsupport χ ⊆ closedBall x s := nestedBallCutoff_tsupport x hrs + have hsball : closedBall x s ⊆ ball x R := closedBall_subset_ball hsR + obtain ⟨w,hrep,hi,hbound⟩ := hM x R hR hcurv u hu k hk χ L hχ hc hb hχn + (hsupp.trans hsball) (closedBall x s) measurableSet_closedBall hsupp + have hrball : closedBall x r ⊆ ball x R := closedBall_subset_ball (hrs.trans hsR) + have hrrep : SobolevSpace.toLp μ hX.quadratic w.val =ᵐ[μ.restrict (closedBall x r)] + fun y => max (U y-k) 0 := by + filter_upwards [ae_restrict_of_ae hrep,ae_restrict_mem measurableSet_closedBall] with y hy hyr + have hx : dist x y ≤ r := by simpa only [mem_closedBall,dist_comm] using hyr + simpa only [χ,nestedBallCutoff_eq_one x hrs hx,one_mul] using hy + have hh := level_set_holder_step μ measurableSet_ball measurableSet_closedBall hrball + (closedBall_subset_closedBall hrs.le) (hX.finiteOnBounded _ isBounded_ball) + U (SobolevSpace.toLp μ hX.quadratic w.val) hk hkh hp hrrep hi + exact hh.trans (mul_le_mul_of_nonneg_right hbound (by positivity)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearRecovery.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearRecovery.lean new file mode 100644 index 0000000000000000000000000000000000000000..410a8b1f739aba0ee3ee66952996f6ae012be4d2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearRecovery.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicStrongRecovery +import OAI.Geometry.RCD.Sobolev.BoundedHarmonicScaledEnergy +import OAI.Geometry.RCD.Sobolev.CutoffEnergyCoreConvergence + +namespace OAI + +/-! # Strong local recovery for unit linear harmonic limits -/ + +open Set Metric Filter MeasureTheory +open scoped Topology ContDiff NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_linear_recovery {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*r k^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w k)) + {M : ℝ} (hM : 0 r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (5*r (k+N))))⁻¹* + ∫ x in ball (p (k+N)) (4*r (k+N)), + localGamma (hausdorff n X) hX.quadratic (w (k+N)-q k) (w (k+N)-q k) x ∂hausdorff n X) + atTop (𝓝 0) := by + obtain ⟨F,_,_,hd,N,q₀,_,hqg,_,_,hstrong⟩ := hX.bounded_harmonic_strong_recovery hn + (a:=4) (b:=17/4) (R:=9/2) (T:=19/4) + (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) hM + p r ε V hr hcurv hε hε1 hεlim hV w hw hnorm L L.contDiff.contDiffOn + (fun _ _ => ⟨_,L.lipschitzWith.lipschitzOnWith⟩) hconv + let q := fun k => (q₀ k).val + refine ⟨N,q,?_,?_,?_⟩ + · obtain ⟨B,hB,hbound⟩ := hX.bounded_harmonic_scaled_energy_bound hn + (S:=5) (R:=4) (by norm_num) (by norm_num) (by norm_num) hM p r hr hcurv w hw hnorm + exact ⟨B,hB,fun k => ae_restrict_of_ae_restrict_of_subset ball_subset_closedBall (hbound (k+N))⟩ + · intro δ hδ + filter_upwards [hqg 4 (by norm_num) (by norm_num) δ hδ, + (hεlim.comp (tendsto_add_atTop_nat N)).eventually + (eventually_lt_nhds (by norm_num : (0:ℝ)<3/8))] with k hkg hεk + filter_upwards [hkg,self_mem_ae_restrict measurableSet_ball, + ae_restrict_of_ae (localGamma_self (hausdorff n X) hX.quadratic (q k)), + ae_restrict_of_ae ((Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg + (hausdorff n X) hX.quadratic (q k)))] with x hxg hxb hself hnonneg + have hrad := (abs_le.mp (pointed_radial_distance (hr (k+N)) (by norm_num : (0:ℝ)≤5) + (hV (k+N)).metric (hxb.le.trans (mul_le_mul_of_nonneg_right (by norm_num : (4:ℝ)≤5) (hr _).le)))).2 + have hdist : dist x (p (k+N))/r (k+N)<4 := (div_lt_iff₀ (hr _)).mpr hxb + have hin : V (k+N) x∈ball (0:Euclidean n) (19/4) := by + simp only [mem_ball,dist_zero_right] + change ε (k+N)<3/8 at hεk + linarith + have hdn : ‖fderiv ℝ F (V (k+N) x)‖≤1 := by + rw [hd hin,L.hasFDerivAt.fderiv] + exact hL + have hb : r (k+N)*SobolevSpace.minimalSlope (hausdorff n X) hX.quadratic (q k) x≤1+δ := + hxg.trans (by change ‖fderiv ℝ F (V (k+N) x)‖+δ≤1+δ; linarith) + have hs := pow_le_pow_left₀ (mul_nonneg (hr _).le hnonneg) hb 2 + simpa only [mul_pow,hself] using hs + · exact cutoff_energy_core_convergence (hausdorff n X) hX.quadratic + (a:=4) (b:=17/4) (R:=9/2) (by norm_num) (by norm_num) + (fun k => p (k+N)) (fun k => r (k+N)) + (fun k => r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (5*r (k+N))))⁻¹) + (fun k => hr (k+N)) (fun _ => by positivity) (fun k => w (k+N)-q k) hstrong + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearSharp.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearSharp.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d498176233073f47cb3e2bc6ef690b429660bfd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearSharp.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLinearRecovery +import OAI.Geometry.RCD.Sobolev.HarmonicEnergyTailSequence +import OAI.Geometry.RCD.Sobolev.ScaledGammaExcess + +namespace OAI + +/-! # Sharp gradients for the actual harmonic sequence with a unit linear limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_linear_sharp {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*r k^2) (hcurv5 : ∀ k, -1≤K*(5*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w k)) + {M : ℝ} (hM : 0 ball (p (k+N)) (4*r (k+N)) + let mass := fun k => μ.real (ball (p (k+N)) (5*r (k+N))) + have : ∀ k, IsFiniteMeasure (μ.restrict (Ω k)) := fun k => + ⟨by simpa only [Measure.restrict_apply_univ] using hX.finiteOnBounded (Ω k) isBounded_ball⟩ + have hm (k : ℕ) : 0 < mass k := ENNReal.toReal_pos + (hX.fullSupport _ _ (mul_pos (by norm_num) (hr (k+N)))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hmass (k : ℕ) : (mass k)⁻¹*μ.real (Ω k)≤1 := by + have hle : μ.real (Ω k)≤ mass k := ENNReal.toReal_mono + (hX.finiteOnBounded _ isBounded_ball).ne + (measure_mono (ball_subset_ball (mul_le_mul_of_nonneg_right (by norm_num : (4:ℝ)≤5) (hr (k+N)).le))) + exact (mul_le_mul_of_nonneg_left hle (inv_nonneg.mpr (hm k).le)).trans_eq (inv_mul_cancel₀ (hm k).ne') + have hstrong' : Tendsto (fun k => (mass k)⁻¹*r (k+N)^2*∫ x in Ω k, + localGamma μ hX.quadratic (w (k+N)-q k) (w (k+N)-q k) x ∂μ) atTop (𝓝 0) := by + convert hstrong using 1 + funext k + dsimp only [mass,Ω,μ] + ring + have htail := scaled_gamma_excess_tendsto μ hX.quadratic Ω (fun k => r (k+N)) + (fun k => (mass k)⁻¹) (fun k => hr (k+N)) (fun k => inv_nonneg.mpr (hm k).le) hmass + (Real.sqrt_nonneg B) (fun k => w (k+N)) q + (Eventually.of_forall (fun k => by simpa only [Real.sq_sqrt hB] using hbound k)) hq hstrong' + have hsharp := hX.harmonic_energy_tail_sequence hn (fun k => p (k+N)) (fun k => r (k+N)) + (fun k => hr (k+N)) (fun k => hcurv5 (k+N)) (fun k => w (k+N)) + (fun k => hw (k+N)) hB hbound htail + intro β hβ + obtain ⟨j,hj⟩ := eventually_atTop.mp (hsharp β hβ) + filter_upwards [eventually_ge_atTop (j+N)] with k hk + have hh := hj (k-N) (by omega) + simpa only [Nat.sub_add_cancel (show N≤k by omega)] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearWeightedDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearWeightedDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..b610ef21c7e2e6dd97706508fafcf60d1c111af4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicLinearWeightedDefect.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLinearSharp +import OAI.Geometry.RCD.Harmonic.WeightedUnitDefect +import OAI.Geometry.RCD.Sobolev.WeightedBallEnergyLiminf +import OAI.Geometry.RCD.Sobolev.PhysicalBallMeasuredTests + +namespace OAI + +/-! # Weighted L1 gradient convergence for unit linear harmonic limits -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_linear_weighted_defect {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + (p : ℕ → X) (r ε : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hcurv : ∀ k, -1≤K*r k^2) (hcurv5 : ∀ k, -1≤K*(5*r k)^2) + (hε : ∀ k, 0≤ε k) (hε1 : ∀ k, ε k≤1) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) 5 (ε k) (V k)) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (5*r k)) (w k)) + {M : ℝ} (hM : 0 ((hausdorff n X).real (ball (p k) (5*r k)))⁻¹* + ∫ x in ball (p k) (5*r k), φ (V k x)* + |r k^2*localGamma (hausdorff n X) hX.quadratic (w k) (w k) x-1| + ∂hausdorff n X) atTop (𝓝 0) := by + let μ := hausdorff n X + let Ω := fun k => ball (p k) (5*r k) + let mass := fun k => μ.real (Ω k) + let f := fun k x => φ (V k x) + let g := fun k x => r k^2*localGamma μ hX.quadratic (w k) (w k) x + have hfinite (k : ℕ) : μ (Ω k)≠⊤ := (hX.finiteOnBounded _ isBounded_ball).ne + have : ∀ k, IsFiniteMeasure (μ.restrict (Ω k)) := fun k => + ⟨by simpa only [Measure.restrict_apply_univ] using hX.finiteOnBounded _ isBounded_ball⟩ + have hm (k : ℕ) : 0 < mass k := ENNReal.toReal_pos + (hX.fullSupport _ _ (mul_pos (by norm_num) (hr k))).ne' (hfinite k) + have hfm (k : ℕ) : AEStronglyMeasurable (f k) μ := + (φ.continuous.measurable.comp (hV k).measurable).aestronglyMeasurable + have hfi (k : ℕ) : IntegrableOn (f k) (Ω k) μ := by + apply (MemLp.of_bound (hfm k).restrict 1 _ : MemLp (f k) 1 (μ.restrict (Ω k))).integrable le_rfl + exact Eventually.of_forall (fun x => by + change ‖φ (V k x)‖≤1 + rw [Real.norm_eq_abs,abs_of_nonneg (hφ _)] + exact hφ1 _) + have hfgi (k : ℕ) : IntegrableOn (fun x => f k x*g k x) (Ω k) μ := + (((localGamma_memL1 μ hX.quadratic (w k) (w k)).const_mul (r k^2)).bdd_mul + (hfm k) (Eventually.of_forall (fun x => φ.norm_coe_le_norm (V k x)))).integrableOn + have hmass (k : ℕ) : (mass k)⁻¹*(∫ x in Ω k, f k x ∂μ)≤1 := by + have hi : (∫ x in Ω k, f k x ∂μ)≤μ.real (Ω k) := by + simpa only [setIntegral_const,smul_eq_mul,mul_one] using + integral_mono_ae (hfi k) (integrableOn_const (hfinite k)) + (Eventually.of_forall (fun x => hφ1 (V k x))) + exact (mul_le_mul_of_nonneg_left hi (inv_nonneg.mpr (hm k).le)).trans_eq (inv_mul_cancel₀ (hm k).ne') + have hmasslim := physical_ball_measured_test_tendsto (by norm_num : (0:ℝ)<5) + (by norm_num : (0:ℝ)<5) le_rfl hr hV hfinite hm hεlim φ + obtain ⟨B,hB,hbound⟩ := hX.bounded_harmonic_scaled_energy_bound hn + (S:=5) (R:=4) (by norm_num) (by norm_num) (by norm_num) hM p r hr hcurv w hw hnorm + have hlower := hX.weighted_energy_eventual_lower_on_ball hn + (S:=5) (ρ:=11/4) (τ:=3) (R:=4) + (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) + p r ε V hr hcurv hε hε1 hεlim hV w L + (fun _ _ => ⟨_,L.lipschitzWith.lipschitzOnWith⟩) hconv φ hφ hs hB (Eventually.of_forall hbound) + have hderiv (z : Euclidean n) : ‖fderiv ℝ L z‖^2=1 := by rw [L.hasFDerivAt.fderiv,hL]; norm_num + simp_rw [hderiv,mul_one] at hlower + have hfull : (∫ z, φ z)=∫ z in ball (0:Euclidean n) 5, φ z := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro z hz + exact Function.notMem_support.mp (fun hh => hz ((ball_subset_ball (by norm_num : (11/4:ℝ)≤5)) (hs hh))) + rw [hfull] at hlower + have hlow : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, + (volume.real (ball (0:Euclidean n) 5))⁻¹*(∫ z in ball 0 5, φ z)-δ≤ + (mass k)⁻¹*∫ x in Ω k, f k x*g k x ∂μ := by + intro δ hδ + filter_upwards [hlower δ hδ] with k hk + convert hk using 1 + dsimp only [mass,Ω,f,g,μ] + simp_rw [mul_left_comm (φ _) (r k^2)] + rw [integral_const_mul] + ring + have hsharp := hX.harmonic_linear_sharp hn p r ε V hr hcurv hcurv5 hε hε1 hεlim hV + w hw hM hnorm L hL.le hconv + have hup : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), + f k x*g k x≤(1+δ)*f k x := by + intro δ hδ + filter_upwards [hsharp δ hδ,hεlim.eventually (eventually_lt_nhds (by norm_num : (0:ℝ)<1/8))] + with k hk he + have hglobal := (ae_restrict_iff' measurableSet_ball).mp hk + filter_upwards [ae_restrict_of_ae hglobal,self_mem_ae_restrict measurableSet_ball] with x hx hxb + by_cases hxin : x∈ball (p k) (3*r k) + · exact (mul_le_mul_of_nonneg_left (hx hxin) (hφ _)).trans_eq (mul_comm _ _) + · have hd : 3≤dist x (p k)/r k := (le_div_iff₀ (hr k)).mpr (by + have hh : 3*r k≤dist x (p k) := le_of_not_gt hxin + linarith) + have hrad := (abs_le.mp (pointed_radial_distance (hr k) (by norm_num : (0:ℝ)≤5) + (hV k).metric hxb.le)).1 + have hz : φ (V k x)=0 := Function.notMem_support.mp (by + intro hz + have ht := hs hz + simp only [mem_ball,dist_zero_right] at ht + linarith) + simp [f,hz] + exact weighted_unit_defect_tendsto μ Ω (fun k => (mass k)⁻¹) + (fun k => inv_nonneg.mpr (hm k).le) f g hfi hfgi + (fun _ => Eventually.of_forall (fun _ => hφ _)) hmass hmasslim hlow hup + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanConstruction.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8fd2dbc16f1ff969b27856703962031ca6784e1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanConstruction.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicUnitMean +import OAI.Geometry.RCD.Metric.RescaledBallVolume +import OAI.Geometry.RCD.Harmonic.HarmonicMeanValueInput +import OAI.Geometry.RCD.Harmonic.FirstOrderLocalization +import Mathlib.Topology.Compactness.Lindelof + +namespace OAI + +/-! # The published harmonic mean-value input from RCD calculus + +The local level-set iteration proves Jiang's half-ball L² estimate at unit +rescaled curvature. A fixed-radius interior cover and the CD ball-volume +comparison give the stated estimate for every bounded curvature parameter. +-/ + +open Set Metric Filter MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +private theorem small_radius_curvature {K R a s : ℝ} + (ha : 0 ≤ a) (hs : 0 ≤ s) (hsa : s ≤ 1/(a+1)) + (h : -a ≤ K*R^2) : -1 ≤ K*(s*R)^2 := by + have hs1 : s ≤ 1 := hsa.trans ((div_le_one (by linarith)).mpr (by linarith)) + have hs2 : s^2 ≤ s := by nlinarith + have hsa' : s*(a+1) ≤ 1 := (le_div_iff₀ (by linarith)).mp hsa + have has2 : a*s^2 ≤ 1 := by nlinarith + calc + -1 ≤ -a*s^2 := by linarith + _ ≤ (K*R^2)*s^2 := mul_le_mul_of_nonneg_right h (sq_nonneg s) + _ = _ := by ring + +omit [ProperSpace X] in +private theorem target_norm_le_of_ball_volume {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {p q : X} {R r D : ℝ} + (hR : 0 < R) (hr : 0 < r) (hD : 0 ≤ D) + (hsub : ball q r ⊆ ball p R) + (hvol : (hausdorff n X).real (ball p R) ≤ D*(hausdorff n X).real (ball q r)) + (w : SobolevSpace (hausdorff n X) hX.quadratic) : + harmonicTargetNorm hX q r w ≤ Real.sqrt D*harmonicTargetNorm hX p R w := by + have hfinR := (hX.finiteOnBounded (ball p R) isBounded_ball).ne + have hfinr := (hX.finiteOnBounded (ball q r) isBounded_ball).ne + have hposR := ENNReal.toReal_pos (hX.fullSupport p R hR).ne' hfinR + have hposr := ENNReal.toReal_pos (hX.fullSupport q r hr).ne' hfinr + have hnormR : (harmonicTargetNorm hX p R w)^2 = + ((hausdorff n X).real (ball p R))⁻¹* + ∫ x in ball p R, (SobolevSpace.toLp (hausdorff n X) hX.quadratic w x)^2 + ∂hausdorff n X := normalized_sobolev_mean_sq _ _ _ hfinR w + have hnormr : (harmonicTargetNorm hX q r w)^2 = + ((hausdorff n X).real (ball q r))⁻¹* + ∫ x in ball q r, (SobolevSpace.toLp (hausdorff n X) hX.quadratic w x)^2 + ∂hausdorff n X := normalized_sobolev_mean_sq _ _ _ hfinr w + have hb := average_nonneg_le_of_subset (hausdorff n X) hsub hposr hposR + (Lp.memLp (SobolevSpace.toLp (hausdorff n X) hX.quadratic w)).integrable_sq.integrableOn + (fun _ => sq_nonneg _) (sq_nonneg (harmonicTargetNorm hX p R w)) hvol hnormR.ge + rw [← hnormr] at hb + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp + rwa [mul_pow,Real.sq_sqrt hD] + +/-- The precise half-ball harmonic L²-to-L∞ input is a theorem of the +retained RCD structure, with no mean-value or gradient assumption. -/ +theorem NoncollapsedRCD.harmonicMeanValueInput {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) : LocalHarmonicL2MeanValueInput hX := by + classical + let := hX.separable + intro hn a ha + obtain ⟨M,hM,hunit⟩ := hX.harmonic_unit_mean_value hn + let δ := min (1/4) (1/(a+1)) + have hδ : 0 < δ := lt_min (by norm_num) (by positivity) + have hδa : δ ≤ 1/(a+1) := min_le_right _ _ + have hδquarter : δ ≤ 1/4 := min_le_left _ _ + have hδ1 : δ ≤ 1 := by linarith + obtain ⟨D,hD,hvolume⟩ := hX.rescaled_ball_volume_factor hn ha hδ hδ1 + let C := 1+M*Real.sqrt D + have hM0 : 0 ≤ M := zero_le_one.trans hM + have hD0 : 0 ≤ D := zero_le_one.trans hD + have hC : 1 ≤ C := le_add_of_nonneg_right (mul_nonneg hM0 (Real.sqrt_nonneg _)) + refine ⟨C,hC,?_⟩ + intro p R hR hcurv u hu + have hδR : 0 < δ*R := mul_pos hδ hR + have hcurvsmall : -1 ≤ K*(δ*R)^2 := small_radius_curvature ha hδ.le hδa hcurv + have hlocal (q : ball p (R/2)) : + ∀ᵐ y ∂(hausdorff n X).restrict (ball q.val (δ*R/2)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic u y| ≤ + C*harmonicTargetNorm hX p R u := by + have hq : dist q.val p < R/2 := q.property + have hqR : dist q.val p ≤ R := by linarith + have hsub : ball q.val (δ*R) ⊆ ball p R := by + apply Metric.ball_subset_ball' + nlinarith + have hnorm := target_norm_le_of_ball_volume hX hR hδR hD0 hsub + (hvolume p R hR hcurv q.val hqR) u + filter_upwards [hunit q.val (δ*R) hδR hcurvsmall u (hu.mono _ _ hsub)] with y hy + have hm := mul_le_mul_of_nonneg_left hnorm hM0 + have hT : 0 ≤ harmonicTargetNorm hX p R u := norm_nonneg _ + exact hy.trans (by dsimp only [C]; nlinarith only [hm,hT]) + let U : ball p (R/2) → Set X := fun q => ball q.val (δ*R/2) + obtain ⟨s,hs,hcover⟩ := (HereditarilyLindelofSpace.isLindelof (ball p (R/2))).elim_countable_subcover + U (fun _ => isOpen_ball) (by + intro x hx + exact mem_iUnion.mpr ⟨⟨x,hx⟩,mem_ball_self (by positivity)⟩) + exact ae_restrict_of_ae_restrict_of_subset hcover + ((ae_restrict_biUnion_iff U hs _).mpr (fun q _ => hlocal q)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanValueInput.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanValueInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1d0c8fc17721fad4f5b2010185307c3760acca8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMeanValueInput.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicAffineImprovement + +namespace OAI + +/-! # The published harmonic mean-value estimate used for affine evaluation + +Jiang, *Cheeger-harmonic functions in metric measure spaces revisited*, +JFA 266 (2014), Lemma 4.1 (printed pp.14–15), with lambda=0 and exponent 2. +Only the half-ball L-infinity consequence under bounded rescaled curvature +is retained. Full support and continuity give pointwise evaluation below. +-/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +/-- The fixed-ratio, harmonic L²-to-L∞ specialization of Jiang Lemma 4.1. -/ +def LocalHarmonicL2MeanValueInput {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) : Prop := + 2 ≤ n → ∀ a : ℝ, 0 ≤ a → ∃ C : ℝ, 1 ≤ C ∧ + ∀ (p : X) (r : ℝ), 0 < r → -a ≤ K * r ^ 2 → + ∀ w : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) w → + ∀ᵐ x ∂(hausdorff n X).restrict (ball p (r / 2)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x| ≤ C * harmonicTargetNorm hX p r w + +/-- The a.e. estimate applies at the center to every continuous representative. -/ +theorem LocalHarmonicL2MeanValueInput.center_bound {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} (hmean : LocalHarmonicL2MeanValueInput hX) + (hn : 2 ≤ n) {a : ℝ} (ha : 0 ≤ a) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (r : ℝ), 0 < r → -a ≤ K * r ^ 2 → + ∀ (w : SobolevSpace (hausdorff n X) hX.quadratic) (v : X → ℝ), + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) w → + ContinuousOn v (ball p r) → + (SobolevSpace.toLp (hausdorff n X) hX.quadratic w =ᵐ[ + (hausdorff n X).restrict (ball p r)] v) → + |v p| ≤ C * harmonicTargetNorm hX p r w := by + let _ := hX.openPos K n + obtain ⟨C, hC, hbound⟩ := hmean hn a ha + refine ⟨C, hC, ?_⟩ + intro p r hr hcurv w v hw hv hrep + have hsub : ball p (r / 2) ⊆ ball p r := ball_subset_ball (by linarith) + have hv' := (hv.mono hsub).abs + have hval : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (r / 2)), + |v x| ≤ C * harmonicTargetNorm hX p r w := by + filter_upwards [hbound p r hr hcurv w hw, + ae_restrict_of_ae_restrict_of_subset hsub hrep] with x hx heq + rwa [heq] at hx + have heq : (fun x => min |v x| (C * harmonicTargetNorm hX p r w)) =ᵐ[ + (hausdorff n X).restrict (ball p (r / 2))] fun x => |v x| := + hval.mono (fun _ hx => min_eq_left hx) + have hp := Measure.eqOn_open_of_ae_eq heq isOpen_ball (hv'.inf continuousOn_const) hv' + (mem_ball_self (by linarith : 0 < r / 2)) + exact min_eq_left_iff.mp hp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicModelCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicModelCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..38bf10b413bf9ad5460b50c54be024c437326596 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicModelCompactness.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Harmonic.CurvatureHarmonicLimit +import OAI.Geometry.RCD.Harmonic.HarmonicValueAffineCompactness + +namespace OAI + +/-! # Actual Euclidean harmonic models under the original curvature-scale bound + +The normalized harmonic model, finite affine moments and smooth value +pairings are constructed without any restriction on the limiting radii. +-/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_model_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 v k x j) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (S*r k)) (w k)) + (hnorm : ∀ k, harmonicTargetNorm hX (p k) (S*r k) (w k)≤1) : + ∃ a : ℕ → ℕ, StrictMono a ∧ ∃ model : EuclideanHarmonicModel n S, + (∀ W + inner ℝ (localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne i) + (localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne j)) + atTop (𝓝 (inner ℝ (model.moments hρS.le i) (model.moments hρS.le j)))) ∧ + ∀ ψ : Euclidean n → ℝ, InteriorSmoothTest n S ψ → + Tendsto (fun k => ((hausdorff n X).real (ball (p (a k)) (S*r (a k))))⁻¹* + ∫ x in ball (p (a k)) (S*r (a k)), ψ (v (a k) x)* + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, ψ z*model.value z)) := by + obtain ⟨a,ha,g,hLp,hnormal,hgm,hgc,hgL,hconv,hmom,htests⟩ := + hX.harmonic_value_affine_compactness hn hS p r ε hr hcurv hε hε1 hεlim u v w hv hrep hw hnorm + have hweak := hX.harmonic_value_limit_weak_of_curvature hn hS (p ∘ a) (r ∘ a) (ε ∘ a) + (fun k => hr (a k)) (fun k => hcurv (a k)) + (fun k => hε (a k)) (fun k => hε1 (a k)) (hεlim.comp ha.tendsto_atTop) + (v ∘ a) (w ∘ a) (fun k => hv (a k)) (fun k => hw (a k)) (fun k => hnorm (a k)) g hgL hconv + let model : EuclideanHarmonicModel n S := + ⟨g,continuous_weak_harmonic hgc hweak,hLp,hnormal⟩ + refine ⟨a,ha,model,hgL,hconv,?_,htests⟩ + intro ρ hρ hρS i j + exact hmom ρ hρ hρS i j + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentCompactnessInput.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentCompactnessInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bc5f366a7a8047a75215de659f7484742b0db11 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentCompactnessInput.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Harmonic.EuclideanHarmonicModel +import OAI.Geometry.RCD.Metric.MeasuredApproximation + +namespace OAI + +/-! # The local harmonic-compactness input, restricted to finite moments + +Ambrosio--Honda (2018), Local spectral convergence in RCD*(K,N) spaces, +Theorem 4.2, Theorem 4.4 and Corollary 4.5, specialized to a Euclidean +measured limit. Strong local L² convergence implies convergence of the +pairings with constants and the bounded coordinate functions. The +hypothesis below retains the local rescaled H¹ bound needed by those +theorems. It asserts neither an affine approximation nor a chart. +-/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Only the normalized moments of one harmonic function and the finite +coordinate family are retained from the published local compactness theorem. +All target functions are genuine Sobolev functions of the original space. -/ +def LocalHarmonicMomentCompactnessInput {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) : Prop := + ∀ S : ℝ, 0 < S → + ∀ (p : ℕ → X) (r ε : ℕ → ℝ), (∀ k, 0 < r k) → + (∀ k, -1 ≤ K * r k ^ 2) → (∀ k, 0 < ε k) → Tendsto ε atTop (𝓝 0) → + ∀ (u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (v : ℕ → X → Euclidean n) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic), + (∀ k, IsMeasuredEuclideanApproximation (hausdorff n X) n (p k) (r k) S (ε k) (v k)) → + (∀ k i, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u k i) =ᵐ[ + (hausdorff n X).restrict (ball (p k) (S * r k))] fun x => v k x i) → + (∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (p k) (S * r k)) (w k)) → + (∀ k, ‖normalizeLocalL2 (hausdorff n X) (ball (p k) (S * r k)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (p k) (S * r k)) (w k))‖ ≤ 1) → + (∀ ρ : ℝ, 0 < ρ → ρ < S → ∃ C : ℝ, 0 ≤ C ∧ ∀ k, + r k ^ 2 * ((hausdorff n X).real (ball (p k) (S * r k)))⁻¹ * + (∫ x in ball (p k) (ρ * r k), localGamma (hausdorff n X) hX.quadratic + (w k) (w k) x ∂hausdorff n X) ≤ C) → + ∃ t : ℕ → ℕ, StrictMono t ∧ ∃ model : EuclideanHarmonicModel n S, + ∀ ρ : ℝ, 0 < ρ → ∀ hρS : ρ < S, ∀ i j, + Tendsto (fun k => + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u (t k)) (w (t k)) + (ball (p (t k)) (ρ * r (t k))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) i, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u (t k)) (w (t k)) + (ball (p (t k)) (ρ * r (t k))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) j⟫_ℝ) atTop + (𝓝 ⟪model.moments hρS.le i, model.moments hρS.le j⟫_ℝ) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentConstruction.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..40e1fef0968f726224c13a8d3f76175c7ac48f39 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicMomentConstruction.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicModelCompactness + +namespace OAI + +/-! # Discharging the published finite harmonic-moment compactness input -/ + +open Set Filter MeasureTheory Metric +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonicMomentCompactnessInput {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) : + LocalHarmonicMomentCompactnessInput hX := by + intro S hS p r ε hr hcurv hε hεlim u v w hv hrep hw hnorm _ + obtain ⟨N,hN⟩ := eventually_atTop.mp (hεlim.eventually (Iio_mem_nhds zero_lt_one)) + obtain ⟨a,ha,model,_,_,hmom,_⟩ := hX.harmonic_model_compactness hn hS + (fun k => p (k+N)) (fun k => r (k+N)) (fun k => ε (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) + (fun k => (hε (k+N)).le) (fun k => (hN (k+N) (Nat.le_add_left N k)).le) + (hεlim.comp (tendsto_add_atTop_nat N)) + (fun k => u (k+N)) (fun k => v (k+N)) (fun k => w (k+N)) + (fun k => hv (k+N)) (fun k j => hrep (k+N) j) + (fun k => hw (k+N)) (fun k => hnorm (k+N)) + refine ⟨fun k => a k+N,fun i j hij => Nat.add_lt_add_right (ha hij) N,model,?_⟩ + intro ρ hρ hρS i j + exact hmom ρ hρ hρS i j + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicOpenBallCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicOpenBallCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..5fe4639b6e0fd0a85357ab79c9039a8c2a4f379e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicOpenBallCompactness.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicCountableCompactness +import OAI.Geometry.RCD.Metric.BallLimitGluing + +namespace OAI + +/-! # One harmonic value limit on the whole open Euclidean ball + +The exhaustion is used only to construct the function. Convergence holds +on every strictly smaller physical ball through the original maps. +Identification of the Euclidean weak equation is a separate step. +-/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem harmonic_open_ball_value_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (hmean : LocalHarmonicL2MeanValueInput hX) (hgradient : LocalHarmonicL2GradientInput hX) + {S : ℝ} (hS : 0 S*(1-1/((m+2:ℕ):ℝ)) + have hT (m : ℕ) : 0 1/((m+2:ℕ):ℝ)) atTop (𝓝 0) := + tendsto_one_div_atTop_nhds_zero_nat.comp (tendsto_add_atTop_nat 2) + simpa only [sub_zero,mul_one] using + ((tendsto_const_nhds : Tendsto (fun _ : ℕ => (1:ℝ)) atTop (𝓝 1)).sub hd).const_mul S + have hcofinal (ρ : ℝ) (hρ : ρ 0)=g := by + funext z + by_cases h : z∈ball (0:Euclidean n) S + · simp only [piecewise_eq_of_mem _ _ _ h] + · have hnorm : S≤‖z‖ := by simpa only [mem_ball,dist_zero_right,not_lt] using h + simp only [piecewise_eq_of_notMem _ _ _ h,hz z hnorm] + rw [← he] + exact hg.measurable_piecewise continuous_const.continuousOn measurableSet_ball + +theorem NoncollapsedRCD.open_ball_harmonic_L2_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 ((hausdorff n X).real (ball (p (a k)) (ρ*r (a k))))⁻¹* + ∫ x in ball (p (a k)) (ρ*r (a k)), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (u (a k)) x-g (v (a k) x))^2 + ∂hausdorff n X) atTop (𝓝 0) := by + obtain ⟨g,a,ha,hgc,hgL,hg0,hconv⟩ := harmonic_open_ball_value_compactness hX hn + hX.harmonicMeanValueInput (hX.harmonicGradientInput hn (p 0)) hS p r ε hr hcurv + hε hε1 hεlim v (fun k => (hv k).metric) u hu hnorm + have hgm := measurable_zero_extension_ball hgc hg0 + refine ⟨g,a,ha,hgm,hgc,hgL,?_⟩ + intro ρ hρ hρS + let μ := hausdorff n X + let ν : ℕ → Measure X := fun k => μ.restrict (ball (p (a k)) (ρ*r (a k))) + let : ∀ k, IsFiniteMeasure (ν k) := fun k => + ⟨by simpa only [ν,Measure.restrict_apply_univ] using (hX.finiteOnBounded + (ball (p (a k)) (ρ*r (a k))) isBounded_ball)⟩ + have hmass (k : ℕ) : 0<(ν k).real univ := by + change 0<(μ.restrict (ball (p (a k)) (ρ*r (a k)))).real univ + rw [Measure.real,Measure.restrict_apply_univ] + exact ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hρ (hr (a k)))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + let F := fun k x => SobolevSpace.toLp μ hX.quadratic (u (a k)) x-g (v (a k) x) + have hFm (k : ℕ) : AEStronglyMeasurable (F k) (ν k) := + ((Lp.aestronglyMeasurable (SobolevSpace.toLp μ hX.quadratic (u (a k)))).sub + (hgm.comp (hv (a k)).measurable).aestronglyMeasurable).mono_measure Measure.restrict_le_self + have hFu : ∀ η : ℝ, 0<η → ∀ᶠ k in atTop, ∀ᵐ x ∂ν k, |F k x|≤η := by + intro η hη + filter_upwards [hconv ρ hρ hρS η hη] with k hk + exact hk.mono fun x hx => hx.le + have hh := normalized_sq_mean_tendsto_zero ν hmass F hFm hFu + simpa only [F,ν,Measure.real,Measure.restrict_apply_univ] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicOperatorEvolution.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicOperatorEvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..7647f442d0e6195a93ba3fcc7357bdf6eb0f1d5b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicOperatorEvolution.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.RCD.Coordinates.UniformPolarizedError +import OAI.Geometry.RCD.Heat.HarmonicBochnerHeatSource + +namespace OAI + +/-! # The full operator-valued harmonic heat equation -/ + +open Set Metric MeasureTheory +open scoped NNReal InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {k : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ k) + {n : ℕ} {U : Euclidean n →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean n)} {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) + +/-- Polarizing the actual scalar Bochner identities yields the full +operator derivative, with the singular mass measure retained. -/ +theorem harmonicHeatGram_hasDerivAt (hρ : 0 < ρ) (hρr : ρ < r) + {t : ℝ} (ht : 0 < t) (x : X) {lambda : ℝ} (hlambda : 0 ≤ lambda) : + HasDerivAt + (fun s => cutoffHeatGramAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U s x lambda) + ((2 : ℝ) • cutoffHeatMass μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M ht x - + (2 * κ) • cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U ht x 0 + + harmonicHeatError μ hQ (k := k) G χ t x + + lambda • ContinuousLinearMap.id ℝ (Euclidean n)) t := by + let Q := fun s => cutoffHeatGramAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U s x lambda + let B := cutoffHeatMass μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M ht x + let A := cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U ht x 0 + let e := fun v => ∫ z, k t x z * + cutoffSourceDensity μ hQ (G v).energy χ.sobolev χ.laplacian z ∂μ + have hQs (s : ℝ) : (Q s).IsSymmetric := by + by_cases hs : 0 < s + · rw [show Q s = cutoffHeatGram μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) U hs x lambda from + cutoffHeatGramAt_of_pos μ hQ hk _ _ U hs x lambda] + exact (cutoffHeatGram_isPositive μ hQ hk _ _ U (fun z => (χ.bounds z).1) hs x hlambda).isSymmetric + · simp only [Q, cutoffHeatGramAt, dite_eq_right hs] + exact ContinuousLinearMap.isPositive_zero.isSymmetric + have hB : B.IsSymmetric := + (cutoffHeatMass_isPositive μ hQ hk _ _ M (fun z => (χ.bounds z).1) ht x).isSymmetric + have hA : A.IsSymmetric := + (cutoffHeatGram_isPositive μ hQ hk _ _ U (fun z => (χ.bounds z).1) ht x le_rfl).isSymmetric + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r) := by + intro z hz + have hd : dist z p ≤ 2 * ρ := χ.tsupport_subset μ hQ hz + exact lt_of_le_of_lt hd (by linarith) + have hχR : ∀ z ∉ closedBall p (2 * ρ), χ.weight z = 0 := by + intro z hz + apply χ.zero z + simpa only [mem_closedBall, dist_comm, not_le] using hz + have hqR : ∀ᵐ z ∂μ, z ∉ closedBall p (2 * ρ) → χ.laplacian z = 0 := by + filter_upwards [χ.laplacian_locality] with z hz hn + apply hz (Or.inr _) + simpa only [mem_closedBall, dist_comm, not_le] using hn + have hd (v : Euclidean n) : HasDerivAt (fun s => ⟪v, Q s v⟫_ℝ) + (2 * ⟪v, B v⟫_ℝ - 2 * κ * ⟪v, A v⟫_ℝ + e v + lambda * ‖v‖ ^ 2) t := + (G v).heatGram_hasDerivAt_mass μ hQ hk χ.weight (χ.hasCompactSupport μ hQ) + hχΩ χ.sobolev χ.representative χ.laplacian χ.weak_laplacian p + (mul_pos (by norm_num) hρ) hχR hqR ht x lambda + have h := hasDerivAt_operator_of_quadratic hQs _ hd + have hid := polarizedDerivative_quadratic_form + (ContinuousLinearMap.id ℝ (Euclidean n)) ContinuousLinearMap.isPositive_id.isSymmetric + simp only [ContinuousLinearMap.id_apply, real_inner_self_eq_norm_sq] at hid + simpa only [polarizedDerivative_add, polarizedDerivative_sub, polarizedDerivative_smul, + polarizedDerivative_quadratic_form B hB, polarizedDerivative_quadratic_form A hA, + hid, Q, B, A, e, harmonicHeatError] using h + +include hk in +/-- The quadratic value of the operator error equals the scalar error +in every direction, not just those used in polarization. -/ +theorem harmonicHeatError_energy (hρ : 0 < ρ) (hρr : ρ < r) + {t : ℝ} (ht : 0 < t) (x : X) (v : Euclidean n) : + ⟪v, harmonicHeatError μ hQ (k := k) G χ t x v⟫_ℝ = + ∫ z, k t x z * cutoffSourceDensity μ hQ (G v).energy χ.sobolev χ.laplacian z ∂μ := by + have h := harmonicHeatGram_hasDerivAt μ hQ hk G χ hρ hρr ht x (lambda := 0) le_rfl + have hv := h.clm_apply (hasDerivAt_const t v) + have hi := (hasDerivAt_const t v).inner ℝ hv + simp only [inner_zero_left, map_zero, add_zero, add_apply, sub_apply, + smul_apply, inner_add_right, inner_sub_right, inner_smul_right, + zero_smul] at hi + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r) := by + intro z hz + have hd : dist z p ≤ 2 * ρ := χ.tsupport_subset μ hQ hz + exact lt_of_le_of_lt hd (by linarith) + have hd := (G v).heatGram_hasDerivAt_mass μ hQ hk χ.weight + (χ.hasCompactSupport μ hQ) hχΩ χ.sobolev χ.representative χ.laplacian + χ.weak_laplacian p (show 0 < 2 * ρ from mul_pos (by norm_num) hρ) + (fun z hz => χ.zero z (by simpa only [mem_closedBall, dist_comm, not_le] using hz)) + (by + filter_upwards [χ.laplacian_locality] with z hz hn + exact hz (Or.inr (by simpa only [mem_closedBall, dist_comm, not_le] using hn))) + ht x 0 + have heq := hi.unique hd + simp only [zero_mul, add_zero] at heq + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicQuadraticPotential.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicQuadraticPotential.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d9f30df6f3a6ccd78e63ecef623556715472aec --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicQuadraticPotential.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Sobolev.MeasureProductEnergy +import OAI.Geometry.RCD.Harmonic.LocalCaccioppoli +import OAI.Geometry.RCD.Sobolev.DirichletPoisson + +namespace OAI + +/-! # The local equation for the square of a harmonic coordinate -/ + +open Set MeasureTheory +open scoped NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- A bounded Sobolev function multiplied by an actual compact Lipschitz +cutoff belongs to the canonical zero-boundary space. -/ +theorem bounded_cutoff_product_mem_dirichlet (Ω : Set X) + (c u : SobolevSpace μ hQ) (C D L : ℝ≥0) + (χ : X → ℝ) (hχ : LipschitzWith L χ) (hcpt : HasCompactSupport χ) + (hbound : ∀ x, |χ x| ≤ C) (hnonneg : ∀ x, 0 ≤ χ x) + (hsupp : tsupport χ ⊆ Ω) (hcrep : SobolevSpace.toLp μ hQ c =ᵐ[μ] χ) + (hu : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x| ≤ D) : + SobolevSpace.product μ hQ c u C D ∈ SobolevSpace.dirichlet μ hQ Ω := by + have hc : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ c x| ≤ C := by + filter_upwards [hcrep] with x hx + rw [hx] + exact hbound x + have he : SobolevSpace.product μ hQ c u C D = + SobolevSpace.cutoffCLM μ hQ hχ hcpt hbound hnonneg u := by + apply Subtype.ext + apply Lp.ext + filter_upwards [SobolevSpace.product_coe μ hQ c u C D hc hu, hcrep, + SobolevSpace.cutoffCLM_coe μ hQ hχ hcpt hbound hnonneg u] with x hp hx ht + exact hp.trans ((congrArg (· * SobolevSpace.toLp μ hQ u x) hx).trans ht.symm) + rw [he] + exact SobolevSpace.cutoffCLM_mem_dirichlet μ hQ hχ hcpt hbound hnonneg hsupp u + +/-- The local distributional Laplacian of half the square of a harmonic +coordinate is its actual energy density. No second-order input is used. -/ +theorem harmonic_half_square_energy {Ω : Set X} (u φ : SobolevSpace μ hQ) + (C D : ℝ≥0) (hu : IsSobolevHarmonicOn μ hQ Ω u) + (hub : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x| ≤ C) + (hφb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ φ x| ≤ D) + (hprod : SobolevSpace.product μ hQ u φ C D ∈ SobolevSpace.dirichlet μ hQ Ω) : + energyForm μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ u C) φ = + -(∫ x, SobolevSpace.toLp μ hQ φ x * localGamma μ hQ u u x ∂μ) := by + have he := energy_product_integration_by_parts μ hQ u u φ C C D hub hub hφb + rw [hu _ hprod] at he + have hsq : SobolevSpace.product μ hQ u u C C = SobolevSpace.square μ hQ u C := by + apply Subtype.ext + apply Lp.ext + filter_upwards [SobolevSpace.product_coe μ hQ u u C C hub hub, + SobolevSpace.square_coe μ hQ u C hub] with x hp hs + change SobolevSpace.toLp μ hQ (SobolevSpace.product μ hQ u u C C) x = + SobolevSpace.toLp μ hQ (SobolevSpace.square μ hQ u C) x + rw [hp, hs, pow_two] + rw [hsq] at he + rw [energyForm_smul_left, he] + ring + +/-- The actual Euclidean quadratic model associated to bounded harmonic +coordinates. Its gradient is used to compare distance gradients. -/ +def coordinateQuadratic {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) : + SobolevSpace μ hQ := ∑ j, (1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C + +theorem coordinateQuadratic_energy {n : ℕ} {Ω : Set X} + (u : Fin n → SobolevSpace μ hQ) (C D : ℝ≥0) (φ : SobolevSpace μ hQ) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j)) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (hφb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ φ x| ≤ D) + (hprod : ∀ j, SobolevSpace.product μ hQ (u j) φ C D ∈ SobolevSpace.dirichlet μ hQ Ω) : + energyForm μ hQ (coordinateQuadratic μ hQ u C) φ = + -(∫ x, SobolevSpace.toLp μ hQ φ x * (∑ j, localGamma μ hQ (u j) (u j) x) ∂μ) := by + have hi (j : Fin n) : Integrable (fun x => + SobolevSpace.toLp μ hQ φ x * localGamma μ hQ (u j) (u j) x) μ := + (localGamma_memL1 μ hQ (u j) (u j)).bdd_mul + (Lp.aestronglyMeasurable (SobolevSpace.toLp μ hQ φ)) + (by simpa only [Real.norm_eq_abs] using hφb) + calc + _ = ∑ j, energyForm μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C) φ := by + rw [energyForm_comm] + change (sobolevEnergyForm μ hQ φ) (∑ j, _) = _ + rw [map_sum] + exact Finset.sum_congr rfl fun j _ => energyForm_comm μ hQ _ _ + _ = ∑ j, -(∫ x, SobolevSpace.toLp μ hQ φ x * localGamma μ hQ (u j) (u j) x ∂μ) := + Finset.sum_congr rfl fun j _ => harmonic_half_square_energy μ hQ (u j) φ C D + (hu j) (hub j) hφb (hprod j) + _ = -(∫ x, ∑ j, SobolevSpace.toLp μ hQ φ x * localGamma μ hQ (u j) (u j) x ∂μ) := by + rw [Finset.sum_neg_distrib, integral_finsetSum _ (fun j _ => hi j)] + _ = _ := by simp only [Finset.mul_sum] + +omit [BorelSpace X] [ProperSpace X] in +theorem coordinateQuadratic_representative {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) : + SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) =ᵐ[μ] + fun x => ∑ j, (1 / 2 : ℝ) * (SobolevSpace.toLp μ hQ (u j) x) ^ 2 := by + have hj (j : Fin n) : SobolevSpace.toLp μ hQ + ((1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C) =ᵐ[μ] + fun x => (1 / 2 : ℝ) * (SobolevSpace.toLp μ hQ (u j) x) ^ 2 := by + filter_upwards [Lp.coeFn_smul (1 / 2 : ℝ) + (SobolevSpace.toLp μ hQ (SobolevSpace.square μ hQ (u j) C)), + SobolevSpace.square_coe μ hQ (u j) C (hub j)] with x hsm hs + change (((1 / 2 : ℝ) • SobolevSpace.toLp μ hQ (SobolevSpace.square μ hQ (u j) C)) x) = _ + simp only [hsm, Pi.smul_apply, smul_eq_mul, hs] + have hall := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun j _ => hj j) + have hsum := Lp.coeFn_finsetSum (Finset.univ : Finset (Fin n)) + (fun j => SobolevSpace.toLp μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ (u j) C)) + unfold coordinateQuadratic + rw [map_sum] + filter_upwards [hsum, hall] with x hx hjx + rw [hx] + simp only [Finset.sum_apply] + exact Finset.sum_congr rfl fun j hj => hjx j hj + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicRadialBound.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicRadialBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..37b78bcccecd80964ffe96eccd03fb7e4ca034cd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicRadialBound.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Sobolev.HarmonicGradientInput +import OAI.Geometry.RCD.Harmonic.RadialDerivativeNorms + +namespace OAI + +/-! # Radial derivatives of harmonic residuals on an interior ball -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published harmonic gradient estimate controls the actual radial +derivative on the inner ball by the outer value norm. No normalization of +the function or division by that norm is used. -/ +theorem LocalHarmonicL2GradientInput.radial_derivative_bound + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (f w : SobolevSpace (hausdorff n X) hX.quadratic) (B : ℝ), 0 ≤ B → + ∀ hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R / 2)), + localGamma (hausdorff n X) hX.quadratic f f x ≤ B ^ 2, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w → + ‖normalizeLocalL2 (hausdorff n X) (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (localRadialDerivative (hausdorff n X) hX.quadratic (ball p (R / 2)) f hf w)‖ ≤ + (B * C / R) * ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) w)‖ := by + obtain ⟨C, hC, hgrad⟩ := hinput hn κ (1 / 2) hκ (by norm_num) (by norm_num) + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv f w B hB hf hw + let μ := hausdorff n X + let hQ := hX.quadratic + let s := ball p (R / 2) + let hfin : μ s ≠ ∞ := ne_of_lt (hX.finiteOnBounded _ isBounded_ball) + let α := ‖normalizeLocalL2 μ (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (SobolevSpace.restrictLp μ hQ (ball p R) w)‖ + have hpos : 0 < μ.real s := ENNReal.toReal_pos + (ne_of_gt (hX.fullSupport p (R / 2) (by linarith))) hfin + let : IsFiniteMeasure (μ.restrict s) := + ⟨by simpa only [Measure.restrict_apply_univ] using hfin.lt_top⟩ + have hg : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ w w x ≤ (C / R) ^ 2 * α ^ 2 := by + have he := normalized_sobolev_mean_sq μ hQ (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) w + simpa only [α, he, one_div_mul_eq_div] using hgrad p R hR hcurv w hw + have hi : (∫ x in s, localGamma μ hQ w w x ∂μ) ≤ (C / R) ^ 2 * α ^ 2 * μ.real s := by + have hh := integral_mono_ae (localGamma_memL1 μ hQ w w).integrableOn + (integrable_const ((C / R) ^ 2 * α ^ 2)) hg + simpa only [integral_const, smul_eq_mul, Measure.real, Measure.restrict_apply_univ, + mul_comm] using hh + have hd := normalized_radial_derivative_norm_sq μ hQ s hfin f w hf + have hb := hd.trans (mul_le_mul_of_nonneg_left hi (by positivity : 0 ≤ B ^ 2 * (μ.real s)⁻¹)) + have halg : B ^ 2 * (μ.real s)⁻¹ * ((C / R) ^ 2 * α ^ 2 * μ.real s) = + ((B * C / R) * α) ^ 2 := by field_simp + rw [halg] at hb + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (div_nonneg (mul_nonneg hB (by linarith)) hR.le) + (norm_nonneg _))).mp hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicRecoveryStrong.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicRecoveryStrong.lean new file mode 100644 index 0000000000000000000000000000000000000000..530a163ce077f239f5a6e1e4a33072d7a4606e25 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicRecoveryStrong.lean @@ -0,0 +1,144 @@ +import OAI.Geometry.RCD.Sobolev.RadialCutoffStrongComparison +import OAI.Geometry.RCD.Harmonic.LocalUniformDifference +import OAI.Geometry.RCD.Sobolev.WeightedBallEnergyLiminf + +namespace OAI + +/-! # Strong local comparison of an actual harmonic sequence and its recovery -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal BoundedContinuousFunction +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_recovery_strong_of_gradient_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S a b R T Q : ℝ} (hS : 0 r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), (euclideanNestedCutoff n hab (V k x))^2* + localGamma (hausdorff n X) hX.quadratic (q k) (q k) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, (euclideanNestedCutoff n hab z)^2*‖fderiv ℝ F z‖^2))) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), (nestedBallCutoff (p k) (a*r k) (b*r k) x)^2* + localGamma (hausdorff n X) hX.quadratic (w k-q k) (w k-q k) x ∂hausdorff n X) + atTop (𝓝 0) := by + let μ := hausdorff n X + let φ : Euclidean n →ᵇ ℝ := (euclideanNestedCutoff n hab)^2 + let ρ := (b+R)/2 + have hbρ : b<ρ := by dsimp only [ρ]; linarith + have hρR : ρ sq_nonneg _ + have hs : Function.support φ⊆ball 0 ρ := by + intro z hz + by_contra hx + have hh : b≤dist (0:Euclidean n) z := by + have : ρ≤dist z 0 := le_of_not_gt hx + rw [dist_comm] at this + exact hbρ.le.trans this + have he := nestedBallCutoff_eq_zero (0:Euclidean n) hab hh + change (euclideanNestedCutoff n hab z)^2≠0 at hz + exact hz (by change (nestedBallCutoff (0:Euclidean n) a b z)^2=0; rw [he]; norm_num) + have hφzero (z : Euclidean n) (hz : z∉ball 0 S) : φ z=0 := + Function.notMem_support.mp (fun h => hz ((ball_subset_ball (hρR.trans (hRT.trans hTS)).le) (hs h))) + have hE : (∫ z, φ z*‖fderiv ℝ g z‖^2)= + ∫ z in ball 0 S, φ z*‖fderiv ℝ F z‖^2 := by + rw [← setIntegral_eq_integral_of_forall_compl_eq_zero (fun z hz => by rw [hφzero z hz,zero_mul])] + apply setIntegral_congr_fun measurableSet_ball + intro z hz + change φ z*‖fderiv ℝ g z‖^2=φ z*‖fderiv ℝ F z‖^2 + by_cases hzφ : φ z=0 + · rw [hzφ,zero_mul,zero_mul] + · have hzρ := hs hzφ + rw [hd ((ball_subset_ball (hρR.trans hRT).le) hzρ)] + have hlow := hX.weighted_energy_eventual_lower_on_ball hn hS hR.le hρR hRT hTS + p r ε V hr hcurv hε hε1 hεlim hV w g hg hconv φ hφ hs hM (Eventually.of_forall hwb) + have hsub (k : ℕ) : ball (p k) (R*r k)⊆closedBall (p k) (T*r k) := + fun x hx => ball_subset_closedBall ((ball_subset_ball (mul_le_mul_of_nonneg_right hRT.le (hr k).le)) hx) + have hwg : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (ball (p k) (R*r k)), + r k^2*localGamma μ hX.quadratic (w k) (w k) x≤(M+1)^2 := by + apply Eventually.of_forall + intro k + filter_upwards [ae_restrict_of_ae_restrict_of_subset (hsub k) (hwb k)] with x hx + nlinarith + have hvalue := hX.local_uniform_difference_l2 hS hRT hTS p r ε V hr hεlim hV w q g F heq + (hconv R hR (hRT.trans hTS)) hqconv + refine hX.radial_cutoff_strong_comparison hS hab hbR (hRT.trans hTS) + (A := 0) (M := M+1) (Q := Q) (by norm_num) (by linarith) p r ε (fun _ => 0) V hr hεlim hV w q + (Eventually.of_forall fun _ => by simp) ?_ hwg + (hqg.mono fun k hk => ae_restrict_of_ae hk) hvalue hq ?_ + · intro k ψ hψ + have hmem := (dirichlet_mono μ hX.quadratic + (ball_subset_ball (mul_le_mul_of_nonneg_right (hRT.trans hTS).le (hr k).le))) hψ + simpa only [zero_div,neg_zero,zero_mul] using hw k ψ hmem + · intro δ hδ + filter_upwards [hlow δ hδ] with k hk + rw [hE] at hk + simpa only [φ,BoundedContinuousFunction.pow_apply,div_eq_mul_inv] using hk + +theorem NoncollapsedRCD.harmonic_recovery_strong {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S a b R T Q : ℝ} (hS : 0 r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), (euclideanNestedCutoff n hab (V k x))^2* + localGamma (hausdorff n X) hX.quadratic (q k) (q k) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, (euclideanNestedCutoff n hab z)^2*‖fderiv ℝ F z‖^2))) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), (nestedBallCutoff (p k) (a*r k) (b*r k) x)^2* + localGamma (hausdorff n X) hX.quadratic (w k-q k) (w k-q k) x ∂hausdorff n X) + atTop (𝓝 0) := by + obtain ⟨M,hM,hwb⟩ := hX.harmonic_scaled_energy_bound hn hS (ha.le.trans (hab.le.trans (hbR.le.trans hRT.le))) hTS + p r hr hcurv w hw hnorm + exact hX.harmonic_recovery_strong_of_gradient_bound hn hS ha hab hbR hRT hTS + p r ε V hr hcurv hε hε1 hεlim hV w q hw hM hwb g F hg heq hd hconv hqconv hqg hq + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicReplacementFamily.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicReplacementFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e846df68195d033ff846ca707378d89c0912d1e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicReplacementFamily.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.RCD.Harmonic.AnnularHarmonicReplacement +import OAI.Geometry.RCD.Metric.MeasuredAnnularMass + +namespace OAI + +/-! # Harmonic replacements on a fixed inner physical ball + +The annular condition is derived from the actual measured maps. The +normalization remains the mass of the larger approximation ball. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_replacement_family {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) {S R L E : ℝ} + (hS : 0 (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) hε + obtain ⟨N,hN⟩ := eventually_atTop.mp (hann.and hub) + obtain ⟨P,hP,hreplace⟩ := hX.annular_harmonic_replacement hn + let C := 2*L+2*P*(R^2*E)+1 + have hC : 0 ring + obtain ⟨w,hwb,hwh,hwe,hwl⟩ := hreplace (p (k+N)) (R*r (k+N)) + (mul_pos hR (hr (k+N))) (hcurv (k+N)) hh.1 (u (k+N)) + ((hausdorff n X).real (ball (p (k+N)) (S*r (k+N)))) L (R^2*E) hh.2.1 huE + refine ⟨w,hwb,hwh,hwe,hwl.trans ?_,?_,hh.2.2⟩ + · apply mul_le_mul_of_nonneg_right _ measureReal_nonneg + dsimp only [C] + linarith + · exact (mul_le_mul_of_nonneg_left hwe (sq_nonneg _)).trans hh.2.2 + choose w hw using hex + exact ⟨C,hC,N,w,hw⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicSmallNorm.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicSmallNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3b80ace1e6066446f0994e33c21031914121709 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicSmallNorm.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLevelDecay + +namespace OAI + +/-! # Small normalized L² mass bounds a harmonic function on the half ball -/ + +open Set Metric Filter MeasureTheory +open scoped NNReal ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Vanishing level energies imply the upper bound on the fixed half ball. -/ +theorem NoncollapsedRCD.harmonic_small_l2_upper_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) : + ∃ δ : ℝ, 0 < δ ∧ ∀ (x : X) (R : ℝ), 0 < R → -1 ≤ K*R^2 → + ∀ u : SobolevSpace (hausdorff n X) hX.quadratic, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball x R) u → + (∫ y in ball x R, (SobolevSpace.toLp (hausdorff n X) hX.quadratic u y)^2 + ∂hausdorff n X) ≤ δ*(hausdorff n X).real (ball x R) → + ∀ᵐ y ∂(hausdorff n X).restrict (ball x (R/2)), + SobolevSpace.toLp (hausdorff n X) hX.quadratic u y ≤ 1 := by + obtain ⟨δ,hδ,hdecay⟩ := hX.harmonic_level_energies_tendsto_zero hn + refine ⟨δ,hδ,?_⟩ + intro x R hR hcurv u hu hsmall + let μ := hausdorff n X + let U := SobolevSpace.toLp μ hX.quadratic u + have hlim := hdecay x R hR hcurv u hu hsmall + have hI : Integrable (fun y => (max (U y-1) 0)^2) μ := + ((upperLevelPart_lipschitz 1).comp_memLp (upperLevelPart_zero zero_le_one) + (Lp.memLp U)).integrable_sq + have hbound (i : ℕ) : (∫ y in ball x (R/2), (max (U y-1) 0)^2 ∂μ) ≤ + ∫ y in closedBall x (R/2+R/(4*2^i)), + (max (U y-(1-(2^i:ℝ)⁻¹)) 0)^2 ∂μ := by + have hk : 0 ≤ 1-(2^i:ℝ)⁻¹ := (dyadic_level_gap_bounds hR i).1 + have hk1 : 1-(2^i:ℝ)⁻¹ ≤ 1 := by + have hh : 0 ≤ (2^i:ℝ)⁻¹ := by positivity + linarith + have hki : Integrable (fun y => (max (U y-(1-(2^i:ℝ)⁻¹)) 0)^2) μ := + ((upperLevelPart_lipschitz _).comp_memLp (upperLevelPart_zero hk) + (Lp.memLp U)).integrable_sq + calc + _ ≤ ∫ y in ball x (R/2), (max (U y-(1-(2^i:ℝ)⁻¹)) 0)^2 ∂μ := by + apply integral_mono_ae hI.integrableOn hki.integrableOn + exact Eventually.of_forall fun y => (sq_le_sq₀ (le_max_right _ _) (le_max_right _ _)).mpr + (max_le_max (by linarith) le_rfl) + _ ≤ _ := setIntegral_mono_set hki.integrableOn + (Eventually.of_forall fun y => sq_nonneg _) + (Eventually.of_forall ((ball_subset_closedBall).trans + (closedBall_subset_closedBall (le_add_of_nonneg_right (by positivity))))) + have hz : (∫ y in ball x (R/2), (max (U y-1) 0)^2 ∂μ) = 0 := + le_antisymm (ge_of_tendsto hlim (Eventually.of_forall hbound)) + (integral_nonneg fun y => sq_nonneg _) + filter_upwards [(integral_eq_zero_iff_of_nonneg (fun y => sq_nonneg _) hI.integrableOn).mp hz] + with y hy + have hh : max (U y-1) 0 = 0 := sq_eq_zero_iff.mp hy + have hle := le_max_left (U y-1) 0 + rw [hh] at hle + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicSourceIntegral.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicSourceIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..406ddfcdd9144cad9c08f648af55d94d5111edad --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicSourceIntegral.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.RCD.Sobolev.CutoffSourcePairing +import OAI.Geometry.RCD.Metric.CompactDensityTimeIntegral + +namespace OAI + +/-! # Integrating all three actual harmonic source components -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +private theorem integral_three_components {a b κ : ℝ} (hab : a ≤ b) + (m c e ν : ℝ → ℝ) + (hm : IntervalIntegrable m volume a b) (hc : IntervalIntegrable c volume a b) + (he : IntervalIntegrable e volume a b) + (hν : ∀ t ∈ Ioc a b, ν t = 2 * m t - 2 * κ * c t + e t) : + (∫ t in a..b, ν t) = + 2 * (∫ t in a..b, m t) - 2 * κ * (∫ t in a..b, c t) + ∫ t in a..b, e t := by + have hid : (∫ t in a..b, ν t) = ∫ t in a..b, (2 * m t - 2 * κ * c t + e t) := by + apply intervalIntegral.integral_congr_ae + exact Eventually.of_forall fun t ht => hν t (by simpa only [uIoc_of_le hab] using ht) + rw [hid, intervalIntegral.integral_add ((hm.const_mul 2).sub (hc.const_mul (2 * κ))) he, + intervalIntegral.integral_sub (hm.const_mul 2) (hc.const_mul (2 * κ)), + intervalIntegral.integral_const_mul, intervalIntegral.integral_const_mul] + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {U : E →L[ℝ] SobolevSpace μ hQ} {M : PositiveBilinearMeasure X E} + {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} {v : E} + (G : LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ C : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ C) + +omit [ProperSpace X] [FiniteDimensional ℝ E] [μ.Regular] [IsLocallyFiniteMeasure μ] in +private theorem curvature_integrable : + Integrable (fun z => χ.weight z * localGamma μ hQ (U v) (U v) z) μ := by + exact (localGamma_memL1 μ hQ (U v) (U v)).bdd_mul + χ.weight.continuous.aestronglyMeasurable (Eventually.of_forall fun z => by + rw [Real.norm_eq_abs, abs_of_nonneg (χ.bounds z).1] + exact (χ.bounds z).2) + +omit [ProperSpace X] [FiniteDimensional ℝ E] [μ.Regular] [IsLocallyFiniteMeasure μ] in +private theorem curvature_zero_off : ∀ᵐ z ∂μ, z ∉ closedBall p (2 * ρ) → + χ.weight z * localGamma μ hQ (U v) (U v) z = 0 := by + filter_upwards with z hz + rw [χ.zero z (by simpa only [mem_closedBall, dist_comm, not_le] using hz), zero_mul] + +include hk in +/-- The short-time full signed source has exactly the three integrals +that have been bounded separately. Each integral is justified in L1. -/ +theorem LocalHarmonicEnergy.integrated_average_source_components + (A : Set X) (hA : MeasurableSet A) (hbounded : Bornology.IsBounded A) + {s : ℝ} (hs : 0 ≤ s) : + (∫ t in (0 : ℝ)..s, (∫ᵛ z, kernelAverage μ ker t A z + ∂<•(G.cutoffSource μ hQ χ.weight χ.sobolev χ.laplacian))) = + 2 * (∫ t in (0 : ℝ)..s, ⟪v, cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded t v⟫_ℝ) - + 2 * κ * (∫ t in (0 : ℝ)..s, ∫ z, kernelAverage μ ker t A z * + (χ.weight z * localGamma μ hQ (U v) (U v) z) ∂μ) + + ∫ t in (0 : ℝ)..s, ∫ z, kernelAverage μ ker t A z * + cutoffSourceDensity μ hQ G.energy χ.sobolev χ.laplacian z ∂μ := by + apply integral_three_components hs + · exact cutoffAverageHeatMassAt_intervalIntegrable_zero μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M χ.bounds A hA hbounded v hs + · exact average_density_intervalIntegrable_zero μ hQ hk A hA hbounded.measure_lt_top.ne + (curvature_integrable μ hQ χ) (isCompact_closedBall p (2 * ρ)) (curvature_zero_off μ hQ χ) hs + · exact average_density_intervalIntegrable_zero μ hQ hk A hA hbounded.measure_lt_top.ne + (cutoffSourceDensity_integrable μ hQ _ _ _) (isCompact_closedBall p (2 * ρ)) + (χ.error_zero_off_outerBall μ hQ G.energy) hs + · intro t ht + exact G.average_source_components μ hQ hk χ ht.1 A hA hbounded + +include hk in +/-- Above the averaging scale, integration preserves the cancellation +between the average and point source in every component. -/ +theorem LocalHarmonicEnergy.integrated_difference_source_components (hρ : 0 < ρ) + (A : Set X) (hA : MeasurableSet A) (hbounded : Bornology.IsBounded A) (x : X) + {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) : + (∫ τ in s..t, + (∫ᵛ z, kernelAverage μ ker τ A z ∂<•(G.cutoffSource μ hQ χ.weight χ.sobolev χ.laplacian)) - + (∫ᵛ z, ker τ x z ∂<•(G.cutoffSource μ hQ χ.weight χ.sobolev χ.laplacian))) = + 2 * (∫ τ in s..t, ⟪v, (cutoffAverageHeatMassAt μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded τ - + cutoffHeatMassAt μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) M τ x) v⟫_ℝ) - + 2 * κ * (∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * + (χ.weight z * localGamma μ hQ (U v) (U v) z) ∂μ) + + ∫ τ in s..t, ∫ z, (kernelAverage μ ker τ A z - ker τ x z) * + cutoffSourceDensity μ hQ G.energy χ.sobolev χ.laplacian z ∂μ := by + apply integral_three_components hst + · exact cutoffAverageHeatMassAt_difference_intervalIntegrable μ hQ hk χ.weight.continuous + (χ.hasCompactSupport μ hQ) M A hA hbounded x v hs hst + · exact difference_density_intervalIntegrable μ hQ hk A hA hbounded x + (curvature_integrable μ hQ χ) (isCompact_closedBall p (2 * ρ)) (curvature_zero_off μ hQ χ) hs hst + · exact difference_density_intervalIntegrable μ hQ hk A hA hbounded x + (cutoffSourceDensity_integrable μ hQ _ _ _) (isCompact_closedBall p (2 * ρ)) + (χ.error_zero_off_outerBall μ hQ G.energy) hs hst + · intro τ hτ + exact G.difference_source_components μ hQ hk χ hρ (hs.trans hτ.1) A hA hbounded x + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicStrongRecovery.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicStrongRecovery.lean new file mode 100644 index 0000000000000000000000000000000000000000..c06d9f8efe2206e389f002965614ff1cd3b78df2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicStrongRecovery.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicRecoveryStrong +import OAI.Geometry.RCD.Harmonic.SmoothHarmonicModelCompactness +import OAI.Geometry.RCD.Metric.EuclideanInteriorSmoothExtension +import OAI.Geometry.RCD.Sobolev.SharpWeightedTestRecovery +import OAI.Geometry.RCD.Sobolev.SmoothRecoveryGradientBound + +namespace OAI + +/-! # Constructed Dirichlet recoveries strongly approximate the harmonic sequence -/ + +open Set Metric Filter MeasureTheory +open scoped Topology NNReal BoundedContinuousFunction ContDiff +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_strong_recovery {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S a b R T : ℝ} (hS : 0 r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (S*r (k+N))))⁻¹* + ∫ x in ball (p (k+N)) (S*r (k+N)), φ (V (k+N) x)*localGamma (hausdorff n X) hX.quadratic + (q k).val (q k).val x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, φ z*‖fderiv ℝ F z‖^2))) ∧ + Tendsto (fun k => r (k+N)^2*((hausdorff n X).real (ball (p (k+N)) (S*r (k+N))))⁻¹* + ∫ x in ball (p (k+N)) (R*r (k+N)), + (nestedBallCutoff (p (k+N)) (a*r (k+N)) (b*r (k+N)) x)^2* + localGamma (hausdorff n X) hX.quadratic (w (k+N)-(q k).val) (w (k+N)-(q k).val) x + ∂hausdorff n X) atTop (𝓝 0) := by + obtain ⟨F,hF,heq,hd⟩ := exists_interior_smooth_extension + (ha.trans (hab.trans (hbR.trans hRT))) hTS hg + obtain ⟨c,hc,hcS,N,q,hqv,hqg,hqz,hqe⟩ := + hX.sharp_weighted_test_recovery hn hS p r ε V hr hcurv hε hε1 hεlim hV hF + obtain ⟨Q,hQ,hQb⟩ := compact_recovery_scaled_gradient_bound (hausdorff n X) hX.quadratic + (hF.1.of_le (by simp)) hF.2.1 (fun k => p (k+N)) (fun k => r (k+N)) + (fun k => hr (k+N)) (fun k => V (k+N)) (fun k => (q k).val) hqz (hqg c hc.le hcS) + refine ⟨F,hF,heq,hd,N,q,hqv,⟨Q,hQ,hQb⟩,hqe,?_⟩ + apply hX.harmonic_recovery_strong hn hS ha hab hbR hRT hTS + (fun k => p (k+N)) (fun k => r (k+N)) (fun k => ε (k+N)) (fun k => V (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) (fun k => hε (k+N)) (fun k => hε1 (k+N)) + (hεlim.comp (tendsto_add_atTop_nat N)) (fun k => hV (k+N)) + (fun k => w (k+N)) (fun k => (q k).val) (fun k => hw (k+N)) (fun k => hnorm (k+N)) + g F hgL heq hd + (fun W hW hWS δ hδ => (tendsto_add_atTop_nat N).eventually (hconv W hW hWS δ hδ)) hqv hQb + let φ : Euclidean n →ᵇ ℝ := (euclideanNestedCutoff n hab)^2 + apply hqe φ (fun z => sq_nonneg _) ?_ + have hs : tsupport φ⊆closedBall (0:Euclidean n) b := by + change closure (Function.support φ)⊆closedBall 0 b + apply closure_minimal _ isClosed_closedBall + intro z hz + by_contra hx + have hz' : b sq_nonneg (U y)) + (Lp.memLp U).integrable_sq.integrableOn).mp hIz + filter_upwards [ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (by linarith : R/2 ≤ R)) hz] with y hy + have hy0 : U y = 0 := sq_eq_zero_iff.mp hy + change |U y| ≤ C*T + rw [hy0,hTz,abs_zero,mul_zero] + have hTp : 0 < T := lt_of_le_of_ne hT (Ne.symm hTz) + let c := Real.sqrt δ/T + have hc : 0 < c := div_pos hsd hTp + have hc2 : c^2 = δ/T^2 := by + dsimp only [c] + rw [div_pow,Real.sq_sqrt hδ.le] + have hscale (a : ℝ) : (∫ y in ball x R, + (SobolevSpace.toLp μ hX.quadratic (a • u) y)^2 ∂μ) = a^2*I := by + have he : SobolevSpace.toLp μ hX.quadratic (a • u) =ᵐ[μ] fun y => a*U y := by + rw [map_smul] + exact Lp.coeFn_smul _ _ + rw [integral_congr_ae ((ae_restrict_of_ae he).mono fun y hy => congrArg (fun t : ℝ => t^2) hy)] + simp_rw [mul_pow] + exact integral_const_mul _ _ + have hsplus : (∫ y in ball x R, + (SobolevSpace.toLp μ hX.quadratic (c • u) y)^2 ∂μ) ≤ δ*V := by + rw [hscale,hc2,hI] + field_simp + norm_num + have hsminus : (∫ y in ball x R, + (SobolevSpace.toLp μ hX.quadratic ((-c) • u) y)^2 ∂μ) ≤ δ*V := by + rw [hscale,neg_sq,hc2,hI] + field_simp + norm_num + have hp := hsmall x R hR hcurv (c • u) (hu.smul μ hX.quadratic c) hsplus + have hm := hsmall x R hR hcurv ((-c) • u) (hu.smul μ hX.quadratic (-c)) hsminus + have hpcoe : SobolevSpace.toLp μ hX.quadratic (c • u) =ᵐ[μ] fun y => c*U y := by + rw [map_smul] + exact Lp.coeFn_smul _ _ + have hmcoe : SobolevSpace.toLp μ hX.quadratic ((-c) • u) =ᵐ[μ] fun y => (-c)*U y := by + rw [map_smul] + exact Lp.coeFn_smul _ _ + have hlarge : 1 ≤ c*(C*T) := by + have he : c*(C*T) = Real.sqrt δ+1 := by + dsimp only [c,C] + field_simp + rw [he] + linarith + filter_upwards [hp,hm,ae_restrict_of_ae hpcoe,ae_restrict_of_ae hmcoe] with y hyp hym hep hem + rw [hep] at hyp + rw [hem] at hym + have habs : c*|U y| ≤ 1 := by + rw [← abs_of_pos hc,← abs_mul] + exact abs_le.mpr ⟨by nlinarith, hyp⟩ + exact (mul_le_mul_iff_right₀ hc).mp (habs.trans hlarge) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HarmonicValueAffineCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/HarmonicValueAffineCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..78a46a93379c43d140c77cb9d4034d2162e5c0f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HarmonicValueAffineCompactness.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Harmonic.AffineMomentConvergence +import OAI.Geometry.RCD.Sobolev.HarmonicValueTestCompactness +import OAI.Geometry.RCD.Coordinates.ValueLimitNormalization + +namespace OAI + +/-! # Actual normalized harmonic value limits and every finite affine moment + +The limit is constructed on the entire open ball from the original RCD +sequence. This theorem does not assert Euclidean harmonicity or convergence +of gradient pairings; those remain the analytic identification step. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology InnerProductSpace NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_value_affine_compactness {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 v k x j) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (S*r k)) (w k)) + (hnorm : ∀ k, harmonicTargetNorm hX (p k) (S*r k) (w k)≤1) : + ∃ (a : ℕ → ℕ), StrictMono a ∧ ∃ (g : Euclidean n → ℝ) + (hLp : MemLp g 2 (volume.restrict (ball 0 S))), + ‖normalizeLocalL2 volume (ball 0 S) measure_ball_ne_top (hLp.toLp g)‖≤1 ∧ + Measurable g ∧ ContinuousOn g (ball 0 S) ∧ + (∀ τ + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne i, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne j⟫_ℝ) + atTop (𝓝 ⟪euclideanValueMoments g hLp hρS.le i, + euclideanValueMoments g hLp hρS.le j⟫_ℝ)) ∧ + ∀ ψ : Euclidean n → ℝ, InteriorSmoothTest n S ψ → + Tendsto (fun k => ((hausdorff n X).real (ball (p (a k)) (S*r (a k))))⁻¹* + ∫ x in ball (p (a k)) (S*r (a k)), ψ (v (a k) x)* + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, ψ z*g z)) := by + obtain ⟨g,a,ha,hgm,hgc,hgL,hconv,htests⟩ := + hX.open_ball_harmonic_test_compactness hn hS p r ε hr hcurv hε hε1 hεlim v hv w hw hnorm + have hconv' : ∀ ρ : ℝ, 0<ρ → ρ hk.mono fun _ hx => hx.le + obtain ⟨hLp,hgNorm⟩ := hX.value_limit_normalized hS (p ∘ a) (r ∘ a) (ε ∘ a) (v ∘ a) + (fun k => hr (a k)) (hεlim.comp ha.tendsto_atTop) (fun k => hv (a k)) + (w ∘ a) (fun k => hnorm (a k)) g hgm hgL hconv' + refine ⟨a,ha,g,hLp,hgNorm,hgm,hgc,hgL,hconv',?_,htests⟩ + exact hX.affine_value_moments_of_limit hS (p ∘ a) (r ∘ a) (ε ∘ a) + (fun k => hr (a k)) (u ∘ a) (v ∘ a) (w ∘ a) (fun k => hv (a k)) + (hεlim.comp ha.tendsto_atTop) (fun k j => hrep (a k) j) g hLp hgL hconv' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HoleDefectCharge.lean b/lean/OAI/Geometry/RCD/Harmonic/HoleDefectCharge.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3fda5ab1a3f1f30aa0df5a6bd0985a616de4f98 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HoleDefectCharge.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.RCD.Metric.NearbySmallBallMass +import OAI.Geometry.RCD.Sobolev.FiniteDisjointIntegral + +namespace OAI + +/-! # Charging a finite disjoint hole family to the actual RCD defect + +Only relative Bishop--Gromov volume is used. The source balls and their +large defect averages are explicit, so no coordinate-surjectivity result +is hidden in this estimate. +-/ + +open Set Metric MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.hole_defect_charge {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {ι : Type*} [Fintype ι] + {p : X} {R t : ℝ} (hR : 0 < R) (ht : 0 < t) (hcurv : -1 ≤ K*(2*R)^2) + {Ω : Set X} {f : X → ℝ} (hf : IntegrableOn f Ω (hausdorff n X)) + (hf0 : ∀ᵐ x ∂(hausdorff n X).restrict Ω, 0 ≤ f x) + {z : ι → X} {r s : ι → ℝ} (hz : ∀ i, dist (z i) p ≤ R) + (hr : ∀ i, 0 < r i) (hrs : ∀ i, r i ≤ s i) (hsR : ∀ i, s i ≤ R) + (hsub : ∀ i, ball (z i) (s i) ⊆ Ω) + (hdisj : Pairwise (fun i j => Disjoint (ball (z i) (s i)) (ball (z j) (s j)))) + (havg : ∀ i, t*(hausdorff n X).real (ball (z i) (s i)) ≤ + ∫ x in ball (z i) (s i), f x ∂hausdorff n X) : + (∑ i, (r i)^n) ≤ + ((Real.cosh 1^(n-1)*2^n)*R^n/(t*(hausdorff n X).real (ball p R)))* + ∫ x in Ω, f x ∂hausdorff n X := by + let μ := hausdorff n X + let A := (Real.cosh 1^(n-1)*2^n)*R^n + have hA : 0 ≤ A := by dsimp only [A]; positivity + have hm : 0 < μ.real (ball p R) := ENNReal.toReal_pos + (hX.fullSupport p R hR).ne' (hX.finiteOnBounded _ isBounded_ball).ne + have hi (i : ι) : (t*μ.real (ball p R))*(r i)^n ≤ + A*(∫ x in ball (z i) (s i), f x ∂μ) := by + have hv : μ.real (ball p R)*(r i)^n ≤ A*μ.real (ball (z i) (s i)) := by + apply (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (hr i).le (hrs i) n) + (measureReal_nonneg)).trans + exact hX.nearby_small_ball_mass hn hR (hz i) ((hr i).trans_le (hrs i)) (hsR i) hcurv + calc + _ = t*(μ.real (ball p R)*(r i)^n) := by ring + _ ≤ t*(A*μ.real (ball (z i) (s i))) := mul_le_mul_of_nonneg_left hv ht.le + _ = A*(t*μ.real (ball (z i) (s i))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (havg i) hA + have hsums : (∑ i, ∫ x in ball (z i) (s i), f x ∂μ) ≤ ∫ x in Ω, f x ∂μ := + finite_disjoint_setIntegral_le μ hf hf0 (fun _ => measurableSet_ball) hsub hdisj + have htot : (∑ i, (r i)^n)*(t*μ.real (ball p R)) ≤ A*∫ x in Ω, f x ∂μ := by + calc + _ = ∑ i, (t*μ.real (ball p R))*(r i)^n := by rw [mul_comm,Finset.mul_sum] + _ ≤ ∑ i, A*(∫ x in ball (z i) (s i), f x ∂μ) := Finset.sum_le_sum (fun i _ => hi i) + _ = A*(∑ i, ∫ x in ball (z i) (s i), f x ∂μ) := (Finset.mul_sum _ _ _).symm + _ ≤ _ := mul_le_mul_of_nonneg_left hsums hA + calc + _ ≤ (A*∫ x in Ω, f x ∂μ)/(t*μ.real (ball p R)) := + (le_div_iff₀ (mul_pos ht hm)).mpr htot + _ = _ := by dsimp only [A]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/HomogeneousAffineImprovement.lean b/lean/OAI/Geometry/RCD/Harmonic/HomogeneousAffineImprovement.lean new file mode 100644 index 0000000000000000000000000000000000000000..c62b794b3feef75c9de33e5a3edc36add66a5472 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/HomogeneousAffineImprovement.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Harmonic.ContinuousAffineImprovement + +namespace OAI + +/-! # Removing the unit-norm restriction in harmonic affine improvement -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + +theorem harmonicTargetNorm_smul (p : X) (r c : ℝ) + (w : SobolevSpace (hausdorff n X) hX.quadratic) : + harmonicTargetNorm hX p r (c • w) = |c| * harmonicTargetNorm hX p r w := by + unfold harmonicTargetNorm + rw [map_smul] + unfold normalizeLocalL2 + rw [smul_comm, norm_smul, Real.norm_eq_abs] + +theorem harmonicAffineResidualNorm_smul + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (p : X) (r c : ℝ) + (w : SobolevSpace (hausdorff n X) hX.quadratic) : + harmonicAffineResidualNorm hX u p r (c • w) = + |c| * harmonicAffineResidualNorm hX u p r w := by + unfold harmonicAffineResidualNorm + rw [map_smul, map_smul] + unfold normalizeLocalL2 + rw [smul_comm, norm_smul, Real.norm_eq_abs] + +/-- Full support makes the averaging factor nonzero on every positive ball. -/ +theorem restrictLp_eq_zero_of_harmonicTargetNorm_eq_zero (p : X) {r : ℝ} (hr : 0 < r) + (w : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : harmonicTargetNorm hX p r w = 0) : + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p r) w = 0 := by + have hvol : 0 < (hausdorff n X).real (ball p r) := + ENNReal.toReal_pos (ne_of_gt (hX.fullSupport p r hr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + have hone : ‖restrictedOne (hausdorff n X) (ball p r) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball))‖ ≠ 0 := by + rw [restrictedOne_norm] + exact ne_of_gt (Real.sqrt_pos.2 hvol) + have hz := norm_eq_zero.mp hw + exact (smul_eq_zero.mp hz).resolve_left (inv_ne_zero hone) + +/-- A zero target on the outer ball has zero affine residual on any inner ball. -/ +theorem harmonicAffineResidualNorm_eq_zero_on_smaller + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (p : X) {r t : ℝ} + (hr : 0 < r) (htr : t ≤ r) (w : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : harmonicTargetNorm hX p r w = 0) : + harmonicAffineResidualNorm hX u p t w = 0 := by + have hz := restrictLp_eq_zero_of_harmonicTargetNorm_eq_zero hX p hr w hw + have hreps := (SobolevSpace.restrictLp_eq_zero_iff (hausdorff n X) hX.quadratic + (ball p r) w).mp hz + have hzt := (SobolevSpace.restrictLp_eq_zero_iff (hausdorff n X) hX.quadratic + (ball p t) w).mpr (ae_restrict_of_ae_restrict_of_subset (ball_subset_ball htr) hreps) + simp only [harmonicAffineResidualNorm, hzt, map_zero, normalizeLocalL2, smul_zero, norm_zero] + +/-- The unit-norm estimate implies the full homogeneous estimate, including +the zero-norm case. -/ +theorem HasNormalizedAffineImprovement.homogeneous + {u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic} {p : X} {r θ : ℝ} + (hfit : HasNormalizedAffineImprovement hX u p r θ) (hr : 0 < r) (hθ : θ ≤ 1) + (w : SobolevSpace (hausdorff n X) hX.quadratic) + (hw : IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p r) w) : + harmonicAffineResidualNorm hX u p (θ * r) w ≤ + (1 / 2 : ℝ) * θ * Real.sqrt θ * harmonicTargetNorm hX p r w := by + by_cases hz : harmonicTargetNorm hX p r w = 0 + · rw [harmonicAffineResidualNorm_eq_zero_on_smaller hX u p hr + (mul_le_of_le_one_left hr.le hθ) w hz, hz, mul_zero] + have ht : 0 < harmonicTargetNorm hX p r w := + lt_of_le_of_ne (norm_nonneg _) (Ne.symm hz) + have hn : harmonicTargetNorm hX p r ((harmonicTargetNorm hX p r w)⁻¹ • w) ≤ 1 := by + rw [harmonicTargetNorm_smul, abs_of_pos (inv_pos.2 ht), inv_mul_cancel₀ hz] + have hh := hfit ((harmonicTargetNorm hX p r w)⁻¹ • w) + (hw.smul (hausdorff n X) hX.quadratic _) hn + change harmonicAffineResidualNorm hX u p (θ * r) + ((harmonicTargetNorm hX p r w)⁻¹ • w) < _ at hh + rw [harmonicAffineResidualNorm_smul, abs_of_pos (inv_pos.2 ht)] at hh + have hh' := mul_lt_mul_of_pos_left hh ht + rw [← mul_assoc, mul_inv_cancel₀ hz, one_mul] at hh' + exact hh'.le.trans_eq (mul_comm _ _) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..760f5269a5023b27e5b802718b1538407dedf5dd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicLimit.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Metric.InnerMeasuredSubsequence +import OAI.Geometry.RCD.Harmonic.InnerHarmonicNormBound +import OAI.Geometry.RCD.Harmonic.BoundedHarmonicCompactness + +namespace OAI + +/-! # A classical limit for the actual inner-ball harmonic candidates + +Both the measured maps and the normalizing bound on the smaller ball are +derived from the original outer approximation and global L2 bound. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology ContDiff NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.inner_harmonic_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S R C : ℝ} (hS : 0 1/((k+1:ℕ):ℝ) + have hη (k : ℕ) : 0<η k := by dsimp only [η]; positivity + have hη1 (k : ℕ) : η k≤1 := by + apply (div_le_one (by positivity : (0:ℝ)<((k+1:ℕ):ℝ))).mpr + exact_mod_cast (Nat.succ_le_succ (Nat.zero_le k)) + have hηlim : Tendsto η atTop (𝓝 0) := + tendsto_one_div_atTop_nhds_zero_nat.comp (tendsto_add_atTop_nat 1) + obtain ⟨a,ha,hVa⟩ := inner_measured_subsequence hS hR hRS hr hε hV + (fun k => (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) hεlim hη + obtain ⟨M,hM,hMb⟩ := hX.inner_harmonic_norm_bound hS hR hRS hC p r ε V hr hV hεlim w hbound + obtain ⟨N,hN⟩ := eventually_atTop.mp (ha.tendsto_atTop.eventually hMb) + let b : ℕ → ℕ := fun k => a (k+N) + have hb : StrictMono b := ha.comp (fun _ _ h => Nat.add_lt_add_right h N) + obtain ⟨c,hc,g,hgm,hgc,hgw,hgs,hgL,hconv⟩ := hX.bounded_harmonic_compactness hn hR hM + (p∘b) (r∘b) (fun k => η (k+N)) (V∘b) + (fun k => hr (b k)) (fun k => hcurv (b k)) (fun k => (hη (k+N)).le) + (fun k => hη1 (k+N)) (hηlim.comp (tendsto_add_atTop_nat N)) + (fun k => hVa (k+N)) (w∘b) (fun k => hw (b k)) + (fun k => hN (k+N) (Nat.le_add_left N k)) + exact ⟨b∘c,hb.comp hc,g,hgm,hgc,hgw,hgs,hgL,hconv⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicNormBound.lean b/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicNormBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..618ca8c810cd4df1c3e941a02bfc32d43a26d337 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/InnerHarmonicNormBound.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Metric.MeasuredAnnularMass +import OAI.Geometry.RCD.Harmonic.HarmonicAffineImprovement +import OAI.Geometry.RCD.Sobolev.DirichletPoincare + +namespace OAI + +/-! # Changing the normalization of actual harmonic candidates -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +theorem NoncollapsedRCD.inner_harmonic_norm_bound {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S R C : ℝ} + (hS : 0 (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) hε + refine ⟨Real.sqrt (2*C/b),Real.sqrt_pos.mpr (by positivity),?_⟩ + filter_upwards [hmass.eventually (Ioi_mem_nhds (show b/2 sq_nonneg _) + have hsq := normalized_sobolev_mean_sq μ hX.quadratic (ball (p k) (R*r k)) + (hX.finiteOnBounded _ isBounded_ball).ne (w k) + change harmonicTargetNorm hX (p k) (R*r k) (w k)^2=_ at hsq + have hi : (∫ x in ball (p k) (R*r k), + (SobolevSpace.toLp μ hX.quadratic (w k) x)^2 ∂μ)≤ + (2*C/b)*μ.real (ball (p k) (R*r k)) := by + have hh := mul_le_mul_of_nonneg_left hratio hC.le + have hu := hint.trans (hw k) + calc _ ≤ C*μ.real (ball (p k) (S*r k)) := hu + _ ≤ _ := by convert hh using 1; ring + apply (sq_le_sq₀ (norm_nonneg _) (Real.sqrt_nonneg _)).mp + change harmonicTargetNorm hX (p k) (R*r k) (w k)^2≤(Real.sqrt (2*C/b))^2 + rw [Real.sq_sqrt (by positivity),hsq] + have hh := mul_le_mul_of_nonneg_left hi (inv_pos.mpr hmR).le + convert hh using 1 + field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/IntegrableRadialTail.lean b/lean/OAI/Geometry/RCD/Harmonic/IntegrableRadialTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f734d9a07bc46b9c4a61a1a18902b3827784a50 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/IntegrableRadialTail.lean @@ -0,0 +1,33 @@ +import Mathlib.MeasureTheory.Integral.Bochner.Set + +namespace OAI + +/-! # Vanishing tails of an integrable function outside metric balls -/ + +open Set Filter MeasureTheory Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [PseudoMetricSpace X] [MeasurableSpace X] [BorelSpace X] + {μ : Measure X} {f : X → ℝ} + +theorem integrable_radial_tail (hf : Integrable f μ) (p : X) : + Tendsto (fun k : ℕ => ∫ x in (ball p (k:ℝ))ᶜ, f x ∂μ) atTop (nhds 0) := by + have hanti : Antitone (fun k : ℕ => (ball p (k:ℝ))ᶜ) := by + intro i j hij + exact compl_subset_compl.mpr (ball_subset_ball (by exact_mod_cast hij)) + have hempty : (⋂ k : ℕ, (ball p (k:ℝ))ᶜ) = ∅ := by + apply eq_empty_iff_forall_notMem.mpr + intro x hx + obtain ⟨k,hk⟩ := exists_nat_gt (dist x p) + have hh := mem_iInter.mp hx k + exact hh (mem_ball.mpr hk) + have ht := tendsto_setIntegral_of_antitone + (fun k : ℕ => (measurableSet_ball : MeasurableSet (ball p (k:ℝ))).compl) + hanti ⟨0,hf.integrableOn⟩ + simpa only [hempty,setIntegral_empty] using ht + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/IntegratedPolarization.lean b/lean/OAI/Geometry/RCD/Harmonic/IntegratedPolarization.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2080d3a2213a72a17646dd0fbe2c48ffacea66d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/IntegratedPolarization.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Harmonic.OperatorQuadraticDerivative +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import Mathlib.MeasureTheory.SpecificCodomains.Pi + +namespace OAI + +/-! # Integrating the finite polarization used by the cutoff error -/ + +open MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) {n : ℕ} + +/-- Integration of a symmetric operator family preserves the quadratic +identity supplied by its finite polarizing tests. -/ +theorem integrated_polarization_energy (B : X → Euclidean n →L[ℝ] Euclidean n) + (hB : ∀ x, (B x).IsSymmetric) + (hint : ∀ v, Integrable (fun x => ⟪v, B x v⟫_ℝ) μ) (v : Euclidean n) : + ⟪v, polarizedDerivative (fun w => ∫ x, ⟪w, B x w⟫_ℝ ∂μ) v⟫_ℝ = + ∫ x, ⟪v, B x v⟫_ℝ ∂μ := by + have hi : Integrable B μ := by + have h := integrable_polarizedDerivative μ (fun x w => ⟪w, B x w⟫_ℝ) + (fun i => hint _) (fun i j => hint _) + simpa only [polarizedDerivative_quadratic_form _ (hB _)] using h + let S := ∫ x, B x ∂μ + have hquad (w z : Euclidean n) : ⟪w, S z⟫_ℝ = ∫ x, ⟪w, B x z⟫_ℝ ∂μ := by + dsimp only [S] + rw [ContinuousLinearMap.integral_apply hi z] + exact ((innerSL ℝ w).integral_comp_comm + ((ContinuousLinearMap.apply ℝ (Euclidean n) z).integrable_comp hi)).symm + have hsym : S.IsSymmetric := by + intro w z + change ⟪S w, z⟫_ℝ = ⟪w, S z⟫_ℝ + rw [real_inner_comm, hquad, hquad] + apply integral_congr_ae + exact Filter.Eventually.of_forall fun x => by + exact (real_inner_comm _ _).trans ((hB x) w z) + have he : (fun w => ∫ x, ⟪w, B x w⟫_ℝ ∂μ) = fun w => ⟪w, S w⟫_ℝ := + funext fun w => (hquad w w).symm + rw [he, polarizedDerivative_quadratic_form S hsym, hquad] + +/-- One finite L1 budget controls every polarized integral operator. -/ +theorem exists_polarized_integral_bound (g : Euclidean n → X → ℝ) : + ∃ C : ℝ, 0 < C ∧ ∀ (k : X → ℝ) (a : ℝ), 0 ≤ a → + (∀ v, |∫ x, k x * g v x ∂μ| ≤ a * ∫ x, |g v x| ∂μ) → + ‖polarizedDerivative (fun v => ∫ x, k x * g v x ∂μ)‖ ≤ C * a := by + classical + let m := fun v : Euclidean n => ∫ x, |g v x| ∂μ + have hm (v) : 0 ≤ m v := integral_nonneg fun x => abs_nonneg _ + let B := 1 + (∑ i : Fin n, m (EuclideanSpace.single i 1)) + + ∑ i : Fin n, ∑ j : Fin n, m (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) + have hS : 0 ≤ ∑ i : Fin n, m (EuclideanSpace.single i 1) := Finset.sum_nonneg fun _ _ => hm _ + have hP : 0 ≤ ∑ i : Fin n, ∑ j : Fin n, + m (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) := + Finset.sum_nonneg fun _ _ => Finset.sum_nonneg fun _ _ => hm _ + have hB : 0 < B := by dsimp only [B]; linarith + have hs (i : Fin n) : m (EuclideanSpace.single i 1) ≤ B := by + have hh := Finset.single_le_sum (fun j (_ : j ∈ Finset.univ) => hm (EuclideanSpace.single j 1)) + (Finset.mem_univ i) + dsimp only [B] + linarith + have hp (i j : Fin n) : m (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) ≤ B := by + have hh := Finset.single_le_sum + (fun l (_ : l ∈ Finset.univ) => hm (EuclideanSpace.single i 1 + EuclideanSpace.single l 1)) + (Finset.mem_univ j) + have hh' := Finset.single_le_sum (fun l (_ : l ∈ Finset.univ) => + Finset.sum_nonneg (fun k (_ : k ∈ Finset.univ) => hm (EuclideanSpace.single l 1 + EuclideanSpace.single k 1))) + (Finset.mem_univ i) + dsimp only [B] + linarith + refine ⟨(n : ℝ) ^ 2 * (3 / 2 * B) + 1, by positivity, ?_⟩ + intro k a ha hb + have ht := polarizedDerivative_norm_le (fun v => ∫ x, k x * g v x ∂μ) (mul_nonneg ha hB.le) + (fun i => (hb _).trans (mul_le_mul_of_nonneg_left (hs i) ha)) + (fun i j => (hb _).trans (mul_le_mul_of_nonneg_left (hp i j) ha)) + apply ht.trans + nlinarith only [ha] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/IntegratedRadialDensity.lean b/lean/OAI/Geometry/RCD/Harmonic/IntegratedRadialDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..582d3ad694e7d0d1f12a6c7a8c1d9cc8deb7463e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/IntegratedRadialDensity.lean @@ -0,0 +1,54 @@ +import Mathlib + +namespace OAI + +/-! # Integrating the radial area-density comparison on positive intervals -/ + +open Set MeasureTheory + +namespace RegularPointCoordinates + +theorem integrated_radial_density_ratio {V w : ℝ → ℝ} {a b c : ℝ} + (hab : a ≤ b) (hbc : b ≤ c) (hw : Continuous w) + (hV : AbsolutelyContinuousOnInterval V a c) + (hcomp : ∀ x ∈ Icc a b, ∀ y ∈ Icc b c, + DifferentiableAt ℝ V x → DifferentiableAt ℝ V y → + w x * deriv V y ≤ w y * deriv V x) : + (V c - V a) * (∫ s in a..b, w s) ≤ + (V b - V a) * (∫ s in a..c, w s) := by + have hVac : ∀ᵐ x ∂volume, x ∈ Icc a c → DifferentiableAt ℝ V x := by + simpa only [uIcc_of_le (hab.trans hbc)] using hV.ae_differentiableAt + have hVab : AbsolutelyContinuousOnInterval V a b := hV.mono (by + rw [uIcc_of_le hab, uIcc_of_le (hab.trans hbc)] + exact Icc_subset_Icc_right hbc) + have hVbc : AbsolutelyContinuousOnInterval V b c := hV.mono (by + rw [uIcc_of_le hbc, uIcc_of_le (hab.trans hbc)] + exact Icc_subset_Icc_left hab) + have hWab : IntervalIntegrable w volume a b := hw.intervalIntegrable a b + have hWbc : IntervalIntegrable w volume b c := hw.intervalIntegrable b c + have hfirst (y : ℝ) (hy : y ∈ Icc b c) (hdy : DifferentiableAt ℝ V y) : + (∫ x in a..b, w x) * deriv V y ≤ w y * (V b - V a) := by + have hp : (fun x => w x * deriv V y) ≤ᵐ[volume.restrict (Icc a b)] + fun x => w y * deriv V x := by + filter_upwards [ae_restrict_of_ae hVac, ae_restrict_mem measurableSet_Icc] with x hx hxab + exact hcomp x hxab y hy (hx ⟨hxab.1, hxab.2.trans hbc⟩) hdy + have hi := intervalIntegral.integral_mono_ae_restrict hab + (hWab.mul_const (deriv V y)) (hVab.intervalIntegrable_deriv.const_mul (w y)) hp + simpa only [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, + hVab.integral_deriv_eq_sub] using hi + have hp : (fun y => (∫ x in a..b, w x) * deriv V y) ≤ᵐ[volume.restrict (Icc b c)] + fun y => w y * (V b - V a) := by + filter_upwards [ae_restrict_of_ae hVac, ae_restrict_mem measurableSet_Icc] with y hy hybc + exact hfirst y hybc (hy ⟨hab.trans hybc.1, hybc.2⟩) + have hi := intervalIntegral.integral_mono_ae_restrict hbc + (hVbc.intervalIntegrable_deriv.const_mul (∫ x in a..b, w x)) + (hWbc.mul_const (V b - V a)) hp + rw [intervalIntegral.integral_const_mul, intervalIntegral.integral_mul_const, + hVbc.integral_deriv_eq_sub] at hi + have hadd := intervalIntegral.integral_add_adjacent_intervals hWab hWbc + rw [← hadd] + nlinarith only [hi] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/InteriorQuadraticComparison.lean b/lean/OAI/Geometry/RCD/Harmonic/InteriorQuadraticComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1435c35beaf24ae5d78422f65182bc8402d754f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/InteriorQuadraticComparison.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Harmonic.InteriorQuadraticDefect + +namespace OAI + +/-! # Stability of the interior quadratic defect under value errors -/ + +open Set MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem abs_three_point_difference_le {θ : ℝ} (hθ0 : 0≤θ) (hθ1 : θ≤1) (a b c : ℝ) : + |a-(1-θ)*b-θ*c|≤|a|+|b|+|c| := by + calc + _ ≤ |a|+|(1-θ)*b|+|θ*c| := (abs_sub _ _).trans (add_le_add (abs_sub _ _) le_rfl) + _ = |a|+(1-θ)*|b|+θ*|c| := by + rw [abs_mul,abs_mul,abs_of_nonneg (show 0≤1-θ by linarith),abs_of_nonneg hθ0] + _ ≤ _ := by nlinarith [abs_nonneg b,abs_nonneg c] + +variable {X : Type*} [MetricSpace X] + +theorem interiorQuadraticDefect_comparison (U V : X → ℝ) (l h t : Time) + (hlh : (l:ℝ) dist (γ 0) (γ 1)^2) μ) (l h t : Time) : + Integrable (interiorQuadraticDefect U l h t) μ := by + obtain ⟨M,hM⟩ := hUc.exists_bound_of_continuous hU + have hi (s : Time) : Integrable (fun γ : C(Time,X) => U (γ s)) μ := + Integrable.of_bound (hU.measurable.comp (measurable_path_eval s)).aestronglyMeasurable M + (Eventually.of_forall fun γ => hM (γ s)) + exact ((hi t).sub (hi l) |>.sub (((hi h).sub (hi l)).div_const _ |>.mul_const _)).sub + ((hd.mul_const _).mul_const _ |>.div_const _) + +theorem integral_interiorQuadraticDefect (μ : Measure C(Time,X)) [IsFiniteMeasure μ] + {U : X → ℝ} (hU : Continuous U) (hUc : HasCompactSupport U) + (hd : Integrable (fun γ : C(Time,X) => dist (γ 0) (γ 1)^2) μ) (l h t : Time) : + (∫ γ, interiorQuadraticDefect U l h t γ ∂μ)= + (∫ γ, U (γ t) ∂μ)-(∫ γ, U (γ l) ∂μ)- + (((∫ γ, U (γ h) ∂μ)-(∫ γ, U (γ l) ∂μ))/((h:ℝ)-l))*((t:ℝ)-l)- + (∫ γ, dist (γ 0) (γ 1)^2 ∂μ)*((t:ℝ)-l)*((t:ℝ)-h)/2 := by + obtain ⟨M,hM⟩ := hUc.exists_bound_of_continuous hU + have hi (s : Time) : Integrable (fun γ : C(Time,X) => U (γ s)) μ := + Integrable.of_bound (hU.measurable.comp (measurable_path_eval s)).aestronglyMeasurable M + (Eventually.of_forall fun γ => hM (γ s)) + unfold interiorQuadraticDefect + have hlin : Integrable (fun γ => (U (γ h)-U (γ l))/((h:ℝ)-l)*((t:ℝ)-l)) μ := + ((hi h).sub (hi l)).div_const _ |>.mul_const _ + have hquad : Integrable (fun γ : C(Time,X) => + dist (γ 0) (γ 1)^2*((t:ℝ)-l)*((t:ℝ)-h)/2) μ := + (hd.mul_const _).mul_const _ |>.div_const _ + rw [integral_sub + (f := fun γ : C(Time,X) => U (γ t)-U (γ l)-(U (γ h)-U (γ l))/((h:ℝ)-l)*((t:ℝ)-l)) + (g := fun γ : C(Time,X) => dist (γ 0) (γ 1)^2*((t:ℝ)-l)*((t:ℝ)-h)/2) + (((hi t).sub (hi l)).sub hlin) hquad, + integral_sub (f := fun γ : C(Time,X) => U (γ t)-U (γ l)) + (g := fun γ : C(Time,X) => (U (γ h)-U (γ l))/((h:ℝ)-l)*((t:ℝ)-l)) + ((hi t).sub (hi l)) hlin, + integral_sub (hi t) (hi l),integral_mul_const,integral_div,integral_sub (hi h) (hi l), + integral_div,integral_mul_const,integral_mul_const] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/InwardConstantEstimate.lean b/lean/OAI/Geometry/RCD/Harmonic/InwardConstantEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..f29c16817f1c7c6bcc2a261055dae0c6b41caddf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/InwardConstantEstimate.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Harmonic.PinchingTail + +namespace OAI + +/-! # Removing the affine constants by inward summation -/ + +open Filter +open scoped Topology BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- A vanishing sequence with the consecutive-fit estimate is bounded by +the square root of the two-sided defect envelope. No summability of the +square roots is assumed. -/ +theorem affine_constants_le_envelope {ρ τ C : ℝ} + (hρ : 0 < ρ) (hρ1 : ρ < 1) (hτ : 0 ≤ τ) (hτρ : τ < Real.sqrt ρ) (hC : 0 ≤ C) + {P c : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) + (hc : Tendsto c atTop (𝓝 0)) + (hstep : ∀ i, |c i - c (i + 1)| ≤ + C * τ ^ i * (Real.sqrt (P i) + Real.sqrt (P (i + 1)))) (i : ℕ) : + |c i| ≤ C * τ ^ i * (1 - τ / Real.sqrt ρ)⁻¹ * + (1 + (Real.sqrt ρ)⁻¹) * Real.sqrt (symmetricDefect ρ P i) := by + obtain ⟨h0, h0b⟩ := geometric_sqrt_tail_le hρ hρ1 hτ hτρ hP hPs i 0 + obtain ⟨h1, h1b⟩ := geometric_sqrt_tail_le hρ hρ1 hτ hτρ hP hPs i 1 + simp only [add_zero, pow_zero, div_one, pow_one] at h0 h0b h1 h1b + let d : ℕ → ℝ := fun k => C * τ ^ i * + (τ ^ k * Real.sqrt (P (i + k)) + τ ^ k * Real.sqrt (P (i + 1 + k))) + have hd : Summable d := (h0.add h1).mul_left (C * τ ^ i) + have hdist (k : ℕ) : dist (c (i + k)) (c (i + (k + 1))) ≤ d k := by + have h := hstep (i + k) + rw [Real.dist_eq] + convert h using 1 + simp only [d, pow_add] + ring_nf + have ht : Tendsto (fun k : ℕ => c (i + k)) atTop (𝓝 0) := + hc.comp (by simpa only [Nat.add_comm] using tendsto_add_atTop_nat i) + have hb := dist_le_tsum_of_dist_le_of_tendsto₀ d hdist hd ht + simp only [Nat.add_zero, Real.dist_eq, sub_zero] at hb + have hsum : (∑' k, d k) = C * τ ^ i * + ((∑' k, τ ^ k * Real.sqrt (P (i + k))) + + ∑' k, τ ^ k * Real.sqrt (P (i + 1 + k))) := by + rw [show d = fun k => C * τ ^ i * + (τ ^ k * Real.sqrt (P (i + k)) + τ ^ k * Real.sqrt (P (i + 1 + k))) from rfl, + tsum_mul_left, h0.tsum_add h1] + rw [hsum] at hb + have hm := mul_le_mul_of_nonneg_left (add_le_add h0b h1b) + (mul_nonneg hC (pow_nonneg hτ i)) + refine hb.trans (hm.trans_eq ?_) + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/L1LocalLimitPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/L1LocalLimitPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c3845492d461d6dc6daf961280b948575f67825 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/L1LocalLimitPairing.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Sobolev.L1LimitLocalization +import Mathlib.MeasureTheory.Integral.Bochner.Set + +namespace OAI + +/-! # Compatible local L1 limits have the same supported measure pairing -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem local_L1_limit_zero_extension {Ω : Set X} (hΩ : MeasurableSet Ω) + (F : ℕ → X → ℝ) (hz : ∀ k x, x ∉ Ω → F k x=0) + (J : Lp ℝ 1 (μ.restrict Ω)) + (hJ : Tendsto (fun k => ∫ x in Ω, |F k x-J x| ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => ∫ x, |F k x-Ω.indicator (fun y => J y) x| ∂μ) atTop (𝓝 0) := by + apply hJ.congr' + refine Eventually.of_forall fun k => ?_ + change (∫ x in Ω, |F k x-J x| ∂μ) = + ∫ x, |F k x-Ω.indicator (fun y => J y) x| ∂μ + symm + calc + _ = ∫ x in Ω, |F k x-Ω.indicator (fun y => J y) x| ∂μ := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro x hx + rw [hz k x hx,indicator_of_notMem hx,sub_self,abs_zero] + _ = _ := by + apply integral_congr_ae + filter_upwards [ae_restrict_mem hΩ] with x hx + rw [indicator_of_mem hx] + +theorem local_L1_limits_pairing_eq (ν : Measure X) (hν : ν ≪ μ) + {Ω Λ : Set X} (hΩ : MeasurableSet Ω) (hΛ : MeasurableSet Λ) + (F G : ℕ → X → ℝ) (hF : ∀ k, Integrable (F k) μ) (hG : ∀ k, Integrable (G k) μ) + (hzF : ∀ k x, x ∉ Ω → F k x=0) (hzG : ∀ k x, x ∉ Λ → G k x=0) + (I : Lp ℝ 1 (μ.restrict Ω)) (J : Lp ℝ 1 (μ.restrict Λ)) + (hI : Tendsto (fun k => ∫ x in Ω, |F k x-I x| ∂μ) atTop (𝓝 0)) + (hJ : Tendsto (fun k => ∫ x in Λ, |G k x-J x| ∂μ) atTop (𝓝 0)) + (χ : X → ℝ) (hχ : AEStronglyMeasurable χ μ) (D : ℝ≥0) + (hD : ∀ᵐ x ∂μ, |χ x| ≤ D) + (heq : ∀ k, F k =ᵐ[μ] fun x => χ x*G k x) + (hone : χ =ᵐ[ν] fun _ => 1) : + (∫ x in Ω, I x ∂ν) = ∫ x in Λ, J x ∂ν := by + let f := Ω.indicator (fun x => I x) + let g := Λ.indicator (fun x => J x) + have hf : Integrable f μ := (integrable_indicator_iff hΩ).mpr + (memLp_one_iff_integrable.mp (Lp.memLp I)) + have hg : Integrable g μ := (integrable_indicator_iff hΛ).mpr + (memLp_one_iff_integrable.mp (Lp.memLp J)) + have he := L1_limit_mul_eq μ F G f g hF hG hf hg + (local_L1_limit_zero_extension μ hΩ F hzF I hI) + (local_L1_limit_zero_extension μ hΛ G hzG J hJ) χ hχ D hD heq + have hfg : f =ᵐ[ν] g := by + filter_upwards [hν.ae_eq he,hone] with x hx hχx + simpa only [hχx,one_mul] using hx + rw [← integral_indicator hΩ,← integral_indicator hΛ] + exact integral_congr_ae hfg + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/L2ProbabilityPairing.lean b/lean/OAI/Geometry/RCD/Harmonic/L2ProbabilityPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd3145e4321425e13aba64136483dc9a2fe179ff --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/L2ProbabilityPairing.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Metric.ProbabilityDominationL1 +import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp + +namespace OAI + +/-! # Strong L² limits tested against probabilities with bounded compression -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MeasurableSpace X] + +theorem integral_abs_le_l2_of_domination (μ ν : Measure X) [IsProbabilityMeasure ν] + {C : ℝ≥0∞} (hC : C ≠ ⊤) (hν : ν ≤ C • μ) + (f : X → ℝ) (hf : MemLp f 2 μ) : + (∫ x, |f x| ∂ν) ≤ (C ^ (1/2 : ℝ)).toReal * (eLpNorm f 2 μ).toReal := by + have hv := hf.of_measure_le_smul hC hν + have hnorm : (∫ x, |f x| ∂ν) = (eLpNorm f 1 ν).toReal := by + rw [eLpNorm_one_eq_lintegral_enorm hv.aestronglyMeasurable] + simpa only [Real.norm_eq_abs] using integral_norm_eq_lintegral_enorm hv.aestronglyMeasurable + rw [hnorm, ← ENNReal.toReal_mul] + apply ENNReal.toReal_mono + (ENNReal.mul_ne_top (ENNReal.rpow_ne_top_of_nonneg (by positivity) hC) hf.eLpNorm_ne_top) + apply (eLpNorm_le_eLpNorm_of_exponent_le (by norm_num : (1:ℝ≥0∞) ≤ 2)).trans + simpa using (eLpNorm_le_of_measure_le_smul (f := f) (p := 2) hν) + +theorem uniform_l2_probability_pairing (μ : Measure X) + (ν : Y → Measure X) [∀ y, IsProbabilityMeasure (ν y)] + {C : ℝ≥0∞} (hC : C ≠ ⊤) (hν : ∀ y, ν y ≤ C • μ) + (F : ℕ → Lp ℝ 2 μ) (f : Lp ℝ 2 μ) (hF : Tendsto F atTop (𝓝 f)) : + TendstoUniformly (fun k y => ∫ x, F k x ∂ν y) (fun y => ∫ x, f x ∂ν y) atTop := by + have hn : Tendsto (fun k => (C ^ (1/2:ℝ)).toReal * ‖F k-f‖) atTop (𝓝 0) := by + simpa only [sub_self,norm_zero,mul_zero] using (hF.sub (tendsto_const_nhds (x := f))).norm.const_mul + (C ^ (1/2:ℝ)).toReal + apply Metric.tendstoUniformly_iff.mpr + intro e he + filter_upwards [(tendsto_order.mp hn).2 e he] with k hk y + have hv (g : Lp ℝ 2 μ) : Integrable g (ν y) := + (((Lp.memLp g).of_measure_le_smul hC (hν y)).mono_exponent + (by norm_num : (1:ℝ≥0∞) ≤ 2)).integrable (by norm_num) + have hbound := integral_abs_le_l2_of_domination μ (ν y) hC (hν y) + (fun x => (F k-f : Lp ℝ 2 μ) x) (Lp.memLp (F k-f)) + have hae : F k-f =ᵐ[ν y] fun x => F k x-f x := + (Measure.absolutelyContinuous_of_le_smul (hν y)).ae_eq (Lp.coeFn_sub (F k) f) + have heq : (∫ x, |(F k-f : Lp ℝ 2 μ) x| ∂ν y) = ∫ x, |F k x-f x| ∂ν y := + integral_congr_ae (by filter_upwards [hae] with x hx; rw [hx]) + rw [heq] at hbound + change (∫ x, |F k x-f x| ∂ν y) ≤ (C ^ (1/2:ℝ)).toReal * ‖F k-f‖ at hbound + have hi := abs_integral_le_integral_abs (f := fun x => F k x-f x) (μ := ν y) + rw [integral_sub (hv (F k)) (hv f)] at hi + rw [Real.dist_eq,abs_sub_comm] + exact (hi.trans hbound).trans_lt hk + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalAffineMoments.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalAffineMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..6cd1245f35a774e37d9f61cf386a0c5411d3b769 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalAffineMoments.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.RCD.Harmonic.AffineCompactness +import OAI.Geometry.RCD.Harmonic.AffineProjection + +namespace OAI + +/-! # Normalized local L² moments of the actual Sobolev affine family -/ + +open Set MeasureTheory Filter +open scoped InnerProductSpace Topology BigOperators ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Scaling by the norm of the constant function is the normalized local +L² convention; the zero-measure case uses the usual inverse-zero convention. -/ +def normalizeLocalL2 (s : Set X) (hfin : μ s ≠ ∞) + (f : Lp ℝ 2 (μ.restrict s)) : Lp ℝ 2 (μ.restrict s) := + ‖restrictedOne μ s hfin‖⁻¹ • f + +omit [MetricSpace X] in +theorem restrictedOne_norm (s : Set X) (hfin : μ s ≠ ∞) : + ‖restrictedOne μ s hfin‖ = Real.sqrt (μ.real s) := by + unfold restrictedOne + rw [norm_indicatorConstLp (by norm_num) (by norm_num)] + simp only [norm_one, one_mul, Measure.real, Measure.restrict_apply_univ, + ENNReal.toReal_ofNat, one_div] + rw [Real.sqrt_eq_rpow] + norm_num + +/-- Target, constant and coordinates with the same normalized local L² scale. -/ +def localAffineMomentFamily {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (w : SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) : + Option (Option (Fin n)) → Lp ℝ 2 (μ.restrict s) := + affineMomentFamily n + (normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s w)) + (normalizeLocalL2 μ s hfin (restrictedOne μ s hfin)) + (fun i => normalizeLocalL2 μ s hfin (SobolevSpace.restrictLp μ hQ s (u i))) + +/-- The finite moment expression is exactly the normalized error of the +actual Sobolev affine candidate, including its constant term. -/ +theorem localAffineMomentFamily_sum {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (w : SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) + (c : ℝ) (v : Euclidean n) : + (∑ i, affineErrorCoefficients c (fun j => v j) i • + localAffineMomentFamily μ hQ u w s hfin i) = + normalizeLocalL2 μ s hfin + (SobolevSpace.restrictLp μ hQ s w - affineCoordinateMap μ hQ u s hfin (c, v)) := by + rw [localAffineMomentFamily, affineMomentFamily_sum, affineCoordinateMap_apply, + sobolevColumnMap_apply, map_sum] + simp only [normalizeLocalL2, map_smul, smul_sub, Finset.smul_sum, + smul_comm c (‖restrictedOne μ s hfin‖⁻¹), + smul_comm _ (‖restrictedOne μ s hfin‖⁻¹), sub_add_eq_sub_sub] + +/-- The least-squares projection has no greater normalized error than any +of the affine candidates whose joint moments are controlled. -/ +theorem normalized_affineResidual_le {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (w : SobolevSpace μ hQ) (s : Set X) (hfin : μ s ≠ ∞) (c : ℝ) (v : Euclidean n) : + ‖normalizeLocalL2 μ s hfin + (affineResidual μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s w))‖ ≤ + ‖∑ i, affineErrorCoefficients c (fun j => v j) i • + localAffineMomentFamily μ hQ u w s hfin i‖ := by + rw [localAffineMomentFamily_sum] + simp only [normalizeLocalL2, norm_smul, Real.norm_eq_abs, abs_inv, abs_norm] + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (norm_nonneg _)) + exact affineProjection_best μ hQ u s hfin (SobolevSpace.restrictLp μ hQ s w) c v + +/-- Passing the finite moments to a model controls the actual normalized +least-squares residual, not just a separately chosen trial function. -/ +theorem eventually_normalized_affineResidual_lt {n : ℕ} + (u : ℕ → Fin n → SobolevSpace μ hQ) (w : ℕ → SobolevSpace μ hQ) + (s : ℕ → Set X) (hfin : ∀ k, μ (s k) ≠ ∞) + {Hlim : Type*} [NormedAddCommGroup Hlim] [InnerProductSpace ℝ Hlim] + (model : Option (Option (Fin n)) → Hlim) + (hconv : ∀ i j, Tendsto + (fun k => ⟪localAffineMomentFamily μ hQ (u k) (w k) (s k) (hfin k) i, + localAffineMomentFamily μ hQ (u k) (w k) (s k) (hfin k) j⟫_ℝ) atTop + (𝓝 ⟪model i, model j⟫_ℝ)) + (c : ℝ) (v : Euclidean n) {η : ℝ} + (hmodel : ‖∑ i, affineErrorCoefficients c (fun j => v j) i • model i‖ < η) : + ∀ᶠ k in atTop, + ‖normalizeLocalL2 μ (s k) (hfin k) + (affineResidual μ hQ (u k) (s k) (hfin k) + (SobolevSpace.restrictLp μ hQ (s k) (w k)))‖ < η := by + have he := eventually_norm_sum_smul_lt + (fun k => localAffineMomentFamily μ hQ (u k) (w k) (s k) (hfin k)) + model hconv (affineErrorCoefficients c (fun j => v j)) hmodel + filter_upwards [he] with k hk + exact lt_of_le_of_lt (normalized_affineResidual_le μ hQ (u k) (w k) (s k) (hfin k) c v) hk + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalCaccioppoli.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalCaccioppoli.lean new file mode 100644 index 0000000000000000000000000000000000000000..44a20fd12b24cd7833b2a8c519c28b4cf166e612 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalCaccioppoli.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicGrams + +namespace OAI + +/-! # Local harmonic cutoff tests in the canonical Dirichlet space -/ + +open Set MeasureTheory +open scoped InnerProductSpace NNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- A compactly supported Lipschitz cutoff supplies an admissible squared +cutoff test against any bounded Sobolev function. -/ +theorem square_cutoff_product_mem_dirichlet + (Ω : Set X) (u η : SobolevSpace μ hQ) (C D L : ℝ≥0) + (hu : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x| ≤ C) + (v : X → ℝ) (hv : LipschitzWith L v) (hs : HasCompactSupport v) + (hb : ∀ x, |v x| ≤ D) (hΩ : tsupport v ⊆ Ω) + (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] v) : + SobolevSpace.product μ hQ (SobolevSpace.square μ hQ η D) u (D * D) C ∈ + SobolevSpace.dirichlet μ hQ Ω := by + have hη : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ η x| ≤ D := by + filter_upwards [hrep] with x hx + simpa only [hx] using hb x + obtain ⟨L₂, hL₂⟩ := lipschitz_mul_constant_outside_compact hv hv 0 + (by simpa using hs) hb + have hs₂ : HasCompactSupport (fun x => v x * v x) := hs.mul_right + have hb₂ (x : X) : |v x * v x| ≤ (D * D : ℝ≥0) := by + rw [abs_mul] + exact mul_le_mul (hb x) (hb x) (abs_nonneg _) D.coe_nonneg + have hn₂ (x : X) : 0 ≤ v x * v x := mul_self_nonneg _ + have hΩ₂ : tsupport (fun x => v x * v x) ⊆ Ω := + (tsupport_mul_subset_left : tsupport (fun x => v x * v x) ⊆ tsupport v).trans hΩ + let test := SobolevSpace.product μ hQ (SobolevSpace.square μ hQ η D) u (D * D) C + let cutoff := SobolevSpace.cutoffCLM μ hQ hL₂ hs₂ hb₂ hn₂ u + have hsq : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (SobolevSpace.square μ hQ η D) x| ≤ + (D * D : ℝ≥0) := by + filter_upwards [SobolevSpace.square_coe μ hQ η D hη, hη] with x hx hb + rw [hx, abs_pow, sq_abs] + have hh := (sq_le_sq₀ (abs_nonneg _) D.coe_nonneg).mpr hb + rw [sq_abs] at hh + simpa only [NNReal.coe_mul, pow_two] using hh + have heq : test = cutoff := by + apply Subtype.ext + apply Lp.ext + filter_upwards [SobolevSpace.product_coe μ hQ (SobolevSpace.square μ hQ η D) u + (D * D) C hsq hu, SobolevSpace.square_coe μ hQ η D hη, hrep, + SobolevSpace.cutoffCLM_coe μ hQ hL₂ hs₂ hb₂ hn₂ u] with x ht hsq hx hc + change SobolevSpace.toLp μ hQ test x = SobolevSpace.toLp μ hQ cutoff x + rw [ht, hsq, hx, hc] + ring + change test ∈ SobolevSpace.dirichlet μ hQ Ω + rw [heq] + exact SobolevSpace.cutoffCLM_mem_dirichlet μ hQ hL₂ hs₂ hb₂ hn₂ hΩ₂ u + +/-- Local harmonicity, rather than a global weak Laplacian, suffices for +the weighted Caccioppoli inequality when the cutoff is supported inside +the harmonicity domain. -/ +theorem IsSobolevHarmonicOn.caccioppoli + (Ω : Set X) (u η : SobolevSpace μ hQ) (C D L : ℝ≥0) + (hharm : IsSobolevHarmonicOn μ hQ Ω u) + (hu : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ u x| ≤ C) + (v : X → ℝ) (hv : LipschitzWith L v) (hs : HasCompactSupport v) + (hb : ∀ x, |v x| ≤ D) (hΩ : tsupport v ⊆ Ω) + (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] v) : + (∫ x, (SobolevSpace.toLp μ hQ η x) ^ 2 * + (SobolevSpace.minimalSlope μ hQ u x) ^ 2 ∂μ) ≤ + 4 * ∫ x, (SobolevSpace.toLp μ hQ u x) ^ 2 * + (SobolevSpace.minimalSlope μ hQ η x) ^ 2 ∂μ := by + have hη : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ η x| ≤ D := by + filter_upwards [hrep] with x hx + simpa only [hx] using hb x + exact caccioppoli_weighted μ hQ u η C D hu hη + (hharm _ (square_cutoff_product_mem_dirichlet μ hQ Ω u η C D L hu v hv hs hb hΩ hrep)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalConstantHarmonic.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalConstantHarmonic.lean new file mode 100644 index 0000000000000000000000000000000000000000..3437bd40043fa0d3ab590ba532d48357257f91d9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalConstantHarmonic.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Sobolev.GoodLaplacianCutoff + +namespace OAI + +/-! # A genuine local constant is weakly harmonic -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Gradient locality on level sets suffices; no global constant Sobolev +function is needed when the ambient measure is infinite. -/ +theorem isSobolevHarmonicOn_of_local_constant (s : Set X) (hs : MeasurableSet s) + (η : SobolevSpace μ hQ) (c : ℝ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict s] fun _ => c) : + IsSobolevHarmonicOn μ hQ s η := by + intro φ hφ + have hinside : localGamma μ hQ η φ =ᵐ[μ.restrict s] 0 := by + filter_upwards [hη, ae_restrict_of_ae (localGamma_zero_on_level μ hQ η φ c)] with x hx hz + exact hz hx + have hφzero := SobolevSpace.dirichlet_zero_off μ hQ s hs ⟨φ, hφ⟩ + have houtside : localGamma μ hQ η φ =ᵐ[μ.restrict sᶜ] 0 := by + filter_upwards [hφzero, ae_restrict_of_ae (localGamma_zero_on_level μ hQ φ η 0), + ae_restrict_of_ae (localGamma_comm μ hQ η φ)] with x hx hz hc + exact hc.trans (hz hx) + have hzero := ae_of_ae_restrict_of_ae_restrict_compl s hinside houtside + rw [← integral_localGamma_eq_energyForm, integral_congr_ae hzero] + simp only [Pi.zero_apply, integral_zero] + +theorem GoodLaplacianCutoff.harmonic_on_inner_ball {p : X} {r C : ℝ} + (χ : GoodLaplacianCutoff μ hQ p r C) : + IsSobolevHarmonicOn μ hQ (ball p r) χ.sobolev := by + apply isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball χ.sobolev 1 + filter_upwards [ae_restrict_of_ae χ.representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans (χ.one x hxr) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalL2Restriction.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalL2Restriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..642bcb1ddf327b0c66d83bbd8fbce739614f0851 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalL2Restriction.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Harmonic.LocalAffineMoments + +namespace OAI + +/-! # Restricting actual local L² functions between the fitting balls -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] (μ : Measure X) + +/-- Restriction to a smaller measurable region as a continuous linear map. -/ +def localL2Restriction (s t : Set X) (hts : t ⊆ s) : + Lp ℝ 2 (μ.restrict s) →L[ℝ] Lp ℝ 2 (μ.restrict t) := + Lp.LpToLpOfMeasureLeSMul (c := 1) (by norm_num) + (by simpa only [one_smul] using Measure.restrict_mono_set μ hts) + +omit [MetricSpace X] in +theorem localL2Restriction_coe (s t : Set X) (hts : t ⊆ s) + (f : Lp ℝ 2 (μ.restrict s)) : + localL2Restriction μ s t hts f =ᵐ[μ.restrict t] f := + Lp.coeFn_LpToLpOfMeasureLeSMul (c := 1) (by norm_num) _ f + +omit [MetricSpace X] in +theorem localL2Restriction_norm_le (s t : Set X) (hts : t ⊆ s) + (f : Lp ℝ 2 (μ.restrict s)) : + ‖localL2Restriction μ s t hts f‖ ≤ ‖f‖ := by + have hR : ‖localL2Restriction μ s t hts‖ ≤ 1 := by + simpa only [localL2Restriction, ENNReal.toReal_one, Real.one_rpow] using + Lp.norm_LpToLpOfMeasureLeSMul_le (E := ℝ) (p := (2 : ℝ≥0∞)) (c := 1) + (by norm_num) (by simpa only [one_smul] using Measure.restrict_mono_set μ hts) + exact ((localL2Restriction μ s t hts).le_opNorm f).trans + (by simpa only [one_mul] using (mul_le_mul_of_nonneg_right hR (norm_nonneg f))) + +theorem localL2Restriction_sobolev (hQ : QuadraticCheegerEnergy μ) + (s t : Set X) (hts : t ⊆ s) (w : SobolevSpace μ hQ) : + localL2Restriction μ s t hts (SobolevSpace.restrictLp μ hQ s w) = + SobolevSpace.restrictLp μ hQ t w := by + apply Lp.ext + exact ((localL2Restriction_coe μ s t hts _).trans + (ae_restrict_of_ae_restrict_of_subset hts (SobolevSpace.restrictLp_coe μ hQ s w))).trans + (SobolevSpace.restrictLp_coe μ hQ t w).symm + +omit [MetricSpace X] in +theorem restrictedOne_coe (s : Set X) (hs : μ s ≠ ∞) : + restrictedOne μ s hs =ᵐ[μ.restrict s] fun _ => (1 : ℝ) := by + simpa only [restrictedOne, indicator_univ] using + (indicatorConstLp_coeFn (p := (2 : ℝ≥0∞)) (μ := μ.restrict s) + (hs := MeasurableSet.univ) (hμs := by simpa only [Measure.restrict_apply_univ] using hs) + (c := (1 : ℝ))) + +omit [MetricSpace X] in +theorem localL2Restriction_one (s t : Set X) (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) : + localL2Restriction μ s t hts (restrictedOne μ s hs) = restrictedOne μ t ht := by + apply Lp.ext + exact ((localL2Restriction_coe μ s t hts _).trans + (ae_restrict_of_ae_restrict_of_subset hts (restrictedOne_coe μ s hs))).trans + (restrictedOne_coe μ t ht).symm + +theorem localL2Restriction_affine (hQ : QuadraticCheegerEnergy μ) {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s t : Set X) (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (c : ℝ) (v : Euclidean n) : + localL2Restriction μ s t hts (affineCoordinateMap μ hQ u s hs (c, v)) = + affineCoordinateMap μ hQ u t ht (c, v) := by + rw [affineCoordinateMap_apply, map_add, map_smul, localL2Restriction_one, + localL2Restriction_sobolev, affineCoordinateMap_apply] + +omit [MetricSpace X] in +/-- The only norm loss under normalized restriction is the square root of +the volume ratio, written as a ratio of the actual constant-function norms. -/ +theorem normalized_localL2Restriction_le (s t : Set X) (hts : t ⊆ s) + (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) (hs0 : μ s ≠ 0) (ht0 : μ t ≠ 0) + (f : Lp ℝ 2 (μ.restrict s)) : + ‖normalizeLocalL2 μ t ht (localL2Restriction μ s t hts f)‖ ≤ + (Real.sqrt (μ.real s) / Real.sqrt (μ.real t)) * ‖normalizeLocalL2 μ s hs f‖ := by + have hspos : 0 < μ.real s := ENNReal.toReal_pos hs0 hs + have htpos : 0 < μ.real t := ENNReal.toReal_pos ht0 ht + simp only [normalizeLocalL2, norm_smul, Real.norm_eq_abs, abs_inv, + restrictedOne_norm, abs_of_nonneg (Real.sqrt_nonneg _)] + calc + (Real.sqrt (μ.real t))⁻¹ * ‖localL2Restriction μ s t hts f‖ ≤ + (Real.sqrt (μ.real t))⁻¹ * ‖f‖ := + mul_le_mul_of_nonneg_left (localL2Restriction_norm_le μ s t hts f) (by positivity) + _ = (Real.sqrt (μ.real s) / Real.sqrt (μ.real t)) * + ((Real.sqrt (μ.real s))⁻¹ * ‖f‖) := by + field_simp [ne_of_gt (Real.sqrt_pos.2 hspos), ne_of_gt (Real.sqrt_pos.2 htpos)] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalProjectionMeasure.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalProjectionMeasure.lean new file mode 100644 index 0000000000000000000000000000000000000000..b173a6ec0aacd430cf8740061d7d84bdc367f5be --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalProjectionMeasure.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Coordinates.ProjectionMeasuredCoordinates +import OAI.Geometry.RCD.Coordinates.LocalCoordinateExtension + +namespace OAI + +/-! # Measured projection coordinates from local harmonic representatives -/ + +open Set Metric MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +/-- A measurable extension retains the same local harmonic representative. -/ +theorem FirstOrderSplittingOn.measurable_values {μ : Measure X} + {hQ : QuadraticCheegerEnergy μ} {n : ℕ} {q : X} {r epsilon : ℝ} + {u : Fin n → SobolevSpace μ hQ} {V : X → Euclidean n} + (h : FirstOrderSplittingOn μ hQ q r epsilon u V) : + ∃ W : X → Euclidean n, Measurable W ∧ EqOn V W (ball q r) ∧ + FirstOrderSplittingOn μ hQ q r epsilon u W := by + obtain ⟨W, hW, hEq⟩ := exists_measurable_local_extension measurableSet_ball h.continuous + refine ⟨W, hW, hEq, { h with representative := ?_, continuous := ?_ }⟩ + · intro j + filter_upwards [h.representative j, ae_restrict_mem measurableSet_ball] with x hx hxs + exact hx.trans (congrArg (fun z : Euclidean n => z j) (hEq hxs)) + · exact h.continuous.congr (fun x hx => (hEq hx).symm) + +omit [ProperSpace X] in +/-- The local harmonic coordinates admit a measurable representative with +exactly the same metric data and the required measured approximation. -/ +theorem projection_measured_local_coordinates {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (hmeasured : LocalMeasuredCoordinateInput hX) {error : ℝ} (herror : 0 < error) : + ∃ delta : ℝ, 0 < delta ∧ ∀ {q : X} {s epsilon : ℝ}, 0 < s → + -delta / 32 ≤ K * s ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (V : X → Euclidean n), + FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (2 * s) epsilon u V → + V q = 0 → + IsPointedApproximation q 0 (s / 64) 4 delta (fun x => (s / 64)⁻¹ • V x) → + ∃ W : X → Euclidean n, Measurable W ∧ EqOn V W (ball q (2 * s)) ∧ + FirstOrderSplittingOn (hausdorff n X) hX.quadratic q (2 * s) epsilon u W ∧ + W q = 0 ∧ + IsPointedApproximation q 0 (s / 64) 4 delta (fun x => (s / 64)⁻¹ • W x) ∧ + IsMeasuredEuclideanApproximation (hausdorff n X) n q s (1 / 1024) error + (fun x => s⁻¹ • W x) := by + obtain ⟨delta, hdelta, happly⟩ := projection_measured_coordinates hX hn hmeasured herror + refine ⟨delta, hdelta, ?_⟩ + intro q s epsilon hs hcurv u V hfirst hcenter hmetric + obtain ⟨W, hW, hEq, hfirstW⟩ := hfirst.measurable_values + have hcenterW : W q = 0 := (hEq (mem_ball_self (by positivity))).symm.trans hcenter + have hmetricW : IsPointedApproximation q 0 (s / 64) 4 delta + (fun x => (s / 64)⁻¹ • W x) := by + apply hmetric.congr_on_ball (by positivity) + intro x hx + have hxs : x ∈ ball q (2 * s) := by + have hdist := mem_closedBall.mp hx + exact mem_ball.mpr (by linarith) + dsimp only + rw [hEq hxs] + have hresult := happly q s hs hcurv (fun x => (s / 64)⁻¹ • W x) + ((continuous_const_smul ((s / 64)⁻¹)).measurable.comp hW) + (by rw [hcenterW, smul_zero]) hmetricW + have hfactor : (1 / 64 : ℝ) * (s / 64)⁻¹ = s⁻¹ := by field_simp + refine ⟨W, hW, hEq, hfirstW, hcenterW, hmetricW, ?_⟩ + simpa only [smul_smul, hfactor] using hresult + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalRadialDerivative.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalRadialDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..b47ffbca93fbaf3c25716b78557fe1e40acc05c5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalRadialDerivative.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.RCD.Coordinates.RadialFitCoordinates +import OAI.Geometry.RCD.Metric.InwardLocality + +namespace OAI + +/-! # The bounded radial derivative as a linear map into local L2 -/ + +open Set MeasureTheory + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- A locally bounded gradient defines a genuine linear derivative on +Sobolev functions with values in the common local L2 space. -/ +def localRadialDerivative (Ω : Set X) (f : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) : + SobolevSpace μ hQ →ₗ[ℝ] Lp ℝ 2 (μ.restrict Ω) where + toFun q := radialPairingLp μ hQ Ω q f hf + map_add' q r := by + apply Lp.ext + filter_upwards [radialPairingLp_representative μ hQ Ω (q + r) f hf, + radialPairingLp_representative μ hQ Ω q f hf, + radialPairingLp_representative μ hQ Ω r f hf, + Lp.coeFn_add (radialPairingLp μ hQ Ω q f hf) (radialPairingLp μ hQ Ω r f hf), + ae_restrict_of_ae (localGamma_add_left μ hQ q r f)] with x hsum hq hr hadd hg + simp only [hsum, hadd, Pi.add_apply, hq, hr, hg] + map_smul' c q := by + apply Lp.ext + filter_upwards [radialPairingLp_representative μ hQ Ω (c • q) f hf, + radialPairingLp_representative μ hQ Ω q f hf, + Lp.coeFn_smul c (radialPairingLp μ hQ Ω q f hf), + ae_restrict_of_ae (localGamma_smul_left μ hQ c q f)] with x hprod hq hsmul hg + simp only [hprod, hsmul, Pi.smul_apply, smul_eq_mul, hq, hg, RingHom.id_apply] + +/-- The map is the original radial gradient pairing, with its slots in +the customary order. -/ +theorem localRadialDerivative_representative (Ω : Set X) (f q : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) : + localRadialDerivative μ hQ Ω f hf q =ᵐ[μ.restrict Ω] localGamma μ hQ f q := + (radialPairingLp_representative μ hQ Ω q f hf).trans + (ae_restrict_of_ae (localGamma_comm μ hQ q f)) + +/-- This bound retains the local energy, so applying the derivative does +not discard the scale of an already constructed radial residual. -/ +theorem localRadialDerivative_norm_sq (Ω : Set X) (f q : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) : + ‖localRadialDerivative μ hQ Ω f hf q‖ ^ 2 ≤ + B * ∫ x in Ω, localGamma μ hQ q q x ∂μ := by + have hrep := localRadialDerivative_representative μ hQ Ω f q hf + have heq : (fun x => (localRadialDerivative μ hQ Ω f hf q x) ^ 2) + =ᵐ[μ.restrict Ω] fun x => (localGamma μ hQ f q x) ^ 2 := by + filter_upwards [hrep] with x hx + rw [hx] + rw [l2_norm_sq_eq_integral, integral_congr_ae heq, ← integral_const_mul] + apply integral_mono_ae + ((localGamma_memLp_two_of_bound μ hQ Ω q f hf).integrable_sq.congr + (by filter_upwards [ae_restrict_of_ae (localGamma_comm μ hQ q f)] with x hx; rw [hx])) + ((localGamma_memL1 μ hQ q q).integrableOn.const_mul B) + filter_upwards [hf, ae_restrict_of_ae (localGamma_sq_le μ hQ f q), + ae_restrict_of_ae (localGamma_self μ hQ q)] with x hbound hsq hself + apply hsq.trans + exact mul_le_mul_of_nonneg_right hbound (by rw [hself]; positivity) + +/-- Every local Sobolev representative of a radial pairing is its image +under this map. -/ +theorem localRadialDerivative_eq_restrict (Ω : Set X) (f q g : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hg : SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict Ω] localGamma μ hQ f q) : + localRadialDerivative μ hQ Ω f hf q = SobolevSpace.restrictLp μ hQ Ω g := by + apply Lp.ext + exact (localRadialDerivative_representative μ hQ Ω f q hf).trans + (hg.symm.trans (SobolevSpace.restrictLp_coe μ hQ Ω g).symm) + +/-- Constants in a local affine fit have zero radial derivative. -/ +theorem localRadialDerivative_eq_of_constant_difference (Ω : Set X) + (f q r : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) (c : ℝ) + (hqr : SobolevSpace.toLp μ hQ (q - r) =ᵐ[μ.restrict Ω] fun _ => c) : + localRadialDerivative μ hQ Ω f hf q = localRadialDerivative μ hQ Ω f hf r := by + exact radialPairingLp_congr μ hQ Ω q f r f hf hf + (localGamma_eq_of_constant_difference μ hQ Ω q r f c hqr) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalRadialSmallness.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalRadialSmallness.lean new file mode 100644 index 0000000000000000000000000000000000000000..6518970db0e1b8395357a60efe62877e99c775f6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalRadialSmallness.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedRadialError +import OAI.Geometry.RCD.Coordinates.BoundedSplittingCoordinates +import OAI.Geometry.RCD.Coordinates.DyadicRadialFits + +namespace OAI + +/-! # Qualitative radial smallness for the actual dyadic distance datum -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- The global extensions of the original harmonic coordinates need not +be bounded: clipping preserves their actual local radial error. -/ +theorem local_normalized_radial_error {n : ℕ} {p : X} {r ε Cχ Q : ℝ} + (hr : 0 < r) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) (hQb : 0 ≤ Q) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * r) ε u v) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 r 4 ε (fun x => r⁻¹ • v x)) + (q : SobolevSpace μ hQ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (4 * r))] fun x => dist p x ^ 2 / 2) + (hqbound : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ q x| ≤ Q) + (heik : ∀ᵐ x ∂μ.restrict (ball p (4 * r)), localGamma μ hQ q q x = 2 * SobolevSpace.toLp μ hQ q x) + (χ : GoodLaplacianCutoff μ hQ p r Cχ) + (hvol : 0 < μ.real (ball p (4 * r))) (j : Fin n) : + (∫ x in ball p r, (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1)) * ε * r ^ 2 * μ.real (ball p (4 * r)) := by + obtain ⟨u', hub, hfirst'⟩ := bounded_normalized_splitting μ hQ hr hε hε1 u v hfirst hv hmetric + have hrep : SobolevSpace.toLp μ hQ (u' j) =ᵐ[μ.restrict (ball p (4 * r))] + SobolevSpace.toLp μ hQ (u j) := (hfirst'.representative j).trans (hfirst.representative j).symm + have hg := localGamma_pair_congr_ae μ hQ (f := q) (f' := q) + (Filter.Eventually.of_forall fun _ => rfl) hrep + have hsub : ball p r ⊆ ball p (4 * r) := ball_subset_ball (by linarith) + have heq : (∫ x in ball p r, + (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) = + ∫ x in ball p r, (localGamma μ hQ q (u' j) x - SobolevSpace.toLp μ hQ (u' j) x) ^ 2 ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub hrep, + ae_restrict_of_ae_restrict_of_subset hsub hg] with x hx hy + rw [hx, hy] + rw [heq] + exact normalized_coordinate_radial_error μ hQ hr hε hε1 hCχ hQb u' v hfirst' + hv hmetric hub q hq hqbound heik χ hvol j + +/-- The same canonical distance datum used for the Poisson corrections +satisfies the local qualitative estimate. Its value and eikonal properties +are derived from the actual source family. -/ +theorem DyadicDistanceReplacements.local_radial_error {n : ℕ} {κ r0 B J C : ℝ} {p : X} + {S : DyadicDistanceSources μ hQ n κ p r0} + (T : DyadicDistanceReplacements μ hQ S B J C) (i : ℕ) + {ε Cχ : ℝ} (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hCχ : 0 ≤ Cχ) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hfirst : FirstOrderSplittingOn μ hQ p (4 * (distanceSourceRadius r0 i / 64)) ε u v) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 ε + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • v x)) + (χ : GoodLaplacianCutoff μ hQ p (distanceSourceRadius r0 i / 64) Cχ) + (hvol : 0 < μ.real (ball p (4 * (distanceSourceRadius r0 i / 64)))) (j : Fin n) : + let r := distanceSourceRadius r0 i / 64 + (∫ x in ball p r, (localGamma μ hQ (T.distanceDatum μ hQ i) (u j) x - + SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + (1000 * ((n : ℝ) + 1) ^ 2 * (Cχ + 1)) * ε * r ^ 2 * μ.real (ball p (4 * r)) := by + dsimp only + let s := distanceSourceRadius r0 i + let r := s / 64 + have hs : 0 < s := distanceSourceRadius_pos S.radius_pos i + have hr : 0 < r := by dsimp only [r]; positivity + let q := T.distanceDatum μ hQ i + have hsub : ball p (4 * r) ⊆ ball p (4 * s) := ball_subset_ball (by dsimp only [r]; linarith) + have hR : 0 ≤ 4 * s := by positivity + have hrep : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (4 * r))] + fun x => dist p x ^ 2 / 2 := by + filter_upwards [ae_restrict_of_ae (positiveSquaredDistance_representative μ hQ hR (T.cutoff i)), + ae_restrict_mem measurableSet_ball] with x hx hxb + exact hx.trans (positiveSquaredDistanceValue_on_ball μ hQ (T.cutoff i) (hsub hxb)) + have hqb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ q x| ≤ (4 * s) ^ 2 / 2 := by + filter_upwards [positiveSquaredDistance_representative μ hQ hR (T.cutoff i)] with x hx + rw [show SobolevSpace.toLp μ hQ q x = positiveSquaredDistanceValue μ hQ (T.cutoff i) x from hx] + have hb := positiveSquaredDistanceValue_bounds μ hQ hR (T.cutoff i) x + rw [abs_of_nonneg hb.1] + exact hb.2 + have heik : ∀ᵐ x ∂μ.restrict (ball p (4 * r)), + localGamma μ hQ q q x = 2 * SobolevSpace.toLp μ hQ q x := by + have he := positiveSquaredDistance_energy_value μ hQ hR (T.cutoff i) (S.eikonal i) + filter_upwards [ae_restrict_of_ae_restrict_of_subset hsub he] with x hx + change (1 / 2 : ℝ) * localGamma μ hQ q q x = SobolevSpace.toLp μ hQ q x at hx + linarith + exact local_normalized_radial_error μ hQ hr hε hε1 hCχ (by positivity) + u v hfirst hv hmetric q hrep hqb heik χ hvol j + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalResidualOuterBound.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalResidualOuterBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..8567b7fd72cfa34feb3bb165ae0fcdc353e1e0c0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalResidualOuterBound.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Harmonic.UniformResidualOuterBound +import OAI.Geometry.RCD.Coordinates.BoundedSplittingCoordinates + +namespace OAI + +/-! # Uniform residual transport using only local boundedness -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- Clipping outside the working ball preserves its Euler identity and +all three local norms. The transport constant uses only the local bound. -/ +theorem local_uniform_residual_outer_bound (n : ℕ) {F E : ℝ} (hF : 0 ≤ F) + (C : ℝ≥0) : + ∃ T : ℝ, 0 ≤ T ∧ ∀ (R a : ℝ), 0 < R → 0 ≤ a → a ≤ (n : ℝ) + 1 → + ∀ (z : X) (f w q : SobolevSpace μ hQ) (σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn μ hQ (ball z (4 * R)) f a → + ∀ {B : ℝ} (hf : ∀ᵐ x ∂μ.restrict (ball z (4 * R)), localGamma μ hQ f f x ≤ B), + (∀ᵐ x ∂μ.restrict (ball z (4 * R)), |SobolevSpace.toLp μ hQ w x| ≤ C) → + ∀ e : X → ℝ, MemLp e 2 μ → + localRadialDerivative μ hQ (ball z (4 * R)) f hf w = + SobolevSpace.restrictLp μ hQ (ball z (4 * R)) (w + q) → + localGamma μ hQ f (inwardSobolev μ hQ z (3 * R)) =ᵐ[μ.restrict (ball z (3 * R))] + (fun x => e x - dist z x) → + μ (sphere z R) = 0 → + ‖SobolevSpace.restrictLp μ hQ (ball z (4 * R)) q‖ ≤ + F * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) → + (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ E ^ 2 * R ^ 2 * σ ^ 2 → + ‖SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w‖ ≤ + T * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) := by + obtain ⟨T, hT, hb⟩ := uniform_residual_outer_bound μ hQ n (E := E) hF C + refine ⟨T, hT, ?_⟩ + intro R a hR ha han z f w q σ hσ hlap B hf hw e he heuler hradial hsphere hq herr + let w' := boundedLocalVersion μ hQ w C + have hweq : SobolevSpace.toLp μ hQ w' =ᵐ[μ.restrict (ball z (4 * R))] + SobolevSpace.toLp μ hQ w := boundedLocalVersion_eq μ hQ w C hw + have hreseq (s : Set X) (hs : s ⊆ ball z (4 * R)) : + SobolevSpace.restrictLp μ hQ s w' = SobolevSpace.restrictLp μ hQ s w := by + apply Lp.ext + filter_upwards [SobolevSpace.restrictLp_coe μ hQ s w', + SobolevSpace.restrictLp_coe μ hQ s w, ae_restrict_of_ae_restrict_of_subset hs hweq] + with x hx hy hz + rw [hx, hy, hz] + have hDeq : localRadialDerivative μ hQ (ball z (4 * R)) f hf w' = + localRadialDerivative μ hQ (ball z (4 * R)) f hf w := by + apply Lp.ext + have hγ := localGamma_pair_congr_ae μ hQ + (f := f) (f' := f) (Filter.Eventually.of_forall fun _ => rfl) hweq + filter_upwards [localRadialDerivative_representative μ hQ _ f w' hf, + localRadialDerivative_representative μ hQ _ f w hf, hγ] with x hx hy hz + rw [hx, hy, hz] + have heuler' : localRadialDerivative μ hQ (ball z (4 * R)) f hf w' = + SobolevSpace.restrictLp μ hQ (ball z (4 * R)) (w' + q) := by + rw [hDeq, heuler, map_add, map_add, hreseq _ Subset.rfl] + have hinner : ball z R ⊆ ball z (4 * R) := ball_subset_ball (by linarith) + have houter : ball z (2 * R) ⊆ ball z (4 * R) := ball_subset_ball (by linarith) + have hb' := hb R a hR ha han z f w' q σ hσ hlap hf + (boundedLocalVersion_bound μ hQ w C) e he heuler' hradial hsphere + (by rw [hreseq _ hinner]; exact hq) herr + rwa [hreseq _ hinner, hreseq _ houter] at hb' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LocalUniformDifference.lean b/lean/OAI/Geometry/RCD/Harmonic/LocalUniformDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d83639bd72b4d785f3f1b80e917357d9aff072e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LocalUniformDifference.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.RCD.Metric.ContainingMassUniformL2 +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance +import OAI.Geometry.RCD.Harmonic.HarmonicModelCompactness + +namespace OAI + +/-! # Local value comparison with a compact extension of the limit -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.local_uniform_difference_l2 {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) {S R T : ℝ} (hS : 0 ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (w k-q k) x)^2 ∂hausdorff n X) + atTop (𝓝 0) := by + let μ := hausdorff n X + let Ω := fun k => ball (p k) (R*r k) + let m := fun k => μ.real (ball (p k) (S*r k)) + let z := fun k x => SobolevSpace.toLp μ hX.quadratic (w k-q k) x + let : ∀ k, IsFiniteMeasure (μ.restrict (Ω k)) := fun k => ⟨by + simpa only [Measure.restrict_apply_univ] using hX.finiteOnBounded (Ω k) isBounded_ball⟩ + have hsub (k : ℕ) : Ω k⊆ball (p k) (S*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (hRT.trans hTS).le (hr k).le) + apply containing_mass_uniform_l2 (fun k => μ.restrict (Ω k)) m + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) + (fun k => by + simp only [Measure.real,Measure.restrict_apply_univ] + exact ENNReal.toReal_mono (hX.finiteOnBounded _ isBounded_ball).ne (measure_mono (hsub k))) + z (fun k => (Lp.aestronglyMeasurable (SobolevSpace.toLp μ hX.quadratic (w k-q k))).mono_measure + Measure.restrict_le_self) + intro δ hδ + have hsmall : ∀ᶠ k in atTop, ε k<(T-R)/2 := + hεlim.eventually (Iio_mem_nhds (by linarith)) + filter_upwards [hw (δ/2) (half_pos hδ),hq (δ/2) (half_pos hδ),hsmall] with k hwk hqk hek + filter_upwards [hwk,ae_restrict_of_ae_restrict_of_subset (hsub k) hqk, + ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (Lp.coeFn_sub + (SobolevSpace.toLp μ hX.quadratic (w k)) (SobolevSpace.toLp μ hX.quadratic (q k)))] + with x hwx hqx hx hsubx + have hd := (abs_le.mp (pointed_radial_distance (hr k) hS.le (hV k).metric (hsub k hx).le)).2 + have hxR : dist x (p k)/r k by + field_simp + have hh := scaled_contact_gradient_length μ Q hν u v hs + (fun x => SobolevSpace.minimalSlope μ Q u x/s) hu hd + filter_upwards [hh] with x hx + rw [hx] + ring + +theorem scaled_contact_velocity_pair {ν : Measure X} {C : ℝ≥0∞} + (hC : C ≠ ∞) (hν : ν ≤ C • μ) (u v g : SobolevSpace μ Q) + {s M : ℝ} (hs : 0 < s) + (hu : ∀ᵐ x ∂ν, SobolevSpace.toLp μ Q u x = + -(s/2)*SobolevSpace.toLp μ Q v x-M) : + weightedGradientPair μ Q ν u g/s = -(1/2)*(∫ x, localGamma μ Q v g x ∂ν) := by + let a := -(s/2) + have hac : ν ≪ μ := Measure.absolutelyContinuous_of_le_smul hν + have hcoeff : ∀ᵐ x ∂ν, SobolevSpace.toLp μ Q (a • v) x = + a*SobolevSpace.toLp μ Q v x := by + rw [map_smul] + exact (Lp.coeFn_smul a (SobolevSpace.toLp μ Q v)).filter_mono hac.ae_le + have hsame := (localGamma_eq_on_diff_level μ Q u (a • v) g (-M)).filter_mono hac.ae_le + have hscale := (localGamma_smul_left μ Q a v g).filter_mono hac.ae_le + have he : localGamma μ Q u g =ᵐ[ν] fun x => a*localGamma μ Q v g x := by + filter_upwards [hu,hcoeff,hsame,hscale] with x hu hc he hs + rw [←hs] + apply he + rw [hu,hc] + dsimp [a] + ring + rw [weightedGradientPair_eq_bracket μ Q hC hν,←integral_localGamma μ Q hC hν, + integral_congr_ae he,integral_const_mul] + dsimp [a] + field_simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LogCosQuadratic.lean b/lean/OAI/Geometry/RCD/Harmonic/LogCosQuadratic.lean new file mode 100644 index 0000000000000000000000000000000000000000..0cf5556d9d785ef57fd33d19e5251d8952b44cf4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LogCosQuadratic.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Harmonic.LogCoshQuadratic +import OAI.Geometry.RCD.Transport.ReducedDistortionPositive + +namespace OAI + +/-! # The midpoint dimension comparison before the conjugate radius -/ + +open Set Filter +noncomputable section +namespace RegularPointCoordinates + +def logCosQuadraticNumerator (x : ℝ) : ℝ := + -x*(Real.sin x/Real.cos x)-2*Real.log (Real.cos x) + +theorem logCosQuadraticNumerator_hasDerivAt {x : ℝ} (hc : Real.cos x ≠ 0) : + HasDerivAt logCosQuadraticNumerator + ((Real.sin x*Real.cos x-x)/(Real.cos x)^2) x := by + have hd := (((hasDerivAt_id x).neg).mul + ((Real.hasDerivAt_sin x).div (Real.hasDerivAt_cos x) hc)).sub + (((Real.hasDerivAt_cos x).log hc).const_mul 2) + convert hd using 1 + · rfl + · dsimp only [id_eq,Pi.div_apply,Pi.neg_apply] + field_simp + nlinarith only [congrArg (fun y : ℝ => x*y) (Real.sin_sq_add_cos_sq x)] + +theorem logCosQuadraticNumerator_nonpos {x : ℝ} (hx : 0 ≤ x) (hxp : x < Real.pi/2) : + logCosQuadraticNumerator x ≤ 0 := by + have hc (y : ℝ) (hy : y∈Ico 0 (Real.pi/2)) : Real.cos y ≠ 0 := + (Real.cos_pos_of_mem_Ioo ⟨by linarith [hy.1,Real.pi_pos],hy.2⟩).ne' + have hmono : AntitoneOn logCosQuadraticNumerator (Ico 0 (Real.pi/2)) := by + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ico (0:ℝ) (Real.pi/2)) + (fun y hy => (logCosQuadraticNumerator_hasDerivAt (hc y hy)).continuousAt.continuousWithinAt) + (fun y hy => (logCosQuadraticNumerator_hasDerivAt (hc y (interior_subset hy))).hasDerivWithinAt) + intro y hy + have hy0 : 0 ≤ y := (interior_subset hy : y∈Ico 0 (Real.pi/2)).1 + have hs := Real.sin_le (show 0 ≤ 2*y by linarith) + rw [Real.sin_two_mul] at hs + exact div_nonpos_of_nonpos_of_nonneg (by linarith) (sq_nonneg _) + have h := hmono (by constructor <;> linarith [Real.pi_pos] : (0:ℝ)∈Ico 0 (Real.pi/2)) ⟨hx,hxp⟩ hx + simpa [logCosQuadraticNumerator] using h + +theorem log_cos_div_sq_hasDerivAt {x : ℝ} (hx : x ≠ 0) (hc : Real.cos x ≠ 0) : + HasDerivAt (fun y : ℝ => Real.log (Real.cos y)/y^2) + (logCosQuadraticNumerator x/x^3) x := by + have hd := ((Real.hasDerivAt_cos x).log hc).div + ((hasDerivAt_id x).pow 2) (pow_ne_zero 2 hx) + convert hd using 1 + · rfl + · dsimp only [id_eq,Pi.pow_apply] + norm_num only [Nat.cast_ofNat,Nat.reduceSub,pow_one,mul_one] + change (-x*(Real.sin x/Real.cos x)-2*Real.log (Real.cos x))/x^3 = + (-Real.sin x/Real.cos x*x^2-Real.log (Real.cos x)*(2*x))/(x^2)^2 + field_simp + +theorem log_cos_div_sq_antitone : + AntitoneOn (fun x : ℝ => Real.log (Real.cos x)/x^2) (Ioo 0 (Real.pi/2)) := by + have hc (x : ℝ) (hx : x∈Ioo 0 (Real.pi/2)) : Real.cos x ≠ 0 := + (Real.cos_pos_of_mem_Ioo ⟨by linarith [hx.1,Real.pi_pos],hx.2⟩).ne' + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ioo (0:ℝ) (Real.pi/2)) + (fun x hx => (log_cos_div_sq_hasDerivAt hx.1.ne' (hc x hx)).continuousAt.continuousWithinAt) + (fun x hx => (log_cos_div_sq_hasDerivAt (interior_subset hx).1.ne' + (hc x (interior_subset hx))).hasDerivWithinAt) + intro x hx + have hxx : x∈Ioo 0 (Real.pi/2) := interior_subset hx + exact div_nonpos_of_nonpos_of_nonneg (logCosQuadraticNumerator_nonpos hxx.1.le hxx.2) + (pow_nonneg hxx.1.le 3) + +theorem log_cos_sqrt_mul_ge {c x : ℝ} (hc0 : 0 ≤ c) (hc1 : c ≤ 1) + (hx : 0 ≤ x) (hxp : x < Real.pi/2) : + c*Real.log (Real.cos x) ≤ Real.log (Real.cos (Real.sqrt c*x)) := by + by_cases hx0 : x=0 + · simp [hx0] + by_cases hc : c=0 + · simp [hc] + have hxpos : 0 < x := lt_of_le_of_ne hx (Ne.symm hx0) + have hcp : 0 < c := lt_of_le_of_ne hc0 (Ne.symm hc) + have hspos := Real.sqrt_pos.mpr hcp + have hs1 : Real.sqrt c ≤ 1 := by nlinarith [Real.sq_sqrt hc0] + have hy : 0 < Real.sqrt c*x := mul_pos hspos hxpos + have hxy : Real.sqrt c*x ≤ x := by nlinarith + have h := log_cos_div_sq_antitone ⟨hy,hxy.trans_lt hxp⟩ ⟨hxpos,hxp⟩ hxy + have hxs : 0 < x^2 := sq_pos_of_pos hxpos + have hys : 0 < (Real.sqrt c*x)^2 := sq_pos_of_pos hy + have he : (Real.sqrt c*x)^2 = c*x^2 := by rw [mul_pow,Real.sq_sqrt hc0] + have hh := (div_le_div_iff₀ hxs hys).mp h + rw [he] at hh + have hmul : (c*Real.log (Real.cos x))*x^2 ≤ Real.log (Real.cos (Real.sqrt c*x))*x^2 := by + simpa only [mul_comm,mul_left_comm,mul_assoc] using hh + exact (mul_le_mul_iff_left₀ hxs).mp hmul + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/LogCoshQuadratic.lean b/lean/OAI/Geometry/RCD/Harmonic/LogCoshQuadratic.lean new file mode 100644 index 0000000000000000000000000000000000000000..0aa067a330c39cf9678e0e07bf01d68fa4acd9d8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/LogCoshQuadratic.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Transport.ReducedDistortionRecurrence + +namespace OAI + +/-! # The midpoint comparison for negative-curvature distortion + +The logarithm of cosh divided by the square is decreasing. This gives +the exact dimension interpolation needed to compare the full CD and +reduced CD midpoint coefficients, rather than a Gaussian approximation. +-/ + +open Set Filter +noncomputable section +namespace RegularPointCoordinates + +def logCoshQuadraticNumerator (x : ℝ) : ℝ := + x*(Real.sinh x/Real.cosh x)-2*Real.log (Real.cosh x) + +theorem logCoshQuadraticNumerator_hasDerivAt (x : ℝ) : + HasDerivAt logCoshQuadraticNumerator + ((x-Real.sinh x*Real.cosh x)/(Real.cosh x)^2) x := by + have hc : Real.cosh x ≠ 0 := (Real.cosh_pos x).ne' + have hd := ((hasDerivAt_id x).mul + ((Real.hasDerivAt_sinh x).div (Real.hasDerivAt_cosh x) hc)).sub + (((Real.hasDerivAt_cosh x).log hc).const_mul 2) + convert hd using 1 + · rfl + · dsimp only [id_eq,Pi.div_apply] + rw [one_mul] + change (x-Real.sinh x*Real.cosh x)/(Real.cosh x)^2 = + Real.sinh x/Real.cosh x+x*((Real.cosh x*Real.cosh x-Real.sinh x*Real.sinh x)/ + (Real.cosh x)^2)-2*(Real.sinh x/Real.cosh x) + field_simp + nlinarith only [congrArg (fun y : ℝ => x*y) (Real.cosh_sq_sub_sinh_sq x)] + +theorem logCoshQuadraticNumerator_nonpos {x : ℝ} (hx : 0 ≤ x) : + logCoshQuadraticNumerator x ≤ 0 := by + have hmono : AntitoneOn logCoshQuadraticNumerator (Ici 0) := by + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ici (0:ℝ)) + (fun x _ => (logCoshQuadraticNumerator_hasDerivAt x).continuousAt.continuousWithinAt) + (fun x _ => (logCoshQuadraticNumerator_hasDerivAt x).hasDerivWithinAt) + intro y hy + have hy0 : 0 ≤ y := le_of_lt (by simpa only [interior_Ici,mem_Ioi] using hy : 0 < y) + have hs := Real.self_le_sinh_iff.mpr (show 0 ≤ 2*y by linarith) + rw [Real.sinh_two_mul] at hs + exact div_nonpos_of_nonpos_of_nonneg (by linarith) (sq_nonneg _) + have h := hmono (by simp : (0:ℝ)∈Ici 0) hx hx + simpa [logCoshQuadraticNumerator] using h + +theorem log_cosh_div_sq_hasDerivAt {x : ℝ} (hx : x ≠ 0) : + HasDerivAt (fun y : ℝ => Real.log (Real.cosh y)/y^2) + (logCoshQuadraticNumerator x/x^3) x := by + have hc : Real.cosh x ≠ 0 := (Real.cosh_pos x).ne' + have hd := ((Real.hasDerivAt_cosh x).log hc).div + ((hasDerivAt_id x).pow 2) (pow_ne_zero 2 hx) + convert hd using 1 + · rfl + · dsimp only [id_eq,Pi.pow_apply] + norm_num only [Nat.cast_ofNat,Nat.reduceSub,pow_one,mul_one] + change (x*(Real.sinh x/Real.cosh x)-2*Real.log (Real.cosh x))/x^3 = + (Real.sinh x/Real.cosh x*x^2-Real.log (Real.cosh x)*(2*x))/(x^2)^2 + field_simp + +theorem log_cosh_div_sq_antitone : + AntitoneOn (fun x : ℝ => Real.log (Real.cosh x)/x^2) (Ioi 0) := by + apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ioi (0:ℝ)) + (fun x hx => (log_cosh_div_sq_hasDerivAt (ne_of_gt hx)).continuousAt.continuousWithinAt) + (fun x hx => (log_cosh_div_sq_hasDerivAt (ne_of_gt (by simpa only [interior_Ioi,mem_Ioi] using hx : 0 < x))).hasDerivWithinAt) + intro x hx + have hx0 : 0 < x := by simpa only [interior_Ioi,mem_Ioi] using hx + exact div_nonpos_of_nonpos_of_nonneg (logCoshQuadraticNumerator_nonpos hx0.le) + (pow_nonneg hx0.le 3) + +theorem log_cosh_sqrt_mul_ge {c x : ℝ} (hc0 : 0 ≤ c) (hc1 : c ≤ 1) (hx : 0 ≤ x) : + c*Real.log (Real.cosh x) ≤ Real.log (Real.cosh (Real.sqrt c*x)) := by + by_cases hx0 : x=0 + · simp [hx0] + by_cases hc : c=0 + · simp [hc] + have hxpos : 0 < x := lt_of_le_of_ne hx (Ne.symm hx0) + have hcp : 0 < c := lt_of_le_of_ne hc0 (Ne.symm hc) + have hspos := Real.sqrt_pos.mpr hcp + have hs1 : Real.sqrt c ≤ 1 := by nlinarith [Real.sq_sqrt hc0] + have hy : 0 < Real.sqrt c*x := mul_pos hspos hxpos + have hxy : Real.sqrt c*x ≤ x := by nlinarith + have h := log_cosh_div_sq_antitone hy hxpos hxy + have hxs : 0 < x^2 := sq_pos_of_pos hxpos + have hys : 0 < (Real.sqrt c*x)^2 := sq_pos_of_pos hy + have he : (Real.sqrt c*x)^2 = c*x^2 := by rw [mul_pow,Real.sq_sqrt hc0] + have hh := (div_le_div_iff₀ hxs hys).mp h + rw [he] at hh + have hmul : (c*Real.log (Real.cosh x))*x^2 ≤ Real.log (Real.cosh (Real.sqrt c*x))*x^2 := by + simpa only [mul_comm,mul_left_comm,mul_assoc] using hh + exact (mul_le_mul_iff_left₀ hxs).mp hmul + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MeanDirectionFromPairings.lean b/lean/OAI/Geometry/RCD/Harmonic/MeanDirectionFromPairings.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf103f5b0dc436b28e25cdb015346ebe05d5d610 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MeanDirectionFromPairings.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Sobolev.MeanGradient +import OAI.Geometry.RCD.Coordinates.NormalizedPairing +import OAI.Geometry.RCD.Harmonic.AffineCenterBounds +import OAI.Geometry.RCD.Harmonic.LocalL2Restriction + +namespace OAI + +/-! # Recovering the mean gradient from constant-direction pairings -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The constant-direction L2 estimate controls the actual averaged +coordinate gradient. This is the bridge from the two-center commutator +estimate to coefficient recovery in directional pinching. -/ +theorem meanGradientVector_error_of_pairings + (U H : E →L[ℝ] SobolevSpace μ hQ) (f : SobolevSpace μ hQ) + (s : Set X) (hs : MeasurableSet s) (hfin : μ s ≠ ∞) (hpos : μ s ≠ 0) + (δ : E) {D : ℝ} (hD : 0 ≤ D) + (hrep : ∀ b, SobolevSpace.toLp μ hQ (H b) =ᵐ[μ.restrict s] + localGamma μ hQ f (U b)) + (herror : ∀ b, ‖normalizeLocalL2 μ s hfin + (SobolevSpace.restrictLp μ hQ s (H b) - ⟪δ, b⟫_ℝ • restrictedOne μ s hfin)‖ ≤ D * ‖b‖) : + ‖meanGradientVector μ hQ U s hs f - δ‖ ≤ D := by + let : IsFiniteMeasure (μ.restrict s) := + ⟨by simpa only [Measure.restrict_apply_univ] using hfin.lt_top⟩ + have hv : 0 < μ.real s := ENNReal.toReal_pos hpos hfin + have hone : ‖normalizeLocalL2 μ s hfin (restrictedOne μ s hfin)‖ = 1 := by + simpa only [one_smul, abs_one] using normalized_constant_norm μ s hfin hpos 1 + have hinner (b : E) : + ⟪normalizeLocalL2 μ s hfin + (SobolevSpace.restrictLp μ hQ s (H b) - ⟪δ, b⟫_ℝ • restrictedOne μ s hfin), + normalizeLocalL2 μ s hfin (restrictedOne μ s hfin)⟫_ℝ = + ⟪meanGradientVector μ hQ U s hs f - δ, b⟫_ℝ := by + rw [normalized_inner] + have heq : (∫ x in s, + (SobolevSpace.restrictLp μ hQ s (H b) - ⟪δ, b⟫_ℝ • restrictedOne μ s hfin) x * + restrictedOne μ s hfin x ∂μ) = + ∫ x in s, localGamma μ hQ f (U b) x - ⟪δ, b⟫_ℝ ∂μ := by + apply integral_congr_ae + filter_upwards [Lp.coeFn_sub (SobolevSpace.restrictLp μ hQ s (H b)) + (⟪δ, b⟫_ℝ • restrictedOne μ s hfin), + Lp.coeFn_smul ⟪δ, b⟫_ℝ (restrictedOne μ s hfin), + SobolevSpace.restrictLp_coe μ hQ s (H b), hrep b, restrictedOne_coe μ s hfin] + with x hsub hsmul hr hp ho + simp only [hsub, Pi.sub_apply, hsmul, Pi.smul_apply, smul_eq_mul, hr, hp, ho, + mul_one] + rw [heq, integral_sub (localGamma_memL1 μ hQ f (U b)).integrableOn (integrable_const _), + integral_const, smul_eq_mul, measureReal_restrict_apply_univ, + mul_sub, ← meanGradientVector_inner μ hQ U s hs f b, inner_sub_left] + congr 1 + field_simp [hv.ne'] + have hbound (b : E) : |⟪meanGradientVector μ hQ U s hs f - δ, b⟫_ℝ| ≤ D * ‖b‖ := by + rw [← hinner] + apply (abs_real_inner_le_norm _ _).trans + rw [hone, mul_one] + exact herror b + let a := meanGradientVector μ hQ U s hs f - δ + have hb := hbound a + change |⟪a, a⟫_ℝ| ≤ D * ‖a‖ at hb + rw [real_inner_self_eq_norm_sq, abs_of_nonneg (sq_nonneg _)] at hb + by_contra hn + have hlt : D < ‖a‖ := lt_of_not_ge hn + have hapos : 0 < ‖a‖ := lt_of_le_of_lt hD hlt + have hm := mul_lt_mul_of_pos_right hlt hapos + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MeanGramControl.lean b/lean/OAI/Geometry/RCD/Harmonic/MeanGramControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..37e6c16956060f4c0ddffeb4aad2da685ad36238 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MeanGramControl.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.RCD.Coordinates.LinearNormalization +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion + +namespace OAI + +/-! # From averaged splitting-map errors to exact Gram normalization -/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +/-- The normalized integral of the absolute error controls the error of +its mean on a positive finite-measure set. -/ +theorem abs_average_sub_const_le (s : Set X) + (hzero : μ s ≠ 0) (hfin : μ s ≠ ∞) {f : X → ℝ} + (hf : IntegrableOn f s μ) (c : ℝ) : + |(μ.real s)⁻¹ * (∫ x in s, f x ∂μ) - c| ≤ + (μ.real s)⁻¹ * ∫ x in s, |f x - c| ∂μ := by + let : IsFiniteMeasure (μ.restrict s) := ⟨by simpa using hfin.lt_top⟩ + have hμ : μ.real s ≠ 0 := ENNReal.toReal_ne_zero.mpr ⟨hzero, hfin⟩ + have he : (μ.real s)⁻¹ * (∫ x in s, f x - c ∂μ) = + (μ.real s)⁻¹ * (∫ x in s, f x ∂μ) - c := by + rw [integral_sub hf (integrable_const c)] + simp only [integral_const, measureReal_restrict_apply_univ, smul_eq_mul] + field_simp + have hn : 0 ≤ (μ.real s)⁻¹ := by positivity + rw [← he, abs_mul, abs_of_nonneg hn] + exact mul_le_mul_of_nonneg_left abs_integral_le_integral_abs + hn + +variable [MetricSpace X] [BorelSpace X] [ProperSpace X] + (hQ : QuadraticCheegerEnergy μ) + +/-- The first-order averaged Gram errors in a splitting-map definition +bound the actual mean Gram operator in Euclidean operator norm. -/ +theorem meanGram_sub_id_norm_le {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : MeasurableSet s) (hzero : μ s ≠ 0) (hfin : μ s ≠ ∞) + {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (herror : ∀ i j : Fin n, + (μ.real s)⁻¹ * ∫ x in s, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ epsilon) : + ‖sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs - + ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ (n : ℝ) ^ 2 * epsilon := by + apply euclidean_operator_norm_le_of_entries _ hepsilon + intro i j + have hc := sobolevMeanGram_column_entry μ hQ u s hs j i + have he : (sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs + (EuclideanSpace.single j 1)) i = + (μ.real s)⁻¹ * ∫ x in s, localGamma μ hQ (u j) (u i) x ∂μ := by + simpa only [EuclideanSpace.inner_single_right, conj_trivial, one_mul] using hc + have hb := abs_average_sub_const_le μ s hzero hfin + (localGamma_memL1 μ hQ (u j) (u i)).integrableOn (if j = i then 1 else 0) + have havg := hb.trans (herror j i) + simpa only [sub_apply, ContinuousLinearMap.id_apply, PiLp.sub_apply, + PiLp.single_apply, he, eq_comm] using havg + +/-- Small operator error yields the quantitative lower bound for the +quadratic form without assuming that the Gram operator is invertible. -/ +theorem inner_lower_of_sub_id_norm {E : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] (Q : E →L[ℝ] E) {delta : ℝ} + (hbound : ‖Q - ContinuousLinearMap.id ℝ E‖ ≤ delta) (v : E) : + (1 - delta) * ‖v‖ ^ 2 ≤ ⟪v, Q v⟫_ℝ := by + have hn := (Q - ContinuousLinearMap.id ℝ E).le_opNorm v + have hn' := hn.trans (mul_le_mul_of_nonneg_right hbound (norm_nonneg v)) + have hc := (abs_real_inner_le_norm v ((Q - ContinuousLinearMap.id ℝ E) v)).trans + (mul_le_mul_of_nonneg_left hn' (norm_nonneg v)) + simp only [sub_apply, ContinuousLinearMap.id_apply, inner_sub_right, + real_inner_self_eq_norm_sq] at hc + have hl := (abs_le.mp hc).1 + nlinarith + +/-- The matching upper quadratic-form bound. -/ +theorem inner_upper_of_sub_id_norm {E : Type*} [NormedAddCommGroup E] + [InnerProductSpace ℝ E] (Q : E →L[ℝ] E) {delta : ℝ} + (hbound : ‖Q - ContinuousLinearMap.id ℝ E‖ ≤ delta) (v : E) : + ⟪v, Q v⟫_ℝ ≤ (1 + delta) * ‖v‖ ^ 2 := by + have hn := (Q - ContinuousLinearMap.id ℝ E).le_opNorm v + have hn' := hn.trans (mul_le_mul_of_nonneg_right hbound (norm_nonneg v)) + have hc := (abs_real_inner_le_norm v ((Q - ContinuousLinearMap.id ℝ E) v)).trans + (mul_le_mul_of_nonneg_left hn' (norm_nonneg v)) + simp only [sub_apply, ContinuousLinearMap.id_apply, inner_sub_right, + real_inner_self_eq_norm_sq] at hc + have hl := (abs_le.mp hc).2 + nlinarith + +/-- First-order Gram error bounds control both an exact normalizer and its +inverse. No closeness or norm bound for the chosen normalizer is assumed. -/ +theorem exact_mean_normalizer_bounds {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (s : Set X) (hs : MeasurableSet s) (hzero : μ s ≠ 0) (hfin : μ s ≠ ∞) + {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (herror : ∀ i j : Fin n, + (μ.real s)⁻¹ * ∫ x in s, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ epsilon) + (A : Euclidean n ≃L[ℝ] Euclidean n) + (hA : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) s hs A) + (v : Euclidean n) : + (1 - (n : ℝ) ^ 2 * epsilon) * ‖A v‖ ^ 2 ≤ ‖v‖ ^ 2 ∧ + ‖A.symm v‖ ^ 2 ≤ (1 + (n : ℝ) ^ 2 * epsilon) * ‖v‖ ^ 2 := by + have hb := meanGram_sub_id_norm_le μ hQ u s hs hzero hfin hepsilon herror + constructor + · have hl := inner_lower_of_sub_id_norm _ hb (A v) + rw [meanGram_energy_of_exact_normalization μ hQ (sobolevColumnMap μ hQ u) s hs A hA, + ContinuousLinearEquiv.symm_apply_apply] at hl + exact hl + · have hu := inner_upper_of_sub_id_norm _ hb v + rwa [meanGram_energy_of_exact_normalization μ hQ (sobolevColumnMap μ hQ u) s hs A hA] at hu + +/-- The averaged first-order splitting-map estimate alone constructs an +exact mean normalizer once the dimension-dependent error is less than one. -/ +theorem exists_exact_mean_normalization_of_gram_error {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (s : Set X) (hs : MeasurableSet s) + (hzero : μ s ≠ 0) (hfin : μ s ≠ ∞) {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hsmall : (n : ℝ) ^ 2 * epsilon < 1) + (herror : ∀ i j : Fin n, + (μ.real s)⁻¹ * ∫ x in s, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ epsilon) : + ∃ A : Euclidean n ≃L[ℝ] Euclidean n, + IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) s hs A := by + apply exists_exact_mean_normalization μ hQ (sobolevColumnMap μ hQ u) s hs + intro v hv + have hlow := inner_lower_of_sub_id_norm _ + (meanGram_sub_id_norm_le μ hQ u s hs hzero hfin hepsilon herror) v + exact (mul_pos (sub_pos.mpr hsmall) (sq_pos_of_ne_zero (norm_ne_zero_iff.mpr hv))).trans_le hlow + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MeanGramInverse.lean b/lean/OAI/Geometry/RCD/Harmonic/MeanGramInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..f09620e3a72195eae3e23caf4620b83be9d4d437 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MeanGramInverse.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Coordinates.GramNormalization + +namespace OAI + +/-! # The actual inverse of an exactly normalized mean Gram -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) (Ω : Set X) (hΩ : MeasurableSet Ω) + (A : E ≃L[ℝ] E) (hA : IsExactMeanNormalization μ hQ U Ω hΩ A) + +include hA + +/-- Exact normalization makes the original mean Gram injective. -/ +theorem meanGram_injective_of_exact_normalization : + Function.Injective (sobolevMeanGram μ hQ U Ω hΩ) := by + intro x y hxy + by_contra hne + have hp := meanGram_strictly_positive_of_exact_normalization μ hQ U Ω hΩ A hA + (sub_ne_zero.mpr hne) + rw [map_sub, hxy, sub_self, inner_zero_right] at hp + exact (lt_irrefl 0) hp + +/-- The mean Gram itself, with the inverse supplied by its proved +nondegeneracy. This is independent of which exact normalizer witnesses it. -/ +def meanGramEquiv [FiniteDimensional ℝ E] : E ≃L[ℝ] E := + (LinearEquiv.ofInjectiveEndo (sobolevMeanGram μ hQ U Ω hΩ).toLinearMap + (meanGram_injective_of_exact_normalization μ hQ U Ω hΩ A hA)).toContinuousLinearEquiv + +@[simp] theorem meanGramEquiv_apply [FiniteDimensional ℝ E] (v : E) : + meanGramEquiv μ hQ U Ω hΩ A hA v = sobolevMeanGram μ hQ U Ω hΩ v := rfl + +/-- The inverse Gram direction is exactly `A A* xi`, without a symmetry +assumption on the chosen normalizer. -/ +theorem meanGram_apply_normalizer_adjoint (xi : E) : + sobolevMeanGram μ hQ U Ω hΩ (A (A.toContinuousLinearMap.adjoint xi)) = xi := by + apply ext_inner_right ℝ + intro z + have h := congrArg (fun Q : E →L[ℝ] E => + ⟪A.symm z, Q (A.toContinuousLinearMap.adjoint xi)⟫_ℝ) hA + rw [sobolevMeanGram_comp] at h + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply, + ContinuousLinearMap.id_apply, real_inner_comm] using h + +@[simp] theorem meanGramEquiv_symm_apply [FiniteDimensional ℝ E] (xi : E) : + (meanGramEquiv μ hQ U Ω hΩ A hA).symm xi = A (A.toContinuousLinearMap.adjoint xi) := by + apply (meanGramEquiv μ hQ U Ω hΩ A hA).injective + exact (meanGramEquiv μ hQ U Ω hΩ A hA).apply_symm_apply xi |>.trans + (meanGram_apply_normalizer_adjoint μ hQ U Ω hΩ A hA xi).symm + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MeasuredRadialL2.lean b/lean/OAI/Geometry/RCD/Harmonic/MeasuredRadialL2.lean new file mode 100644 index 0000000000000000000000000000000000000000..abb1618600176a9db6d7551d7aba1eb42f3508a3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MeasuredRadialL2.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Harmonic.PointedRadialDistance + +namespace OAI + +/-! # The prescribed squared-radius values belong to the actual local L2 space -/ + +open Set Metric Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem measured_radial_memLp (μ : Measure X) {n : ℕ} {p : X} {r S ε : ℝ} + (hr : 0 ‖V x‖^2/2) 2 (μ.restrict (ball p (S*r))) := by + have hε : 0≤ε := dist_nonneg.trans hV.metric.1 + apply MemLp.of_bound (((continuous_norm.pow 2).div_const 2).measurable.comp hV.measurable).aestronglyMeasurable + ((S+2*ε)^2/2) + filter_upwards [ae_restrict_mem measurableSet_ball] with x hx + have hd := (abs_le.mp (pointed_radial_distance hr hS hV.metric hx.le)).2 + have hdr : dist x p/r≤S := (div_le_iff₀ hr).mpr hx.le + have hnx : ‖V x‖≤S+2*ε := by linarith + rw [Real.norm_eq_abs,abs_of_nonneg (div_nonneg (sq_nonneg _) (by norm_num))] + exact div_le_div_of_nonneg_right (pow_le_pow_left₀ (norm_nonneg _) hnx 2) (by norm_num) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MetricQuadraticError.lean b/lean/OAI/Geometry/RCD/Harmonic/MetricQuadraticError.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a2a5148f43737093a9e435aa518756eb093bde6 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MetricQuadraticError.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # Squared-distance value control from the actual metric approximation -/ + +open Metric +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] + +/-- A centered metric approximation controls the actual coordinate norm. -/ +theorem IsPointedApproximation.centered_norm_error {n : ℕ} {p : X} {r R ε : ℝ} + (hr : 0 < r) (hR : 0 ≤ R) {f : X → Euclidean n} + (hf : IsPointedApproximation p 0 r R ε f) (hfp : f p = 0) + {x : X} (hx : dist x p ≤ R * r) : + |‖f x‖ - dist x p / r| ≤ ε ∧ ‖f x‖ ≤ R + ε := by + have hpp : dist p p ≤ R * r := by simpa only [dist_self] using mul_nonneg hR hr.le + have hdist := hf.2.1 x p hx hpp + rw [hfp, dist_zero_right] at hdist + exact ⟨hdist, by linarith [(abs_le.mp hdist).2, (div_le_iff₀ hr).mpr hx]⟩ + +/-- Squaring the norm incurs only the explicit factor coming from the +bounded testing ball. This is the value estimate in radial convergence. -/ +theorem IsPointedApproximation.quadratic_value_error {n : ℕ} {p : X} {r R ε : ℝ} + (hr : 0 < r) (hR : 0 ≤ R) (hε : 0 ≤ ε) {f : X → Euclidean n} + (hf : IsPointedApproximation p 0 r R ε f) (hfp : f p = 0) + {x : X} (hx : dist x p ≤ R * r) : + |dist p x ^ 2 / 2 - r ^ 2 * ‖f x‖ ^ 2 / 2| ≤ + r ^ 2 * (ε * (2 * R + ε) / 2) := by + obtain ⟨hd, hn⟩ := hf.centered_norm_error hr hR hfp hx + have hd₀ : 0 ≤ dist x p / r := div_nonneg dist_nonneg hr.le + have hdR : dist x p / r ≤ R := (div_le_iff₀ hr).mpr hx + have hab : |dist x p / r + ‖f x‖| ≤ 2 * R + ε := by + rw [abs_of_nonneg (add_nonneg hd₀ (norm_nonneg _))] + linarith + have hsq : |(dist x p / r) ^ 2 - ‖f x‖ ^ 2| ≤ ε * (2 * R + ε) := by + rw [sq_sub_sq, abs_mul, abs_sub_comm] + exact (mul_le_mul hab hd (abs_nonneg _) (by positivity)).trans_eq (mul_comm _ _) + have heq : dist p x ^ 2 / 2 - r ^ 2 * ‖f x‖ ^ 2 / 2 = + (r ^ 2 / 2) * ((dist x p / r) ^ 2 - ‖f x‖ ^ 2) := by + rw [dist_comm p x] + field_simp + rw [heq, abs_mul, abs_of_nonneg (by positivity : 0 ≤ r ^ 2 / 2)] + have hh := mul_le_mul_of_nonneg_left hsq (by positivity : 0 ≤ r ^ 2 / 2) + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/MixedGramL1.lean b/lean/OAI/Geometry/RCD/Harmonic/MixedGramL1.lean new file mode 100644 index 0000000000000000000000000000000000000000..c41cbbb7c5cc42fd8aba8936e06ba5343c8495c9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/MixedGramL1.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Sobolev.SobolevQuadraticEnergy +import OAI.Geometry.RCD.Harmonic.WeightedCoreConvergence + +namespace OAI + +/-! # Three unit-direction energy limits identify each mixed Gram entry -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem mixed_defect_le {a b c p : ℝ} (h : 2*p=a+2*c+b) : + |c|≤|p-1|+|a-1|+|b-1| := by + apply abs_le.mpr + constructor <;> nlinarith [le_abs_self (p-1),neg_le_abs (p-1), + le_abs_self (a-1),neg_le_abs (a-1),le_abs_self (b-1),neg_le_abs (b-1), + abs_nonneg (a-1),abs_nonneg (b-1)] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem mixed_gram_l1_tendsto (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (A : ℕ → Set X) (hfin : ∀ k, μ (A k)≠⊤) (r c : ℕ → ℝ) (hc : ∀ k, 0≤c k) + (f g : ℕ → SobolevSpace μ hQ) + (hf : Tendsto (fun k => c k*∫ x in A k, |r k^2*localGamma μ hQ (f k) (f k) x-1| ∂μ) + atTop (𝓝 0)) + (hg : Tendsto (fun k => c k*∫ x in A k, |r k^2*localGamma μ hQ (g k) (g k) x-1| ∂μ) + atTop (𝓝 0)) + (hp : Tendsto (fun k => c k*∫ x in A k, + |r k^2*localGamma μ hQ ((Real.sqrt 2)⁻¹ • (f k+g k)) ((Real.sqrt 2)⁻¹ • (f k+g k)) x-1| ∂μ) + atTop (𝓝 0)) : + Tendsto (fun k => c k*∫ x in A k, |r k^2*localGamma μ hQ (f k) (g k) x| ∂μ) + atTop (𝓝 0) := by + let q := fun k => (Real.sqrt 2)⁻¹ • (f k+g k) + have hcoef : ((Real.sqrt 2)⁻¹)^2=(1/2:ℝ) := by + rw [inv_pow,Real.sq_sqrt (by norm_num)] + norm_num + have hpair (k : ℕ) : ∀ᵐ x ∂μ, + 2*(r k^2*localGamma μ hQ (q k) (q k) x)= + r k^2*localGamma μ hQ (f k) (f k) x+ + 2*(r k^2*localGamma μ hQ (f k) (g k) x)+r k^2*localGamma μ hQ (g k) (g k) x := by + have ha := localGamma_add_smul_square μ hQ (f k) (g k) 1 + simp only [one_smul,one_pow,mul_one,one_mul] at ha + filter_upwards [localGamma_smul_left μ hQ (Real.sqrt 2)⁻¹ (f k+g k) (q k), + localGamma_smul_right μ hQ (Real.sqrt 2)⁻¹ (f k+g k) (f k+g k),ha] with x hl hr hh + change 2*(r k^2*localGamma μ hQ ((Real.sqrt 2)⁻¹ • (f k+g k)) (q k) x)=_ + rw [hl,hr,hh] + linear_combination (2*r k^2*(localGamma μ hQ (f k) (f k) x+ + 2*localGamma μ hQ (f k) (g k) x+localGamma μ hQ (g k) (g k) x))*hcoef + have hi (u : ℕ → SobolevSpace μ hQ) (k : ℕ) : + IntegrableOn (fun x => |r k^2*localGamma μ hQ (u k) (u k) x-1|) (A k) μ := + (((localGamma_memL1 μ hQ (u k) (u k)).const_mul (r k^2)).integrableOn.sub + (integrableOn_const (hfin k))).abs + have hlim := hp.add (hf.add hg) + simp only [add_zero] at hlim + apply squeeze_zero (fun k => mul_nonneg (hc k) (integral_nonneg (fun x => abs_nonneg _))) _ hlim + intro k + have hupper := integral_mono_ae + (((localGamma_memL1 μ hQ (f k) (g k)).const_mul (r k^2)).abs.integrableOn) + ((hi q k).add ((hi f k).add (hi g k))) (by + filter_upwards [ae_restrict_of_ae (hpair k)] with x hx + simpa only [Pi.add_apply,add_assoc] using mixed_defect_le hx) + have hadd := integral_add (hi q k) ((hi f k).add (hi g k)) + have hadd' := integral_add (hi f k) (hi g k) + simp only [Pi.add_apply] at hupper hadd hadd' + rw [hadd,hadd'] at hupper + have hh := mul_le_mul_of_nonneg_left hupper (hc k) + simpa only [Pi.add_apply,mul_add,add_assoc] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/NearColumnDistance.lean b/lean/OAI/Geometry/RCD/Harmonic/NearColumnDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d26371a3e3390f862ef561dfb59adac9a1b9e4e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/NearColumnDistance.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.RCD.Harmonic.NearColumnNorm +import Mathlib.Topology.MetricSpace.Lipschitz + +namespace OAI + +/-! # A column estimate on nearby endpoints controls their actual distance -/ + +open Metric +open scoped InnerProductSpace +namespace RegularPointCoordinates + +theorem near_column_distance {X E : Type*} [PseudoMetricSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + (v : X → E) (x y x' y' : X) {C δ r e : ℝ} + (hC : 0≤C) (hr : 0 gramDefect_nonneg μ Q (u k)) hEI hE0 + let (k : ℕ) : IsProbabilityMeasure (π k) := hπ k + have hstart (k : ℕ) : ∀ᵐ z ∂(π k).map (fun γ => γ 0), dist z (p k)≤r k/12 := by + apply (ae_map_iff (measurable_path_eval 0).aemeasurable isClosed_closedBall.measurableSet).mpr + filter_upwards [hends k] with γ he + have hh := dist_triangle (γ 0) (x k) (p k) + nlinarith [hx k,(hδ k).2,hr k] + have hfinish (k : ℕ) : ∀ᵐ z ∂(π k).map (fun γ => γ 1), dist z (p k)≤r k/12 := by + apply (ae_map_iff (measurable_path_eval 1).aemeasurable isClosed_closedBall.measurableSet).mpr + filter_upwards [hends k] with γ he + have hh := dist_triangle (γ 1) (y k) (p k) + nlinarith [hy k,(hδ k).2,hr k] + have hcol (k : ℕ) : ∀ᵐ γ ∂π k, + ⟪v k (γ 1)-v k (γ 0),a k⟫_ℝ^2≤(dist (γ 0) (γ 1))^2*‖a k‖^2* + (1+∫ t in Icc (0:ℝ) 1, E k (geodesicExtension γ t)) := by + obtain ⟨C,hC,hc⟩ := hcomp k + exact hX.first_order_column_endpoint hn (hr k) (hε k) (hε1 k) (u k) (v k) (hsplit k) + (a k) (π k) (hgeo k) (hopt k) hC hc (hstart k) (hfinish k) + let P k γ := + (dist (γ 0) (x k)<δ k*r k/24 ∧ dist (γ 1) (y k)<δ k*r k/24 ∧ + ∀ t : Time, dist (γ t) (p k)≤r k/8) ∧ + (∀ i (t : Time), F k i γ t= + (v k (γ t) i-((1-(t:ℝ))*v k (γ 0) i+(t:ℝ)*v k (γ 1) i))/r k) ∧ + ⟪v k (γ 1)-v k (γ 0),a k⟫_ℝ^2≤(dist (γ 0) (γ 1))^2*‖a k‖^2* + (1+∫ t in Icc (0:ℝ) 1, E k (geodesicExtension γ t)) + have hP (k : ℕ) : ∀ᵐ γ ∂π k, P k γ := (hends k).and ((hFeq k).and (hcol k)) + obtain ⟨γ,e,hPγ,he,he0,_haff,hEγ⟩ := affine_spatial_selection π F E + (fun k => gramDefect_nonneg μ Q (u k)) hI hlim P hP + refine ⟨δ,e,γ,hδ,hδ0,he,he0,fun k => (hPγ k).1,?_⟩ + intro k + exact ((hPγ k).2.2).trans (mul_le_mul_of_nonneg_left (add_le_add le_rfl (hEγ k)) + (mul_nonneg (sq_nonneg _) (sq_nonneg _))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/NearbyMeanGrams.lean b/lean/OAI/Geometry/RCD/Harmonic/NearbyMeanGrams.lean new file mode 100644 index 0000000000000000000000000000000000000000..23e09c72ba7a9ca3c97b843a302ed21210823672 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/NearbyMeanGrams.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Harmonic.MeanGramControl + +namespace OAI + +/-! +# Comparing Gram means inside a common normalized region + +Averaged Gram errors on an enlarged ball restrict to nearby balls with only +the volume-ratio cost. If one coordinate normalization makes both resulting +means close to the identity, their original quadratic forms are close to each +other. These are the comparison steps after harmonic transformation. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem average_nonneg_le_of_subset {s t : Set X} + (hst : s ⊆ t) (hs0 : 0 < μ.real s) (ht0 : 0 < μ.real t) + {f : X → ℝ} (hf : IntegrableOn f t μ) (hnonneg : ∀ x, 0 ≤ f x) + {C ε : ℝ} (hε : 0 ≤ ε) (hvol : μ.real t ≤ C * μ.real s) + (havg : (μ.real t)⁻¹ * (∫ x in t, f x ∂μ) ≤ ε) : + (μ.real s)⁻¹ * (∫ x in s, f x ∂μ) ≤ C * ε := by + have hm : (∫ x in s, f x ∂μ) ≤ ∫ x in t, f x ∂μ := + setIntegral_mono_set hf (Filter.Eventually.of_forall hnonneg) (Filter.Eventually.of_forall hst) + have hb : (∫ x in t, f x ∂μ) ≤ μ.real t * ε := by + have hh := mul_le_mul_of_nonneg_left havg ht0.le + simpa only [← mul_assoc, mul_inv_cancel₀ ht0.ne', one_mul] using hh + calc + (μ.real s)⁻¹ * (∫ x in s, f x ∂μ) ≤ (μ.real s)⁻¹ * (μ.real t * ε) := + mul_le_mul_of_nonneg_left (hm.trans hb) (inv_nonneg.mpr hs0.le) + _ ≤ (μ.real s)⁻¹ * ((C * μ.real s) * ε) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hvol hε) (inv_nonneg.mpr hs0.le) + _ = C * ε := by field_simp + +variable [MetricSpace X] [BorelSpace X] [ProperSpace X] + (hQ : QuadraticCheegerEnergy μ) + +theorem meanGram_sub_id_norm_le_of_subset {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + {s t : Set X} (hs : MeasurableSet s) (hst : s ⊆ t) + (hszero : μ s ≠ 0) (hsfin : μ s ≠ ∞) (htzero : μ t ≠ 0) (htfin : μ t ≠ ∞) + {C ε : ℝ} (hC : 0 ≤ C) (hε : 0 ≤ ε) (hvol : μ.real t ≤ C * μ.real s) + (herror : ∀ i j : Fin n, (μ.real t)⁻¹ * ∫ x in t, + |localGamma μ hQ (u i) (u j) x - (if i = j then 1 else 0)| ∂μ ≤ ε) : + ‖sobolevMeanGram μ hQ (sobolevColumnMap μ hQ u) s hs - + ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ (n : ℝ) ^ 2 * (C * ε) := by + have hs0 : 0 < μ.real s := ENNReal.toReal_pos hszero hsfin + have ht0 : 0 < μ.real t := ENNReal.toReal_pos htzero htfin + apply meanGram_sub_id_norm_le μ hQ u s hs hszero hsfin (mul_nonneg hC hε) + intro i j + have hf : IntegrableOn (fun x => |localGamma μ hQ (u i) (u j) x - + (if i = j then 1 else 0)|) t μ := + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const htfin)).abs + exact average_nonneg_le_of_subset μ hst hs0 ht0 hf (fun _ => abs_nonneg _) hε hvol (herror i j) + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- A common approximately orthonormal coordinate change compares the +original means, including when their smallest eigenvalues are very small. -/ +theorem meanGrams_compare_from_common_normalization + (U : E →L[ℝ] SobolevSpace μ hQ) (A : E ≃L[ℝ] E) + (s t : Set X) (hs : MeasurableSet s) (ht : MeasurableSet t) + {δ : ℝ} (hδ0 : 0 ≤ δ) (hδ1 : δ ≤ 1) + (hsnorm : ‖sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) s hs - + ContinuousLinearMap.id ℝ E‖ ≤ δ) + (htnorm : ‖sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) t ht - + ContinuousLinearMap.id ℝ E‖ ≤ δ) (v : E) : + (1 - δ) * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ ≤ + (1 + δ) * ⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ ∧ + (1 - δ) * ⟪v, sobolevMeanGram μ hQ U t ht v⟫_ℝ ≤ + (1 + δ) * ⟪v, sobolevMeanGram μ hQ U s hs v⟫_ℝ := by + have hform (b : Set X) (hb : MeasurableSet b) : + ⟪A.symm v, sobolevMeanGram μ hQ (U.comp (A : E →L[ℝ] E)) b hb (A.symm v)⟫_ℝ = + ⟪v, sobolevMeanGram μ hQ U b hb v⟫_ℝ := by + rw [sobolevMeanGram_comp] + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right, + ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.apply_symm_apply] + have hslo := inner_lower_of_sub_id_norm _ hsnorm (A.symm v) + have hsup := inner_upper_of_sub_id_norm _ hsnorm (A.symm v) + have htlo := inner_lower_of_sub_id_norm _ htnorm (A.symm v) + have htup := inner_upper_of_sub_id_norm _ htnorm (A.symm v) + rw [hform s hs] at hslo hsup + rw [hform t ht] at htlo htup + have hpos : 0 ≤ 1 + δ := by linarith + have hnonneg : 0 ≤ 1 - δ := sub_nonneg.mpr hδ1 + constructor + · exact (mul_le_mul_of_nonneg_left hsup hnonneg).trans + (by nlinarith [mul_le_mul_of_nonneg_left htlo hpos]) + · exact (mul_le_mul_of_nonneg_left htup hnonneg).trans + (by nlinarith [mul_le_mul_of_nonneg_left hslo hpos]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/NeighborhoodGramEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/NeighborhoodGramEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4a589a15620ed7c903b868070980b31f10150ca --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/NeighborhoodGramEnvelope.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.ActualGramEnvelope + +namespace OAI + +/-! # One source-comparison constant throughout the regular neighborhood -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal Topology ENNReal + +noncomputable section +namespace RegularPointCoordinates + +private theorem volume_half_lower {v omega s : ℝ} {n : ℕ} + (hw : 0 < omega) (hs : 0 < s) (h : |v / (omega * s ^ n) - 1| ≤ 1 / 2) : + (omega / 2) * s ^ n ≤ v := by + have hd : 0 < omega * s ^ n := mul_pos hw (pow_pos hs n) + have hl := (abs_le.mp h).1 + have hq : (1 / 2 : ℝ) ≤ v / (omega * s ^ n) := by linarith + have hh := (le_div_iff₀ hd).mp hq + nlinarith only [hh] + +private theorem volume_half_upper {v omega s : ℝ} {n : ℕ} + (hw : 0 < omega) (hs : 0 < s) (h : |v / (omega * s ^ n) - 1| ≤ 1 / 2) : + v ≤ (3 / 2 * omega) * s ^ n := by + have hd : 0 < omega * s ^ n := mul_pos hw (pow_pos hs n) + have hl := (abs_le.mp h).2 + have hq : v / (omega * s ^ n) ≤ (3 / 2 : ℝ) := by linarith + have hh := (div_le_iff₀ hd).mp hq + nlinarith only [hh] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + {m : ℕ} {U : Euclidean (m + 2) →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean (m + 2))} {κ : ℝ} {p : X} + {R omega C₀ : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p (4 * R) L v) + (χ : GoodLaplacianCutoff μ hQ p (3 * R / 8) C₀) + +include G in +/-- A single finite comparison constant works at all nearby heat poles +and all sufficiently small testing balls, using the same harmonic data. -/ +theorem exists_neighborhood_gram_envelope_bound (hg : HasCoordinateHeatBounds μ ker) + (hdiff : HasGaussianHeatDifferenceBounds μ ker) (hR : 0 < R) (hR1 : R ≤ 1) + (homega : 0 < omega) + (hvolume : ∀ y, dist p y ≤ 16 * R → ∀ s, 0 < s → s ≤ 32 * R → + |μ.real (ball y s) / (omega * s ^ (m + 2)) - 1| ≤ 1 / 2) + {A : ℝ} (hA : 0 ≤ A) (lambda : ℝ) : + ∃ C : ℝ, 0 < C ∧ ∃ J : ℕ, ∀ i, J ≤ i → ∀ x ∈ ball p (R / 32), + ∀ q, dist x q ≤ A * (R / 2 ^ i) → ∀ v : Euclidean (m + 2), + |⟪v, (sobolevMeanGram μ hQ U (ball q (R / 2 ^ i)) measurableSet_ball - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos (div_pos hR (pow_pos (by norm_num : (0 : ℝ) < 2) i))) x lambda) v⟫_ℝ| ≤ + C * ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + obtain ⟨C, hC, hb⟩ := exists_actual_gram_envelope_bound μ hQ hk G χ hg hdiff + (by positivity) (by linarith) hA (show 0 < omega / 2 by positivity) + (show 0 ≤ 3 / 2 * omega by positivity) (show 0 < R / 4 by positivity) hR hR1 lambda + have hrad : Tendsto (fun i : ℕ => R / (2 : ℝ) ^ i) atTop (𝓝 0) := by + have h := (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 2) + (by norm_num : (1 / 2 : ℝ) < 1)).const_mul R + simpa only [mul_zero, div_eq_mul_inv, one_mul, inv_pow] using h + obtain ⟨J, hJ⟩ := eventually_atTop.mp (hrad.eventually_lt_const + (div_pos hR (by positivity : 0 < 8 * (A + 1)))) + refine ⟨C, hC, max 1 J, ?_⟩ + intro i hi x hx q hq v + have hi1 : 1 ≤ i := (le_max_left _ _).trans hi + have hiJ : J ≤ i := (le_max_right _ _).trans hi + let s := R / (2 : ℝ) ^ i + have hs : 0 < s := div_pos hR (by positivity) + have hsR : s ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsmall : (A + 1) * s < R / 8 := by + have hh := (lt_div_iff₀ (by positivity : 0 < 8 * (A + 1))).mp (hJ i hiJ) + change s * (8 * (A + 1)) < R at hh + nlinarith only [hh] + have hxp : dist x p < R / 32 := hx + have hpx : dist p x < R / 32 := by rwa [dist_comm] + have hqnear : dist p q ≤ 16 * R := by + have ht := dist_triangle p x q + have has : A * s ≤ (A + 1) * s := by nlinarith [hs.le] + change dist x q ≤ A * s at hq + linarith + refine hb i hi1 x q (isBounded_ball.measure_lt_top.ne) + (volume_half_lower homega hs (hvolume q hqnear s hs (by linarith))) hq ?_ ?_ ?_ ?_ ?_ ?_ v + · intro j + have hs' : 0 < R / (2 : ℝ) ^ j := div_pos hR (by positivity) + have hsR' : R / (2 : ℝ) ^ j ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + exact volume_half_upper homega hs' (hvolume x (by linarith) _ hs' (by linarith)) + · intro t ht htR z hz + have hzp : dist z x < R := hz + have hpz : dist p z ≤ 16 * R := by linarith [dist_triangle p x z, dist_comm z x] + have hroot : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht + have hrootR : Real.sqrt t ≤ R := by nlinarith [Real.sq_sqrt ht.le, Real.sqrt_nonneg t] + exact volume_half_lower homega hroot (hvolume z hpz _ hroot (by linarith)) + · intro z hz + have hzp : dist z p ≤ 2 * (3 * R / 8) := hz + change dist z x < R + linarith [dist_triangle z p x] + · intro z hz + apply χ.zero z + have hzx : R ≤ dist z x := by simpa only [mem_ball, not_lt] using hz + rw [dist_comm p z] + linarith [dist_triangle z p x] + · intro z hz _ + have ht := dist_triangle p x z + linarith + · intro z hz + apply χ.one + have hzq : dist z q < s := hz + change dist z p < 3 * R / 8 + have ht := dist_triangle z q x + have ht' := dist_triangle z x p + rw [dist_comm q x] at ht + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/NonlinearPairingVariation.lean b/lean/OAI/Geometry/RCD/Harmonic/NonlinearPairingVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fd360afb50dcff3a88b6107bfc90297c008564a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/NonlinearPairingVariation.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.RCD.Sobolev.WeightedIntegralPotential + +namespace OAI + +/-! # Varying L² pairings with a nonlinear scalar factor + +Only the original L² paths are differentiated. A bounded frozen weight +and the scalar Taylor remainder justify the nonlinear term. +-/ + +open Filter MeasureTheory +open scoped ENNReal NNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem inner_compLp_eq_weightedPotential (w f : Lp ℝ 2 μ) (θ : Lp ℝ ∞ μ) + (hθ : θ =ᵐ[μ] w) {Φ : ℝ → ℝ} {L : ℝ≥0} (hΦ : LipschitzWith L Φ) (hΦ0 : Φ 0=0) : + inner ℝ w (hΦ.compLp hΦ0 f) = weightedIntegralPotential μ θ Φ f := by + rw [L2.inner_def] + unfold weightedIntegralPotential + apply integral_congr_ae + filter_upwards [hθ,hΦ.coeFn_compLp hΦ0 f] with x hx hfx + simp only [Real.inner_apply,hfx,Function.comp_apply,hx] + +theorem nonlinear_pairing_hasDerivAt {F W : ℝ → Lp ℝ 2 μ} {F' W' : Lp ℝ 2 μ} {t : ℝ} + (hF : HasDerivAt F F' t) (hW : HasDerivAt W W' t) + (θ : Lp ℝ ∞ μ) (B : ℝ≥0) (hB : ∀ᵐ x ∂μ, |θ x| ≤ B) (hθ : θ =ᵐ[μ] W t) + {Φ φ : ℝ → ℝ} {L C : ℝ≥0} (hΦ : LipschitzWith L Φ) (hΦ0 : Φ 0=0) + (hd : ∀ a, HasDerivAt Φ (φ a) a) (hφ : LipschitzWith C φ) (hφ0 : φ 0=0) : + HasDerivAt (fun s => inner ℝ (W s) (hΦ.compLp hΦ0 (F s))) + (inner ℝ W' (hΦ.compLp hΦ0 (F t)) + + inner ℝ F' (lpMultiplier μ θ (hφ.compLp hφ0 (F t)))) t := by + have hfixed := (weightedIntegralPotential_hasFDerivAt μ θ B hB hd hΦ0 hφ hφ0 (F t)).comp_hasDerivAt t hF + simp only [innerSL_apply_apply] at hfixed + rw [real_inner_comm] at hfixed + have he : (fun s => inner ℝ (W t) (hΦ.compLp hΦ0 (F s))) = + (fun s => weightedIntegralPotential μ θ Φ (F s)) := by + funext s + exact inner_compLp_eq_weightedPotential μ (W t) (F s) θ hθ hΦ hΦ0 + apply hasDerivAt_inner_of_frozen hW + ((hΦ.continuous_compLp hΦ0).continuousAt.comp hF.continuousAt) + change HasDerivAt (fun s => inner ℝ (W t) (hΦ.compLp hΦ0 (F s))) _ t + rw [he] + exact hfixed + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/OperatorQuadraticDerivative.lean b/lean/OAI/Geometry/RCD/Harmonic/OperatorQuadraticDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5ae243d4ff91bff8fca665ecd39a88cc4c4fe93 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/OperatorQuadraticDerivative.lean @@ -0,0 +1,197 @@ +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion +import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap +import Mathlib.MeasureTheory.SpecificCodomains.Pi + +namespace OAI + +/-! +# Operator derivatives from finitely many quadratic tests + +Polarization uses only the coordinate vectors and their pairwise sums. +This lets the scalar harmonic heat equations supply an operator equation, +and lets finitely many annular error estimates control every direction. +-/ + +open scoped BigOperators InnerProductSpace Matrix.Norms.Elementwise + +noncomputable section + +namespace RegularPointCoordinates + +variable {n : ℕ} + +private def operatorEntries (A : Euclidean n →L[ℝ] Euclidean n) : + Matrix (Fin n) (Fin n) ℝ := fun i j => A (EuclideanSpace.single j 1) i + +private def matrixOperator : Matrix (Fin n) (Fin n) ℝ →L[ℝ] + (Euclidean n →L[ℝ] Euclidean n) := + (Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ)).toAlgEquiv.toLinearMap.toContinuousLinearMap + +private theorem matrixOperator_entries (A : Euclidean n →L[ℝ] Euclidean n) : + matrixOperator (operatorEntries A) = A := by + ext v i + change (∑ j : Fin n, A (EuclideanSpace.single j 1) i * v j) = A v i + have hv : v = ∑ j : Fin n, v j • EuclideanSpace.single j 1 := by + simpa only [EuclideanSpace.basisFun_repr, EuclideanSpace.basisFun_apply] using + ((EuclideanSpace.basisFun (Fin n) ℝ).sum_repr v).symm + have hAv : A v = ∑ j : Fin n, v j • A (EuclideanSpace.single j 1) := by + conv_lhs => rw [hv] + simp only [map_sum, map_smul] + rw [hAv] + change _ = (WithLp.ofLp (∑ j, v j • A (EuclideanSpace.single j 1))) i + simp only [WithLp.ofLp_sum, WithLp.ofLp_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] + exact Finset.sum_congr rfl fun j _ => mul_comm _ _ + +/-- The entry of a symmetric operator is obtained by real polarization. -/ +theorem symmetric_entry_polarization (A : Euclidean n →L[ℝ] Euclidean n) + (hA : A.IsSymmetric) (i j : Fin n) : + A (EuclideanSpace.single j 1) i = (1 / 2 : ℝ) * + (⟪EuclideanSpace.single i 1 + EuclideanSpace.single j 1, + A (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)⟫_ℝ - + ⟪EuclideanSpace.single i 1, A (EuclideanSpace.single i 1)⟫_ℝ - + ⟪EuclideanSpace.single j 1, A (EuclideanSpace.single j 1)⟫_ℝ) := by + let ei : Euclidean n := EuclideanSpace.single i 1 + let ej : Euclidean n := EuclideanSpace.single j 1 + have hs : ⟪ei, A ej⟫_ℝ = ⟪ej, A ei⟫_ℝ := by + calc + ⟪ei, A ej⟫_ℝ = ⟪A ei, ej⟫_ℝ := (hA ei ej).symm + _ = ⟪ej, A ei⟫_ℝ := real_inner_comm _ _ + have he : ⟪ei, A ej⟫_ℝ = A (EuclideanSpace.single j 1) i := by + simp only [ei, ej, EuclideanSpace.inner_single_left, conj_trivial, one_mul] + change _ = (1 / 2 : ℝ) * (⟪ei + ej, A (ei + ej)⟫_ℝ - ⟪ei, A ei⟫_ℝ - ⟪ej, A ej⟫_ℝ) + simp only [map_add, inner_add_left, inner_add_right, ← hs] + linarith + +private def polarizedMatrix (d : Euclidean n → ℝ) : Matrix (Fin n) (Fin n) ℝ := + Matrix.of fun i j => (1 / 2 : ℝ) * + (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d (EuclideanSpace.single i 1) - d (EuclideanSpace.single j 1)) + +/-- The operator formed by polarizing candidate quadratic derivatives. -/ +def polarizedDerivative (d : Euclidean n → ℝ) : Euclidean n →L[ℝ] Euclidean n := + matrixOperator (polarizedMatrix d) + +/-- Integrability of the finite polarization follows from its scalar tests. -/ +theorem integrable_polarizedDerivative {X : Type*} [MeasurableSpace X] + (μ : MeasureTheory.Measure X) (d : X → Euclidean n → ℝ) + (hs : ∀ i, MeasureTheory.Integrable (fun x => d x (EuclideanSpace.single i 1)) μ) + (hp : ∀ i j, MeasureTheory.Integrable (fun x => + d x (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)) μ) : + MeasureTheory.Integrable (fun x => polarizedDerivative (d x)) μ := by + have hm : MeasureTheory.Integrable (fun x => + (fun i j : Fin n => (1 / 2 : ℝ) * + (d x (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d x (EuclideanSpace.single i 1) - d x (EuclideanSpace.single j 1)))) μ := by + apply MeasureTheory.Integrable.of_eval + intro i + apply MeasureTheory.Integrable.of_eval + intro j + exact (((hp i j).sub (hs i)).sub (hs j)).const_mul _ + exact (matrixOperator (n := n)).integrable_comp hm + +/-- The finite polarization is symmetric, even before a quadratic identity is known. -/ +theorem polarizedDerivative_isSymmetric (d : Euclidean n → ℝ) : + (polarizedDerivative d).IsSymmetric := by + change (Matrix.toEuclideanLin (polarizedMatrix d)).IsSymmetric + apply Matrix.isSymmetric_toEuclideanLin_iff.mpr + ext i j + change (1 / 2 : ℝ) * (d (EuclideanSpace.single j 1 + EuclideanSpace.single i 1) - + d (EuclideanSpace.single j 1) - d (EuclideanSpace.single i 1)) = + (1 / 2 : ℝ) * (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d (EuclideanSpace.single i 1) - d (EuclideanSpace.single j 1)) + rw [add_comm (EuclideanSpace.single j 1)] + ring + +theorem polarizedDerivative_add (d e : Euclidean n → ℝ) : + polarizedDerivative (fun v => d v + e v) = polarizedDerivative d + polarizedDerivative e := by + have hm : polarizedMatrix (fun v => d v + e v) = polarizedMatrix d + polarizedMatrix e := by + ext i j + change (1 / 2 : ℝ) * ((_ + _) - (_ + _) - (_ + _)) = _ + dsimp [polarizedMatrix] + ring + exact (congrArg matrixOperator hm).trans (map_add matrixOperator _ _) + +theorem polarizedDerivative_sub (d e : Euclidean n → ℝ) : + polarizedDerivative (fun v => d v - e v) = polarizedDerivative d - polarizedDerivative e := by + have hm : polarizedMatrix (fun v => d v - e v) = polarizedMatrix d - polarizedMatrix e := by + ext i j + change (1 / 2 : ℝ) * ((_ - _) - (_ - _) - (_ - _)) = _ + dsimp [polarizedMatrix] + ring + exact (congrArg matrixOperator hm).trans (map_sub matrixOperator _ _) + +theorem polarizedDerivative_smul (a : ℝ) (d : Euclidean n → ℝ) : + polarizedDerivative (fun v => a * d v) = a • polarizedDerivative d := by + have hm : polarizedMatrix (fun v => a * d v) = a • polarizedMatrix d := by + ext i j + change (1 / 2 : ℝ) * (a * _ - a * _ - a * _) = a * _ + dsimp [polarizedMatrix] + ring + exact (congrArg matrixOperator hm).trans (map_smul matrixOperator a _) + +/-- Polarization recovers an existing symmetric operator exactly. -/ +theorem polarizedDerivative_quadratic_form (A : Euclidean n →L[ℝ] Euclidean n) + (hA : A.IsSymmetric) : polarizedDerivative (fun v => ⟪v, A v⟫_ℝ) = A := by + have hm : polarizedMatrix (fun v => ⟪v, A v⟫_ℝ) = operatorEntries A := by + ext i j + exact (symmetric_entry_polarization A hA i j).symm + exact (congrArg matrixOperator hm).trans (matrixOperator_entries A) + +/-- Only the coordinate vectors and their pairwise sums are needed for +a uniform bound on the polarized operator. -/ +theorem polarizedDerivative_norm_le (d : Euclidean n → ℝ) {ε : ℝ} (hε : 0 ≤ ε) + (hsingle : ∀ i, |d (EuclideanSpace.single i 1)| ≤ ε) + (hpair : ∀ i j, |d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)| ≤ ε) : + ‖polarizedDerivative d‖ ≤ (n : ℝ) ^ 2 * (3 / 2 * ε) := by + change ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) _‖ ≤ _ + apply matrix_euclidean_norm_le_of_entries _ (by positivity) + intro i j + change |(1 / 2 : ℝ) * (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d (EuclideanSpace.single i 1) - d (EuclideanSpace.single j 1))| ≤ _ + rw [abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2)] + have hh := abs_sub (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d (EuclideanSpace.single i 1)) (d (EuclideanSpace.single j 1)) + have hh' := abs_sub (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)) + (d (EuclideanSpace.single i 1)) + have hi := hsingle i + have hj := hsingle j + have hij := hpair i j + linarith + +/-- Finitely many differentiable quadratic tests determine the derivative +of a symmetric operator-valued curve. -/ +theorem hasDerivAt_operator_of_quadratic {Q : ℝ → (Euclidean n →L[ℝ] Euclidean n)} + (hQ : ∀ t, (Q t).IsSymmetric) {t : ℝ} (d : Euclidean n → ℝ) + (hd : ∀ v, HasDerivAt (fun s => ⟪v, Q s v⟫_ℝ) (d v) t) : + HasDerivAt Q (polarizedDerivative d) t := by + have he (i j : Fin n) : HasDerivAt (fun s => operatorEntries (Q s) i j) + ((1 / 2 : ℝ) * (d (EuclideanSpace.single i 1 + EuclideanSpace.single j 1) - + d (EuclideanSpace.single i 1) - d (EuclideanSpace.single j 1))) t := by + have hh := (((hd (EuclideanSpace.single i 1 + EuclideanSpace.single j 1)).sub + (hd (EuclideanSpace.single i 1))).sub (hd (EuclideanSpace.single j 1))).const_mul (1 / 2) + apply hh.congr_of_eventuallyEq + exact Filter.Eventually.of_forall fun s => symmetric_entry_polarization (Q s) (hQ s) i j + have hm := hasDerivAt_pi.mpr (fun i => hasDerivAt_pi.mpr (fun j => he i j)) + have h := (matrixOperator (n := n)).hasFDerivAt.comp_hasDerivAt t hm + apply h.congr_of_eventuallyEq + exact Filter.Eventually.of_forall fun s => (matrixOperator_entries (Q s)).symm + +/-- The resulting operator derivative agrees with all quadratic tests, +including directions that were not used in its finite construction. -/ +theorem polarizedDerivative_quadratic {Q : ℝ → (Euclidean n →L[ℝ] Euclidean n)} + (hQ : ∀ t, (Q t).IsSymmetric) {t : ℝ} (d : Euclidean n → ℝ) + (hd : ∀ v, HasDerivAt (fun s => ⟪v, Q s v⟫_ℝ) (d v) t) (v : Euclidean n) : + ⟪v, polarizedDerivative d v⟫_ℝ = d v := by + have hD := hasDerivAt_operator_of_quadratic hQ d hd + have hv := hD.clm_apply (hasDerivAt_const t v) + have hinner := (hasDerivAt_const t v).inner ℝ hv + simp only [inner_zero_left, map_zero, add_zero] at hinner + exact hinner.unique (hd v) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PathAffineResidual.lean b/lean/OAI/Geometry/RCD/Harmonic/PathAffineResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d3673f712cf0fe1a8bc3b5d9d4485c43c23b16e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PathAffineResidual.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Sobolev.TimeUniformMean + +namespace OAI + +/-! # Continuous normalized affine residuals along actual paths -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] + +def pathAffineResidual (U : C(X,ℝ)) (r : ℝ) (γ : C(Time,X)) : C(Time,ℝ) := + r⁻¹ • (U.comp γ- + ((U (γ 0)) • (1-⟨fun t : Time => (t:ℝ),continuous_subtype_val⟩)+ + (U (γ 1)) • ⟨fun t : Time => (t:ℝ),continuous_subtype_val⟩)) + +theorem pathAffineResidual_apply (U : C(X,ℝ)) (r : ℝ) (γ : C(Time,X)) (t : Time) : + pathAffineResidual U r γ t=(U (γ t)-((1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1)))/r := by + simp only [pathAffineResidual,ContinuousMap.smul_apply,ContinuousMap.sub_apply, + ContinuousMap.add_apply,ContinuousMap.comp_apply,ContinuousMap.one_apply, + ContinuousMap.coe_mk,smul_eq_mul] + ring + +theorem pathAffineResidual_continuous (U : C(X,ℝ)) (r : ℝ) : + Continuous (pathAffineResidual U r) := by + let τ : C(Time,ℝ) := ⟨fun t => (t:ℝ),continuous_subtype_val⟩ + have h0 : Continuous (fun γ : C(Time,X) => U (γ 0)) := + U.continuous.comp (continuous_eval_const 0) + have h1 : Continuous (fun γ : C(Time,X) => U (γ 1)) := + U.continuous.comp (continuous_eval_const 1) + have hc : Continuous (fun γ : C(Time,X) => + U.comp γ-(U (γ 0) • (1-τ)+U (γ 1) • τ)) := + (ContinuousMap.continuous_postcomp U).sub + ((h0.smul continuous_const).add (h1.smul continuous_const)) + exact hc.const_smul r⁻¹ + +theorem pathAffineResidual_norm_le (U : C(X,ℝ)) {r A : ℝ} (hr : 0 < r) (hA : 0 ≤ A) + (hU : ∀ x, |U x| ≤ A) (γ : C(Time,X)) : ‖pathAffineResidual U r γ‖ ≤ 3*A/r := by + apply (ContinuousMap.norm_le _ (by positivity)).mpr + intro t + rw [Real.norm_eq_abs,pathAffineResidual_apply,abs_div,abs_of_pos hr] + apply (div_le_div_iff_of_pos_right hr).mpr + have h0 : |(1-(t:ℝ))*U (γ 0)| ≤ A := by + rw [abs_mul,abs_of_nonneg (sub_nonneg.mpr t.property.2)] + exact (mul_le_mul_of_nonneg_left (hU _) (sub_nonneg.mpr t.property.2)).trans + (mul_le_of_le_one_left hA (by linarith [t.property.1])) + have h1 : |(t:ℝ)*U (γ 1)| ≤ A := by + rw [abs_mul,abs_of_nonneg t.property.1] + exact (mul_le_mul_of_nonneg_left (hU _) t.property.1).trans (mul_le_of_le_one_left hA t.property.2) + have hb : |U (γ t)-((1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1))| ≤ + |U (γ t)|+|(1-(t:ℝ))*U (γ 0)|+|(t:ℝ)*U (γ 1)| := by + have hh := abs_sub_le (U (γ t)) 0 ((1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1)) + simp only [sub_zero,zero_sub,abs_neg] at hh + linarith [abs_add_le ((1-(t:ℝ))*U (γ 0)) ((t:ℝ)*U (γ 1))] + linarith [hU (γ t)] + +theorem pathAffineResidual_lipschitz (U : C(X,ℝ)) {r : ℝ} (hr : 0 < r) + (γ : C(Time,X)) (hγ : IsGeodesic γ) {S : Set X} (hstay : ∀ t : Time, γ t∈S) + {L D : ℝ≥0} (hU : LipschitzOnWith L U S) + (hlen : dist (γ 0) (γ 1) ≤ (D:ℝ)*r) : + LipschitzWith (2*L*D) (pathAffineResidual U r γ) := by + apply LipschitzWith.of_dist_le_mul + intro s t + rw [Real.dist_eq,pathAffineResidual_apply,pathAffineResidual_apply] + have heq : (U (γ s)-((1-(s:ℝ))*U (γ 0)+(s:ℝ)*U (γ 1)))/r- + (U (γ t)-((1-(t:ℝ))*U (γ 0)+(t:ℝ)*U (γ 1)))/r = + ((U (γ s)-U (γ t))-((s:ℝ)-(t:ℝ))*(U (γ 1)-U (γ 0)))/r := by ring + rw [heq,abs_div,abs_of_pos hr] + apply (div_le_iff₀ hr).mpr + have hst : |U (γ s)-U (γ t)| ≤ (L:ℝ)*dist s t*dist (γ 0) (γ 1) := by + have hh := hU.dist_le_mul (γ s) (hstay s) (γ t) (hstay t) + rw [Real.dist_eq,hγ s t] at hh + exact hh.trans_eq (by change _=(L:ℝ)*|(s:ℝ)-(t:ℝ)| * dist (γ 0) (γ 1); ring) + have h01 : |U (γ 1)-U (γ 0)| ≤ (L:ℝ)*dist (γ 0) (γ 1) := by + rw [abs_sub_comm] + exact hU.dist_le_mul (γ 0) (hstay 0) (γ 1) (hstay 1) + have ht : |((s:ℝ)-(t:ℝ))*(U (γ 1)-U (γ 0))| ≤ + dist s t*((L:ℝ)*dist (γ 0) (γ 1)) := by + rw [abs_mul] + exact mul_le_mul_of_nonneg_left h01 (abs_nonneg _) + have htri := abs_sub_le (U (γ s)-U (γ t)) 0 + (((s:ℝ)-(t:ℝ))*(U (γ 1)-U (γ 0))) + simp only [sub_zero,zero_sub,abs_neg] at htri + have hlen' := mul_le_mul_of_nonneg_left hlen + (mul_nonneg L.coe_nonneg (dist_nonneg (x := s) (y := t))) + change _ ≤ (2*(L:ℝ)*(D:ℝ))*dist s t*r + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PinchingEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/PinchingEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..98610f72e0a6e8e2f4b90046affaac3f7348372a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PinchingEnvelope.lean @@ -0,0 +1,209 @@ +import OAI.Geometry.RCD.Coordinates.WeightedConvolution +import Mathlib.Data.Nat.Dist +import Mathlib.Topology.Algebra.InfiniteSum.Real + +namespace OAI + +/-! +# Construction of the summable pinching envelope + +The positive floor and the two geometric convolutions in +`pi:definition-E` are constructed here from a nonnegative summable +Poisson-defect sequence. No summability of square roots is assumed. +-/ + +open scoped BigOperators + +noncomputable section + +namespace RegularPointCoordinates + +def forwardDefect (σ η : ℝ) (P : ℕ → ℝ) (i : ℕ) : ℝ := + η * σ ^ i + ∑ j ∈ Finset.range (i + 1), σ ^ (i - j) * P j + +def symmetricDefect (ρ : ℝ) (P : ℕ → ℝ) (i : ℕ) : ℝ := + ∑' j, ρ ^ Nat.dist i j * P j + +def pinchingEnvelope (ρ σ η : ℝ) (P : ℕ → ℝ) : ℕ → ℝ := + symmetricDefect ρ (forwardDefect σ η P) + +theorem forwardDefect_nonneg {σ η : ℝ} (hσ : 0 ≤ σ) (hη : 0 ≤ η) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (i : ℕ) : + 0 ≤ forwardDefect σ η P i := + add_nonneg (mul_nonneg hη (pow_nonneg hσ _)) + (Finset.sum_nonneg fun j _ => mul_nonneg (pow_nonneg hσ _) (hP j)) + +theorem le_forwardDefect {σ η : ℝ} (hσ : 0 ≤ σ) (hη : 0 ≤ η) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (i : ℕ) : + P i ≤ forwardDefect σ η P i := by + have h := Finset.single_le_sum + (fun j (_ : j ∈ Finset.range (i + 1)) => mul_nonneg (pow_nonneg hσ (i - j)) (hP j)) + (Finset.mem_range.mpr (Nat.lt_succ_self i)) + simp only [Nat.sub_self, pow_zero, one_mul] at h + exact h.trans (le_add_of_nonneg_left (mul_nonneg hη (pow_nonneg hσ i))) + +theorem forwardDefect_budget {σ η : ℝ} (hσ : 0 ≤ σ) (hσ1 : σ < 1) + (hη : 0 ≤ η) {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) : + Summable (forwardDefect σ η P) ∧ + (∑' i, forwardDefect σ η P i) ≤ (1 - σ)⁻¹ * (η + ∑' i, P i) := by + have hg : Summable (fun i : ℕ => σ ^ i) := summable_geometric_of_lt_one hσ hσ1 + have hgvalue : (∑' i : ℕ, σ ^ i) = (1 - σ)⁻¹ := tsum_geometric_of_lt_one hσ hσ1 + have hfinite (k : ℕ) : + (∑ i ∈ Finset.range k, forwardDefect σ η P i) ≤ + (1 - σ)⁻¹ * (η + ∑' i, P i) := by + have hgeom := hg.sum_le_tsum (Finset.range k) (fun i _ => pow_nonneg hσ i) + rw [hgvalue] at hgeom + have hsum := hPs.sum_le_tsum (Finset.range k) (fun i _ => hP i) + have hconv := weighted_geometric_stationary_convolution_le k P hP hσ hσ1 + have hcoeff : 0 ≤ (1 - σ)⁻¹ := by positivity + simp only [forwardDefect, Finset.sum_add_distrib, ← Finset.mul_sum] + have he := mul_le_mul_of_nonneg_left hgeom hη + have hp := mul_le_mul_of_nonneg_left hsum hcoeff + nlinarith + exact ⟨summable_of_sum_range_le (forwardDefect_nonneg hσ hη hP) hfinite, + Real.tsum_le_of_sum_range_le (forwardDefect_nonneg hσ hη hP) hfinite⟩ + +/-- A geometric kernel on the nonnegative integers has a uniform row +sum bound, also at rows next to the endpoint. -/ +theorem geometric_distance_sum_le {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + (i : ℕ) (s : Finset ℕ) : + (∑ j ∈ s, ρ ^ Nat.dist i j) ≤ 2 * (1 - ρ)⁻¹ := by + classical + have hg : Summable (fun k : ℕ => ρ ^ k) := summable_geometric_of_lt_one hρ hρ1 + have hgv : (∑' k : ℕ, ρ ^ k) = (1 - ρ)⁻¹ := tsum_geometric_of_lt_one hρ hρ1 + let left := s.filter (fun j => j ≤ i) + let right := s.filter (fun j => ¬ j ≤ i) + have hl : (∑ j ∈ left, ρ ^ Nat.dist i j) ≤ (1 - ρ)⁻¹ := by + have hinj : Set.InjOn (fun j => i - j) left := by + intro a ha b hb hab + have ha' := (Finset.mem_filter.mp ha).2 + have hb' := (Finset.mem_filter.mp hb).2 + change i - a = i - b at hab + omega + calc + _ = ∑ j ∈ left, ρ ^ (i - j) := by + apply Finset.sum_congr rfl + intro j hj + rw [Nat.dist_eq_sub_of_le_right (Finset.mem_filter.mp hj).2] + _ = ∑ k ∈ left.image (fun j => i - j), ρ ^ k := (Finset.sum_image hinj).symm + _ ≤ ∑' k : ℕ, ρ ^ k := hg.sum_le_tsum _ (fun k _ => pow_nonneg hρ k) + _ = _ := hgv + have hr : (∑ j ∈ right, ρ ^ Nat.dist i j) ≤ (1 - ρ)⁻¹ := by + have hinj : Set.InjOn (fun j => j - i) right := by + intro a ha b hb hab + have ha' := (Finset.mem_filter.mp ha).2 + have hb' := (Finset.mem_filter.mp hb).2 + change a - i = b - i at hab + omega + calc + _ = ∑ j ∈ right, ρ ^ (j - i) := by + apply Finset.sum_congr rfl + intro j hj + rw [Nat.dist_eq_sub_of_le (Nat.le_of_lt (Nat.lt_of_not_ge (Finset.mem_filter.mp hj).2))] + _ = ∑ k ∈ right.image (fun j => j - i), ρ ^ k := (Finset.sum_image hinj).symm + _ ≤ ∑' k : ℕ, ρ ^ k := hg.sum_le_tsum _ (fun k _ => pow_nonneg hρ k) + _ = _ := hgv + have he := Finset.sum_filter_add_sum_filter_not s (fun j => j ≤ i) + (fun j => ρ ^ Nat.dist i j) + change (∑ j ∈ left, ρ ^ Nat.dist i j) + (∑ j ∈ right, ρ ^ Nat.dist i j) = _ at he + linarith + +theorem geometric_distance_summable {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + (i : ℕ) : Summable (fun j => ρ ^ Nat.dist i j) := + summable_of_sum_le (fun _ => pow_nonneg hρ _) (geometric_distance_sum_le hρ hρ1 i) + +theorem geometric_distance_tsum_le {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + (i : ℕ) : (∑' j, ρ ^ Nat.dist i j) ≤ 2 * (1 - ρ)⁻¹ := + Real.tsum_le_of_sum_le (fun _ => pow_nonneg hρ _) (geometric_distance_sum_le hρ hρ1 i) + +theorem symmetricDefect_budget {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) : + Summable (symmetricDefect ρ P) ∧ + (∑' i, symmetricDefect ρ P i) ≤ 2 * (1 - ρ)⁻¹ * ∑' i, P i := by + have hcol (j : ℕ) : Summable (fun i => ρ ^ Nat.dist i j * P j) := by + simpa only [Nat.dist_comm] using (geometric_distance_summable hρ hρ1 j).mul_right (P j) + have hcolbound (j : ℕ) : (∑' i, ρ ^ Nat.dist i j * P j) ≤ + 2 * (1 - ρ)⁻¹ * P j := by + rw [tsum_mul_right] + simpa only [Nat.dist_comm] using mul_le_mul_of_nonneg_right + (geometric_distance_tsum_le hρ hρ1 j) (hP j) + have hnonneg : ∀ p : ℕ × ℕ, 0 ≤ ρ ^ Nat.dist p.2 p.1 * P p.1 := + fun p => mul_nonneg (pow_nonneg hρ _) (hP _) + have hcols : Summable (fun j => ∑' i, ρ ^ Nat.dist i j * P j) := + Summable.of_nonneg_of_le (fun j => tsum_nonneg (fun i => hnonneg (j, i))) + hcolbound (hPs.mul_left (2 * (1 - ρ)⁻¹)) + have hprod : Summable (fun p : ℕ × ℕ => ρ ^ Nat.dist p.2 p.1 * P p.1) := + (summable_prod_of_nonneg hnonneg).mpr ⟨hcol, hcols⟩ + have hrows := (summable_prod_of_nonneg + (fun p : ℕ × ℕ => hnonneg (p.2, p.1))).mp hprod.prod_symm + refine ⟨hrows.2, ?_⟩ + change (∑' i, ∑' j, ρ ^ Nat.dist i j * P j) ≤ _ + have hprod' : Summable (Function.uncurry fun j i => ρ ^ Nat.dist i j * P j) := hprod + rw [hprod'.tsum_comm] + calc + _ ≤ ∑' j, 2 * (1 - ρ)⁻¹ * P j := hcols.tsum_le_tsum hcolbound + (hPs.mul_left (2 * (1 - ρ)⁻¹)) + _ = _ := tsum_mul_left + +theorem symmetricDefect_nonneg {ρ : ℝ} (hρ : 0 ≤ ρ) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (i : ℕ) : + 0 ≤ symmetricDefect ρ P i := + tsum_nonneg fun j => mul_nonneg (pow_nonneg hρ _) (hP j) + +theorem symmetricDefect_row_summable {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) (i : ℕ) : + Summable (fun j => ρ ^ Nat.dist i j * P j) := by + exact Summable.of_nonneg_of_le + (fun j => mul_nonneg (pow_nonneg hρ _) (hP j)) + (fun j => mul_le_of_le_one_left (hP j) (pow_le_one₀ hρ hρ1.le)) hPs + +theorem term_le_symmetricDefect {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) (i j : ℕ) : + ρ ^ Nat.dist i j * P j ≤ symmetricDefect ρ P i := + (symmetricDefect_row_summable hρ hρ1 hP hPs i).le_tsum j + (fun k _ => mul_nonneg (pow_nonneg hρ _) (hP k)) + +theorem le_symmetricDefect {ρ : ℝ} (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) (i : ℕ) : + P i ≤ symmetricDefect ρ P i := by + have h := term_le_symmetricDefect hρ hρ1 hP hPs i i + simpa only [Nat.dist_self, pow_zero, one_mul] using h + +/-- The two convolutions produce exactly the summability and positive +floor needed when choosing patch centers. The total is uniform whenever +the original Poisson-defect budget is uniform. -/ +theorem pinchingEnvelope_spec {ρ σ η : ℝ} + (hρ : 0 < ρ) (hρ1 : ρ < 1) (hσ : 0 ≤ σ) (hσ1 : σ < 1) (hη : 0 < η) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) : + Summable (pinchingEnvelope ρ σ η P) ∧ + (∑' i, pinchingEnvelope ρ σ η P i) ≤ + (2 * (1 - ρ)⁻¹) * (1 - σ)⁻¹ * (η + ∑' i, P i) ∧ + ∀ i, P i ≤ pinchingEnvelope ρ σ η P i ∧ + η * ρ ^ i ≤ pinchingEnvelope ρ σ η P i ∧ + 0 < pinchingEnvelope ρ σ η P i := by + have hf := forwardDefect_budget hσ hσ1 hη.le hP hPs + have hn := forwardDefect_nonneg hσ hη.le hP + have he := symmetricDefect_budget hρ.le hρ1 hn hf.1 + refine ⟨he.1, ?_, fun i => ?_⟩ + · have hc : 0 ≤ 2 * (1 - ρ)⁻¹ := by positivity + exact he.2.trans (by simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hf.2 hc) + · have hdom : P i ≤ pinchingEnvelope ρ σ η P i := + (le_forwardDefect hσ hη.le hP i).trans + (le_symmetricDefect hρ.le hρ1 hn hf.1 i) + have h0 : η ≤ forwardDefect σ η P 0 := by + simpa [forwardDefect] using le_add_of_nonneg_right (hP 0) (a := η) + have hterm := term_le_symmetricDefect hρ.le hρ1 hn hf.1 i 0 + have hfloor : η * ρ ^ i ≤ pinchingEnvelope ρ σ η P i := by + simp only [Nat.dist_zero_right] at hterm + calc + η * ρ ^ i = ρ ^ i * η := mul_comm _ _ + _ ≤ ρ ^ i * forwardDefect σ η P 0 := + mul_le_mul_of_nonneg_left h0 (pow_nonneg hρ.le i) + _ ≤ _ := hterm + exact ⟨hdom, hfloor, (mul_pos hη (pow_pos hρ i)).trans_le hfloor⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PinchingFromProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/PinchingFromProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b5e01495acebec5d1fe2f0db7e9f5eb06eabf0c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PinchingFromProjection.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Sobolev.MeanGradient +import OAI.Geometry.RCD.Sobolev.ScalarAbsorption + +namespace OAI + +/-! +# From a sharp projection to directional mass + +The residual energy, constant-direction estimate and mass estimates are +kept explicit. The coefficient-recovery step uses the actual normalized +Sobolev Gram. The local Bochner estimates supplying the other hypotheses +are not asserted here. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (U : E →L[ℝ] SobolevSpace μ hQ) (s : Set X) (hs : MeasurableSet s) + +/-- The constant-direction error and the sharp projection energy control +the difference between the true coordinate displacement and the fitted +linear coefficient. All errors remain squared. -/ +theorem coefficient_recovery_sq + (hnormal : sobolevMeanGram μ hQ U s hs = ContinuousLinearMap.id ℝ E) + (f : SobolevSpace μ hQ) (b δ : E) {e d : ℝ} + (henergy : (μ.real s)⁻¹ * ∫ x in s, + (SobolevSpace.minimalSlope μ hQ (f - U b) x) ^ 2 ∂μ ≤ e) + (hdirection : ‖meanGradientVector μ hQ U s hs f - δ‖ ^ 2 ≤ d) : + ‖δ - b‖ ^ 2 ≤ 2 * (d + e) := by + have hb := (meanGradientVector_coefficient_error μ hQ U s hs hnormal f b).trans henergy + have hid : δ - b = -(meanGradientVector μ hQ U s hs f - δ) + + (meanGradientVector μ hQ U s hs f - b) := by abel + have hnorm := norm_add_le (-(meanGradientVector μ hQ U s hs f - δ)) + (meanGradientVector μ hQ U s hs f - b) + rw [← hid, norm_neg] at hnorm + have hsquare := (sq_le_sq₀ (norm_nonneg _) (add_nonneg (norm_nonneg _) (norm_nonneg _))).mpr hnorm + nlinarith [sq_nonneg (‖meanGradientVector μ hQ U s hs f - δ‖ - + ‖meanGradientVector μ hQ U s hs f - b‖)] + +/-- Transfer small mass from the fitted coefficient to the actual +coordinate displacement. This also allows a singular local mass form. -/ +theorem directional_mass_of_projection + (hnormal : sobolevMeanGram μ hQ U s hs = ContinuousLinearMap.id ℝ E) + (f : SobolevSpace μ hQ) (b δ : E) (D : E →L[ℝ] E) + (hD : D.IsPositive) {e d m K : ℝ} (hK : 0 ≤ K) + (henergy : (μ.real s)⁻¹ * ∫ x in s, + (SobolevSpace.minimalSlope μ hQ (f - U b) x) ^ 2 ∂μ ≤ e) + (hdirection : ‖meanGradientVector μ hQ U s hs f - δ‖ ^ 2 ≤ d) + (hmass : ⟪b, D b⟫_ℝ ≤ m) + (hupper : ∀ v, ⟪v, D v⟫_ℝ ≤ K * ‖v‖ ^ 2) : + ⟪δ, D δ⟫_ℝ ≤ 2 * m + 4 * K * (d + e) := by + have hcoeff := coefficient_recovery_sq μ hQ U s hs hnormal f b δ henergy hdirection + have herr := (hupper (δ - b)).trans (mul_le_mul_of_nonneg_left hcoeff hK) + let v := δ - b + have hp := hD.inner_nonneg_right (b - v) + have hsym : ⟪v, D b⟫_ℝ = ⟪b, D v⟫_ℝ := by + rw [real_inner_comm, hD.inner_left_eq_inner_right] + have hid : δ = b + v := by dsimp [v]; abel + have he : ⟪δ, D δ⟫_ℝ = ⟪b, D b⟫_ℝ + + 2 * ⟪b, D v⟫_ℝ + ⟪v, D v⟫_ℝ := by + conv_lhs => rw [hid] + simp only [map_add, inner_add_left, inner_add_right, hsym] + ring + simp only [map_sub, inner_sub_left, inner_sub_right, hsym] at hp + change ⟪v, D v⟫_ℝ ≤ K * (2 * (d + e)) at herr + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PinchingPairingRestriction.lean b/lean/OAI/Geometry/RCD/Harmonic/PinchingPairingRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..508c880c74018cd71342fc4a47c601c2f760b169 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PinchingPairingRestriction.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Coordinates.RegularPinchingFrame +import OAI.Geometry.RCD.Sobolev.PoissonSpanLinearLift +import OAI.Geometry.RCD.Coordinates.RadialFitRestriction +import OAI.Geometry.RCD.Coordinates.CenteredNormalization + +namespace OAI + +/-! # The actual direction pairings in the small mass-test frame -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Removing the local constant does not change the exact frame used by +full-mass pinching. Both frame changes act on the original coordinate map. -/ +theorem uncentered_frame_normalization {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (eta : SobolevSpace μ hQ) (z : Euclidean n) + (F N : Euclidean n ≃L[ℝ] Euclidean n) (Ω : Set X) (hΩ : MeasurableSet Ω) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hN : IsExactMeanNormalization μ hQ + ((centeredSobolevMap μ hQ u eta z).comp F.toContinuousLinearMap) Ω hΩ N) : + sobolevMeanGram μ hQ ((sobolevColumnMap μ hQ u).comp + (F.toContinuousLinearMap.comp N.toContinuousLinearMap)) Ω hΩ = + ContinuousLinearMap.id ℝ (Euclidean n) := by + have hU := centered_transformed_columnMap μ hQ u F eta z + rw [← hU] at hN + unfold IsExactMeanNormalization at hN + rw [sobolevMeanGram_comp, centeredColumn_meanGram μ hQ _ Ω hΩ _ eta heta, + ← sobolevMeanGram_comp, sobolevColumnMap_transformed] at hN + simpa only [ContinuousLinearMap.comp_assoc] using hN + +omit [BorelSpace X] [ProperSpace X] in +/-- Restriction and a bounded exact frame preserve the actual constant +pairing, with only the square root of the volume loss. -/ +theorem pinching_pairing_restrict {n : ℕ} {Ω Ω' : Set X} (hsub : Ω' ⊆ Ω) + (hfin : μ Ω ≠ ∞) (hfin' : μ Ω' ≠ ∞) + (hpos : 0 < μ.real Ω) (hpos' : 0 < μ.real Ω') + (eta : SobolevSpace μ hQ) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω'] fun _ => (1 : ℝ)) + (G : Euclidean n →L[ℝ] SobolevSpace μ hQ) (delta : Euclidean n) + (N : Euclidean n ≃L[ℝ] Euclidean n) (hN : ‖N.toContinuousLinearMap‖ ≤ 2) + {C D : ℝ} (hC : 0 ≤ C) (hD : 0 ≤ D) (hvol : μ.real Ω ≤ C * μ.real Ω') + (hfit : ∀ b, ‖normalizeLocalL2 μ Ω hfin + (SobolevSpace.restrictLp μ hQ Ω (G b - ⟪delta, b⟫_ℝ • eta))‖ ≤ D * ‖b‖) : + ∀ b, ‖normalizeLocalL2 μ Ω' hfin' + (SobolevSpace.restrictLp μ hQ Ω' ((G.comp N.toContinuousLinearMap) b) - + ⟪N.toContinuousLinearMap.adjoint delta, b⟫_ℝ • restrictedOne μ Ω' hfin')‖ ≤ + (2 * Real.sqrt C * D) * ‖b‖ := by + intro b + have hnorm : ‖N b‖ ≤ 2 * ‖b‖ := + (N.toContinuousLinearMap.le_opNorm b).trans (mul_le_mul_of_nonneg_right hN (norm_nonneg b)) + have hbound := (hfit (N b)).trans (mul_le_mul_of_nonneg_left hnorm hD) + have hbound2 := (sq_le_sq₀ (norm_nonneg _) (by positivity : 0 ≤ D * (2 * ‖b‖))).mpr hbound + have hsmall := normalized_fit_restrict_sq μ hQ hsub hfin hfin' hpos hpos' + (G (N b) - ⟪delta, N b⟫_ℝ • eta) (sq_nonneg (D * (2 * ‖b‖))) hvol hbound2 + have hsmall' : ‖normalizeLocalL2 μ Ω' hfin' + (SobolevSpace.restrictLp μ hQ Ω' (G (N b) - ⟪delta, N b⟫_ℝ • eta))‖ ≤ + (2 * Real.sqrt C * D) * ‖b‖ := by + apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mp + apply hsmall.trans_eq + simp only [mul_pow, Real.sq_sqrt hC] + ring + rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_left, + ← restrictLp_eq_one_of_representative μ hQ eta Ω' hfin' heta, + ← map_smul, ← map_sub] + exact hsmall' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PinchingTail.lean b/lean/OAI/Geometry/RCD/Harmonic/PinchingTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a55cf9961dd0febe2e75851b5eb862bbbe2bcee --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PinchingTail.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Harmonic.PinchingEnvelope + +namespace OAI + +/-! # Inward square-root tails are controlled by the summable envelope + +Only the defect itself needs to be summable. Its square root need not be. +The extra decay from the radii controls the inward tail of affine constants. +-/ + +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +theorem geometric_sqrt_tail_le {ρ τ : ℝ} (hρ : 0 < ρ) (hρ1 : ρ < 1) + (hτ : 0 ≤ τ) (hτρ : τ < Real.sqrt ρ) + {P : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hPs : Summable P) (i d : ℕ) : + Summable (fun k : ℕ => τ ^ k * Real.sqrt (P (i + d + k))) ∧ + (∑' k : ℕ, τ ^ k * Real.sqrt (P (i + d + k))) ≤ + (1 - τ / Real.sqrt ρ)⁻¹ * + (Real.sqrt (symmetricDefect ρ P i) / (Real.sqrt ρ) ^ d) := by + let E := symmetricDefect ρ P i + let s := Real.sqrt ρ + have hs : 0 < s := Real.sqrt_pos.mpr hρ + have hE : 0 ≤ E := symmetricDefect_nonneg hρ.le hP i + have hratio0 : 0 ≤ τ / s := div_nonneg hτ hs.le + have hratio1 : τ / s < 1 := (div_lt_one hs).mpr hτρ + have hbound (k : ℕ) : τ ^ k * Real.sqrt (P (i + d + k)) ≤ + (τ / s) ^ k * (Real.sqrt E / s ^ d) := by + have hterm := term_le_symmetricDefect hρ.le hρ1 hP hPs i (i + d + k) + have hdist : Nat.dist i (i + d + k) = d + k := by + rw [Nat.dist_eq_sub_of_le (by omega)] + omega + rw [hdist] at hterm + have hsquare : (s ^ (d + k) * Real.sqrt (P (i + d + k))) ^ 2 ≤ (Real.sqrt E) ^ 2 := by + rw [mul_pow, ← pow_mul, Nat.mul_comm (d + k) 2, pow_mul, + show s ^ 2 = ρ from Real.sq_sqrt hρ.le, Real.sq_sqrt (hP _), Real.sq_sqrt hE] + exact hterm + have hroot : s ^ (d + k) * Real.sqrt (P (i + d + k)) ≤ Real.sqrt E := + (sq_le_sq₀ (by positivity) (Real.sqrt_nonneg _)).mp hsquare + have hdiv : Real.sqrt (P (i + d + k)) ≤ Real.sqrt E / s ^ (d + k) := + (le_div_iff₀ (pow_pos hs _)).mpr (by simpa only [mul_comm] using hroot) + calc + _ ≤ τ ^ k * (Real.sqrt E / s ^ (d + k)) := + mul_le_mul_of_nonneg_left hdiv (pow_nonneg hτ _) + _ = _ := by rw [div_pow, pow_add]; field_simp + have hg : Summable (fun k : ℕ => (τ / s) ^ k * (Real.sqrt E / s ^ d)) := + (summable_geometric_of_lt_one hratio0 hratio1).mul_right _ + have ht := Summable.of_nonneg_of_le (fun k => by positivity) hbound hg + refine ⟨ht, ?_⟩ + calc + _ ≤ ∑' k : ℕ, (τ / s) ^ k * (Real.sqrt E / s ^ d) := ht.tsum_le_tsum hbound hg + _ = _ := by rw [tsum_mul_right, tsum_geometric_of_lt_one hratio0 hratio1] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PointedAffineLimitApproximation.lean b/lean/OAI/Geometry/RCD/Harmonic/PointedAffineLimitApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca1975f07a1e7d920c38a258e0d94768676af6a7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PointedAffineLimitApproximation.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Harmonic.PointedAffineValueLimit +import OAI.Geometry.RCD.Metric.PointedIsometricPerturbation +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # Centered maps with an affine isometric limit are pointed approximations -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem pointed_affine_limit_approximation {n : ℕ} (μ : Measure X) [μ.IsOpenPosMeasure] + (hQ : QuadraticCheegerEnergy μ) + (p : ℕ → X) (r ε : ℕ → ℝ) (V v : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : ∀ k, 0 ≤ ε k) (hεlim : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsPointedApproximation (p k) 0 (r k) 5 (ε k) (V k)) + (w : Fin n → ℕ → SobolevSpace μ hQ) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) (5*r k))) (hzero : ∀ k, v k (p k)=0) + (hrep : ∀ i k, SobolevSpace.toLp μ hQ (w i k) =ᵐ[μ.restrict (ball (p k) (5*r k))] + fun x => v k x i) + (g : Fin n → Euclidean n → ℝ) (T : Euclidean n ≃ₗᵢ[ℝ] Euclidean n) + (haff : ∀ i z, z ∈ ball (0 : Euclidean n) 3 → g i z=g i 0+T z i) + (hconv : ∀ i W, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp μ hQ (w i k) x-g i (V k x)| ≤ δ) : + ∀ τ : ℝ, 0 < τ → ∀ᶠ k in atTop, + IsPointedApproximation (p k) 0 (r k) (5/2) τ (v k) := by + intro τ hτ + let η := τ/8 + let c : Euclidean n := WithLp.toLp 2 (fun i => g i 0) + have hη : 0 < η := by dsimp only [η]; positivity + have hval := pointed_affine_value_limit μ hQ p r ε V v hr hεlim hV w hv hrep g T haff hconv + (by norm_num : (0:ℝ)<11/4) (by norm_num : (11/4:ℝ)<3) η hη + filter_upwards [hval,hεlim.eventually (eventually_lt_nhds (show (0:ℝ)<τ/10 by positivity))] + with k hk hsmall + have hVp : ‖V k (p k)‖ ≤ ε k := by simpa only [dist_zero_right] using (hV k).1 + have hc0 : ‖c+T (V k (p k))‖ ≤ η := by + have hh := hk (p k) (mem_ball_self (mul_pos (by norm_num) (hr k))) + simpa only [hzero k,dist_zero_left] using hh + have hcnorm : ‖c‖ ≤ η+ε k := by + have hh := norm_sub_le (c+T (V k (p k))) (T (V k (p k))) + rw [add_sub_cancel_right,T.norm_map] at hh + linarith + have hclose : ∀ x, dist x (p k) ≤ (5/2)*r k → + dist (v k x) (T (V k x)) ≤ 2*η+ε k := by + intro x hx + have hin : x ∈ ball (p k) ((11/4)*r k) := by + change dist x (p k)<(11/4)*r k + nlinarith [hr k] + have hvx := hk x hin + have hd := dist_triangle (v k x) (c+T (V k x)) (T (V k x)) + have he : dist (c+T (V k x)) (T (V k x))=‖c‖ := by + rw [dist_eq_norm,add_sub_cancel_right] + rw [he] at hd + linarith + have hp := pointed_isometric_perturbation (hr k) (by norm_num : (0:ℝ)≤5/2) + (by norm_num : (5/2:ℝ)≤5) (hε k) (by linarith [hε k] : 0≤2*η+ε k) + (hV k) T (hzero k) hclose + apply hp.mono_error + dsimp only [η] at * + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PointedAffineValueLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/PointedAffineValueLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b013982d592419bb926efc6293a9302c5f7120d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PointedAffineValueLimit.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.RCD.Harmonic.ContinuousApproximateRepresentative +import OAI.Geometry.RCD.Coordinates.EuclideanCoordinateBound + +namespace OAI + +/-! # The affine harmonic limit controls the prescribed continuous maps -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem pointed_affine_value_limit {n : ℕ} (μ : Measure X) [μ.IsOpenPosMeasure] + (hQ : QuadraticCheegerEnergy μ) + (p : ℕ → X) (r ε : ℕ → ℝ) (V v : ℕ → X → Euclidean n) + (hr : ∀ k, 0 < r k) (hε : Tendsto ε atTop (𝓝 0)) + (hV : ∀ k, IsPointedApproximation (p k) 0 (r k) 5 (ε k) (V k)) + (w : Fin n → ℕ → SobolevSpace μ hQ) + (hv : ∀ k, ContinuousOn (v k) (ball (p k) (5*r k))) + (hrep : ∀ i k, SobolevSpace.toLp μ hQ (w i k) =ᵐ[μ.restrict (ball (p k) (5*r k))] + fun x => v k x i) + (g : Fin n → Euclidean n → ℝ) (T : Euclidean n ≃ₗᵢ[ℝ] Euclidean n) + (haff : ∀ i z, z ∈ ball (0 : Euclidean n) 3 → g i z=g i 0+T z i) + (hconv : ∀ i W, 0 < W → W < 5 → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp μ hQ (w i k) x-g i (V k x)| ≤ δ) + {ρ : ℝ} (hρ : 0 < ρ) (hρ3 : ρ < 3) : + let c : Euclidean n := WithLp.toLp 2 (fun i => g i 0) + ∀ η : ℝ, 0 < η → ∀ᶠ k in atTop, ∀ x ∈ ball (p k) (ρ*r k), + dist (v k x) (c+T (V k x)) ≤ η := by + dsimp only + let c : Euclidean n := WithLp.toLp 2 (fun i => g i 0) + intro η hη + let δ := η/(2*((n : ℝ)+1)) + have hδ : 0 < δ := by dsimp only [δ]; positivity + have hnδ : (n : ℝ)*δ ≤ η/2 := by + have h1 : ((n : ℝ)+1)*δ=η/2 := by dsimp only [δ]; field_simp + nlinarith [hδ] + have hvalues : ∀ᶠ k in atTop, ∀ i : Fin n, + ∀ᵐ x ∂μ.restrict (ball (p k) (ρ*r k)), + |SobolevSpace.toLp μ hQ (w i k) x-g i (V k x)| ≤ δ := + eventually_all.mpr (fun i => hconv i ρ hρ (by linarith) δ hδ) + filter_upwards [hvalues,hε.eventually (eventually_lt_nhds (show (0:ℝ)<(3-ρ)/2 by linarith)), + hε.eventually (eventually_lt_nhds (half_pos hη))] with k hk hroom hsmall + have hs : ball (p k) (ρ*r k) ⊆ ball (p k) (5*r k) := + ball_subset_ball (mul_le_mul_of_nonneg_right (by linarith : ρ≤5) (hr k).le) + have hAE : ∀ᵐ x ∂μ.restrict (ball (p k) (ρ*r k)), + dist (v k x) (c+T (V k x)) ≤ (n : ℝ)*δ := by + have hall := ae_all_iff.mpr hk + have hrepall := ae_all_iff.mpr (fun i => ae_restrict_of_ae_restrict_of_subset hs (hrep i k)) + filter_upwards [hall,hrepall,ae_restrict_mem measurableSet_ball] with x hval hrepr hx + rw [dist_eq_norm] + apply euclidean_norm_le_card_mul + intro i + have hb := (abs_le.mp (pointed_radial_distance (hr k) (by norm_num : (0:ℝ)≤5) + (hV k) ((hs hx).le))).2 + have hdx : dist x (p k)/r k < ρ := (div_lt_iff₀ (hr k)).mpr hx + have hx3 : V k x ∈ ball (0 : Euclidean n) 3 := by + simp only [mem_ball,dist_zero_right] + linarith + have hi := hval i + rw [hrepr i,haff i _ hx3] at hi + change |v k x i-(g i 0+T (V k x) i)| ≤ δ + exact hi + have hF : ∀ x ∈ ball (p k) (ρ*r k), ∀ y ∈ ball (p k) (ρ*r k), + dist (c+T (V k x)) (c+T (V k y)) ≤ (r k)⁻¹*dist x y+ε k := by + intro x hx y hy + rw [dist_add_left,T.dist_map] + have hh := (abs_le.mp ((hV k).2.1 x y (hs hx).le (hs hy).le)).2 + simp only [div_eq_inv_mul] at hh + linarith + intro x hx + have hb := continuous_approximate_representative μ isOpen_ball (v k) + (fun y => c+T (V k y)) ((hv k).mono hs) hF hAE x hx + exact hb.trans (by linarith) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/PointedRadialDistance.lean b/lean/OAI/Geometry/RCD/Harmonic/PointedRadialDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..e398dc66bf723dd56c6e06baed00ab7b2d670344 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/PointedRadialDistance.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Metric.MeasuredApproximation + +namespace OAI + +/-! # Radial control and inner-ball comparison for the prescribed maps -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] + +theorem pointed_radial_distance {n : ℕ} {p : X} {r S ε : ℝ} + (hr : 0 ENNReal.ofReal (ρ x)))] + {B : ℝ} (hz : ∀ᵐ x ∂μ, |z x| ≤ B) : + |∫ x, z x*ρ x ∂μ| ≤ B := by + let ν := μ.withDensity (fun x => ENNReal.ofReal (ρ x)) + have hν : ∀ᵐ x ∂ν, ‖z x‖ ≤ B := by + simpa only [Real.norm_eq_abs] using + hz.filter_mono (withDensity_absolutelyContinuous μ _).ae_le + have hb := norm_integral_le_of_norm_le_const hν + have he : (∫ x, z x ∂ν) = ∫ x, z x*ρ x ∂μ := by + rw [integral_withDensity_eq_integral_toReal_smul hρ.ennreal_ofReal + (Eventually.of_forall fun _ => ENNReal.ofReal_lt_top)] + simp only [ENNReal.toReal_ofReal (hρ0 _),smul_eq_mul,mul_comm] + rw [he,Real.norm_eq_abs] at hb + simpa only [ν,Measure.real,measure_univ,ENNReal.toReal_one,mul_one] using hb + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProductProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/ProductProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a72afa5ec8d1322c63ac67c03d09d376b842533 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProductProjection.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Harmonic.ProductProjectionSmallFactor + +namespace OAI + +/-! # Full-dimensional product approximations give actual coordinates + +The modulus depends only on the dimension and requested error. No ambient +Euclidean approximation or residual-factor geometry is assumed. +-/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.product_projection_of_packing {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {η : ℝ} (hη : 0 < η) : + ∃ ε : ℝ, 0 < ε ∧ ∀ (Z : Type*) (dZ : MetricSpace Z), letI := dZ + ∀ (p : X) (z₀ : Z) (r : ℝ), 0 < r → -1 ≤ K*(4*r)^2 → + ∀ f : X → WithLp 2 (Euclidean n × Z), + IsPointedApproximation p (WithLp.toLp 2 (0,z₀)) r 1 ε f → + IsPointedApproximation p 0 r (1/16) η (fun x => (f x).fst) := by + let a := η/4 + have ha : 0 < a := by dsimp only [a]; positivity + obtain ⟨δ,hδ,hfactor⟩ := hX.residual_factor_small hn ha + let ε := min δ (min (1/16) (η/12)) + have he : 0 < ε := lt_min hδ (lt_min (by norm_num) (by positivity)) + have heδ : ε ≤ δ := min_le_left _ _ + have he16 : ε ≤ 1/16 := (min_le_right _ _).trans (min_le_left _ _) + have heη : ε ≤ η/12 := (min_le_right _ _).trans (min_le_right _ _) + refine ⟨ε,he,?_⟩ + intro Z dZ p z₀ r hr hcurv f hf + have hsmall := hfactor Z dZ p z₀ r hr hcurv f (hf.mono_error heδ) + apply (product_projection_small_factor hr he.le he16 ha.le hf hsmall).mono_error + dsimp only [a] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProductProjectionSmallFactor.lean b/lean/OAI/Geometry/RCD/Harmonic/ProductProjectionSmallFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0701b1f8080e2530de9fb3ffdcccdd6ccbea8ca --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProductProjectionSmallFactor.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Harmonic.ResidualCollapse + +namespace OAI + +/-! # Projecting a product approximation with a small residual fiber -/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates + +private theorem product_dist_le_sum {A Z : Type*} [MetricSpace A] [MetricSpace Z] + (x y : WithLp 2 (A × Z)) : + dist x y ≤ dist x.fst y.fst+dist x.snd y.snd := by + rw [metric_product_distance_L2] + apply (Real.sqrt_le_iff).mpr + constructor + · positivity + · nlinarith [dist_nonneg (x := x.fst) (y := y.fst), + dist_nonneg (x := x.snd) (y := y.snd)] + +/-- A small residual fiber suffices for a coordinate approximation on a +fixed inner ball. The larger source ball is retained for target density. -/ +theorem product_projection_small_factor {X Z : Type*} [MetricSpace X] [MetricSpace Z] + {n : ℕ} {p : X} {z₀ : Z} {r ε a : ℝ} (hr : 0 < r) (he : 0 ≤ ε) + (he16 : ε ≤ 1/16) (ha : 0 ≤ a) + {f : X → WithLp 2 (Euclidean n × Z)} + (hf : IsPointedApproximation p (WithLp.toLp 2 (0,z₀)) r 1 ε f) + (hsmall : ∀ z : Z, dist z₀ z ≤ 1/4 → dist z₀ z ≤ a) : + IsPointedApproximation p 0 r (1/16) (3*ε+2*a) (fun x => (f x).fst) := by + have hpp : dist p p ≤ 1*r := by simpa using hr.le + have hlarge {x : X} (hx : dist x p ≤ 1/16*r) : dist x p ≤ 1*r := by linarith + have hzbound {x : X} (hx : dist x p ≤ 1/16*r) : dist (f x).snd z₀ ≤ a := by + have hd := (abs_le.mp (hf.2.1 x p (hlarge hx) hpp)).2 + have ht := dist_triangle (f x) (f p) (WithLp.toLp 2 (0,z₀)) + have hp := WithLp.dist_snd_le (f x) (WithLp.toLp 2 (0,z₀)) + change dist (f x).snd z₀ ≤ _ at hp + have hxq : dist x p/r ≤ 1/16 := (div_le_iff₀ hr).mpr hx + have hh : dist z₀ (f x).snd ≤ 1/4 := by rw [dist_comm]; linarith [hf.1] + simpa only [dist_comm z₀] using hsmall (f x).snd hh + refine ⟨(WithLp.dist_fst_le (f p) (WithLp.toLp 2 (0,z₀))).trans + (hf.1.trans (by linarith)),?_,?_⟩ + · intro x y hx hy + have hd := abs_le.mp (hf.2.1 x y (hlarge hx) (hlarge hy)) + have hlo := WithLp.dist_fst_le (f x) (f y) + have hup := product_dist_le_sum (f x) (f y) + have hz := dist_triangle (f x).snd z₀ (f y).snd + rw [dist_comm z₀ (f y).snd] at hz + have hxy : dist (f x).snd (f y).snd ≤ 2*a := by + linarith [hzbound hx,hzbound hy] + exact abs_le.mpr ⟨by linarith,by linarith⟩ + · intro y hy + have hylarge : dist (WithLp.toLp 2 (y,z₀)) (WithLp.toLp 2 (0,z₀)) ≤ 1-ε := by + rw [metric_prod_same_second] + linarith + obtain ⟨x,hx,hxy⟩ := hf.2.2 (WithLp.toLp 2 (y,z₀)) hylarge + refine ⟨x,?_,(WithLp.dist_fst_le (f x) (WithLp.toLp 2 (y,z₀))).trans + (hxy.trans (by linarith))⟩ + have hd := (abs_le.mp (hf.2.1 x p hx hpp)).1 + have ht := dist_triangle (f x) (WithLp.toLp 2 (y,z₀)) (f p) + have ht' := dist_triangle (WithLp.toLp 2 (y,z₀)) (WithLp.toLp 2 (0,z₀)) (f p) + rw [metric_prod_same_second,dist_comm (WithLp.toLp 2 ((0:Euclidean n),z₀)) (f p)] at ht' + apply (div_le_iff₀ hr).mp + linarith [hf.1] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProjectionFailureSequence.lean b/lean/OAI/Geometry/RCD/Harmonic/ProjectionFailureSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..98834b047fbcff80f41f6f6704023e345d064adb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProjectionFailureSequence.lean @@ -0,0 +1,62 @@ +import Mathlib.Topology.Sequences +import Mathlib.Analysis.SpecificLimits.Basic +import Mathlib.Tactic + +namespace OAI + +/-! # Selecting the normalized counterexample sequence for sharp projection -/ + +open Filter +open scoped Topology + +noncomputable section +namespace RegularPointCoordinates + +/-- Failure of every uniform late-space bound gives increasingly +Euclidean configurations whose source error is negligible relative to +the residual. Positivity of the source floor guarantees valid division. -/ +theorem projection_failure_sequence_with_ratio_bound {I : Type*} (epsilon residual source : I → ℝ) + (hε : ∀ i, 0 ≤ epsilon i) (hs : ∀ i, 0 < source i) + (hfail : ¬∃ C : ℝ, 0 < C ∧ ∃ δ : ℝ, 0 < δ ∧ + ∀ i, epsilon i < δ → residual i ≤ C * source i) : + ∃ q : ℕ → I, (∀ j, 0 < residual (q j)) ∧ + Tendsto (epsilon ∘ q) atTop (𝓝 0) ∧ + Tendsto (fun j => source (q j) / residual (q j)) atTop (𝓝 0) ∧ + (∀ j, source (q j) / residual (q j) ≤ 1) := by + classical + push Not at hfail + have hchoice (j : ℕ) : ∃ i, epsilon i < 1 / ((j : ℝ) + 1) ∧ + ((j : ℝ) + 1) * source i < residual i := + hfail ((j : ℝ) + 1) (by positivity) (1 / ((j : ℝ) + 1)) (by positivity) + choose q hqε hq using hchoice + have hpos (j : ℕ) : 0 < residual (q j) := + (mul_pos (by positivity) (hs (q j))).trans (hq j) + have hb (j : ℕ) : source (q j) / residual (q j) ≤ 1 / ((j : ℝ) + 1) := by + apply le_of_lt + apply (div_lt_div_iff₀ (hpos j) (by positivity : 0 < (j : ℝ) + 1)).mpr + nlinarith only [hq j] + refine ⟨q, hpos, ?_, ?_, ?_⟩ + · exact squeeze_zero (fun j => hε (q j)) (fun j => (hqε j).le) + tendsto_one_div_add_atTop_nhds_zero_nat + · exact squeeze_zero (fun j => div_nonneg (hs (q j)).le (hpos j).le) hb + tendsto_one_div_add_atTop_nhds_zero_nat + · intro j + exact (hb j).trans ((div_le_one (by positivity : 0 < (j : ℝ) + 1)).mpr (by have := (Nat.cast_nonneg j : (0 : ℝ) ≤ (j : ℝ)); linarith)) + +/-- The failure sequence without the additional pointwise ratio bound. -/ +theorem projection_failure_sequence {I : Type*} (epsilon residual source : I → ℝ) + (hε : ∀ i, 0 ≤ epsilon i) (hs : ∀ i, 0 < source i) + (hfail : ¬∃ C : ℝ, 0 < C ∧ ∃ δ : ℝ, 0 < δ ∧ + ∀ i, epsilon i < δ → residual i ≤ C * source i) : + ∃ q : ℕ → I, (∀ j, 0 < residual (q j)) ∧ + Tendsto (epsilon ∘ q) atTop (𝓝 0) ∧ + Tendsto (fun j => source (q j) / residual (q j)) atTop (𝓝 0) := by + obtain ⟨q, hq, hlimit, hratio, _⟩ := + projection_failure_sequence_with_ratio_bound epsilon residual source hε hs hfail + exact ⟨q, hq, hlimit, hratio⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProjectionLimitContradiction.lean b/lean/OAI/Geometry/RCD/Harmonic/ProjectionLimitContradiction.lean new file mode 100644 index 0000000000000000000000000000000000000000..d421489bb56c4fde5270871c9229deb85a113747 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProjectionLimitContradiction.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Sobolev.PoissonHarmonicCompactnessInput +import OAI.Geometry.RCD.Sobolev.EulerOrthogonality + +namespace OAI + +/-! # Orthogonal residuals retain their nonzero norm in the limit -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +/-- Once the actual equation has been passed to the Euclidean limit, +the finite moments from the same compactness subsequence give the sharp +projection contradiction. Any nonzero normalization is allowed. -/ +theorem PoissonHarmonicLimit.no_nonzero_orthogonal_euler_limit + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + {S : ℝ} {p : ℕ → X} {r : ℕ → ℝ} + {u : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic} + {V : ℕ → X → Euclidean n} {w f : ℕ → SobolevSpace (hausdorff n X) hX.quadratic} + {model : EuclideanHarmonicModel n S} (hlimit : PoissonHarmonicLimit hX S p r u V w f model) + (hS : 0 < S) {ρ : ℝ} (hρ : 0 < ρ) (hρS : ρ < S) + (L : Euclidean n →L[ℝ] ℝ) (k : ℝ) + (heuler : ∀ x ∈ ball 0 S, fderiv ℝ model.value x x = model.value x + L x + k) + {c : ℝ} (hc : c ≠ 0) + (hnorm : Tendsto (fun i => + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) none, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) none⟫_ℝ) + atTop (𝓝 c)) + (horth : ∀ i j, + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) none, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (some j)⟫_ℝ = 0) : + False := by + have ho (j : Option (Fin n)) : + ⟪model.moments hρS.le none, model.moments hρS.le (some j)⟫_ℝ = 0 := by + have hz : Tendsto (fun i => + ⟪localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) none, + localAffineMomentFamily (hausdorff n X) hX.quadratic (u i) (w i) + (ball (p i) (ρ * r i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (some j)⟫_ℝ) + atTop (𝓝 0) := by + simpa only [horth] using (tendsto_const_nhds : Tendsto (fun _i : ℕ => (0 : ℝ)) atTop (𝓝 0)) + exact tendsto_nhds_unique (hlimit.moments ρ hρ hρS none (some j)) hz + have hn := tendsto_nhds_unique hnorm (hlimit.moments ρ hρ hρS none none) + exact hc (hn.trans (model.euler_orthogonal_norm_zero hS hρS.le L k heuler + (ho none) (fun j => ho (some j)))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProjectionRadialRows.lean b/lean/OAI/Geometry/RCD/Harmonic/ProjectionRadialRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd38181ab9184dc2ad5918dd19575228f055eb65 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProjectionRadialRows.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.RCD.Coordinates.LinearRadialFits +import OAI.Geometry.RCD.Coordinates.FramedPointValues +import OAI.Geometry.RCD.Harmonic.RadialLinearRepresentatives + +namespace OAI + +/-! # The actual row fits in the centered normalized projection coordinates -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Only the scalar value fits are needed to build the radial operator +used in sharp projection. -/ +theorem centered_normalized_radial_values {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) + (u g : Fin n → SobolevSpace μ hQ) (f eta : SobolevSpace μ hQ) + (N : Euclidean n ≃L[ℝ] Euclidean n) (z : Euclidean n) + (coeff : Fin n → Euclidean n) {E B : ℝ} (hE : 0 ≤ E) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (g j) =ᵐ[μ.restrict Ω] + localGamma μ hQ f (transformedColumn μ hQ u N j)) + (hvalue : ∀ j, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (g j - centeredAffineSobolev μ hQ u eta z (coeff j)))‖ ^ 2 ≤ E) : + let uc := centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta + let G := sobolevColumnMap μ hQ g + let A := N.symm.toContinuousLinearMap.comp (finiteCoefficientMap coeff) + (∀ b, SobolevSpace.toLp μ hQ (G b) =ᵐ[μ.restrict Ω] + localGamma μ hQ f (sobolevColumnMap μ hQ uc b)) ∧ + (∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (G b - sobolevColumnMap μ hQ uc (A b)))‖ ^ 2 ≤ (n : ℝ) ^ 2 * E * ‖b‖ ^ 2) := by + dsimp only + let uc := centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta + let A := N.symm.toContinuousLinearMap.comp (finiteCoefficientMap coeff) + have hfit (b : Euclidean n) : sobolevColumnMap μ hQ uc (A b) = + centeredAffineSobolev μ hQ u eta z (finiteCoefficientMap coeff b) := by + apply centered_frame_covector_eq μ hQ u N eta z + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) (finiteCoefficientMap coeff b) + have hh := ContinuousLinearMap.adjoint_inner_left + (N : Euclidean n →L[ℝ] Euclidean n) (N.symm (finiteCoefficientMap coeff b)) z + simpa only [ContinuousLinearEquiv.coe_coe, N.apply_symm_apply] using hh + refine ⟨?_, ?_⟩ + · intro b + have hd := localRadialDerivative_column μ hQ Ω f hf (transformedColumn μ hQ u N) g hrep b + have hc := localRadialDerivative_eq_of_constant_difference μ hQ Ω f + (sobolevColumnMap μ hQ uc b) (sobolevColumnMap μ hQ (transformedColumn μ hQ u N) b) hf _ + (centeredColumn_covector_difference μ hQ (transformedColumn μ hQ u N) Ω + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) b eta heta) + have hr := localRadialDerivative_representative μ hQ Ω f (sobolevColumnMap μ hQ uc b) hf + rw [hc, hd] at hr + exact (SobolevSpace.restrictLp_coe μ hQ Ω _).symm.trans hr + · intro b + rw [hfit b, ← centered_radial_residual_column μ hQ] + exact normalized_column_sq_le μ hQ _ Ω hfin hE hvalue b + +/-- The dyadic row fits provide one genuine radial derivative operator +and one coefficient operator in the centered normalized coordinates. +The same residual controls values and energy for every covector. -/ +theorem centered_normalized_radial_rows {n : ℕ} + (Ω : Set X) (hfin : μ Ω ≠ ∞) + (u g : Fin n → SobolevSpace μ hQ) (f eta : SobolevSpace μ hQ) + (N : Euclidean n ≃L[ℝ] Euclidean n) (z : Euclidean n) + (coeff : Fin n → Euclidean n) {E D B : ℝ} (hE : 0 ≤ E) (_hD : 0 ≤ D) + (heta : SobolevSpace.toLp μ hQ eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (g j) =ᵐ[μ.restrict Ω] + localGamma μ hQ f (transformedColumn μ hQ u N j)) + (hvalue : ∀ j, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (g j - centeredAffineSobolev μ hQ u eta z (coeff j)))‖ ^ 2 ≤ E) + (henergy : ∀ j, (μ.real Ω)⁻¹ * ∫ x in Ω, + localGamma μ hQ (g j - centeredAffineSobolev μ hQ u eta z (coeff j)) + (g j - centeredAffineSobolev μ hQ u eta z (coeff j)) x ∂μ ≤ D) : + let uc := centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta + let G := sobolevColumnMap μ hQ g + let A := N.symm.toContinuousLinearMap.comp (finiteCoefficientMap coeff) + (∀ b, SobolevSpace.toLp μ hQ (G b) =ᵐ[μ.restrict Ω] + localGamma μ hQ f (sobolevColumnMap μ hQ uc b)) ∧ + (∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω + (G b - sobolevColumnMap μ hQ uc (A b)))‖ ^ 2 ≤ (n : ℝ) ^ 2 * E * ‖b‖ ^ 2) ∧ + (∀ b, (μ.real Ω)⁻¹ * ∫ x in Ω, + localGamma μ hQ (G b - sobolevColumnMap μ hQ uc (A b)) + (G b - sobolevColumnMap μ hQ uc (A b)) x ∂μ ≤ (n : ℝ) ^ 2 * D * ‖b‖ ^ 2) := by + dsimp only + let uc := centeredColumn μ hQ (transformedColumn μ hQ u N) + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) eta + let A := N.symm.toContinuousLinearMap.comp (finiteCoefficientMap coeff) + have hfit (b : Euclidean n) : sobolevColumnMap μ hQ uc (A b) = + centeredAffineSobolev μ hQ u eta z (finiteCoefficientMap coeff b) := by + apply centered_frame_covector_eq μ hQ u N eta z + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) (finiteCoefficientMap coeff b) + have hh := ContinuousLinearMap.adjoint_inner_left + (N : Euclidean n →L[ℝ] Euclidean n) (N.symm (finiteCoefficientMap coeff b)) z + simpa only [ContinuousLinearEquiv.coe_coe, N.apply_symm_apply] using hh + refine ⟨?_, ?_, ?_⟩ + · intro b + have hd := localRadialDerivative_column μ hQ Ω f hf (transformedColumn μ hQ u N) g hrep b + have hconst := centeredColumn_covector_difference μ hQ (transformedColumn μ hQ u N) Ω + ((N : Euclidean n →L[ℝ] Euclidean n).adjoint z) b eta heta + have hc := localRadialDerivative_eq_of_constant_difference μ hQ Ω f + (sobolevColumnMap μ hQ uc b) (sobolevColumnMap μ hQ (transformedColumn μ hQ u N) b) hf _ hconst + have hr := localRadialDerivative_representative μ hQ Ω f (sobolevColumnMap μ hQ uc b) hf + rw [hc, hd] at hr + exact (SobolevSpace.restrictLp_coe μ hQ Ω _).symm.trans hr + · intro b + rw [hfit b, ← centered_radial_residual_column μ hQ] + exact normalized_column_sq_le μ hQ _ Ω hfin hE hvalue b + · intro b + rw [hfit b, ← centered_radial_residual_column μ hQ] + exact weighted_column_energy_bound μ hQ _ Ω (by positivity) henergy b + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ProjectionResidualValues.lean b/lean/OAI/Geometry/RCD/Harmonic/ProjectionResidualValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3ad5cf43b00f9ef28e0d24c41a5049701fd0b1d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ProjectionResidualValues.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Harmonic.ColumnRepresentatives +import OAI.Geometry.RCD.Harmonic.RescaledRadialFunction + +namespace OAI + +/-! # Uniform values of the normalized actual projection residual -/ + +open Set MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +/-- Centered coordinate values bound every coefficient direction in its +own exact normalization frame. -/ +theorem framed_coordinate_value_bound {n : ℕ} (Ω : Set X) + (u : Fin n → SobolevSpace μ hQ) (V : X → Euclidean n) + (N : Euclidean n ≃L[ℝ] Euclidean n) {r L : ℝ} + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict Ω] fun x => V x j) + (hvalue : ∀ᵐ x ∂μ.restrict Ω, + ‖(N : Euclidean n →L[ℝ] Euclidean n).adjoint (V x)‖ ≤ L * r) + (b : Euclidean n) : + ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)) x| ≤ + L * r * ‖b‖ := by + filter_upwards [sobolevColumnMap_representative μ hQ u Ω V hrep (N b), hvalue] + with x hr hv + rw [hr] + have hpair := ContinuousLinearMap.adjoint_inner_left + (N : Euclidean n →L[ℝ] Euclidean n) b (V x) + change ⟪(N : Euclidean n →L[ℝ] Euclidean n).adjoint (V x), b⟫_ℝ = ⟪V x, N b⟫_ℝ at hpair + rw [← hpair] + exact (abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right hv (norm_nonneg _)) + +omit [BorelSpace X] [ProperSpace X] in +/-- Both the constant and the linear part of the actual affine fit have +size `r²`; hence the normalized residual is uniformly bounded. -/ +theorem physical_projection_residual_bound {n : ℕ} (Ω : Set X) + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (v η : SobolevSpace μ hQ) (c : ℝ) (b : Euclidean n) + {r V H L : ℝ} (hr : 0 < r) (_hH : 0 ≤ H) (_hV : 0 ≤ V) (hL : 0 ≤ L) + (hv : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ v x| ≤ V * r ^ 2) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (hu : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)) x| ≤ + L * r * ‖b‖) + (hcoeff : |c| + r * ‖b‖ ≤ H * V * r ^ 2) : + ∀ᵐ x ∂μ.restrict Ω, + |SobolevSpace.toLp μ hQ ((r ^ 2)⁻¹ • (v - c • η - sobolevColumnMap μ hQ u (N b))) x| ≤ + V + (1 + L) * H * V := by + have hc : |c| ≤ H * V * r ^ 2 := by nlinarith [mul_nonneg hr.le (norm_nonneg b)] + have hb : r * ‖b‖ ≤ H * V * r ^ 2 := (le_add_of_nonneg_left (abs_nonneg c)).trans hcoeff + apply rescaled_radial_value μ hQ Ω _ hr + filter_upwards [hv, hη, hu, + ae_restrict_of_ae (Lp.coeFn_sub + (SobolevSpace.toLp μ hQ (v - c • η)) + (SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)))), + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ v) + (SobolevSpace.toLp μ hQ (c • η))), + ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ hQ η))] with x hv hη hu hs ht hm + rw [map_sub, hs, Pi.sub_apply, map_sub, ht, Pi.sub_apply, map_smul, hm, Pi.smul_apply, + smul_eq_mul, hη, mul_one] + have hh := (abs_sub (SobolevSpace.toLp μ hQ v x - c) + (SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)) x)).trans + (add_le_add (abs_sub (SobolevSpace.toLp μ hQ v x) c) le_rfl) + have hterm := mul_le_mul_of_nonneg_left hb hL + calc + _ ≤ (|SobolevSpace.toLp μ hQ v x| + |c|) + + |SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u (N b)) x| := hh + _ ≤ (V * r ^ 2 + H * V * r ^ 2) + L * (H * V * r ^ 2) := by + nlinarith only [hv, hc, hu, hterm] + _ = (V + (1 + L) * H * V) * r ^ 2 := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticDistanceFeature.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticDistanceFeature.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc7aa174343cb366c6cbd77ffe388c873e4cb502 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticDistanceFeature.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Transport.QuadraticGeodesicGeometry + +namespace OAI + +/-! # Linear features from quadratic squared distances + +Polarization about a fixed point embeds the space into real functions. +The exact squared-distance law makes every geodesic affine in these +functions. No inner-product or Euclidean structure is presumed. +-/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] + +def quadraticDistanceFeature (p x : X) : X → ℝ := fun z => + (dist p x^2+dist p z^2-dist x z^2)/2 + +@[simp] theorem quadraticDistanceFeature_self (p : X) : quadraticDistanceFeature p p=0 := by + funext z + simp [quadraticDistanceFeature] + +@[simp] theorem quadraticDistanceFeature_diag (p x : X) : + quadraticDistanceFeature p x x=dist p x^2 := by + simp only [quadraticDistanceFeature,dist_self,zero_pow (by norm_num : 2≠0),sub_zero] + ring + +theorem quadraticDistanceFeature_symm (p x y : X) : + quadraticDistanceFeature p x y=quadraticDistanceFeature p y x := by + dsimp [quadraticDistanceFeature] + rw [dist_comm y x] + ring + +theorem quadraticDistanceFeature_injective (p : X) : + Function.Injective (quadraticDistanceFeature p) := by + intro x y h + have hx := congrFun h x + have hy := congrFun h y + simp only [quadraticDistanceFeature,dist_self,zero_pow (by norm_num : 2≠0),sub_zero] at hx hy + rw [dist_comm y x] at hx + have hz : dist x y^2=0 := by nlinarith only [hx,hy] + exact dist_eq_zero.mp (sq_eq_zero_iff.mp hz) + +namespace QuadraticGeodesicGeometry +variable (G : QuadraticGeodesicGeometry X) + +theorem feature_path (p x y : X) (t : Time) : + quadraticDistanceFeature p (G.path x y t) = + (1-(t:ℝ)) • quadraticDistanceFeature p x+(t:ℝ) • quadraticDistanceFeature p y := by + funext z + have hp := G.quadratic x y p t + have hz := G.quadratic x y z t + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul,quadraticDistanceFeature] + rw [dist_comm (G.path x y t) z,dist_comm x z,dist_comm y z] + rw [hp,hz] + ring + +theorem feature_radial (p x : X) (t : Time) : + quadraticDistanceFeature p (G.radial p t x)=(t:ℝ) • quadraticDistanceFeature p x := by + simpa only [radial,quadraticDistanceFeature_self,smul_zero,zero_add] using + G.feature_path p p x t + +end QuadraticGeodesicGeometry +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticErrorL1Limit.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticErrorL1Limit.lean new file mode 100644 index 0000000000000000000000000000000000000000..24eb747748076e063cbef2314f02e14674b403a3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticErrorL1Limit.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.RCD.Harmonic.WeightedDirectionalVanishing +import Mathlib.MeasureTheory.Integral.DominatedConvergence + +namespace OAI + +/-! # An integrable quadratic error bound implies local L1 convergence + +This is the final scalar estimate used for mixed Hessian errors. The +gradient error enters through its integral against the fixed density. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) [IsFiniteMeasure μ] + +theorem quadratic_error_L1_limit (F G : ℕ → X → ℝ) + (hF : ∀ k, Integrable (F k) μ) (hG : ∀ k, Integrable (G k) μ) + {M : ℝ} (hM : 0 ≤ M) + (hbound : ∀ k, ∀ᵐ x ∂μ, (F k x)^2 ≤ M*G k x) + (hlim : Tendsto (fun k => ∫ x, G k x ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => ∫ x, |F k x| ∂μ) atTop (𝓝 0) := by + have hb (k : ℕ) (r : ℝ) (_hr : 0 < r) : + 4*r*(∫ x, |F k x| ∂μ) ≤ 4*r^2*μ.real univ+M*(∫ x, G k x ∂μ) := by + have hi := integral_mono_ae ((hF k).abs.const_mul (4*r)) + ((integrable_const (4*r^2)).add ((hG k).const_mul M)) + (hbound k |>.mono fun x hx => by + change 4*r*|F k x| ≤ 4*r^2+M*G k x + nlinarith [sq_nonneg (2*r-|F k x|),sq_abs (F k x)]) + simp only [Pi.add_apply] at hi + rw [integral_const_mul,integral_add (integrable_const (4*r^2)) ((hG k).const_mul M), + integral_const,integral_const_mul,smul_eq_mul] at hi + nlinarith only [hi] + have he : TendstoUniformly (fun k (_ : Unit) => ∫ x, G k x ∂μ) (fun _ => 0) atTop := by + apply Metric.tendstoUniformly_iff.mpr + intro ε hε + obtain ⟨N,hN⟩ := Metric.tendsto_atTop.mp hlim ε hε + apply eventually_atTop.mpr + refine ⟨N,fun k hk _ => ?_⟩ + simpa only [Real.dist_eq,sub_zero,zero_sub,abs_neg] using hN k hk + have hh := tendstoUniformly_of_directional_bound (C := μ.real univ) (M := M) + (ENNReal.toReal_nonneg) hM + (fun k (_ : Unit) => integral_nonneg fun x => abs_nonneg (F k x)) he + (fun k (_ : Unit) r hr => hb k r hr) + exact hh.tendsto_at () + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticGramError.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticGramError.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cef8f4e2df906a6d5f9fdfc8bf1ba369eeb9357 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticGramError.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Coordinates.QuadraticCoordinateGradient + +namespace OAI + +/-! # Gram control of the quadratic model's energy error -/ + +open Set MeasureTheory +open scoped NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +private theorem quadratic_gram_error {n : ℕ} (u : Fin n → ℝ) (g : Fin n → Fin n → ℝ) + {C : ℝ} (hC : 0 ≤ C) (hu : ∀ i, |u i| ≤ C) : + |(∑ i, ∑ j, (u i * u j) * g j i) - ∑ i, (u i) ^ 2| ≤ + C ^ 2 * ∑ i, ∑ j, |g j i - if j = i then 1 else 0| := by + have hdiag : (∑ i, ∑ j, (u i * u j) * (if j = i then (1 : ℝ) else 0)) = + ∑ i, (u i) ^ 2 := by + simp only [mul_ite, mul_one, mul_zero, Finset.sum_ite_eq', Finset.mem_univ, ite_true, pow_two] + have heq : ((∑ i, ∑ j, (u i * u j) * g j i) - ∑ i, (u i) ^ 2) = + ∑ i, ∑ j, (u i * u j) * (g j i - if j = i then 1 else 0) := by + simp only [mul_sub, Finset.sum_sub_distrib] + rw [hdiag] + rw [heq] + calc + _ ≤ ∑ i, |∑ j, (u i * u j) * (g j i - if j = i then 1 else 0)| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ i, ∑ j, |(u i * u j) * (g j i - if j = i then 1 else 0)| := + Finset.sum_le_sum fun i _ => Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ i, ∑ j, C ^ 2 * |g j i - if j = i then 1 else 0| := by + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + rw [abs_mul] + apply mul_le_mul_of_nonneg_right _ (abs_nonneg _) + rw [abs_mul, pow_two] + exact mul_le_mul (hu i) (hu j) (abs_nonneg _) hC + _ = _ := by simp only [← Finset.mul_sum] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Near-orthonormal coordinate gradients make the energy density of +the actual quadratic model close to twice its value. -/ +theorem coordinateQuadratic_energy_error {n : ℕ} + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) : + ∀ᵐ x ∂μ, + |localGamma μ hQ (coordinateQuadratic μ hQ u C) (coordinateQuadratic μ hQ u C) x - + 2 * SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) x| ≤ + (C : ℝ) ^ 2 * ∑ i, ∑ j, |localGamma μ hQ (u j) (u i) x - if j = i then 1 else 0| := by + have hall := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun j _ => hu j) + filter_upwards [coordinateQuadratic_gradient_self μ hQ u C hu, + coordinateQuadratic_representative μ hQ u C hu, hall] with x hg hv hb + have hvalue : 2 * SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) x = + ∑ j, (SobolevSpace.toLp μ hQ (u j) x) ^ 2 := by + rw [← Finset.mul_sum] at hv + linarith + rw [hg, hvalue] + exact quadratic_gram_error (fun j => SobolevSpace.toLp μ hQ (u j) x) + (fun j i => localGamma μ hQ (u j) (u i) x) C.coe_nonneg (fun j => hb j (Finset.mem_univ j)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticInteriorError.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticInteriorError.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd92252f6af7fb23d7d57cb1bcdce7fa4a8e3cbf --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticInteriorError.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.RCD.Harmonic.QuadraticRadialError + +namespace OAI + +/-! # Interior radial error from the explicit cutoff comparison -/ + +open Set MeasureTheory +open scoped NNReal ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- A nonnegative cutoff equal to one on the inner region dominates its +actual gradient energy. -/ +theorem cutoff_inner_energy_le {I Ω : Set X} (hI : MeasurableSet I) (hIΩ : I ⊆ Ω) + (c w : SobolevSpace μ hQ) (χ : X → ℝ) (C : ℝ≥0) + (hcrep : SobolevSpace.toLp μ hQ c =ᵐ[μ] χ) + (hbound : ∀ x, |χ x| ≤ C) (hnonneg : ∀ x, 0 ≤ χ x) + (hone : ∀ x ∈ I, χ x = 1) : + (∫ x in I, localGamma μ hQ w w x ∂μ) ≤ + ∫ x in Ω, SobolevSpace.toLp μ hQ c x * localGamma μ hQ w w x ∂μ := by + have hc : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ c x| ≤ C := by + filter_upwards [hcrep] with x hx + rw [hx] + exact hbound x + have hi := (localGamma_memL1 μ hQ w w).bdd_mul + (Lp.aestronglyMeasurable (SobolevSpace.toLp μ hQ c)) + (by simpa only [Real.norm_eq_abs] using hc) + have hn : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ c x * localGamma μ hQ w w x := by + filter_upwards [hcrep, localGamma_self μ hQ w] with x hx hself + rw [hx, hself] + exact mul_nonneg (hnonneg x) (sq_nonneg _) + calc + _ = ∫ x in I, SobolevSpace.toLp μ hQ c x * localGamma μ hQ w w x ∂μ := by + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae hcrep, ae_restrict_mem hI] with x hx hxi + rw [hx, hone x hxi, one_mul] + _ ≤ _ := setIntegral_mono_set hi.integrableOn (ae_restrict_of_ae hn) + (Filter.Eventually.of_forall hIΩ) + +/-- Explicit interior radial error. The right side uses only the value +error, actual Gram errors and fixed coordinate/cutoff bounds. -/ +theorem coordinateQuadratic_interior_radial_error {n : ℕ} {I Ω : Set X} + (hI : MeasurableSet I) (hIΩ : I ⊆ Ω) (hfin : μ Ω ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) (C D Lχ : ℝ≥0) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j)) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (c q : SobolevSpace μ hQ) (χ : X → ℝ) + (hχ : LipschitzWith Lχ χ) (hcpt : HasCompactSupport χ) + (hbound : ∀ x, |χ x| ≤ 1) (hnonneg : ∀ x, 0 ≤ χ x) + (hsupp : tsupport χ ⊆ Ω) (hcrep : SobolevSpace.toLp μ hQ c =ᵐ[μ] χ) + (hone : ∀ x ∈ I, χ x = 1) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ D) + {δ M L : ℝ} (hδ : 0 ≤ δ) (hM : 0 ≤ M) (hL : 0 ≤ L) + (hsmall : ∀ᵐ x ∂μ.restrict Ω, + |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ δ) + (heik : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ q q x = 2 * SobolevSpace.toLp μ hQ q x) + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ (u j) (u j) x ≤ M ^ 2) + (hcut : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ c c x ≤ L ^ 2) + (j : Fin n) : + (∫ x in I, (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + 2 * M ^ 2 * (2 * δ * (1 + (n : ℝ) * M ^ 2 + (n : ℝ) * C * M * L) * μ.real Ω + + (C : ℝ) ^ 2 * ∫ x in Ω, ∑ i, ∑ k, + |localGamma μ hQ (u k) (u i) x - if k = i then 1 else 0| ∂μ) + + 2 * ((n : ℝ) * (C : ℝ) ^ 2 * (M ^ 2 + 1)) * + ∫ x in I, ∑ i, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ := by + have hIfin : μ I ≠ ∞ := ne_top_of_le_ne_top hfin (measure_mono hIΩ) + have hraw := coordinateQuadratic_raw_error μ hQ hIfin u C q hub hM + (fun k => ae_restrict_of_ae_restrict_of_subset hIΩ (hgrad k)) j + have henergy := cutoff_inner_energy_le μ hQ hI hIΩ c + (q - coordinateQuadratic μ hQ u C) χ 1 hcrep hbound hnonneg hone + have hboundE := coordinateQuadratic_uniform_value_gradient μ hQ hfin u C D Lχ hu hub + c q χ hχ hcpt hbound hnonneg hsupp hcrep hw hδ hM hL hsmall heik hgrad hcut + have hE := henergy.trans hboundE + exact hraw.trans (add_le_add (mul_le_mul_of_nonneg_left hE (by positivity)) le_rfl) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticMeanScaling.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticMeanScaling.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f69a3c309e3f70cbc737850223ce806a463a8f4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticMeanScaling.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Sobolev.SmallRadiusPoissonMean + +namespace OAI + +/-! # Dimensionless quadratic mean errors at shrinking radii -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem centered_second_variation_fourth_order {K D a R : ℝ} (hD : 0≤D) (hR : 0 B k/V k) atTop (𝓝 0)) + (hE : ∀ k, |E k|≤A*(r k)^2*P k*Real.sqrt (V k)*Real.sqrt (B k)) : + Tendsto (fun k => E k/(r k)^2) atTop (𝓝 0) := by + have hbound k : |E k/(r k)^2|≤(A*C)*Real.sqrt (B k/V k) := by + rw [abs_div,abs_of_pos (sq_pos_of_pos (hr k))] + apply (div_le_iff₀ (sq_pos_of_pos (hr k))).mpr + calc + |E k| ≤ A*(r k)^2*P k*Real.sqrt (V k)*Real.sqrt (B k) := hE k + _ = (A*(r k)^2)*(P k*V k)*Real.sqrt (B k/V k) := by + rw [mul_assoc _ _ (Real.sqrt (B k)),sqrt_mass_normalization (hV k) (hB k)] + ring + _ ≤ (A*(r k)^2)*C*Real.sqrt (B k/V k) := by + gcongr + exact hcompression k + _ = _ := by ring + have hlim : Tendsto (fun k => (A*C)*Real.sqrt (B k/V k)) atTop (𝓝 0) := by + simpa only [Real.sqrt_zero,mul_zero] using hmass.sqrt.const_mul (A*C) + exact squeeze_zero_norm (fun k => by simpa only [Real.norm_eq_abs] using hbound k) hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticModelValues.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticModelValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea95a9fd6f40fedbe92aacf64ff21847ee57da11 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticModelValues.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.RCD.Harmonic.MetricQuadraticError +import OAI.Geometry.RCD.Coordinates.BoundedLocalCoordinates +import OAI.Geometry.RCD.Harmonic.HarmonicQuadraticPotential + +namespace OAI + +/-! # Values and local metric accuracy of the actual quadratic model -/ + +open Set Metric MeasureTheory +open scoped NNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem coordinateQuadratic_bound {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (C : ℝ≥0) (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) : + ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) x ∧ + |SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) x| ≤ (n : ℝ) * (C : ℝ) ^ 2 / 2 := by + have hb := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr (fun j _ => hu j) + filter_upwards [coordinateQuadratic_representative μ hQ u C hu, hb] with x hx hbound + rw [hx] + have hnonneg : 0 ≤ ∑ j, (1 / 2 : ℝ) * (SobolevSpace.toLp μ hQ (u j) x) ^ 2 := + Finset.sum_nonneg fun j _ => mul_nonneg (by norm_num) (sq_nonneg _) + refine ⟨hnonneg, ?_⟩ + rw [abs_of_nonneg hnonneg] + calc + _ ≤ ∑ _j : Fin n, (1 / 2 : ℝ) * (C : ℝ) ^ 2 := by + apply Finset.sum_le_sum + intro j hj + apply mul_le_mul_of_nonneg_left _ (by norm_num) + simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) C.coe_nonneg).mpr (hbound j hj) + _ = _ := by simp; ring + +/-- The finite-coordinate definition agrees with the squared Euclidean norm +on every region where the columns represent that coordinate map. -/ +theorem coordinateQuadratic_eq_norm {n : ℕ} {Ω : Set X} + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (v : X → Euclidean n) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict Ω] fun x => v x j) : + SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C) =ᵐ[μ.restrict Ω] + fun x => ‖v x‖ ^ 2 / 2 := by + have hr := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr (fun j _ => hrep j) + filter_upwards [ae_restrict_of_ae (coordinateQuadratic_representative μ hQ u C hu), hr] + with x hx hrx + rw [hx, EuclideanSpace.real_norm_sq_eq] + simp only [hrx _ (Finset.mem_univ _), ← Finset.mul_sum] + ring + +variable [BorelSpace X] [ProperSpace X] + +/-- The actual clipped extensions are harmonic, globally bounded and +pointwise unchanged on the metric-approximation region. -/ +theorem bounded_metric_coordinates {n : ℕ} {p : X} {r R ε : ℝ} + (hr : 0 < r) (hR : 0 ≤ R) (hε : 0 ≤ ε) + (u : Fin n → SobolevSpace μ hQ) (v : X → Euclidean n) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ (ball p (R * r)) (u j)) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict (ball p (R * r))] fun x => v x j) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 r R ε (fun x => r⁻¹ • v x)) : + let C : ℝ≥0 := ⟨r * (R + ε), mul_nonneg hr.le (add_nonneg hR hε)⟩ + let w := fun j => boundedLocalVersion μ hQ (u j) C + (∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (w j) x| ≤ C) ∧ + (∀ j, IsSobolevHarmonicOn μ hQ (ball p (R * r)) (w j)) ∧ + (∀ j, SobolevSpace.toLp μ hQ (w j) =ᵐ[μ.restrict (ball p (R * r))] fun x => v x j) := by + dsimp only + let C : ℝ≥0 := ⟨r * (R + ε), mul_nonneg hr.le (add_nonneg hR hε)⟩ + have hb (j : Fin n) : ∀ᵐ x ∂μ.restrict (ball p (R * r)), |SobolevSpace.toLp μ hQ (u j) x| ≤ C := by + filter_upwards [hrep j, ae_restrict_mem measurableSet_ball] with x hx hxb + rw [hx] + have hnorm := (hmetric.centered_norm_error hr hR (by rw [hv, smul_zero]) hxb.le).2 + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hr.le)] at hnorm + have hnorm' : ‖v x‖ ≤ r * (R + ε) := by + have ht := mul_le_mul_of_nonneg_left hnorm hr.le + simpa only [← mul_assoc, mul_inv_cancel₀ hr.ne', one_mul] using ht + have hi : |v x j| ≤ ‖v x‖ := by + simpa only [Real.norm_eq_abs] using (PiLp.norm_apply_le (v x) j) + exact hi.trans hnorm' + refine ⟨fun j => boundedLocalVersion_bound μ hQ (u j) C, + fun j => boundedLocalVersion_harmonic μ hQ measurableSet_ball (u j) C (hb j) (hu j), ?_⟩ + intro j + exact (boundedLocalVersion_eq μ hQ (u j) C (hb j)).trans (hrep j) + +omit [ProperSpace X] in +/-- A metric approximation supplies precisely the value-error premise in +the cutoff gradient comparison, using the actual coordinate quadratic. -/ +theorem coordinateQuadratic_metric_value_error {n : ℕ} {p : X} {r R ε : ℝ} + (hr : 0 < r) (hR : 0 ≤ R) (hε : 0 ≤ ε) + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (v : X → Euclidean n) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict (ball p (R * r))] fun x => v x j) + (hv : v p = 0) + (hmetric : IsPointedApproximation p 0 r R ε (fun x => r⁻¹ • v x)) + (q : SobolevSpace μ hQ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (R * r))] + fun x => dist p x ^ 2 / 2) : + ∀ᵐ x ∂μ.restrict (ball p (R * r)), + |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ + r ^ 2 * (ε * (2 * R + ε) / 2) := by + filter_upwards [hq, coordinateQuadratic_eq_norm μ hQ u C v hu hrep, + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ q) + (SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C))), + ae_restrict_mem measurableSet_ball] with x hqx hHx hsub hx + change |(SobolevSpace.toLp μ hQ q - SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C)) x| ≤ _ + rw [hsub, Pi.sub_apply, hqx, hHx] + have hmetricx := hmetric.quadratic_value_error hr hR hε (by rw [hv, smul_zero]) hx.le + have hnorm : r ^ 2 * ‖r⁻¹ • v x‖ ^ 2 = ‖v x‖ ^ 2 := by + rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hr.le)] + field_simp + rwa [hnorm] at hmetricx + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialError.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialError.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b8edf989a3fa1ca784a68419d9a003d64085835 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialError.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.RCD.Harmonic.QuadraticUniformBounds + +namespace OAI + +/-! # The actual radial derivative is close to a coordinate value -/ + +open Set MeasureTheory +open scoped NNReal ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +private theorem gram_action_sq {n : ℕ} (u g : Fin n → ℝ) (j : Fin n) + {C M : ℝ} (hC : 0 ≤ C) + (hu : ∀ i, |u i| ≤ C) (hg : ∀ i, |g i| ≤ M ^ 2) : + ((∑ i, u i * g i) - u j) ^ 2 ≤ + ((n : ℝ) * C ^ 2 * (M ^ 2 + 1)) * ∑ i, |g i - if i = j then 1 else 0| := by + let e : Fin n → ℝ := fun i => g i - if i = j then 1 else 0 + have he : (∑ i, u i * g i) - u j = ∑ i, u i * e i := by + simp only [e, mul_sub, Finset.sum_sub_distrib] + simp [mul_ite] + have hv : (∑ i, (u i) ^ 2) ≤ (n : ℝ) * C ^ 2 := by + calc + _ ≤ ∑ _i : Fin n, C ^ 2 := Finset.sum_le_sum fun i _ => by + simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) hC).mpr (hu i) + _ = _ := by simp + have heabs (i : Fin n) : |e i| ≤ M ^ 2 + 1 := by + exact (abs_sub (g i) (if i = j then 1 else 0)).trans + (add_le_add (hg i) (by split_ifs <;> norm_num)) + have hesq : (∑ i, (e i) ^ 2) ≤ (M ^ 2 + 1) * ∑ i, |e i| := by + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + have ht := mul_le_mul_of_nonneg_right (heabs i) (abs_nonneg (e i)) + nlinarith [sq_abs (e i)] + rw [he] + have hcs := Finset.sum_mul_sq_le_sq_mul_sq Finset.univ u e + calc + _ ≤ (∑ i, (u i) ^ 2) * ∑ i, (e i) ^ 2 := hcs + _ ≤ ((n : ℝ) * C ^ 2) * ((M ^ 2 + 1) * ∑ i, |e i|) := + mul_le_mul hv hesq (Finset.sum_nonneg fun i _ => sq_nonneg _) (by positivity) + _ = _ := by dsimp only [e]; ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Near-orthonormal coordinate gradients identify the gradient of the +quadratic model with the corresponding coordinate values in L2. Together +with the value-to-gradient estimate this proves the raw radial convergence. -/ +theorem coordinateQuadratic_raw_error {n : ℕ} {Ω : Set X} (hfin : μ Ω ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (q : SobolevSpace μ hQ) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + {M : ℝ} (hM : 0 ≤ M) + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ (u j) (u j) x ≤ M ^ 2) + (j : Fin n) : + let H := coordinateQuadratic μ hQ u C + (∫ x in Ω, (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ∂μ) ≤ + 2 * M ^ 2 * (∫ x in Ω, localGamma μ hQ (q - H) (q - H) x ∂μ) + + 2 * ((n : ℝ) * (C : ℝ) ^ 2 * (M ^ 2 + 1)) * + ∫ x in Ω, ∑ i, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| ∂μ := by + dsimp only + let H := coordinateQuadratic μ hQ u C + let G : X → ℝ := fun x => ∑ i, |localGamma μ hQ (u i) (u j) x - if i = j then 1 else 0| + have hG : Integrable G (μ.restrict Ω) := + integrable_finsetSum Finset.univ fun i _ => + ((localGamma_memL1 μ hQ (u i) (u j)).integrableOn.sub (integrableOn_const hfin)).abs + have herr := ((localGamma_memLp_two_of_bound μ hQ Ω q (u j) (hgrad j)).sub + ((Lp.memLp (SobolevSpace.toLp μ hQ (u j))).restrict Ω)).integrable_sq + have he := (localGamma_memL1 μ hQ (q - H) (q - H)).integrableOn (s := Ω) + have hg := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun i _ => gamma_abs_le_of_bounds μ hQ (u i) (u j) hM hM (hgrad i) (hgrad j)) + have hb := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr (fun i _ => hub i) + have hpoint : ∀ᵐ x ∂μ.restrict Ω, + (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ≤ + (2 * M ^ 2) * localGamma μ hQ (q - H) (q - H) x + + (2 * ((n : ℝ) * (C : ℝ) ^ 2 * (M ^ 2 + 1))) * G x := by + filter_upwards [hg, ae_restrict_of_ae hb, + ae_restrict_of_ae (coordinateQuadratic_gradient μ hQ u C (u j) hub), + ae_restrict_of_ae (localGamma_sub_left μ hQ q H (u j)), + ae_restrict_of_ae (localGamma_sq_le μ hQ (q - H) (u j)), + ae_restrict_of_ae (localGamma_self μ hQ (q - H)), hgrad j] + with x hgx hbx hHx hsub hcs hself hj + have hmodel := gram_action_sq (fun i => SobolevSpace.toLp μ hQ (u i) x) + (fun i => localGamma μ hQ (u i) (u j) x) j C.coe_nonneg + (fun i => hbx i (Finset.mem_univ i)) (fun i => by + simpa only [pow_two] using hgx i (Finset.mem_univ i)) + rw [← hHx] at hmodel + change (localGamma μ hQ H (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ≤ + ((n : ℝ) * (C : ℝ) ^ 2 * (M ^ 2 + 1)) * G x at hmodel + have hraw := hcs.trans (mul_le_mul_of_nonneg_left hj (by rw [hself]; positivity)) + rw [hsub] at hraw + have hsplit : (localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 ≤ + 2 * (localGamma μ hQ q (u j) x - localGamma μ hQ H (u j) x) ^ 2 + + 2 * (localGamma μ hQ H (u j) x - SobolevSpace.toLp μ hQ (u j) x) ^ 2 := by + nlinarith only [sq_nonneg (localGamma μ hQ q (u j) x - + 2 * localGamma μ hQ H (u j) x + SobolevSpace.toLp μ hQ (u j) x)] + nlinarith only [hsplit, hraw, hmodel] + have hi := integral_mono_ae herr ((he.const_mul _).add (hG.const_mul _)) hpoint + simp only [Pi.sub_apply, Pi.add_apply] at hi + have hsum := integral_add (he.const_mul (2 * M ^ 2)) + (hG.const_mul (2 * ((n : ℝ) * (C : ℝ) ^ 2 * (M ^ 2 + 1)))) + rw [hsum, integral_const_mul, integral_const_mul] at hi + exact hi + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialGrowth.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2084220b79542431b8110231934b4d360652be5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRadialGrowth.lean @@ -0,0 +1,20 @@ +import Mathlib + +namespace OAI + +/-! # A fixed quadratic distance bound -/ + +namespace RegularPointCoordinates + +theorem quadratic_radial_growth_bound {a b e R r : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (he : 0 ≤ e) : + a+b*(R+r)^2+e ≤ (a+2*b*R^2+2*b+e)*(1+r^2) := by + have hs : (R+r)^2 ≤ 2*R^2+2*r^2 := by nlinarith [sq_nonneg (R-r)] + have hp := mul_le_mul_of_nonneg_left hs hb + have hbase : 0 ≤ a+2*b*R^2+e := by positivity + have hmul := mul_nonneg hbase (sq_nonneg r) + nlinarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticRateOptimization.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRateOptimization.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4ff4a5987ea42b4ced53e6ab3510792597e7832 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticRateOptimization.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.RCD.Heat.SpaceTimeSlopeRate + +namespace OAI + +/-! # Optimizing the positive spatial scale in the quadratic rate -/ + +namespace RegularPointCoordinates + +theorem square_le_of_young_bounds {g C A : ℝ} (hg : 0 ≤ g) (hC : 0 ≤ C) (hA : 0 < A) + (h : ∀ ell : ℝ, 0 < ell → g ≤ ell*C/2+A/(2*ell)) : + g^2 ≤ A*C := by + apply le_of_forall_pos_le_add + intro ε hε + let q := C+ε/A + have hq : 0 < q := by dsimp [q]; positivity + have hCq : C ≤ q := le_add_of_nonneg_right (div_nonneg hε.le hA.le) + let ell := Real.sqrt (A/q) + have hell : 0 < ell := Real.sqrt_pos.mpr (div_pos hA hq) + have he : ell^2*q=A := by + dsimp only [ell] + rw [Real.sq_sqrt (div_nonneg hA.le hq.le)] + field_simp + have hb := (le_div_iff₀ (show 0 < 2*ell by positivity)).mp + (show g ≤ (ell^2*C+A)/(2*ell) from by convert h ell hell using 1; field_simp) + have hm := mul_le_mul_of_nonneg_left hCq (sq_nonneg ell) + have hgle : g ≤ ell*q := by nlinarith only [hb,hm,he,hell] + have hs := pow_le_pow_left₀ hg hgle 2 + have he' : (ell*q)^2=A*q := by rw [←he]; ring + rw [he'] at hs + have heq : A*q=A*C+ε := by dsimp [q]; field_simp + rwa [heq] at hs + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticSegmentCost.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticSegmentCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..294337dc7465e799484d47bc4f1433910c95e040 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticSegmentCost.lean @@ -0,0 +1,25 @@ +import Mathlib.Tactic + +namespace OAI + +/-! # The sharp quadratic cost bound at an interior segment point -/ + +namespace RegularPointCoordinates + +theorem quadratic_segment_cost {r d l s : ℝ} + (hl : 0 ≤ l) (hs : 0 < s) (hs1 : s ≤ 1) + (htri : l ≤ r+(1-s)*d) : + l^2-d^2-r^2/s ≤ -s*d^2 := by + have hsq : l^2 ≤ (r+(1-s)*d)^2 := by + nlinarith + have hpos : 0 ≤ (1-s)*(r-s*d)^2/s := + div_nonneg (mul_nonneg (sub_nonneg.mpr hs1) (sq_nonneg _)) hs.le + have he : (r+(1-s)*d)^2-d^2-r^2/s+s*d^2 = -(1-s)*(r-s*d)^2/s := by + field_simp + ring + simp only [neg_mul,neg_div] at he + linarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuadraticUniformBounds.lean b/lean/OAI/Geometry/RCD/Harmonic/QuadraticUniformBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a7f5ab73de6249fb256df8bf48f6da465366a89 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuadraticUniformBounds.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Sobolev.QuadraticValueGradientBound +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError + +namespace OAI + +/-! # Uniform constants in the quadratic-model gradient comparison -/ + +open Set MeasureTheory +open scoped NNReal ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Cauchy--Schwarz with the actual local square-gradient bounds. -/ +theorem gamma_abs_le_of_bounds {Ω : Set X} (f g : SobolevSpace μ hQ) + {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ A ^ 2) + (hg : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ g g x ≤ B ^ 2) : + ∀ᵐ x ∂μ.restrict Ω, |localGamma μ hQ f g x| ≤ A * B := by + filter_upwards [hf, hg, ae_restrict_of_ae (localGamma_sq_le μ hQ f g), + ae_restrict_of_ae (localGamma_self μ hQ g)] with x hfx hgx hcs hself + have hs := hcs.trans (mul_le_mul hfx hgx (by rw [hself]; positivity) (sq_nonneg A)) + apply (sq_le_sq₀ (abs_nonneg _) (mul_nonneg hA hB)).mp + simpa only [sq_abs, mul_pow] using hs + +/-- Bounded coordinate values and gradients control the cutoff cross term +of their actual quadratic potential. -/ +theorem coordinateQuadratic_cutoff_bound {n : ℕ} {Ω : Set X} + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (c : SobolevSpace μ hQ) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + {M L : ℝ} (hM : 0 ≤ M) (hL : 0 ≤ L) + (hu : ∀ j, ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ (u j) (u j) x ≤ M ^ 2) + (hc : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ c c x ≤ L ^ 2) : + ∀ᵐ x ∂μ.restrict Ω, + |localGamma μ hQ c (coordinateQuadratic μ hQ u C) x| ≤ (n : ℝ) * C * M * L := by + have hp := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun j _ => gamma_abs_le_of_bounds μ hQ (u j) c hM hL (hu j) hc) + have hb := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr (fun j _ => hub j) + filter_upwards [hp, ae_restrict_of_ae hb, + ae_restrict_of_ae (localGamma_comm μ hQ c (coordinateQuadratic μ hQ u C)), + ae_restrict_of_ae (coordinateQuadratic_gradient μ hQ u C c hub)] with x hx hb hc hg + rw [hc, hg] + calc + _ ≤ ∑ j, |SobolevSpace.toLp μ hQ (u j) x * localGamma μ hQ (u j) c x| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _j : Fin n, (C : ℝ) * (M * L) := by + apply Finset.sum_le_sum + intro j hj + rw [abs_mul] + exact mul_le_mul (hb j hj) (hx j hj) (abs_nonneg _) C.coe_nonneg + _ = _ := by simp; ring + +/-- The gradient comparison now has explicit constants from coordinate +and cutoff bounds, with no separate cross-term assumption. -/ +theorem coordinateQuadratic_uniform_value_gradient {n : ℕ} {Ω : Set X} + (hfin : μ Ω ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) (C D Lχ : ℝ≥0) + (hu : ∀ j, IsSobolevHarmonicOn μ hQ Ω (u j)) + (hub : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (c q : SobolevSpace μ hQ) (χ : X → ℝ) + (hχ : LipschitzWith Lχ χ) (hcpt : HasCompactSupport χ) + (hbound : ∀ x, |χ x| ≤ 1) (hnonneg : ∀ x, 0 ≤ χ x) + (hsupp : tsupport χ ⊆ Ω) (hcrep : SobolevSpace.toLp μ hQ c =ᵐ[μ] χ) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ D) + {δ M L : ℝ} (hδ : 0 ≤ δ) (hM : 0 ≤ M) (hL : 0 ≤ L) + (hsmall : ∀ᵐ x ∂μ.restrict Ω, + |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ δ) + (heik : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ q q x = 2 * SobolevSpace.toLp μ hQ q x) + (hgrad : ∀ j, ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ (u j) (u j) x ≤ M ^ 2) + (hcut : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ c c x ≤ L ^ 2) : + let H := coordinateQuadratic μ hQ u C + (∫ x in Ω, SobolevSpace.toLp μ hQ c x * localGamma μ hQ (q - H) (q - H) x ∂μ) ≤ + 2 * δ * (1 + (n : ℝ) * M ^ 2 + (n : ℝ) * C * M * L) * μ.real Ω + + (C : ℝ) ^ 2 * ∫ x in Ω, ∑ i, ∑ j, + |localGamma μ hQ (u j) (u i) x - if j = i then 1 else 0| ∂μ := by + have ht : ∀ᵐ x ∂μ.restrict Ω, (∑ j, localGamma μ hQ (u j) (u j) x) ≤ (n : ℝ) * M ^ 2 := by + filter_upwards [(Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun j _ => hgrad j)] with x hx + calc + _ ≤ ∑ _j : Fin n, M ^ 2 := Finset.sum_le_sum hx + _ = _ := by simp + exact coordinateQuadratic_value_gradient_bound μ hQ hfin u C D Lχ hu hub c q χ + hχ hcpt hbound hnonneg hsupp hcrep hw hδ hsmall heik ht + (coordinateQuadratic_cutoff_bound μ hQ u C c hub hM hL hgrad hcut) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuantitativeAffineMean.lean b/lean/OAI/Geometry/RCD/Harmonic/QuantitativeAffineMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..717daaec21ab75c407da5dc10e1da59191d1c852 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuantitativeAffineMean.lean @@ -0,0 +1,167 @@ +import OAI.Geometry.RCD.Harmonic.VanishingVariationAffineLimit + +namespace OAI + +/-! # Quantitative affine means without assuming a common value limit -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem interior_chord_error_tendsto_zero + (F G : ℕ → ℝ → ℝ) + (hF : ∀ k t, t ∈ Ioo (0:ℝ) 1 → DifferentiableAt ℝ (F k) t) + (hint : ∀ k a b, 0 < a → a ≤ b → b < 1 → + (∫ t in a..b, G k t) = deriv (F k) b-deriv (F k) a) + (hG : ∀ a b, 0 < a → a ≤ b → b < 1 → + TendstoUniformlyOn G (fun _ => 0) atTop (Icc a b)) + {a b x : ℝ} (ha : 0 < a) (hab : a < b) (hb : b < 1) (hx : x ∈ Icc a b) : + Tendsto (fun k => F k x-F k a-((F k b-F k a)/(b-a))*(x-a)) atTop (𝓝 0) := by + apply Metric.tendsto_nhds.mpr + intro e he + let δ := e/((b-a)^2+1) + have hδ : 0 < δ := div_pos he (by positivity) + have hδe : δ*(b-a)^2 < e := by + have hh : δ*((b-a)^2+1)=e := div_mul_cancel₀ e (by positivity) + nlinarith + filter_upwards [(Metric.tendstoUniformlyOn_iff.mp (hG a b ha hab.le hb)) δ hδ] with k hk + have hbound := chord_error_le_of_derivative_oscillation hab hδ.le hx + (fun t ht => hF k t ⟨ha.trans_le ht.1,ht.2.trans_lt hb⟩) + (fun u hu v hv => integrated_derivative_oscillation (g := G k) hδ.le + (fun t ht => by simpa only [dist_zero_left,Real.norm_eq_abs] using (hk t ht).le) + (fun u v hau huv hvb => hint k u v (ha.trans_le hau) huv (hvb.trans_lt hb)) hu hv) + simpa only [dist_zero_right,Real.norm_eq_abs] using hbound.trans_lt hδe + +theorem abs_le_of_chord_error {f : ℝ → ℝ} {a b x B D : ℝ} + (hab : a < b) (hx : x ∈ Icc a b) + (ha : |f a| ≤ B) (hb : |f b| ≤ B) + (he : |f x-f a-((f b-f a)/(b-a))*(x-a)| ≤ D) : |f x| ≤ D+B := by + let t := (x-a)/(b-a) + have ht0 : 0 ≤ t := div_nonneg (sub_nonneg.mpr hx.1) (sub_pos.mpr hab).le + have ht1 : t ≤ 1 := (div_le_one (sub_pos.mpr hab)).mpr (by linarith [hx.2]) + have hid : f x=(f x-f a-((f b-f a)/(b-a))*(x-a))+(1-t)*f a+t*f b := by + dsimp only [t] + field_simp [(sub_pos.mpr hab).ne'] + ring + rw [hid] + calc + _ ≤ |f x-f a-((f b-f a)/(b-a))*(x-a)|+|(1-t)*f a|+|t*f b| := + (abs_add_le _ _).trans (add_le_add (abs_add_le _ _) le_rfl) + _ ≤ D+(1-t)*B+t*B := by + rw [abs_mul,abs_of_nonneg (sub_nonneg.mpr ht1),abs_mul,abs_of_nonneg ht0] + gcongr + _ = D+B := by ring + +theorem endpoint_chord_error_of_interior_errors + (F : ℕ → ℝ → ℝ) (M : ℝ≥0) + (hLip : ∀ k, LipschitzOnWith M (F k) (Icc (0:ℝ) 1)) + (hchord : ∀ {a b x : ℝ}, 0 < a → a < b → b < 1 → x ∈ Icc a b → + Tendsto (fun k => F k x-F k a-((F k b-F k a)/(b-a))*(x-a)) atTop (𝓝 0)) + {t : ℝ} (ht : t ∈ Icc (0:ℝ) 1) : + Tendsto (fun k => F k t-((1-t)*F k 0+t*F k 1)) atTop (𝓝 0) := by + by_cases ht0 : t=0 + · simpa only [ht0,sub_zero,mul_zero,zero_mul,one_mul,add_zero,sub_self] using + (tendsto_const_nhds : Tendsto (fun _ : ℕ => (0:ℝ)) atTop (𝓝 0)) + by_cases ht1 : t=1 + · simpa only [ht1,sub_self,zero_mul,one_mul,zero_add] using + (tendsto_const_nhds : Tendsto (fun _ : ℕ => (0:ℝ)) atTop (𝓝 0)) + have ht0' : 0 < t := lt_of_le_of_ne ht.1 (Ne.symm ht0) + have ht1' : t < 1 := lt_of_le_of_ne ht.2 ht1 + let P k x := F k x-((1-x)*F k 0+x*F k 1) + have h01 (k : ℕ) : |F k 1-F k 0| ≤ M := by + simpa only [Real.dist_eq,sub_zero,abs_one,mul_one] using + (hLip k).dist_le_mul 1 ⟨zero_le_one,le_rfl⟩ 0 ⟨le_rfl,zero_le_one⟩ + apply Metric.tendsto_nhds.mpr + intro e he + let δ := min (t/2) (min ((1-t)/2) (e/(8*((M:ℝ)+1)))) + have hδ : 0 < δ := lt_min (half_pos ht0') + (lt_min (half_pos (sub_pos.mpr ht1')) (div_pos he (by positivity))) + have hδt : δ < t := (min_le_left _ _).trans_lt (by linarith) + have hδb : t < 1-δ := by + have hh : δ ≤ (1-t)/2 := (min_le_right _ _).trans (min_le_left _ _) + linarith + have hab : δ < 1-δ := hδt.trans hδb + have hδ1 : δ < 1 := hδt.trans ht1' + have hsmallB : 2*(M:ℝ)*δ < e/2 := by + have hle : δ ≤ e/(8*((M:ℝ)+1)) := (min_le_right _ _).trans (min_le_right _ _) + have hh := (le_div_iff₀ (by positivity : 0 < 8*((M:ℝ)+1))).mp hle + nlinarith [M.coe_nonneg] + have hpA (k : ℕ) : |P k δ| ≤ 2*(M:ℝ)*δ := by + have hh : |F k δ-F k 0| ≤ (M:ℝ)*δ := by + simpa only [Real.dist_eq,sub_zero,abs_of_pos hδ] using + (hLip k).dist_le_mul δ ⟨hδ.le,hδ1.le⟩ 0 ⟨le_rfl,zero_le_one⟩ + have heq : P k δ=(F k δ-F k 0)-δ*(F k 1-F k 0) := by dsimp only [P]; ring + rw [heq] + calc + _ ≤ |F k δ-F k 0|+|δ*(F k 1-F k 0)| := by + simpa only [sub_zero,zero_sub,abs_neg] using + abs_sub_le (F k δ-F k 0) 0 (δ*(F k 1-F k 0)) + _ ≤ (M:ℝ)*δ+δ*(M:ℝ) := by + rw [abs_mul,abs_of_pos hδ] + exact add_le_add hh (mul_le_mul_of_nonneg_left (h01 k) hδ.le) + _ = _ := by ring + have hpB (k : ℕ) : |P k (1-δ)| ≤ 2*(M:ℝ)*δ := by + have hh : |F k (1-δ)-F k 1| ≤ (M:ℝ)*δ := by + simpa only [Real.dist_eq,show (1-δ)-1=-δ by ring,abs_neg,abs_of_pos hδ] using + (hLip k).dist_le_mul (1-δ) ⟨by linarith,by linarith⟩ 1 ⟨zero_le_one,le_rfl⟩ + have heq : P k (1-δ)=(F k (1-δ)-F k 1)+δ*(F k 1-F k 0) := by dsimp only [P]; ring + rw [heq] + calc + _ ≤ |F k (1-δ)-F k 1|+|δ*(F k 1-F k 0)| := abs_add_le _ _ + _ ≤ (M:ℝ)*δ+δ*(M:ℝ) := by + rw [abs_mul,abs_of_pos hδ] + exact add_le_add hh (mul_le_mul_of_nonneg_left (h01 k) hδ.le) + _ = _ := by ring + have hch := hchord hδ hab + (by linarith : 1-δ < 1) ⟨hδt.le,hδb.le⟩ + have hchP : Tendsto (fun k => P k t-P k δ- + ((P k (1-δ)-P k δ)/((1-δ)-δ))*(t-δ)) atTop (𝓝 0) := by + apply hch.congr' + filter_upwards [] with k + dsimp only [P] + field_simp [(sub_pos.mpr hab).ne'] + ring + filter_upwards [Metric.tendsto_nhds.mp hchP (e/2) (half_pos he)] with k hk + have hh := abs_le_of_chord_error hab ⟨hδt.le,hδb.le⟩ (hpA k) (hpB k) + (show |P k t-P k δ-((P k (1-δ)-P k δ)/((1-δ)-δ))*(t-δ)| ≤ e/2 by + simpa only [dist_zero_right,Real.norm_eq_abs] using hk.le) + have hf : |P k t| < e := hh.trans_lt (by linarith) + simpa only [dist_zero_right,Real.norm_eq_abs] using hf + + +theorem endpoint_chord_error_tendsto_zero + (F G : ℕ → ℝ → ℝ) (M : ℝ≥0) + (hLip : ∀ k, LipschitzOnWith M (F k) (Icc (0:ℝ) 1)) + (hF : ∀ k t, t ∈ Ioo (0:ℝ) 1 → DifferentiableAt ℝ (F k) t) + (hint : ∀ k a b, 0 < a → a ≤ b → b < 1 → + (∫ t in a..b, G k t) = deriv (F k) b-deriv (F k) a) + (hG : ∀ a b, 0 < a → a ≤ b → b < 1 → + TendstoUniformlyOn G (fun _ => 0) atTop (Icc a b)) + {t : ℝ} (ht : t ∈ Icc (0:ℝ) 1) : + Tendsto (fun k => F k t-((1-t)*F k 0+t*F k 1)) atTop (𝓝 0) := + endpoint_chord_error_of_interior_errors F M hLip + (fun ha hab hb hx => interior_chord_error_tendsto_zero F G hF hint hG ha hab hb hx) ht + +theorem interior_chord_errors_transfer (F H : ℕ → ℝ → ℝ) + (hval : ∀ t ∈ Ioo (0:ℝ) 1, Tendsto (fun k => F k t-H k t) atTop (𝓝 0)) + (hchord : ∀ {a b x : ℝ}, 0 < a → a < b → b < 1 → x ∈ Icc a b → + Tendsto (fun k => H k x-H k a-((H k b-H k a)/(b-a))*(x-a)) atTop (𝓝 0)) + {a b x : ℝ} (ha : 0 < a) (hab : a < b) (hb : b < 1) (hx : x ∈ Icc a b) : + Tendsto (fun k => F k x-F k a-((F k b-F k a)/(b-a))*(x-a)) atTop (𝓝 0) := by + have ha' : a ∈ Ioo (0:ℝ) 1 := ⟨ha,hab.trans hb⟩ + have hb' : b ∈ Ioo (0:ℝ) 1 := ⟨ha.trans hab,hb⟩ + have hx' : x ∈ Ioo (0:ℝ) 1 := ⟨ha.trans_le hx.1,hx.2.trans_lt hb⟩ + have hdiff := (((hval x hx').sub (hval a ha')).sub + ((((hval b hb').sub (hval a ha')).div_const (b-a)).mul_const (x-a))) + have hh := (hchord ha hab hb hx).add hdiff + convert hh using 1 + · funext k + ring + · simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/QuantitativeQuadraticMean.lean b/lean/OAI/Geometry/RCD/Harmonic/QuantitativeQuadraticMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..54b0ba1e26a927edf5d1f5d4543a4a1731e29d1b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/QuantitativeQuadraticMean.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Harmonic.QuantitativeAffineMean +import Mathlib.Analysis.Calculus.Deriv.Pow + +namespace OAI + +/-! # Quantitative quadratic laws from integrated second variation + +The second derivative need only be represented by an integrable density. +No pointwise second differentiability is assumed. +-/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem quadratic_chord_error_of_integrated_bound + (F G : ℝ → ℝ) {a b x c D : ℝ} (hab : a c*z^2/2) (c*t) t := by + convert (((hasDerivAt_id t).pow 2).const_mul c).div_const 2 using 1 <;> simp + ring + have hP (t : ℝ) (ht : t∈Icc a b) : HasDerivAt P (deriv F t-c*t) t := + (hF t ht).hasDerivAt.sub (hp t) + have hPint (u v : ℝ) (hu : a≤u) (huv : u≤v) (hv : v≤b) : + (∫ t in u..v, G t-c)=deriv P v-deriv P u := by + rw [intervalIntegral.integral_sub (hint u v hu huv hv).1 intervalIntegrable_const, + intervalIntegral.integral_const,smul_eq_mul,(hint u v hu huv hv).2, + (hP v ⟨hu.trans huv,hv⟩).deriv,(hP u ⟨hu,huv.trans hv⟩).deriv] + ring + have hh := chord_error_le_of_derivative_oscillation hab hD hx + (fun t ht => (hP t ht).differentiableAt) + (fun u hu v hv => integrated_derivative_oscillation hD hG hPint hu hv) + convert hh using 1 + congr 1 + dsimp only [P] + field_simp [(sub_pos.mpr hab).ne'] + ring + +theorem quadratic_limit_chord_error + (F G : ℕ → ℝ → ℝ) (f : ℝ → ℝ) {a b x c D : ℝ} + (hab : a F k t) atTop (𝓝 (f t))) : + |f x-f a-((f b-f a)/(b-a))*(x-a)-c*(x-a)*(x-b)/2|≤D*(b-a)^2 := by + have hlim := ((((hval x hx).sub (hval a (left_mem_Icc.mpr hab.le))).sub + ((((hval b (right_mem_Icc.mpr hab.le)).sub (hval a (left_mem_Icc.mpr hab.le))).div_const + (b-a)).mul_const (x-a))).sub_const (c*(x-a)*(x-b)/2)).abs + apply le_of_forall_pos_le_add + intro ε hε + let δ := ε/((b-a)^2+1) + have hδ : 0<δ := div_pos hε (by positivity) + have he : δ*((b-a)^2+1)=ε := div_mul_cancel₀ ε (by positivity) + have hh : ∀ᶠ k in atTop, + |F k x-F k a-((F k b-F k a)/(b-a))*(x-a)-c*(x-a)*(x-b)/2|≤(D+δ)*(b-a)^2 := by + filter_upwards [hG δ hδ] with k hk + exact quadratic_chord_error_of_integrated_bound (F k) (G k) hab (by positivity) hx + (hF k) hk (hint k) + have hle := le_of_tendsto hlim hh + nlinarith only [hle,he,hδ] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialAverageTimeDerivative.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialAverageTimeDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..608b47f0b476f98753bc39f506cdbb6757cfa1af --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialAverageTimeDerivative.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.RCD.Harmonic.RadialContinuousL2Time +import OAI.Geometry.RCD.Coordinates.TimeAverageLinearMap + +namespace OAI + +/-! # The L2 derivative of the actual averaged Sobolev family + +The countable exceptional times disappear under integration. The +derivative is represented by the exact endpoint difference of values. +-/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (Q : QuadraticCheegerEnergy μ) + +theorem radial_average_L2_derivative + {a b : ℝ} (v : Ioo a b → SobolevSpace μ Q) + (hv : AEStronglyMeasurable v (volume.comap Subtype.val)) + {C : ℝ} (hb : ∀ q, ‖v q‖ ≤ C) + (z : X) {r : ℝ} (hr : 0 < r) (H : ℝ → X → ℝ) {L : ℝ≥0} + (hH : LipschitzOnWith L (Function.uncurry H) (Ioo a b ×ˢ closedBall z (2*r))) + (N : Set ℝ) (hN : N.Countable) + (hrep : ∀ q : Ioo a b, (q:ℝ) ∉ N → SobolevSpace.toLp μ Q (v q) =ᵐ[μ] + fun x => radialCutoff z r x*H q x) + {h t : ℝ} (hh : 0 < h) (ha : a < t-h) (hb' : t+h < b) : + ∃ D : Lp ℝ 2 μ, + HasDerivAt (fun s => SobolevSpace.toLp μ Q + (timeIntervalAverage (intervalVectorExtension v) h s)) D t ∧ + D =ᵐ[μ] fun x => radialCutoff z r x*((H (t+h) x-H (t-h) x)/(2*h)) := by + obtain ⟨g,-,hg,hgc⟩ := radial_continuous_L2_time_family μ Q z hr H hH + let T := SobolevSpace.toLpCLM μ Q + let u := intervalVectorExtension v + let G := intervalVectorExtension g + have he : (fun s => T (u s)) =ᵐ[volume] G := by + filter_upwards [hN.ae_notMem volume] with s hs + by_cases hmem : s ∈ Ioo a b + · change T (intervalVectorExtension v s) = intervalVectorExtension g s + simp only [intervalVectorExtension,dite_eq_left hmem] + exact Lp.ext ((hrep ⟨s,hmem⟩ hs).trans (hg ⟨s,hmem⟩).symm) + · simp only [u,G,intervalVectorExtension,dite_eq_right hmem,map_zero] + have hp : t+h ∈ Ioo a b := ⟨by linarith,hb'⟩ + have hm : t-h ∈ Ioo a b := ⟨ha,by linarith⟩ + let D := (2*h)⁻¹ • (G (t+h)-G (t-h)) + refine ⟨D,timeIntervalAverage_map_hasDerivAt T u + (intervalVectorExtension_integrable v hv hb) G he h t + (hgc.continuousAt (isOpen_Ioo.mem_nhds hp)) + (hgc.continuousAt (isOpen_Ioo.mem_nhds hm)),?_⟩ + have hGp : G (t+h) = g ⟨t+h,hp⟩ := intervalVectorExtension_eq g ⟨t+h,hp⟩ + have hGm : G (t-h) = g ⟨t-h,hm⟩ := intervalVectorExtension_eq g ⟨t-h,hm⟩ + dsimp only [D] + rw [hGp,hGm] + filter_upwards [Lp.coeFn_smul ((2*h)⁻¹) (g ⟨t+h,hp⟩-g ⟨t-h,hm⟩), + Lp.coeFn_sub (g ⟨t+h,hp⟩) (g ⟨t-h,hm⟩),hg ⟨t+h,hp⟩,hg ⟨t-h,hm⟩] + with x hx hsub hplus hminus + rw [hx,Pi.smul_apply,hsub,Pi.sub_apply,hplus,hminus] + simp only [smul_eq_mul,div_eq_mul_inv] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialBallComparison.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialBallComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..9eef58c517a98f53ecf2513c13b374823aabbeba --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialBallComparison.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.RCD.Transport.AnnularTransportComparison +import OAI.Geometry.RCD.Transport.RadialDistortionContinuity + +namespace OAI + +/-! # Removing the auxiliary center radius in radial CD comparison + +The small initial ball in the actual transport argument shrinks to the +pole. Continuity of the sharp distortion coefficient gives a comparison +at every radius, without selecting continuity radii of the measure. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem FullCD.ball_contraction_below + (μ : Measure X) [SigmaFinite μ] {K : ℝ} {n : ℕ} (hcd : FullCD μ K n) + (hpos : ∀ x : X, ∀ r : ℝ, 0 < r → 0 < μ (ball x r)) + (hfin : ∀ s : Set X, Bornology.IsBounded s → μ s < ∞) + (hn : 2 ≤ n) (hK : K < 0) (p : X) {r R t : ℝ} + (hR : 0 < R) (ht : 0 < t) (ht1 : t < 1) (htr : t * R < r) : + tau K n t R ^ n * μ (ball p R) ≤ μ (ball p r) := by + have hmap : Tendsto (fun δ : ℝ => (t, R + δ)) (𝓝[>] 0) (𝓝 (t, R)) := by + have hh : Tendsto (fun δ : ℝ => R + δ) (𝓝[>] 0) (𝓝 R) := by + have hzero : Tendsto (fun δ : ℝ => δ) (𝓝[>] 0) (𝓝 0) := + tendsto_id.mono_left nhdsWithin_le_nhds + simpa only [add_zero] using hzero.const_add R + exact tendsto_const_nhds.prodMk_nhds hh + have hc := (continuousAt_tau_nat_power_of_neg hK hn ht ht1 hR).tendsto.comp hmap + have hm := (ENNReal.continuous_mul_const (hfin (ball p R) isBounded_ball).ne).continuousAt.tendsto.comp hc + apply le_of_tendsto hm + have hε : 0 < (r - t * R) / (1 + t) := div_pos (sub_pos.mpr htr) (by linarith) + filter_upwards [self_mem_nhdsWithin, nhdsWithin_le_nhds (Iio_mem_nhds hε)] with δ hδ hsmall + have houter : t * R + (1 + t) * δ < r := by + have hh := (lt_div_iff₀ (by linarith : 0 < 1 + t)).mp hsmall + nlinarith only [hh] + exact (hcd.ball_contraction_with_center_error μ hpos hfin hn hK.le p hR hδ ht ht1).trans + (measure_mono (ball_subset_ball houter.le)) + +theorem FullCD.radial_ball_ratio + (μ : Measure X) [SigmaFinite μ] {K : ℝ} {n : ℕ} (hcd : FullCD μ K n) + (hpos : ∀ x : X, ∀ r : ℝ, 0 < r → 0 < μ (ball x r)) + (hfin : ∀ s : Set X, Bornology.IsBounded s → μ s < ∞) + (hn : 2 ≤ n) (hK : K < 0) (p : X) {r R : ℝ} + (hr : 0 < r) (hrR : r ≤ R) : + tau K n (r / R) R ^ n * μ (ball p R) ≤ μ (ball p r) := by + have hR : 0 < R := hr.trans_le hrR + by_cases heq : r = R + · subst r + simp [hR.ne', tau] + have hrR' : r < R := lt_of_le_of_ne hrR heq + have hq : 0 < r / R := div_pos hr hR + have hq1 : r / R < 1 := (div_lt_one hR).mpr hrR' + have hmap : Tendsto (fun t : ℝ => (t, R)) (𝓝[<] (r / R)) (𝓝 (r / R, R)) := + (tendsto_id.mono_left nhdsWithin_le_nhds).prodMk_nhds tendsto_const_nhds + have hc := (continuousAt_tau_nat_power_of_neg hK hn hq hq1 hR).tendsto.comp hmap + have hm := (ENNReal.continuous_mul_const (hfin (ball p R) isBounded_ball).ne).continuousAt.tendsto.comp hc + apply le_of_tendsto hm + filter_upwards [self_mem_nhdsWithin, nhdsWithin_le_nhds (Ioi_mem_nhds hq)] with t htq ht + exact hcd.ball_contraction_below μ hpos hfin hn hK p hR ht (htq.trans hq1) + ((lt_div_iff₀ hR).mp htq) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialCompactnessSequence.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialCompactnessSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec612a472b625caaeeab86a39ba3dc7842e2e82c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialCompactnessSequence.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.RCD.Sobolev.PoissonHarmonicCompactnessInput + +namespace OAI + +/-! # The concrete sequence data for the sharp projection argument -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- All analytic preconditions of the published local compactness theorem. +No projected Euler equation or affine approximation is part of this data. -/ +structure RadialCompactnessSequence {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) (S : ℝ) where + center : ℕ → X + radius : ℕ → ℝ + error : ℕ → ℝ + coordinates : ℕ → Fin n → SobolevSpace (hausdorff n X) hX.quadratic + coordinateValues : ℕ → X → Euclidean n + harmonicFunction : ℕ → SobolevSpace (hausdorff n X) hX.quadratic + radialFunction : ℕ → SobolevSpace (hausdorff n X) hX.quadratic + radius_pos : ∀ i, 0 < radius i + curvature : ∀ i, -1 ≤ K * radius i ^ 2 + error_pos : ∀ i, 0 < error i + error_zero : Tendsto error atTop (𝓝 0) + measured : ∀ i, IsMeasuredEuclideanApproximation (hausdorff n X) n + (center i) (radius i) S (error i) (coordinateValues i) + representative : ∀ i j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (coordinates i j) =ᵐ[ + (hausdorff n X).restrict (ball (center i) (S * radius i))] fun x => coordinateValues i x j + harmonic : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (harmonicFunction i) + outer_norm : ∀ i, ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball (center i) (S * radius i)) + (harmonicFunction i))‖ ≤ 1 + interior_energy : ∀ ρ : ℝ, 0 < ρ → ρ < S → ∃ C : ℝ, 0 ≤ C ∧ ∀ i, + radius i ^ 2 * ((hausdorff n X).real (ball (center i) (S * radius i)))⁻¹ * + (∫ x in ball (center i) (ρ * radius i), localGamma (hausdorff n X) hX.quadratic + (harmonicFunction i) (harmonicFunction i) x ∂hausdorff n X) ≤ C + radial_bounds : ∃ (A : ℝ) (a : ℕ → ℝ), 0 ≤ A ∧ ∀ i, + |a i| ≤ A ∧ + IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball (center i) (S * radius i)) + (radialFunction i) (a i / radius i ^ 2) ∧ + ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball (center i) (S * radius i)) + (radialFunction i))‖ ≤ A ∧ + ∀ᵐ x ∂(hausdorff n X).restrict (ball (center i) (S * radius i)), + radius i ^ 2 * localGamma (hausdorff n X) hX.quadratic (radialFunction i) (radialFunction i) x ≤ A + quadratic_limit : Tendsto (fun i => ((hausdorff n X).real (ball (center i) (S * radius i)))⁻¹ * + ∫ x in ball (center i) (S * radius i), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (radialFunction i) x - + ‖coordinateValues i x‖ ^ 2 / 2) ^ 2 ∂hausdorff n X) atTop (𝓝 0) + +omit [ProperSpace X] in +theorem LocalPoissonHarmonicCompactnessInput.extract_sequence + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalPoissonHarmonicCompactnessInput hX) (hn : 2 ≤ n) + {S : ℝ} (hS : 0 < S) (q : RadialCompactnessSequence hX S) : + ∃ t : ℕ → ℕ, StrictMono t ∧ ∃ model : EuclideanHarmonicModel n S, + PoissonHarmonicLimit hX S (q.center ∘ t) (q.radius ∘ t) (q.coordinates ∘ t) + (q.coordinateValues ∘ t) (q.harmonicFunction ∘ t) (q.radialFunction ∘ t) model := + hinput hn S hS q.center q.radius q.error q.radius_pos q.curvature q.error_pos q.error_zero + q.coordinates q.coordinateValues q.harmonicFunction q.radialFunction q.measured q.representative + q.harmonic q.outer_norm q.interior_energy q.radial_bounds q.quadratic_limit + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialContinuousL2Time.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialContinuousL2Time.lean new file mode 100644 index 0000000000000000000000000000000000000000..b719e0558a09bb2f28c30cb5d23867d3b3bcf215 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialContinuousL2Time.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Sobolev.RadialSobolevTimeMeasurable +import OAI.Geometry.RCD.Coordinates.IntervalVectorExtension + +namespace OAI + +/-! # Continuous L2 values of a locally Lipschitz time cylinder -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (Q : QuadraticCheegerEnergy μ) + +include Q in +theorem radial_continuous_L2_time_family (z : X) {r : ℝ} (hr : 0 < r) + {a b : ℝ} (H : ℝ → X → ℝ) {L : ℝ≥0} + (hH : LipschitzOnWith L (Function.uncurry H) (Ioo a b ×ˢ closedBall z (2*r))) : + ∃ g : Ioo a b → Lp ℝ 2 μ, Continuous g ∧ + (∀ t, g t =ᵐ[μ] fun x => radialCutoff z r x*H t x) ∧ + ContinuousOn (intervalVectorExtension g) (Ioo a b) := by + obtain ⟨W,hW,he⟩ := hH.extend_real + obtain ⟨A,hA⟩ := (isCompact_Icc.prod (isCompact_closedBall z (2*r))).exists_bound_of_continuousOn + hW.continuous.continuousOn + let B : ℝ≥0 := ⟨max A 0,le_max_right _ _⟩ + have hs (t : Ioo a b) : LipschitzOnWith L (H t) (closedBall z (2*r)) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + have hb := hH.dist_le_mul (t,x) ⟨t.property,hx⟩ (t,y) ⟨t.property,hy⟩ + simpa only [Prod.dist_eq,dist_self,max_eq_right dist_nonneg,Function.uncurry] using hb + have hb (t : Ioo a b) (x : X) (hx : x ∈ closedBall z (2*r)) : |H t x| ≤ B := by + have hbound := hA ((t:ℝ),x) ⟨Ioo_subset_Icc_self t.property,hx⟩ + have heq := he (show ((t:ℝ),x) ∈ Ioo a b ×ˢ closedBall z (2*r) from ⟨t.property,hx⟩) + change H t x = W (t,x) at heq + rw [heq] + exact (show |W (t,x)| ≤ A by simpa only [Real.norm_eq_abs] using hbound).trans (le_max_left _ _) + have htime (x : X) (hx : x ∈ closedBall z (2*r)) : Continuous (fun t : Ioo a b => H t x) := by + have hwc : Continuous (fun t : Ioo a b => W (t,x)) := + hW.continuous.comp (continuous_subtype_val.prodMk continuous_const) + apply hwc.congr + intro t + exact (he (show ((t:ℝ),x) ∈ Ioo a b ×ˢ closedBall z (2*r) from ⟨t.property,hx⟩)).symm + let g := fun t : Ioo a b => SobolevSpace.toLp μ Q (radialLocalSobolev μ Q z hr (hs t) (hb t)) + have hg : Continuous g := radialLocalSobolev_toLp_continuous μ Q z hr + (fun t : Ioo a b => H t) L B hs hb htime + refine ⟨g,hg,fun t => radialLocalSobolev_coe μ Q z hr (hs t) (hb t),?_⟩ + apply continuousOn_iff_continuous_domRestrict.mpr + change Continuous (fun t : Ioo a b => intervalVectorExtension g t) + simpa only [intervalVectorExtension_eq] using hg + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialContractionFactor.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialContractionFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e8ea59b2a184b6142ae8c6d5c5aac08c9a6238a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialContractionFactor.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Harmonic.RadialTimeCapacity + +namespace OAI + +/-! # Quantitative radial density at small times + +The proved signed Gaussian lower bound for the CD coefficient suffices: +the derivative of its inverse volume factor is n + kappa D²/3. +-/ + +open Set Filter MeasureTheory +open scoped ENNReal Topology + +namespace RegularPointCoordinates + +noncomputable def radialContractionFloor (n : ℕ) (κ D t : ℝ) : ℝ≥0∞ := + ENNReal.ofReal ((1 - t) * Real.exp (-κ * D ^ 2 * (1 - (1 - t) ^ 2) / (6 * n))) + +noncomputable def radialContractionDensity (n : ℕ) (κ D t : ℝ) : ℝ := + Real.exp (κ * D ^ 2 * (1 - (1 - t) ^ 2) / 6) / (1 - t) ^ n + +theorem radialContractionFloor_pos (n : ℕ) (κ D : ℝ) {t : ℝ} (ht : t < 1) : + 0 < radialContractionFloor n κ D t := by + unfold radialContractionFloor + exact ENNReal.ofReal_pos.mpr (mul_pos (sub_pos.mpr ht) (Real.exp_pos _)) + +theorem radialContractionFloor_ne_top (n : ℕ) (κ D t : ℝ) : + radialContractionFloor n κ D t ≠ ∞ := ENNReal.ofReal_ne_top + +theorem radialContractionFloor_le_tau {K κ θ D t : ℝ} {n : ℕ} + (hn : 2 ≤ n) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hθ : 0 ≤ θ) (hD : θ ≤ D) (ht : 0 ≤ t) (ht1 : t ≤ 1) : + radialContractionFloor n κ D t ≤ tau K n (1 - t) θ := by + have hn1 : (1 : ℝ) < n := by exact_mod_cast (show 1 < n by omega) + have hs : 0 ≤ 1 - (1 - t) ^ 2 := by nlinarith + have hsq : θ ^ 2 ≤ D ^ 2 := pow_le_pow_left₀ hθ hD 2 + have hKθ : -κ * D ^ 2 ≤ K * θ ^ 2 := by + nlinarith [mul_le_mul_of_nonneg_right hK (sq_nonneg θ), + mul_le_mul_of_nonneg_left hsq hκ] + apply le_trans _ (tau_signed_gaussian_lower K n θ (1 - t) hn1 hθ + (sub_nonneg.mpr ht1) (by linarith)) + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_left _ (sub_nonneg.mpr ht1) + apply Real.exp_le_exp.mpr + apply div_le_div_of_nonneg_right _ (by positivity) + exact mul_le_mul_of_nonneg_right hKθ hs + +theorem radialContractionDensity_zero (n : ℕ) (κ D : ℝ) : + radialContractionDensity n κ D 0 = 1 := by + simp [radialContractionDensity] + +theorem radialContractionDensity_pos (n : ℕ) (κ D : ℝ) {t : ℝ} (ht : t < 1) : + 0 < radialContractionDensity n κ D t := + div_pos (Real.exp_pos _) (pow_pos (sub_pos.mpr ht) _) + +theorem radialContractionFloor_inv_pow {n : ℕ} (hn : 0 < n) (κ D : ℝ) + {t : ℝ} (ht : t < 1) : + ((radialContractionFloor n κ D t) ^ n)⁻¹ = + ENNReal.ofReal (radialContractionDensity n κ D t) := by + have hp : 0 < 1 - t := sub_pos.mpr ht + have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' + have he : (n : ℝ) * (-κ * D ^ 2 * (1 - (1 - t) ^ 2) / (6 * n)) = + -(κ * D ^ 2 * (1 - (1 - t) ^ 2) / 6) := by field_simp + rw [radialContractionFloor, ← ENNReal.ofReal_pow (mul_nonneg hp.le (Real.exp_pos _).le), + ← ENNReal.ofReal_inv_of_pos (pow_pos (mul_pos hp (Real.exp_pos _)) _), + radialContractionDensity, mul_pow, ← Real.exp_nat_mul, he, Real.exp_neg] + congr 1 + field_simp + +theorem radialContractionDensity_hasDerivAt_zero (n : ℕ) (κ D : ℝ) : + HasDerivAt (radialContractionDensity n κ D) + ((n : ℝ) + κ * D ^ 2 / 3) 0 := by + have hbase : HasDerivAt (fun t : ℝ => 1 - t) (-1) 0 := + (hasDerivAt_id (0 : ℝ)).const_sub 1 + have hexp : HasDerivAt (fun t : ℝ => κ * D ^ 2 * (1 - (1 - t) ^ 2) / 6) + (κ * D ^ 2 / 3) 0 := by + convert (((hbase.pow 2).const_sub 1).const_mul (κ * D ^ 2)).div_const 6 using 1 + norm_num + ring + unfold radialContractionDensity + convert hexp.exp.div (hbase.pow n) (by simp : (1 - (0 : ℝ)) ^ n ≠ 0) using 1 + norm_num + ring + +theorem radialContractionDensity_secant_tendsto (n : ℕ) (κ D : ℝ) : + Tendsto (fun t : ℝ => (radialContractionDensity n κ D t - 1) / t) + (𝓝[>] 0) (𝓝 ((n : ℝ) + κ * D ^ 2 / 3)) := by + simpa only [radialContractionDensity_zero, zero_add, smul_eq_mul, div_eq_mul_inv, mul_comm] using + (radialContractionDensity_hasDerivAt_zero n κ D).tendsto_slope_zero_right + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialContractionMoments.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialContractionMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..544a84debb86adc5326cb1853c1b919cd0762df7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialContractionMoments.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Sobolev.SquaredDistanceEnergy +import OAI.Geometry.RCD.Harmonic.CompressedRadialTime + +namespace OAI + +/-! # Cost and quadratic decrement of the actual radial contraction -/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] + (hQ : QuadraticCheegerEnergy μ) +attribute [local instance] pathBorel pathBorelSpace + +theorem radial_contraction_moments (p : X) {R a : ℝ} (hR : 0 ≤ R) + (ha : 0 ≤ a) (_ha1 : a ≤ 1) + (heik : ∀ᵐ x ∂μ, x ∈ ball p R → + localGamma μ hQ (inwardSobolev μ hQ p R) (inwardSobolev μ hQ p R) x = 1) + (ν : Measure X) (hν : ν ≪ μ) (hsν : ∀ᵐ x ∂ν, x ∈ ball p R) + (π : Measure C(Time, X)) (hinit : π.map (fun γ => γ 0) = ν) + {C : ℝ≥0∞} (hc : ∀ t : Time, π.map (fun γ => γ t) ≤ C • μ) + (hrad : ∀ᵐ γ ∂π, dist (γ 0) (γ 1) = a * dist (γ 0) p ∧ + dist (γ 1) p = (1 - a) * dist (γ 0) p) : + (∫ γ, dist (γ 0) (γ 1) ^ 2 ∂π) = + a ^ 2 * weightedGradientSquare μ hQ ν (inwardQuadratic μ hQ p hR) ∧ + (∫ γ, SobolevSpace.toLp μ hQ (inwardQuadratic μ hQ p hR) (γ 0) - + SobolevSpace.toLp μ hQ (inwardQuadratic μ hQ p hR) (γ 1) ∂π) = + (a - a ^ 2 / 2) * weightedGradientSquare μ hQ ν (inwardQuadratic μ hQ p hR) := by + let q := inwardQuadratic μ hQ p hR + have hstart : ∀ᵐ γ ∂π, γ 0 ∈ ball p R := by + apply ae_of_ae_map (measurable_path_eval 0).aemeasurable + rwa [hinit] + have hrep (s : Time) : ∀ᵐ γ ∂π, + SobolevSpace.toLp μ hQ q (γ s) = + (inwardDistance p R (γ s)) ^ 2 / 2 - R * inwardDistance p R (γ s) := by + apply ae_of_ae_map (measurable_path_eval s).aemeasurable + (p := fun x => SobolevSpace.toLp μ hQ q x = + (inwardDistance p R x) ^ 2 / 2 - R * inwardDistance p R x) + exact (Measure.absolutelyContinuous_of_le_smul (hc s)).ae_le + (inwardQuadratic_coe μ hQ p hR) + have hmoment : (∫ γ, dist (γ 0) p ^ 2 ∂π) = weightedGradientSquare μ hQ ν q := by + have hm : Measurable (fun x : X => dist x p ^ 2) := by fun_prop + rw [← integral_map (measurable_path_eval 0).aemeasurable hm.aestronglyMeasurable, hinit, + inwardQuadratic_weighted_energy μ hQ p hR heik ν hν hsν] + simp only [dist_comm] + constructor + · rw [← hmoment, ← integral_const_mul] + apply integral_congr_ae + filter_upwards [hrad] with γ hγ + rw [hγ.1, mul_pow] + · rw [← hmoment, ← integral_const_mul] + apply integral_congr_ae + filter_upwards [hrad, hstart, hrep 0, hrep 1] with γ hγ hstart h0 h1 + have hd0 : dist p (γ 0) < R := by simpa only [mem_ball, dist_comm] using hstart + have hd1 : dist p (γ 1) < R := by + rw [dist_comm, hγ.2] + exact (mul_le_of_le_one_left dist_nonneg (by linarith : 1 - a ≤ 1)).trans_lt + (by simpa only [dist_comm] using hd0) + rw [h0, h1] + simp only [inwardDistance, max_eq_left (sub_nonneg.mpr hd0.le), + max_eq_left (sub_nonneg.mpr hd1.le)] + rw [dist_comm p (γ 1), hγ.2, dist_comm p (γ 0)] + ring + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialDensityEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialDensityEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9dec5a719911e31fe61257a34aaea21a31ede97 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialDensityEnvelope.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.RCD.Harmonic.RadialContractionFactor + +namespace OAI + +/-! # A uniform envelope for the small-time radial densities -/ + +namespace RegularPointCoordinates + +theorem radialContractionDensity_le {κ D t : ℝ} (n : ℕ) (hκ : 0 ≤ κ) + (_ht : 0 ≤ t) (ht1 : t ≤ 1 / 2) : + radialContractionDensity n κ D t ≤ 2 ^ n * Real.exp (κ * D ^ 2 / 6) := by + have hd : 0 < (1 - t) ^ n := pow_pos (by linarith) _ + have hnum : Real.exp (κ * D ^ 2 * (1 - (1 - t) ^ 2) / 6) ≤ + Real.exp (κ * D ^ 2 / 6) := by + apply Real.exp_le_exp.mpr + nlinarith [mul_nonneg (mul_nonneg hκ (sq_nonneg D)) (sq_nonneg (1 - t))] + have hprod : 1 ≤ (2 : ℝ) ^ n * (1 - t) ^ n := by + rw [← mul_pow] + exact one_le_pow₀ (by linarith) + apply (div_le_iff₀ hd).mpr + have hh := mul_le_mul_of_nonneg_left hprod (Real.exp_pos (κ * D ^ 2 / 6)).le + nlinarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeError.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeError.lean new file mode 100644 index 0000000000000000000000000000000000000000..25f7a74b38ef8ca7755011eb0097c2403a2194c3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeError.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Sobolev.WeakRadialCancellation +import OAI.Geometry.RCD.Sobolev.PoissonSourceEstimates + +namespace OAI + +/-! # The radial derivative error from the actual Poisson energy error -/ + +open Set MeasureTheory +open scoped InnerProductSpace NNReal ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +theorem localGamma_sq_le (f a : SobolevSpace μ hQ) : + ∀ᵐ x ∂μ, (localGamma μ hQ f a x) ^ 2 ≤ + localGamma μ hQ f f x * localGamma μ hQ a a x := by + filter_upwards [localGamma_abs_le μ hQ f a, + localGamma_self μ hQ f, localGamma_self μ hQ a] with x hcs hf ha + have hp : 0 ≤ SobolevSpace.minimalSlope μ hQ f x * SobolevSpace.minimalSlope μ hQ a x := + (abs_nonneg _).trans hcs + have hh := (sq_le_sq₀ (abs_nonneg _) hp).mpr hcs + simpa only [sq_abs, mul_pow, hf, ha] using hh + +/-- A bounded gradient in the second slot makes its pairing with every +Sobolev gradient locally square-integrable. -/ +theorem localGamma_memLp_two_of_bound (Ω : Set X) (f a : SobolevSpace μ hQ) + {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ a a x ≤ B) : + MemLp (localGamma μ hQ f a) 2 (μ.restrict Ω) := by + have hb : ∀ᵐ x ∂μ.restrict Ω, (localGamma μ hQ f a x) ^ 2 ≤ B * localGamma μ hQ f f x := by + filter_upwards [ha, ae_restrict_of_ae (localGamma_sq_le μ hQ f a), + ae_restrict_of_ae (localGamma_self μ hQ f)] with x hax hsq hself + exact hsq.trans (by rw [mul_comm B]; exact mul_le_mul_of_nonneg_left hax (by rw [hself]; positivity)) + have hmeas := (localGamma_memL1 μ hQ f a).aestronglyMeasurable.restrict (s := Ω) + apply (memLp_two_iff_integrable_sq hmeas).mpr + exact ((localGamma_memL1 μ hQ f f).integrableOn.const_mul B).mono_nonneg + (hmeas.pow 2) (Filter.Eventually.of_forall fun x => sq_nonneg _) hb + +/-- The raw radial derivative changes by at most the bounded coordinate +gradient times the Poisson energy error. -/ +theorem radial_pairing_error_le (Ω : Set X) (q f a : SobolevSpace μ hQ) + {B : ℝ} + (ha : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ a a x ≤ B) : + (∫ x in Ω, (localGamma μ hQ q a x - localGamma μ hQ f a x) ^ 2 ∂μ) ≤ + B * ∫ x in Ω, localGamma μ hQ (q - f) (q - f) x ∂μ := by + have hsq : ∀ᵐ x ∂μ.restrict Ω, (localGamma μ hQ q a x - localGamma μ hQ f a x) ^ 2 ≤ + B * localGamma μ hQ (q - f) (q - f) x := by + filter_upwards [ae_restrict_of_ae (localGamma_sub_left μ hQ q f a), + ae_restrict_of_ae (localGamma_sq_le μ hQ (q - f) a), ha, + ae_restrict_of_ae (localGamma_self μ hQ (q - f))] with x hsub hcs hax hself + rw [← hsub] + exact hcs.trans (by rw [mul_comm B]; exact mul_le_mul_of_nonneg_left hax (by rw [hself]; positivity)) + have hi := ((localGamma_memLp_two_of_bound μ hQ Ω q a ha).sub + (localGamma_memLp_two_of_bound μ hQ Ω f a ha)).integrable_sq + have hh := integral_mono_ae hi + ((localGamma_memL1 μ hQ (q - f) (q - f)).integrableOn.const_mul B) hsq + simpa only [integral_const_mul, Pi.sub_apply] using hh + +/-- The source estimate gives a linear, not square-root, bound for the +squared radial derivative error. -/ +theorem radial_pairing_error_le_source (Ω : Set X) (hΩ : MeasurableSet Ω) + (hfin : μ Ω ≠ ∞) (q a : SobolevSpace μ hQ) + (H : SobolevSpace.dirichlet μ hQ Ω) (σ : Measure X) [IsFiniteMeasure σ] + (hsource : IsDirichletMeasureSource μ hQ Ω H.val σ) + {d C B A : ℝ} (hd : 1 < d) (hC : 0 ≤ C) (hB : 0 ≤ B) (hA : 0 ≤ A) + (hheight : ∀ᵐ x ∂μ, 0 ≤ SobolevSpace.toLp μ hQ H.val x ∧ + SobolevSpace.toLp μ hQ H.val x ≤ B) + (ha : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ a a x ≤ A) + (hsob : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (∫ x in Ω, |SobolevSpace.toLp μ hQ φ.val x| ^ (2 * d) ∂μ) ^ (1 / d) ≤ + C * energyForm μ hQ φ.val φ.val) : + (∫ x in Ω, (localGamma μ hQ q a x - localGamma μ hQ (q - H.val) a x) ^ 2 ∂μ) ≤ + A * (σ.real Ω * B) := by + have he := (positive_source_bounds_of_measure μ hQ Ω hΩ hfin H σ hsource hd hC hB + hheight hsob).2.2 + have hg : (∫ x in Ω, localGamma μ hQ H.val H.val x ∂μ) ≤ σ.real Ω * B := by + rw [integral_congr_ae (ae_restrict_of_ae (localGamma_self μ hQ H.val))] + exact (setIntegral_le_integral + ((localGamma_memL1 μ hQ H.val H.val).congr (localGamma_self μ hQ H.val)) + (Filter.Eventually.of_forall fun x => sq_nonneg _)).trans he + have hh := radial_pairing_error_le μ hQ Ω q (q - H.val) a ha + have hident : q - (q - H.val) = H.val := by abel + rw [hident] at hh + exact hh.trans (mul_le_mul_of_nonneg_left hg hA) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeNorms.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeNorms.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a79025d11b951a849c8098da805255222ac71fd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialDerivativeNorms.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.RCD.Harmonic.LocalRadialDerivative +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # The actual radial derivative errors in the common normalized L2 space -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The derivative's local energy estimate passes directly to normalized +L2, including the original volume denominator. -/ +theorem normalized_radial_derivative_norm_sq (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f q : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) : + ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω f hf q)‖ ^ 2 ≤ + B * (μ.real Ω)⁻¹ * ∫ x in Ω, localGamma μ hQ q q x ∂μ := by + rw [normalizeLocalL2_norm_sq, ← l2_norm_sq_eq_integral] + have hh := mul_le_mul_of_nonneg_left (localRadialDerivative_norm_sq μ hQ Ω f q hf) + (show 0 ≤ (μ.real Ω)⁻¹ by positivity) + convert hh using 1; ring + +/-- The squared L2 norm of the algebraic commutator is exactly the +integral controlled by the full Poisson mass estimate. -/ +theorem local_radial_commutator_norm_sq (Ω : Set X) + (f v u g h : SobolevSpace μ hQ) {Cf Cv : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ Cf) + (hv : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ v v x ≤ Cv) + (hh : SobolevSpace.toLp μ hQ h =ᵐ[μ.restrict Ω] localGamma μ hQ v u) : + ‖localRadialDerivative μ hQ Ω v hv g - localRadialDerivative μ hQ Ω f hf h - + SobolevSpace.restrictLp μ hQ Ω h‖ ^ 2 = + ∫ x in Ω, (localGamma μ hQ v g x - localGamma μ hQ f h x - localGamma μ hQ v u x) ^ 2 ∂μ := by + rw [l2_norm_sq_eq_integral] + apply integral_congr_ae + filter_upwards [localRadialDerivative_representative μ hQ Ω v g hv, + localRadialDerivative_representative μ hQ Ω f h hf, + SobolevSpace.restrictLp_coe μ hQ Ω h, hh, + Lp.coeFn_sub (localRadialDerivative μ hQ Ω v hv g) (localRadialDerivative μ hQ Ω f hf h), + Lp.coeFn_sub (localRadialDerivative μ hQ Ω v hv g - localRadialDerivative μ hQ Ω f hf h) + (SobolevSpace.restrictLp μ hQ Ω h)] with x hg hf' hr hh' hs ht + simp only [ht, hs, Pi.sub_apply, hg, hf', hr, hh'] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialDyadicBudget.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialDyadicBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..ecda17ff96b76ef53d8d1145c0729dd642ea3aa3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialDyadicBudget.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.RCD.Harmonic.RadialSquaredDistance +import OAI.Geometry.RCD.Metric.VolumeBudget + +namespace OAI + +/-! +# Dyadic normalization of the radial mass estimate + +The coefficient of the inner source mass is a fixed positive dimensional +constant times the inverse power of the radius. This preserves the signed +volume increments when summing; monotonicity of the raw Euclidean volume +profile is not imposed. +-/ + +open Filter +open scoped Topology + +noncomputable section + +namespace RegularPointCoordinates + +def radialCutoffCoefficient (n : ℝ) : ℝ := (1 - (2 : ℝ) ^ (-n)) / n + +theorem radialCutoffCoefficient_pos {n : ℝ} (hn : 0 < n) : 0 < radialCutoffCoefficient n := by + apply div_pos _ hn + exact sub_pos.mpr (Real.rpow_lt_one_of_one_lt_of_neg (by norm_num) (by linarith)) + +theorem radialPower_height_dyadic {n r : ℝ} (hr : 0 < r) : + (r ^ (-n) - (2 * r) ^ (-n)) / n = r ^ (-n) * radialCutoffCoefficient n := by + rw [Real.mul_rpow (by norm_num) hr.le] + unfold radialCutoffCoefficient + ring + +/-- Normalize the actual annular estimate using only the outer volume bound. -/ +theorem radial_mass_normalized_le {n r M V W curvature C : ℝ} + (hn : 0 < n) (hr : 0 < r) (hcurvature : 0 ≤ curvature) + (hW : W ≤ C * (2 * r) ^ n) + (hmass : ((r ^ (-n) - (2 * r) ^ (-n)) / n) * M ≤ + r ^ (-n) * V - (2 * r) ^ (-n) * W + + curvature * ((r ^ (-n) - (2 * r) ^ (-n)) / n) * W) : + r ^ (-n) * M ≤ (radialCutoffCoefficient n)⁻¹ * + (r ^ (-n) * V - (2 * r) ^ (-n) * W) + curvature * C * (2 : ℝ) ^ n := by + let D := radialCutoffCoefficient n + have hD : 0 < D := radialCutoffCoefficient_pos hn + have hrp : 0 < r ^ (-n) := Real.rpow_pos_of_pos hr _ + have hcancel : r ^ (-n) * (2 * r) ^ n = (2 : ℝ) ^ n := by + rw [Real.mul_rpow (by norm_num) hr.le] + calc + _ = (2 : ℝ) ^ n * (r ^ (-n) * r ^ n) := by ring + _ = _ := by rw [← Real.rpow_add hr, neg_add_cancel, Real.rpow_zero, mul_one] + rw [radialPower_height_dyadic hr] at hmass + have hcorr : curvature * (r ^ (-n) * D) * W ≤ curvature * D * C * (2 : ℝ) ^ n := by + calc + _ ≤ curvature * (r ^ (-n) * D) * (C * (2 * r) ^ n) := + mul_le_mul_of_nonneg_left hW (mul_nonneg hcurvature (mul_nonneg hrp.le hD.le)) + _ = curvature * D * C * (r ^ (-n) * (2 * r) ^ n) := by ring + _ = _ := by rw [hcancel] + have hm : D * (r ^ (-n) * M) ≤ + r ^ (-n) * V - (2 * r) ^ (-n) * W + curvature * D * C * (2 : ℝ) ^ n := by + nlinarith + apply (mul_le_mul_iff_left₀ hD).mp + calc + _ = D * (r ^ (-n) * M) := mul_comm _ _ + _ ≤ r ^ (-n) * V - (2 * r) ^ (-n) * W + curvature * D * C * (2 : ℝ) ^ n := hm + _ = ((radialCutoffCoefficient n)⁻¹ * (r ^ (-n) * V - (2 * r) ^ (-n) * W) + + curvature * C * (2 : ℝ) ^ n) * D := by + change _ = (D⁻¹ * (r ^ (-n) * V - (2 * r) ^ (-n) * W) + curvature * C * (2 : ℝ) ^ n) * D + field_simp [ne_of_gt hD] + +/-- Signed dyadic volume increments and curvature control the total normalized +source mass. The density need not be attained monotonically. -/ +theorem radial_mass_dyadic_budget {n C kappa omega density : ℝ} + {A M : ℕ → ℝ} (hn : 0 < n) + (hA : Tendsto A atTop (𝓝 density)) (hdensity : density ≤ omega) + (hM : ∀ i, 0 ≤ M i) + (hmass : ∀ i, M i ≤ (radialCutoffCoefficient n)⁻¹ * (A (i + 1) - A i) + + kappa * (1 / 4 : ℝ) ^ i * C * (2 : ℝ) ^ n) : + Summable M ∧ (∑' i, M i) ≤ (radialCutoffCoefficient n)⁻¹ * + (omega - A 0 + (kappa * C * (2 : ℝ) ^ n * radialCutoffCoefficient n) * (4 / 3)) := by + have hD := radialCutoffCoefficient_pos hn + apply volume_defect_budget_of_profile_limit (inv_nonneg.mpr hD.le) hA hdensity hM + intro i + calc + M i ≤ (radialCutoffCoefficient n)⁻¹ * (A (i + 1) - A i) + + kappa * (1 / 4 : ℝ) ^ i * C * (2 : ℝ) ^ n := hmass i + _ = _ := by field_simp [ne_of_gt hD] + +/-- A uniform outer-volume deficit gives a uniform source budget, even at +centers whose density is less than the Euclidean density. -/ +theorem radial_mass_budget_of_outer_deficit {Y : Type*} {n C kappa omega delta : ℝ} + {density : Y → ℝ} {A M : Y → ℕ → ℝ} (hn : 0 < n) + (hA : ∀ y, Tendsto (A y) atTop (𝓝 (density y))) + (hdensity : ∀ y, density y ≤ omega) (houter : ∀ y, omega - delta ≤ A y 0) + (hM : ∀ y i, 0 ≤ M y i) + (hmass : ∀ y i, M y i ≤ (radialCutoffCoefficient n)⁻¹ * (A y (i + 1) - A y i) + + kappa * (1 / 4 : ℝ) ^ i * C * (2 : ℝ) ^ n) : + ∀ y, Summable (M y) ∧ (∑' i, M y i) ≤ + (radialCutoffCoefficient n)⁻¹ * delta + kappa * C * (2 : ℝ) ^ n * (4 / 3) := by + intro y + obtain ⟨hs, hb⟩ := radial_mass_dyadic_budget hn (hA y) (hdensity y) (hM y) (hmass y) + refine ⟨hs, hb.trans ?_⟩ + have hD := radialCutoffCoefficient_pos hn + calc + _ ≤ (radialCutoffCoefficient n)⁻¹ * + (delta + (kappa * C * (2 : ℝ) ^ n * radialCutoffCoefficient n) * (4 / 3)) := by + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr hD.le) + linarith [houter y] + _ = _ := by field_simp [ne_of_gt hD] + +/-- The uniform budget tends to zero along increasingly flat rescalings. -/ +theorem radial_mass_budget_uniformly_small {Y : Type*} {n C : ℝ} + {delta kappa : ℕ → ℝ} {M : ℕ → Y → ℕ → ℝ} + (hdelta : Tendsto delta atTop (𝓝 0)) (hkappa : Tendsto kappa atTop (𝓝 0)) + (hbudget : ∀ ν y, (∑' i, M ν y i) ≤ (radialCutoffCoefficient n)⁻¹ * delta ν + + kappa ν * C * (2 : ℝ) ^ n * (4 / 3)) : + ∀ ε > 0, ∀ᶠ ν in atTop, ∀ y, (∑' i, M ν y i) < ε := by + have ht : Tendsto (fun ν => (radialCutoffCoefficient n)⁻¹ * delta ν + + kappa ν * C * (2 : ℝ) ^ n * (4 / 3)) atTop (𝓝 0) := by + simpa only [mul_zero, zero_mul, add_zero] using + (hdelta.const_mul _).add (((hkappa.mul_const C).mul_const ((2 : ℝ) ^ n)).mul_const (4 / 3)) + intro ε hε + filter_upwards [ht.eventually (gt_mem_nhds hε)] with ν hν y + exact (hbudget ν y).trans_lt hν + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialErrorUnits.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialErrorUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b9aef4e19f11c40042c1f0c872f92c811e8df0e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialErrorUnits.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Harmonic.ActualRadialHarmonic +import OAI.Geometry.RCD.Sobolev.PoissonDefectBudget + +namespace OAI + +/-! # Uniform natural units for the actual radial correction error -/ + +noncomputable section +namespace RegularPointCoordinates + +def radialCorrectionConstant (K : ℝ) (n : ℕ) (epsilon A B J Cχ : ℝ) : ℝ := + 1 + 2 * (1 + epsilon) ^ 2 * B + annularPoincareConstant K n * + (((n + 2 : ℕ) : ℝ) * (1 + epsilon + A)) ^ 2 * + (4096 * Cχ * (J + B / 2) + A ^ 2) + +theorem radialCorrectionConstant_pos {K epsilon A B J Cχ : ℝ} {n : ℕ} + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hCχ : 0 ≤ Cχ) : + 0 < radialCorrectionConstant K n epsilon A B J Cχ := by + have hp := annularPoincareConstant_pos K n + dsimp only [radialCorrectionConstant] + positivity + +/-- The scale-dependent span bound and the radius-squared Poincare +constant give one uniform coefficient for the complete Poisson defect. -/ +theorem radial_correction_error_units {K epsilon A B J Cχ s κ σ V L : ℝ} {n : ℕ} + (hs1 : s ≤ 1) (hκ : 0 ≤ κ) (hσ : 0 ≤ σ) (hV : 0 ≤ V) + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hε : 0 ≤ epsilon) (hCχ : 0 ≤ Cχ) + (hL : L = ((n + 2 : ℕ) : ℝ) * max (1 + epsilon) (A * s)) : + 2 * (1 + epsilon) ^ 2 * (σ * (B * s ^ 2)) + + 8 * (annularPoincareConstant K n * (s / 64) ^ 2) * L ^ 2 * + (4096 * Cχ * (J + B / 2) * σ + κ * A ^ 2 * s ^ 2 * V) ≤ + radialCorrectionConstant K n epsilon A B J Cχ * s ^ 2 * (σ + κ * s ^ 2 * V) := by + let N := ((n + 2 : ℕ) : ℝ) * (1 + epsilon + A) + let H := 4096 * Cχ * (J + B / 2) + A ^ 2 + have hc := (annularPoincareConstant_pos K n).le + have hN : 0 ≤ N := by dsimp only [N]; positivity + have hH : 0 ≤ H := by dsimp only [H]; positivity + have hL0 : 0 ≤ L := by rw [hL]; positivity + have hLN : L ≤ N := by + rw [hL] + apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _) + apply max_le + · linarith + · have hh := mul_le_mul_of_nonneg_left hs1 hA + linarith + have hLs : L ^ 2 ≤ N ^ 2 := (sq_le_sq₀ hL0 hN).mpr hLN + have hsize : 0 ≤ σ + κ * s ^ 2 * V := by positivity + have hmass : 4096 * Cχ * (J + B / 2) * σ + κ * A ^ 2 * s ^ 2 * V ≤ + H * (σ + κ * s ^ 2 * V) := by + dsimp only [H] + nlinarith [mul_nonneg (sq_nonneg A) hσ, + mul_nonneg (by positivity : 0 ≤ 4096 * Cχ * (J + B / 2)) + (by positivity : 0 ≤ κ * s ^ 2 * V)] + have hscale : 8 * (annularPoincareConstant K n * (s / 64) ^ 2) ≤ + annularPoincareConstant K n * s ^ 2 := by + nlinarith [mul_nonneg hc (sq_nonneg s)] + have hsecond : 8 * (annularPoincareConstant K n * (s / 64) ^ 2) * L ^ 2 * + (4096 * Cχ * (J + B / 2) * σ + κ * A ^ 2 * s ^ 2 * V) ≤ + annularPoincareConstant K n * s ^ 2 * N ^ 2 * (H * (σ + κ * s ^ 2 * V)) := by + gcongr + have hfirst : 2 * (1 + epsilon) ^ 2 * (σ * (B * s ^ 2)) ≤ + (2 * (1 + epsilon) ^ 2 * B) * s ^ 2 * (σ + κ * s ^ 2 * V) := by + have hh := mul_le_mul_of_nonneg_left + (show σ ≤ σ + κ * s ^ 2 * V from le_add_of_nonneg_right (by positivity)) + (show 0 ≤ (2 * (1 + epsilon) ^ 2 * B) * s ^ 2 by positivity) + convert hh using 1 + ring + calc + _ ≤ (2 * (1 + epsilon) ^ 2 * B) * s ^ 2 * (σ + κ * s ^ 2 * V) + + annularPoincareConstant K n * s ^ 2 * N ^ 2 * (H * (σ + κ * s ^ 2 * V)) := + add_le_add hfirst hsecond + _ ≤ _ := by + dsimp only [radialCorrectionConstant, N, H] + nlinarith [mul_nonneg (sq_nonneg s) hsize] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialFirstVariation.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialFirstVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..084f1dcfcfea4be6ba725a0c7f672a7948b1c37d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialFirstVariation.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.RCD.Harmonic.RadialVariationBound + +namespace OAI + +/-! # First variation for a family of radial contractions + +The family may use a different optimal plan at each contraction scale. +Uniform compression and shrinking length suffice for the signed limit. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) +attribute [local instance] pathBorel pathBorelSpace + +theorem radial_first_variation_eventually_gt + (π : ℕ → Measure C(Time, X)) [∀ k, IsProbabilityMeasure (π k)] + (hg : ∀ k, ∀ᵐ γ ∂π k, IsGeodesic γ) + {C : ℝ≥0∞} (hC : C ≠ ∞) + (hc : ∀ k, ∀ t : Time, (π k).map (fun γ => γ t) ≤ C • μ) + (hD : ∀ k, MemLp (fun γ : C(Time, X) => dist (γ 0) (γ 1)) 2 (π k)) + (ν : Measure X) (hinit : ∀ k, (π k).map (fun γ => γ 0) = ν) + (a : ℕ → ℝ) (ha : ∀ k, 0 < a k) (ha0 : Tendsto a atTop (𝓝 0)) + {R : ℝ} (hR : 0 ≤ R) + (hlen : ∀ k, ∀ᵐ γ ∂π k, dist (γ 0) (γ 1) ≤ a k * R) + (q g : SobolevSpace μ hQ) + (hcost : ∀ k, (∫ γ, dist (γ 0) (γ 1) ^ 2 ∂π k) = + a k ^ 2 * weightedGradientSquare μ hQ ν q) + (hdec : ∀ k, (∫ γ, SobolevSpace.toLp μ hQ q (γ 0) - + SobolevSpace.toLp μ hQ q (γ 1) ∂π k) = + (a k - a k ^ 2 / 2) * weightedGradientSquare μ hQ ν q) + {c : ℝ} (hcq : c < -weightedGradientPair μ hQ ν q g) : + ∀ᶠ k in atTop, c < + (∫ γ, SobolevSpace.toLp μ hQ g (γ 1) - SobolevSpace.toLp μ hQ g (γ 0) ∂π k) / a k := by + let : IsProbabilityMeasure ν := (hinit 0) ▸ inferInstance + have hν : ν ≤ C • μ := (hinit 0) ▸ hc 0 0 + let A := weightedGradientSquare μ hQ ν q + let b := -weightedGradientPair μ hQ ν q g + let δ := (b - c) / 4 + have hδ : 0 < δ := by dsimp [δ, b]; linarith + have hsec := weightedGradientPair_secant_limit μ hQ hC hν q g + have hcδ : c + 3 * δ < b := by dsimp [δ]; linarith + have hev : ∀ᶠ ε in 𝓝[>] (0 : ℝ), 0 < ε ∧ c + 3 * δ < + (A - weightedGradientSquare μ hQ ν (q + ε • g)) / (2 * ε) := by + filter_upwards [self_mem_nhdsWithin, hsec.eventually (Ioi_mem_nhds hcδ)] with ε h0 hb + exact ⟨h0, hb⟩ + obtain ⟨ε, hε, hεbound⟩ := hev.exists + let η := ε * δ / (R + 1) + have hη : 0 < η := div_pos (mul_pos hε hδ) (by positivity) + obtain ⟨d, hd, hshort⟩ := uniform_short_plan_pullback μ + (SobolevSpace.minimalSlope μ hQ (q + ε • g)) hC hη + have hsmall : ∀ᶠ k in atTop, a k * R < d := by + have hh : Tendsto (fun k => a k * R) atTop (𝓝 0) := by + simpa only [zero_mul] using ha0.mul_const R + exact hh.eventually (Iio_mem_nhds hd) + let E := weightedGradientSquare μ hQ ν (q + ε • g) + have hηeq : (R + 1) * η = ε * δ := by + dsimp only [η] + field_simp + have htarget : c < ((A - E) / 2 - R * η) / ε := by + apply (lt_div_iff₀ hε).mpr + have hh := (lt_div_iff₀ (show 0 < 2 * ε by positivity)).mp hεbound + nlinarith + have hlim : Tendsto (fun k => ((1 - a k / 2) * A - (A + E) / 2 - R * η) / ε) + atTop (𝓝 (((A - E) / 2 - R * η) / ε)) := by + have hh : Continuous (fun t : ℝ => ((1 - t / 2) * A - (A + E) / 2 - R * η) / ε) := by + fun_prop + have hh0 := (hh.continuousAt (x := 0)).tendsto.comp ha0 + change Tendsto (fun k => ((1 - a k / 2) * A - (A + E) / 2 - R * η) / ε) + atTop (𝓝 (((1 - 0 / 2) * A - (A + E) / 2 - R * η) / ε)) at hh0 + convert hh0 using 1 + congr 1 + ring + filter_upwards [hsmall, hlim.eventually (Ioi_mem_nhds htarget)] with k hk hlower + have hclose := hshort (π k) (hg k) (hc k) (hD k) + ((hlen k).mono fun _ hγ => hγ.trans hk.le) + have hbound := radial_variation_lower_bound μ hQ (π k) (hg k) hC (hc k) (hD k) + q g (ha k) hR hε hη.le (hlen k) (hcost k) (hdec k) (fun t => (hclose t).le) + rw [hinit k] at hbound + exact hlower.trans_le hbound + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialHarmonicApproximation.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialHarmonicApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ef720db32e5db92ee1eebbb742a5a61e9cd290c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialHarmonicApproximation.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Sobolev.PoissonHessianInput +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError + +namespace OAI + +/-! # Harmonic approximation of the actual radial derivative -/ + +open Set MeasureTheory +open scoped InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +theorem integral_sq_sobolev_difference (f g : SobolevSpace μ hQ) : + (∫ x, (SobolevSpace.toLp μ hQ f x - SobolevSpace.toLp μ hQ g x) ^ 2 ∂μ) = + ‖SobolevSpace.toLp μ hQ (f - g)‖ ^ 2 := by + rw [map_sub, ← lp_integral_square_eq_norm_square] + apply integral_congr_ae + filter_upwards [Lp.coeFn_sub (SobolevSpace.toLp μ hQ f) (SobolevSpace.toLp μ hQ g)] with x hx + rw [hx] + rfl + +/-- Combining the Poisson energy error with weak cancellation constructs +a harmonic approximation to `Gamma(q,a)`. Its squared error is linear in +the two source budgets. -/ +theorem LocalHessianPairing.radial_harmonic_approximation + {Ω : Set X} (hΩ : MeasurableSet Ω) (q : SobolevSpace μ hQ) + {f a : SobolevSpace μ hQ} (G : LocalHessianPairing μ hQ Ω f a) + {c P D B error : ℝ} (hf : IsConstantLaplacianOn μ hQ Ω f c) + (ha : IsSobolevHarmonicOn μ hQ Ω a) (b : ℝ) + (hP : 0 ≤ P) (hD : 0 ≤ D) (hB : 0 ≤ B) + (hgradient : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ a a x ≤ B) + (hpoincare : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + ‖SobolevSpace.toLp μ hQ φ.val‖ ^ 2 ≤ P * energyForm μ hQ φ.val φ.val) + (hpoisson : (∫ x in Ω, localGamma μ hQ (q - f) (q - f) x ∂μ) ≤ error) + (hhessian : ∀ φ : SobolevSpace.dirichlet μ hQ Ω, + (G.hessian φ - b * energyForm μ hQ a φ.val) ^ 2 ≤ D * energyForm μ hQ φ.val φ.val) : + ∃ h : SobolevSpace μ hQ, G.mixed - h ∈ SobolevSpace.dirichlet μ hQ Ω ∧ + IsSobolevHarmonicOn μ hQ Ω h ∧ + energyForm μ hQ (G.mixed - h) (G.mixed - h) ≤ 4 * D ∧ + (∫ x in Ω, (localGamma μ hQ q a x - SobolevSpace.toLp μ hQ h x) ^ 2 ∂μ) ≤ + 2 * B * error + 8 * P * D := by + obtain ⟨h, hmem, hharm, henergy, hl2⟩ := + G.exists_harmonic_correction μ hQ hΩ hf ha b hP hD hpoincare hhessian + refine ⟨h, hmem, hharm, henergy, ?_⟩ + have hraw := (radial_pairing_error_le μ hQ Ω q f a hgradient).trans + (mul_le_mul_of_nonneg_left hpoisson hB) + have hdiffmem := (Lp.memLp (SobolevSpace.toLp μ hQ G.mixed)).sub + (Lp.memLp (SobolevSpace.toLp μ hQ h)) + have hdiff : (∫ x in Ω, + (SobolevSpace.toLp μ hQ G.mixed x - SobolevSpace.toLp μ hQ h x) ^ 2 ∂μ) ≤ P * (4 * D) := by + calc + _ ≤ ∫ x, (SobolevSpace.toLp μ hQ G.mixed x - SobolevSpace.toLp μ hQ h x) ^ 2 ∂μ := + setIntegral_le_integral hdiffmem.integrable_sq (Filter.Eventually.of_forall fun x => sq_nonneg _) + _ = ‖SobolevSpace.toLp μ hQ (G.mixed - h)‖ ^ 2 := integral_sq_sobolev_difference μ hQ _ _ + _ ≤ _ := hl2 + have hrawmem := (localGamma_memLp_two_of_bound μ hQ Ω q a hgradient).sub + ((Lp.memLp (SobolevSpace.toLp μ hQ h)).restrict Ω) + have hpairmem := (localGamma_memLp_two_of_bound μ hQ Ω q a hgradient).sub + (localGamma_memLp_two_of_bound μ hQ Ω f a hgradient) + have hb : ∀ᵐ x ∂μ.restrict Ω, + (localGamma μ hQ q a x - SobolevSpace.toLp μ hQ h x) ^ 2 ≤ + 2 * (localGamma μ hQ q a x - localGamma μ hQ f a x) ^ 2 + + 2 * (SobolevSpace.toLp μ hQ G.mixed x - SobolevSpace.toLp μ hQ h x) ^ 2 := by + filter_upwards [G.mixed_rep] with x hx + rw [hx] + nlinarith [sq_nonneg (localGamma μ hQ q a x - 2 * localGamma μ hQ f a x + + SobolevSpace.toLp μ hQ h x)] + have hi := integral_mono_ae hrawmem.integrable_sq + ((hpairmem.integrable_sq.const_mul 2).add (hdiffmem.integrable_sq.integrableOn.const_mul 2)) hb + simp only [Pi.add_apply, Pi.sub_apply] at hi + have hsplit := integral_add (hpairmem.integrable_sq.const_mul 2) + (hdiffmem.integrable_sq.integrableOn.const_mul 2) + simp only [Pi.sub_apply, integral_const_mul] at hsplit + rw [hsplit] at hi + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..8212d371eee81f3051296caa215b34239e2a7f93 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCoefficient.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Coordinates.RadialCoefficientMatrix +import OAI.Geometry.RCD.Coordinates.LinearRadialFits + +namespace OAI + +/-! # Covector operator control from the constructed radial rows -/ + +open scoped InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +/-- The covector operator uses the transpose of the matrix acting on +coordinate values. A dimension factor suffices to transport its norm +estimate, without making any symmetry assumption on the radial matrix. -/ +theorem finiteCoefficientMap_relative_bound {n : ℕ} + (N : Euclidean n ≃L[ℝ] Euclidean n) (coeff : Fin n → Euclidean n) + {epsilon : ℝ} (hepsilon : 0 ≤ epsilon) + (hbound : ‖Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) + (radialCoefficientMatrix N coeff) - ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ epsilon) : + ‖N.symm.toContinuousLinearMap.comp (finiteCoefficientMap coeff) - + ContinuousLinearMap.id ℝ (Euclidean n)‖ ≤ (n : ℝ) ^ 2 * epsilon := by + apply euclidean_operator_norm_le_of_entries _ hepsilon + intro i j + have h := (Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) + (radialCoefficientMatrix N coeff) - ContinuousLinearMap.id ℝ (Euclidean n)).le_opNorm + (EuclideanSpace.single i 1) + have he : ‖(Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) + (radialCoefficientMatrix N coeff) - ContinuousLinearMap.id ℝ (Euclidean n)) + (EuclideanSpace.single i 1)‖ ≤ epsilon := by + apply h.trans + simpa using hbound + have hj := (PiLp.norm_apply_le + ((Matrix.toEuclideanCLM (n := Fin n) (𝕜 := ℝ) (radialCoefficientMatrix N coeff) - + ContinuousLinearMap.id ℝ (Euclidean n)) (EuclideanSpace.single i 1)) j).trans he + simpa [ContinuousLinearMap.comp_apply, finiteCoefficientMap_single, + Matrix.toEuclideanCLM_toLp, Matrix.mulVec, dotProduct, radialCoefficientMatrix, + PiLp.single_apply, eq_comm, Real.norm_eq_abs] using hj + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCombination.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCombination.lean new file mode 100644 index 0000000000000000000000000000000000000000..4824e1aaa5f8c1e84375472f5f4c4eb783bff005 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearCombination.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError +import OAI.Geometry.RCD.Harmonic.ColumnRepresentatives + +namespace OAI + +/-! # Radial pairings and harmonic corrections in every constant direction -/ + +open Set MeasureTheory +open scoped NNReal ENNReal BigOperators InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +private theorem gamma_sum_right {ι : Type*} (s : Finset ι) + (u : ι → SobolevSpace μ hQ) (g : SobolevSpace μ hQ) : + localGamma μ hQ g (∑ i ∈ s, u i) =ᵐ[μ] + fun x => ∑ i ∈ s, localGamma μ hQ g (u i) x := by + classical + induction s using Finset.induction_on with + | empty => + simpa only [Finset.sum_empty, zero_smul, zero_mul] using + localGamma_smul_right μ hQ 0 g (0 : SobolevSpace μ hQ) + | @insert i s hi ih => + simp only [Finset.sum_insert hi] + filter_upwards [localGamma_add_right μ hQ g (u i) (∑ j ∈ s, u j), ih] with x hx hh + rw [hx, hh] + +/-- The radial derivative is linear in the actual coordinate direction. -/ +theorem localGamma_column_right {n : ℕ} (q : SobolevSpace μ hQ) + (u : Fin n → SobolevSpace μ hQ) (b : Euclidean n) : + localGamma μ hQ q (sobolevColumnMap μ hQ u b) =ᵐ[μ] + fun x => ∑ j, b j * localGamma μ hQ q (u j) x := by + have hs := gamma_sum_right μ hQ Finset.univ (fun j => b j • u j) q + have hc := (Filter.eventually_all_finset (Finset.univ : Finset (Fin n))).mpr + (fun j _ => localGamma_smul_right μ hQ (b j) q (u j)) + filter_upwards [hs, hc] with x hx hc + rw [sobolevColumnMap_apply] + rw [hx] + exact Finset.sum_congr rfl fun j hj => hc j hj + +omit [BorelSpace X] [ProperSpace X] in +private theorem column_value {n : ℕ} (u : Fin n → SobolevSpace μ hQ) (b : Euclidean n) : + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ u b) =ᵐ[μ] + fun x => ∑ j, b j * SobolevSpace.toLp μ hQ (u j) x := by + have hrep := sobolevColumnMap_representative μ hQ u Set.univ + (fun x => WithLp.toLp 2 (fun j => SobolevSpace.toLp μ hQ (u j) x)) + (fun _ => Filter.Eventually.of_forall fun _ => rfl) b + rw [Measure.restrict_univ] at hrep + simpa only [PiLp.inner_apply, Real.inner_apply, mul_comm] using hrep + +/-- Componentwise harmonic corrections give one correction in every +constant direction, with the finite-dimensional Cauchy--Schwarz loss. -/ +theorem radial_linear_harmonic_correction {n : ℕ} {Ω : Set X} + (q : SobolevSpace μ hQ) (u h : Fin n → SobolevSpace μ hQ) + (hh : ∀ j, IsSobolevHarmonicOn μ hQ Ω (h j)) + (hm : ∀ j, MemLp (fun x => localGamma μ hQ q (u j) x - + SobolevSpace.toLp μ hQ (h j) x) 2 (μ.restrict Ω)) + {E : ℝ} + (he : ∀ j, (∫ x in Ω, (localGamma μ hQ q (u j) x - + SobolevSpace.toLp μ hQ (h j) x) ^ 2 ∂μ) ≤ E) + (b : Euclidean n) : + IsSobolevHarmonicOn μ hQ Ω (sobolevColumnMap μ hQ h b) ∧ + (∫ x in Ω, (localGamma μ hQ q (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ h b) x) ^ 2 ∂μ) ≤ + (n : ℝ) * E * ‖b‖ ^ 2 := by + refine ⟨IsSobolevHarmonicOn.linearCombination μ hQ hh b, ?_⟩ + let e : Fin n → X → ℝ := fun j x => localGamma μ hQ q (u j) x - SobolevSpace.toLp μ hQ (h j) x + have hpoint : (fun x => localGamma μ hQ q (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ h b) x) =ᵐ[μ.restrict Ω] + fun x => ∑ j, b j * e j x := by + filter_upwards [ae_restrict_of_ae (localGamma_column_right μ hQ q u b), + ae_restrict_of_ae (column_value μ hQ h b)] with x hx hy + rw [hx, hy] + simp only [e, mul_sub, Finset.sum_sub_distrib] + have hsum := memLp_finsetSum Finset.univ (fun j _ => (hm j).const_mul (b j)) + have hbound : (∫ x in Ω, (∑ j, b j * e j x) ^ 2 ∂μ) ≤ + ‖b‖ ^ 2 * ∑ j, ∫ x in Ω, (e j x) ^ 2 ∂μ := by + have hcs := integral_mono_ae hsum.integrable_sq + ((integrable_finsetSum Finset.univ (fun j _ => (hm j).integrable_sq)).const_mul (‖b‖ ^ 2)) + (Filter.Eventually.of_forall fun x => by + simpa only [← EuclideanSpace.real_norm_sq_eq] using + Finset.sum_mul_sq_le_sq_mul_sq Finset.univ (fun j => b j) (fun j => e j x)) + rw [integral_const_mul, integral_finsetSum Finset.univ (fun j _ => (hm j).integrable_sq)] at hcs + exact hcs + have hp2 : (fun x => (localGamma μ hQ q (sobolevColumnMap μ hQ u b) x - + SobolevSpace.toLp μ hQ (sobolevColumnMap μ hQ h b) x) ^ 2) =ᵐ[μ.restrict Ω] + fun x => (∑ j, b j * e j x) ^ 2 := by + filter_upwards [hpoint] with x hx + rw [hx] + rw [integral_congr_ae hp2] + apply hbound.trans + have he' := Finset.sum_le_sum (fun j (_ : j ∈ (Finset.univ : Finset (Fin n))) => he j) + have ht := mul_le_mul_of_nonneg_left he' (sq_nonneg ‖b‖) + calc + _ ≤ ‖b‖ ^ 2 * ((n : ℝ) * E) := by + simpa only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] using ht + _ = _ := by ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialLinearRepresentatives.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe3b39a071cad1e4682156661ed47a3aeaa5f3b5 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialLinearRepresentatives.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.RCD.Harmonic.LocalRadialDerivative + +namespace OAI + +/-! # Finite radial families preserve all constant covectors -/ + +open Set MeasureTheory +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Once the basis radial derivatives have Sobolev representatives, their +linear combinations are the radial derivatives of every coordinate covector. -/ +theorem localRadialDerivative_column {n : ℕ} (Ω : Set X) + (f : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (u g : Fin n → SobolevSpace μ hQ) + (hg : ∀ j, SobolevSpace.toLp μ hQ (g j) =ᵐ[μ.restrict Ω] localGamma μ hQ f (u j)) + (b : Euclidean n) : + localRadialDerivative μ hQ Ω f hf (sobolevColumnMap μ hQ u b) = + SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ g b) := by + simp only [sobolevColumnMap_apply, map_sum, map_smul] + apply Finset.sum_congr rfl + intro j _ + rw [localRadialDerivative_eq_restrict μ hQ Ω f (u j) (g j) hf (hg j)] + +/-- The derivative kills every compactly extended local constant. -/ +theorem localRadialDerivative_constant (Ω : Set X) (f q : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) (c : ℝ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict Ω] fun _ => c) : + localRadialDerivative μ hQ Ω f hf q = 0 := by + have hh := localRadialDerivative_eq_of_constant_difference μ hQ Ω f q 0 hf c + (by simpa only [sub_zero] using hq) + simpa only [map_zero] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialMixedLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialMixedLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbf472d9597f9f88515477f8bd484c9780435417 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialMixedLimit.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.RCD.Harmonic.RadialMixedRecoveryLimit +import OAI.Geometry.RCD.Harmonic.HarmonicStrongRecovery + +namespace OAI + +/-! # Actual radial mixed-gradient convergence with the original physical measures + +The compact recoveries below are constructed from the RCD data. Their +finite initial shifts depend on the chosen test, and are removed before +stating the limit for the original, fixed harmonic sequence. +-/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction NNReal ContDiff +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.radial_mixed_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (f k) x-‖V k x‖^2/2)^2 + ∂hausdorff n X) atTop (𝓝 0)) + {ψ : Euclidean n → ℝ} (hψ : InteriorSmoothTest n S ψ) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), ψ (V k x)*localGamma (hausdorff n X) hX.quadratic + (f k) (w k) x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, ψ z*fderiv ℝ g z z)) := by + have hweak := hX.harmonic_value_limit_weak_of_curvature hn hS p r ε hr hcurv hε hε1 hεlim + V w hV hw hnorm g hgL hconv + obtain ⟨d,hd,hds⟩ := exists_pos_lt_subset_ball hS (isClosed_tsupport ψ) hψ.2.2 + obtain ⟨c₀,hc₀,hc₀S,N,u,huv,hug,huz,hue⟩ := + hX.sharp_weighted_test_recovery hn hS p r ε V hr hcurv hε hε1 hεlim hV hψ + obtain ⟨Q,hQ,hub⟩ := compact_recovery_scaled_gradient_bound (hausdorff n X) hX.quadratic + (hψ.1.of_le (by simp)) hψ.2.1 (fun k => p (k+N)) (fun k => r (k+N)) + (fun k => hr (k+N)) (fun k => V (k+N)) (fun k => (u k).val) huz (hug c₀ hc₀.le hc₀S) + let c := max d c₀ + have hc : 0 p (k+N)) (fun k => r (k+N)) (fun k => ε (k+N)) (fun k => V (k+N)) + (fun k => hr (k+N)) (fun k => hcurv (k+N)) (fun k => hε (k+N)) (fun k => hε1 (k+N)) + (hεlim.comp (tendsto_add_atTop_nat N)) (fun k => hV (k+N)) + (fun k => w (k+N)) (fun k => hw (k+N)) (fun k => hnorm (k+N)) g hg hgL + (fun W hW hWS δ hδ => (tendsto_add_atTop_nat N).eventually (hconv W hW hWS δ hδ)) + obtain ⟨F,hF,hFn,hFr,_⟩ := exists_compact_radial_weight (n:=n) hT hTS + let j := fun k : ℕ => (k+M)+N + have hj : Tendsto j atTop atTop := (tendsto_add_atTop_nat N).comp (tendsto_add_atTop_nat M) + obtain ⟨B,hB,hwb⟩ := hX.harmonic_scaled_energy_bound hn hS hT.le hTS + (p ∘ j) (r ∘ j) (fun k => hr (j k)) (fun k => hcurv (j k)) + (w ∘ j) (fun k => hw (j k)) (fun k => hnorm (j k)) + have hwb' : ∀ᶠ k in atTop, ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (j k)) (T*r (j k))), + r (j k)^2*localGamma (hausdorff n X) hX.quadratic (w (j k)) (w (j k)) x≤(B+1)^2 := by + apply Eventually.of_forall + intro k + have hh := ae_restrict_of_ae_restrict_of_subset ball_subset_closedBall (hwb k) + exact hh.mono fun x hx => hx.trans (by nlinarith) + have hfb' : ∀ᶠ k in atTop, ∀ᵐ x ∂(hausdorff n X).restrict (ball (p (j k)) (T*r (j k))), + r (j k)^2*localGamma (hausdorff n X) hX.quadratic (f (j k)) (f (j k)) x≤A^2 := by + apply Eventually.of_forall + intro k + exact ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (mul_le_mul_of_nonneg_right hTS.le (hr (j k)).le)) (hfb (j k)) + have huz' (k : ℕ) : ∀ᵐ x ∂hausdorff n X, x∉ball (p (j k)) (c*r (j k)) → + SobolevSpace.toLp (hausdorff n X) hX.quadratic (u (k+M)).val x=0 := + (huz (k+M)).mono fun x hx hn' => hx (fun hy => hn' + ((ball_subset_ball (mul_le_mul_of_nonneg_right (le_max_right d c₀) (hr (j k)).le)) hy)) + have ht := hX.radial_mixed_recovery_limit hn hS hca hab hbR hRT hTS + (p ∘ j) (r ∘ j) (ε ∘ j) (fun k => V (j k)) + (fun k => hr (j k)) (fun k => hcurv (j k)) (fun k => hε (j k)) (fun k => hε1 (j k)) + (hεlim.comp hj) (fun k => hV (j k)) (f ∘ j) (w ∘ j) (fun k => (u (k+M)).val) + (fun k => (q k).val) (fun k => hw (j k)) hgL hweak hG hdG hψ + (hds.trans (ball_subset_ball (le_max_left _ _))) + (fun δ hδ => (tendsto_add_atTop_nat M).eventually (huv δ hδ)) hqv huz' + hA (by linarith : 0≤B+1) hQ hfb' hwb' + ((tendsto_add_atTop_nat M).eventually hub) hqb F hF hFn hFr + ((hue F hFn hF.2.2).comp (tendsto_add_atTop_nat M)) (hqe F hFn hF.2.2) + herror (hflim.comp hj) + exact (tendsto_add_atTop_iff_nat N).mp ((tendsto_add_atTop_iff_nat M).mp ht) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialMixedRecoveryLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialMixedRecoveryLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c4652127a27b45142a6929c7ea7369fb61271bb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialMixedRecoveryLimit.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Coordinates.NormalizedRecoveryRadialSwap +import OAI.Geometry.RCD.Harmonic.CompactRecoveryCoefficient +import OAI.Geometry.RCD.Harmonic.CompactHarmonicTransfer +import OAI.Geometry.RCD.Sobolev.CompactRecoveryMixedEnergy +import OAI.Geometry.RCD.Harmonic.CompactRadialPairingIdentity + +namespace OAI + +/-! # The radial mixed-gradient limit from the constructed compact recoveries -/ + +open Set Metric Filter MeasureTheory +open scoped Topology BoundedContinuousFunction NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.radial_mixed_recovery_limit {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + {S c a b R T : ℝ} (hS : 0 ‖z‖^2/2) (closedBall 0 T)) + (hue : Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), F (V k x)*localGamma (hausdorff n X) hX.quadratic + (u k) (u k) x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹*∫ z in ball 0 S, F z*‖fderiv ℝ ψ z‖^2))) + (hqe : Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), F (V k x)*localGamma (hausdorff n X) hX.quadratic + (q k) (q k) x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹*∫ z in ball 0 S, F z*‖fderiv ℝ G z‖^2))) + (herror : Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (R*r k), (nestedBallCutoff (p k) (a*r k) (b*r k) x)^2* + localGamma (hausdorff n X) hX.quadratic (w k-q k) (w k-q k) x ∂hausdorff n X) + atTop (𝓝 0)) + (hflim : Tendsto (fun k => ((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (f k) x-‖V k x‖^2/2)^2 + ∂hausdorff n X) atTop (𝓝 0)) : + Tendsto (fun k => r k^2*((hausdorff n X).real (ball (p k) (S*r k)))⁻¹* + ∫ x in ball (p k) (S*r k), ψ (V k x)*localGamma (hausdorff n X) hX.quadratic + (f k) (w k) x ∂hausdorff n X) atTop + (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, ψ z*fderiv ℝ g z z)) := by + let μ := hausdorff n X + let : ∀ k, IsFiniteMeasure (μ.restrict (ball (p k) (S*r k))) := fun k => ⟨by + simpa only [Measure.restrict_apply_univ] using hX.finiteOnBounded _ isBounded_ball⟩ + have hcT := hca.trans (hab.trans (hbR.trans hRT)) + obtain ⟨B,hB⟩ := hψ.2.1.exists_bound_of_continuous hψ.1.continuous + have hcoeff := compact_recovery_coefficient μ hX.quadratic hS hcT hcT hTS p r ε V hr hεlim hV + (fun k => ENNReal.toReal_pos (hX.fullSupport _ _ (mul_pos hS (hr k))).ne' + (hX.finiteOnBounded _ isBounded_ball).ne) u f w ψ hψ.1.continuous + (fun x => by simpa only [Real.norm_eq_abs] using hB x) hψs huz huv hA hM hfb hwb + have hswap := hX.normalized_recovery_radial_swap hn hS hcT hTS p r ε V hr hεlim hV + f w u hw hQ hM hub hwb huz F hFr hflim + have htransfer := hX.compact_harmonic_transfer hS hca hab hbR (hRT.trans hTS) p r hr V + (fun k => (hV k).measurable) u w q F hub huz herror + have hmix := hX.compact_recovery_mixed_energy hn hS p r ε V hr hcurv hε hε1 hεlim hV + u q hψ hG huv hqv (sq_nonneg Q) (sq_nonneg P) hub hqb F hFn hF.2.2 hue hqe + have hid := compact_radial_pairing_identity hS hTS F hgL hgweak hG.1 hd hFr hψ + (hψs.trans (ball_subset_ball hcT.le)) + rw [hid,mul_neg] at hmix + have ht := ((hcoeff.add hswap).sub htransfer).sub hmix + convert ht using 1 + · funext k + ring + · simp + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialMomentBound.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialMomentBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f5aae6a5b9bd1ee0fa06035af769a64f37d3909 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialMomentBound.lean @@ -0,0 +1,53 @@ +import Mathlib.MeasureTheory.Integral.Bochner.Set + +namespace OAI + +/-! # A tail moment controls the total quadratic moment -/ + +open Set Filter MeasureTheory Metric +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [PseudoMetricSpace X] [MeasurableSpace X] [BorelSpace X] + {μ : Measure X} {f : X → ℝ} + +theorem weighted_moment_le_of_tail (p : X) (R : ℝ) (hf0 : ∀ x, 0 ≤ f x) + (hf : Integrable f μ) + (hw : Integrable (fun x => f x*(1+(dist x p)^2)) μ) + (ht : (∫ x in (ball p R)ᶜ, f x*(dist x p)^2 ∂μ) ≤ 1) : + (∫ x, f x*(1+(dist x p)^2) ∂μ) ≤ (1+R^2)*(∫ x, f x ∂μ)+1 := by + have hsq : Integrable (fun x => f x*(dist x p)^2) μ := by + have hm : AEStronglyMeasurable (fun x => f x*(dist x p)^2) μ := + (hw.aestronglyMeasurable.sub hf.aestronglyMeasurable).congr + (Eventually.of_forall (fun x => by dsimp only [Pi.sub_apply,Pi.add_apply]; ring)) + apply hw.mono' hm + apply Eventually.of_forall + intro x + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (hf0 x) (sq_nonneg _))] + nlinarith [hf0 x] + have hind := hsq.indicator (s := (ball p R)ᶜ) measurableSet_ball.compl + have hpoint (x : X) : f x*(dist x p)^2 ≤ R^2*f x+ + (ball p R)ᶜ.indicator (fun y => f y*(dist y p)^2) x := by + by_cases hx : x ∈ ball p R + · rw [indicator_of_notMem (show x ∉ (ball p R)ᶜ by simpa using hx)] + have hd : dist x p < R := mem_ball.mp hx + have hh : (dist x p)^2 ≤ R^2 := pow_le_pow_left₀ dist_nonneg hd.le 2 + nlinarith [mul_le_mul_of_nonneg_left hh (hf0 x)] + · rw [indicator_of_mem hx] + nlinarith [mul_nonneg (sq_nonneg R) (hf0 x)] + have hb := integral_mono hsq ((hf.const_mul (R^2)).add hind) hpoint + simp only [Pi.add_apply] at hb + rw [integral_add (hf.const_mul (R^2)) hind,integral_const_mul, + integral_indicator measurableSet_ball.compl] at hb + have he : (∫ x, f x*(1+(dist x p)^2) ∂μ) = + (∫ x, f x ∂μ)+(∫ x, f x*(dist x p)^2 ∂μ) := by + rw [← integral_add hf hsq] + apply integral_congr_ae + exact Eventually.of_forall (fun x => by dsimp only [Pi.sub_apply,Pi.add_apply]; ring) + rw [he] + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialPairingSize.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialPairingSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..169489343f9b985e6a92e2cff1265b3f4caee0c9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialPairingSize.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.RCD.Harmonic.RadialDerivativeError +import OAI.Geometry.RCD.Coordinates.NormalizedLocalL2 + +namespace OAI + +/-! # The averaged size of the actual radial pairing -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Pointwise gradient bounds give the normalized L² size used to show +that the center values of affine fits vanish at shrinking radii. -/ +theorem normalized_gamma_size (s : Set X) (hs : μ s ≠ ∞) (hs0 : μ s ≠ 0) + (q a : SobolevSpace μ hQ) {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) + (hq : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ q q x ≤ A) + (ha : ∀ᵐ x ∂μ.restrict s, localGamma μ hQ a a x ≤ B) : + ‖normalizeLocalL2 μ s hs + ((localGamma_memLp_two_of_bound μ hQ s q a ha).toLp (localGamma μ hQ q a))‖ ≤ + Real.sqrt (A * B) := by + let rawmem := localGamma_memLp_two_of_bound μ hQ s q a ha + let raw := rawmem.toLp (localGamma μ hQ q a) + have hpoint : ∀ᵐ x ∂μ.restrict s, (raw x) ^ 2 ≤ A * B := by + filter_upwards [MemLp.coeFn_toLp rawmem, hq, ha, + ae_restrict_of_ae (localGamma_sq_le μ hQ q a), + ae_restrict_of_ae (localGamma_self μ hQ a)] with x he hqx hax hcs hself + change raw x = localGamma μ hQ q a x at he + rw [he] + exact hcs.trans (mul_le_mul hqx hax (by rw [hself]; positivity) hA) + let : IsFiniteMeasure (μ.restrict s) := + ⟨by simpa only [Measure.restrict_apply_univ] using hs.lt_top⟩ + have hi : (∫ x, (raw x) ^ 2 ∂μ.restrict s) ≤ (A * B) * μ.real s := by + calc + _ ≤ ∫ _x, A * B ∂μ.restrict s := + integral_mono_ae (Lp.memLp raw).integrable_sq (integrable_const _) hpoint + _ = _ := by simp only [integral_const, smul_eq_mul, Measure.real, + Measure.restrict_apply_univ, mul_comm] + have hvol : μ.real s ≠ 0 := ne_of_gt (ENNReal.toReal_pos hs0 hs) + have hn : ‖normalizeLocalL2 μ s hs raw‖ ^ 2 ≤ A * B := by + rw [normalizeLocalL2_norm_sq] + have hm := mul_le_mul_of_nonneg_left hi (by positivity : 0 ≤ (μ.real s)⁻¹) + exact hm.trans_eq (by field_simp [hvol]) + change ‖normalizeLocalL2 μ s hs raw‖ ≤ _ + exact (sq_le_sq₀ (norm_nonneg _) (Real.sqrt_nonneg _)).mp + (by simpa only [Real.sq_sqrt (mul_nonneg hA hB)] using hn) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticL2Limit.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticL2Limit.lean new file mode 100644 index 0000000000000000000000000000000000000000..07717b8aa00396457d8edaf0d5bca8b923ed1956 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticL2Limit.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.RCD.Harmonic.RadialQuadraticLimit +import OAI.Geometry.RCD.Harmonic.QuadraticModelValues + +namespace OAI + +/-! # The quadratic radial limit from mean-square Poisson error -/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal NNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [ProperSpace X] in +/-- Metric approximation controls the dimensionless distance quadratic +against the actual bounded coordinate quadratic. -/ +theorem coordinateQuadratic_dimensionless_error {n : ℕ} {p : X} {r S ε : ℝ} + (hr : 0 < r) (hS : 0 ≤ S) (hε : 0 ≤ ε) + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (V : X → Euclidean n) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict (ball p (S * r))] fun x => V x j) + (hmetric : IsPointedApproximation p 0 r S ε V) (hcenter : V p = 0) + (q : SobolevSpace μ hQ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (S * r))] + fun x => dist p x ^ 2 / (2 * r ^ 2)) : + ∀ᵐ x ∂μ.restrict (ball p (S * r)), + |SobolevSpace.toLp μ hQ (q - coordinateQuadratic μ hQ u C) x| ≤ + ε * (2 * S + ε) / 2 := by + filter_upwards [hq, coordinateQuadratic_eq_norm μ hQ u C V hu hrep, + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ q) + (SobolevSpace.toLp μ hQ (coordinateQuadratic μ hQ u C))), + ae_restrict_mem measurableSet_ball] with x hqx hHx hsub hx + rw [map_sub, hsub, Pi.sub_apply, hHx] + have hzero : |r ^ 2 * SobolevSpace.toLp μ hQ q x - dist p x ^ 2 / 2| ≤ r ^ 2 * 0 := by + rw [hqx] + have heq : r ^ 2 * (dist p x ^ 2 / (2 * r ^ 2)) - dist p x ^ 2 / 2 = 0 := by + field_simp + ring + rw [heq, abs_zero, mul_zero] + simpa only [zero_add] using radial_quadratic_value_error hr hS hε hmetric hcenter hx.le hzero + +omit [ProperSpace X] in +/-- The normalized coordinate error is bounded by the Poisson L2 error +plus the metric approximation error. No uniform vanishing height is needed. -/ +theorem radial_quadratic_l2_bound {n : ℕ} {p : X} {r S ε : ℝ} + (hr : 0 < r) (hS : 0 ≤ S) (hε : 0 ≤ ε) + (hfin : μ (ball p (S * r)) ≠ ∞) + (u : Fin n → SobolevSpace μ hQ) (C : ℝ≥0) (V : X → Euclidean n) + (hu : ∀ j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u j) x| ≤ C) + (hrep : ∀ j, SobolevSpace.toLp μ hQ (u j) =ᵐ[μ.restrict (ball p (S * r))] fun x => V x j) + (hmetric : IsPointedApproximation p 0 r S ε V) (hcenter : V p = 0) + (f q : SobolevSpace μ hQ) + (hq : SobolevSpace.toLp μ hQ q =ᵐ[μ.restrict (ball p (S * r))] + fun x => dist p x ^ 2 / (2 * r ^ 2)) : + ‖normalizeLocalL2 μ (ball p (S * r)) hfin (SobolevSpace.restrictLp μ hQ + (ball p (S * r)) (f - coordinateQuadratic μ hQ u C))‖ ≤ + ‖normalizeLocalL2 μ (ball p (S * r)) hfin (SobolevSpace.restrictLp μ hQ + (ball p (S * r)) (f - q))‖ + ε * (2 * S + ε) / 2 := by + have hb : ‖normalizeLocalL2 μ (ball p (S * r)) hfin (SobolevSpace.restrictLp μ hQ + (ball p (S * r)) (q - coordinateQuadratic μ hQ u C))‖ ≤ ε * (2 * S + ε) / 2 := by + apply normalized_norm_le_of_bound μ _ hfin _ (by positivity) + filter_upwards [coordinateQuadratic_dimensionless_error μ hQ hr hS hε u C V hu hrep hmetric hcenter q hq, + SobolevSpace.restrictLp_coe μ hQ (ball p (S * r)) (q - coordinateQuadratic μ hQ u C)] with x hx heq + rwa [heq] + have heq : f - coordinateQuadratic μ hQ u C = (f - q) + (q - coordinateQuadratic μ hQ u C) := by abel + rw [heq, map_add] + simp only [normalizeLocalL2, smul_add] at hb ⊢ + exact (norm_add_le _ _).trans (add_le_add le_rfl hb) + +omit [ProperSpace X] in +/-- Strong mean-square convergence to squared distance and metric +approximation give the radial value limit in the Euclidean coordinates. -/ +theorem radial_quadratic_l2_limit {n : ℕ} {S : ℝ} (hS : 0 ≤ S) + (p : ℕ → X) (r ε : ℕ → ℝ) (u : ℕ → Fin n → SobolevSpace μ hQ) + (C : ℕ → ℝ≥0) (V : ℕ → X → Euclidean n) (f q : ℕ → SobolevSpace μ hQ) + (hr : ∀ i, 0 < r i) (hε : ∀ i, 0 ≤ ε i) (hε0 : Tendsto ε atTop (𝓝 0)) + (hfin : ∀ i, μ (ball (p i) (S * r i)) ≠ ∞) + (hu : ∀ i j, ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ (u i j) x| ≤ C i) + (hrep : ∀ i j, SobolevSpace.toLp μ hQ (u i j) =ᵐ[μ.restrict (ball (p i) (S * r i))] + fun x => V i x j) + (hmetric : ∀ i, IsPointedApproximation (p i) 0 (r i) S (ε i) (V i)) + (hcenter : ∀ i, V i (p i) = 0) + (hq : ∀ i, SobolevSpace.toLp μ hQ (q i) =ᵐ[μ.restrict (ball (p i) (S * r i))] + fun x => dist (p i) x ^ 2 / (2 * r i ^ 2)) + (herror : Tendsto (fun i => ‖normalizeLocalL2 μ (ball (p i) (S * r i)) (hfin i) + (SobolevSpace.restrictLp μ hQ (ball (p i) (S * r i)) (f i - q i))‖) atTop (𝓝 0)) : + Tendsto (fun i => (μ.real (ball (p i) (S * r i)))⁻¹ * + ∫ x in ball (p i) (S * r i), (SobolevSpace.toLp μ hQ (f i) x - ‖V i x‖ ^ 2 / 2) ^ 2 ∂μ) + atTop (𝓝 0) := by + let H i := coordinateQuadratic μ hQ (u i) (C i) + have hlim : Tendsto (fun i => ‖normalizeLocalL2 μ (ball (p i) (S * r i)) (hfin i) + (SobolevSpace.restrictLp μ hQ (ball (p i) (S * r i)) (f i - H i))‖) atTop (𝓝 0) := by + apply squeeze_zero (fun _ => norm_nonneg _) + (fun i => radial_quadratic_l2_bound μ hQ (hr i) hS (hε i) (hfin i) + (u i) (C i) (V i) (hu i) (hrep i) (hmetric i) (hcenter i) (f i) (q i) (hq i)) + have hb := herror.add ((hε0.mul ((tendsto_const_nhds (x := 2 * S)).add hε0)).div_const 2) + simpa using hb + have heq (i : ℕ) : ‖normalizeLocalL2 μ (ball (p i) (S * r i)) (hfin i) + (SobolevSpace.restrictLp μ hQ (ball (p i) (S * r i)) (f i - H i))‖ ^ 2 = + (μ.real (ball (p i) (S * r i)))⁻¹ * + ∫ x in ball (p i) (S * r i), (SobolevSpace.toLp μ hQ (f i) x - ‖V i x‖ ^ 2 / 2) ^ 2 ∂μ := by + rw [normalized_sobolev_mean_sq] + congr 1 + apply integral_congr_ae + filter_upwards [coordinateQuadratic_eq_norm μ hQ (u i) (C i) (V i) (hu i) (hrep i), + ae_restrict_of_ae (Lp.coeFn_sub (SobolevSpace.toLp μ hQ (f i)) + (SobolevSpace.toLp μ hQ (H i)))] with x hx hs + rw [map_sub, hs, Pi.sub_apply, hx] + simpa only [heq, zero_pow (by decide : 2 ≠ 0)] using hlim.pow 2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..7db62bc51cd881a63b6b2244fa275d2abc025b44 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialQuadraticLimit.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.RCD.Harmonic.MetricQuadraticError +import OAI.Geometry.RCD.Coordinates.NormalizedPairing + +namespace OAI + +/-! # The radial value limit from Poisson height and metric approximation -/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +omit [MeasurableSpace X] in +/-- The dimensionless radial value error is the sum of the Poisson height +error and the explicitly squared metric approximation error. -/ +theorem radial_quadratic_value_error {n : ℕ} {p : X} {r S ε D : ℝ} + (hr : 0 < r) (hS : 0 ≤ S) (hε : 0 ≤ ε) {V : X → Euclidean n} + (hmetric : IsPointedApproximation p 0 r S ε V) (hcenter : V p = 0) + {F : X → ℝ} {x : X} (hx : dist x p ≤ S * r) + (hheight : |r ^ 2 * F x - dist p x ^ 2 / 2| ≤ r ^ 2 * D) : + |F x - ‖V x‖ ^ 2 / 2| ≤ D + ε * (2 * S + ε) / 2 := by + have hmetricx := hmetric.quadratic_value_error hr hS hε hcenter hx + have hsum : |r ^ 2 * F x - r ^ 2 * ‖V x‖ ^ 2 / 2| ≤ + r ^ 2 * D + r ^ 2 * (ε * (2 * S + ε) / 2) := + (abs_sub_le (r ^ 2 * F x) (dist p x ^ 2 / 2) + (r ^ 2 * ‖V x‖ ^ 2 / 2)).trans (add_le_add hheight hmetricx) + have heq : r ^ 2 * F x - r ^ 2 * ‖V x‖ ^ 2 / 2 = + r ^ 2 * (F x - ‖V x‖ ^ 2 / 2) := by ring + rw [heq, abs_mul, abs_of_pos (sq_pos_of_pos hr)] at hsum + nlinarith [sq_pos_of_pos hr] + +/-- A bounded radial value error controls its normalized mean square. +The reference measure need only be finite on the ball. -/ +theorem radial_quadratic_mean_bound (μ : Measure X) [BorelSpace X] + {n : ℕ} {p : X} {r S ε D : ℝ} (hr : 0 < r) (hS : 0 ≤ S) + (hε : 0 ≤ ε) (hD : 0 ≤ D) (hfin : μ (ball p (S * r)) ≠ ∞) + {V : X → Euclidean n} (hV : Measurable V) + (hmetric : IsPointedApproximation p 0 r S ε V) (hcenter : V p = 0) + {F : X → ℝ} (hF : AEStronglyMeasurable F (μ.restrict (ball p (S * r)))) + (hheight : ∀ᵐ x ∂μ.restrict (ball p (S * r)), + |r ^ 2 * F x - dist p x ^ 2 / 2| ≤ r ^ 2 * D) : + (μ.real (ball p (S * r)))⁻¹ * + (∫ x in ball p (S * r), (F x - ‖V x‖ ^ 2 / 2) ^ 2 ∂μ) ≤ + (D + ε * (2 * S + ε) / 2) ^ 2 := by + let Ω := ball p (S * r) + let C := D + ε * (2 * S + ε) / 2 + have hC : 0 ≤ C := by dsimp only [C]; positivity + let e : X → ℝ := fun x => F x - ‖V x‖ ^ 2 / 2 + have hb : ∀ᵐ x ∂μ.restrict Ω, |e x| ≤ C := by + filter_upwards [hheight, ae_restrict_mem measurableSet_ball] with x hh hx + exact radial_quadratic_value_error hr hS hε hmetric hcenter hx.le hh + have hmV : Measurable (fun x => ‖V x‖ ^ 2 / 2) := by fun_prop + have hm : AEStronglyMeasurable e (μ.restrict Ω) := + hF.sub hmV.aestronglyMeasurable + let : IsFiniteMeasure (μ.restrict Ω) := + ⟨by simpa only [Ω, Measure.restrict_apply_univ] using hfin.lt_top⟩ + have he : MemLp e 2 (μ.restrict Ω) := + MemLp.of_bound hm C (by simpa only [Real.norm_eq_abs] using hb) + have hi : (∫ x in Ω, e x ^ 2 ∂μ) ≤ C ^ 2 * μ.real Ω := by + have hb' : ∀ᵐ x ∂μ.restrict Ω, e x ^ 2 ≤ C ^ 2 := by + filter_upwards [hb] with x hx + simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) hC).mpr hx + have hh := integral_mono_ae he.integrable_sq (integrable_const (C ^ 2)) hb' + simpa only [integral_const, smul_eq_mul, Measure.real, Measure.restrict_apply_univ, + mul_comm] using hh + change (μ.real Ω)⁻¹ * (∫ x in Ω, e x ^ 2 ∂μ) ≤ C ^ 2 + by_cases hz : μ.real Ω = 0 + · simp only [hz, inv_zero, zero_mul] + positivity + · calc + _ ≤ (μ.real Ω)⁻¹ * (C ^ 2 * μ.real Ω) := + mul_le_mul_of_nonneg_left hi (by positivity) + _ = C ^ 2 := by field_simp + +/-- Vanishing height error and vanishing metric error imply the exact +quadratic value limit needed by local Poisson/harmonic compactness. -/ +theorem radial_quadratic_mean_tendsto_zero (μ : Measure X) [BorelSpace X] + {n : ℕ} {S : ℝ} (hS : 0 ≤ S) + (p : ℕ → X) (r ε D : ℕ → ℝ) (V : ℕ → X → Euclidean n) (F : ℕ → X → ℝ) + (hr : ∀ i, 0 < r i) (hε : ∀ i, 0 ≤ ε i) (hD : ∀ i, 0 ≤ D i) + (hfin : ∀ i, μ (ball (p i) (S * r i)) ≠ ∞) + (hV : ∀ i, Measurable (V i)) + (hmetric : ∀ i, IsPointedApproximation (p i) 0 (r i) S (ε i) (V i)) + (hcenter : ∀ i, V i (p i) = 0) + (hF : ∀ i, AEStronglyMeasurable (F i) (μ.restrict (ball (p i) (S * r i)))) + (hheight : ∀ i, ∀ᵐ x ∂μ.restrict (ball (p i) (S * r i)), + |r i ^ 2 * F i x - dist (p i) x ^ 2 / 2| ≤ r i ^ 2 * D i) + (hε0 : Tendsto ε atTop (𝓝 0)) (hD0 : Tendsto D atTop (𝓝 0)) : + Tendsto (fun i => (μ.real (ball (p i) (S * r i)))⁻¹ * + (∫ x in ball (p i) (S * r i), (F i x - ‖V i x‖ ^ 2 / 2) ^ 2 ∂μ)) + atTop (𝓝 0) := by + have hbound := fun i => radial_quadratic_mean_bound μ (hr i) hS (hε i) (hD i) + (hfin i) (hV i) (hmetric i) (hcenter i) (hF i) (hheight i) + have hlim : Tendsto (fun i => (D i + ε i * (2 * S + ε i) / 2) ^ 2) atTop (𝓝 0) := by + have h := (hD0.add ((hε0.mul ((tendsto_const_nhds (x := 2 * S)).add hε0)).div_const 2)).pow 2 + simpa using h + exact squeeze_zero (fun i => mul_nonneg (by positivity) (integral_nonneg fun _ => sq_nonneg _)) + hbound hlim + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialSquaredDistance.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialSquaredDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..13f6bc53908b0da11a53ad83c62dc1e03976a28e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialSquaredDistance.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.RCD.Sobolev.RadialCutoffMass + +namespace OAI + +/-! +# Applying the radial test to an actual squared-distance representative + +The squared-distance function is cut off only at the larger working radius. +Locality transfers its radial pairing to each smaller ball. The resulting +mass estimate takes precisely the local weak Laplacian-defect identity and +the eikonal input, rather than an assumed annular source formula. +-/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [IsFiniteMeasureOnCompacts μ] + (hQ : QuadraticCheegerEnergy μ) + +theorem inwardQuadratic_gamma_smaller (c : X) {R T : ℝ} (hR : 0 ≤ R) (hRT : R ≤ T) + (heik : ∀ᵐ x ∂μ, x ∈ ball c R → + localGamma μ hQ (inwardSobolev μ hQ c R) (inwardSobolev μ hQ c R) x = 1) : + ∀ᵐ x ∂μ, x ∈ ball c R → + localGamma μ hQ (inwardQuadratic μ hQ c (hR.trans hRT)) (inwardSobolev μ hQ c R) x = + -dist c x := by + let u := inwardSobolev μ hQ c R + let w := inwardSobolev μ hQ c T + have hb : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ w x| ≤ (⟨T, hR.trans hRT⟩ : ℝ≥0) := by + filter_upwards [inwardSobolev_bounds μ hQ c (hR.trans hRT)] with x hx + change |SobolevSpace.toLp μ hQ (inwardSobolev μ hQ c T) x| ≤ T + simpa only [abs_of_nonneg hx.1] using hx.2 + filter_upwards [heik, inwardSobolev_coe μ hQ c R, inwardSobolev_coe μ hQ c T, + Lp.coeFn_sub (SobolevSpace.toLp μ hQ w) (SobolevSpace.toLp μ hQ u), + localGamma_sub_left μ hQ w u u, + localGamma_zero_on_level μ hQ (w - u) u (T - R), + localGamma_sub_left μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ w ⟨T, hR.trans hRT⟩) (T • w) u, + localGamma_smul_left μ hQ (1 / 2 : ℝ) (SobolevSpace.square μ hQ w ⟨T, hR.trans hRT⟩) u, + localGamma_smul_left μ hQ T w u, + localGamma_square μ hQ w u ⟨T, hR.trans hRT⟩ hb] with x he hu hw hsub hγsub hz hs ha ht hsq hx + have hd : dist c x < R := by simpa only [mem_ball, dist_comm] using hx + have hu' : SobolevSpace.toLp μ hQ u x = R - dist c x := + hu.trans (max_eq_left (sub_nonneg.mpr hd.le)) + have hw' : SobolevSpace.toLp μ hQ w x = T - dist c x := + hw.trans (max_eq_left (sub_nonneg.mpr (hd.le.trans hRT))) + have hdif : SobolevSpace.toLp μ hQ (w - u) x = T - R := by + change (SobolevSpace.toLp μ hQ w - SobolevSpace.toLp μ hQ u) x = _ + simp only [hsub, Pi.sub_apply, hu', hw'] + ring + have hp : localGamma μ hQ w u x = 1 := by + have hz' := hz hdif + rw [hγsub, he hx] at hz' + linarith + change localGamma μ hQ ((1 / 2 : ℝ) • SobolevSpace.square μ hQ w ⟨T, hR.trans hRT⟩ - T • w) u x = _ + rw [hs, ha, ht, hsq, hp, hw'] + ring + +/-- The actual positive squared-distance defect satisfies the volume-drop +bound on an inner ball. Its two published inputs are the local weak defect +identity and the distance eikonal property. Bishop--Gromov removes the sphere +exception. -/ +theorem squaredDistance_source_mass_le {n r R T curvature : ℝ} + (hn : 0 < n) (hr : 0 < r) (hrR : r < R) (hRT : R < T) + (hcurvature : 0 ≤ curvature) (c : X) (σ : Measure X) [IsFiniteMeasure σ] + {model : ℝ → ℝ} (hBG : BallVolumeComparison μ model) (hmodelcont : Continuous model) + (hmodelr : 0 < model r) + (heik : ∀ᵐ x ∂μ, x ∈ ball c R → + localGamma μ hQ (inwardSobolev μ hQ c R) (inwardSobolev μ hQ c R) x = 1) + (hdefect : ∀ (ψ : SobolevSpace μ hQ) (v : X → ℝ) (C : ℝ≥0), + LipschitzWith C v → HasCompactSupport v → tsupport v ⊆ ball c T → + SobolevSpace.toLp μ hQ ψ =ᵐ[μ] v → + energyForm μ hQ (inwardQuadratic μ hQ c ((hr.trans hrR).trans hRT).le) ψ + + (n + curvature) * (∫ x, v x ∂μ) = ∫ x, v x ∂σ) : + ((r ^ (-n) - R ^ (-n)) / n) * σ.real (ball c r) ≤ + r ^ (-n) * μ.real (ball c r) - R ^ (-n) * μ.real (ball c R) + + curvature * ((r ^ (-n) - R ^ (-n)) / n) * μ.real (ball c R) := by + apply radial_source_cutoff_mass_le μ hQ hn hr hrR hRT hcurvature c _ σ hdefect + · exact inwardQuadratic_gamma_smaller μ hQ c (hr.trans hrR).le hRT.le heik + · exact sphere_measure_zero_of_comparison hBG hmodelcont c hr hmodelr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialTime.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialTime.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab9ed678ab96b4187fd4174065a02c1ae07411eb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialTime.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Metric.ConcentratedTimeLimit +import OAI.Geometry.RCD.Harmonic.RadialContractionFactor + +namespace OAI + +/-! # Radial plans with the small-time CD density bound + +The terminal laws are actual normalized balls shrinking to the pole. +The one-sided source bound remains uniform and passes to the limit. +-/ + +open Set Filter Metric MeasureTheory TopologicalSpace +open scoped ENNReal Topology + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.exists_radial_time_plan {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) (hK : -κ ≤ K) (ν₀ : ProbabilityMeasure X) + {C₀ : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) (h0 : (ν₀ : Measure X) ≤ C₀ • hausdorff n X) + (p : X) {R D : ℝ} (hR : 0 < R) (hRD : R < D) + (hs0 : ∀ᵐ x ∂(ν₀ : Measure X), dist x p ≤ R) + (t : Time) (ht1 : (t : ℝ) < 1) : + ∃ π : ProbabilityMeasure C(Time, X), + (∀ᵐ γ ∂(π : Measure C(Time, X)), IsGeodesic γ ∧ ∀ s, dist (γ s) p ≤ 3 * D) ∧ + π.map (fun γ => γ 0) = ν₀ ∧ + π.map (fun γ => γ 1) = (⟨Measure.dirac p, inferInstance⟩ : ProbabilityMeasure X) ∧ + (π.map (fun γ => γ t) : Measure X) ≤ + (C₀ * ENNReal.ofReal (radialContractionDensity n κ D t)) • hausdorff n X := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let μ := hausdorff n X + let ε (k : ℕ) : ℝ := (D - R) / ((k : ℝ) + 1) + have hDR : 0 < D - R := sub_pos.mpr hRD + have hD : 0 < D := hR.trans hRD + have hε (k : ℕ) : 0 < ε k := div_pos hDR (by positivity) + have hεle (k : ℕ) : ε k ≤ D - R := by + apply (div_le_iff₀ (show 0 < (k : ℝ) + 1 by positivity)).mpr + nlinarith [Nat.cast_nonneg (α := ℝ) k] + have hεlim : Tendsto ε atTop (𝓝 0) := by + simpa only [ε, div_eq_mul_inv, one_div, one_mul, mul_zero] using + tendsto_one_div_add_atTop_nhds_zero_nat.const_mul (D - R) + have hball0 (k : ℕ) : μ (ball p (ε k)) ≠ 0 := (hX.fullSupport p (ε k) (hε k)).ne' + have hballtop (k : ℕ) : μ (ball p (ε k)) ≠ ∞ := + (hX.finiteOnBounded _ isBounded_ball).ne + let ν (k : ℕ) : ProbabilityMeasure X := + ⟨uniformOn μ (ball p (ε k)), uniformOn_probability μ _ (hball0 k) (hballtop k)⟩ + have hsν (k : ℕ) : ∀ᵐ x ∂(ν k : Measure X), dist x p ≤ ε k := + (uniformOn_ae_mem μ (ball p (ε k)) measurableSet_ball).mono fun _ hx => hx.le + have hνlim := probability_tendsto_dirac_of_radius hεlim hsν + have hC : C₀ * ENNReal.ofReal (radialContractionDensity n κ D t) ≠ ∞ := + ENNReal.mul_ne_top hC₀ ENNReal.ofReal_ne_top + apply exists_concentrated_time_limit μ p (by positivity : 0 ≤ 3 * D) t ν₀ ν hνlim hC + intro k + have h1 : (ν k : Measure X) ≤ (μ (ball p (ε k)))⁻¹ • μ := by + intro A + exact mul_le_mul_right (Measure.restrict_le_self (μ := μ) (s := ball p (ε k)) A) _ + have hs0D : ∀ᵐ x ∂(ν₀ : Measure X), dist x p ≤ D := + hs0.mono fun _ hx => hx.trans hRD.le + have hsk : ∀ᵐ x ∂(ν k : Measure X), dist x p ≤ D := + (hsν k).mono fun _ hx => by linarith [hεle k] + have hβ : ∀ x ∈ closedBall p R, ∀ y ∈ closedBall p (ε k), + radialContractionFloor n κ D t ≤ tau K n (1 - (t : ℝ)) (dist x y) := by + intro x hx y hy + apply radialContractionFloor_le_tau hn hκ hK dist_nonneg _ t.2.1 t.2.2 + have hxy := dist_triangle x p y + rw [dist_comm p y] at hxy + change dist x p ≤ R at hx + change dist y p ≤ ε k at hy + linarith [hεle k] + obtain ⟨π, hπ, hg, hp, hm⟩ := hX.exists_time_compression hn (ν₀ : Measure X) + (ν k : Measure X) hC₀ (ENNReal.inv_ne_top.mpr (hball0 k)) h0 h1 p hD.le hs0D hsk + t (radialContractionFloor_pos n κ D ht1).ne' (radialContractionFloor_ne_top n κ D t) + (closedBall p R) (closedBall p (ε k)) hs0 (hsν k) hβ + let := hπ + have he := optimalPlan_endpoints (ν₀ : Measure X) (ν k : Measure X) π hp + refine ⟨⟨π, hπ⟩, optimal_geodesic_plan_bounded _ _ π hg hp p hD.le hs0D hsk, ?_, ?_, ?_⟩ + · apply Subtype.ext + exact he.1 + · apply Subtype.ext + exact he.2 + · change π.map (fun γ => γ t) ≤ _ + simpa only [div_eq_mul_inv, radialContractionFloor_inv_pow (by omega : 0 < n) κ D ht1] + using hm + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialTimeAverageRepresentative.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeAverageRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..240306a41767b3fb2230586b73871688707e563e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeAverageRepresentative.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.RCD.Sobolev.SobolevAverageRepresentative +import OAI.Geometry.RCD.Coordinates.IntervalVectorExtension +import OAI.Geometry.RCD.Sobolev.RadialLocalSobolev + +namespace OAI + +/-! # Pointwise identification of the averaged local heat representative -/ + +open Set Filter MeasureTheory Metric +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [SigmaFinite μ] [IsFiniteMeasureOnCompacts μ] (Q : QuadraticCheegerEnergy μ) + +theorem radial_time_average_representative + {a b : ℝ} (v : Ioo a b → SobolevSpace μ Q) + (hv : AEStronglyMeasurable v (volume.comap Subtype.val)) + {C : ℝ} (hb : ∀ q, ‖v q‖ ≤ C) + (z : X) {r : ℝ} (hr : 0 < r) (H : ℝ → X → ℝ) + (hH : Measurable (Function.uncurry H)) (N : Set ℝ) (hN : N.Countable) + (hrep : ∀ q : Ioo a b, (q:ℝ) ∉ N → SobolevSpace.toLp μ Q (v q) =ᵐ[μ] + fun x => radialCutoff z r x*H q x) + {h t M : ℝ} (hh : 0 < h) (hM : 0 ≤ M) + (hsub : Icc (t-h) (t+h) ⊆ Ioo a b) + (hbound : ∀ q ∈ Icc (t-h) (t+h), ∀ x ∈ closedBall z (2*r), |H q x| ≤ M) : + SobolevSpace.toLp μ Q (timeIntervalAverage (intervalVectorExtension v) h t) =ᵐ[μ] + fun x => radialCutoff z r x*timeIntervalAverage (fun q => H q x) h t := by + let f := fun q x => radialCutoff z r x*H q x + have hf : StronglyMeasurable (Function.uncurry f) := + (((radialCutoff_lipschitz z hr).continuous.measurable.comp measurable_snd).mul hH).stronglyMeasurable + have hz (q : ℝ) (x : X) (hx : x ∉ closedBall z (2*r)) : f q x = 0 := by + dsimp only [f] + rw [radialCutoff_eq_zero z hr (by + have hxx : 2*r < dist x z := lt_of_not_ge hx + rw [dist_comm] + exact hxx.le),zero_mul] + have hgood : ∀ᵐ q ∂volume.restrict (Icc (t-h) (t+h)), + q ∈ Icc (t-h) (t+h) ∧ q ∉ N := + (ae_restrict_mem measurableSet_Icc).and (ae_restrict_of_ae (hN.ae_notMem volume)) + have hre : ∀ᵐ q ∂volume.restrict (Icc (t-h) (t+h)), + SobolevSpace.toLp μ Q (intervalVectorExtension v q) =ᵐ[μ] f q := by + filter_upwards [hgood] with q hq + have he := intervalVectorExtension_eq v (⟨q,hsub hq.1⟩ : Ioo a b) + rw [he] + exact hrep ⟨q,hsub hq.1⟩ hq.2 + have hbf : ∀ᵐ q ∂volume.restrict (Icc (t-h) (t+h)), ∀ x, |f q x| ≤ M := by + filter_upwards [ae_restrict_mem measurableSet_Icc] with q hq + intro x + by_cases hx : x ∈ closedBall z (2*r) + · dsimp only [f] + rw [abs_mul,abs_of_nonneg (radialCutoff_bounds z r x).1] + exact (mul_le_of_le_one_left (abs_nonneg _) (radialCutoff_bounds z r x).2).trans + (hbound q hq x hx) + · rw [hz q x hx,abs_zero] + exact hM + have he := sobolev_time_average_representative μ Q (intervalVectorExtension v) + (intervalVectorExtension_integrable v hv hb) f hf measurableSet_closedBall + (isCompact_closedBall z (2*r)).measure_lt_top.ne hh hre hbf (Eventually.of_forall hz) + have hscalar (x : X) : timeIntervalAverage (fun q => f q x) h t = + radialCutoff z r x*timeIntervalAverage (fun q => H q x) h t := by + simp only [f,timeIntervalAverage,smul_eq_mul,intervalIntegral.integral_const_mul] + ring + simpa only [hscalar] using he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialTimeCapacity.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeCapacity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9fb88bd3203b61cd4974dd9b338170305cc7d68 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeCapacity.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Transport.RadialTimeCompression +import OAI.Geometry.RCD.Coordinates.Proper + +namespace OAI + +/-! # Source-density control for arbitrary-time radial contraction -/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +theorem timeSupportFactor_eq {n : ℕ} (hn : 0 < n) (β C₀ : ℝ≥0∞) : + timeSupportFactor n β C₀ = β ^ n * C₀⁻¹ := by + have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' + unfold timeSupportFactor + rw [mul_pow] + congr 1 + rw [← ENNReal.rpow_natCast, ← ENNReal.rpow_mul, neg_mul, + one_div_mul_cancel hn0, ENNReal.rpow_neg_one] + +theorem timeSupportFactor_inv {n : ℕ} (hn : 0 < n) {β : ℝ≥0∞} + (hβ0 : β ≠ 0) (hβtop : β ≠ ∞) (C₀ : ℝ≥0∞) : + (timeSupportFactor n β C₀)⁻¹ = C₀ / β ^ n := by + rw [timeSupportFactor_eq hn, + ENNReal.mul_inv (Or.inl (pow_ne_zero _ hβ0)) (Or.inl (ENNReal.pow_ne_top hβtop)), + inv_inv, div_eq_mul_inv, mul_comm] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem NoncollapsedRCD.exists_time_compression {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) + (ν₀ ν₁ : Measure X) [IsProbabilityMeasure ν₀] [IsProbabilityMeasure ν₁] + {C₀ C₁ : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) (hC₁ : C₁ ≠ ∞) + (h0 : ν₀ ≤ C₀ • hausdorff n X) (h1 : ν₁ ≤ C₁ • hausdorff n X) + (p : X) {R : ℝ} (hR : 0 ≤ R) + (hs0 : ∀ᵐ x ∂ν₀, dist x p ≤ R) (hs1 : ∀ᵐ x ∂ν₁, dist x p ≤ R) + (t : Time) {β : ℝ≥0∞} (hβ0 : β ≠ 0) (hβtop : β ≠ ∞) + (s₀ s₁ : Set X) (hs₀ : ∀ᵐ x ∂ν₀, x ∈ s₀) (hs₁ : ∀ᵐ x ∂ν₁, x ∈ s₁) + (hβ : ∀ x ∈ s₀, ∀ y ∈ s₁, β ≤ tau K n (1 - (t : ℝ)) (dist x y)) : + ∃ π : Measure C(Time, X), IsProbabilityMeasure π ∧ + (∀ᵐ γ ∂π, IsGeodesic γ) ∧ + IsOptimalCoupling ν₀ ν₁ (π.map (fun γ => (γ 0, γ 1))) ∧ + π.map (fun γ => γ t) ≤ (C₀ / β ^ n) • hausdorff n X := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + let : IsFiniteMeasure ((hausdorff n X).restrict (closedBall p (3 * R))) := + ⟨by simpa using hX.finiteOnBounded (closedBall p (3 * R)) isBounded_closedBall⟩ + have hz0 := probability_capacity_ne_zero (hausdorff n X) ν₀ h0 + have hC : C₀ / β ^ n ≠ ∞ := ENNReal.div_ne_top hC₀ (pow_ne_zero _ hβ0) + have hCpos : C₀ / β ^ n ≠ 0 := (ENNReal.div_pos hz0 (ENNReal.pow_ne_top hβtop)).ne' + apply hX.cd.exists_compressed_time (hausdorff n X) K n ν₀ ν₁ hC₀ hC₁ hC hCpos + h0 h1 (finiteSecondMoment_of_bounded ν₀ p hs0) (finiteSecondMoment_of_bounded ν₁ p hs1) + p hR hs0 hs1 hn t β s₀ s₁ hs₀ hs₁ hβ + rw [← timeSupportFactor_inv (by omega : 0 < n) hβ0 hβtop C₀, inv_inv] + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialTimeReplacement.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8170e4ba9a19bc620d98f759206fda713309812 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeReplacement.lean @@ -0,0 +1,142 @@ +import OAI.Geometry.RCD.Harmonic.RadialTimeSupport + +namespace OAI + +/-! # Replacing a radial-time region while retaining its source capacity + +The replacement preserves both endpoint marginals. The one-sided CD +support estimate holds at the chosen time and survives endpoint concentration. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem FullCD.replace_time_region (μ : Measure X) [SigmaFinite μ] + (K : ℝ) (n : ℕ) (hcd : FullCD μ K n) (ν₀ ν₁ : Measure X) + [IsProbabilityMeasure ν₀] [IsProbabilityMeasure ν₁] + {C₀ C₁ : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) + (h0 : ν₀ ≤ C₀ • μ) (h1 : ν₁ ≤ C₁ • μ) + (hm0 : FiniteSecondMoment ν₀) (hm1 : FiniteSecondMoment ν₁) + (s₀ s₁ : Set X) (hs0 : ∀ᵐ x ∂ν₀, x ∈ s₀) (hs1 : ∀ᵐ x ∂ν₁, x ∈ s₁) + (hn : 2 ≤ n) (t : Time) (β : ℝ≥0∞) + (hβ : ∀ x ∈ s₀, ∀ y ∈ s₁, β ≤ tau K n (1 - (t : ℝ)) (dist x y)) + (π : Measure C(Time, X)) [IsProbabilityMeasure π] + (hg : ∀ᵐ γ ∂π, IsGeodesic γ) + (hp : IsOptimalCoupling ν₀ ν₁ (π.map (fun γ => (γ 0, γ 1)))) + (B : Set X) (hB : MeasurableSet B) + (hm : (π.map (fun γ => γ t)) B ≠ 0) + {a : ℝ≥0∞} (ha0 : 0 < a) (ha1 : a ≤ 1) : + ∃ π' : Measure C(Time, X), ∃ η : Measure X, + IsProbabilityMeasure π' ∧ IsFiniteMeasure η ∧ + (∀ᵐ γ ∂π', IsGeodesic γ) ∧ + IsOptimalCoupling ν₀ ν₁ (π'.map (fun γ => (γ 0, γ 1))) ∧ + π'.map (fun γ => γ t) = + π.map (fun γ => γ t) - a • (π.map (fun γ => γ t)).restrict B + η ∧ + η univ = a * (π.map (fun γ => γ t)) B ∧ + timeSupportFactor n β C₀ * (π.map (fun γ => γ t)) B ≤ + μ {x | η.rnDeriv μ x ≠ 0} := by + let κ := π.restrict ((fun γ => γ t) ⁻¹' B) + have hκ : κ ≤ π := Measure.restrict_le_self + have hmass : κ univ = (π.map (fun γ => γ t)) B := by + rw [Measure.map_apply (measurable_path_eval t) hB] + exact Measure.restrict_apply_univ _ + have hκ0 : κ univ ≠ 0 := hmass ▸ hm + have hκtop : κ univ ≠ ∞ := measure_ne_top κ univ + let : NeZero κ := ⟨by intro he; exact hκ0 (by rw [he]; rfl)⟩ + let η₀ := (κ univ)⁻¹ • κ.map (fun γ => γ 0) + let η₁ := (κ univ)⁻¹ • κ.map (fun γ => γ 1) + have htprob : IsProbabilityMeasure ((κ univ)⁻¹ • κ) := inferInstance + have he0 : (((κ univ)⁻¹ • κ).map (fun γ => γ 0)) = η₀ := Measure.map_smul _ (measurable_path_eval 0).aemeasurable + have he1 : (((κ univ)⁻¹ • κ).map (fun γ => γ 1)) = η₁ := Measure.map_smul _ (measurable_path_eval 1).aemeasurable + have hprob0 : IsProbabilityMeasure η₀ := he0 ▸ + inferInstance + have hprob1 : IsProbabilityMeasure η₁ := he1 ▸ + inferInstance + have hend := optimalPlan_endpoints ν₀ ν₁ π hp + have hle0 : κ.map (fun γ => γ 0) ≤ ν₀ := by + rw [← hend.1] + exact Measure.map_mono hκ (measurable_path_eval 0) + have hle1 : κ.map (fun γ => γ 1) ≤ ν₁ := by + rw [← hend.2] + exact Measure.map_mono hκ (measurable_path_eval 1) + have hden0 : η₀ ≤ (C₀ * (κ univ)⁻¹) • μ := fun S => by + simpa only [η₀, Measure.smul_apply, smul_eq_mul, mul_assoc, mul_comm, mul_left_comm] using + mul_le_mul_right ((hle0.trans h0) S) (κ univ)⁻¹ + have hden1 : η₁ ≤ (C₁ * (κ univ)⁻¹) • μ := fun S => by + simpa only [η₁, Measure.smul_apply, smul_eq_mul, mul_assoc, mul_comm, mul_left_comm] using + mul_le_mul_right ((hle1.trans h1) S) (κ univ)⁻¹ + have hi : (κ univ)⁻¹ ≠ ∞ := ENNReal.inv_ne_top.mpr hκ0 + have hs0' : ∀ᵐ x ∂η₀, x ∈ s₀ := by + have ht : ∀ᵐ x ∂κ.map (fun γ => γ 0), x ∈ s₀ := + hs0.filter_mono hle0.absolutelyContinuous.ae_le + exact ht.filter_mono Measure.smul_absolutelyContinuous.ae_le + have hs1' : ∀ᵐ x ∂η₁, x ∈ s₁ := by + have ht : ∀ᵐ x ∂κ.map (fun γ => γ 1), x ∈ s₁ := + hs1.filter_mono hle1.absolutelyContinuous.ae_le + exact ht.filter_mono Measure.smul_absolutelyContinuous.ae_le + obtain ⟨τ, hτ, hgτ, hpτ, hvolτ⟩ := hcd.exists_time_ac_support_bound μ η₀ η₁ + hden0 hden1 ((hm0.of_le hle0).smul hi) ((hm1.of_le hle1).smul hi) + s₀ s₁ hs0' hs1' hn t β hβ + let := hτ + have hatop : a ≠ ∞ := ne_top_of_le_ne_top (by simp) ha1 + let q := a * κ univ + have hq0 : q ≠ 0 := mul_ne_zero ha0.ne' hκ0 + have hqtop : q ≠ ∞ := ENNReal.mul_ne_top hatop hκtop + have hcancel : q * (κ univ)⁻¹ = a := by + dsimp only [q] + rw [mul_assoc, ENNReal.mul_inv_cancel hκ0 hκtop, mul_one] + have hasub : a • κ ≤ π := by + calc + _ ≤ (1 : ℝ≥0∞) • κ := fun S => by + simpa only [Measure.smul_apply, smul_eq_mul] using mul_le_mul_left ha1 (κ S) + _ = κ := one_smul _ _ + _ ≤ π := hκ + have hscaled : IsOptimalCoupling ((a • κ).map (fun γ => γ 0)) + ((a • κ).map (fun γ => γ 1)) ((q • τ).map (fun γ => (γ 0, γ 1))) := by + have hh := hpτ.smul hq0 hqtop + simpa only [η₀, η₁, Measure.map_smul _ (measurable_path_eval 0).aemeasurable, + Measure.map_smul _ (measurable_path_eval 1).aemeasurable, Measure.map_smul _ ((measurable_path_eval 0).prodMk (measurable_path_eval 1)).aemeasurable, smul_smul, hcancel] using hh + have hgscaled : ∀ᵐ γ ∂(q • τ), IsGeodesic γ := + hgτ.filter_mono Measure.smul_absolutelyContinuous.ae_le + obtain ⟨hprob', hg', hp'⟩ := optimalPlan_replace_subplan hp hg hasub hscaled hgscaled + let η := (q • τ).map (fun γ => γ t) + let : IsFiniteMeasure (q • τ) := ⟨by + simp only [Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] + exact hqtop.lt_top⟩ + have hκmid : κ.map (fun γ => γ t) = + (π.map (fun γ => γ t)).restrict B := + (Measure.restrict_map (measurable_path_eval t) hB).symm + refine ⟨π - a • κ + q • τ, η, hprob', inferInstance, hg', hp', ?_, ?_, ?_⟩ + · rw [Measure.map_add _ _ (measurable_path_eval t), + map_sub_of_le π (a • κ) hasub _ (measurable_path_eval t), + Measure.map_smul _ (measurable_path_eval t).aemeasurable, hκmid] + · simp only [η, Measure.map_smul _ (measurable_path_eval t).aemeasurable, Measure.smul_apply, smul_eq_mul, + Measure.map_apply_of_aemeasurable (measurable_path_eval t).aemeasurable + MeasurableSet.univ, preimage_univ, measure_univ, mul_one, q, hmass] + · have hsupport : μ {x | η.rnDeriv μ x ≠ 0} = + μ {x | (τ.map (fun γ => γ t)).rnDeriv μ x ≠ 0} := by + apply measure_congr + have hr := Measure.rnDeriv_smul_left_of_ne_top + (τ.map (fun γ => γ t)) μ hqtop + change ∀ᵐ x ∂μ, (η.rnDeriv μ x ≠ 0) = + ((τ.map (fun γ => γ t)).rnDeriv μ x ≠ 0) + dsimp only [η] + rw [Measure.map_smul _ (measurable_path_eval t).aemeasurable] + filter_upwards [hr] with x hx + rw [hx, Pi.smul_apply, smul_eq_mul] + rw [mul_ne_zero_iff] + apply propext + exact ⟨And.right, fun h => ⟨hq0, h⟩⟩ + rw [hsupport] + change timeSupportFactor n β (C₀ * (κ univ)⁻¹) ≤ _ at hvolτ + rw [timeSupportFactor_scale (by omega : 0 < n) β hC₀ hκ0, hmass] at hvolτ + exact hvolτ + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialTimeSupport.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..310ccdcece00d925ddc79a335c27d456a09fe68f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialTimeSupport.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.RCD.Transport.AsymmetricMidpoint + +namespace OAI + +/-! # One-sided CD support bounds at an arbitrary contraction time + +Only the initial density bound is retained. This is the contribution which +survives when the other endpoint concentrates at the pole. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +theorem cd_time_renyi_lower (μ ν₀ ν₁ : Measure X) [SigmaFinite μ] + (π : Measure C(Time, X)) [IsProbabilityMeasure π] + (hp : IsOptimalCoupling ν₀ ν₁ (π.map (fun γ => (γ 0, γ 1)))) + {C₀ : ℝ≥0∞} (h0 : ν₀ ≤ C₀ • μ) (K N : ℝ) (hN : 1 < N) + (t : Time) (β : ℝ≥0∞) + (hβ : ∀ᵐ γ ∂π, β ≤ tau K N (1 - (t : ℝ)) (dist (γ 0) (γ 1))) + (hR : (∫⁻ γ, tau K N (1 - (t : ℝ)) (dist (γ 0) (γ 1)) * + (ν₀.rnDeriv μ (γ 0)) ^ (-(1 / N)) + + tau K N (t : ℝ) (dist (γ 0) (γ 1)) * + (ν₁.rnDeriv μ (γ 1)) ^ (-(1 / N)) ∂π) ≤ + renyiIntegral μ (π.map (fun γ => γ t)) N) : + β * C₀ ^ (-(1 / N)) ≤ renyiIntegral μ (π.map (fun γ => γ t)) N := by + have hend := optimalPlan_endpoints ν₀ ν₁ π hp + have he0 : ν₀ ≪ μ := Measure.absolutelyContinuous_of_le_smul h0 + have hd0 : ∀ᵐ γ ∂π, ν₀.rnDeriv μ (γ 0) ≤ C₀ := by + apply ae_of_ae_map (measurable_path_eval (X := X) 0).aemeasurable + (p := fun x => ν₀.rnDeriv μ x ≤ C₀) + rw [hend.1] + exact he0.ae_le (rnDeriv_le_const_of_le_smul μ ν₀ h0) + calc + _ = ∫⁻ _ : C(Time, X), β * C₀ ^ (-(1 / N)) ∂π := by simp + _ ≤ _ := (lintegral_mono_ae (by + filter_upwards [hd0, hβ] with γ hγ0 hb + have hi : C₀ ^ (-(1 / N)) ≤ (ν₀.rnDeriv μ (γ 0)) ^ (-(1 / N)) := by + rw [ENNReal.rpow_neg, ENNReal.rpow_neg] + exact ENNReal.inv_le_inv.mpr (ENNReal.rpow_le_rpow hγ0 (by positivity)) + exact (mul_le_mul' hb hi).trans (le_add_right le_rfl))).trans hR + +noncomputable def timeSupportFactor (n : ℕ) (β C₀ : ℝ≥0∞) : ℝ≥0∞ := + (β * C₀ ^ (-(1 / (n : ℝ)))) ^ n + +theorem timeSupportFactor_scale {n : ℕ} (hn : 0 < n) (β : ℝ≥0∞) + {C₀ m : ℝ≥0∞} (hC₀ : C₀ ≠ ∞) (hm : m ≠ 0) : + timeSupportFactor n β (C₀ * m⁻¹) = timeSupportFactor n β C₀ * m := by + have hi : m⁻¹ ≠ ∞ := ENNReal.inv_ne_top.mpr hm + have hp : (m⁻¹) ^ (-(1 / (n : ℝ))) = m ^ (1 / (n : ℝ)) := by + rw [ENNReal.inv_rpow, ENNReal.rpow_neg, inv_inv] + unfold timeSupportFactor + rw [ENNReal.mul_rpow_of_ne_top hC₀ hi, hp, ← mul_assoc, mul_pow] + have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' + have he : (m ^ (1 / (n : ℝ))) ^ n = m := by + rw [← ENNReal.rpow_natCast, ← ENNReal.rpow_mul, one_div_mul_cancel hn0, + ENNReal.rpow_one] + rw [he] + +theorem FullCD.exists_time_ac_support_bound (μ : Measure X) [SigmaFinite μ] + {K : ℝ} {n : ℕ} (hcd : FullCD μ K n) (ν₀ ν₁ : Measure X) + [IsProbabilityMeasure ν₀] [IsProbabilityMeasure ν₁] + {C₀ C₁ : ℝ≥0∞} (h0 : ν₀ ≤ C₀ • μ) (h1 : ν₁ ≤ C₁ • μ) + (hm0 : FiniteSecondMoment ν₀) (hm1 : FiniteSecondMoment ν₁) + (s₀ s₁ : Set X) (hs0 : ∀ᵐ x ∂ν₀, x ∈ s₀) (hs1 : ∀ᵐ x ∂ν₁, x ∈ s₁) + (hn : 2 ≤ n) (t : Time) (β : ℝ≥0∞) + (hβ : ∀ x ∈ s₀, ∀ y ∈ s₁, β ≤ tau K n (1 - (t : ℝ)) (dist x y)) : + ∃ π : Measure C(Time, X), IsProbabilityMeasure π ∧ + (∀ᵐ γ ∂π, IsGeodesic γ) ∧ + IsOptimalCoupling ν₀ ν₁ (π.map (fun γ => (γ 0, γ 1))) ∧ + timeSupportFactor n β C₀ ≤ μ {x | (π.map (fun γ => γ t)).rnDeriv μ x ≠ 0} := by + obtain ⟨π, hπ, hg, hp, hR⟩ := hcd ν₀ ν₁ inferInstance inferInstance + (Measure.absolutelyContinuous_of_le_smul h0) (Measure.absolutelyContinuous_of_le_smul h1) + hm0 hm1 + let := hπ + have hend := optimalPlan_endpoints ν₀ ν₁ π hp + have ha0 : ∀ᵐ γ ∂π, γ 0 ∈ s₀ := by + apply ae_of_ae_map (measurable_path_eval (X := X) 0).aemeasurable (p := fun x => x ∈ s₀) + rwa [hend.1] + have ha1 : ∀ᵐ γ ∂π, γ 1 ∈ s₁ := by + apply ae_of_ae_map (measurable_path_eval (X := X) 1).aemeasurable (p := fun x => x ∈ s₁) + rwa [hend.2] + have hb : ∀ᵐ γ ∂π, β ≤ tau K n (1 - (t : ℝ)) (dist (γ 0) (γ 1)) := by + filter_upwards [ha0, ha1] with γ hγ0 hγ1 + exact hβ _ hγ0 _ hγ1 + have hn1 : (1 : ℝ) < n := by exact_mod_cast (show 1 < n by omega) + have hn0 : (0 : ℝ) < n := zero_lt_one.trans hn1 + have hh := (cd_time_renyi_lower μ ν₀ ν₁ π hp h0 K n hn1 t β hb + (hR n le_rfl t)).trans (renyiIntegral_le_ac_support_volume μ (π.map (fun γ => γ t)) n hn1) + have hpow := ENNReal.rpow_le_rpow hh hn0.le + rw [← ENNReal.rpow_mul, one_div_mul_cancel hn0.ne', ENNReal.rpow_one, + ENNReal.rpow_natCast] at hpow + exact ⟨π, hπ, hg, hp, hpow⟩ + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialValueVolume.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialValueVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ff59885466783eddee01032edf12d6e43ed80e0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialValueVolume.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.RCD.Harmonic.RadialVolumeUnits + +namespace OAI + +/-! # Averaging the transferred Poisson radial values -/ + +namespace RegularPointCoordinates + +/-- A source-to-volume ratio and the same scalar fit bound control the +Poisson value error in the radial length unit. -/ +theorem radial_fit_value_volume_units {r W M C B D w E Θ e : ℝ} + (hW : 0 < W) (hC : 0 ≤ C) (hB : 0 ≤ B) (hE : 0 ≤ E) + (hM : M / W ≤ Θ * E) + (he : e ≤ 2 * (W * (D * r * w * Real.sqrt E) ^ 2) + + 2 * (C * w ^ 2) * (M * (B * (64 * r) ^ 2))) : + W⁻¹ * e ≤ (2 * D ^ 2 + 8192 * C * B * Θ) * (r * w) ^ 2 * E := by + have hh := mul_le_mul_of_nonneg_left he (inv_nonneg.mpr hW.le) + have hm := mul_le_mul_of_nonneg_left hM + (show 0 ≤ 8192 * C * B * (r * w) ^ 2 by positivity) + rw [mul_pow, mul_pow, mul_pow, Real.sq_sqrt hE] at hh + have hcalc : W⁻¹ * (2 * (W * (D ^ 2 * r ^ 2 * w ^ 2 * E)) + + 2 * (C * w ^ 2) * (M * (B * (64 * r) ^ 2))) = + 2 * D ^ 2 * (r * w) ^ 2 * E + 8192 * C * B * (r * w) ^ 2 * (M / W) := by + field_simp [hW.ne'] + ring + rw [hcalc] at hh + apply hh.trans + calc + _ ≤ 2 * D ^ 2 * (r * w) ^ 2 * E + + 8192 * C * B * (r * w) ^ 2 * (Θ * E) := add_le_add le_rfl hm + _ = _ := by ring + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialVariationBound.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialVariationBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..59aa18ef308817e5ff463bac0f8ea76a597f4a27 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialVariationBound.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.RCD.Transport.ShortPlanFlux +import OAI.Analysis.RCDHeat.WeightedGradientConvex + +namespace OAI + +/-! # A finite radial first-variation inequality + +The exact quadratic decrement and cost replace a Kantorovich potential. +The error depends only on the short-plan pullback modulus, uniformly in +the chosen transport plan. +-/ + +open Set Filter Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) +attribute [local instance] pathBorel pathBorelSpace + +theorem radial_variation_lower_bound (π : Measure C(Time, X)) [IsProbabilityMeasure π] + (hg : ∀ᵐ γ ∂π, IsGeodesic γ) + {C : ℝ≥0∞} (hC : C ≠ ∞) + (hc : ∀ t : Time, π.map (fun γ => γ t) ≤ C • μ) + (hD : MemLp (fun γ : C(Time, X) => dist (γ 0) (γ 1)) 2 π) + (q g : SobolevSpace μ hQ) {a R A ε η : ℝ} + (ha : 0 < a) (hR : 0 ≤ R) (hε : 0 < ε) (hη : 0 ≤ η) + (hlen : ∀ᵐ γ ∂π, dist (γ 0) (γ 1) ≤ a * R) + (hcost : (∫ γ, dist (γ 0) (γ 1) ^ 2 ∂π) = a ^ 2 * A) + (hdec : (∫ γ, SobolevSpace.toLp μ hQ q (γ 0) - + SobolevSpace.toLp μ hQ q (γ 1) ∂π) = (a - a ^ 2 / 2) * A) + (hclose : ∀ t : Time, + ‖testPlanPullback μ π hC hc t (SobolevSpace.minimalSlope μ hQ (q + ε • g)) - + testPlanPullback μ π hC hc 0 (SobolevSpace.minimalSlope μ hQ (q + ε • g))‖ ≤ η) : + ((1 - a / 2) * A - + (A + weightedGradientSquare μ hQ (π.map (fun γ => γ 0)) (q + ε • g)) / 2 - R * η) / ε ≤ + (∫ γ, SobolevSpace.toLp μ hQ g (γ 1) - SobolevSpace.toLp μ hQ g (γ 0) ∂π) / a := by + let w := q + ε • g + let G := SobolevSpace.minimalSlope μ hQ w + let E := weightedGradientSquare μ hQ (π.map (fun γ => γ 0)) w + let J := ∫ γ, dist (γ 0) (γ 1) * G (γ 0) ∂π + have hi (v : SobolevSpace μ hQ) (t : Time) : + Integrable (fun γ : C(Time, X) => SobolevSpace.toLp μ hQ v (γ t)) π := + (compressionPullback_memLp μ π _ (measurable_path_eval t) hC (hc t) + (SobolevSpace.toLp μ hQ v)).integrable (by norm_num) + have hrep (t : Time) : ∀ᵐ γ ∂π, SobolevSpace.toLp μ hQ w (γ t) = + SobolevSpace.toLp μ hQ q (γ t) + ε * SobolevSpace.toLp μ hQ g (γ t) := by + apply ae_of_ae_map (measurable_path_eval t).aemeasurable + (p := fun x => SobolevSpace.toLp μ hQ w x = + SobolevSpace.toLp μ hQ q x + ε * SobolevSpace.toLp μ hQ g x) + apply (Measure.absolutelyContinuous_of_le_smul (hc t)).ae_le + have he : SobolevSpace.toLp μ hQ w = + SobolevSpace.toLp μ hQ q + ε • SobolevSpace.toLp μ hQ g := by simp [w] + rw [he] + filter_upwards [Lp.coeFn_add (SobolevSpace.toLp μ hQ q) (ε • SobolevSpace.toLp μ hQ g), + Lp.coeFn_smul ε (SobolevSpace.toLp μ hQ g)] with x hx hs + simp only [hx, Pi.add_apply, hs, Pi.smul_apply, smul_eq_mul] + have hpert : (a - a ^ 2 / 2) * A ≤ + ε * (∫ γ, SobolevSpace.toLp μ hQ g (γ 1) - SobolevSpace.toLp μ hQ g (γ 0) ∂π) + + ∫ γ, |SobolevSpace.toLp μ hQ w (γ 1) - SobolevSpace.toLp μ hQ w (γ 0)| ∂π := by + have hig : Integrable (fun γ : C(Time, X) => ε * + (SobolevSpace.toLp μ hQ g (γ 1) - SobolevSpace.toLp μ hQ g (γ 0))) π := + ((hi g 1).sub (hi g 0)).const_mul ε + have hiw : Integrable (fun γ : C(Time, X) => + |SobolevSpace.toLp μ hQ w (γ 1) - SobolevSpace.toLp μ hQ w (γ 0)|) π := + ((hi w 1).sub (hi w 0)).abs + rw [← hdec, ← integral_const_mul, ← integral_add hig hiw] + apply integral_mono_ae ((hi q 0).sub (hi q 1)) + ((((hi g 1).sub (hi g 0)).const_mul ε).add (((hi w 1).sub (hi w 0)).abs)) + filter_upwards [hrep 0, hrep 1] with γ h0 h1 + simp only [Pi.add_apply, Pi.sub_apply] + rw [h0, h1] + linarith [neg_le_abs ((SobolevSpace.toLp μ hQ q (γ 1) + ε * SobolevSpace.toLp μ hQ g (γ 1)) - + (SobolevSpace.toLp μ hQ q (γ 0) + ε * SobolevSpace.toLp μ hQ g (γ 0)))] + have habs := short_plan_absolute_increment_le μ π hg hC hc hD + (SobolevSpace.minimalSlope_isRelaxed μ hQ w) (mul_nonneg ha.le hR) hη hlen hclose + have hiG : MemLp (fun γ : C(Time, X) => G (γ 0)) 2 π := + compressionPullback_memLp μ π _ (measurable_path_eval 0) hC (hc 0) G + have hiD2 := hD.integrable_sq + have hiG2 := hiG.integrable_sq + have hEmap : E = ∫ γ : C(Time, X), G (γ 0) ^ 2 ∂π := by + exact integral_map (measurable_path_eval 0).aemeasurable + (((Lp.stronglyMeasurable G).pow 2).aestronglyMeasurable) + have hJ : J ≤ a * (A + E) / 2 := by + have hh := integral_mono ((hD.integrable_mul hiG).const_mul (2 * a)) + (hiD2.add (hiG2.const_mul (a ^ 2))) (fun γ => show + 2 * a * (dist (γ 0) (γ 1) * G (γ 0)) ≤ + dist (γ 0) (γ 1) ^ 2 + a ^ 2 * G (γ 0) ^ 2 by + nlinarith only [sq_nonneg (dist (γ 0) (γ 1) - a * G (γ 0))]) + simp only [integral_const_mul, integral_add hiD2 (hiG2.const_mul (a ^ 2)), Pi.add_apply] at hh + rw [hcost, ← hEmap] at hh + change 2 * a * J ≤ a ^ 2 * A + a ^ 2 * E at hh + apply (mul_le_mul_iff_of_pos_left (show 0 < 2 * a by positivity)).mp + nlinarith + apply (div_le_div_iff₀ hε ha).mpr + change ((1 - a / 2) * A - (A + E) / 2 - R * η) * a ≤ _ + change (∫ γ, |SobolevSpace.toLp μ hQ w (γ 1) - SobolevSpace.toLp μ hQ w (γ 0)| ∂π) ≤ + J + a * R * η at habs + nlinarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeProfile.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d6fd3b19342911b0305a4c48669177c74b02ca8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeProfile.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.RCD.Harmonic.RadialBallComparison +import OAI.Geometry.RCD.Coordinates.VolumeProfileRegularity +import OAI.Geometry.RCD.Metric.NonnegativeVolumeComparison + +namespace OAI + +/-! # A continuous radial comparison profile directly from CD + +Continuity of the radial profile gives null spheres directly from the +curvature-dimension condition, before using integrated volume comparison. +-/ + +open Set Metric MeasureTheory +open scoped ENNReal + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem FullCD.hyperbolic_radial_ballVolumeComparison + (μ : Measure X) [SigmaFinite μ] {K : ℝ} {n : ℕ} (hcd : FullCD μ K n) + (hpos : ∀ x : X, ∀ r : ℝ, 0 < r → 0 < μ (ball x r)) + (hfin : ∀ s : Set X, Bornology.IsBounded s → μ s < ∞) + (hn : 2 ≤ n) (hK : K < 0) : + BallVolumeComparison μ (fun r => + r * Real.sinh (r * Real.sqrt (-K / ((n : ℝ) - 1))) ^ (n - 1)) := by + intro p r R hr hrR + let a := Real.sqrt (-K / ((n : ℝ) - 1)) + have hn1 : (1 : ℝ) < n := by exact_mod_cast (show 1 < n by omega) + have ha : 0 < a := Real.sqrt_pos.mpr (div_pos (neg_pos.mpr hK) (sub_pos.mpr hn1)) + have hR : 0 < R := hr.trans_le hrR + by_cases heq : r = R + · simp only [heq, le_refl] + have hrR' : r < R := lt_of_le_of_ne hrR heq + have hq : 0 < r / R := div_pos hr hR + have hq1 : r / R < 1 := (div_lt_one hR).mpr hrR' + have h := hcd.radial_ball_ratio μ hpos hfin hn hK p hr hrR + rw [tau_nat_power hn hq hq1, sigma_neg_eq hK hn1 hR] at h + have hh := ENNReal.toReal_mono (hfin (ball p r) isBounded_ball).ne h + have hratio : 0 ≤ Real.sinh ((r / R) * R * a) / Real.sinh (R * a) := by + exact div_nonneg (Real.sinh_pos_iff.mpr (mul_pos (mul_pos hq hR) ha)).le + (Real.sinh_pos_iff.mpr (mul_pos hR ha)).le + rw [ENNReal.toReal_mul, ENNReal.toReal_mul, ENNReal.toReal_pow, + ENNReal.toReal_ofReal hq.le, ENNReal.toReal_ofReal hratio] at hh + rw [div_mul_cancel₀ r hR.ne'] at hh + have hsR : 0 < Real.sinh (R * a) := Real.sinh_pos_iff.mpr (mul_pos hR ha) + change (r / R) * (Real.sinh (r * a) / Real.sinh (R * a)) ^ (n - 1) * + μ.real (ball p R) ≤ μ.real (ball p r) at hh + change μ.real (ball p R) * (r * Real.sinh (r * a) ^ (n - 1)) ≤ + μ.real (ball p r) * (R * Real.sinh (R * a) ^ (n - 1)) + calc + μ.real (ball p R) * (r * Real.sinh (r * a) ^ (n - 1)) = + ((r / R) * (Real.sinh (r * a) / Real.sinh (R * a)) ^ (n - 1) * + μ.real (ball p R)) * (R * Real.sinh (R * a) ^ (n - 1)) := by + rw [div_pow] + field_simp + _ ≤ _ := mul_le_mul_of_nonneg_right hh (mul_nonneg hR.le (pow_nonneg hsR.le _)) + +variable [ProperSpace X] + +/-- Every positive-radius sphere is null, without assuming model +Bishop--Gromov in advance. -/ +theorem NoncollapsedRCD.sphere_null {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) {r : ℝ} (hr : 0 < r) : + hausdorff n X (sphere p r) = 0 := by + let := hX.separable + let := locallyFinite_of_finiteOnBounded (hausdorff n X) hX.finiteOnBounded + by_cases hK : 0 ≤ K + · exact sphere_measure_zero_of_comparison (hX.flat_ballVolumeComparison hn hK) + (continuous_id.pow n) p hr (pow_pos hr _) + · have hKneg : K < 0 := lt_of_not_ge hK + have hn1 : (1 : ℝ) < n := by exact_mod_cast (show 1 < n by omega) + have ha : 0 < Real.sqrt (-K / ((n : ℝ) - 1)) := + Real.sqrt_pos.mpr (div_pos (neg_pos.mpr hKneg) (sub_pos.mpr hn1)) + apply sphere_measure_zero_of_comparison + (hX.cd.hyperbolic_radial_ballVolumeComparison (hausdorff n X) hX.fullSupport + hX.finiteOnBounded hn hKneg) + · fun_prop + · exact hr + · exact mul_pos hr (pow_pos (Real.sinh_pos_iff.mpr (mul_pos hr ha)) _) + +theorem NoncollapsedRCD.closedBall_measure_eq_ball {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) {r : ℝ} (hr : 0 < r) : + hausdorff n X (closedBall p r) = hausdorff n X (ball p r) := by + have hz := hX.sphere_null hn p hr + rw [← closedBall_sdiff_ball, measure_sdiff ball_subset_closedBall + measurableSet_ball.nullMeasurableSet (hX.finiteOnBounded _ isBounded_ball).ne] at hz + exact le_antisymm (tsub_eq_zero_iff_le.mp hz) (measure_mono ball_subset_closedBall) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeUnits.lean b/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..49afc5005656c83920e925fa21a26341456e58dc --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RadialVolumeUnits.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.RCD.Metric.AnnularVolume + +namespace OAI + +/-! # Fixed volume losses for the actual radial fit -/ + +namespace RegularPointCoordinates + +theorem quarter_volume_bounds {n : ℕ} {r omega V : ℝ} (hr : 0 < r) (homega : 0 < omega) + (h : |V / (omega * r ^ n) - 1| ≤ 1 / 4) : + 0 < V ∧ (3 / 4 : ℝ) * omega * r ^ n ≤ V ∧ V ≤ (5 / 4 : ℝ) * omega * r ^ n := by + have hd : 0 < omega * r ^ n := mul_pos homega (pow_pos hr _) + have hb := abs_le.mp h + have hlo : (3 / 4 : ℝ) ≤ V / (omega * r ^ n) := by linarith + have hhi : V / (omega * r ^ n) ≤ (5 / 4 : ℝ) := by linarith + have hl := (le_div_iff₀ hd).mp hlo + have hh := (div_le_iff₀ hd).mp hhi + exact ⟨by nlinarith, by nlinarith, by nlinarith⟩ + +/-- At the fixed radial testing fraction, the source normalization and +the averaging normalization differ by a dimensional constant. -/ +theorem radial_testing_volume_ratio {n : ℕ} {s omega V : ℝ} + (hs : 0 < s) (homega : 0 < omega) + (h : |V / (omega * (s / 64) ^ n) - 1| ≤ 1 / 4) : + s ^ (n : ℝ) / V ≤ (4 / (3 * omega)) * (64 : ℝ) ^ n := by + obtain ⟨hV, hlo, _⟩ := quarter_volume_bounds (by positivity : 0 < s / 64) homega h + apply (div_le_iff₀ hV).mpr + have he : (4 / (3 * omega)) * (64 : ℝ) ^ n * + ((3 / 4 : ℝ) * omega * (s / 64) ^ n) = s ^ (n : ℝ) := by + rw [Real.rpow_natCast, div_pow] + field_simp [homega.ne'] + rw [← he] + exact mul_le_mul_of_nonneg_left hlo (by positivity) + +/-- Both radius levels lie in the same quarter-error volume regime. -/ +theorem radial_fraction_volume_ratio {n : ℕ} {r theta omega V W : ℝ} + (hr : 0 < r) (htheta : 0 < theta) (homega : 0 < omega) + (hV : |V / (omega * r ^ n) - 1| ≤ 1 / 4) + (hW : |W / (omega * (theta * r) ^ n) - 1| ≤ 1 / 4) : + V / W ≤ (5 / 3 : ℝ) * (theta ^ n)⁻¹ := by + obtain ⟨_, _, hv⟩ := quarter_volume_bounds hr homega hV + obtain ⟨hw0, hw, _⟩ := quarter_volume_bounds (mul_pos htheta hr) homega hW + apply (div_le_iff₀ hw0).mpr + have he : (5 / 3 : ℝ) * (theta ^ n)⁻¹ * + ((3 / 4 : ℝ) * omega * (theta * r) ^ n) = (5 / 4 : ℝ) * omega * r ^ n := by + rw [mul_pow] + field_simp [htheta.ne'] + exact hv.trans (he.symm.trans_le (mul_le_mul_of_nonneg_left hw (by positivity))) + +/-- The normalized integral error has size at most s*sqrt(P), with one +fixed coefficient. This is the error inserted into the dyadic fit step. -/ +theorem radial_sqrt_error_bound {s V Q C D : ℝ} + (hs : 0 ≤ s) (hQ : 0 ≤ Q) (hC : 0 ≤ C) (hD : 0 ≤ D) + {N : ℝ} (hratio : N / V ≤ D) : + Real.sqrt (V⁻¹ * (C * s ^ 2 * (N * Q))) ≤ s * Real.sqrt (C * D) * Real.sqrt Q := by + apply (Real.sqrt_le_iff).mpr + constructor + · positivity + · have hh := mul_le_mul_of_nonneg_left hratio (by positivity : 0 ≤ C * s ^ 2 * Q) + rw [mul_pow, mul_pow, Real.sq_sqrt (mul_nonneg hC hD), Real.sq_sqrt hQ] + convert hh using 1 <;> ring + +/-- Dividing the fitted values by their own radii gives the strict +square-root contraction factor. The 64 is the fixed testing fraction. -/ +theorem radial_fit_rescale {s theta Lambda A Q E F : ℝ} + (hs : 0 < s) (htheta : 0 < theta) + (hstep : F ≤ (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) * + s * A * Real.sqrt Q + (1 / 2 : ℝ) * theta * Real.sqrt theta * E) : + F / (theta * (s / 64)) ≤ (1 / 2 : ℝ) * Real.sqrt theta * (E / (s / 64)) + + (64 / theta) * (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) * A * Real.sqrt Q := by + apply (div_le_div_of_nonneg_right hstep (mul_pos htheta (by positivity)).le).trans_eq + field_simp [hs.ne', htheta.ne'] + ring + +/-- The actual normalized volume bound removes all scale dependence from +the affine-fit error. This is the scalar recurrence used by the envelope. -/ +theorem radial_fit_natural_units {s theta V Lambda A D N Q E F W : ℝ} + (hs : 0 < s) (htheta : 0 < theta) (hV : 0 ≤ V) (hQ : 0 ≤ Q) + (hA : 0 ≤ A) (hD : 0 ≤ D) (hVL : V ≤ Lambda) (hratio : N / W ≤ D) + (hstep : F ≤ (V + (1 / 2 : ℝ) * theta * Real.sqrt theta) * + Real.sqrt (W⁻¹ * (A * s ^ 2 * (N * Q))) + + (1 / 2 : ℝ) * theta * Real.sqrt theta * E) : + F / (theta * (s / 64)) ≤ (1 / 2 : ℝ) * Real.sqrt theta * (E / (s / 64)) + + (64 / theta) * (Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) * + Real.sqrt (A * D) * Real.sqrt Q := by + apply radial_fit_rescale hs htheta + have hroot := radial_sqrt_error_bound hs.le hQ hA hD hratio + have hterm := mul_le_mul (add_le_add hVL (le_refl _)) hroot (Real.sqrt_nonneg _) + (by have := hV.trans hVL; positivity : 0 ≤ Lambda + (1 / 2 : ℝ) * theta * Real.sqrt theta) + exact hstep.trans (by nlinarith [hterm]) + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RecoveryHarmonicSwap.lean b/lean/OAI/Geometry/RCD/Harmonic/RecoveryHarmonicSwap.lean new file mode 100644 index 0000000000000000000000000000000000000000..02a8137b2c930e253c9289e48ba0dc3d9e49b3fa --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RecoveryHarmonicSwap.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Sobolev.HarmonicCutoffSwap +import OAI.Geometry.RCD.Metric.RescaledCompactRepresentative + +namespace OAI + +/-! # The actual compact Dirichlet recovery is an admissible product test -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.recovery_harmonic_swap {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2≤n) + (f w q : SobolevSpace (hausdorff n X) hX.quadratic) + (p : X) {r c S Q : ℝ} (hr : 0 hx (fun hc => hy + ((ball_subset_ball (mul_le_mul_of_nonneg_right hcS.le hr.le)) hc)) + have hleft : (∫ x in ball p (S*r), SobolevSpace.toLp μ hX.quadratic q x* + localGamma μ hX.quadratic f w x ∂μ)= + ∫ x, v x*localGamma μ hX.quadratic f w x ∂μ := by + rw [setIntegral_eq_integral_of_ae_compl_eq_zero (hout.mono fun x hx hy => by rw [hx hy,zero_mul])] + exact integral_congr_ae (hrep.mono fun x hx => congrArg (fun t : ℝ => t*localGamma μ hX.quadratic f w x) hx) + have hright : (∫ x in ball p (S*r), SobolevSpace.toLp μ hX.quadratic f x* + localGamma μ hX.quadratic q w x ∂μ)= + ∫ x, SobolevSpace.toLp μ hX.quadratic f x*localGamma μ hX.quadratic q w x ∂μ := by + apply setIntegral_eq_integral_of_ae_compl_eq_zero + filter_upwards [hout,localGamma_zero_on_level μ hX.quadratic q w 0] with x hx hγ hy + rw [hγ (hx hy),mul_zero] + rw [hleft,hright] + exact hswap + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ReplaceHarmonicSequence.lean b/lean/OAI/Geometry/RCD/Harmonic/ReplaceHarmonicSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a394628d993f4bb1147e192b62456c6ce32e37d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ReplaceHarmonicSequence.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Harmonic.RadialCompactnessSequence +import OAI.Geometry.RCD.Sobolev.RescaledHarmonicEnergy + +namespace OAI + +/-! # Replacing the harmonic member of a fixed geometric sequence -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [ProperSpace X] in +/-- The radial and coordinate convergence data remain unchanged when +an arbitrary normalized harmonic sequence replaces the harmonic member. +The local energy bound follows from Jiang's published interior estimate. -/ +def RadialCompactnessSequence.with_harmonic {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} {S : ℝ} (q : RadialCompactnessSequence hX S) + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) (hS : 0 < S) + (w : ℕ → SobolevSpace (hausdorff n X) hX.quadratic) + (hw : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (q.center i) (S * q.radius i)) (w i)) + (hwnorm : ∀ i, ‖normalizeLocalL2 (hausdorff n X) (ball (q.center i) (S * q.radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (q.center i) (S * q.radius i)) (w i))‖ ≤ 1) : + RadialCompactnessSequence hX S where + center := q.center + radius := q.radius + error := q.error + coordinates := q.coordinates + coordinateValues := q.coordinateValues + harmonicFunction := w + radialFunction := q.radialFunction + radius_pos := q.radius_pos + curvature := q.curvature + error_pos := q.error_pos + error_zero := q.error_zero + measured := q.measured + representative := q.representative + harmonic := hw + outer_norm := hwnorm + interior_energy := by + intro ρ hρ hρS + obtain ⟨C, hC, hb⟩ := hgradient.rescaled_interior_energy hn hS hρ hρS + exact ⟨C, hC, fun i => hb (q.center i) (q.radius i) (q.radius_pos i) + (q.curvature i) (w i) (hw i) (hwnorm i)⟩ + radial_bounds := q.radial_bounds + quadratic_limit := q.quadratic_limit + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/RescaledRadialFunction.lean b/lean/OAI/Geometry/RCD/Harmonic/RescaledRadialFunction.lean new file mode 100644 index 0000000000000000000000000000000000000000..42aef3db0973d5346535775ce5bd6dd8dc5b11bd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/RescaledRadialFunction.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.RCD.Sobolev.ConstantLaplacianBochnerInput +import OAI.Geometry.RCD.Harmonic.LocalRadialDerivative +import OAI.Geometry.RCD.Coordinates.NormalizedPairing + +namespace OAI + +/-! # Exact radial and amplitude rescaling in the compactness argument -/ + +open Set MeasureTheory +open scoped ENNReal BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] in +/-- A constant source rescales in the original weak equation. -/ +theorem rescaled_radial_laplacian (Ω : Set X) (f : SobolevSpace μ hQ) {r c : ℝ} + (hf : IsConstantLaplacianOn μ hQ Ω f c) : + IsConstantLaplacianOn μ hQ Ω ((r ^ 2)⁻¹ • f) (c / r ^ 2) := by + simpa only [div_eq_mul_inv, mul_comm c] using hf.smul μ hQ ((r ^ 2)⁻¹) + +omit [BorelSpace X] [ProperSpace X] in +/-- The physical quadratic value bound becomes a dimensionless bound. -/ +theorem rescaled_radial_value (Ω : Set X) (f : SobolevSpace μ hQ) {r A : ℝ} + (hr : 0 < r) + (hf : ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ f x| ≤ A * r ^ 2) : + ∀ᵐ x ∂μ.restrict Ω, |SobolevSpace.toLp μ hQ ((r ^ 2)⁻¹ • f) x| ≤ A := by + filter_upwards [hf, ae_restrict_of_ae + (Lp.coeFn_smul ((r ^ 2)⁻¹) (SobolevSpace.toLp μ hQ f))] with x hx hs + rw [map_smul, hs, Pi.smul_apply, smul_eq_mul, abs_mul, + abs_of_pos (inv_pos.mpr (sq_pos_of_pos hr))] + calc + _ ≤ (r ^ 2)⁻¹ * (A * r ^ 2) := + mul_le_mul_of_nonneg_left hx (inv_nonneg.mpr (sq_nonneg _)) + _ = A := by field_simp + +/-- The same radial rescaling has uniformly bounded dimensionless energy. -/ +theorem rescaled_radial_energy (Ω : Set X) (f : SobolevSpace μ hQ) {r B : ℝ} + (hr : 0 < r) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B * r ^ 2) : + ∀ᵐ x ∂μ.restrict Ω, + r ^ 2 * localGamma μ hQ ((r ^ 2)⁻¹ • f) ((r ^ 2)⁻¹ • f) x ≤ B := by + filter_upwards [hf, ae_restrict_of_ae + (localGamma_smul_left μ hQ ((r ^ 2)⁻¹) f ((r ^ 2)⁻¹ • f)), + ae_restrict_of_ae (localGamma_smul_right μ hQ ((r ^ 2)⁻¹) f f)] with x hx hl hr' + rw [hl, hr'] + have heq : r ^ 2 * ((r ^ 2)⁻¹ * ((r ^ 2)⁻¹ * localGamma μ hQ f f x)) = + (r ^ 2)⁻¹ * localGamma μ hQ f f x := by field_simp + rw [heq] + calc + _ ≤ (r ^ 2)⁻¹ * (B * r ^ 2) := + mul_le_mul_of_nonneg_left hx (inv_nonneg.mpr (sq_nonneg _)) + _ = B := by field_simp + +/-- The derivative with respect to the rescaled radial function, multiplied +by the metric scaling factor, is exactly the original radial derivative. -/ +theorem rescaled_radial_derivative (Ω : Set X) (f w : SobolevSpace μ hQ) {r B B' : ℝ} + (hr : 0 < r) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hf' : ∀ᵐ x ∂μ.restrict Ω, + localGamma μ hQ ((r ^ 2)⁻¹ • f) ((r ^ 2)⁻¹ • f) x ≤ B') : + r ^ 2 • localRadialDerivative μ hQ Ω ((r ^ 2)⁻¹ • f) hf' w = + localRadialDerivative μ hQ Ω f hf w := by + apply Lp.ext + filter_upwards [Lp.coeFn_smul (r ^ 2) + (localRadialDerivative μ hQ Ω ((r ^ 2)⁻¹ • f) hf' w), + localRadialDerivative_representative μ hQ Ω ((r ^ 2)⁻¹ • f) w hf', + localRadialDerivative_representative μ hQ Ω f w hf, + ae_restrict_of_ae (localGamma_smul_left μ hQ ((r ^ 2)⁻¹) f w)] with x hs hd hd' hg + simp only [hs, Pi.smul_apply, smul_eq_mul, hd, hd', hg] + field_simp + +/-- Both changes of scale in the projected Euler equation are exact. +The coefficient and forcing scalings are made explicit. -/ +theorem rescaled_projected_euler_identity {n : ℕ} (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f w e : SobolevSpace μ hQ) (u : Fin n → SobolevSpace μ hQ) + (b : Fin n → ℝ) (k a : ℝ) {r B B' : ℝ} (hr : 0 < r) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hf' : ∀ᵐ x ∂μ.restrict Ω, + localGamma μ hQ ((r ^ 2)⁻¹ • f) ((r ^ 2)⁻¹ • f) x ≤ B') + (hid : localRadialDerivative μ hQ Ω f hf w = + SobolevSpace.restrictLp μ hQ Ω w + (∑ j, b j • SobolevSpace.restrictLp μ hQ Ω (u j)) + + k • restrictedOne μ Ω hfin + SobolevSpace.restrictLp μ hQ Ω e) : + r ^ 2 • localRadialDerivative μ hQ Ω ((r ^ 2)⁻¹ • f) hf' (a • w) = + SobolevSpace.restrictLp μ hQ Ω (a • w) + + (∑ j, (a * b j) • SobolevSpace.restrictLp μ hQ Ω (u j)) + + (a * k) • restrictedOne μ Ω hfin + SobolevSpace.restrictLp μ hQ Ω (a • e) := by + rw [rescaled_radial_derivative μ hQ Ω f (a • w) hr hf hf', map_smul, hid] + simp only [smul_add, Finset.smul_sum, smul_smul, map_smul] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ResidualCollapse.lean b/lean/OAI/Geometry/RCD/Harmonic/ResidualCollapse.lean new file mode 100644 index 0000000000000000000000000000000000000000..081d2373c53abc5865970fc10b8f3f9f7fafe597 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ResidualCollapse.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.RCD.Harmonic.ResidualSamplingError + +namespace OAI + +/-! # Collapse of the residual factor from sharp dimensional packing + +This is a consequence of an actual product approximation. It does not +assume that the source is already close to Euclidean space, nor that the +residual metric factor is geodesic. +-/ + +open Set Metric +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.residual_factor_small {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) {a : ℝ} (ha : 0 < a) : + ∃ ε : ℝ, 0 < ε ∧ ∀ (Z : Type*) (dZ : MetricSpace Z), letI := dZ + ∀ (p : X) (z₀ : Z) (ρ : ℝ), 0 < ρ → -1 ≤ K*(4*ρ)^2 → + ∀ f : X → WithLp 2 (Euclidean n × Z), + IsPointedApproximation p (WithLp.toLp 2 (0,z₀)) ρ 1 ε f → + ∀ z₁ : Z, dist z₀ z₁ ≤ 1/4 → dist z₀ z₁ ≤ a := by + by_cases ha4 : 1/4 ≤ a + · exact ⟨1,by norm_num,fun _ _ _ _ _ _ _ _ _ _ hz => hz.trans ha4⟩ + have ha4' : a < 1/4 := lt_of_not_ge ha4 + have hn' : (1:ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) + have hn0 : (n:ℝ) ≠ 0 := by linarith + let C := Real.cosh 1^(n-1)*8^n + let q := a/(8*(n:ℝ)) + have hq : 0 < q := by dsimp [q]; positivity + obtain ⟨m,hm⟩ := exists_nat_gt (max 0 (C/q^n)) + have hm' : 0 < (m:ℝ) := lt_of_le_of_lt (le_max_left _ _) hm + have hmN : 0 < m := by exact_mod_cast hm' + have hmC : C < (m:ℝ)*q^n := by + apply (div_lt_iff₀ (pow_pos hq n)).mp + exact lt_of_le_of_lt (le_max_right _ _) hm + let b := a/(4*(n:ℝ)*m) + have hb : 0 < b := by dsimp [b]; positivity + have hb2 : b ≤ 2 := by + have hm1 : (1:ℝ) ≤ m := by exact_mod_cast hmN + apply (div_le_iff₀ (by positivity : 0 < 4*(n:ℝ)*m)).mpr + nlinarith + obtain ⟨ε,he,hec,hes⟩ := exists_residual_sampling_accuracy hmN ha + (lt_min (by norm_num : (0:ℝ)<1/16) (div_pos hb (by norm_num : (0:ℝ)<6))) + have he16 : ε ≤ 1/16 := hec.trans (min_le_left _ _) + have heb : ε ≤ b/6 := hec.trans (min_le_right _ _) + refine ⟨ε,he,?_⟩ + intro Z dZ p z₀ ρ hρ hcurv f hf z₁ hD + by_contra hsmall + have haD : a < dist z₀ z₁ := lt_of_not_ge hsmall + have hsample : 3*ε/(m:ℝ)+ε+2*Real.sqrt (14*ε*(dist z₀ z₁+7*ε)) ≤ + dist z₀ z₁/(2*m) := + ((residualSamplingError_bounds he.le hD).trans hes).trans + (div_le_div_of_nonneg_right haD.le (by positivity)) + obtain ⟨z,hzD,hzsep⟩ := pointed_vertical_samples hX.geodesic hρ he.le hmN hf + (by linarith) hsample + have hbsep : b ≤ dist z₀ z₁/(2*m) := by + calc + b ≤ a/(2*m) := div_le_div_of_nonneg_left ha.le (by positivity) (by nlinarith) + _ ≤ _ := div_le_div_of_nonneg_right haD.le (by positivity) + have hroom : (n:ℝ)*m*b+(dist z₀ z₁+5*ε) ≤ 1-ε := by + have heq : (n:ℝ)*m*b=a/4 := by dsimp only [b]; field_simp + rw [heq] + linarith + have hpack := hX.product_grid_obstruction hn hρ hb hb2 heb hcurv z + (fun i j hij => hbsep.trans (hzsep hij)) hzD hroom hf + have hform : (m:ℝ)^(n+1)*(b/2)^n=(m:ℝ)*q^n := by + have heq : b/2=q/(m:ℝ) := by dsimp only [b,q]; field_simp; ring + rw [heq,div_pow,pow_succ] + field_simp + rw [hform] at hpack + exact (not_le_of_gt hmC) hpack + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ResidualOuterBound.lean b/lean/OAI/Geometry/RCD/Harmonic/ResidualOuterBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..5db72fc1e3a9e4bd45e329fe75f7808b7c79a8ba --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ResidualOuterBound.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.RCD.Transport.RadialTransportForcing +import OAI.Geometry.RCD.Harmonic.AffineForcingBound + +namespace OAI + +/-! # A uniform outer norm for an unnormalized projected residual -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +omit [BorelSpace X] [ProperSpace X] [IsFiniteMeasureOnCompacts μ] in +theorem restrictLp_norm_sq (Ω : Set X) (w : SobolevSpace μ hQ) : + ‖SobolevSpace.restrictLp μ hQ Ω w‖ ^ 2 = + ∫ x in Ω, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ := by + rw [l2_norm_sq_eq_integral] + exact integral_congr_ae ((SobolevSpace.restrictLp_coe μ hQ Ω w).pow_const 2) + +/-- The larger-ball bound has a constant independent of both the small +inner residual norm and the source error. This is the estimate needed +before dividing the residual by its norm in the compactness argument. -/ +theorem residual_outer_bound {n : ℕ} {R a F E : ℝ} (hR : 2 ≤ R) + (ha : 0 ≤ a) (han : a ≤ (n : ℝ) + 1) (hF : 0 ≤ F) + (C : ℝ≥0) : + ∃ T : ℝ, 0 ≤ T ∧ ∀ (z : X) (f w q : SobolevSpace μ hQ) (σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn μ hQ (ball z (4 * R)) f a → + ∀ {B : ℝ} (hf : ∀ᵐ x ∂μ.restrict (ball z (4 * R)), localGamma μ hQ f f x ≤ B), + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ w x| ≤ C) → + ∀ e : X → ℝ, MemLp e 2 μ → + localRadialDerivative μ hQ (ball z (4 * R)) f hf w = + SobolevSpace.restrictLp μ hQ (ball z (4 * R)) (w + q) → + localGamma μ hQ f (inwardSobolev μ hQ z (3 * R)) =ᵐ[μ.restrict (ball z (4 * R))] + (fun x => e x - dist z x) → + μ (sphere z R) = 0 → + ‖SobolevSpace.restrictLp μ hQ (ball z (4 * R)) q‖ ≤ + F * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) → + (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ E ^ 2 * σ ^ 2 → + ‖SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w‖ ≤ + T * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) := by + let β := transportCutoffExponent n + let D := (R ^ (-β) - (3 * R) ^ (-β)) / β + let Q := R ^ (-(β + 1)) + let m := ((2 * R) ^ (-β) - (3 * R) ^ (-β)) / β + have hβ : 0 < β := transportCutoffExponent_pos n + have hR0 : 0 < R := by linarith + have hD : 0 ≤ D := le_of_lt (div_pos (sub_pos.mpr + (Real.rpow_lt_rpow_of_neg hR0 (by linarith : R < 3 * R) (neg_neg_of_pos hβ))) hβ) + have hQpos : 0 ≤ Q := Real.rpow_nonneg hR0.le _ + have hm : 0 < m := div_pos (sub_pos.mpr + (Real.rpow_lt_rpow_of_neg (by positivity : 0 < 2 * R) + (by linarith : 2 * R < 3 * R) (neg_neg_of_pos hβ))) hβ + let A₀ := 1 + 2 * ((a + 2) * D + D / 4) / m + let B₀ := 8 * D / m + let C₀ := 2 * (C : ℝ) ^ 2 * Q / m + have hA₀ : 0 ≤ A₀ := by dsimp only [A₀]; positivity + have hB₀ : 0 ≤ B₀ := by dsimp only [B₀]; positivity + have hC₀ : 0 ≤ C₀ := by dsimp only [C₀]; positivity + let T := Real.sqrt (A₀ + B₀ * F ^ 2 + C₀ * E ^ 2) + have hT : 0 ≤ T := Real.sqrt_nonneg _ + have hTsq : T ^ 2 = A₀ + B₀ * F ^ 2 + C₀ * E ^ 2 := + Real.sq_sqrt (by positivity) + refine ⟨T, hT, ?_⟩ + intro z f w q σ hσ hlap B hf hw e he heuler hradial hsphere hq herr + let α := ‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + have hα : 0 ≤ α := norm_nonneg _ + have hαsum : α ^ 2 ≤ (α + σ) ^ 2 := by nlinarith + have hσsum : σ ^ 2 ≤ (α + σ) ^ 2 := by nlinarith + have hq2 : (∫ x in ball z (4 * R), (SobolevSpace.toLp μ hQ q x) ^ 2 ∂μ) ≤ + F ^ 2 * (α + σ) ^ 2 := by + rw [← restrictLp_norm_sq μ hQ] + simpa only [mul_pow] using (sq_le_sq₀ (norm_nonneg _) + (mul_nonneg hF (add_nonneg hα hσ))).mpr hq + have htrans := radial_transport_sobolev_forcing μ hQ hR ha han z f w q hlap hf C hw e he + heuler hradial hsphere + change (∫ x in ball z (2 * R), (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) ≤ + A₀ * (∫ x in ball z R, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) + + B₀ * (∫ x in ball z (4 * R), (SobolevSpace.toLp μ hQ q x) ^ 2 ∂μ) + + C₀ * (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) at htrans + rw [← restrictLp_norm_sq μ hQ (ball z R) w] at htrans + have hbound := htrans.trans (add_le_add + (add_le_add (mul_le_mul_of_nonneg_left hαsum hA₀) (mul_le_mul_of_nonneg_left hq2 hB₀)) + (mul_le_mul_of_nonneg_left (herr.trans (mul_le_mul_of_nonneg_left hσsum (sq_nonneg E))) hC₀)) + rw [← restrictLp_norm_sq μ hQ (ball z (2 * R)) w] at hbound + have hfinal : ‖SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w‖ ^ 2 ≤ + (T * (α + σ)) ^ 2 := by + calc + _ ≤ _ := hbound + _ = _ := by rw [mul_pow, hTsq]; ring + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hT (add_nonneg hα hσ))).mp hfinal + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ResidualSamplingError.lean b/lean/OAI/Geometry/RCD/Harmonic/ResidualSamplingError.lean new file mode 100644 index 0000000000000000000000000000000000000000..85d397e3a0504b89dc97d14cb5aa2c2672e6a8f1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ResidualSamplingError.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Transport.GeodesicProductSamples + +namespace OAI + +/-! # Choosing the finite sampling accuracy + +The number of samples is fixed first. Only then is the product +approximation error chosen. The needed error has a square-root rate. +-/ + +open Filter Topology +noncomputable section +namespace RegularPointCoordinates + +def residualSamplingError (m : ℕ) (ε : ℝ) : ℝ := + 3*ε/(m:ℝ)+ε+2*Real.sqrt (14*ε*((1/4:ℝ)+7*ε)) + +theorem residualSamplingError_tendsto (m : ℕ) : + Tendsto (residualSamplingError m) (𝓝 0) (𝓝 0) := by + have hc : Continuous (residualSamplingError m) := by unfold residualSamplingError; fun_prop + simpa [residualSamplingError] using hc.continuousAt.tendsto (x := (0:ℝ)) + +theorem exists_residual_sampling_accuracy {m : ℕ} (hm : 0 < m) {a c : ℝ} + (ha : 0 < a) (hc : 0 < c) : + ∃ ε : ℝ, 0 < ε ∧ ε ≤ c ∧ residualSamplingError m ε ≤ a/(2*m) := by + have ht : 0 < a/(2*(m:ℝ)) := by positivity + have he := (residualSamplingError_tendsto m).eventually (gt_mem_nhds ht) + obtain ⟨d,hd,hdmem⟩ := Metric.mem_nhds_iff.mp he + refine ⟨min d c/2,by positivity,?_,?_⟩ + · have hmc := min_le_right d c + linarith [lt_min hd hc] + · apply le_of_lt + apply hdmem + rw [Metric.mem_ball,dist_zero_right,Real.norm_eq_abs, + abs_of_pos (by positivity : 0 < min d c/2)] + have hmd := min_le_left d c + linarith [lt_min hd hc] + +theorem residualSamplingError_bounds {m : ℕ} {ε D : ℝ} + (he : 0 ≤ ε) (hD : D ≤ 1/4) : + 3*ε/(m:ℝ)+ε+2*Real.sqrt (14*ε*(D+7*ε)) ≤ residualSamplingError m ε := by + unfold residualSamplingError + gcongr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledAffineMeanLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledAffineMeanLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1ea98a8e574cab7a387a6b22c725caacbf0a93b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledAffineMeanLimit.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.RCD.Harmonic.QuantitativeAffineMean + +namespace OAI + +/-! # Affinity of normalized means from vanishing scaled second variation -/ + +open Set Filter MeasureTheory +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem scaled_affine_mean_limit (F H G : ℕ → ℝ → ℝ) + (r : ℕ → ℝ) (_hr : ∀ k, 0 < r k) (M : ℝ≥0) + (hLip : ∀ k, LipschitzOnWith M (fun t => F k t/r k) (Icc (0:ℝ) 1)) + (hH : ∀ k t, t∈Ioo (0:ℝ) 1 → DifferentiableAt ℝ (H k) t) + (hint : ∀ k a b, 0 < a → a ≤ b → b < 1 → + (∫ t in a..b, G k t)=deriv (H k) b-deriv (H k) a) + (hG : ∀ a b, 0 < a → a ≤ b → b < 1 → + TendstoUniformlyOn (fun k t => G k t/r k) (fun _ => 0) atTop (Icc a b)) + (hval : ∀ t∈Ioo (0:ℝ) 1, Tendsto (fun k => (F k t-H k t)/r k) atTop (𝓝 0)) + {t : ℝ} (ht : t∈Icc (0:ℝ) 1) : + Tendsto (fun k => (F k t-((1-t)*F k 0+t*F k 1))/r k) atTop (𝓝 0) := by + let F' k t := F k t/r k + let H' k t := H k t/r k + have hder (k : ℕ) (t : ℝ) (ht : t∈Ioo (0:ℝ) 1) : + DifferentiableAt ℝ (H' k) t := (hH k t ht).div_const (r k) + have hint' (k : ℕ) (a b : ℝ) (ha : 0 < a) (hab : a ≤ b) (hb : b < 1) : + (∫ t in a..b, G k t/r k)=deriv (H' k) b-deriv (H' k) a := by + rw [intervalIntegral.integral_div,hint k a b ha hab hb] + rw [show deriv (H' k) b=deriv (H k) b/r k from + ((hH k b ⟨ha.trans_le hab,hb⟩).hasDerivAt.div_const (r k)).deriv, + show deriv (H' k) a=deriv (H k) a/r k from + ((hH k a ⟨ha,hab.trans_lt hb⟩).hasDerivAt.div_const (r k)).deriv] + ring + have hval' : ∀ t∈Ioo (0:ℝ) 1, Tendsto (fun k => F' k t-H' k t) atTop (𝓝 0) := by + intro t ht + simpa only [F',H',sub_div] using hval t ht + have hchord : ∀ {a b x : ℝ}, 0 < a → a < b → b < 1 → x∈Icc a b → + Tendsto (fun k => F' k x-F' k a-((F' k b-F' k a)/(b-a))*(x-a)) atTop (𝓝 0) := by + intro a b x ha hab hb hx + apply interior_chord_errors_transfer F' H' hval' _ ha hab hb hx + intro a b x ha hab hb hx + exact interior_chord_error_tendsto_zero H' (fun k t => G k t/r k) + hder hint' hG ha hab hb hx + have hh := endpoint_chord_error_of_interior_errors F' M hLip hchord ht + convert hh using 1 + funext k + dsimp only [F'] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledForcingCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledForcingCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..01b79253e1f9ae7da24772843e132ef76d87695d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledForcingCoefficient.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.RCD.Harmonic.AffineForcingBound +import OAI.Geometry.RCD.Harmonic.ScaledHarmonicAffine + +namespace OAI + +/-! # Radius-weighted forcing coefficients before residual normalization -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The forcing coefficients are controlled by the small inner residual +and its radial derivative, rather than by the full size of the projection. -/ +theorem weighted_projected_euler_coefficient_bound {n : ℕ} (Ω : Set X) (hfin : μ Ω ≠ ∞) + (f w η e : SobolevSpace μ hQ) {B : ℝ} + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (u : Fin n → SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (ell : Euclidean n) (k R : ℝ) {H α Cg Cw E : ℝ} (hH : 0 ≤ H) + (hbound : ∀ c a, |c| + R * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 μ Ω hfin (affineCoordinateMap μ hQ u Ω hfin (c, a))‖) + (heuler : localRadialDerivative μ hQ Ω f hf w = SobolevSpace.restrictLp μ hQ Ω + (w + sobolevColumnMap μ hQ u ell + k • η + e)) + (hD : ‖normalizeLocalL2 μ Ω hfin (localRadialDerivative μ hQ Ω f hf w)‖ ≤ Cg * α) + (hw : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω w)‖ ≤ Cw * α) + (he : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω e)‖ ≤ E) : + |k| + R * ‖N.symm ell‖ ≤ H * ((Cg + Cw) * α + E) := by + have hid : affineCoordinateMap μ hQ u Ω hfin (k, ell) = + localRadialDerivative μ hQ Ω f hf w - SobolevSpace.restrictLp μ hQ Ω w - + SobolevSpace.restrictLp μ hQ Ω e := by + rw [heuler, affineCoordinateMap_apply, map_add, map_add, map_add, map_smul, + restrictLp_eq_one_of_representative μ hQ η Ω hfin hη] + abel + apply (hbound k ell).trans + apply mul_le_mul_of_nonneg_left _ hH + rw [hid] + simp only [normalizeLocalL2, smul_sub] at hD hw he ⊢ + apply le_trans ((norm_sub_le _ _).trans (add_le_add (norm_sub_le _ _) le_rfl)) + exact (add_le_add (add_le_add hD hw) he).trans_eq (by ring) + + +omit μ hQ in +/-- On the half ball, the affine forcing is bounded by the original +residual norm and its Euler error. This supplies the coefficients needed +by radial transport without assuming their smallness. -/ +theorem LocalHarmonicL2GradientInput.scaled_forcing_coefficients + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (f w η e : SobolevSpace (hausdorff n X) hX.quadratic) (B : ℝ), 0 ≤ B → + ∀ hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (R / 2)), + localGamma (hausdorff n X) hX.quadratic f f x ≤ B ^ 2, + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w → + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p (R / 2))] fun _ => (1 : ℝ)) → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n) (ell : Euclidean n) (k H V E : ℝ), + 0 ≤ H → 0 ≤ V → 0 ≤ E → + (hausdorff n X).real (ball p R) ≤ V ^ 2 * (hausdorff n X).real (ball p (R / 2)) → + (∀ c a, |c| + R * ‖N.symm a‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) → + (localRadialDerivative (hausdorff n X) hX.quadratic (ball p (R / 2)) f hf w = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (R / 2)) + (w + sobolevColumnMap (hausdorff n X) hX.quadratic u ell + k • η + e)) → + ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) e)‖ ≤ E → + |k| + R * ‖N.symm ell‖ ≤ H * + ((B * C / R + V) * ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) w)‖ + V * E) := by + obtain ⟨C, hC, hrad⟩ := hinput.radial_derivative_bound hn hκ + refine ⟨C, hC, ?_⟩ + intro p R hR hcurv f w η e B hB hf hw hη u N ell k H V E hH hV hE hvol hbound heuler he + let μ := hausdorff n X + let hQ := hX.quadratic + let α := ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p R) w)‖ + have hs : ball p (R / 2) ⊆ ball p R := ball_subset_ball (by linarith) + have hpos (r : ℝ) (hr : 0 < r) : 0 < μ.real (ball p r) := + ENNReal.toReal_pos (ne_of_gt (hX.fullSupport p r hr)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + have hrestrict (q : SobolevSpace μ hQ) (A : ℝ) (hA : 0 ≤ A) + (hq : ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p R) q)‖ ≤ A) : + ‖normalizeLocalL2 μ (ball p (R / 2)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p (R / 2)) q)‖ ≤ V * A := + normalized_fit_restrict_norm μ hQ hs _ _ (hpos R hR) (hpos (R / 2) (by linarith)) + q hV hA hvol hq + have hD : ‖normalizeLocalL2 μ (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (localRadialDerivative μ hQ (ball p (R / 2)) f hf w)‖ ≤ (B * C / R) * α := by + exact hrad p R hR hcurv f w B hB hf hw + exact weighted_projected_euler_coefficient_bound μ hQ (ball p (R / 2)) _ f w η e hf hη u N ell k R hH + hbound heuler hD (hrestrict w α (norm_nonneg _) le_rfl) (hrestrict e E hE he) + + + +omit [BorelSpace X] [ProperSpace X] in +/-- The exact-frame coefficient estimate controls the forcing on the +larger transport ball, including its constant and Sobolev error. -/ +theorem weighted_affine_forcing_norm_bound {n : ℕ} (Ω : Set X) (hfin : μ Ω ≠ ∞) + (hpos : μ Ω ≠ 0) (η e : SobolevSpace μ hQ) + (hη : SobolevSpace.toLp μ hQ η =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) + (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) (N : Euclidean n ≃L[ℝ] Euclidean n) + (ell : Euclidean n) (k : ℝ) {R L C D α s : ℝ} + (hR : 0 ≤ R) (hL : 0 ≤ L) (hD : 0 ≤ D) (hα : 0 ≤ α) + (hU : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U ell))‖ ≤ L * (R * ‖N.symm ell‖)) + (hcoeff : |k| + R * ‖N.symm ell‖ ≤ C * (α + s)) + (he : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω e)‖ ≤ D * s) : + ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (U ell + k • η + e))‖ ≤ + ((1 + L) * C + D) * (α + s) := by + have hconst : ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hQ Ω (k • η))‖ = |k| := by + rw [map_smul, restrictLp_eq_one_of_representative μ hQ η Ω hfin hη, + normalized_constant_norm μ Ω hfin hpos] + have hsum : L * (R * ‖N.symm ell‖) + |k| ≤ (1 + L) * (|k| + R * ‖N.symm ell‖) := by + nlinarith [abs_nonneg k, norm_nonneg (N.symm ell), mul_nonneg hL (abs_nonneg k), mul_nonneg hR (norm_nonneg (N.symm ell))] + have hb := hsum.trans (mul_le_mul_of_nonneg_left hcoeff (by positivity : 0 ≤ 1 + L)) + rw [map_add, map_add] + simp only [normalizeLocalL2, smul_add] at hU he hconst ⊢ + apply le_trans ((norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl)) + rw [hconst] + have hh := add_le_add (add_le_add hU (le_rfl : |k| ≤ |k|)) he + exact hh.trans (by nlinarith only [hb, mul_nonneg hD hα]) + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledGramEnvelope.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledGramEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff69378b8945ba848b085fdb133333f61fd43a88 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledGramEnvelope.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.GramSourceEstimate +import OAI.Geometry.RCD.Harmonic.HarmonicEndpointBound +import OAI.Geometry.RCD.Harmonic.HarmonicCurvatureBounds +import OAI.Geometry.RCD.Sobolev.ScaledCutoffIntegral +import OAI.Geometry.RCD.Metric.LongTimeMassSum +import OAI.Geometry.RCD.Sobolev.DyadicScalarBackground + +namespace OAI + +/-! # A radius-independent bound for the actual mean/heat discrepancy -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace NNReal ENNReal BoundedContinuousFunction + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The comparison constant is chosen before the physical radius and +harmonic data, using normalized curvature, gradient and source bounds. -/ +theorem exists_scaled_actual_gram_envelope_bound (m : ℕ) + (hg : HasCoordinateHeatBounds μ ker) (hdiff : HasGaussianHeatDifferenceBounds μ ker) + {A V W c B D Lambda : ℝ} (hA : 0 ≤ A) (hV : 0 < V) (hW : 0 ≤ W) + (hc : 0 < c) (hB : 0 ≤ B) (hD : 0 ≤ D) (hLambda : 0 ≤ Lambda) : + ∃ C : ℝ, 0 < C ∧ ∀ (R : ℝ) (hR : 0 < R), R ≤ 1 → + ∀ (U : Euclidean (m + 2) →L[ℝ] SobolevSpace μ hQ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) + (κ : ℝ) (p : X) (r₀ : ℝ) (L : ℝ≥0) + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r₀ L v) + (ρ C₀ : ℝ) (χ : GoodLaplacianCutoff μ hQ p ρ C₀), + 0 < ρ → ρ < r₀ → (L : ℝ) ^ 2 ≤ B → |κ| * R ^ 2 ≤ 1 → + (∀ w : Euclidean (m + 2), ‖w‖ ≤ 2 → R ^ 2 * + (∫ z, |cutoffSourceDensity μ hQ (G w).energy χ.sobolev χ.laplacian z| ∂μ) ≤ D * R ^ (m + 2)) → + ∀ lambda : ℝ, |lambda| * R ^ 2 ≤ Lambda → ∀ i : ℕ, 1 ≤ i → ∀ x q : X, + μ (ball q (R / 2 ^ i)) ≠ ∞ → + V * (R / 2 ^ i) ^ (m + 2) ≤ μ.real (ball q (R / 2 ^ i)) → + dist x q ≤ A * (R / 2 ^ i) → + (∀ j, μ.real (ball x (R / 2 ^ j)) ≤ W * (R / 2 ^ j) ^ (m + 2)) → + (∀ t, 0 < t → t ≤ R ^ 2 → ∀ z ∈ ball x R, + V * (Real.sqrt t) ^ (m + 2) ≤ μ.real (ball z (Real.sqrt t))) → + closedBall p (2 * ρ) ⊆ ball x R → + (∀ z ∉ ball x R, χ.weight z = 0) → + (∀ z, ρ ≤ dist p z → dist p z ≤ 2 * ρ → c * R ≤ dist x z) → + (∀ z ∈ ball q (R / 2 ^ i), χ.weight z = 1) → + ∀ v : Euclidean (m + 2), + |⟪v, (sobolevMeanGram μ hQ U (ball q (R / 2 ^ i)) measurableSet_ball - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos (div_pos hR (pow_pos (by norm_num : (0 : ℝ) < 2) i))) x lambda) v⟫_ℝ| ≤ + C * ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + obtain ⟨Ce, hCe, he⟩ := exists_harmonic_endpoint_bound (E := Euclidean (m + 2)) μ hQ hk hg hdiff (m + 2) hA hV hW + obtain ⟨Cs, hCs, hs⟩ := exists_short_average_mass_integral_bound μ hQ hk hg m hA hV + obtain ⟨Cl, hCl, hl⟩ := exists_long_time_mass_sum_bound μ hQ hk hg hdiff m hA hV + obtain ⟨Cc, hCc, hcurvature⟩ := exists_harmonic_curvature_integral_bound (E := Euclidean (m + 2)) μ hQ hk hg hdiff (m + 2) hA hV hW + obtain ⟨Cx, hCx, hx⟩ := exists_scaled_cutoff_integral_bound μ hQ hk (m + 2) + hg hdiff hA hV hc hD + let C := Ce * B + Lambda + 2 * (Cs + Cl) + 4 * Cc * B + 2 * Cx + refine ⟨C, by dsimp only [C]; positivity, ?_⟩ + intro R hR hR1 U M κ p r₀ L G ρ C₀ χ hρ hρr hL hκ hsourceL1 lambda hlambda + i hi x q hfinite hvolume hcenter hupper hsource hcontain hzero hsep hone v + let s := R / (2 : ℝ) ^ i + have hspos : 0 < s := div_pos hR (by positivity) + have hsR : s ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsRhalf : s ≤ R / 2 := by + have hp : (2 : ℝ) ≤ 2 ^ i := by simpa using pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hi + exact div_le_div_of_nonneg_left hR.le (by norm_num) hp + have hsq : s ^ 2 ≤ R ^ 2 := (sq_le_sq₀ hspos.le hR.le).mpr hsR + have hpos : 0 < μ.real (ball q s) := (mul_pos hV (pow_pos hspos (m + 2))).trans_le hvolume + have hχΩ : tsupport (χ.weight : X → ℝ) ⊆ ball p (2 * r₀) := by + intro z hz + have hd := χ.tsupport_subset μ hQ hz + rw [mem_closedBall] at hd + exact lt_of_le_of_lt hd (by linarith) + have hsupp : ∀ z, χ.weight z ≠ 0 → z ∈ ball x R := by + intro z hz + by_contra hn + exact hz (hzero z hn) + have hterm := he R s x q hR hR1 hspos hsRhalf hfinite hpos hcenter + (by simpa only [pow_zero, div_one] using hupper 0) + (by simpa only [Real.sqrt_sq hR.le] using hsource (R ^ 2) (sq_pos_of_pos hR) le_rfl) + U M κ p r₀ L v (G v) χ.weight χ.bounds hχΩ hzero χ.sobolev χ.representative + have hshort := hs M R hR hR1 x χ.weight (χ.hasCompactSupport μ hQ) χ.bounds hzero i q + hfinite hvolume hcenter (fun t ht htR z hz => hsource t ht (htR.trans hsq) z (hsupp z hz)) v + have hlong := hl M R hR hR1 x χ.weight (χ.hasCompactSupport μ hQ) χ.bounds hzero i q + hfinite hpos hcenter (fun t ht htR z hz => hsource t ht htR z (hsupp z hz)) v + have hcurv := hcurvature R hR hR1 i x q hfinite hvolume hcenter hupper hsource + U M κ p r₀ L v (G v) χ.weight χ.bounds hχΩ hzero χ.sobolev χ.representative + have herr := (hx R hR hR1 U M κ r₀ p L G ρ C₀ χ hρ hρr hsourceL1 s x q hspos hsR hfinite hvolume hcenter hsep + (fun t ht htR z _ hz => hsource t ht htR z + (hcontain (by simpa only [mem_closedBall, dist_comm] using hz))) v).2.2 + have hmain := (G v).mean_sub_heat_norm_le μ hQ hk χ hρ hρr + (ball q s) measurableSet_ball isBounded_ball hone (sq_pos_of_pos hspos) hsq x lambda + dsimp only at hmain + have hb := dyadic_scalar_background_bounds M (m + 2) x hR hR1 i v + have he' := mul_le_mul_of_nonneg_left hb.1 (by positivity : 0 ≤ Ce * (L : ℝ) ^ 2) + have hregBound := mul_le_mul_of_nonneg_left hb.2.1 (abs_nonneg lambda) + have hc' := mul_le_mul_of_nonneg_left hb.2.2.1 + (by positivity : 0 ≤ 2 * |κ| * Cc * (L : ℝ) ^ 2) + have hrelative : ((s / R) ^ 2 + s / R) * ‖v‖ ^ 2 ≤ + 2 * ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + have hsr : 0 ≤ s / R := by positivity + have hsr1 : s / R ≤ 1 := (div_le_one hR).mpr hsR + have hsqrel : (s / R) ^ 2 ≤ s / R := by nlinarith + have hh := mul_le_mul_of_nonneg_right hsqrel (sq_nonneg ‖v‖) + have hbFirst : (s / R) * ‖v‖ ^ 2 ≤ + ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := hb.1 + nlinarith only [hbFirst, hh] + have hx' := mul_le_mul_of_nonneg_left hrelative hCx.le + have hcurv' := mul_le_mul_of_nonneg_left hcurv (by positivity : 0 ≤ 2 * |κ|) + rw [abs_mul, abs_of_nonneg (sq_nonneg s)] at hmain + have hraw : |⟪v, (sobolevMeanGram μ hQ U (ball q s) measurableSet_ball - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos hspos) x lambda) v⟫_ℝ| ≤ + (Ce * (L : ℝ) ^ 2 + |lambda| * R ^ 2 + 2 * (Cs + Cl) + + 4 * |κ| * Cc * (L : ℝ) ^ 2 * R ^ 2 + 2 * Cx) * + ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + dsimp only [s] at * + linear_combination hmain + hterm + 2 * hshort + 2 * hlong + hcurv' + herr + + he' + hregBound + hc' + hx' + apply hraw.trans + apply mul_le_mul_of_nonneg_right _ + ((dyadicBochnerEnvelope_isPositive M (m + 2) x hR.le i).inner_nonneg_right v) + have hgrad := mul_le_mul_of_nonneg_left hL hCe.le + have hcurvatureCoeff : 4 * |κ| * Cc * (L : ℝ) ^ 2 * R ^ 2 ≤ 4 * Cc * B := by + have h := mul_le_mul hκ hL (sq_nonneg _) (by norm_num : (0 : ℝ) ≤ 1) + have hh := mul_le_mul_of_nonneg_left h (show 0 ≤ 4 * Cc by positivity) + nlinarith only [hh] + dsimp only [C] + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicAffine.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicAffine.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0047c8f074387c181e5b0bd2d3c39d23ea7eef3 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicAffine.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicAffineNondegeneracy + +namespace OAI + +/-! # Radius-weighted affine coefficients in centered harmonic coordinates -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Weighting the exact-frame coefficient by the physical radius gives +one affine nondegeneracy constant at every positive scale. The constant +coefficient retains its unweighted normalization. -/ +theorem scaled_harmonic_affine_nondegeneracy {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + (hgradient : LocalHarmonicL2GradientInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hn : 2 ≤ n) {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ Cg Cm : ℝ, 1 ≤ Cg ∧ 1 ≤ Cm ∧ + ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) (V : X → Euclidean n), + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) (u j)) → + ContinuousOn V (ball p R) → V p = 0 → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun x => V x j) → + ∀ (N : Euclidean n ≃L[ℝ] Euclidean n), + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R / 2)) measurableSet_ball N → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ (c : ℝ) (a : Euclidean n), + |c| + R * ‖N.symm a‖ ≤ (Cm + Cg) * + ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + obtain ⟨Cg, hCg, hcoeff⟩ := hgradient.affine_coefficient hn hκ + obtain ⟨Cm, hCm, heval⟩ := affine_evaluation_of_mean_value hX hmean hn hκ + refine ⟨Cg, Cm, hCg, hCm, ?_⟩ + intro p R hR hcurv u V hu hV hVp hrep N hN η hη c a + let μ := hausdorff n X + let hQ := hX.quadratic + let w := c • η + sobolevColumnMap μ hQ u a + have hηharm := isSobolevHarmonicOn_of_local_constant μ hQ (ball p R) measurableSet_ball η 1 hη + have hw : IsSobolevHarmonicOn μ hQ (ball p R) w := + (hηharm.smul μ hQ c).add μ hQ (IsSobolevHarmonicOn.linearCombination μ hQ hu a) + have hdiff : SobolevSpace.toLp μ hQ (w - sobolevColumnMap μ hQ u a) =ᵐ[ + μ.restrict (ball p R)] fun _ => c := by + simp only [w, add_sub_cancel_right, map_smul] + filter_upwards [hη, ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ hQ η))] + with x hx hc + simp only [hc, Pi.smul_apply, smul_eq_mul] + change c * SobolevSpace.toLp (hausdorff n X) hX.quadratic η x = c + rw [hx, mul_one] + have hrest : SobolevSpace.restrictLp μ hQ (ball p R) w = + affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a) := by + rw [affineCoordinateMap_apply] + dsimp only [w] + rw [map_add, map_smul, restrictLp_eq_one_of_representative μ hQ η _ _ hη] + have hc := hcoeff p R hR hcurv u N hN a w c hw hdiff + rw [hrest] at hc + have hv := heval p R hR hcurv u V hu hV hrep η hη c a + rw [hVp, inner_zero_left, add_zero] at hv + have hlin : ‖N.symm a‖ ≤ Cg / R * + ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (div_nonneg (by linarith) hR.le) (norm_nonneg _))).mp + simpa only [mul_pow] using hc + have hweighted := mul_le_mul_of_nonneg_left hlin hR.le + have heq : R * (Cg / R * + ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖) = + Cg * ‖normalizeLocalL2 μ (ball p R) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap μ hQ u (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, a))‖ := by + field_simp + rw [heq] at hweighted + nlinarith only [hv, hweighted] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicMass.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..66a168cda593bceeb5549ce33912696c347e1043 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicMass.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Metric.ScaledMassBackground +import OAI.Geometry.RCD.Sobolev.ResidualBochnerMass +import OAI.Geometry.RCD.Heat.HeatRegimeBridges + +namespace OAI + +/-! # The actual local Bochner mass has a uniform scaled bound -/ + +open Set Metric MeasureTheory +open scoped NNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- A larger good cutoff bounds only the local full measure needed by +coarse dyadic balls; its exterior extension plays no role. -/ +theorem harmonic_scaled_local_mass_bound {n : ℕ} {p : X} {R κ C B V : ℝ} + (hR : 0 < R) (hκ : 0 ≤ κ) (hC : 0 ≤ C) (hB : 0 ≤ B) + (hcurv : κ * R ^ 2 ≤ 1) + (U : Euclidean n →L[ℝ] SobolevSpace μ hQ) (M : PositiveBilinearMeasure X (Euclidean n)) (L : ℝ≥0) + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p (4 * R) L v) + (χ : GoodLaplacianCutoff μ hQ p (2 * R) C) + (hL : (L : ℝ) ^ 2 ≤ B) + (hvolume : μ.real (closedBall p (4 * R)) ≤ V * (5 * R) ^ n) (v : Euclidean n) : + ⟪v, M.massOperator (ball p (2 * R)) v⟫_ℝ ≤ + ((C / 8 + 1) * B * V * 5 ^ n) * (R ^ n / R ^ 2) * ‖v‖ ^ 2 := by + have hg : ∀ᵐ x ∂μ.restrict (closedBall p (4 * R)), + localGamma μ hQ (U v) (U v) x ≤ (L : ℝ) ^ 2 * ‖v‖ ^ 2 := by + have hb := LocalHarmonicEnergy.gamma_bound_on_smaller_ball μ hQ G + (show 8 * R ≤ 2 * (4 * R) by linarith) v + exact ae_restrict_of_ae_restrict_of_subset + (closedBall_subset_ball (show 4 * R < 8 * R by linarith)) hb + have hm := χ.mass_le_of_gradient μ hQ (show 0 < 2 * R by positivity) + (show 2 * R < 4 * R by linarith) hC hκ (G v) + (by simpa only [show 2 * (2 * R) = 4 * R by ring] using hg) + have hm' := mul_le_mul_of_nonneg_left hm (sq_nonneg R) + have heq : R ^ 2 * (((C / (2 * R) ^ 2) / 2 + κ) * + ((L : ℝ) ^ 2 * ‖v‖ ^ 2) * μ.real (closedBall p (2 * (2 * R)))) = + (C / 8 + κ * R ^ 2) * (L : ℝ) ^ 2 * ‖v‖ ^ 2 * μ.real (closedBall p (4 * R)) := by + rw [show 2 * (2 * R) = 4 * R by ring] + field_simp [hR.ne'] + ring + rw [heq] at hm' + have hcurv' : C / 8 + κ * R ^ 2 ≤ C / 8 + 1 := by linarith + have hcL : (C / 8 + κ * R ^ 2) * (L : ℝ) ^ 2 ≤ (C / 8 + 1) * B := + mul_le_mul hcurv' hL (sq_nonneg _) (by positivity) + have hb := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hcL (sq_nonneg ‖v‖)) (show 0 ≤ μ.real (closedBall p (4 * R)) by positivity) + have hv := mul_le_mul_of_nonneg_left hvolume + (show 0 ≤ (C / 8 + 1) * B * ‖v‖ ^ 2 by positivity) + have hs : R ^ 2 * ⟪v, M.massOperator (ball p (2 * R)) v⟫_ℝ ≤ + ((C / 8 + 1) * B * V * 5 ^ n) * R ^ n * ‖v‖ ^ 2 := by + have hh := hm'.trans (hb.trans hv) + simpa only [mul_pow, mul_assoc, mul_comm, mul_left_comm] using hh + have hs' : ⟪v, M.massOperator (ball p (2 * R)) v⟫_ℝ ≤ + (((C / 8 + 1) * B * V * 5 ^ n) * R ^ n * ‖v‖ ^ 2) / R ^ 2 := + (le_div_iff₀ (sq_pos_of_pos hR)).mpr (by simpa only [mul_comm] using hs) + convert hs' using 1; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicValueConvergence.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicValueConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..a99b293160f082c66a6681086d0ac653fa9b61f1 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledHarmonicValueConvergence.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicLinearSharp + +namespace OAI + +/-! # Scalar multiplication of the actual local Sobolev value convergence -/ + +open Set Metric Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +omit [BorelSpace X] [ProperSpace X] in +theorem sobolev_linear_value_convergence_smul {n : ℕ} + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (p : ℕ → X) (r : ℕ → ℝ) (V : ℕ → X → Euclidean n) + (w : ℕ → SobolevSpace μ hQ) (L : Euclidean n →L[ℝ] ℝ) + {S c : ℝ} (hc : 0 < c) + (hconv : ∀ W : ℝ, 0 < W → W < S → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp μ hQ (w k) x-L (V k x)| ≤ δ) : + ∀ W : ℝ, 0 < W → W < S → ∀ δ : ℝ, 0 < δ → ∀ᶠ k in atTop, + ∀ᵐ x ∂μ.restrict (ball (p k) (W*r k)), + |SobolevSpace.toLp μ hQ (c • w k) x-(c • L) (V k x)| ≤ δ := by + intro W hW hWS δ hδ + filter_upwards [hconv W hW hWS (δ/c) (div_pos hδ hc)] with k hk + have he : SobolevSpace.toLp μ hQ (c • w k) =ᵐ[μ] + fun x => c*SobolevSpace.toLp μ hQ (w k) x := by + rw [map_smul] + exact Lp.coeFn_smul _ _ + filter_upwards [hk,ae_restrict_of_ae he] with x hx heq + rw [heq] + change |c*SobolevSpace.toLp μ hQ (w k) x-c*L (V k x)| ≤ δ + rw [← mul_sub,abs_mul,abs_of_pos hc] + exact (mul_le_mul_of_nonneg_left hx hc.le).trans_eq (by field_simp) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledMeanPinching.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledMeanPinching.lean new file mode 100644 index 0000000000000000000000000000000000000000..989f63ea05921c1a9a46ed8461092b58720a524c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledMeanPinching.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.ScaledSharpNeighborhood +import OAI.Geometry.RCD.Coordinates.RegularSharpNeighborhood +import OAI.Geometry.RCD.Coordinates.RegularMassMatrices + +namespace OAI + +/-! # The regular neighborhood with actual inverse mean-Gram mass matrices -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The precise published inputs construct one common harmonic/heat family +with an arbitrarily small summable source and the full directional mass +estimate for every nearby pair. No pinching hypothesis is assumed. -/ +theorem exists_scaled_mean_pinching_neighborhood {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ Cg D Ca Cpin : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ 0 < Cpin ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a |K| B J C A Cχ 1 zeta eta, + c.Matches e.heat ∧ + ∃ data : ∀ q, q ∈ ball p (e.heat.radius / 32) → + RegularCenterRadialData hX e.heat |K| B J C A Cχ eta Cg D Ca q, + ∀ first (hfirst : first ∈ ball p (e.heat.radius / 32)) + center (hcenter : center ∈ ball p (e.heat.radius / 32)), + let d1 := data first hfirst + let d2 := data center hcenter + let sigma := twoCenterProjectionSource (radialFitQualitativeConstant (m + 2) Cχ * zeta) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d1.source) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic d2.source) + Summable (fun i => sigma i ^ 2) ∧ (∑' i, sigma i ^ 2) ≤ budget ∧ + ∀ i, let s := distanceSourceRadius e.heat.radius i + let _U := (centeredSobolevMap (hausdorff (m + 2) X) hX.quadratic e.heat.coordinates + e.one.sobolev (e.heat.values center)).comp (d2.frame i).toContinuousLinearMap + let _delta := (d2.frame i : Euclidean (m + 2) →L[ℝ] Euclidean (m + 2)).adjoint + (e.heat.values first - e.heat.values center) + dist first center ≤ s / 512 → + let D := e.heat.pinchingMassMatrix center hcenter i + D.IsPositive ∧ + ⟪e.heat.values first - e.heat.values center, + D (e.heat.values first - e.heat.values center)⟫_ℝ ≤ + Cpin * s ^ 2 * sigma i ^ 2 := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, Cg, D, Ca, P, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hP, hconstruct⟩ := + exists_scaled_sharp_neighborhood m hX ha (abs_nonneg K) (neg_abs_le K) hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare + hpoissonCompact hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff hharmonic + hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨Cpin, tau, hCpin, htau, hpinch⟩ := regular_pair_mean_pinching hX hhessian hcutoff haction + hgradient hmean (by omega) hA.le hB.le hJ.le (zero_le_one.trans hCχ) hP + (Cg := Cg) (D := D) (Ca := Ca) + let Q := radialFitQualitativeConstant (m + 2) Cχ + have hQ : 0 < Q := by + have hc : 0 < radialNormalizationRestrictionConstant (m + 2) := + zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + dsimp only [Q, radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * + radialNormalizationRestrictionConstant (m + 2) * _ + positivity + refine ⟨c, B, J, C, A, Cχ, Cg, D, Ca, Cpin, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hCpin, ?_⟩ + intro budget hbudget + let small := min budget (min tau (128 * Q * tau)) + have hsmall : 0 < small := by dsimp only [small]; positivity + obtain ⟨zeta, eta, hzeta, heta, e, hmatch, hscalar, data, hpairs⟩ := hconstruct small hsmall + have hzetatau : zeta ≤ tau := by + have hb : small ≤ 128 * Q * tau := (min_le_right _ _).trans (min_le_right _ _) + have hh := hscalar.trans hb + have he := mul_pos (by norm_num : (0 : ℝ) < 128) hQ + change 128 * (Q * zeta + eta) ≤ _ at hh + nlinarith only [hh, heta, he] + refine ⟨zeta, eta, hzeta, heta, e, hmatch, data, ?_⟩ + intro first hfirst center hcenter d1 d2 sigma + obtain ⟨hsum, hsumBound, hsharp⟩ := hpairs first hfirst center hcenter + refine ⟨hsum, hsumBound.trans (min_le_left _ _), ?_⟩ + intro i s U delta hroom + have hsig : sigma i ^ 2 ≤ tau := (hsum.le_tsum i (fun j _ => sq_nonneg (sigma j))).trans + (hsumBound.trans ((min_le_right _ _).trans (min_le_left _ _))) + obtain ⟨R, hR, _hRpos, hDpos, hmass⟩ := hpinch e hfirst hcenter d1 d2 hzeta.le hzetatau + i hroom hsig (hsharp i (by + rw [dist_comm] + have hs := distanceSourceRadius_pos e.heat.radius_pos i + linarith)) + have hEq := regular_pinching_matrix_identification e.heat center hcenter i R hR + rw [hEq] at hDpos hmass + exact ⟨hDpos, hmass⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledNeighborhoodGram.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledNeighborhoodGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..4604960ced533a901a6d99a915b1187aa6ce6d67 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledNeighborhoodGram.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.ScaledGramEnvelope + +namespace OAI + +/-! # One source-comparison constant throughout the regular neighborhood -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace NNReal Topology ENNReal + +noncomputable section +namespace RegularPointCoordinates + +private theorem volume_half_lower {v omega s : ℝ} {n : ℕ} + (hw : 0 < omega) (hs : 0 < s) (h : |v / (omega * s ^ n) - 1| ≤ 1 / 2) : + (omega / 2) * s ^ n ≤ v := by + have hd : 0 < omega * s ^ n := mul_pos hw (pow_pos hs n) + have hl := (abs_le.mp h).1 + have hq : (1 / 2 : ℝ) ≤ v / (omega * s ^ n) := by linarith + have hh := (le_div_iff₀ hd).mp hq + nlinarith only [hh] + +private theorem volume_half_upper {v omega s : ℝ} {n : ℕ} + (hw : 0 < omega) (hs : 0 < s) (h : |v / (omega * s ^ n) - 1| ≤ 1 / 2) : + v ≤ (3 / 2 * omega) * s ^ n := by + have hd : 0 < omega * s ^ n := mul_pos hw (pow_pos hs n) + have hl := (abs_le.mp h).2 + have hq : v / (omega * s ^ n) ≤ (3 / 2 : ℝ) := by linarith + have hh := (div_le_iff₀ hd).mp hq + nlinarith only [hh] + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] [IsLocallyFiniteMeasure μ] (hQ : QuadraticCheegerEnergy μ) + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The comparison constant and first admissible index precede the choice +of radius, harmonic map and its full Bochner measure. -/ +theorem exists_scaled_neighborhood_gram_envelope_bound (m : ℕ) + (hg : HasCoordinateHeatBounds μ ker) (hdiff : HasGaussianHeatDifferenceBounds μ ker) + {omega A B D Lambda : ℝ} (homega : 0 < omega) (hA : 0 ≤ A) + (hB : 0 ≤ B) (hD : 0 ≤ D) (hLambda : 0 ≤ Lambda) : + ∃ C : ℝ, 0 < C ∧ ∃ J : ℕ, ∀ (R : ℝ) (hR : 0 < R), R ≤ 1 → + ∀ (U : Euclidean (m + 2) →L[ℝ] SobolevSpace μ hQ) + (M : PositiveBilinearMeasure X (Euclidean (m + 2))) + (κ : ℝ) (p : X) (L : ℝ≥0) + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p (4 * R) L v) + (C₀ : ℝ) (χ : GoodLaplacianCutoff μ hQ p (3 * R / 8) C₀), + (L : ℝ) ^ 2 ≤ B → |κ| * R ^ 2 ≤ 1 → + (∀ w : Euclidean (m + 2), ‖w‖ ≤ 2 → R ^ 2 * + (∫ z, |cutoffSourceDensity μ hQ (G w).energy χ.sobolev χ.laplacian z| ∂μ) ≤ D * R ^ (m + 2)) → + ∀ lambda : ℝ, |lambda| * R ^ 2 ≤ Lambda → + (∀ y, dist p y ≤ 16 * R → ∀ s, 0 < s → s ≤ 32 * R → + |μ.real (ball y s) / (omega * s ^ (m + 2)) - 1| ≤ 1 / 2) → + ∀ i, J ≤ i → ∀ x ∈ ball p (R / 32), + ∀ q, dist x q ≤ A * (R / 2 ^ i) → ∀ v : Euclidean (m + 2), + |⟪v, (sobolevMeanGram μ hQ U (ball q (R / 2 ^ i)) measurableSet_ball - + cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos (div_pos hR (pow_pos (by norm_num : (0 : ℝ) < 2) i))) x lambda) v⟫_ℝ| ≤ + C * ⟪v, dyadicBochnerEnvelope M (m + 2) x R i v⟫_ℝ := by + obtain ⟨C, hC, hb⟩ := exists_scaled_actual_gram_envelope_bound μ hQ hk m hg hdiff + hA (show 0 < omega / 2 by positivity) (show 0 ≤ 3 / 2 * omega by positivity) + (show (0 : ℝ) < 1 / 4 by norm_num) hB hD hLambda + have hrad := tendsto_pow_atTop_nhds_zero_of_lt_one + (by norm_num : (0 : ℝ) ≤ 1 / 2) (by norm_num : (1 / 2 : ℝ) < 1) + obtain ⟨J, hJ⟩ := eventually_atTop.mp (hrad.eventually_lt_const + (by positivity : (0 : ℝ) < 1 / (8 * (A + 1)))) + refine ⟨C, hC, max 1 J, ?_⟩ + intro R hR hR1 U M κ p L G C₀ χ hL hκ hL1 lambda hlambda hvolume i hi x hx q hq v + have hi1 : 1 ≤ i := (le_max_left _ _).trans hi + have hiJ : J ≤ i := (le_max_right _ _).trans hi + let s := R / (2 : ℝ) ^ i + have hs : 0 < s := div_pos hR (by positivity) + have hsR : s ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + have hsmall : (A + 1) * s < R / 8 := by + have hh := (lt_div_iff₀ (by positivity : (0 : ℝ) < 8 * (A + 1))).mp (hJ i hiJ) + have hm := mul_lt_mul_of_pos_left hh hR + have he : R * (1 / 2 : ℝ) ^ i = s := by + dsimp only [s] + rw [one_div_pow] + ring + rw [← mul_assoc, he, mul_one] at hm + nlinarith only [hm] + have hxp : dist x p < R / 32 := hx + have hpx : dist p x < R / 32 := by rwa [dist_comm] + have hqnear : dist p q ≤ 16 * R := by + have ht := dist_triangle p x q + have has : A * s ≤ (A + 1) * s := by nlinarith [hs.le] + change dist x q ≤ A * s at hq + linarith + refine hb R hR hR1 U M κ p (4 * R) L G (3 * R / 8) C₀ χ + (by positivity) (by linarith) hL hκ hL1 lambda hlambda i hi1 x q (isBounded_ball.measure_lt_top.ne) + (volume_half_lower homega hs (hvolume q hqnear s hs (by linarith))) hq ?_ ?_ ?_ ?_ ?_ ?_ v + · intro j + have hs' : 0 < R / (2 : ℝ) ^ j := div_pos hR (by positivity) + have hsR' : R / (2 : ℝ) ^ j ≤ R := div_le_self hR.le (one_le_pow₀ (by norm_num)) + exact volume_half_upper homega hs' (hvolume x (by linarith) _ hs' (by linarith)) + · intro t ht htR z hz + have hzp : dist z x < R := hz + have hpz : dist p z ≤ 16 * R := by linarith [dist_triangle p x z, dist_comm z x] + have hroot : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht + have hrootR : Real.sqrt t ≤ R := by nlinarith [Real.sq_sqrt ht.le, Real.sqrt_nonneg t] + exact volume_half_lower homega hroot (hvolume z hpz _ hroot (by linarith)) + · intro z hz + have hzp : dist z p ≤ 2 * (3 * R / 8) := hz + change dist z x < R + linarith [dist_triangle z p x] + · intro z hz + apply χ.zero z + have hzx : R ≤ dist z x := by simpa only [mem_ball, not_lt] using hz + rw [dist_comm p z] + linarith [dist_triangle z p x] + · intro z hz _ + have ht := dist_triangle p x z + linarith + · intro z hz + apply χ.one + have hzq : dist z q < s := hz + change dist z p < 3 * R / 8 + have ht := dist_triangle z q x + have ht' := dist_triangle z x p + rw [dist_comm q x] at ht + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledPinchingField.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledPinchingField.lean new file mode 100644 index 0000000000000000000000000000000000000000..88bec1cb12684cff9bc512b5ebcfe56d17006931 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledPinchingField.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Harmonic.ScaledMeanPinching +import OAI.Geometry.RCD.Coordinates.RegularPinchingField + +namespace OAI + +/-! # Arbitrarily small pinching with fixed heat constants -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem exists_scaled_pinching_field {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a : ℝ} (ha : 0 ≤ a) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (haction : LocalPoissonHessianActionInput hX) + (hproduct : LocalPoissonGradientProductInput hX) + (hpoincare : LocalMeanPoincareInput hX) + (hpoissonCompact : LocalPoissonHarmonicCompactnessInput hX) + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ Cpin : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 0 < Cpin ∧ + ∀ budget : ℝ, 0 < budget → ∃ zeta eta : ℝ, 0 < zeta ∧ 0 < eta ∧ + ∃ e : RegularProjectionEnvironment hX p hk a |K| B J C A Cχ 1 zeta eta, + c.Matches e.heat ∧ zeta ≤ budget ∧ Nonempty (RegularPinchingField e.heat Cpin budget) := by + classical + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, Cg, D, Ca, Cpin, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, hCpin, hbuild⟩ := + exists_scaled_mean_pinching_neighborhood m hX ha hcompact hregular hvolume hmeasured + hBG hdensity hdistance hsobolev hpoisson haction hproduct hpoincare hpoissonCompact + hhessian hmean hinitial htrans hsplit hrigidity hbochner hcutoff hharmonic hgradient + heuclidean hmetricmeasure hk hg hdiff + refine ⟨c, B, J, C, A, Cχ, Cpin, hB, hJ, hC, hA, hCχ, hCpin, ?_⟩ + intro budget hbudget + obtain ⟨zeta, eta, hzeta, heta, e, hmatch, data, hpairs⟩ := hbuild budget hbudget + let μ := hausdorff (m + 2) X + let Q := radialFitQualitativeConstant (m + 2) Cχ * zeta + have hQ : 0 < Q := by + have hc : 0 < radialNormalizationRestrictionConstant (m + 2) := + zero_lt_one.trans_le (radialNormalizationRestrictionConstant_ge_one (m + 2)) + have hqual : 0 < radialFitQualitativeConstant (m + 2) Cχ := by + dsimp only [radialFitQualitativeConstant] + change 0 < ((m + 2 : ℕ) : ℝ) * (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) * + radialNormalizationRestrictionConstant (m + 2) * _ + positivity + exact mul_pos hqual hzeta + let P := fun q : {q : X // q ∈ ball p (e.heat.radius / 32)} => + normalizedPoissonDefect μ hX.quadratic (data q.val q.property).source + let E := fun q => pinchingEnvelope (7 / 8) (3 / 4) Q (P q) + have hP (q) (i) : 0 ≤ P q i := + normalizedPoissonDefect_nonneg μ hX.quadratic (data q.val q.property).source (abs_nonneg K) i + have hspec (q) := pinchingEnvelope_spec (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num : (7 / 8 : ℝ) < 1) (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hQ (hP q) (data q.val q.property).summable + have hE (q) (i) : 0 ≤ E q i := ((hspec q).2.2 i).2.2.le + have hsig (x z) (i) : + twoCenterProjectionSource Q (P x) (P z) i ^ 2 = E x i + E z i := + Real.sq_sqrt (add_nonneg (hE x i) (hE z i)) + have htotal (q) : (∑' i, E q i) ≤ budget := by + obtain ⟨hsum, hbound, _⟩ := hpairs q.val q.property q.val q.property + have hdom (i) : E q i ≤ twoCenterProjectionSource Q (P q) (P q) i ^ 2 := by + rw [hsig] + linarith [hE q i] + exact (((hspec q).1).tsum_le_tsum hdom hsum).trans hbound + have hqual : 1 ≤ radialFitQualitativeConstant (m + 2) Cχ := by + have hn : (1 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) := by exact_mod_cast (show 1 ≤ m + 2 by omega) + have hs : (1 : ℝ) ≤ (((m + 2 : ℕ) : ℝ) + 1) ^ 2 := by nlinarith + have hb : (1 : ℝ) ≤ 1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1) := by + have hh := mul_le_mul_of_nonneg_left hs (by norm_num : (0 : ℝ) ≤ 1000) + have hprod := mul_le_mul_of_nonneg_left (show (1 : ℝ) ≤ Cχ + 1 by linarith) + (show 0 ≤ 1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 by positivity) + nlinarith + have hfirst : (1 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) * + (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1)) := by nlinarith + have hsecond := radialNormalizationRestrictionConstant_ge_one (m + 2) + have hthird : (1 : ℝ) ≤ (5 / 3 : ℝ) * (4 : ℝ) ^ (m + 2) := by + have hp : (1 : ℝ) ≤ 4 ^ (m + 2) := one_le_pow₀ (by norm_num) + linarith + dsimp only [radialFitQualitativeConstant] + have hp := mul_le_mul hfirst hsecond (by norm_num : (0 : ℝ) ≤ 1) + (by linarith : (0 : ℝ) ≤ ((m + 2 : ℕ) : ℝ) * + (1000 * (((m + 2 : ℕ) : ℝ) + 1) ^ 2 * (Cχ + 1))) + have hp' := mul_le_mul hp hthird (by norm_num : (0 : ℝ) ≤ 1) (by linarith) + simpa only [one_mul] using hp' + have hzetaBudget : zeta ≤ budget := by + let q : {q : X // q ∈ ball p (e.heat.radius / 32)} := + ⟨p, mem_ball_self (div_pos e.heat.radius_pos (by norm_num))⟩ + have hfloor : Q ≤ E q 0 := by simpa only [pow_zero, mul_one] using ((hspec q).2.2 0).2.1 + have he0 := (hspec q).1.le_tsum 0 (fun j _ => hE q j) + have hQz : zeta ≤ Q := by + dsimp only [Q] + nlinarith [mul_le_mul_of_nonneg_right hqual hzeta.le] + exact hQz.trans (hfloor.trans (he0.trans (htotal q))) + refine ⟨zeta, eta, hzeta, heta, e, hmatch, hzetaBudget, ⟨{ + energy := E + floor := fun i => Q * (7 / 8 : ℝ) ^ i + floor_pos := fun i => mul_pos hQ (pow_pos (by norm_num) i) + energy_floor := fun q i => ((hspec q).2.2 i).2.1 + summable := fun q => (hspec q).1 + total := htotal + directional := ?_ }⟩⟩ + · intro x z i hroom + have hh := (hpairs x.val x.property z.val z.property).2.2 i hroom + rw [hsig] at hh + exact hh.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionData.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionData.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae54181877716aa6ec7b614d31a12636915bde43 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionData.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Coordinates.ScaledCoordinates +import OAI.Geometry.RCD.Harmonic.AffineChange +import OAI.Geometry.RCD.Harmonic.RescaledRadialFunction + +namespace OAI + +/-! # Rescaling the actual affine projection and its Euler equation -/ + +open Set MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Coordinate rescaling uses the same Sobolev representatives. -/ +def radiusScaledColumns {n : ℕ} (r : ℝ) (u : Fin n → SobolevSpace μ hQ) : + Fin n → SobolevSpace μ hQ := fun j => r⁻¹ • u j + +omit [BorelSpace X] [ProperSpace X] in +theorem radiusScaledColumns_column {n : ℕ} (r : ℝ) + (u : Fin n → SobolevSpace μ hQ) (b : Euclidean n) : + sobolevColumnMap μ hQ (radiusScaledColumns μ hQ r u) b = + r⁻¹ • sobolevColumnMap μ hQ u b := by + simp only [sobolevColumnMap_apply, radiusScaledColumns, Finset.smul_sum, smul_comm (r⁻¹)] + +omit [BorelSpace X] [ProperSpace X] in +/-- The physical inverse radius preserves the affine subspace and the +actual orthogonal projection. -/ +theorem radiusScaledColumns_affineResidual {n : ℕ} {r : ℝ} (hr : r ≠ 0) + (u : Fin n → SobolevSpace μ hQ) (Ω : Set X) (hfin : μ Ω ≠ ∞) : + affineResidual μ hQ (radiusScaledColumns μ hQ r u) Ω hfin = + affineResidual μ hQ u Ω hfin := by + let B := scaledCoordinateEquiv (ContinuousLinearEquiv.refl ℝ (Euclidean n)) r⁻¹ (inv_ne_zero hr) + apply affineResidual_eq_of_change μ hQ u (radiusScaledColumns μ hQ r u) Ω hfin B 0 + intro v + rw [radiusScaledColumns_column] + change SobolevSpace.restrictLp μ hQ Ω (r⁻¹ • sobolevColumnMap μ hQ u v) = + SobolevSpace.restrictLp μ hQ Ω (sobolevColumnMap μ hQ u (r⁻¹ • v)) + 0 • restrictedOne μ Ω hfin + rw [map_smul, map_smul, map_smul, zero_smul, add_zero] + +omit [BorelSpace X] [ProperSpace X] in +/-- The same residual, divided by the squared physical radius, is the +actual projection residual of the rescaled target and coordinates. -/ +theorem radius_scaled_projection {n : ℕ} {r : ℝ} (hr : r ≠ 0) + (u : Fin n → SobolevSpace μ hQ) (Ω : Set X) (hfin : μ Ω ≠ ∞) + (v w : SobolevSpace μ hQ) + (hw : SobolevSpace.restrictLp μ hQ Ω w = + affineResidual μ hQ u Ω hfin (SobolevSpace.restrictLp μ hQ Ω v)) : + SobolevSpace.restrictLp μ hQ Ω ((r ^ 2)⁻¹ • w) = + affineResidual μ hQ (radiusScaledColumns μ hQ r u) Ω hfin + (SobolevSpace.restrictLp μ hQ Ω ((r ^ 2)⁻¹ • v)) := by + rw [radiusScaledColumns_affineResidual μ hQ hr, map_smul, map_smul, hw, map_smul] + +/-- Radial rescaling and residual amplitude rescaling preserve the exact +Euler equation; the coordinate coefficient is divided by one radius. -/ +theorem radius_scaled_projection_euler {n : ℕ} {r B B' : ℝ} (hr : 0 < r) + (Ω : Set X) (u : Fin n → SobolevSpace μ hQ) + (f w η e : SobolevSpace μ hQ) (ell : Euclidean n) (k : ℝ) + (hf : ∀ᵐ x ∂μ.restrict Ω, localGamma μ hQ f f x ≤ B) + (hf' : ∀ᵐ x ∂μ.restrict Ω, + localGamma μ hQ ((r ^ 2)⁻¹ • f) ((r ^ 2)⁻¹ • f) x ≤ B') + (hid : localRadialDerivative μ hQ Ω f hf w = SobolevSpace.restrictLp μ hQ Ω + (w + sobolevColumnMap μ hQ u ell + k • η + e)) : + r ^ 2 • localRadialDerivative μ hQ Ω ((r ^ 2)⁻¹ • f) hf' ((r ^ 2)⁻¹ • w) = + SobolevSpace.restrictLp μ hQ Ω + ((r ^ 2)⁻¹ • w + sobolevColumnMap μ hQ (radiusScaledColumns μ hQ r u) (r⁻¹ • ell) + + ((r ^ 2)⁻¹ * k) • η + (r ^ 2)⁻¹ • e) := by + have hcoef : sobolevColumnMap μ hQ (radiusScaledColumns μ hQ r u) (r⁻¹ • ell) = + (r ^ 2)⁻¹ • sobolevColumnMap μ hQ u ell := by + rw [radiusScaledColumns_column, map_smul, smul_smul] + congr 1 + field_simp + rw [rescaled_radial_derivative μ hQ Ω f _ hr hf hf', map_smul, hid, ← map_smul, hcoef] + congr 1 + module + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionEnvironment.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionEnvironment.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bbfd9e425564ae2bf7c6d02d6f85350af75b0af --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionEnvironment.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularProjectionEnvironment +import OAI.Geometry.RCD.Coordinates.ScaledRegularData + +namespace OAI + +/-! # Actual Poisson environments retaining fixed heat constants -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The radius cap synchronizes the already proved heat construction with +the source neighborhood. All five construction constants are chosen before +the source and coordinate tolerances. -/ +theorem exists_scaled_projection_environment {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hhessian : LocalPoissonHessianInput hX) (hproduct : LocalPoissonGradientProductInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ : ℝ, 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ + ∀ zeta eta cap : ℝ, 0 < zeta → 0 < eta → 0 < cap → + ∃ d : RegularProjectionEnvironment hX p hk a κ B J C A Cχ 1 zeta eta, + d.heat.radius ≤ cap ∧ c.Matches d.heat := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, hheatConstruct⟩ := exists_scaled_regular_bilinear_data m hX + ha hcompact hregular hvolume hmeasured hBG hdensity hinitial htrans hsplit hrigidity + hbochner hcutoff hhessian hproduct hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff 1 (by norm_num) + have hn : 2 ≤ m + 2 := by omega + obtain ⟨B, J, C, hB, hJ, hC, hsources⟩ := regular_poisson_defect_uniform m hX + ha hκ hK hcompact hregular hvolume hBG hdensity hdistance hsobolev hcutoff + obtain ⟨A, hA, hgrad⟩ := poisson_family_gradient hX hn hpoisson (B := B) hκ + obtain ⟨Cχ, hCχ, hcuts⟩ := hcutoff hn + refine ⟨c, B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, ?_⟩ + intro zeta eta cap hzeta heta hcap + let cap' := min cap (1 / (4 * (|K| + κ + a + 1))) + have hcap' : 0 < cap' := lt_min hcap (by positivity) + obtain ⟨D, hD, hDcap, hsource⟩ := hsources cap' eta hcap' heta + obtain ⟨heat, hheat, hmatch⟩ := hheatConstruct (radiusCap := D / 2) + (by positivity) hzeta + let R := heat.radius + have hR : 0 < R := heat.radius_pos + have hR1 : R ≤ 1 := heat.radius_le_one + have hRcap : R ≤ cap' := hheat.trans ((by linarith : D / 2 ≤ D).trans hDcap) + have hRsmall : R ≤ 1 / (4 * (|K| + κ + a + 1)) := hRcap.trans (min_le_right _ _) + have hbound := (le_div_iff₀ (by positivity : 0 < 4 * (|K| + κ + a + 1))).mp hRsmall + have hscale : a * (3 * R) ≤ 1 := by + nlinarith [mul_nonneg (abs_nonneg K) hR.le, mul_nonneg hκ hR.le, mul_nonneg ha hR.le] + have hcurv : 4 * (|K| + κ) * R ^ 2 ≤ 1 := by + have hsquare : R ^ 2 ≤ R := by nlinarith + have hh := mul_le_mul_of_nonneg_left hsquare (by positivity : 0 ≤ 4 * (|K| + κ)) + nlinarith [mul_nonneg ha hR.le] + have hcurvSmall (r : ℝ) (hr : 0 ≤ r) (hrR : r ≤ 2 * R) : -1 ≤ K * r ^ 2 := by + have hsquare : r ^ 2 ≤ (2 * R) ^ 2 := by nlinarith + have habs := mul_le_mul_of_nonneg_left hsquare (abs_nonneg K) + have hlo := mul_le_mul_of_nonneg_right (neg_abs_le K) (sq_nonneg r) + have hkappa := mul_nonneg hκ (sq_nonneg R) + nlinarith + let one := Classical.choice (hcuts p (2 * R) (by positivity) + (hcurvSmall _ (by positivity) le_rfl)) + have hqD (q : X) (hq : q ∈ ball p (R / 32)) : dist p q ≤ D := by + have hh := mem_ball.mp hq + rw [dist_comm] at hh + linarith + have hvol (q : X) (hq : q ∈ ball p (R / 32)) (t : ℝ) (ht : 0 < t) (htR : t ≤ 2 * R) : + |(hausdorff (m + 2) X).real (ball q t) / + (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4 := by + obtain ⟨_, _, _, _, hv⟩ := hsource q (hqD q hq) (2 * R) (by positivity) (by linarith) + exact hv t ht htR + refine ⟨{ + heat := heat + modelScale := hscale + curvature := hcurv + one := one + oneRepresentative := ?_ + volume := hvol + poisson := ?_ }, hRcap.trans (min_le_left _ _), hmatch⟩ + · intro q hq i + filter_upwards [ae_restrict_of_ae one.representative, ae_restrict_mem measurableSet_ball] + with x hx hball + rw [hx] + apply one.one + have houter := distanceSourceRadius_outer_le hR.le i + have hxq := mem_ball.mp hball + have hqp := mem_ball.mp hq + have hxp := dist_triangle x q p + change dist x p < 2 * R + linarith + · intro q hq + obtain ⟨S, hT, hsum, hbudget, _⟩ := hsource q (hqD q hq) R hR (by linarith) + let T := Classical.choice hT + have hs (i : ℕ) : 0 < distanceSourceRadius R i := distanceSourceRadius_pos hR i + have hsR (i : ℕ) : distanceSourceRadius R i ≤ R := by + have hh := distanceSourceRadius_outer_le hR.le i + linarith + refine ⟨S, T, hsum, hbudget, ?_, ?_⟩ + · intro i z hz + have hsi := hs i + exact hgrad q z R J C S T i ((hsR i).trans hR1) hz + (hcurvSmall _ (by positivity) (by linarith [hsR i])) + · intro i + have hsi := hs i + exact hcuts q _ (by positivity) (hcurvSmall _ (by positivity) (by linarith [hsR i])) + + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionOuter.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionOuter.lean new file mode 100644 index 0000000000000000000000000000000000000000..594e51cc97fa7c6db6d28b0b189f20184b9477ef --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledProjectionOuter.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.RCD.Harmonic.GeometricProjectionOuter +import OAI.Geometry.RCD.Harmonic.RescaledRadialFunction + +namespace OAI + +/-! # Uniform outer control after the physical projection rescaling -/ + +open Set Metric MeasureTheory +open scoped ENNReal NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The physical projection and forcing both have size `r²`. Dividing +both by that factor gives the same uniform transport and coefficient bounds; +the radial error retains its natural length scale. -/ +theorem LocalHarmonicL2GradientInput.scaled_projected_residual_outer + {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + [IsFiniteMeasureOnCompacts (hausdorff n X)] + (hinput : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + {κ H V W B J E D : ℝ} (hκ : 0 ≤ κ) (hH : 0 ≤ H) (hV : 0 ≤ V) + (hW : 0 ≤ W) (hB : 0 ≤ B) (hJ : 0 ≤ J) (hE : 0 ≤ E) (Cw : ℝ≥0) : + ∃ G T : ℝ, 0 ≤ G ∧ 0 ≤ T ∧ + ∀ (p : X) (R a r : ℝ), 0 < R → 0 ≤ a → a ≤ (n : ℝ) + 1 → -κ ≤ K * R ^ 2 → 0 < r → + ∀ (f w η e : SobolevSpace (hausdorff n X) hX.quadratic) + (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (N : Euclidean n ≃L[ℝ] Euclidean n) (ell : Euclidean n) (k σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn (hausdorff n X) hX.quadratic (ball p (4 * R)) f a → + ∀ hf : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (4 * R)), + localGamma (hausdorff n X) hX.quadratic f f x ≤ (B * R) ^ 2, + (∀ᵐ x ∂(hausdorff n X).restrict (ball p (4 * R)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic w x| ≤ (Cw : ℝ) * r ^ 2) → + IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) w → + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p (4 * R))] fun _ => (1 : ℝ)) → + 0 < (hausdorff n X).real (ball p R) → + (hausdorff n X).real (ball p R) ≤ V ^ 2 * (hausdorff n X).real (ball p (R / 2)) → + (hausdorff n X).real (ball p (4 * R)) ≤ W ^ 2 * (hausdorff n X).real (ball p R) → + (∀ c v, |c| + R * ‖N.symm v‖ ≤ H * + ‖normalizeLocalL2 (hausdorff n X) (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (affineCoordinateMap (hausdorff n X) hX.quadratic u (ball p (R / 2)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, v))‖) → + (localRadialDerivative (hausdorff n X) hX.quadratic (ball p (4 * R)) f hf w = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) + (w + sobolevColumnMap (hausdorff n X) hX.quadratic u ell + k • η + e)) → + ‖normalizeLocalL2 (hausdorff n X) (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) e)‖ ≤ E * r ^ 2 * σ → + (∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) + (sobolevColumnMap (hausdorff n X) hX.quadratic u b))‖ ≤ J * (R * ‖N.symm b‖)) → + ∀ g : X → ℝ, MemLp g 2 (hausdorff n X) → + localGamma (hausdorff n X) hX.quadratic f + (inwardSobolev (hausdorff n X) hX.quadratic p (3 * R)) =ᵐ[ + (hausdorff n X).restrict (ball p (3 * R))] (fun x => g x - dist p x) → + (hausdorff n X) (sphere p R) = 0 → + (∫ x in ball p (4 * R), (g x) ^ 2 ∂hausdorff n X) ≤ + D ^ 2 * R ^ 2 * (hausdorff n X).real (ball p R) * σ ^ 2 → + |(r ^ 2)⁻¹ * k| + R * ‖N.symm ((r ^ 2)⁻¹ • ell)‖ ≤ G * + (‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) ((r ^ 2)⁻¹ • w))‖ + σ) ∧ + ‖normalizeLocalL2 (hausdorff n X) (ball p (2 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (2 * R)) ((r ^ 2)⁻¹ • w))‖ ≤ T * + (‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) ((r ^ 2)⁻¹ • w))‖ + σ) := by + obtain ⟨G, T, hG, hT, hb⟩ := hinput.projected_residual_outer hn hκ hH hV hW hB hJ hE Cw + refine ⟨G, T, hG, hT, ?_⟩ + intro p R a r hR ha han hcurv hr f w η e u N ell k σ hσ hlap hf hw hwharm hη hpos + hhalf hvol hbound heuler he hU g hg hradial hsphere herror + let c := (r ^ 2)⁻¹ + have hc : 0 < c := inv_pos.mpr (sq_pos_of_pos hr) + have hscaledw : ∀ᵐ x ∂(hausdorff n X).restrict (ball p (4 * R)), + |SobolevSpace.toLp (hausdorff n X) hX.quadratic (c • w) x| ≤ Cw := + rescaled_radial_value (hausdorff n X) hX.quadratic _ w hr hw + have he' : ‖normalizeLocalL2 (hausdorff n X) (ball p (4 * R)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) (c • e))‖ ≤ E * σ := by + rw [map_smul, normalizeLocalL2_smul, norm_smul, Real.norm_eq_abs, abs_of_pos hc] + calc + _ ≤ c * (E * r ^ 2 * σ) := mul_le_mul_of_nonneg_left he hc.le + _ = E * σ := by dsimp only [c]; field_simp + have hid : localRadialDerivative (hausdorff n X) hX.quadratic (ball p (4 * R)) f hf (c • w) = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p (4 * R)) + (c • w + sobolevColumnMap (hausdorff n X) hX.quadratic u (c • ell) + + (c * k) • η + c • e) := by + rw [map_smul, heuler, ← map_smul] + congr 1 + rw [map_smul] + module + exact hb p R a hR ha han hcurv f (c • w) η (c • e) u N (c • ell) (c * k) σ hσ + hlap hf hscaledw (hwharm.smul _ _ c) hη hpos hhalf hvol hbound hid he' + (hU (c • ell)) g hg hradial hsphere herror + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/ScaledRadialEnvironment.lean b/lean/OAI/Geometry/RCD/Harmonic/ScaledRadialEnvironment.lean new file mode 100644 index 0000000000000000000000000000000000000000..4285aed1def9cc4b1313adc1929905478282c8f8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/ScaledRadialEnvironment.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Coordinates.RegularCenterRadialData +import OAI.Geometry.RCD.Harmonic.ScaledProjectionEnvironment + +namespace OAI + +/-! # A common regular neighborhood with uniform radial estimates -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The published inputs yield one actual heat and Poisson environment, +with the radial constants fixed before all requested smallness tolerances. -/ +theorem exists_scaled_radial_environment {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [(hausdorff (m + 2) X).Regular] + {p : X} {a κ : ℝ} (ha : 0 ≤ a) (hκ : 0 ≤ κ) (hK : -κ ≤ K) + (hcompact : PointedRescalingPrecompactness p) (hregular : IsRegular (m + 2) p) + (hvolume : EuclideanRescalingVolumeConvergence (hausdorff (m + 2) X) (m + 2) p + (euclideanUnitVolume (m + 2))) + (hmeasured : EuclideanMeasuredRescalingConvergence (hausdorff (m + 2) X) (m + 2) p) + (hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (hdensity : ∀ y, SmallScaleVolumeUpper (hausdorff (m + 2) X) + (comparisonModelVolume (m + 1) a) y (euclideanUnitVolume (m + 2))) + (hdistance : LocalSquaredDistanceInput hX) (hsobolev : LocalDirichletSobolevInput hX) + (hpoisson : LocalPoissonGradientInput hX) + (hhessian : LocalPoissonHessianInput hX) (hproduct : LocalPoissonGradientProductInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) + (hinitial : LocalInitialSplittingInput hX) (htrans : LocalTransformationInput hX) + (hsplit : LocalFlatSplittingInput hX) (hrigidity : UniformRegularFlatnessInput hX) + (hbochner : LocalHarmonicBochnerInput hX) (hcutoff : LocalGoodCutoffInput hX) + (hharmonic : LocalHarmonicMomentCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + (heuclidean : EuclideanHarmonicHessianInput (m + 2)) + (hmetricmeasure : LocalMeasuredCoordinateInput hX) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff (m + 2) X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff (m + 2) X) ker) + (hdiff : HasGaussianHeatDifferenceBounds (hausdorff (m + 2) X) ker) : + letI : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + ∃ c : RegularHeatConstants (m + 2), ∃ B J C A Cχ Cg D Ca : ℝ, + 0 < B ∧ 0 < J ∧ 1 ≤ C ∧ 0 < A ∧ 1 ≤ Cχ ∧ 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ + ∀ zeta eta cap : ℝ, 0 < zeta → + radialNormalizationRestrictionConstant (m + 2) * zeta ≤ 1 → + ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * zeta) ≤ 1 / 64 → + 0 < eta → 0 < cap → + ∃ e : RegularProjectionEnvironment hX p hk a κ B J C A Cχ 1 zeta eta, + e.heat.radius ≤ cap ∧ c.Matches e.heat ∧ ∀ q ∈ ball p (e.heat.radius / 32), + Nonempty (RegularCenterRadialData hX e.heat κ B J C A Cχ eta Cg D Ca q) := by + let : IsLocallyFiniteMeasure (hausdorff (m + 2) X) := + locallyFinite_of_finiteOnBounded _ hX.finiteOnBounded + obtain ⟨c, B, J, C, A, Cχ, hB, hJ, hC, hA, hCχ, hconstruct⟩ := + exists_scaled_projection_environment m hX ha hκ hK hcompact hregular + hvolume hmeasured hBG hdensity hdistance hsobolev hpoisson hinitial htrans hsplit + hrigidity hbochner hcutoff hhessian hproduct hharmonic hgradient heuclidean hmetricmeasure hk hg hdiff + obtain ⟨Cg, D, Ca, hCg, hD, hCa, hrows⟩ := regular_center_radial_constants m hX hhessian + hmean hgradient hB.le hJ.le hA.le (zero_le_one.trans hCχ) (show 0 < c.degree from lt_of_lt_of_le (by norm_num) c.degree_ge_three) + refine ⟨c, B, J, C, A, Cχ, Cg, D, Ca, hB, hJ, hC, hA, hCχ, hCg, hD, hCa, ?_⟩ + intro zeta eta cap hzeta hsmall1 hsmall heta hcap + obtain ⟨e, hecap, hmatch⟩ := hconstruct zeta eta cap hzeta heta hcap + exact ⟨e, hecap, hmatch, hrows ha hκ hK hzeta.le hsmall1 hsmall hBG e hmatch.1⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SharpProjectionFamily.lean b/lean/OAI/Geometry/RCD/Harmonic/SharpProjectionFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3c04aa64ea9fb3e3f9090fac6cd4c29ba618b6f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SharpProjectionFamily.lean @@ -0,0 +1,141 @@ +import OAI.Geometry.RCD.Sobolev.NoProjectedEulerSequence +import OAI.Geometry.RCD.Coordinates.RelativeErrorNormalization + +namespace OAI + +/-! # The uniform sharp projection bound from the proved analytic estimates + +The Poisson, normalization and radial transport estimates provide a common +coordinate frame, residual bounds and an approximate Euler equation. +-/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal InnerProductSpace Topology BigOperators + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The precise analytic data used in the sharp-projection contradiction. +The residual is the actual orthogonal projection residual. -/ +structure SharpProjectionFamily {K : ℝ} {n : ℕ} (hX : NoncollapsedRCD K n X) + (I : Type*) (S ρ : ℝ) where + center : I → X + radius : I → ℝ + error : I → ℝ + source : I → ℝ + coordinates : I → Fin n → SobolevSpace (hausdorff n X) hX.quadratic + coordinateValues : I → X → Euclidean n + radial : I → SobolevSpace (hausdorff n X) hX.quadratic + target : I → SobolevSpace (hausdorff n X) hX.quadratic + residual : I → SobolevSpace (hausdorff n X) hX.quadratic + forcing : I → SobolevSpace (hausdorff n X) hX.quadratic + coefficient : I → Euclidean n + constant : I → ℝ + size : I → ℝ + radialBound : ℝ + outerConstant : ℝ + coefficientConstant : ℝ + sourceConstant : ℝ + radius_pos : ∀ i, 0 < radius i + curvature : ∀ i, -1 ≤ K * radius i ^ 2 + error_pos : ∀ i, 0 < error i + source_pos : ∀ i, 0 < source i + radialBound_nonneg : 0 ≤ radialBound + outerConstant_nonneg : 0 ≤ outerConstant + coefficientConstant_nonneg : 0 ≤ coefficientConstant + measured : ∀ i, IsMeasuredEuclideanApproximation (hausdorff n X) n + (center i) (radius i) S (error i) (coordinateValues i) + representative : ∀ i j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (coordinates i j) =ᵐ[ + (hausdorff n X).restrict (ball (center i) (S * radius i))] fun x => coordinateValues i x j + laplacianCoefficient : I → ℝ + laplacianCoefficient_bound : ∀ i, |laplacianCoefficient i| ≤ radialBound + laplacian : ∀ i, IsConstantLaplacianOn (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (radial i) (laplacianCoefficient i / radius i ^ 2) + radial_norm : ∀ i, ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (radial i))‖ ≤ radialBound + gradient : ∀ i, ∀ᵐ x ∂(hausdorff n X).restrict (ball (center i) (S * radius i)), + localGamma (hausdorff n X) hX.quadratic (radial i) (radial i) x ≤ radialBound / radius i ^ 2 + quadratic_error : ∀ i, ((hausdorff n X).real (ball (center i) (S * radius i)))⁻¹ * + (∫ x in ball (center i) (S * radius i), + (SobolevSpace.toLp (hausdorff n X) hX.quadratic (radial i) x - + ‖coordinateValues i x‖ ^ 2 / 2) ^ 2 ∂hausdorff n X) ≤ error i + harmonic : ∀ i, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (residual i) + projection : ∀ i, SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (ρ * radius i)) (residual i) = + affineResidual (hausdorff n X) hX.quadratic (coordinates i) + (ball (center i) (ρ * radius i)) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (ρ * radius i)) (target i)) + size_eq : ∀ i, size i = ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (ρ * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (ρ * radius i)) (residual i))‖ + outer_bound : ∀ i, ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (residual i))‖ ≤ outerConstant * (size i + source i) + coefficient_bound : ∀ i, ‖coefficient i‖ + |constant i| ≤ coefficientConstant * (size i + source i) + forcing_bound : ∀ i, ‖normalizeLocalL2 (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (forcing i))‖ ≤ sourceConstant * source i + euler_identity : ∀ i, radius i ^ 2 • localRadialDerivative (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (radial i) (gradient i) (residual i) = + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball (center i) (S * radius i)) (residual i) + + (∑ j, coefficient i j • SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (center i) (S * radius i)) (coordinates i j)) + + constant i • restrictedOne (hausdorff n X) (ball (center i) (S * radius i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + + SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball (center i) (S * radius i)) (forcing i) + +/-- The radial potentials and coordinates form a compactness sequence; +the accompanying harmonic function is chosen to be zero. -/ +def SharpProjectionFamily.compactnessSequence {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + {I : Type*} {S ρ : ℝ} (d : SharpProjectionFamily hX I S ρ) + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) (hS : 0 < S) + (t : ℕ → I) (ht : Tendsto (d.error ∘ t) atTop (𝓝 0)) : RadialCompactnessSequence hX S where + center := d.center ∘ t + radius := d.radius ∘ t + error := d.error ∘ t + coordinates := d.coordinates ∘ t + coordinateValues := d.coordinateValues ∘ t + harmonicFunction := fun _ => 0 + radialFunction := d.radial ∘ t + radius_pos := fun i => d.radius_pos (t i) + curvature := fun i => d.curvature (t i) + error_pos := fun i => d.error_pos (t i) + error_zero := ht + measured := fun i => d.measured (t i) + representative := fun i => d.representative (t i) + harmonic := by + intro i φ hφ + simp [energyForm] + outer_norm := by intro i; simp [normalizeLocalL2] + interior_energy := by + intro a ha haS + obtain ⟨C, hC, hb⟩ := hgradient.rescaled_interior_energy hn hS ha haS + refine ⟨C, hC, fun i => hb _ _ (d.radius_pos (t i)) (d.curvature (t i)) 0 ?_ ?_⟩ + · intro φ hφ; simp [energyForm] + · simp [normalizeLocalL2] + radial_bounds := by + refine ⟨d.radialBound, d.laplacianCoefficient ∘ t, d.radialBound_nonneg, fun i => + ⟨d.laplacianCoefficient_bound (t i), d.laplacian (t i), d.radial_norm (t i), ?_⟩⟩ + filter_upwards [d.gradient (t i)] with x hx + exact (mul_le_mul_of_nonneg_left hx (sq_nonneg _)).trans_eq (by + dsimp only [Function.comp_apply] + field_simp [(d.radius_pos (t i)).ne']) + quadratic_limit := by + exact squeeze_zero + (fun i => mul_nonneg (by positivity) (integral_nonneg fun _ => sq_nonneg _)) + (fun i => d.quadratic_error (t i)) ht + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SignedRadialWeight.lean b/lean/OAI/Geometry/RCD/Harmonic/SignedRadialWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..4db235e76198eb30d56b8c6cf878d0793fc229ac --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SignedRadialWeight.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.RCD.Heat.HeatOffDiagonalL2 + +namespace OAI + +/-! # Signed radial exponential weights for the Davies estimate + +Both signs of the bounded distance weight are needed when the two +half-time density rows are paired. No heat-kernel estimate is assumed. +-/ + +open Set Filter MeasureTheory Metric +open scoped NNReal ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] + +theorem radialWeight_signed_bound (p : X) (a : ℝ) {R : ℝ} (hR : 0 ≤ R) (x : X) : + |radialWeight p a R x| ≤ Real.exp (|a| *R) := by + rw [abs_of_nonneg (radialWeight_nonneg p a R x)] + apply Real.exp_le_exp.mpr + have hm : 0 ≤ min (dist p x) R := le_min dist_nonneg hR + exact (mul_le_mul_of_nonneg_right (le_abs_self a) hm).trans + (mul_le_mul_of_nonneg_left (min_le_right _ _) (abs_nonneg a)) + +theorem radialWeight_signed_lipschitz (p : X) (a : ℝ) {R : ℝ} (hR : 0 ≤ R) : + LipschitzWith ⟨|a| *Real.exp (|a| *R), by positivity⟩ (radialWeight p a R) := by + have hmin := (LipschitzWith.dist_right p).min_const R + have hl := lipschitzWith_const_mul_real hmin a + have hex : LipschitzOnWith ⟨Real.exp (|a| *R), (Real.exp_pos _).le⟩ Real.exp (Iic (|a| *R)) := by + apply (convex_Iic _).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun x _ => (Real.hasDerivAt_exp x).hasDerivWithinAt) + intro x hx + change |Real.exp x| ≤ Real.exp (|a| *R) + rw [abs_of_pos (Real.exp_pos _)] + exact Real.exp_le_exp.mpr hx + have hub (x : X) : a*min (dist p x) R ≤ |a| *R := by + have hm : 0 ≤ min (dist p x) R := le_min dist_nonneg hR + exact (mul_le_mul_of_nonneg_right (le_abs_self a) hm).trans + (mul_le_mul_of_nonneg_left (min_le_right _ _) (abs_nonneg a)) + apply LipschitzWith.of_dist_le_mul + intro x y + have hh := hex.dist_le_mul _ (hub x) _ (hub y) + have hv := mul_le_mul_of_nonneg_left (hl.dist_le_mul x y) (Real.exp_pos (|a| *R)).le + simp only [coe_nnnorm,Real.norm_eq_abs,mul_one] at hv + exact hh.trans (by + change Real.exp (|a| *R)*dist (a*min (dist p x) R) (a*min (dist p y) R) ≤ + |a| *Real.exp (|a| *R)*dist x y + nlinarith only [hv]) + +theorem radialWeight_signed_slope (p : X) (a R : ℝ) (x : X) : + localSlope (radialWeight p a R) x ≤ ENNReal.ofReal (|a| *radialWeight p a R x) := by + let u := fun x => a*min (dist p x) R + have hu : LipschitzWith ‖a‖₊ u := by + simpa only [mul_one] using lipschitzWith_const_mul_real ((LipschitzWith.dist_right p).min_const R) a + have hs := localSlope_comp_hasDerivAt (Real.hasDerivAt_exp (u x)) hu.continuous.continuousAt + (ne_top_of_le_ne_top ENNReal.coe_ne_top (localSlope_le_of_lipschitz hu x)) + change localSlope (radialWeight p a R) x ≤ _ at hs + rw [abs_of_pos (Real.exp_pos _)] at hs + apply hs.trans + calc + _ ≤ ENNReal.ofReal (radialWeight p a R x)*ENNReal.ofReal |a| := by + apply mul_le_mul' le_rfl + have he : ENNReal.ofReal |a| = (‖a‖₊ : ℝ≥0∞) := by + rw [← Real.norm_eq_abs, ofReal_norm, enorm_eq_nnnorm] + rw [he] + exact localSlope_le_of_lipschitz hu x + _ = _ := by rw [← ENNReal.ofReal_mul (radialWeight_nonneg p a R x)]; congr 1; ring + +variable [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + +theorem heatAt_signed_radialWeight_integral (f : Lp ℝ 2 μ) (p : X) + (a : ℝ) {R t : ℝ} (hR : 0 ≤ R) (ht : 0 ≤ t) : + Integrable (fun x => radialWeight p a R x*(heatAt μ hQ t f x)^2) μ ∧ + (∫ x, radialWeight p a R x*(heatAt μ hQ t f x)^2 ∂μ) ≤ + Real.exp (a^2/2*t)*(∫ x, radialWeight p a R x*(f x)^2 ∂μ) := by + have hv := radialWeight_signed_lipschitz p a hR + let B : ℝ≥0 := ⟨Real.exp (|a| *R), (Real.exp_pos _).le⟩ + have hb (x : X) : |radialWeight p a R x| ≤ B := radialWeight_signed_bound p a hR x + let V := boundedMultiplier μ (radialWeight p a R) hv.continuous.measurable B hb + have hV : V =ᵐ[μ] radialWeight p a R := boundedMultiplier_coe μ _ _ _ _ + have hh := heatAt_weighted_bound μ hQ f hv (Real.exp (a*R)) + (radialWeight_constant_outside p a R) hb (radialWeight_nonneg p a R) + V hV (abs_nonneg a) (radialWeight_signed_slope p a R) ht + have hi := lpMultiplier_integral_sq μ V (heatAt μ hQ t f) hV + have hi0 := lpMultiplier_integral_sq μ V f hV + rw [hi.2,hi0.2,sq_abs] at hh + exact ⟨hi.1,hh⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SmallRadialVolume.lean b/lean/OAI/Geometry/RCD/Harmonic/SmallRadialVolume.lean new file mode 100644 index 0000000000000000000000000000000000000000..921d7950780de222e0a60d9878d9f9b46d6c3801 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SmallRadialVolume.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.RCD.Metric.VolumeDensity + +namespace OAI + +/-! # Ball volumes vanish at shrinking radii -/ + +open Set Metric MeasureTheory Filter +open scoped Topology + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + +theorem NoncollapsedRCD.ball_volume_tendsto_zero {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) (hn : 2 ≤ n) (p : X) + {s : ℕ → ℝ} (hs : ∀ i, 0 < s i) (hszero : Tendsto s atTop (𝓝 0)) : + Tendsto (fun i => (hausdorff n X).real (ball p (s i))) atTop (𝓝 0) := by + have hn0 : n ≠ 0 := by omega + have hc : Continuous (fun r : ℝ => (euclideanUnitVolume n * + Real.exp (2 * r * Real.sqrt (|K| / ((n : ℝ) - 1))) ^ n) * r ^ n) := by fun_prop + have hlim : Tendsto (fun i => (euclideanUnitVolume n * + Real.exp (2 * s i * Real.sqrt (|K| / ((n : ℝ) - 1))) ^ n) * s i ^ n) + atTop (𝓝 0) := by + simpa only [mul_zero, zero_mul, Real.exp_zero, one_pow, mul_one, zero_pow hn0, + Function.comp_def] using hc.continuousAt.tendsto.comp hszero + exact squeeze_zero (fun _ => measureReal_nonneg) + (fun i => hX.normalized_ball_volume_upper hn p (hs i)) hlim + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SmoothHarmonicModelCompactness.lean b/lean/OAI/Geometry/RCD/Harmonic/SmoothHarmonicModelCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..0408b58a837b16b5013d717de10b8523b0ff866b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SmoothHarmonicModelCompactness.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.RCD.Harmonic.HarmonicModelCompactness +import OAI.Geometry.RCD.Sobolev.EuclideanWeakHarmonicSmooth + +namespace OAI + +/-! # Actual Euclidean harmonic models under the original curvature-scale bound + +The normalized harmonic model, finite affine moments and smooth value +pairings are constructed without any restriction on the limiting radii. +-/ + +open Set Metric Filter MeasureTheory InnerProductSpace +open scoped Topology NNReal ContDiff +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.harmonic_model_compactness_smooth {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2≤n) + {S : ℝ} (hS : 0 v k x j) + (hw : ∀ k, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball (p k) (S*r k)) (w k)) + (hnorm : ∀ k, harmonicTargetNorm hX (p k) (S*r k) (w k)≤1) : + ∃ a : ℕ → ℕ, StrictMono a ∧ ∃ model : EuclideanHarmonicModel n S, + ContDiffOn ℝ ∞ model.value (ball 0 S) ∧ + (∀ W + inner ℝ (localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne i) + (localAffineMomentFamily (hausdorff n X) hX.quadratic (u (a k)) (w (a k)) + (ball (p (a k)) (ρ*r (a k))) (hX.finiteOnBounded _ isBounded_ball).ne j)) + atTop (𝓝 (inner ℝ (model.moments hρS.le i) (model.moments hρS.le j)))) ∧ + ∀ ψ : Euclidean n → ℝ, InteriorSmoothTest n S ψ → + Tendsto (fun k => ((hausdorff n X).real (ball (p (a k)) (S*r (a k))))⁻¹* + ∫ x in ball (p (a k)) (S*r (a k)), ψ (v (a k) x)* + SobolevSpace.toLp (hausdorff n X) hX.quadratic (w (a k)) x ∂hausdorff n X) + atTop (𝓝 ((volume.real (ball (0:Euclidean n) S))⁻¹* + ∫ z in ball 0 S, ψ z*model.value z)) := by + obtain ⟨a,ha,model,hgL,hconv,hmom,htests⟩ := + hX.harmonic_model_compactness hn hS p r ε hr hcurv hε hε1 hεlim u v w hv hrep hw hnorm + have hweak := hX.harmonic_value_limit_weak_of_curvature hn hS (p ∘ a) (r ∘ a) (ε ∘ a) + (fun k => hr (a k)) (fun k => hcurv (a k)) + (fun k => hε (a k)) (fun k => hε1 (a k)) (hεlim.comp ha.tendsto_atTop) + (v ∘ a) (w ∘ a) (fun k => hv (a k)) (fun k => hw (a k)) (fun k => hnorm (a k)) + model.value hgL hconv + exact ⟨a,ha,model,continuous_weak_harmonic_smooth model.harmonic.continuousOn hweak, + hgL,hconv,hmom,htests⟩ + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SpaceTimeLocalSlope.lean b/lean/OAI/Geometry/RCD/Harmonic/SpaceTimeLocalSlope.lean new file mode 100644 index 0000000000000000000000000000000000000000..506ae017422d5b244cb5f04954756b7f58dee25c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SpaceTimeLocalSlope.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Heat.SpaceTimeIncrement +import OAI.Geometry.RCD.Harmonic.QuadraticRateOptimization + +namespace OAI + +/-! # Optimizing a two-time quadratic bound at a differentiability point -/ + +open Set Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] + +theorem spaceTime_localSlope_bound {U : ℝ → X → ℝ} {H : ℝ → ℝ} {x : X} + {K N t d c : ℝ} (hN : 0 < N) (ht : 0 < t) (hc : 0 < c) + (hU : HasDerivAt (fun s => U s x) d t) (hH : ContinuousAt H t) + (hTime : (2*t/N)*d^2 ≤ Real.exp (-2*K*t)*H t) + (hb : ∀ s, 0 < s → ∀ σ, 0 < σ → σ < c → ∀ y, + |U s x-U t y| ≤ σ/2*H s+ + Real.exp (-K*(s+t))*(dist x y^2+2*N*(Real.sqrt s-Real.sqrt t)^2)/(2*σ)) : + (localSlope (U t) x).toReal^2+(2*t/N)*d^2 ≤ Real.exp (-2*K*t)*H t := by + let A := Real.exp (-2*K*t) + let C := H t-2*t*d^2/(N*A) + have hA : 0 < A := Real.exp_pos _ + have hId : A*C=A*H t-(2*t/N)*d^2 := by + dsimp only [C] + field_simp + have hC : 0 ≤ C := by + apply nonneg_of_mul_nonneg_left (a := C) + · rw [mul_comm,hId] + exact sub_nonneg.mpr hTime + · exact hA + have hslope (ell : ℝ) (hell : 0 < ell) : + (localSlope (U t) x).toReal ≤ ell/2*C+A/(2*ell) := by + let α := 2*t*ell*d/(N*A) + let Rp := spaceTimeSlopeRate (fun s => U s x) H K N t α ell + let Rm := spaceTimeSlopeRate (fun s => -U s x) H K N t (-α) ell + have heq : ell/2*H t+Real.exp (-2*K*t)*(1+N*α^2/(2*t))/(2*ell)-α*d = + ell/2*C+A/(2*ell) := optimized_spaceTimeSlopeRate hA hN hell + have hp := spaceTimeSlopeRate_tendsto ht hU hH K N α ell + rw [heq] at hp + have hm := spaceTimeSlopeRate_tendsto ht hU.neg hH K N (-α) ell + rw [show (-(fun s => U s x)) = (fun s => -U s x) from rfl] at hm + have heqm : ell/2*H t+Real.exp (-2*K*t)*(1+N*(-α)^2/(2*t))/(2*ell)-(-α)*(-d) = + ell/2*C+A/(2*ell) := by simpa only [neg_sq,neg_mul_neg] using heq + rw [heqm] at hm + have hlim : Tendsto (fun r => max (Rp r) (Rm r)) (𝓝[>] 0) + (𝓝 (ell/2*C+A/(2*ell))) := by simpa only [max_self,Pi.neg_apply,Rp,Rm] using hp.max hm + apply localSlope_le_of_rate_limit (by positivity) hlim + have htp : ∀ᶠ r in 𝓝 (0:ℝ), 0 < t+α*r := + ((show Continuous (fun r : ℝ => t+α*r) by fun_prop).continuousAt (x := 0)).eventually + (Ioi_mem_nhds (by simpa only [mul_zero,add_zero] using ht)) + have htm : ∀ᶠ r in 𝓝 (0:ℝ), 0 < t+(-α)*r := + ((show Continuous (fun r : ℝ => t+(-α)*r) by fun_prop).continuousAt (x := 0)).eventually + (Ioi_mem_nhds (by simpa only [mul_zero,add_zero] using ht)) + have hsc : ∀ᶠ r in 𝓝 (0:ℝ), ell*r < c := + ((show Continuous (fun r : ℝ => ell*r) by fun_prop).continuousAt (x := 0)).eventually + (Iio_mem_nhds (by simpa only [mul_zero] using hc)) + filter_upwards [self_mem_nhdsWithin,nhdsWithin_le_nhds htp, + nhdsWithin_le_nhds htm,nhdsWithin_le_nhds hsc] with r hr htp htm hsc + intro y hxy + have hp' := spaceTimeSlopeRate_increment hell hr hxy + ((le_abs_self _).trans (hb _ htp _ (mul_pos hell hr) hsc y)) + have hbm : (-U (t+(-α)*r) x)-(-U t y) ≤ ell*r/2*H (t+(-α)*r)+ + Real.exp (-K*((t+(-α)*r)+t))*(dist x y^2+2*N*(Real.sqrt (t+(-α)*r)-Real.sqrt t)^2)/(2*(ell*r)) := by + have hh := (neg_le_abs (U (t+(-α)*r) x-U t y)).trans + (hb _ htm _ (mul_pos hell hr) hsc y) + linarith only [hh] + have hm' := spaceTimeSlopeRate_increment (U := fun s y => -U s y) hell hr hxy hbm + have hpmax : U t x-U t y ≤ max (Rp r) (Rm r)*r := + hp'.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) hr.le) + have hmmax : -U t x-(-U t y) ≤ max (Rp r) (Rm r)*r := + hm'.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hr.le) + exact abs_le.mpr ⟨by linarith only [hmmax],hpmax⟩ + have hs := square_le_of_young_bounds (g := (localSlope (U t) x).toReal) ENNReal.toReal_nonneg hC hA (by + intro ell hell + calc _ ≤ ell/2*C+A/(2*ell) := hslope ell hell + _ = _ := by ring) + rw [hId] at hs + change _ ≤ A*H t + linarith only [hs] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SubtypeL2PairingLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/SubtypeL2PairingLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..69946008e0b9c33221c9a1a50328ef7bdab235c0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SubtypeL2PairingLimit.lean @@ -0,0 +1,38 @@ +import OAI.Analysis.RCDHeat.HeatFisher + +namespace OAI + +/-! # Passing compact subtype tests to the original local L2 pairing -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem local_L2_pairing_limit_of_subtype_tests {s : Set X} (hs : MeasurableSet s) + (hfin : μ s ≠ ∞) (H : ℕ → ℝ → X → ℝ) (G : ℝ → X → ℝ) (δ : ℝ) + (hc : ∀ ψ : ℝ → ℝ, Integrable ψ (volume.restrict (Ioo δ 1)) → + ∀ φ : s → ℝ, Integrable φ (μ.comap Subtype.val) → + Tendsto (fun k => ∫ t in Ioo δ 1, ψ t*∫ x : s, φ x*H k t x ∂μ.comap Subtype.val) + atTop (𝓝 (∫ t in Ioo δ 1, ψ t*∫ x : s, φ x*G t x ∂μ.comap Subtype.val))) : + ∀ ψ : ℝ → ℝ, Integrable ψ (volume.restrict (Ioo δ 1)) → ∀ v : Lp ℝ 2 μ, + Tendsto (fun k => ∫ t in Ioo δ 1, ψ t*∫ x in s, v x*H k t x ∂μ) + atTop (𝓝 (∫ t in Ioo δ 1, ψ t*∫ x in s, v x*G t x ∂μ)) := by + intro ψ hψ v + have hv : IntegrableOn v s μ := lp_integrableOn_of_finite μ v s hfin + have hv' : Integrable (fun x : s => v x) (μ.comap Subtype.val) := + (integrableOn_iff_comap_subtypeVal hs).mp hv + have hh := hc ψ hψ (fun x => v x) hv' + have hf (k : ℕ) (t : ℝ) : + (∫ x : s, v x*H k t x ∂μ.comap Subtype.val) = ∫ x in s, v x*H k t x ∂μ := + integral_subtype_comap hs (fun x => v x*H k t x) + have hg (t : ℝ) : (∫ x : s, v x*G t x ∂μ.comap Subtype.val) = ∫ x in s, v x*G t x ∂μ := + integral_subtype_comap hs (fun x => v x*G t x) + simpa only [hf,hg] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/SupportedCoefficientL2Error.lean b/lean/OAI/Geometry/RCD/Harmonic/SupportedCoefficientL2Error.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a2b7edf342564ab4f37c97a5af99de4a41d73f0 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/SupportedCoefficientL2Error.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.RCD.Sobolev.ContainingMassCutoffErrors + +namespace OAI + +/-! # L2 errors in a coefficient supported in the interior + +The two weak gradients need bounds only on the support of the coefficient. +The original outer-ball normalization is retained. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem supported_coefficient_l2_gamma_error (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + (Ω U : ℕ → Set X) [∀ k, IsFiniteMeasure (μ.restrict (U k))] + (hU : ∀ k, MeasurableSet (U k)) (hsub : ∀ k, Ω k⊆U k) (hmass : ∀ k, 0<μ.real (U k)) + (r : ℕ → ℝ) (hr : ∀ k, 0≤r k) + (f g : ℕ → SobolevSpace μ hQ) (z : ℕ → X → ℝ) + {M L : ℝ} (hM : 0≤M) (hL : 0≤L) + (hf : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), r k^2*localGamma μ hQ (f k) (f k) x≤M^2) + (hg : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), r k^2*localGamma μ hQ (g k) (g k) x≤L^2) + (hz_zero : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (U k), x∉Ω k → z k x=0) + (hz : ∀ k, MemLp (z k) 2 (μ.restrict (U k))) + (hlim : Tendsto (fun k => (μ.real (U k))⁻¹*∫ x in U k, (z k x)^2 ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => r k^2*(μ.real (U k))⁻¹* + ∫ x in U k, z k x*localGamma μ hQ (f k) (g k) x ∂μ) atTop (𝓝 0) := by + let : ∀ k, IsFiniteMeasure (μ.restrict (Ω k)) := fun k => + ⟨(lt_of_le_of_lt (Measure.restrict_mono (hsub k) le_rfl univ) + (measure_lt_top (μ.restrict (U k)) univ))⟩ + have hmass_le (k : ℕ) : μ.real (Ω k)≤μ.real (U k) := + ENNReal.toReal_mono (by + simpa only [Measure.restrict_apply_univ] using (measure_lt_top (μ.restrict (U k)) univ).ne) + (measure_mono (hsub k)) + have hinner : Tendsto (fun k => (μ.real (U k))⁻¹*∫ x in Ω k, (z k x)^2 ∂μ) + atTop (𝓝 0) := by + apply squeeze_zero (fun k => mul_nonneg (inv_nonneg.mpr (hmass k).le) + (integral_nonneg fun _ => sq_nonneg _)) _ hlim + intro k + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (hmass k).le) + exact setIntegral_mono_set (hz k).integrable_sq + (Eventually.of_forall fun x => sq_nonneg _) (Eventually.of_forall (hsub k)) + have he := containing_mass_gamma_l2_error_tendsto μ hQ Ω (fun k => μ.real (U k)) + hmass hmass_le r hr f g z (fun _ _ => 1) hM hL zero_le_one hf hg + (Eventually.of_forall fun _ => Eventually.of_forall fun _ => by norm_num) + (fun k => (hz k).mono_measure (Measure.restrict_mono (hsub k) le_rfl)) + (fun _ => aestronglyMeasurable_const) hinner + have hint : ∀ᶠ k in atTop, + (∫ x in U k, z k x*localGamma μ hQ (f k) (g k) x ∂μ)= + ∫ x in Ω k, z k x*localGamma μ hQ (f k) (g k) x ∂μ := by + filter_upwards [hz_zero] with k hk + apply setIntegral_eq_of_subset_of_ae_sdiff_eq_zero (hU k).nullMeasurableSet (hsub k) + rw [ae_restrict_iff' (hU k)] at hk + filter_upwards [hk] with x hx hxs + rw [hx hxs.1 hxs.2,zero_mul] + have he' : Tendsto (fun k => r k^2*(μ.real (U k))⁻¹* + ∫ x in Ω k, z k x*localGamma μ hQ (f k) (g k) x ∂μ) atTop (𝓝 0) := by + simpa only [one_mul] using he + apply he'.congr' + exact hint.mono fun k hk => congrArg (fun t : ℝ => r k^2*(μ.real (U k))⁻¹*t) hk.symm + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TimeAveragePairing.lean b/lean/OAI/Geometry/RCD/Harmonic/TimeAveragePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a377fdc974cf269b441ce53bbeab72cbd3401bd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TimeAveragePairing.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.RCD.Metric.BoundedTimeAverageIntegral + +namespace OAI + +/-! # Uniform control of averaged endpoint pairings -/ + +open Set Filter MeasureTheory Metric +open scoped Topology NNReal +noncomputable section +namespace RegularPointCoordinates + +theorem time_average_pairing_error + {X Y : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [MeasurableSpace Y] (ν : Measure Y) [IsFiniteMeasure ν] + (H : ℝ → X → ℝ) (hH : Measurable (Function.uncurry H)) + {Ω : Set X} (hΩ : IsCompact Ω) {a b h t : ℝ} {L : ℝ≥0} + (hL : LipschitzOnWith L (Function.uncurry H) (Ioo a b ×ˢ Ω)) + (e : Y → X) (he : Measurable e) (hs : ∀ᵐ y ∂ν, e y ∈ Ω) + (hh : 0 < h) (ha : a < t-h) (hb : t+h < b) : + |(∫ y, timeIntervalAverage (fun q => H q (e y)) h t ∂ν) - + (∫ y, H t (e y) ∂ν)| ≤ ν.real univ*((L:ℝ)*h) := by + have ht : t ∈ Ioo a b := ⟨by linarith,by linarith⟩ + have hc : ContinuousOn (H t) Ω := + hL.continuousOn.comp (continuous_const.prodMk continuous_id).continuousOn + (fun x hx => ⟨ht,hx⟩) + obtain ⟨M,hM⟩ := hΩ.exists_bound_of_continuousOn hc + have hf : StronglyMeasurable (fun p : ℝ × Y => H p.1 (e p.2)) := + (hH.comp (measurable_fst.prodMk (he.comp measurable_snd))).stronglyMeasurable + have hf0 : AEStronglyMeasurable (fun y => H t (e y)) ν := + (hH.comp (measurable_const.prodMk he)).aestronglyMeasurable + have hi0 : Integrable (fun y => H t (e y)) ν := + Integrable.of_bound hf0 M (hs.mono fun y hy => hM (e y) hy) + have hinc (q : ℝ) (hq : q ∈ Icc (t-h) (t+h)) (x : X) (hx : x ∈ Ω) : + |H q x-H t x| ≤ (L:ℝ)*h := by + have hd := hL.dist_le_mul (q,x) ⟨⟨ha.trans_le hq.1,hq.2.trans_lt hb⟩,hx⟩ (t,x) ⟨ht,hx⟩ + simp only [Function.uncurry,Prod.dist_eq,dist_self,Real.dist_eq,max_eq_left (abs_nonneg (q-t))] at hd + exact hd.trans (mul_le_mul_of_nonneg_left + (abs_le.mpr ⟨by linarith [hq.1],by linarith [hq.2]⟩) L.coe_nonneg) + have hbound : ∀ᵐ y ∂ν, ∀ q ∈ Icc (t-h) (t+h), |H q (e y)| ≤ (L:ℝ)*h+M := by + filter_upwards [hs] with y hy q hq + calc + _ ≤ |H q (e y)-H t (e y)|+|H t (e y)| := by + simpa only [sub_add_cancel] using abs_add_le (H q (e y)-H t (e y)) (H t (e y)) + _ ≤ _ := add_le_add (hinc q hq (e y) hy) (by simpa only [Real.norm_eq_abs] using hM (e y) hy) + have hiavg := bounded_time_average_integrable ν (fun q y => H q (e y)) hf hh hbound + rw [← integral_sub hiavg hi0] + calc + _ ≤ ∫ y, |timeIntervalAverage (fun q => H q (e y)) h t-H t (e y)| ∂ν := + abs_integral_le_integral_abs + _ ≤ ∫ _ : Y, (L:ℝ)*h ∂ν := + integral_mono_ae (hiavg.sub hi0).abs (integrable_const _) + (hs.mono fun y hy => timeIntervalAverage_local_lipschitz_error H hL hh ha hb hy) + _ = _ := by rw [integral_const,smul_eq_mul] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TimeQuadraticRate.lean b/lean/OAI/Geometry/RCD/Harmonic/TimeQuadraticRate.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8d84a8fa4f3d074cfdf0896e1f7501216f34c39 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TimeQuadraticRate.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.RCD.Heat.SpaceTimeSlopeRate + +namespace OAI + +/-! # The temporal part of the dimensional quadratic bound -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +def timeQuadraticRate (U H : ℝ → ℝ) (K N t α r : ℝ) : ℝ := + spaceTimeSlopeRate U H K N t α 1 r-Real.exp (-K*((t+α*r)+t))/2 + +theorem timeQuadraticRate_tendsto {U H : ℝ → ℝ} {t d : ℝ} + (ht : 0 < t) (hU : HasDerivAt U d t) (hH : ContinuousAt H t) (K N α : ℝ) : + Tendsto (timeQuadraticRate U H K N t α) (𝓝[>] 0) + (𝓝 (H t/2+Real.exp (-2*K*t)*N*α^2/(4*t)-α*d)) := by + have he : Tendsto (fun r : ℝ => Real.exp (-K*((t+α*r)+t))/2) (𝓝[>] 0) + (𝓝 (Real.exp (-2*K*t)/2)) := by + rw [show -2*K*t = -K*(t+t) by ring] + simpa only [mul_zero,add_zero] using + ((show Continuous (fun r : ℝ => Real.exp (-K*((t+α*r)+t))/2) + by fun_prop).continuousAt (x := 0)).tendsto.mono_left nhdsWithin_le_nhds + have hh := (spaceTimeSlopeRate_tendsto ht hU hH K N α 1).sub he + have heq : 1/2*H t+Real.exp (-2*K*t)*(1+N*α^2/(2*t))/(2*1)-α*d- + Real.exp (-2*K*t)/2 = H t/2+Real.exp (-2*K*t)*N*α^2/(4*t)-α*d := by ring + rw [←heq] + exact hh + +theorem timeQuadraticRate_nonneg {U H : ℝ → ℝ} {K N t α r : ℝ} (hr : 0 < r) + (hb : U (t+α*r)-U t ≤ r/2*H (t+α*r)+ + Real.exp (-K*((t+α*r)+t))*(2*N*(Real.sqrt (t+α*r)-Real.sqrt t)^2)/(2*r)) : + 0 ≤ timeQuadraticRate U H K N t α r := by + have hh := div_nonneg (sub_nonneg.mpr hb) hr.le + convert hh using 1 + dsimp only [timeQuadraticRate,spaceTimeSlopeRate] + field_simp + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TransformedColumns.lean b/lean/OAI/Geometry/RCD/Harmonic/TransformedColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bda15dc3ca0fe5dd5002707346aab1d1133bd01 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TransformedColumns.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.RCD.Coordinates.SplittingApproximation + +namespace OAI + +/-! # Actual Sobolev columns under a coordinate transformation -/ + +open Set MeasureTheory +open scoped BigOperators InnerProductSpace + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- The coefficient map is the adjoint of the map acting on pointwise +coordinate values. -/ +def transformedColumn {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A : Euclidean n →L[ℝ] Euclidean n) : Fin n → SobolevSpace μ hQ := + fun i => sobolevColumnMap μ hQ u (A (EuclideanSpace.single i 1)) + +omit [BorelSpace X] [ProperSpace X] in +theorem sobolevColumnMap_transformed {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A : Euclidean n →L[ℝ] Euclidean n) : + sobolevColumnMap μ hQ (transformedColumn μ hQ u A) = + (sobolevColumnMap μ hQ u).comp A := by + classical + ext v + rw [sobolevColumnMap_apply] + have he : (∑ i : Fin n, v i • EuclideanSpace.single i 1) = v := by + ext j + simp [Pi.single_apply] + have h := congrArg ((sobolevColumnMap μ hQ u).comp A) he + simpa only [map_sum, map_smul, ContinuousLinearMap.comp_apply, transformedColumn] using h + +omit [BorelSpace X] [ProperSpace X] in +/-- Harmonicity of the transformed scalar components follows from actual +linearity in the Sobolev space. -/ +theorem transformedColumn_harmonic {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A : Euclidean n →L[ℝ] Euclidean n) (Ω : Set X) + (hu : ∀ i, IsSobolevHarmonicOn μ hQ Ω (u i)) : + ∀ i, IsSobolevHarmonicOn μ hQ Ω (transformedColumn μ hQ u A i) := by + intro i + exact IsSobolevHarmonicOn.linearCombination μ hQ hu (A (EuclideanSpace.single i 1)) + +/-- The exact normalization identity is the mean Gram identity for the +transformed components themselves. -/ +theorem meanGram_transformed_eq_id {n : ℕ} (u : Fin n → SobolevSpace μ hQ) + (A : Euclidean n ≃L[ℝ] Euclidean n) (s : Set X) (hs : MeasurableSet s) + (hA : IsExactMeanNormalization μ hQ (sobolevColumnMap μ hQ u) s hs A) : + sobolevMeanGram μ hQ (sobolevColumnMap μ hQ (transformedColumn μ hQ u A)) s hs = + ContinuousLinearMap.id ℝ (Euclidean n) := by + rw [sobolevColumnMap_transformed] + exact hA + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLocalization.lean b/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..d353cb1b4a90a2c4672cd4f3a639a163ed90d79e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLocalization.lean @@ -0,0 +1,19 @@ +import OAI.Geometry.RCD.Harmonic.TransverseBarrierLower + +namespace OAI + +/-! # A supporting halfspace localizes the positive transverse test -/ + +open scoped InnerProductSpace +namespace RegularPointCoordinates + +theorem transverse_barrier_localization {n : ℕ} (z a : Euclidean n) {δ d : ℝ} + (hδ : 0<δ) (hd : d≤‖z‖+δ) (hsupport : ⟪z,a⟫_ℝ≤δ) + (hW : -δ<⟪z,a⟫_ℝ) (hS : ‖z‖^2-⟪z,a⟫_ℝ^2<δ^2) : d<3*δ := by + have hw : ⟪z,a⟫_ℝ^2≤δ^2 := by nlinarith + have hz : ‖z‖<2*δ := by nlinarith [norm_nonneg z] + linarith + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLower.lean b/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLower.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8833d3c9a873eab34e2d4b5d4506e514e17679f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TransverseBarrierLower.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Harmonic.FirstOrderTransverseBarrier + +namespace OAI + +/-! # Positive inner mass of the transverse barrier -/ + +open Set Filter MeasureTheory Metric +open scoped InnerProductSpace NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates + +theorem transverse_barrier_pointwise_lower {n : ℕ} (a z : Euclidean n) + (ha : ‖a‖=1) {δ : ℝ} (hδ : 0<δ) (hz : ‖z‖≤δ/2) : + δ^2/2≤(if -δ<⟪z,a⟫_ℝ then max (δ^2-(‖z‖^2-⟪z,a⟫_ℝ^2)) 0 else 0) := by + have hw : |⟪z,a⟫_ℝ|≤δ/2 := by + exact ((abs_real_inner_le_norm z a).trans_eq (by rw [ha,mul_one])).trans hz + have hax : -δ<⟪z,a⟫_ℝ := by linarith [(abs_le.mp hw).1] + rw [ite_eq_left hax] + apply le_trans _ (le_max_left _ _) + have hsq := (sq_le_sq₀ (norm_nonneg z) (by positivity : 0≤δ/2)).mpr hz + nlinarith [sq_nonneg ⟪z,a⟫_ℝ] + +theorem transverse_barrier_integral_lower {X : Type*} [MeasurableSpace X] + (μ : Measure X) {n : ℕ} (a : Euclidean n) (ha : ‖a‖=1) (v : X → Euclidean n) + {Ω A : Set X} (hA : MeasurableSet A) (hsub : A⊆Ω) {δ : ℝ} (hδ : 0<δ) + (hfin : μ A≠∞) + (hI : IntegrableOn (fun x => + if -δ<⟪v x,a⟫_ℝ then max (δ^2-(‖v x‖^2-⟪v x,a⟫_ℝ^2)) 0 else 0) Ω μ) + (hv : ∀ x∈A, ‖v x‖≤δ/2) : + δ^2/2*μ.real A≤∫ x in Ω, + (if -δ<⟪v x,a⟫_ℝ then max (δ^2-(‖v x‖^2-⟪v x,a⟫_ℝ^2)) 0 else 0) ∂μ := by + let I x := if -δ<⟪v x,a⟫_ℝ then max (δ^2-(‖v x‖^2-⟪v x,a⟫_ℝ^2)) 0 else 0 + have hI0 (x : X) : 0≤I x := by dsimp [I]; split_ifs <;> positivity + have hi : (∫ x in A, (δ^2/2:ℝ) ∂μ)≤∫ x in A, I x ∂μ := by + have hcI : IntegrableOn (fun _ : X => (δ^2/2:ℝ)) A μ := integrableOn_const hfin + apply integral_mono_ae hcI (hI.mono_set hsub) + filter_upwards [ae_restrict_mem hA] with x hx + exact transverse_barrier_pointwise_lower a (v x) ha hδ (hv x hx) + have hm : (∫ x in A, I x ∂μ)≤∫ x in Ω, I x ∂μ := + setIntegral_mono_set hI (Eventually.of_forall hI0) (Eventually.of_forall hsub) + have hres := hi.trans hm + simpa only [integral_const,measureReal_restrict_apply_univ,smul_eq_mul,mul_comm] using hres + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TransverseIntegralBound.lean b/lean/OAI/Geometry/RCD/Harmonic/TransverseIntegralBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..6740907a7b1825de926a997cf54a213e71de60ad --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TransverseIntegralBound.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Sobolev.TransverseCutoffFlux +import OAI.Geometry.RCD.Sobolev.TransverseTestError + +namespace OAI + +/-! # A quantitative transverse barrier from the exact compact zero flux -/ + +open Set Filter MeasureTheory Metric +open scoped NNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) (Q : QuadraticCheegerEnergy μ) + +theorem harmonic_transverse_integral_bound + (w f η : SobolevSpace μ Q) {Ω : Set X} (hΩ : IsOpen Ω) + (hw : IsSobolevHarmonicOn μ Q Ω w) (W S : X → ℝ) (δ c : ℝ) + (hf : SobolevSpace.toLp μ Q f =ᵐ[μ.restrict Ω] + fun x => max (W x+δ) 0*max (c-S x) 0) + {χ : X → ℝ} {L : ℝ≥0} (hχ : LipschitzWith L χ) + (hs : HasCompactSupport χ) (hb : ∀ x, |χ x|≤(1:ℝ≥0)) (hn : ∀ x, 0≤χ x) + (hsΩ : tsupport χ⊆Ω) (hη : SobolevSpace.toLp μ Q η =ᵐ[μ] χ) + (hplateau : ∀ x∈Ω, -δ if -δ if -δ positivity + have hbound : ∀ᵐ x ∂μ.restrict Ω, I x≤F x+E x := by + filter_upwards [herror,hE0,ae_restrict_mem hΩ.measurableSet] with x hx hEx hxΩ + have hχ1 : χ x≤1 := (le_abs_self _).trans (hb x) + have hχI : χ x*I x=I x := by + dsimp [I] + by_cases hax : -δ (1:ℝ)) + (hww : localGamma μ Q w w =ᵐ[μ.restrict Ω] fun _ => (1:ℝ)) + (hsw : localGamma μ Q s w =ᵐ[μ.restrict Ω] fun _ => (0:ℝ)) + (δ c : ℝ) : + let P := (w+δ • η).upperPositivePart μ Q (le_refl (0:ℝ)) + let T := (c • η-s).upperPositivePart μ Q (le_refl (0:ℝ)) + ∀ (A B : ℝ≥0) + (_hA : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q P x|≤A) + (_hB : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ Q T x|≤B), + localGamma μ Q (SobolevSpace.product μ Q P T A B) w =ᵐ[μ.restrict Ω] + fun x => if -δ (0:ℝ) := by + filter_upwards [hη,ae_restrict_of_ae (localGamma_zero_on_level μ Q η w 1)] with x hx hz + exact hz hx + have hu : SobolevSpace.toLp μ Q U =ᵐ[μ.restrict Ω] fun x => W x+δ := by + change SobolevSpace.toLpCLM μ Q (w+δ • η) =ᵐ[μ.restrict Ω] _ + rw [map_add,map_smul] + filter_upwards [hW,hη,ae_restrict_of_ae (Lp.coeFn_add (SobolevSpace.toLp μ Q w) + (δ • SobolevSpace.toLp μ Q η)),ae_restrict_of_ae (Lp.coeFn_smul δ (SobolevSpace.toLp μ Q η))] + with x hw hηx ha hs + change (SobolevSpace.toLp μ Q w+δ • SobolevSpace.toLp μ Q η) x=W x+δ + simp only [ha,Pi.add_apply,hs,Pi.smul_apply,smul_eq_mul,hw,hηx,mul_one] + have hv : SobolevSpace.toLp μ Q V =ᵐ[μ.restrict Ω] fun x => c-S x := by + change SobolevSpace.toLpCLM μ Q (c • η-s) =ᵐ[μ.restrict Ω] _ + rw [map_sub,map_smul] + filter_upwards [hS,hη,ae_restrict_of_ae (Lp.coeFn_sub (c • SobolevSpace.toLp μ Q η) + (SobolevSpace.toLp μ Q s)),ae_restrict_of_ae (Lp.coeFn_smul c (SobolevSpace.toLp μ Q η))] + with x hs hηx hsub hsm + change (c • SobolevSpace.toLp μ Q η-SobolevSpace.toLp μ Q s) x=c-S x + simp only [hsub,Pi.sub_apply,hsm,Pi.smul_apply,smul_eq_mul,hs,hηx,mul_one] + have hUw : localGamma μ Q U w =ᵐ[μ.restrict Ω] fun _ => (1:ℝ) := by + filter_upwards [hww,he,ae_restrict_of_ae (localGamma_add_left μ Q w (δ • η) w), + ae_restrict_of_ae (localGamma_smul_left μ Q δ η w)] with x hw he hx hs + change localGamma μ Q (w+δ • η) w x=1 + simp only [hx,hs,hw,he,mul_zero,add_zero] + have hVw : localGamma μ Q V w =ᵐ[μ.restrict Ω] fun _ => (0:ℝ) := by + filter_upwards [hsw,he,ae_restrict_of_ae (localGamma_sub_left μ Q (c • η) s w), + ae_restrict_of_ae (localGamma_smul_left μ Q c η w)] with x hw he hx hs + change localGamma μ Q (c • η-s) w x=0 + simp only [hx,hs,hw,he,mul_zero,sub_zero] + filter_upwards [hu,hv,hUw,hVw, + ae_restrict_of_ae (localGamma_upperPositivePart μ Q U w (le_refl (0:ℝ))), + ae_restrict_of_ae (localGamma_upperPositivePart μ Q V w (le_refl (0:ℝ))), + ae_restrict_of_ae (V.upperPositivePart_coe μ Q (le_refl (0:ℝ))), + ae_restrict_of_ae (localGamma_product_left μ Q P T w A B hA hB)] + with x hu hv hUw hVw hP hT hTv hp + rw [hp] + change localGamma μ Q (U.upperPositivePart μ Q (le_refl (0:ℝ))) w x=_ at hP + change localGamma μ Q (V.upperPositivePart μ Q (le_refl (0:ℝ))) w x=_ at hT + have hTc : SobolevSpace.toLp μ Q T x=max (c-S x) 0 := by + simpa only [upperLevelPart,hv,sub_zero] using hTv + rw [hP,hT,hUw,hVw,hTc,hu] + simp only [ite_self,mul_zero,zero_add] + by_cases hx : -δ V x j) → + ∀ η : SobolevSpace (hausdorff n X) hX.quadratic, + (SobolevSpace.toLp (hausdorff n X) hX.quadratic η =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun _ => (1 : ℝ)) → + ∀ (A B : Euclidean n →L[ℝ] Euclidean n) (c : Euclidean n →L[ℝ] ℝ) (d : ℝ), + 0 ≤ d → ‖A - 1‖ ≤ 1 / 4 → + (∀ b, ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (sobolevColumnMap (hausdorff n X) hX.quadratic u ((A * B - B * (A - 1)) b) - + c ((A - 1) b) • η))‖ ≤ d * ‖b‖) → + ‖B‖ ≤ 2 * ‖N.toContinuousLinearMap‖ * (Cg / R * d) ∧ + ‖c.comp (A - 1)‖ ≤ Cm * d := by + obtain ⟨Cg, hCg, hcoeff⟩ := hgradient.covector_coefficient_recovery hn hκ + obtain ⟨Cm, hCm, hconst⟩ := hmean.affine_constant_operator_bound hn hκ + refine ⟨Cg, Cm, hCg, hCm, ?_⟩ + intro p R hR hcurv u V N hN hu hV hVp hrep η hη A B c d hd hA herror + let T := A * B - B * (A - 1) + let c' := -(c.comp (A - 1)) + have he (b) : c' b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u (T b) = + sobolevColumnMap (hausdorff n X) hX.quadratic u (T b) - c ((A - 1) b) • η := by + simp only [c', neg_apply, ContinuousLinearMap.comp_apply, neg_smul] + module + have herr (b) : ‖normalizeLocalL2 (hausdorff n X) (ball p R) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic (ball p R) + (c' b • η + sobolevColumnMap (hausdorff n X) hX.quadratic u (T b)))‖ ≤ d * ‖b‖ := by + rw [he] + exact herror b + refine ⟨hcoeff p R hR hcurv u N hN hu η hη A B c' d hd hA herr, ?_⟩ + have hc := hconst p R hR hcurv u V hu hV hVp hrep η hη T c' d hd herr + simpa only [c', norm_neg] using hc + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TwoCenterCommutator.lean b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterCommutator.lean new file mode 100644 index 0000000000000000000000000000000000000000..81b93e05d358ff216d4304a6f44a47901d626ded --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterCommutator.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Coordinates.MatrixNormConversion + +namespace OAI + +/-! +# The two-center commutator estimate + +Near-identity radial matrices allow absorption of the commutator error. +The constant coefficient then recovers the coordinate difference between +the two centers with an error proportional to the same defect. +-/ + +noncomputable section + +namespace RegularPointCoordinates + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Near the identity, the commutator appearing in the two-center radial +identities controls the difference of the two normalization matrices. -/ +theorem radial_commutator_norm_le (A B : E →L[ℝ] E) + (hA : ‖A - 1‖ ≤ 1 / 4) {η : ℝ} + (herror : ‖B * A - (A - 1) * B‖ ≤ η) : ‖B‖ ≤ 2 * η := by + have hid : B = (B * A - (A - 1) * B) - + (B * (A - 1) - (A - 1) * B) := by noncomm_ring + have htriangle : ‖B‖ ≤ ‖B * A - (A - 1) * B‖ + + (‖B‖ * ‖A - 1‖ + ‖A - 1‖ * ‖B‖) := by + calc + ‖B‖ = ‖(B * A - (A - 1) * B) - + (B * (A - 1) - (A - 1) * B)‖ := congrArg norm hid + _ ≤ ‖B * A - (A - 1) * B‖ + ‖B * (A - 1) - (A - 1) * B‖ := + norm_sub_le _ _ + _ ≤ _ := add_le_add le_rfl + ((norm_sub_le (B * (A - 1)) ((A - 1) * B)).trans + (add_le_add (norm_mul_le _ _) (norm_mul_le _ _))) + have hsmall := mul_le_mul_of_nonneg_left hA (norm_nonneg B) + nlinarith + +/-- An approximate identity controls vectors from below without choosing +an inverse. -/ +theorem norm_le_two_mul_norm_of_near_id (A : E →L[ℝ] E) + (hA : ‖A - 1‖ ≤ 1 / 2) (v : E) : ‖v‖ ≤ 2 * ‖A v‖ := by + have hdiff : v = A v - (A - 1) v := by simp + have htriangle : ‖v‖ ≤ ‖A v‖ + ‖A - 1‖ * ‖v‖ := by + calc + ‖v‖ = ‖A v - (A - 1) v‖ := congrArg norm hdiff + _ ≤ ‖A v‖ + ‖(A - 1) v‖ := norm_sub_le _ _ + _ ≤ _ := add_le_add le_rfl ((A - 1).le_opNorm v) + have hsmall := mul_le_mul_of_nonneg_right hA (norm_nonneg v) + nlinarith + +/-- The constant recovered from the radial identities is close to the +actual coordinate difference, with error proportional to the same defect. -/ +theorem two_center_constant_recovery (Ax Az : E →L[ℝ] E) (δ c : E) + (hx : ‖Ax - 1‖ ≤ 1 / 2) (hz : ‖Az - 1‖ ≤ 1 / 4) + (hc : c = Ax δ) {η M : ℝ} (hM : ‖c‖ ≤ M) + (hcomm : ‖(Az - Ax) * Az - (Az - 1) * (Az - Ax)‖ ≤ η) + (hconst : ‖(Az - 1) c‖ ≤ η) : + ‖Az - Ax‖ ≤ 2 * η ∧ ‖δ - c‖ ≤ 2 * η * (1 + 2 * M) := by + have hB := radial_commutator_norm_le Az (Az - Ax) hz hcomm + have hη : 0 ≤ η := (norm_nonneg _).trans hconst + refine ⟨hB, ?_⟩ + have hid : (Ax - 1) c = (Az - 1) c - (Az - Ax) c := by simp + have hforce : ‖(Ax - 1) c‖ ≤ η + 2 * η * M := by + calc + ‖(Ax - 1) c‖ = ‖(Az - 1) c - (Az - Ax) c‖ := congrArg norm hid + _ ≤ ‖(Az - 1) c‖ + ‖(Az - Ax) c‖ := norm_sub_le _ _ + _ ≤ η + ‖Az - Ax‖ * ‖c‖ := add_le_add hconst ((Az - Ax).le_opNorm c) + _ ≤ _ := add_le_add le_rfl (mul_le_mul hB hM (norm_nonneg c) (by positivity)) + have hidentity : Ax (δ - c) = -((Ax - 1) c) := by rw [map_sub, ← hc]; simp + have hlower := norm_le_two_mul_norm_of_near_id Ax hx (δ - c) + rw [hidentity, norm_neg] at hlower + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TwoCenterDirectionEstimate.lean b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterDirectionEstimate.lean new file mode 100644 index 0000000000000000000000000000000000000000..4bfa720b29328e181dcb7acd1e31cbdd05103c49 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterDirectionEstimate.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.RCD.Coordinates.TwoCenterCommutatorFit +import OAI.Geometry.RCD.Harmonic.TwoCenterAffineRecovery +import OAI.Geometry.RCD.Harmonic.ConstantDirectionError + +namespace OAI + +/-! # Absorbing the two-center commutator and recovering the direction -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The term involving the unknown matrix difference is absorbed using +the small radial value error. The resulting direction estimate uses the +same representatives as the two radial fits. -/ +theorem two_center_direction_estimate {K : ℝ} {n : ℕ} + {hX : NoncollapsedRCD K n X} + (hgradient : LocalHarmonicL2GradientInput hX) + (hmean : LocalHarmonicL2MeanValueInput hX) (hn : 2 ≤ n) + {κ : ℝ} (hκ : 0 ≤ κ) : + ∃ Cg Cm : ℝ, 1 ≤ Cg ∧ 1 ≤ Cm ∧ + ∀ (p : X) (R : ℝ), 0 < R → -κ ≤ K * R ^ 2 → + ∀ (u : Fin n → SobolevSpace (hausdorff n X) hX.quadratic) + (V : X → Euclidean n) (N : Euclidean n ≃L[ℝ] Euclidean n), + IsExactMeanNormalization (hausdorff n X) hX.quadratic + (sobolevColumnMap (hausdorff n X) hX.quadratic u) + (ball p (R / 2)) measurableSet_ball N → + (∀ j, IsSobolevHarmonicOn (hausdorff n X) hX.quadratic (ball p R) (u j)) → + ContinuousOn V (ball p R) → V p = 0 → + (∀ j, SobolevSpace.toLp (hausdorff n X) hX.quadratic (u j) =ᵐ[ + (hausdorff n X).restrict (ball p R)] fun x => V x j) → + ∀ (eta fz fx : SobolevSpace (hausdorff n X) hX.quadratic) + (Gz Gx : Euclidean n →L[ℝ] SobolevSpace (hausdorff n X) hX.quadratic) + (Az Ax : Euclidean n →L[ℝ] Euclidean n) (c d : Euclidean n →L[ℝ] ℝ) + (Cf Cv Ez Ex Dz Dx Hcoord Mconst Com : ℝ), + let μ := hausdorff n X + let U := sobolevColumnMap μ hX.quadratic u + let Ω := ball p R + let hfin := ne_of_lt (hX.finiteOnBounded Ω isBounded_ball) + let a := 2 * ‖N.toContinuousLinearMap‖ * (Cg / R) + let e := Cv * Real.sqrt Dz + Real.sqrt Com + Cf * Real.sqrt (2 * Dz + 2 * Dx) + + Real.sqrt (2 * Ez + 2 * Ex) * ‖Az - 1‖ + 0 ≤ Cf → 0 ≤ Cv → 0 ≤ Ez → 0 ≤ Ex → 0 ≤ Dz → 0 ≤ Dx → 0 ≤ Hcoord → 0 ≤ Com → + ‖Az - 1‖ ≤ 1 / 4 → ‖Ax - 1‖ ≤ 1 / 2 → a * Real.sqrt Ez ≤ 1 / 2 → + c = d.comp Ax → ‖c‖ ≤ Mconst → + (SobolevSpace.toLp μ hX.quadratic eta =ᵐ[μ.restrict Ω] fun _ => (1 : ℝ)) → + (∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hX.quadratic Ω (U b))‖ ≤ Hcoord * ‖b‖) → + (∀ᵐ x ∂μ.restrict Ω, localGamma μ hX.quadratic fz fz x ≤ Cf ^ 2) → + (∀ᵐ x ∂μ.restrict Ω, localGamma μ hX.quadratic (fz - fx) (fz - fx) x ≤ Cv ^ 2) → + (∀ b, SobolevSpace.toLp μ hX.quadratic (Gz b) =ᵐ[μ.restrict Ω] localGamma μ hX.quadratic fz (U b)) → + (∀ b, SobolevSpace.toLp μ hX.quadratic (Gx b) =ᵐ[μ.restrict Ω] localGamma μ hX.quadratic fx (U b)) → + (∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hX.quadratic Ω + (Gz b - U (Az b)))‖ ^ 2 ≤ Ez * ‖b‖ ^ 2) → + (∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hX.quadratic Ω + (Gx b - U (Ax b) + c b • eta))‖ ^ 2 ≤ Ex * ‖b‖ ^ 2) → + (∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic + (Gz b - U (Az b)) (Gz b - U (Az b)) x ∂μ) ≤ Dz * ‖b‖ ^ 2) → + (∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, localGamma μ hX.quadratic + (Gx b - U (Ax b) + c b • eta) (Gx b - U (Ax b) + c b • eta) x ∂μ) ≤ Dx * ‖b‖ ^ 2) → + (∀ b, (μ.real Ω)⁻¹ * (∫ x in Ω, + (localGamma μ hX.quadratic (fz - fx) (Gz b) x - + localGamma μ hX.quadratic fz ((Gz - Gx) b) x - + localGamma μ hX.quadratic (fz - fx) (U b) x) ^ 2 ∂μ) ≤ Com * ‖b‖ ^ 2) → + ‖Az - Ax‖ ≤ 2 * a * e ∧ ‖c.comp (Az - 1)‖ ≤ 2 * Cm * e ∧ + ∀ b, ‖normalizeLocalL2 μ Ω hfin (SobolevSpace.restrictLp μ hX.quadratic Ω + ((Gz - Gx) b - d b • eta))‖ ≤ + (Real.sqrt (2 * Ez + 2 * Ex) + Hcoord * (2 * a * e) + + 2 * (2 * Cm * e + Mconst * (2 * a * e))) * ‖b‖ := by + obtain ⟨Cg, Cm, hCg, hCm, hrecovery⟩ := two_center_affine_recovery hgradient hmean hn hκ + refine ⟨Cg, Cm, hCg, hCm, ?_⟩ + intro p R hR hcurv u V N hN hu hV hVp hrep eta fz fx Gz Gx Az Ax c d + Cf Cv Ez Ex Dz Dx Hcoord Mconst Com μ U Ω hfin a e + hCf hCv hEz hEx hDz hDx hHcoord hCom hAz hAx hsmall hc hMc heta + hU hf hv hGz hGx hzv hxv hze hxe hcomm + have ha : 0 ≤ a := by dsimp only [a]; positivity + have he : 0 ≤ e := by dsimp only [e]; positivity + have htotal : 0 ≤ e + Real.sqrt Ez * ‖Az - Ax‖ := by positivity + have herr (b : Euclidean n) := two_center_affine_commutator_bound μ hX.quadratic Ω hfin + fz fx eta hCf hCv hEz hEx hDz hDx hCom hf hv heta U Gz Gx hGz hGx Az Ax c + hzv hxv hze hxe hcomm b + obtain ⟨hB, hconst⟩ := hrecovery p R hR hcurv u V N hN hu hV hVp hrep eta heta + Az (Az - Ax) c (e + Real.sqrt Ez * ‖Az - Ax‖) htotal hAz herr + have hB' : ‖Az - Ax‖ ≤ a * (e + Real.sqrt Ez * ‖Az - Ax‖) := by + convert hB using 1 + dsimp only [a] + ring + have habsorb : ‖Az - Ax‖ ≤ 2 * a * e := by + have hh := mul_le_mul_of_nonneg_right hsmall (norm_nonneg (Az - Ax)) + nlinarith only [hB', hh] + have hconst' : ‖c.comp (Az - 1)‖ ≤ 2 * Cm * e := by + have hE := mul_le_mul_of_nonneg_right hsmall he + have hBmul := mul_le_mul_of_nonneg_left habsorb (Real.sqrt_nonneg Ez) + have hmul : Real.sqrt Ez * ‖Az - Ax‖ ≤ e := by nlinarith only [hE, hBmul] + exact hconst.trans ((mul_le_mul_of_nonneg_left (by linarith : + e + Real.sqrt Ez * ‖Az - Ax‖ ≤ 2 * e) (by linarith : 0 ≤ Cm)).trans_eq (by ring)) + refine ⟨habsorb, hconst', ?_⟩ + intro b + apply normalized_two_center_direction_error μ hX.quadratic Ω hfin + (ne_of_gt (hX.fullSupport p R hR)) eta heta U (Gz - Gx) Ax Az c d hHcoord + hAx hc hU ?_ habsorb hMc hconst' b + intro v + exact norm_le_sqrt_mul_of_sq_le _ (by positivity) (norm_nonneg v) + (two_center_radial_fit_bounds μ hX.quadratic Ω hfin eta U Gz Gx Az Ax c hzv hxv hze hxe v).1 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/TwoCenterProjectionBudget.lean b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterProjectionBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..6acaa0e6fd42f3e6f05696e8e701a58ae42400ef --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/TwoCenterProjectionBudget.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.RCD.Harmonic.PinchingEnvelope +import OAI.Geometry.RCD.Sobolev.PoissonDefectBudget + +namespace OAI + +/-! # A summable source for the actual two-center sharp estimate -/ + +open MeasureTheory +open scoped BigOperators + +noncomputable section +namespace RegularPointCoordinates + +/-- The square root is taken only after the two summable energies are +combined. Its square, rather than its square root, is summed. -/ +def twoCenterProjectionSource (eta : ℝ) (P Q : ℕ → ℝ) (i : ℕ) : ℝ := + Real.sqrt (pinchingEnvelope (7 / 8) (3 / 4) eta P i + + pinchingEnvelope (7 / 8) (3 / 4) eta Q i) + +/-- The actual defects at the two centers and each radial-fit envelope +are dominated by one strictly positive source with a uniform square sum. -/ +theorem twoCenterProjectionSource_budget {eta : ℝ} (heta : 0 < eta) + {P Q : ℕ → ℝ} (hP : ∀ i, 0 ≤ P i) (hQ : ∀ i, 0 ≤ Q i) + (hPs : Summable P) (hQs : Summable Q) : + (∀ i, 0 < twoCenterProjectionSource eta P Q i ∧ + P i + Q i ≤ twoCenterProjectionSource eta P Q i ^ 2 ∧ + pinchingEnvelope (7 / 8) (3 / 4) eta Q i ≤ twoCenterProjectionSource eta P Q i ^ 2) ∧ + Summable (fun i => twoCenterProjectionSource eta P Q i ^ 2) ∧ + (∑' i, twoCenterProjectionSource eta P Q i ^ 2) ≤ + 64 * (2 * eta + (∑' i, P i) + ∑' i, Q i) := by + obtain ⟨hEP, hEPsum, hEPi⟩ := pinchingEnvelope_spec (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num) (by norm_num : (0 : ℝ) ≤ 3 / 4) (by norm_num) heta hP hPs + obtain ⟨hEQ, hEQsum, hEQi⟩ := pinchingEnvelope_spec (by norm_num : (0 : ℝ) < 7 / 8) + (by norm_num) (by norm_num : (0 : ℝ) ≤ 3 / 4) (by norm_num) heta hQ hQs + have heq (i : ℕ) : twoCenterProjectionSource eta P Q i ^ 2 = + pinchingEnvelope (7 / 8) (3 / 4) eta P i + pinchingEnvelope (7 / 8) (3 / 4) eta Q i := + Real.sq_sqrt (add_nonneg (hEPi i).2.2.le (hEQi i).2.2.le) + refine ⟨fun i => ?_, ?_, ?_⟩ + · refine ⟨Real.sqrt_pos.mpr (add_pos (hEPi i).2.2 (hEQi i).2.2), ?_, ?_⟩ + · rw [heq] + exact add_le_add (hEPi i).1 (hEQi i).1 + · rw [heq] + linarith [(hEPi i).2.2] + · simpa only [heq] using hEP.add hEQ + · simp only [heq] + rw [hEP.tsum_add hEQ] + norm_num at hEPsum hEQsum + linarith + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Specialization to the original positive Poisson defects; no new +source or summability premise is introduced for sharp projection. -/ +theorem actual_two_center_projection_budget {μ : Measure X} [IsFiniteMeasureOnCompacts μ] + {hQ : QuadraticCheegerEnergy μ} {n : ℕ} {κ root : ℝ} {p q : X} + (S1 : DyadicDistanceSources μ hQ n κ p root) + (S2 : DyadicDistanceSources μ hQ n κ q root) (hκ : 0 ≤ κ) + {eta : ℝ} (heta : 0 < eta) + (hP : Summable (normalizedPoissonDefect μ hQ S1)) + (hQsum : Summable (normalizedPoissonDefect μ hQ S2)) : + let sigma := twoCenterProjectionSource eta + (normalizedPoissonDefect μ hQ S1) (normalizedPoissonDefect μ hQ S2) + (∀ i, 0 < sigma i ∧ normalizedPoissonDefect μ hQ S1 i + + normalizedPoissonDefect μ hQ S2 i ≤ sigma i ^ 2 ∧ + pinchingEnvelope (7 / 8) (3 / 4) eta (normalizedPoissonDefect μ hQ S2) i ≤ sigma i ^ 2) ∧ + Summable (fun i => sigma i ^ 2) ∧ + (∑' i, sigma i ^ 2) ≤ 64 * (2 * eta + + (∑' i, normalizedPoissonDefect μ hQ S1 i) + ∑' i, normalizedPoissonDefect μ hQ S2 i) := + twoCenterProjectionSource_budget heta + (normalizedPoissonDefect_nonneg μ hQ S1 hκ) + (normalizedPoissonDefect_nonneg μ hQ S2 hκ) hP hQsum + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UnboundedCaccioppoli.lean b/lean/OAI/Geometry/RCD/Harmonic/UnboundedCaccioppoli.lean new file mode 100644 index 0000000000000000000000000000000000000000..6bc6ef7c000155e47b27aba328b7d47c955d89d4 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UnboundedCaccioppoli.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.RCD.Sobolev.CutoffGamma + +namespace OAI + +/-! # Caccioppoli estimates for unbounded Sobolev functions + +The test is the square of a compact Lipschitz cutoff times the function. +The cutoff multiplication operator makes this test admissible without +assuming that the function is bounded. +-/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Right-hand form of the cutoff product rule. -/ +theorem localGamma_cutoffCLM_right (f η h : SobolevSpace μ hQ) + {v : X → ℝ} {L B : ℝ≥0} (hv : LipschitzWith L v) + (hs : HasCompactSupport v) (hb : ∀ x, |v x| ≤ B) (hn : ∀ x, 0 ≤ v x) + (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] v) : + localGamma μ hQ h (SobolevSpace.cutoffCLM μ hQ hv hs hb hn f) =ᵐ[μ] + fun x => v x*localGamma μ hQ h f x+ + SobolevSpace.toLp μ hQ f x*localGamma μ hQ h η x := by + filter_upwards [localGamma_comm μ hQ h (SobolevSpace.cutoffCLM μ hQ hv hs hb hn f), + localGamma_cutoffCLM μ hQ f η h hv hs hb hn hrep, + localGamma_comm μ hQ f h,localGamma_comm μ hQ η h] with x h1 h2 h3 h4 + rw [h1,h2,h3,h4] + +/-- The Caccioppoli bound requires a bounded cutoff gradient, but no bound +on the function tested. -/ +theorem caccioppoli_cutoffCLM_energy (u η : SobolevSpace μ hQ) + {v : X → ℝ} {L B A : ℝ≥0} (hv : LipschitzWith L v) + (hs : HasCompactSupport v) (hb : ∀ x, |v x| ≤ B) (hn : ∀ x, 0 ≤ v x) + (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] v) + (hgrad : ∀ᵐ x ∂μ, |SobolevSpace.minimalSlope μ hQ η x| ≤ A) : + (∫ x, (SobolevSpace.toLp μ hQ η x)^2*(SobolevSpace.minimalSlope μ hQ u x)^2 ∂μ) ≤ + 2*energyForm μ hQ u (SobolevSpace.cutoffCLM μ hQ hv hs hb hn + (SobolevSpace.cutoffCLM μ hQ hv hs hb hn u))+ + 4*∫ x, (SobolevSpace.toLp μ hQ u x)^2*(SobolevSpace.minimalSlope μ hQ η x)^2 ∂μ := by + let M := SobolevSpace.cutoffCLM μ hQ hv hs hb hn + have hη : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ η x| ≤ B := by + filter_upwards [hrep] with x hx + rw [hx] + exact hb x + have hform : localGamma μ hQ u (M (M u)) =ᵐ[μ] fun x => + (SobolevSpace.toLp μ hQ η x)^2*(SobolevSpace.minimalSlope μ hQ u x)^2+ + 2*SobolevSpace.toLp μ hQ η x*SobolevSpace.toLp μ hQ u x* + localGamma μ hQ u η x := by + filter_upwards [localGamma_cutoffCLM_right μ hQ (M u) η u hv hs hb hn hrep, + localGamma_cutoffCLM_right μ hQ u η u hv hs hb hn hrep, + SobolevSpace.cutoffCLM_coe μ hQ hv hs hb hn u, + localGamma_self μ hQ u,hrep] with x h1 h2 h3 h4 hr + change localGamma μ hQ u (M (M u)) x = _ at h1 + change localGamma μ hQ u (M u) x = _ at h2 + change SobolevSpace.toLp μ hQ (M u) x = _ at h3 + rw [h1,h2,h3,h4,← hr] + ring + have hi1 := bounded_square_weight_integrable μ (SobolevSpace.toLp μ hQ η) + (SobolevSpace.minimalSlope μ hQ u) hη + have hi2 : Integrable (fun x => (SobolevSpace.toLp μ hQ u x)^2* + (SobolevSpace.minimalSlope μ hQ η x)^2) μ := by + exact (bounded_square_weight_integrable μ (SobolevSpace.minimalSlope μ hQ η) + (SobolevSpace.toLp μ hQ u) hgrad).congr (Eventually.of_forall fun x => mul_comm _ _) + have hx : (∫ x, (SobolevSpace.toLp μ hQ η x)^2* + (SobolevSpace.minimalSlope μ hQ u x)^2 ∂μ) ≤ + ∫ x, 2*localGamma μ hQ u (M (M u)) x+ + 4*((SobolevSpace.toLp μ hQ u x)^2*(SobolevSpace.minimalSlope μ hQ η x)^2) ∂μ := by + apply integral_mono_ae hi1 + ((localGamma_memL1 μ hQ u (M (M u))).const_mul 2 |>.add (hi2.const_mul 4)) + filter_upwards [hform,localGamma_abs_le μ hQ u η, + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ u), + (Lp.coeFn_nonneg _).mpr (SobolevSpace.minimalSlope_nonneg μ hQ η)] with x hf hγ hu hη + change _ ≤ 2*localGamma μ hQ u (M (M u)) x+ + 4*((SobolevSpace.toLp μ hQ u x)^2*(SobolevSpace.minimalSlope μ hQ η x)^2) + rw [hf] + simpa only [mul_assoc] using caccioppoli_scalar hu hη hγ + rw [integral_add ((localGamma_memL1 μ hQ u (M (M u))).const_mul 2) (hi2.const_mul 4), + integral_const_mul,integral_const_mul,integral_localGamma_eq_energyForm] at hx + exact hx + +/-- The zero-source specialization used in harmonic level-set iteration. -/ +theorem caccioppoli_cutoffCLM (u η : SobolevSpace μ hQ) + {v : X → ℝ} {L B A : ℝ≥0} (hv : LipschitzWith L v) + (hs : HasCompactSupport v) (hb : ∀ x, |v x| ≤ B) (hn : ∀ x, 0 ≤ v x) + (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] v) + (hgrad : ∀ᵐ x ∂μ, |SobolevSpace.minimalSlope μ hQ η x| ≤ A) + (hzero : energyForm μ hQ u (SobolevSpace.cutoffCLM μ hQ hv hs hb hn + (SobolevSpace.cutoffCLM μ hQ hv hs hb hn u)) = 0) : + (∫ x, (SobolevSpace.toLp μ hQ η x)^2*(SobolevSpace.minimalSlope μ hQ u x)^2 ∂μ) ≤ + 4*∫ x, (SobolevSpace.toLp μ hQ u x)^2*(SobolevSpace.minimalSlope μ hQ η x)^2 ∂μ := by + simpa only [hzero,mul_zero,zero_add] using + caccioppoli_cutoffCLM_energy μ hQ u η hv hs hb hn hrep hgrad + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformCanonicalCenters.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformCanonicalCenters.lean new file mode 100644 index 0000000000000000000000000000000000000000..a243b0222bf0f26eca95f9b16285717d3ad0a38b --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformCanonicalCenters.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.RCD.Harmonic.CanonicalDyadicCenters + +namespace OAI + +/-! # One affine-center constant before all source centers and scales -/ + +open Set Metric MeasureTheory Filter +open scoped InnerProductSpace ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A fixed upper bound on the splitting error makes the affine-center +constant uniform in the root radius, center, sources, frames and map. -/ +theorem canonical_dyadic_affine_centers_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hmean : LocalHarmonicL2MeanValueInput hX) {κ₀ deltaCap : ℝ} + (hκ₀ : 0 ≤ κ₀) (_hcap : 0 ≤ deltaCap) : + ∃ M : ℝ, 1 ≤ M ∧ ∀ {a κ r0 B J C L δ ε : ℝ} {p : X}, + 0 ≤ a → 0 ≤ δ → δ ≤ deltaCap → ∀ + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (v : X → Euclidean (m + 2)) + (_hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u v) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (_hscale : a * (3 * r0) ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (w : ℕ → X → Euclidean (m + 2)) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (w i)) + (_hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2), + ∀ b : Euclidean (m + 2), + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪v p, A i⟫_ℝ| ≤ M * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖) ∧ + Tendsto (fun i => c i + ⟪v p, A i⟫_ℝ) atTop (𝓝 0) ∧ + (∀ i, |(c i + ⟪v p, A i⟫_ℝ) - (c (i + 1) + ⟪v p, A (i + 1)⟫_ℝ)| ≤ + M * (Real.sqrt ((hausdorff (m + 2) X).real (ball p (distanceSourceRadius r0 i / 64))) / + Real.sqrt ((hausdorff (m + 2) X).real (ball p (distanceSourceRadius r0 (i + 1) / 64)))) * + ((distanceSourceRadius r0 i / 64) * dyadicRadialFit hX T u L hbase i b) + + M * ((distanceSourceRadius r0 (i + 1) / 64) * dyadicRadialFit hX T u L hbase (i + 1) b)) := by + classical + obtain ⟨M₀, hM₀, heval⟩ := canonical_radial_affine_center_bound hX hmean (by omega) hκ₀ + obtain ⟨M₁, hM₁, hdiff⟩ := canonical_affine_center_difference hX hmean (by omega) hκ₀ + let M := max (M₀ * ((m + 2 : ℕ) : ℝ) * (1 + deltaCap)) M₁ + have hM : 1 ≤ M := hM₁.trans (le_max_right _ _) + refine ⟨M, hM, ?_⟩ + intro a κ r0 B J C L δ ε p ha hδ hδcap hBG S T u v hu hbase hscale hsmall F w hexact hfirst hcurv + have hM0 : M₀ * ((m + 2 : ℕ) : ℝ) * (1 + δ) ≤ M := by + exact (mul_le_mul_of_nonneg_left (by linarith : 1 + δ ≤ 1 + deltaCap) + (by positivity : 0 ≤ M₀ * ((m + 2 : ℕ) : ℝ))).trans (le_max_left _ _) + have hM1 : M₁ ≤ M := le_max_right _ _ + let μ := hausdorff (m + 2) X + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hsub (i : ℕ) : ball p (r i) ⊆ ball p r0 := by + apply ball_subset_ball + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + dsimp only [r] + linarith [distanceSourceRadius_pos S.radius_pos i] + have hv (i : ℕ) := hu.continuous.mono (hsub i) + have hur (i : ℕ) (j : Fin (m + 2)) := (hu.harmonic j).mono μ hX.quadratic (hsub i) + have hrep (i : ℕ) (j : Fin (m + 2)) := + ae_restrict_of_ae_restrict_of_subset (hsub i) (hu.representative j) + intro b + have hchoose (i : ℕ) : ∃ c : ℝ, ∃ A : Euclidean (m + 2), + affineProjection μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap μ hX.quadratic u (ball p (r i)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c, A) ∧ + |c + ⟪v p, A⟫_ℝ| ≤ M * r i * ‖(F i).symm b‖ := by + have hri : r i ≤ 4 * distanceSourceRadius r0 i := by dsimp only [r] at hr ⊢; linarith [hr i] + have hgrad (j : Fin (m + 2)) := ae_restrict_of_ae_restrict_of_subset + (ball_subset_ball (show r i ≤ 2 * distanceSourceRadius r0 i by + dsimp only [r] at hr ⊢; linarith [hr i])) ((hfirst i).gradient j) + obtain ⟨c, A, hf, hb⟩ := heval S T i (r i) (hr i) hri (hcurv i) hδ + u v (hur i) (hv i) (hrep i) (F i) hgrad b + (gamma_column_le_of_diagonal_bounds μ hX.quadratic u _ L (hbase i) b) + refine ⟨c, A, hf, hb.trans ?_⟩ + have hh := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hM0 (hr i).le) (norm_nonneg ((F i).symm b)) + convert hh using 1 + ring + choose c A hfit hsize using hchoose + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hgrowth := dyadic_covector_norm_reverse_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨w i, by simpa only [hrad] using hfirst i⟩) + refine ⟨c, A, hfit, hsize, ?_, ?_⟩ + · apply dyadic_affine_center_tendsto_zero S.radius_pos.le (zero_le_one.trans hM) F b + (fun i => by simpa only [zero_add] using hgrowth 0 i b) _ hsize + · intro i + have hh := hdiff S T u hbase v i (i + 1) (by omega) (hcurv (i + 1)) + (hur (i + 1)) (hv (i + 1)) (hrep (i + 1)) b (A i) (A (i + 1)) (c i) (c (i + 1)) + (hfit i) (hfit (i + 1)) + apply hh.trans + exact add_le_add + (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hM1 (by positivity)) + (mul_nonneg (hr i).le (dyadicRadialFit_nonneg hX T u L hbase i b))) + (mul_le_mul_of_nonneg_right hM1 + (mul_nonneg (hr (i + 1)).le (dyadicRadialFit_nonneg hX T u L hbase (i + 1) b))) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformCenteredRadial.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformCenteredRadial.lean new file mode 100644 index 0000000000000000000000000000000000000000..df6982be0fadd47c697507cb3fc2b257ca0468c7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformCenteredRadial.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.UniformCenteredFits +import OAI.Geometry.RCD.Harmonic.UniformRadialSummability +import OAI.Geometry.RCD.Harmonic.DyadicCenteredRadial + +namespace OAI + +/-! # Uniform centered radial estimates from the original Poisson sources -/ + +open Set Metric MeasureTheory +open scoped InnerProductSpace ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Choose the centered radial-fit constant before every center, root, +coordinate map and splitting tolerance. -/ +theorem dyadic_centered_radial_estimate_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + {B J A Cχ κ₀ : ℝ} {d : ℕ} (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) + (hCχ : 0 ≤ Cχ) (hκ₀ : 0 ≤ κ₀) (hd : 0 < d) : + ∃ D : ℝ, 0 < D ∧ ∀ {a κ r0 C L δ ε : ℝ} {p : X}, + ∀ (_ha : 0 ≤ a) (_hκ : 0 ≤ κ) (_hK : -κ ≤ K) + (_hr01 : r0 ≤ 1) (_hscale : a * (3 * r0) ≤ 1) + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (_hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (_hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (_hδ : 0 ≤ δ) + (_hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (_hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (_hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (_hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)) + (V : X → Euclidean (m + 2)) + (_hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (_hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2), + ∀ b : Euclidean (m + 2), b ≠ 0 → + ∃ c : ℕ → ℝ, ∃ A : ℕ → Euclidean (m + 2), + (∀ i, affineProjection (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (dyadicRadialTarget hX T u hbase i b) = + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (c i, A i)) ∧ + (∀ i, |c i + ⟪V p, A i⟫_ℝ| ≤ D * (distanceSourceRadius r0 i / 64) * + ‖(F i).symm b‖ * Real.sqrt (pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i)) ∧ + (∀ i, ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b - + affineCoordinateMap (hausdorff (m + 2) X) hX.quadratic u + (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) (-⟪V p, A i⟫_ℝ, A i))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * + Real.sqrt (pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i)) := by + obtain ⟨Z, hZ, hallfits⟩ := dyadic_radial_fit_summability_uniform m hX hhessian + hB hJ hA hCχ hd + obtain ⟨D, hD, hcentered⟩ := canonical_centered_fits_of_squared_bound_uniform m hX hmean + hκ₀ (show (0 : ℝ) ≤ 1 by norm_num) hZ + refine ⟨D, hD, ?_⟩ + intro a κ r0 C L δ ε p ha hκ hK hr01 hscale hBG S T hP hquarter u hbase F v hδ + hδ1 hsmall hexact hfirst hmetric hf χ hfit V hu hcurv + have hfits := hallfits ha hκ hK hr01 hscale hBG S T hP hquarter u hbase F v hδ + hδ1 hsmall hexact hfirst hmetric hf χ hfit + have hδle : δ ≤ 1 := by + have hh := mul_le_mul_of_nonneg_right (radialNormalizationRestrictionConstant_ge_one (m + 2)) hδ + linarith + have hη : 0 ≤ radialFitQualitativeConstant (m + 2) Cχ * δ := + mul_nonneg (radialFitQualitativeConstant_nonneg (m + 2) hCχ) hδ + have hPN := normalizedPoissonDefect_nonneg (hausdorff (m + 2) X) hX.quadratic S hκ + have hQ := forwardDefect_nonneg (by norm_num : (0 : ℝ) ≤ 3 / 4) hη hPN + have hQs := (forwardDefect_budget (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hη hPN hP).1 + exact hcentered ha hδ hδle hBG S T u V hu hbase hscale hsmall F v hexact hfirst hcurv + hquarter (forwardDefect (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + hQ hQs (fun b hb => (hfits b hb).1) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformLocalDifferencePairing.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformLocalDifferencePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e0ba5f5d95eef8c4e84d5bff7de7892d9cd668e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformLocalDifferencePairing.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.RCD.Harmonic.UniformLocalL1Pairing + +namespace OAI + +/-! # Uniform local L1 differences pair with compressed laws -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MeasurableSpace X] + +theorem uniform_local_difference_pairing (μ : Measure X) {S : Set X} + (ν : Y → Measure X) {C : ℝ≥0∞} (hC : C ≠ ⊤) (hν : ∀ y, ν y ≤ C • μ) + (F : ℕ → Y → X → ℝ) (g : Y → X → ℝ) + (hF : ∀ k y, Integrable (F k y) (μ.restrict S)) + (hg : ∀ y, Integrable (g y) (μ.restrict S)) + (he : TendstoUniformly (fun k y => ∫ x in S, |F k y x-g y x| ∂μ) + (fun _ => 0) atTop) : + TendstoUniformly (fun k y => (∫ x in S, F k y x ∂ν y)-(∫ x in S, g y x ∂ν y)) + (fun _ => 0) atTop := by + apply Metric.tendstoUniformly_iff.mpr + intro e hepos + have he' : 0 < e/(C.toReal+1) := div_pos hepos (by positivity) + filter_upwards [(Metric.tendstoUniformly_iff.mp he) (e/(C.toReal+1)) he'] with k hk y + have hνS : (ν y).restrict S ≤ C • μ.restrict S := by + simpa only [Measure.restrict_smul] using Measure.restrict_mono (subset_refl S) (hν y) + have hb := integral_difference_le_of_domination (μ.restrict S) ((ν y).restrict S) + hC hνS (hF k y) (hg y) + have hsmall : (∫ x in S, |F k y x-g y x| ∂μ) < e/(C.toReal+1) := by + have hh := hk y + simpa only [dist_zero_left,Real.norm_eq_abs,abs_of_nonneg (integral_nonneg fun x => abs_nonneg _)] using hh + have hce : C.toReal*(e/(C.toReal+1)) < e := by + have heq : (e/(C.toReal+1))*(C.toReal+1)=e := div_mul_cancel₀ e (by positivity) + nlinarith [ENNReal.toReal_nonneg (a := C)] + have hb' := hb.trans_lt ((mul_le_mul_of_nonneg_left hsmall.le ENNReal.toReal_nonneg).trans_lt hce) + simpa only [dist_zero_left,Real.dist_eq,Real.norm_eq_abs] using hb' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformLocalL1Pairing.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformLocalL1Pairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..602759a445179f46a5a79077406981a15d7304fe --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformLocalL1Pairing.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.RCD.Metric.ProbabilityDominationL1 + +namespace OAI + +/-! # Uniform local L¹ limits pair with all laws of a fixed compression bound -/ + +open Set Filter MeasureTheory +open scoped Topology ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X Y : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem uniform_local_L1_pairing {S : Set X} + (ν : Y → Measure X) {C : ℝ≥0∞} (hC : C ≠ ⊤) (hν : ∀ y, ν y ≤ C • μ) + (J : ℕ → Y → Lp ℝ 1 (μ.restrict S)) + (hJ : TendstoUniformly (fun k y => ∫ x in S, |J k y x| ∂μ) (fun _ => 0) atTop) : + TendstoUniformly (fun k y => ∫ x in S, J k y x ∂ν y) (fun _ => 0) atTop := by + apply Metric.tendstoUniformly_iff.mpr + intro e he + have he' : 0 < e/(C.toReal+1) := div_pos he (by positivity) + filter_upwards [(Metric.tendstoUniformly_iff.mp hJ) (e/(C.toReal+1)) he'] with k hk y + have hνS : (ν y).restrict S ≤ C • μ.restrict S := by + simpa only [Measure.restrict_smul] using Measure.restrict_mono (subset_refl S) (hν y) + have hb := integral_difference_le_of_domination (μ.restrict S) ((ν y).restrict S) hC hνS + (memLp_one_iff_integrable.mp (Lp.memLp (J k y))) (integrable_zero X ℝ _) + have hsmall : (∫ x in S, |J k y x| ∂μ) < e/(C.toReal+1) := by + have hh := hk y + simpa only [dist_zero_left,Real.norm_eq_abs,abs_of_nonneg (integral_nonneg fun x => abs_nonneg _)] using hh + simp only [Pi.zero_apply,sub_zero,integral_zero] at hb + have hce : C.toReal*(e/(C.toReal+1)) < e := by + have hden : 0 < C.toReal+1 := by positivity + have heq : (e/(C.toReal+1))*(C.toReal+1)=e := div_mul_cancel₀ e (ne_of_gt hden) + nlinarith [mul_pos he' zero_lt_one] + have hb' := hb.trans_lt ((mul_le_mul_of_nonneg_left hsmall.le ENNReal.toReal_nonneg).trans_lt hce) + simpa only [dist_zero_right,dist_zero_left] using hb' + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformRadialCoefficient.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea7c8939d226cdbfdf4149955749d2043cd48728 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialCoefficient.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRadialCoefficient + +namespace OAI + +/-! # Uniform constants for the actual radial coefficient estimates -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The coefficient constant precedes the center, root, coordinate +map and splitting tolerance. -/ +theorem dyadic_radial_coefficient_bound_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hgradient : LocalHarmonicL2GradientInput hX) {κ₀ : ℝ} (hκ₀ : 0 ≤ κ₀) : + ∃ Ca : ℝ, 1 ≤ Ca ∧ ∀ {a κ r0 B J C Cχ L δ ε D : ℝ} {p : X}, + ∀ (_ha : 0 ≤ a) (_hCχ : 0 ≤ Cχ) (_hD : 0 ≤ D) + (_hscale : a * (3 * r0) ≤ 1) + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (_hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (_hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (_hδ : 0 ≤ δ) + (_hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (_hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (V : X → Euclidean (m + 2)) + (_hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (_hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2), + ∀ (b : Euclidean (m + 2)) + (coeff : ℕ → Euclidean (m + 2)) (E : ℕ → ℝ), + (∀ i, 0 ≤ E i) → + (∀ i, + ‖normalizeLocalL2 (hausdorff (m + 2) X) (ball p (distanceSourceRadius r0 i / 64)) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (dyadicRadialTarget hX T u _hbase i b - + SobolevSpace.restrictLp (hausdorff (m + 2) X) hX.quadratic + (ball p (distanceSourceRadius r0 i / 64)) + (centeredAffineSobolev (hausdorff (m + 2) X) hX.quadratic u (χ i).sobolev (V p) (coeff i)))‖ ≤ + D * (distanceSourceRadius r0 i / 64) * ‖(F i).symm b‖ * Real.sqrt (E i)) → + ∀ i, + ‖(F i).symm (coeff i - b)‖ ^ 2 ≤ + 2 * Ca ^ 2 * (D ^ 2 * E i + radialFitQualitativeConstant (m + 2) Cχ * δ) * + ‖(F i).symm b‖ ^ 2 := by + obtain ⟨Ca, hCa, hcoef⟩ := dyadic_affine_coefficient m hX hgradient hκ₀ + refine ⟨Ca, hCa, ?_⟩ + intro a κ r0 B J C Cχ L δ ε D p ha hCχ hD hscale hBG S T hquarter u hbase F v + hδ hδ1 hsmall hexact hfirst hmetric χ V hu hcurv + let μ := hausdorff (m + 2) X + let hQ := hX.quadratic + let _ := hX.openPos K (m + 2) + let r : ℕ → ℝ := fun i => distanceSourceRadius r0 i / 64 + have hr (i : ℕ) : 0 < r i := div_pos (distanceSourceRadius_pos S.radius_pos i) (by norm_num) + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have htest (i : ℕ) : (r0 / (2 : ℝ) ^ i) / 128 = r i := by + dsimp only [r, distanceSourceRadius] + rw [pow_succ] + ring + have hcoef' := hcoef ha S.radius_pos hscale hBG p u F hδ hsmall + (fun i => by simpa only [hrad] using hexact i) + (fun i => ⟨v i, by simpa only [hrad] using hfirst i⟩) + intro b coeff E hE hfit i + have hri := hr i + have hs := distanceSourceRadius_pos S.radius_pos i + have hle := distanceSourceRadius_outer_le S.radius_pos.le i + have hsub : ball p (r i) ⊆ ball p r0 := ball_subset_ball (by dsimp only [r]; linarith) + have hsub2 : ball p (2 * distanceSourceRadius r0 i) ⊆ ball p r0 := ball_subset_ball hle + let H := centeredAffineSobolev μ hQ u (χ i).sobolev (V p) (coeff i) + let H₀ := centeredAffineSobolev μ hQ u (T.cutoff i).sobolev (V p) b + have hη : SobolevSpace.toLp μ hQ (χ i).sobolev =ᵐ[μ.restrict (ball p (r i))] fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (χ i).representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans ((χ i).one x hxr) + have hζ : SobolevSpace.toLp μ hQ (T.cutoff i).sobolev =ᵐ[μ.restrict (ball p (r i))] fun _ => (1 : ℝ) := by + filter_upwards [ae_restrict_of_ae (T.cutoff i).representative, ae_restrict_mem measurableSet_ball] + with x hx hxr + exact hx.trans ((T.cutoff i).one x ((ball_subset_ball (by dsimp only [r]; linarith)) hxr)) + have hhu (j : Fin (m + 2)) := (hu.harmonic j).mono μ hQ hsub + have hH := centeredAffineSobolev_harmonic μ hQ u (χ i).sobolev (V p) (coeff i) _ hhu + (isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball _ 1 hη) + have hH₀ := centeredAffineSobolev_harmonic μ hQ u (T.cutoff i).sobolev (V p) b _ hhu + (isSobolevHarmonicOn_of_local_constant μ hQ _ measurableSet_ball _ 1 hζ) + have hcand := T.normalized_radial_candidate μ hQ i (euclideanUnitVolume_pos (m + 2)) + hδ hδ1 hCχ (fun t ht hts => hquarter t ht (hts.trans hle)) u (F i) V (v i) + (hu.continuous.mono hsub2) (fun j => ae_restrict_of_ae_restrict_of_subset hsub2 (hu.representative j)) + (hfirst i) (hmetric i) (χ i) b + (gamma_column_le_of_diagonal_bounds μ hQ u _ L (hbase i) b) + dsimp only at hcand + have hfit2 := (sq_le_sq₀ (norm_nonneg _) + (show 0 ≤ D * r i * ‖(F i).symm b‖ * Real.sqrt (E i) by positivity)).mpr (hfit i) + rw [mul_pow, mul_pow, mul_pow, Real.sq_sqrt (hE i)] at hfit2 + have hdiff := normalized_two_fit_difference μ hQ + (ne_of_lt (hX.finiteOnBounded (ball p (r i)) isBounded_ball)) + (dyadicRadialTarget hX T u hbase i b) H H₀ hfit2 hcand + have hci := hcoef' i + rw [htest] at hci + have hb := hci (hcurv i) (coeff i - b) (H - H₀) (-⟪V p, coeff i - b⟫_ℝ) + (by simpa only [sub_eq_add_neg, neg_one_smul] using + hH.add μ hQ (hH₀.smul μ hQ (-1))) + (centeredAffineSobolev_difference_constant μ hQ u _ (χ i).sobolev (T.cutoff i).sobolev + (V p) (coeff i) b hη hζ) + apply hb.trans + have hh := mul_le_mul_of_nonneg_left hdiff (sq_nonneg (Ca / r i)) + convert hh using 1 + field_simp [hri.ne'] + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformRadialMatrices.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialMatrices.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b13136d10a31d18d3e2703f29f9a912d175fd81 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialMatrices.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.RCD.Sobolev.UniformRadialEnergy +import OAI.Geometry.RCD.Harmonic.UniformRadialCoefficient +import OAI.Geometry.RCD.Harmonic.DyadicRadialMatrices + +namespace OAI + +/-! # One set of constants for all actual radial matrices -/ + +open Set Metric MeasureTheory +open scoped ENNReal InnerProductSpace + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The matrix and residual estimates use constants chosen before the +root, center, coordinates and splitting error. -/ +theorem dyadic_radial_matrices_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) (hmean : LocalHarmonicL2MeanValueInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) + {B J A Cχ κ₀ : ℝ} {d : ℕ} (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) + (hCχ : 0 ≤ Cχ) (hκ₀ : 0 ≤ κ₀) (hd : 0 < d) : + ∃ Cg D Ca : ℝ, 1 ≤ Cg ∧ 0 < D ∧ 1 ≤ Ca ∧ ∀ {a κ r0 C L δ ε : ℝ} {p : X}, + ∀ (_ha : 0 ≤ a) (_hκ : 0 ≤ κ) (_hK : -κ ≤ K) + (_hr01 : r0 ≤ 1) (_hscale : a * (3 * r0) ≤ 1) + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (_hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (_hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (_hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (_hδ : 0 ≤ δ) + (_hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (_hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (_hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (_hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)) + (V : X → Euclidean (m + 2)) + (_hu : FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p r0 ε u V) + (_hcurv : ∀ i, -κ₀ ≤ K * (distanceSourceRadius r0 i / 64) ^ 2) + , + ∀ i, + ∃ coeff : Fin (m + 2) → Euclidean (m + 2), + ∃ g : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic, + let μ := hausdorff (m + 2) X + let s := distanceSourceRadius r0 i + let r := s / 64 + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect μ hX.quadratic S) i + ‖Matrix.toEuclideanCLM (n := Fin (m + 2)) (𝕜 := ℝ) (radialCoefficientMatrix (F i) coeff) - + ContinuousLinearMap.id ℝ (Euclidean (m + 2))‖ ≤ + ((m + 2 : ℕ) : ℝ) ^ 2 * + Real.sqrt (2 * Ca ^ 2 * (D ^ 2 * E + radialFitQualitativeConstant (m + 2) Cχ * δ)) ∧ + ∀ j, + let H := centeredAffineSobolev μ hX.quadratic u (χ i).sobolev (V p) (coeff j) + (SobolevSpace.toLp μ hX.quadratic (g j) =ᵐ[μ.restrict (ball p r)] + localGamma μ hX.quadratic (T.replacement i) + (sobolevColumnMap μ hX.quadratic u (F i (EuclideanSpace.single j 1)))) ∧ + ‖normalizeLocalL2 μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hX.quadratic (ball p r) (g j - H))‖ ^ 2 ≤ + (2 * D ^ 2 + 8192 * (((m + 2 : ℕ) : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume (m + 2))) * (64 : ℝ) ^ (m + 2))) * r ^ 2 * E ∧ + (μ.real (ball p (r / 2)))⁻¹ * + (∫ x in ball p (r / 2), localGamma μ hX.quadratic (g j - H) (g j - H) x ∂μ) ≤ + radialEnergyConstant K (m + 2) Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume (m + 2))) * (128 : ℝ) ^ (m + 2)) * E := by + obtain ⟨Cg, D, hCg, hD, hallscalar⟩ := dyadic_radial_value_energy_uniform m hX hhessian + hmean hgradient hB hJ hA hCχ hκ₀ hd + obtain ⟨Ca, hCa, hallcoeff⟩ := dyadic_radial_coefficient_bound_uniform m hX hgradient hκ₀ + refine ⟨Cg, D, Ca, hCg, hD, hCa, ?_⟩ + intro a κ r0 C L δ ε p ha hκ hK hr01 hscale hBG S T hP hquarter u hbase F v hδ + hδ1 hsmall hexact hfirst hmetric hf χ hfit V hu hcurv + classical + let μ := hausdorff (m + 2) X + let hQ := hX.quadratic + let E := pinchingEnvelope (7 / 8) (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect μ hQ S) + have hscalar := hallscalar ha hκ hK hr01 hscale hBG S T hP hquarter u hbase F v hδ + hδ1 hsmall hexact hfirst hmetric hf χ hfit V hu hcurv + have hcoeff := hallcoeff ha hCχ hD.le hscale hBG S T hquarter u hbase F v hδ hδ1 hsmall + hexact hfirst hmetric χ V hu hcurv + obtain ⟨_, _, hE⟩ := radial_fit_pinching_envelope_budget S hκ hCχ hδ hP + intro i + have hchoose (j : Fin (m + 2)) : + ∃ a : Euclidean (m + 2), ∃ g : SobolevSpace μ hQ, + ‖(F i).symm (a - F i (EuclideanSpace.single j 1))‖ ^ 2 ≤ + 2 * Ca ^ 2 * (D ^ 2 * E i + radialFitQualitativeConstant (m + 2) Cχ * δ) ∧ + let r := distanceSourceRadius r0 i / 64 + let H := centeredAffineSobolev μ hQ u (χ i).sobolev (V p) a + (SobolevSpace.toLp μ hQ g =ᵐ[μ.restrict (ball p r)] + localGamma μ hQ (T.replacement i) + (sobolevColumnMap μ hQ u (F i (EuclideanSpace.single j 1)))) ∧ + ‖normalizeLocalL2 μ (ball p r) (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp μ hQ (ball p r) (g - H))‖ ^ 2 ≤ + (2 * D ^ 2 + 8192 * (((m + 2 : ℕ) : ℝ) * 2) ^ 2 * B * + ((4 / (3 * euclideanUnitVolume (m + 2))) * (64 : ℝ) ^ (m + 2))) * r ^ 2 * E i ∧ + (μ.real (ball p (r / 2)))⁻¹ * + (∫ x in ball p (r / 2), localGamma μ hQ (g - H) (g - H) x ∂μ) ≤ + radialEnergyConstant K (m + 2) Cg 1 A B J Cχ * + ((5 / 3 : ℝ) * ((1 / 2 : ℝ) ^ (m + 2))⁻¹ * D ^ 2 + + (4 / (3 * euclideanUnitVolume (m + 2))) * (128 : ℝ) ^ (m + 2)) * E i := by + let b := F i (EuclideanSpace.single j 1) + have hb : b ≠ 0 := by + intro hz + have he := congrArg (fun w => ((F i).symm w) j) hz + simp [b] at he + obtain ⟨a, g, hall⟩ := hscalar b hb + have ha := hcoeff b a E (fun k => (hE k).1) (fun k => (hall k).2.1) i + have hi := hall i + have hunit : ‖(F i).symm b‖ = 1 := by simp [b] + rw [hunit] at ha hi + simp only [one_pow, mul_one] at ha hi + refine ⟨a i, g i, ?_, ?_⟩ + · exact ha + · exact ⟨hi.1, hi.2.2.1, hi.2.2.2⟩ + choose coeff g hrow using hchoose + refine ⟨coeff, g, ?_, fun j => (hrow j).2⟩ + apply radialCoefficientMatrix_sub_id_norm _ _ (Real.sqrt_nonneg _) + intro j + have hh := Real.sqrt_le_sqrt (hrow j).1 + simpa only [Real.sqrt_sq (norm_nonneg _)] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformRadialSummability.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialSummability.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9f2d89534dd6cafbf3f01d5beb965884cb46635 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformRadialSummability.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.RCD.Harmonic.DyadicRadialSummability + +namespace OAI + +/-! # A uniform envelope constant for all actual radial fits -/ + +open Set Metric MeasureTheory +open scoped ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Fix the radial contraction constant before choosing the root, center, +map, and size of the splitting error. -/ +theorem dyadic_radial_fit_summability_uniform {K : ℝ} (m : ℕ) + (hX : NoncollapsedRCD K (m + 2) X) [IsFiniteMeasureOnCompacts (hausdorff (m + 2) X)] + (hhessian : LocalPoissonHessianInput hX) {B J A Cχ : ℝ} {d : ℕ} + (hB : 0 ≤ B) (hJ : 0 ≤ J) (hA : 0 ≤ A) (hCχ : 0 ≤ Cχ) (hd : 0 < d) : + ∃ Z : ℝ, 0 < Z ∧ ∀ {a κ r0 C L δ : ℝ} {p : X}, + ∀ (_ha : 0 ≤ a) (_hκ : 0 ≤ κ) (_hK : -κ ≤ K) + (_hr01 : r0 ≤ 1) (_hscale : a * (3 * r0) ≤ 1) + (_hBG : BallVolumeComparison (hausdorff (m + 2) X) (comparisonModelVolume (m + 1) a)) + (S : DyadicDistanceSources (hausdorff (m + 2) X) hX.quadratic (m + 2) κ p r0) + (T : DyadicDistanceReplacements (hausdorff (m + 2) X) hX.quadratic S B J C) + (_hP : Summable (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S)) + (_hquarter : ∀ t : ℝ, 0 < t → t ≤ r0 → + |(hausdorff (m + 2) X).real (ball p t) / (euclideanUnitVolume (m + 2) * t ^ (m + 2)) - 1| ≤ 1 / 4) + (u : Fin (m + 2) → SobolevSpace (hausdorff (m + 2) X) hX.quadratic) + (hbase : ∀ i j, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 64)), + localGamma (hausdorff (m + 2) X) hX.quadratic (u j) (u j) x ≤ L ^ 2) + (F : ℕ → Euclidean (m + 2) ≃L[ℝ] Euclidean (m + 2)) + (v : ℕ → X → Euclidean (m + 2)) (_hδ : 0 ≤ δ) + (_hδ1 : radialNormalizationRestrictionConstant (m + 2) * δ ≤ 1) + (_hsmall : ((m + 2 : ℕ) : ℝ) ^ 2 * (normalizationVolumeRatio (m + 1) * δ) ≤ 1 / 64) + (_hexact : ∀ i, IsExactMeanNormalization (hausdorff (m + 2) X) hX.quadratic + (sobolevColumnMap (hausdorff (m + 2) X) hX.quadratic u) + (ball p (2 * distanceSourceRadius r0 i)) measurableSet_ball (F i)) + (_hfirst : ∀ i, FirstOrderSplittingOn (hausdorff (m + 2) X) hX.quadratic p + (2 * distanceSourceRadius r0 i) δ (transformedColumn (hausdorff (m + 2) X) hX.quadratic u (F i)) (v i)) + (_hmetric : ∀ i, IsPointedApproximation p 0 (distanceSourceRadius r0 i / 64) 4 δ + (fun x => (distanceSourceRadius r0 i / 64)⁻¹ • (v i x - v i p))) + (_hf : ∀ i, ∀ᵐ x ∂(hausdorff (m + 2) X).restrict (ball p (distanceSourceRadius r0 i / 4)), + localGamma (hausdorff (m + 2) X) hX.quadratic (T.replacement i) (T.replacement i) x ≤ + (A * distanceSourceRadius r0 i) ^ 2) + (_χ : ∀ i, GoodLaplacianCutoff (hausdorff (m + 2) X) hX.quadratic p (distanceSourceRadius r0 i / 64) Cχ) + (_hfit : ∀ i, HasNormalizedAffineImprovement hX u p (distanceSourceRadius r0 i / 64) ((1 / 2 : ℝ) ^ d)), + ∀ b : Euclidean (m + 2), b ≠ 0 → + (∀ i, (dyadicRadialFit hX T u L hbase i b) ^ 2 ≤ + Z * forwardDefect (3 / 4) (radialFitQualitativeConstant (m + 2) Cχ * δ) + (normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S) i * ‖(F i).symm b‖ ^ 2) ∧ + Summable (fun i => (dyadicRadialFit hX T u L hbase i b / ‖(F i).symm b‖) ^ 2) ∧ + (∑' i, (dyadicRadialFit hX T u L hbase i b / ‖(F i).symm b‖) ^ 2) ≤ + 4 * Z * (radialFitQualitativeConstant (m + 2) Cχ * δ + + ∑' i, normalizedPoissonDefect (hausdorff (m + 2) X) hX.quadratic S i) := by + obtain ⟨Z, hZ, henv⟩ := radial_fit_forward_envelope hd + (radialFitStepConstant_nonneg K (m + 2) A B J Cχ d) + refine ⟨Z, hZ, ?_⟩ + intro a κ r0 C L δ p ha hκ hK hr01 hscale hBG S T hP hquarter u hbase F v hδ + hδ1 hsmall hexact hfirst hmetric hf χ hfit + let μ := hausdorff (m + 2) X + let P := normalizedPoissonDefect μ hX.quadratic S + let E := dyadicRadialFit hX T u L hbase + let η := radialFitQualitativeConstant (m + 2) Cχ * δ + have hη : 0 ≤ η := mul_nonneg (radialFitQualitativeConstant_nonneg (m + 2) hCχ) hδ + have hδle : δ ≤ 1 := by + have hh := mul_le_mul_of_nonneg_right (radialNormalizationRestrictionConstant_ge_one (m + 2)) hδ + linarith + have hrad (i : ℕ) : 2 * distanceSourceRadius r0 i = r0 / (2 : ℝ) ^ i := by + unfold distanceSourceRadius + rw [pow_succ] + ring + have hfirst' (i : ℕ) : ∃ w : X → Euclidean (m + 2), + FirstOrderSplittingOn μ hX.quadratic p (r0 / 2 ^ i) δ + (transformedColumn μ hX.quadratic u (F i)) w := by + exact ⟨v i, by simpa only [hrad] using hfirst i⟩ + have hgrowth := dyadic_covector_norm_growth (m + 1) hX ha hBG u p S.radius_pos hscale hδ hsmall F + (fun i => by simpa only [hrad] using hexact i) hfirst' + intro b hb + have hw (i : ℕ) : 0 < ‖(F i).symm b‖ := by + apply norm_pos_iff.mpr + intro hz + apply hb + have he := congrArg (F i) hz + simpa only [ContinuousLinearEquiv.apply_symm_apply, map_zero] using he + have hPN (i : ℕ) : 0 ≤ P i := normalizedPoissonDefect_nonneg μ hX.quadratic S hκ i + have hqual (i : ℕ) : (E i b) ^ 2 ≤ η * ‖(F i).symm b‖ ^ 2 := by + apply dyadicRadialFit_smallness hX T u hbase hδ hδ1 hCχ i (F i) (v i) + (hfirst i) (hmetric i) (χ i) + intro t ht hts + exact hquarter t ht (hts.trans (distanceSourceRadius_outer_le S.radius_pos.le i)) + have hstep (i : ℕ) : E (i + d) b ≤ + (1 / 2 : ℝ) * Real.sqrt ((1 / 2 : ℝ) ^ d) * E i b + + radialFitStepConstant K (m + 2) A B J Cχ d * ‖(F i).symm b‖ * Real.sqrt (P i) := by + have hs := distanceSourceRadius_pos S.radius_pos i + have hsle : distanceSourceRadius r0 i ≤ r0 := by + have hh := distanceSourceRadius_outer_le S.radius_pos.le i + linarith + have hsub : ball p (distanceSourceRadius r0 i / 4) ⊆ ball p (2 * distanceSourceRadius r0 i) := + ball_subset_ball (by linarith) + have hu1 := (hfirst i).mono_error μ hX.quadratic hδ hδle + have hann := relative_volume_annulus (show 2 ≤ m + 2 by omega) + (show 0 < distanceSourceRadius r0 i / 64 by positivity) (euclideanUnitVolume_pos (m + 2)) + (hquarter (distanceSourceRadius r0 i / 64) (by positivity) (by linarith)) + (hquarter (2 * (distanceSourceRadius r0 i / 64)) (by positivity) (by linarith)) + exact dyadicRadialFit_step hX T u hbase (by omega) hhessian hκ hK hB hJ hA hCχ i + (hsle.trans hr01) (F i) (fun j => (hu1.harmonic j).mono μ hX.quadratic hsub) + (fun j => ae_restrict_of_ae_restrict_of_subset hsub (hu1.gradient j)) (hf i) (χ i) + hann.1 hann.2 d (hfit i) (fun t ht hts => hquarter t ht (hts.trans hsle)) b + have hbound := henv hη hPN (fun i => dyadicRadialFit_nonneg hX T u L hbase i b) hw hqual + (fun i => hgrowth i d b) hstep + have hbudget := normalized_squared_fit_budget (by norm_num : (0 : ℝ) ≤ 3 / 4) + (by norm_num : (3 / 4 : ℝ) < 1) hη hZ.le hPN hP hw hbound + refine ⟨hbound, hbudget.1, ?_⟩ + simpa only [show (1 - (3 / 4 : ℝ))⁻¹ = 4 by norm_num, mul_comm Z 4] using hbudget.2 + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformResidualOuterBound.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformResidualOuterBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf325bebd4d23a1a56748c10ede3268ddeb44e1c --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformResidualOuterBound.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.RCD.Transport.ScaledRadialTransportForcing +import OAI.Geometry.RCD.Transport.ScaledTransportConstants +import OAI.Geometry.RCD.Harmonic.ResidualOuterBound + +namespace OAI + +/-! # Uniform outer residual control on shrinking physical balls -/ + +open Set Metric MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + (μ : Measure X) [IsFiniteMeasureOnCompacts μ] (hQ : QuadraticCheegerEnergy μ) + +/-- The transport constant is independent of the physical radius. The +radial pairing error has its natural length factor before normalization. -/ +theorem uniform_residual_outer_bound (n : ℕ) {F E : ℝ} (hF : 0 ≤ F) + (C : ℝ≥0) : + ∃ T : ℝ, 0 ≤ T ∧ ∀ (R a : ℝ), 0 < R → 0 ≤ a → a ≤ (n : ℝ) + 1 → + ∀ (z : X) (f w q : SobolevSpace μ hQ) (σ : ℝ), 0 ≤ σ → + IsConstantLaplacianOn μ hQ (ball z (4 * R)) f a → + ∀ {B : ℝ} (hf : ∀ᵐ x ∂μ.restrict (ball z (4 * R)), localGamma μ hQ f f x ≤ B), + (∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ w x| ≤ C) → + ∀ e : X → ℝ, MemLp e 2 μ → + localRadialDerivative μ hQ (ball z (4 * R)) f hf w = + SobolevSpace.restrictLp μ hQ (ball z (4 * R)) (w + q) → + localGamma μ hQ f (inwardSobolev μ hQ z (3 * R)) =ᵐ[μ.restrict (ball z (3 * R))] + (fun x => e x - dist z x) → + μ (sphere z R) = 0 → + ‖SobolevSpace.restrictLp μ hQ (ball z (4 * R)) q‖ ≤ + F * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) → + (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ E ^ 2 * R ^ 2 * σ ^ 2 → + ‖SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w‖ ≤ + T * (‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + σ) := by + let β := transportCutoffExponent n + let q₀ := (2 : ℝ) ^ (β + 2) + let d := q₀ / β + have hβ : 0 < β := transportCutoffExponent_pos n + have hq₀ : 0 ≤ q₀ := by dsimp only [q₀]; positivity + have hd : 0 ≤ d := div_nonneg hq₀ hβ.le + let A₀ := 1 + 2 * ((n : ℝ) + 3 + 1 / 4) * d + let B₀ := 8 * d + let C₀ := 4 * (C : ℝ) ^ 2 * q₀ + have hA₀ : 0 ≤ A₀ := by dsimp only [A₀]; positivity + have hB₀ : 0 ≤ B₀ := by dsimp only [B₀]; positivity + have hC₀ : 0 ≤ C₀ := by dsimp only [C₀]; positivity + let T := Real.sqrt (A₀ + B₀ * F ^ 2 + C₀ * E ^ 2) + have hT : 0 ≤ T := Real.sqrt_nonneg _ + have hTsq : T ^ 2 = A₀ + B₀ * F ^ 2 + C₀ * E ^ 2 := Real.sq_sqrt (by positivity) + refine ⟨T, hT, ?_⟩ + intro R a hR ha han z f w q σ hσ hlap B hf hw e he heuler hradial hsphere hq herr + let D := (R ^ (-β) - (3 * R) ^ (-β)) / β + let Q := R ^ (-(β + 1)) + let m := (R / 2) * (2 * R) ^ (-(β + 1)) + obtain ⟨hm, hD, hDm, hQm⟩ := scaled_transport_constants (n := n) hR + change 0 < m at hm + change 0 ≤ D at hD + change D / m ≤ d at hDm + change Q / (R * m) * R ^ 2 = q₀ at hQm + have hDm0 : 0 ≤ D / m := div_nonneg hD hm.le + have hQnonneg : 0 ≤ Q := by dsimp only [Q]; positivity + let α := ‖SobolevSpace.restrictLp μ hQ (ball z R) w‖ + have hα : 0 ≤ α := norm_nonneg _ + have hαsum : α ^ 2 ≤ (α + σ) ^ 2 := by nlinarith + have hσsum : σ ^ 2 ≤ (α + σ) ^ 2 := by nlinarith + have hq2 : (∫ x in ball z (4 * R), (SobolevSpace.toLp μ hQ q x) ^ 2 ∂μ) ≤ + F ^ 2 * (α + σ) ^ 2 := by + rw [← restrictLp_norm_sq μ hQ] + simpa only [mul_pow] using (sq_le_sq₀ (norm_nonneg _) + (mul_nonneg hF (add_nonneg hα hσ))).mpr hq + have hA : 1 + 2 * ((a + 2) * D + D / 4) / m ≤ A₀ := by + calc + _ = 1 + 2 * (a + 2 + 1 / 4) * (D / m) := by ring + _ ≤ 1 + 2 * ((n : ℝ) + 3 + 1 / 4) * d := by + exact add_le_add_right + (mul_le_mul (by linarith) hDm hDm0 (by positivity)) 1 + have hB : 8 * D / m ≤ B₀ := by + dsimp only [B₀] + simpa only [mul_div_assoc] using mul_le_mul_of_nonneg_left hDm (by norm_num : (0 : ℝ) ≤ 8) + have hCE : (4 * (C : ℝ) ^ 2 * Q / (R * m)) * + (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) ≤ C₀ * E ^ 2 * (α + σ) ^ 2 := by + calc + _ ≤ (4 * (C : ℝ) ^ 2 * Q / (R * m)) * (E ^ 2 * R ^ 2 * σ ^ 2) := + mul_le_mul_of_nonneg_left herr (by positivity) + _ = 4 * (C : ℝ) ^ 2 * (Q / (R * m) * R ^ 2) * E ^ 2 * σ ^ 2 := by ring + _ = C₀ * E ^ 2 * σ ^ 2 := by rw [hQm] + _ ≤ C₀ * E ^ 2 * (α + σ) ^ 2 := mul_le_mul_of_nonneg_left hσsum (by positivity) + have htrans := scaled_radial_transport_sobolev_forcing μ hQ hR ha han z f w q + hlap hf C hw e he heuler hradial hsphere + change (∫ x in ball z (2 * R), (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) ≤ + (1 + 2 * ((a + 2) * D + D / 4) / m) * + (∫ x in ball z R, (SobolevSpace.toLp μ hQ w x) ^ 2 ∂μ) + + (8 * D / m) * (∫ x in ball z (4 * R), (SobolevSpace.toLp μ hQ q x) ^ 2 ∂μ) + + (4 * (C : ℝ) ^ 2 * Q / (R * m)) * (∫ x in ball z (4 * R), (e x) ^ 2 ∂μ) at htrans + rw [← restrictLp_norm_sq μ hQ (ball z R) w, ← restrictLp_norm_sq μ hQ (ball z (2 * R)) w] at htrans + have hfirst : (1 + 2 * ((a + 2) * D + D / 4) / m) * α ^ 2 ≤ A₀ * (α + σ) ^ 2 := + (mul_le_mul_of_nonneg_right hA (sq_nonneg _)).trans + (mul_le_mul_of_nonneg_left hαsum hA₀) + have hsecond : (8 * D / m) * (∫ x in ball z (4 * R), (SobolevSpace.toLp μ hQ q x) ^ 2 ∂μ) ≤ + B₀ * F ^ 2 * (α + σ) ^ 2 := by + calc + _ ≤ (8 * D / m) * (F ^ 2 * (α + σ) ^ 2) := + mul_le_mul_of_nonneg_left hq2 (by positivity) + _ ≤ B₀ * (F ^ 2 * (α + σ) ^ 2) := mul_le_mul_of_nonneg_right hB (by positivity) + _ = _ := by ring + have hfinal : ‖SobolevSpace.restrictLp μ hQ (ball z (2 * R)) w‖ ^ 2 ≤ + (T * (α + σ)) ^ 2 := by + calc + _ ≤ _ := htrans.trans (add_le_add (add_le_add hfirst hsecond) hCE) + _ = _ := by rw [mul_pow, hTsq]; ring + exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hT (add_nonneg hα hσ))).mp hfinal + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UniformSharpProjection.lean b/lean/OAI/Geometry/RCD/Harmonic/UniformSharpProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..0fd1973453f4b13b9bf931b1c6b3c1a1efac7c91 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UniformSharpProjection.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Harmonic.SharpProjectionFamily + +namespace OAI + +/-! # A single sharp-projection constant and Euclidean threshold -/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal Topology + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- The collected Poisson and projection estimates imply one constant +and one threshold, uniformly over the center, dyadic scale and configuration. +The proof constructs the countersequence rather than assuming compactness +for a normalized projection residual. -/ +theorem SharpProjectionFamily.uniform_bound {K : ℝ} {n : ℕ} {hX : NoncollapsedRCD K n X} + {I : Type*} {S ρ : ℝ} (d : SharpProjectionFamily hX I S ρ) + (hcompact : LocalPoissonHarmonicCompactnessInput hX) + (hgradient : LocalHarmonicL2GradientInput hX) (hn : 2 ≤ n) + (hS : 0 < S) (hρ : 0 < ρ) (hρS : ρ < S) : + ∃ C : ℝ, 0 < C ∧ ∃ δ : ℝ, 0 < δ ∧ + ∀ i, d.error i < δ → d.size i ≤ C * d.source i := by + classical + by_contra hfail + obtain ⟨t, hpos, hε, hratio, hratioBound⟩ := projection_failure_sequence_with_ratio_bound + d.error d.size d.source (fun i => (d.error_pos i).le) d.source_pos hfail + let q := d.compactnessSequence hgradient hn hS t hε + let M := 2 * d.outerConstant + 1 + have hM : 0 < M := by dsimp only [M]; linarith [d.outerConstant_nonneg] + have hsmall (i : ℕ) : d.source (t i) ≤ d.size (t i) := + (div_le_one (hpos i)).mp (hratioBound i) + have houter (i : ℕ) : ‖normalizeLocalL2 (hausdorff n X) + (ball (d.center (t i)) (S * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (S * d.radius (t i))) (d.residual (t i)))‖ ≤ M * d.size (t i) := by + have hb := (d.outer_bound (t i)).trans (mul_le_mul_of_nonneg_left + (show d.size (t i) + d.source (t i) ≤ 2 * d.size (t i) by linarith [hsmall i]) + d.outerConstant_nonneg) + dsimp only [M] + nlinarith [hpos i] + have hcoeff (i : ℕ) : ‖d.coefficient (t i)‖ + |d.constant (t i)| ≤ + (2 * d.coefficientConstant) * d.size (t i) := by + have hb := (d.coefficient_bound (t i)).trans (mul_le_mul_of_nonneg_left + (show d.size (t i) + d.source (t i) ≤ 2 * d.size (t i) by linarith [hsmall i]) + d.coefficientConstant_nonneg) + nlinarith + have herr := normalized_source_error_tendsto_zero + (fun i => normalizeLocalL2 (hausdorff n X) + (ball (d.center (t i)) (S * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (S * d.radius (t i))) (d.forcing (t i)))) + hpos (fun i => d.forcing_bound (t i)) hratio + have hcontr := no_projected_euler_sequence hcompact hgradient hn hS hρ hρS hM q + (d.target ∘ t) (d.residual ∘ t) (d.forcing ∘ t) (d.coefficient ∘ t) (d.constant ∘ t) + (fun i => d.radialBound / d.radius (t i) ^ 2) + (fun i => d.gradient (t i)) (fun i => d.harmonic (t i)) + (fun i => d.projection (t i)) (fun i => d.euler_identity (t i)) (C := 2 * d.coefficientConstant) + apply hcontr + · intro i + change 0 < ‖normalizeLocalL2 (hausdorff n X) (ball (d.center (t i)) (ρ * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (ρ * d.radius (t i))) (d.residual (t i)))‖ + rw [← d.size_eq] + exact hpos i + · intro i + change _ ≤ M * ‖normalizeLocalL2 (hausdorff n X) (ball (d.center (t i)) (ρ * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (ρ * d.radius (t i))) (d.residual (t i)))‖ + rw [← d.size_eq] + exact houter i + · intro i + change _ ≤ (2 * d.coefficientConstant) * ‖normalizeLocalL2 (hausdorff n X) + (ball (d.center (t i)) (ρ * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (ρ * d.radius (t i))) (d.residual (t i)))‖ + rw [← d.size_eq] + exact hcoeff i + · change Tendsto (fun i => ‖normalizeLocalL2 (hausdorff n X) + (ball (d.center (t i)) (S * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (S * d.radius (t i))) + ((‖normalizeLocalL2 (hausdorff n X) (ball (d.center (t i)) (ρ * d.radius (t i))) + (ne_of_lt (hX.finiteOnBounded _ isBounded_ball)) + (SobolevSpace.restrictLp (hausdorff n X) hX.quadratic + (ball (d.center (t i)) (ρ * d.radius (t i))) (d.residual (t i)))‖)⁻¹ • + d.forcing (t i)))‖) atTop (𝓝 0) + simpa only [← d.size_eq, map_smul, normalizeLocalL2_smul] using herr + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/UpperLevelCaccioppoli.lean b/lean/OAI/Geometry/RCD/Harmonic/UpperLevelCaccioppoli.lean new file mode 100644 index 0000000000000000000000000000000000000000..a16046a38a69b3c40305c1a9f656ab6855bb893f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/UpperLevelCaccioppoli.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Harmonic.UnboundedCaccioppoli + +namespace OAI + +/-! # Harmonic energy estimates above an arbitrary nonnegative level -/ + +open Set Filter MeasureTheory +open scoped NNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +/-- Testing above a level sees the same energy pairing before and after +positive-part truncation. This is locality on the zero set of the test. -/ +theorem upper_level_cutoff_energy_eq + (u : SobolevSpace μ hQ) {k : ℝ} (hk : 0 ≤ k) + {χ : X → ℝ} {L B : ℝ≥0} (hχ : LipschitzWith L χ) + (hs : HasCompactSupport χ) (hb : ∀ x, |χ x| ≤ B) (hn : ∀ x, 0 ≤ χ x) : + let v := u.upperPositivePart μ hQ hk + let M := SobolevSpace.cutoffCLM μ hQ hχ hs hb hn + energyForm μ hQ v (M (M v)) = energyForm μ hQ u (M (M v)) := by + intro v M + let test := M (M v) + have hΓ : localGamma μ hQ v test =ᵐ[μ] localGamma μ hQ u test := by + filter_upwards [localGamma_upperPositivePart μ hQ u test hk, + u.upperPositivePart_coe μ hQ hk, + SobolevSpace.cutoffCLM_coe μ hQ hχ hs hb hn v, + SobolevSpace.cutoffCLM_coe μ hQ hχ hs hb hn (M v), + localGamma_zero_on_level μ hQ test u 0, + localGamma_comm μ hQ u test] with x hp hv hM hM2 hz hc + change localGamma μ hQ v test x = _ at hp + change SobolevSpace.toLp μ hQ v x = _ at hv + change SobolevSpace.toLp μ hQ (M v) x = _ at hM + change SobolevSpace.toLp μ hQ test x = _ at hM2 + by_cases hx : k < SobolevSpace.toLp μ hQ u x + · simpa only [ite_eq_left hx] using hp + · have hv0 : SobolevSpace.toLp μ hQ v x = 0 := by + rw [hv,upperLevelPart,max_eq_right (by linarith)] + have ht0 : SobolevSpace.toLp μ hQ test x = 0 := by rw [hM2,hM,hv0,mul_zero,mul_zero] + rw [hp,ite_eq_right hx,hc,hz ht0] + rw [← integral_localGamma_eq_energyForm,integral_congr_ae hΓ, + integral_localGamma_eq_energyForm] + +/-- The actual unbounded upper-level part of a harmonic function satisfies +the weighted energy estimate. Compact cutoff multiplication supplies the test. -/ +theorem IsSobolevHarmonicOn.upper_level_caccioppoli + {Ω : Set X} (u η : SobolevSpace μ hQ) {k : ℝ} (hk : 0 ≤ k) + (hharm : IsSobolevHarmonicOn μ hQ Ω u) + {χ : X → ℝ} {L B A : ℝ≥0} (hχ : LipschitzWith L χ) + (hs : HasCompactSupport χ) (hb : ∀ x, |χ x| ≤ B) (hn : ∀ x, 0 ≤ χ x) + (hΩ : tsupport χ ⊆ Ω) (hrep : SobolevSpace.toLp μ hQ η =ᵐ[μ] χ) + (hgrad : ∀ᵐ x ∂μ, |SobolevSpace.minimalSlope μ hQ η x| ≤ A) : + let v := u.upperPositivePart μ hQ hk + (∫ x, (SobolevSpace.toLp μ hQ η x)^2*(SobolevSpace.minimalSlope μ hQ v x)^2 ∂μ) ≤ + 4*∫ x, (SobolevSpace.toLp μ hQ v x)^2*(SobolevSpace.minimalSlope μ hQ η x)^2 ∂μ := by + intro v + let M := SobolevSpace.cutoffCLM μ hQ hχ hs hb hn + let test := M (M v) + have hmem : test ∈ SobolevSpace.dirichlet μ hQ Ω := + SobolevSpace.cutoffCLM_mem_dirichlet μ hQ hχ hs hb hn hΩ (M v) + have he : energyForm μ hQ v test = 0 := by + rw [upper_level_cutoff_energy_eq μ hQ u hk hχ hs hb hn] + exact hharm test hmem + exact caccioppoli_cutoffCLM μ hQ v η hχ hs hb hn hrep hgrad he + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/VanishingScalarDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/VanishingScalarDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e1168df843e456d2804cd2638f2b47c67792747 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/VanishingScalarDefect.lean @@ -0,0 +1,34 @@ +import Mathlib.Topology.MetricSpace.Lipschitz +import Mathlib.Analysis.SpecialFunctions.Sqrt + +namespace OAI + +/-! # Vanishing scalar defects from arbitrarily small additive errors -/ + +open Filter +open scoped Topology +namespace RegularPointCoordinates + +theorem vanishing_scalar_defect (A B : ℕ → ℝ) {L M : ℝ} + (hB : ∀ k, 0≤B k ∧ B k≤M) + (happrox : ∀ τ : ℝ, 0<τ → ∃ F e : ℕ → ℝ, + Tendsto F atTop (𝓝 L) ∧ Tendsto e atTop (𝓝 0) ∧ + ∀ k, A k≤F k*B k+e k+τ) : + Tendsto (fun k => max 0 (A k-L*B k)) atTop (𝓝 0) := by + apply Metric.tendsto_nhds.mpr + intro ε hε + obtain ⟨F,e,hF,he,hbound⟩ := happrox (ε/2) (half_pos hε) + have hc : Tendsto (fun k => |F k-L| * M+e k) atTop (𝓝 0) := by + simpa only [sub_self,abs_zero,zero_mul,zero_add] using + (((hF.sub_const L).abs.mul_const M).add he) + filter_upwards [hc.eventually (gt_mem_nhds (half_pos hε))] with k hk + have hp : (F k-L)*B k ≤ |F k-L| * M := + (mul_le_mul_of_nonneg_right (le_abs_self _) (hB k).1).trans + (mul_le_mul_of_nonneg_left (hB k).2 (abs_nonneg _)) + have hd : A k-L*B k<ε := by nlinarith [hbound k] + rw [Real.dist_eq,sub_zero,abs_of_nonneg (le_max_left _ _)] + exact max_lt hε hd + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/VanishingVariationAffineLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/VanishingVariationAffineLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..6897bdcddd18e4da25b403e330eb47347819c387 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/VanishingVariationAffineLimit.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.RCD.Metric.DerivativeValueCompactness +import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic +import Mathlib.Topology.MetricSpace.UniformConvergence + +namespace OAI + +/-! # Affine limits from locally vanishing integrated second variation -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem integrated_derivative_oscillation {f g : ℝ → ℝ} {a b C : ℝ} + (hC : 0 ≤ C) (hbound : ∀ x ∈ Icc a b, |g x| ≤ C) + (hint : ∀ u v, a ≤ u → u ≤ v → v ≤ b → + (∫ t in u..v, g t) = deriv f v-deriv f u) + {u v : ℝ} (hu : u ∈ Icc a b) (hv : v ∈ Icc a b) : + |deriv f u-deriv f v| ≤ C*(b-a) := by + have hord (x y : ℝ) (hx : x ∈ Icc a b) (hy : y ∈ Icc a b) (hxy : x ≤ y) : + |deriv f y-deriv f x| ≤ C*(b-a) := by + have hh := intervalIntegral.norm_integral_le_of_norm_le_const + (a := x) (b := y) (f := g) (C := C) (fun t ht => by + rw [uIoc_of_le hxy] at ht + simpa only [Real.norm_eq_abs] using hbound t ⟨hx.1.trans ht.1.le,ht.2.trans hy.2⟩) + rw [hint x y hx.1 hxy hy.2, Real.norm_eq_abs, abs_of_nonneg (sub_nonneg.mpr hxy)] at hh + exact hh.trans (mul_le_mul_of_nonneg_left (by linarith [hx.1,hy.2]) hC) + rcases le_total u v with huv | hvu + · simpa only [abs_sub_comm] using hord u v hu hv huv + · exact hord v u hv hu hvu + +theorem chord_error_le_of_derivative_oscillation {f : ℝ → ℝ} {a b C x : ℝ} + (hab : a < b) (hC : 0 ≤ C) (hx : x ∈ Icc a b) + (hf : ∀ t ∈ Icc a b, DifferentiableAt ℝ f t) + (hosc : ∀ u ∈ Icc a b, ∀ v ∈ Icc a b, |deriv f u-deriv f v| ≤ C*(b-a)) : + |f x-f a-((f b-f a)/(b-a))*(x-a)| ≤ C*(b-a)^2 := by + obtain ⟨c,hc,he⟩ := exists_deriv_eq_slope f hab + (fun t ht => (hf t ht).continuousAt.continuousWithinAt) + (fun t ht => (hf t ⟨ht.1.le,ht.2.le⟩).differentiableWithinAt) + let m := (f b-f a)/(b-a) + have hd (t : ℝ) (ht : t ∈ Icc a b) : + HasDerivAt (fun z => f z-m*(z-a)) (deriv f t-m) t := by + simpa only [Pi.sub_apply,id_eq,sub_zero,mul_one] using! + (hf t ht).hasDerivAt.sub (((hasDerivAt_id t).sub_const a).const_mul m) + have hbd (t : ℝ) (ht : t ∈ Icc a b) : ‖deriv f t-m‖ ≤ C*(b-a) := by + simpa only [Real.norm_eq_abs,he,m] using hosc t ht c ⟨hc.1.le,hc.2.le⟩ + have hh := Convex.norm_image_sub_le_of_norm_hasDerivWithin_le + (fun t ht => (hd t ht).hasDerivWithinAt) hbd (convex_Icc a b) (left_mem_Icc.mpr hab.le) hx + simp only [sub_self,mul_zero,sub_zero,Real.norm_eq_abs,abs_of_nonneg (sub_nonneg.mpr hx.1)] at hh + have heq : f x-m*(x-a)-f a = f x-f a-m*(x-a) := by ring + rw [heq] at hh + apply hh.trans + calc + C*(b-a)*(x-a) ≤ C*(b-a)*(b-a) := mul_le_mul_of_nonneg_left + (sub_le_sub_right hx.2 a) (mul_nonneg hC (sub_nonneg.mpr hab.le)) + _ = C*(b-a)^2 := by ring + +theorem chord_eq_of_vanishing_second_variation + (F G : ℕ → ℝ → ℝ) (f : ℝ → ℝ) + (hF : ∀ k t, t ∈ Ioo (0:ℝ) 1 → DifferentiableAt ℝ (F k) t) + (hint : ∀ k a b, 0 < a → a ≤ b → b < 1 → + (∫ t in a..b, G k t) = deriv (F k) b-deriv (F k) a) + (hG : ∀ a b, 0 < a → a ≤ b → b < 1 → + TendstoUniformlyOn G (fun _ => 0) atTop (Icc a b)) + (hval : ∀ t ∈ Ioo (0:ℝ) 1, Tendsto (fun k => F k t) atTop (𝓝 (f t))) + {a b x : ℝ} (ha : 0 < a) (hab : a < b) (hb : b < 1) (hx : x ∈ Icc a b) : + (b-a)*(f x-f a) = (x-a)*(f b-f a) := by + have hwin (t : ℝ) (ht : t ∈ Icc a b) : t ∈ Ioo (0:ℝ) 1 := + ⟨ha.trans_le ht.1,ht.2.trans_lt hb⟩ + have hslope := (((hval b ⟨ha.trans hab,hb⟩).sub + (hval a ⟨ha,hab.trans hb⟩)).div_const (b-a)).mul_const (x-a) + have hlim := (((hval x (hwin x hx)).sub (hval a ⟨ha,hab.trans hb⟩)).sub hslope).abs + have hzero : |f x-f a-((f b-f a)/(b-a))*(x-a)| ≤ 0 := by + apply le_of_forall_pos_le_add + intro e he + let δ := e/((b-a)^2+1) + have hδ : 0 < δ := div_pos he (by positivity) + have hsmall : ∀ᶠ k in atTop, + |F k x-F k a-((F k b-F k a)/(b-a))*(x-a)| ≤ δ*(b-a)^2 := by + filter_upwards [(Metric.tendstoUniformlyOn_iff.mp (hG a b ha hab.le hb)) δ hδ] with k hk + apply chord_error_le_of_derivative_oscillation hab hδ.le hx (fun t ht => hF k t (hwin t ht)) + intro u hu v hv + apply integrated_derivative_oscillation (g := G k) hδ.le _ _ hu hv + · intro t ht + have hh := hk t ht + simpa only [dist_zero_left,Real.norm_eq_abs] using hh.le + · intro u v hau huv hvb + exact hint k u v (ha.trans_le hau) huv (hvb.trans_lt hb) + have hle := le_of_tendsto hlim hsmall + have heq : δ*((b-a)^2+1)=e := div_mul_cancel₀ e (by positivity) + dsimp only [δ] at heq + change |f x-f a-((f b-f a)/(b-a))*(x-a)| ≤ 0+e + have hstrict : δ*(b-a)^2 ≤ e := by + change δ*((b-a)^2+1)=e at heq + nlinarith + simpa only [zero_add] using hle.trans hstrict + have he := abs_eq_zero.mp (le_antisymm hzero (abs_nonneg _)) + have hne : b-a ≠ 0 := sub_ne_zero.mpr (ne_of_gt hab) + field_simp [hne] at he + nlinarith only [he] + +theorem affine_of_vanishing_second_variation + (F G : ℕ → ℝ → ℝ) (f : ℝ → ℝ) + (hF : ∀ k t, t ∈ Ioo (0:ℝ) 1 → DifferentiableAt ℝ (F k) t) + (hint : ∀ k a b, 0 < a → a ≤ b → b < 1 → + (∫ t in a..b, G k t) = deriv (F k) b-deriv (F k) a) + (hG : ∀ a b, 0 < a → a ≤ b → b < 1 → + TendstoUniformlyOn G (fun _ => 0) atTop (Icc a b)) + (hval : ∀ t ∈ Ioo (0:ℝ) 1, Tendsto (fun k => F k t) atTop (𝓝 (f t))) : + ∃ α β : ℝ, ∀ t ∈ Ioo (0:ℝ) 1, f t=α*t+β := by + refine ⟨3*(f (2/3)-f (1/3)),2*f (1/3)-f (2/3),fun t ht => ?_⟩ + rcases le_total t (1/3) with hleft | hright + · have hh := chord_eq_of_vanishing_second_variation F G f hF hint hG hval + ht.1 (show t < 2/3 by linarith) (by norm_num : (2/3:ℝ)<1) + (show (1/3:ℝ) ∈ Icc t (2/3) from ⟨hleft,by norm_num⟩) + nlinarith only [hh] + · rcases le_total t (2/3) with hmid | hlast + · have hh := chord_eq_of_vanishing_second_variation F G f hF hint hG hval + (by norm_num : (0:ℝ)<1/3) (by norm_num : (1/3:ℝ)<2/3) + (by norm_num : (2/3:ℝ)<1) ⟨hright,hmid⟩ + nlinarith only [hh] + · have hh := chord_eq_of_vanishing_second_variation F G f hF hint hG hval + (by norm_num : (0:ℝ)<1/3) (show (1/3:ℝ) b a-b 0) := by + simpa only [add_zero] using hb.sub (LipschitzWith.const (b 0)) + +def weightedAffineComposition (θ : Lp ℝ ∞ μ) (w : Lp ℝ 2 μ) + {b : ℝ → ℝ} {D : ℝ≥0} (hb : LipschitzWith D b) (f : Lp ℝ 2 μ) : Lp ℝ 2 μ := + lpMultiplier μ θ ((centeredLipschitz hb).compLp (sub_self _) f)+b 0 • w + +theorem weightedAffineComposition_coe (θ : Lp ℝ ∞ μ) (w : Lp ℝ 2 μ) + (hθ : θ =ᵐ[μ] w) {b : ℝ → ℝ} {D : ℝ≥0} (hb : LipschitzWith D b) + (f : Lp ℝ 2 μ) : weightedAffineComposition μ θ w hb f =ᵐ[μ] + fun x => θ x*b (f x) := by + filter_upwards [Lp.coeFn_add (lpMultiplier μ θ ((centeredLipschitz hb).compLp (sub_self _) f)) + (b 0 • w), lpMultiplier_coe μ θ ((centeredLipschitz hb).compLp (sub_self _) f), + (centeredLipschitz hb).coeFn_compLp (sub_self _) f,Lp.coeFn_smul (b 0) w,hθ] + with x ha hp hf hs hθx + change (lpMultiplier μ θ ((centeredLipschitz hb).compLp (sub_self _) f)+b 0 • w) x = _ + simp only [ha,Pi.add_apply,hp,hf,Function.comp_apply,hs,Pi.smul_apply,smul_eq_mul,hθx] + ring + +theorem weightedAffineComposition_sub_norm_le (θ : Lp ℝ ∞ μ) (w : Lp ℝ 2 μ) + {b : ℝ → ℝ} {D : ℝ≥0} (hb : LipschitzWith D b) (f g : Lp ℝ 2 μ) : + ‖weightedAffineComposition μ θ w hb f-weightedAffineComposition μ θ w hb g‖ ≤ + ‖lpMultiplier μ θ‖*D*‖f-g‖ := by + have he : weightedAffineComposition μ θ w hb f-weightedAffineComposition μ θ w hb g = + lpMultiplier μ θ ((centeredLipschitz hb).compLp (sub_self _) f- + (centeredLipschitz hb).compLp (sub_self _) g) := by + simp only [weightedAffineComposition,map_sub] + abel + rw [he] + exact ((lpMultiplier μ θ).le_opNorm _).trans (by + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left + ((centeredLipschitz hb).norm_compLp_sub_le (sub_self _) f g) (norm_nonneg _)) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedAffinePotential.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedAffinePotential.lean new file mode 100644 index 0000000000000000000000000000000000000000..532c5f94e6553458be2ee15b3197edb9b8d47932 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedAffinePotential.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.RCD.Sobolev.WeightedIntegralPotential + +namespace OAI + +/-! # Weighted scalar potentials with a nonzero derivative at zero + +The weight also belongs to L², so the affine term has a genuine bounded +linear derivative. No constant function is placed in L² on an infinite +measure space. +-/ + +open Filter MeasureTheory +open scoped NNReal ENNReal Topology +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem weightedIntegralPotential_affine_hasFDerivAt + (θ : Lp ℝ ∞ μ) (ρ : Lp ℝ 2 μ) (hθ : θ =ᵐ[μ] ρ) + (B : ℝ≥0) (hB : ∀ᵐ x ∂μ, |θ x|≤B) + {Φ φ : ℝ → ℝ} {C : ℝ≥0} (hd : ∀ a, HasDerivAt Φ (φ a) a) + (hΦ0 : Φ 0=0) (hφ : LipschitzWith C φ) (f : Lp ℝ 2 μ) : + let ψ := fun a => φ a-φ 0 + let hψ : LipschitzWith C ψ := by + simpa only [add_zero] using hφ.sub (LipschitzWith.const (φ 0)) + HasFDerivAt (weightedIntegralPotential μ θ Φ) + (innerSL ℝ (lpMultiplier μ θ (hψ.compLp (by simp only [ψ,sub_self]) f)+φ 0 • ρ)) f := by + let c := φ 0 + let ψ := fun a => φ a-c + let Ψ := fun a => Φ a-c*a + have hψ : LipschitzWith C ψ := by + simpa only [add_zero] using hφ.sub (LipschitzWith.const c) + have hψ0 : ψ 0=0 := sub_self _ + have hΨ0 : Ψ 0=0 := by simp only [Ψ,hΦ0,mul_zero,sub_zero] + have hD (a : ℝ) : HasDerivAt Ψ (ψ a) a := by + simpa only [Ψ,ψ,mul_one] using! (hd a).sub ((hasDerivAt_id a).const_mul c) + have hdiff := weightedIntegralPotential_hasFDerivAt μ θ B hB hD hΨ0 hψ hψ0 f + have heq (g : Lp ℝ 2 μ) : weightedIntegralPotential μ θ Φ g = + weightedIntegralPotential μ θ Ψ g+c*inner ℝ ρ g := by + have hb : ∀ᵐ x ∂μ, ‖θ x‖≤(B:ℝ) := by simpa only [Real.norm_eq_abs] using hB + have hi := (integralPotential_integrable μ hD hΨ0 hψ hψ0 g).bdd_mul + (Lp.aestronglyMeasurable θ) hb + have hj := ((Lp.memLp ρ).integrable_mul (Lp.memLp g)).const_mul c + unfold weightedIntegralPotential + rw [L2.inner_def] + simp only [Real.inner_apply] + rw [←integral_const_mul] + have hsum := integral_add hi hj + simp only [Pi.mul_apply] at hsum + rw [←hsum] + apply integral_congr_ae + filter_upwards [hθ] with x hx + simp only [hx,Ψ] + ring + have hlin : HasFDerivAt (fun g : Lp ℝ 2 μ => c*inner ℝ ρ g) + (c • innerSL ℝ ρ) f := (innerSL ℝ ρ).hasFDerivAt.const_mul c + have hder := hdiff.add hlin + have he : weightedIntegralPotential μ θ Φ = fun g => + weightedIntegralPotential μ θ Ψ g+c*inner ℝ ρ g := funext heq + rw [he] + simpa only [ψ,c,map_add,map_smul] using! hder + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedCoreConvergence.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedCoreConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..44e77f195ca42f9c3884cd818ddf7dba6f1d0d94 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedCoreConvergence.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Harmonic.WeightedUnitDefect + +namespace OAI + +/-! # Passing weighted nonnegative errors to the original inner normalization -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem normalized_weighted_core_convergence {X : Type*} [MeasurableSpace X] + (μ : Measure X) (A Ω : ℕ → Set X) (c : ℕ → ℝ) (hc : ∀ k, 0 f k x*e k x) (Ω k) μ) + (he0 : ∀ k, ∀ᵐ x ∂μ.restrict (Ω k), 0≤e k x) + (hf0 : ∀ k, ∀ᵐ x ∂μ.restrict (Ω k), 0≤f k x) + (hsub : ∀ k, A k⊆Ω k) + (hplateau : ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (A k), f k x=1) + {v : ℝ} (hv : v≠0) + (hmass : Tendsto (fun k => c k*μ.real (A k)) atTop (𝓝 v)) + (hlim : Tendsto (fun k => c k*∫ x in Ω k, f k x*e k x ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => (μ.real (A k))⁻¹*∫ x in A k, e k x ∂μ) atTop (𝓝 0) := by + have hcore : Tendsto (fun k => c k*∫ x in A k, e k x ∂μ) atTop (𝓝 0) := by + apply squeeze_zero' (Eventually.of_forall (fun k => mul_nonneg (hc k).le + (integral_nonneg_of_ae (ae_restrict_of_ae_restrict_of_subset (hsub k) (he0 k))))) _ hlim + filter_upwards [hplateau] with k hk + apply mul_le_mul_of_nonneg_left _ (hc k).le + calc + _ = ∫ x in A k, f k x*e k x ∂μ := integral_congr_ae (hk.mono (fun x hx => by + change e k x=f k x*e k x + rw [hx,one_mul])) + _ ≤ _ := setIntegral_mono_set (hfe k) + (by filter_upwards [hf0 k,he0 k] with x hf he; exact mul_nonneg hf he) + (Eventually.of_forall (hsub k)) + have hquot := hcore.div hmass hv + simp only [zero_div] at hquot + convert hquot using 1 + funext k + change (μ.real (A k))⁻¹*(∫ x in A k, e k x ∂μ)= + (c k*(∫ x in A k, e k x ∂μ))/(c k*μ.real (A k)) + rw [mul_div_mul_left _ _ (hc k).ne',div_eq_inv_mul] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalBound.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7d33874a812720c7c442a05c8c89a92d0869cb7 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalBound.lean @@ -0,0 +1,57 @@ +import Mathlib.MeasureTheory.Integral.Bochner.Basic +import Mathlib.Analysis.SpecialFunctions.Sqrt + +namespace OAI + +/-! # Weighted directional bounds from a fixed quadratic density + +The estimate keeps the small weighted directional energy separate from +its uniform bound. The dominating density may be merely integrable. +-/ + +open MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem weighted_directional_young {w D G H B M r : ℝ} + (hw : 0 ≤ w) (hwB : w ≤ B) (hD : 0 ≤ D) + (hG : 0 ≤ G) (hGM : G ≤ M) (hr : 0 < r) + (hH : H^2 ≤ D*G^2) : + 4*r*(w*|H|) ≤ 4*r^2*B*D+M*(w*G) := by + have hs : |H| ≤ Real.sqrt D*G := by + apply (sq_le_sq₀ (abs_nonneg H) (mul_nonneg (Real.sqrt_nonneg D) hG)).mp + simpa only [sq_abs,mul_pow,Real.sq_sqrt hD] using hH + have hy : 4*r*(Real.sqrt D*G) ≤ 4*r^2*D+G^2 := by + nlinarith [sq_nonneg (2*r*Real.sqrt D-G),Real.sq_sqrt hD] + calc + 4*r*(w*|H|) ≤ w*(4*r*(Real.sqrt D*G)) := by + nlinarith [mul_le_mul_of_nonneg_left hs (mul_nonneg (by positivity : 0≤4*r) hw)] + _ ≤ w*(4*r^2*D+G^2) := mul_le_mul_of_nonneg_left hy hw + _ ≤ 4*r^2*B*D+M*(w*G) := by + have h₁ := mul_le_mul_of_nonneg_right hwB (mul_nonneg (by positivity : 0≤4*r^2) hD) + have h₂ := mul_le_mul_of_nonneg_left hGM (mul_nonneg hw hG) + nlinarith + +variable {X : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem weighted_directional_integral_bound {w D G H : X → ℝ} {B M r : ℝ} + (hr : 0 < r) (hD : Integrable D μ) + (hE : Integrable (fun x => w x*G x) μ) + (hH : Integrable (fun x => w x*|H x|) μ) + (hb : ∀ᵐ x ∂μ, 0≤w x ∧ w x≤B ∧ 0≤D x ∧ 0≤G x ∧ G x≤M ∧ (H x)^2≤D x*(G x)^2) : + 4*r*(∫ x, w x*|H x| ∂μ) ≤ + 4*r^2*B*(∫ x, D x ∂μ)+M*(∫ x, w x*G x ∂μ) := by + have hi := integral_mono_ae (hH.const_mul (4*r)) + ((hD.const_mul (4*r^2*B)).add (hE.const_mul M)) + (hb.mono fun x hx => weighted_directional_young hx.1 hx.2.1 hx.2.2.1 + hx.2.2.2.1 hx.2.2.2.2.1 hr hx.2.2.2.2.2) + have hadd := integral_add (hD.const_mul (4*r^2*B)) (hE.const_mul M) + simp only [Pi.add_apply] at hi hadd + rw [hadd,integral_const_mul,integral_const_mul,integral_const_mul] at hi + exact hi + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalVanishing.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalVanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..9720cb71124fa94c7e27334fb814b5ba10e34b30 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedDirectionalVanishing.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.RCD.Harmonic.WeightedDirectionalBound +import Mathlib.Topology.UniformSpace.UniformConvergence + +namespace OAI + +/-! # Vanishing from the weighted directional Young estimate -/ + +open Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +/-- The dominating mass and the directional bound stay fixed as the +weighted directional energy tends uniformly to zero. -/ +theorem tendstoUniformly_of_directional_bound {Y : Type*} {A E : ℕ → Y → ℝ} + {C M : ℝ} (hC : 0≤C) (hM : 0≤M) + (hA : ∀ k y, 0≤A k y) + (hE : TendstoUniformly E (fun _ => 0) atTop) + (hb : ∀ k y r, 0 0) atTop := by + apply Metric.tendstoUniformly_iff.mpr + intro e he + let r := e/(4*(C+1)) + have hr : 0 C * r i * w i * + ((9 / 16 : ℝ) ^ k * Real.sqrt (P (i + k)) + + (9 / 16 : ℝ) ^ k * Real.sqrt (P (i + 1 + k))) + have hd : Summable d := (h0.add h1).mul_left (C * r i * w i) + have hdist (k : ℕ) : dist (c (i + k)) (c (i + (k + 1))) ≤ d k := by + rw [Real.dist_eq] + have hs := hstep (i + k) + rw [hradius i k] at hs + calc + _ ≤ C * ((1 / 2 : ℝ) ^ k * r i) * w (i + k) * + (Real.sqrt (P (i + k)) + Real.sqrt (P (i + k + 1))) := by + simpa only [Nat.add_assoc] using hs + _ ≤ C * ((1 / 2 : ℝ) ^ k * r i) * ((9 / 8 : ℝ) ^ k * w i) * + (Real.sqrt (P (i + k)) + Real.sqrt (P (i + k + 1))) := by + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hgrowth i k) + (mul_nonneg hC (mul_nonneg (pow_nonneg (by norm_num) k) (hr i)))) + (add_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _)) + _ = d k := by + dsimp only [d] + rw [show (9 / 16 : ℝ) = (1 / 2 : ℝ) * (9 / 8 : ℝ) by norm_num, mul_pow] + simp only [Nat.add_assoc, Nat.add_comm 1 k] + ring + have ht : Tendsto (fun k : ℕ => c (i + k)) atTop (𝓝 0) := + hc.comp (by simpa only [Nat.add_comm] using tendsto_add_atTop_nat i) + have hb := dist_le_tsum_of_dist_le_of_tendsto₀ d hdist hd ht + simp only [Nat.add_zero, Real.dist_eq, sub_zero] at hb + have hsum : (∑' k, d k) = C * r i * w i * + ((∑' k, (9 / 16 : ℝ) ^ k * Real.sqrt (P (i + k))) + + ∑' k, (9 / 16 : ℝ) ^ k * Real.sqrt (P (i + 1 + k))) := by + dsimp only [d] + rw [tsum_mul_left, h0.tsum_add h1] + rw [hsum] at hb + have hm := mul_le_mul_of_nonneg_left (add_le_add h0b h1b) + (mul_nonneg (mul_nonneg hC (hr i)) (hw i)) + refine hb.trans (hm.trans_eq ?_) + ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedMixedError.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedMixedError.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c4579e559f64f73db7a7153a1c600eed986161a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedMixedError.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.RCD.Harmonic.WeightedDirectionalVanishing +import Mathlib.MeasureTheory.Integral.Bochner.Basic + +namespace OAI + +/-! # Mixed errors under bounded moving densities + +The fixed integrable factor is separate from the small weighted energy. +This is the form needed for the mixed osmotic Hessian term. +-/ + +open Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem weighted_mixed_young {w D E H B r : ℝ} + (hw : 0 ≤ w) (hwB : w ≤ B) (hD : 0 ≤ D) (hE : 0 ≤ E) + (hr : 0 < r) (hH : H^2 ≤ D*E) : + 4*r*(w*|H|) ≤ 4*r^2*B*D+w*E := by + have hs : |H| ≤ Real.sqrt D*Real.sqrt E := by + apply (sq_le_sq₀ (abs_nonneg H) (mul_nonneg (Real.sqrt_nonneg D) (Real.sqrt_nonneg E))).mp + simpa only [sq_abs,mul_pow,Real.sq_sqrt hD,Real.sq_sqrt hE] using hH + have hy : 4*r*|H| ≤ 4*r^2*D+E := by + nlinarith [sq_nonneg (2*r*Real.sqrt D-Real.sqrt E),Real.sq_sqrt hD,Real.sq_sqrt hE, + mul_le_mul_of_nonneg_left hs (show 0 ≤ 4*r by positivity)] + have hwy := mul_le_mul_of_nonneg_left hy hw + have hwb := mul_le_mul_of_nonneg_right hwB (mul_nonneg (show 0 ≤ 4*r^2 by positivity) hD) + nlinarith only [hwy,hwb] + +variable {X Y : Type*} [MeasurableSpace X] (μ : Measure X) + +theorem weighted_mixed_error_vanishes + (W E H : ℕ → Y → X → ℝ) (D : X → ℝ) (B : ℝ) (hB : 0 ≤ B) + (hD : Integrable D μ) (hD0 : ∀ᵐ x ∂μ, 0 ≤ D x) + (hEi : ∀ k y, Integrable (fun x => W k y x*E k y x) μ) + (hHi : ∀ k y, Integrable (fun x => W k y x*|H k y x|) μ) + (hpoint : ∀ k y, ∀ᵐ x ∂μ, 0 ≤ W k y x ∧ W k y x ≤ B ∧ + 0 ≤ E k y x ∧ (H k y x)^2 ≤ D x*E k y x) + (hlim : TendstoUniformly (fun k y => ∫ x, W k y x*E k y x ∂μ) (fun _ => 0) atTop) : + TendstoUniformly (fun k y => ∫ x, W k y x*|H k y x| ∂μ) (fun _ => 0) atTop := by + apply tendstoUniformly_of_directional_bound + (C := B*(∫ x, D x ∂μ)) (M := 1) + (mul_nonneg hB (integral_nonneg_of_ae hD0)) (by norm_num) + (fun k y => integral_nonneg_of_ae ((hpoint k y).mono fun x hx => mul_nonneg hx.1 (abs_nonneg _))) hlim + intro k y r hr + have hi := integral_mono_ae ((hHi k y).const_mul (4*r)) + ((hD.const_mul (4*r^2*B)).add (hEi k y)) + (by + filter_upwards [hpoint k y,hD0] with x hx hd + exact weighted_mixed_young hx.1 hx.2.1 hd hx.2.2.1 hr hx.2.2.2) + simp only [Pi.add_apply] at hi + rw [integral_const_mul,integral_add (hD.const_mul (4*r^2*B)) (hEi k y),integral_const_mul] at hi + nlinarith only [hi] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedQuadraticGluing.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedQuadraticGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..bdf5955a23068e493cb39fe73d288e2ddc7948de --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedQuadraticGluing.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.RCD.Transport.BrokenGeodesicCost +import OAI.Analysis.RCDHeat.ExistingAnalytic + +namespace OAI + +/-! # Sharp gluing saturation at an arbitrary interior time -/ + +open Set Filter MeasureTheory +open scoped ENNReal +noncomputable section +namespace RegularPointCoordinates + +theorem weighted_quadratic_gluing_saturation {A : Type*} [MeasurableSpace A] + (μ : Measure A) (a b c : A → ℝ) (ha : Measurable a) (hb : Measurable b) + (han : ∀ᵐ x ∂μ, 0 ≤ a x) (hbn : ∀ᵐ x ∂μ, 0 ≤ b x) + (hcn : ∀ᵐ x ∂μ, 0 ≤ c x) (htri : ∀ᵐ x ∂μ, c x ≤ a x + b x) + {t : ℝ} (ht : 0 < t) (ht1 : t < 1) (C : ℝ≥0∞) (hC : C ≠ ∞) + (h0 : ∫⁻ x, ENNReal.ofReal (a x)^2 ∂μ ≤ ENNReal.ofReal t^2*C) + (h1 : ∫⁻ x, ENNReal.ofReal (b x)^2 ∂μ ≤ ENNReal.ofReal (1-t)^2*C) + (hmin : C ≤ ∫⁻ x, ENNReal.ofReal (c x)^2 ∂μ) : + (∫⁻ x, ENNReal.ofReal (c x)^2 ∂μ)=C ∧ + ∀ᵐ x ∂μ, a x=t*c x ∧ b x=(1-t)*c x := by + have hu : 0 < 1-t := sub_pos.mpr ht1 + let f := fun x => ENNReal.ofReal (c x)^2 + let g := fun x => ENNReal.ofReal t⁻¹*ENNReal.ofReal (a x)^2+ + ENNReal.ofReal (1-t)⁻¹*ENNReal.ofReal (b x)^2 + have hg : Measurable g := + ((ha.ennreal_ofReal.pow_const 2).const_mul _).add + ((hb.ennreal_ofReal.pow_const 2).const_mul _) + have hge (x : A) (hax : 0 ≤ a x) (hbx : 0 ≤ b x) : + g x=ENNReal.ofReal ((a x)^2/t+(b x)^2/(1-t)) := by + dsimp only [g] + rw [← ENNReal.ofReal_pow hax,← ENNReal.ofReal_pow hbx, + ← ENNReal.ofReal_mul (inv_nonneg.mpr ht.le), + ← ENNReal.ofReal_mul (inv_nonneg.mpr hu.le), + ← ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + have hfg : f ≤ᵐ[μ] g := by + filter_upwards [han,hbn,hcn,htri] with x hax hbx hcx hx + rw [hge x hax hbx] + dsimp only [f] + rw [← ENNReal.ofReal_pow hcx] + apply ENNReal.ofReal_le_ofReal + have hh := two_leg_cost_nonneg hax hbx hcx hx ht ht1 + linarith only [hh] + have hta : ENNReal.ofReal t⁻¹*ENNReal.ofReal t^2=ENNReal.ofReal t := by + rw [← ENNReal.ofReal_pow ht.le,← ENNReal.ofReal_mul (inv_nonneg.mpr ht.le)] + congr 1 + field_simp + have htb : ENNReal.ofReal (1-t)⁻¹*ENNReal.ofReal (1-t)^2=ENNReal.ofReal (1-t) := by + rw [← ENNReal.ofReal_pow hu.le,← ENNReal.ofReal_mul (inv_nonneg.mpr hu.le)] + congr 1 + field_simp + have hgc : ∫⁻ x, g x ∂μ ≤ C := by + dsimp only [g] + rw [lintegral_add_left ((ha.ennreal_ofReal.pow_const 2).const_mul _), + lintegral_const_mul _ (ha.ennreal_ofReal.pow_const 2), + lintegral_const_mul _ (hb.ennreal_ofReal.pow_const 2)] + calc + _ ≤ ENNReal.ofReal t⁻¹*(ENNReal.ofReal t^2*C)+ + ENNReal.ofReal (1-t)⁻¹*(ENNReal.ofReal (1-t)^2*C) := by gcongr + _ = C := by + rw [← mul_assoc,← mul_assoc,hta,htb,← add_mul, + ← ENNReal.ofReal_add ht.le hu.le] + simp + have hfc : ∫⁻ x, f x ∂μ ≠ ∞ := + ne_top_of_le_ne_top hC ((lintegral_mono_ae hfg).trans hgc) + have he := ae_eq_of_ae_le_of_lintegral_le hfg hfc hg.aemeasurable (hgc.trans hmin) + refine ⟨le_antisymm ((lintegral_mono_ae hfg).trans hgc) hmin,?_⟩ + filter_upwards [han,hbn,hcn,htri,he] with x hax hbx hcx hx heq + rw [hge x hax hbx] at heq + dsimp only [f] at heq + rw [← ENNReal.ofReal_pow hcx] at heq + have hr : (c x)^2=(a x)^2/t+(b x)^2/(1-t) := by + have hh := congrArg ENNReal.toReal heq + rwa [ENNReal.toReal_ofReal (sq_nonneg _),ENNReal.toReal_ofReal (by positivity)] at hh + exact two_leg_cost_zero hax hbx hcx hx ht ht1 (by linarith only [hr]) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedRadialRigidity.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedRadialRigidity.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dac2369a9154f9d81459461e2711596aade2eeb --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedRadialRigidity.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.RCD.Transport.RadialMidpointRigidity + +namespace OAI + +/-! # Cost rigidity for a radial split at any interior time -/ + +open Set Filter Metric MeasureTheory + +namespace RegularPointCoordinates + +theorem weighted_radial_defect_nonneg {a d e f : ℝ} + (ha : 0 ≤ a) (ha1 : a ≤ 1) (hd : 0 ≤ d) (he : 0 ≤ e) (hf : 0 ≤ f) + (htri : f ≤ d + e) : + 0 ≤ (1 - a) * d ^ 2 + a * e ^ 2 - a * (1 - a) * f ^ 2 := by + have hh : 0 ≤ a * (1 - a) * ((d + e) ^ 2 - f ^ 2) := + mul_nonneg (mul_nonneg ha (sub_nonneg.mpr ha1)) (by nlinarith) + nlinarith [sq_nonneg ((1 - a) * d - a * e)] + +theorem weighted_radial_defect_zero {a d e f : ℝ} + (ha : 0 < a) (ha1 : a < 1) (hd : 0 ≤ d) (he : 0 ≤ e) (hf : 0 ≤ f) + (htri : f ≤ d + e) + (hz : (1 - a) * d ^ 2 + a * e ^ 2 - a * (1 - a) * f ^ 2 = 0) : + d = a * f ∧ e = (1 - a) * f ∧ f = d + e := by + have hprod : 0 < a * (1 - a) := mul_pos ha (sub_pos.mpr ha1) + have hdiff : 0 ≤ (d + e) ^ 2 - f ^ 2 := by nlinarith + have hs : ((1 - a) * d - a * e) ^ 2 = 0 := by + nlinarith [sq_nonneg ((1 - a) * d - a * e), mul_nonneg hprod.le hdiff] + have heq : (1 - a) * d = a * e := by nlinarith + have hsq : (d + e) ^ 2 = f ^ 2 := by + have hh : a * (1 - a) * ((d + e) ^ 2 - f ^ 2) = 0 := by nlinarith [hs] + exact sub_eq_zero.mp ((mul_eq_zero.mp hh).resolve_left hprod.ne') + have hfde : f = d + e := by nlinarith + exact ⟨by nlinarith [hfde], by nlinarith [hfde], hfde⟩ + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] +attribute [local instance] pathBorel pathBorelSpace + +omit [MeasurableSpace X] [BorelSpace X] in +theorem weighted_radial_rigidity_of_moments (π : Measure C(Time, X)) (p : X) + {a C : ℝ} (ha : 0 < a) (ha1 : a < 1) + (hD : Integrable (fun γ : C(Time, X) => dist (γ 0) (γ 1) ^ 2) π) + (h0 : Integrable (fun γ : C(Time, X) => dist (γ 0) p ^ 2) π) + (h1 : Integrable (fun γ : C(Time, X) => dist (γ 1) p ^ 2) π) + (hcost : (∫ γ, dist (γ 0) (γ 1) ^ 2 ∂π) ≤ a ^ 2 * C) + (hm0 : (∫ γ, dist (γ 0) p ^ 2 ∂π) = C) + (hm1 : (∫ γ, dist (γ 1) p ^ 2 ∂π) = (1 - a) ^ 2 * C) : + ∀ᵐ γ ∂π, dist (γ 0) (γ 1) = a * dist (γ 0) p ∧ + dist (γ 1) p = (1 - a) * dist (γ 0) p ∧ + dist (γ 0) p = dist (γ 0) (γ 1) + dist (γ 1) p := by + let F := fun γ : C(Time, X) => (1 - a) * dist (γ 0) (γ 1) ^ 2 + + a * dist (γ 1) p ^ 2 - a * (1 - a) * dist (γ 0) p ^ 2 + have hi : Integrable F π := ((hD.const_mul (1 - a)).add (h1.const_mul a)).sub + (h0.const_mul (a * (1 - a))) + have hn : ∀ᵐ γ ∂π, 0 ≤ F γ := Eventually.of_forall fun γ => + weighted_radial_defect_nonneg ha.le ha1.le dist_nonneg dist_nonneg dist_nonneg + (dist_triangle (γ 0) (γ 1) p) + have hz : (∫ γ, F γ ∂π) = 0 := by + apply le_antisymm _ (integral_nonneg_of_ae hn) + have hh := mul_le_mul_of_nonneg_left hcost (sub_nonneg.mpr ha1.le) + dsimp only [F] + have hiadd : Integrable (fun γ : C(Time, X) => + (1 - a) * dist (γ 0) (γ 1) ^ 2 + a * dist (γ 1) p ^ 2) π := + (hD.const_mul (1 - a)).add (h1.const_mul a) + rw [integral_sub hiadd (h0.const_mul _)] + have haadd : Integrable (fun γ : C(Time, X) => (1 - a) * dist (γ 0) (γ 1) ^ 2) π := + hD.const_mul (1 - a) + have hbadd : Integrable (fun γ : C(Time, X) => a * dist (γ 1) p ^ 2) π := h1.const_mul a + rw [integral_add haadd hbadd, integral_const_mul, integral_const_mul, integral_const_mul, + hm0, hm1] + nlinarith + have hae := (integral_eq_zero_iff_of_nonneg_ae hn hi).mp hz + filter_upwards [hae] with γ hγ + change F γ = 0 at hγ + exact weighted_radial_defect_zero ha ha1 dist_nonneg dist_nonneg dist_nonneg + (dist_triangle (γ 0) (γ 1) p) hγ + +end RegularPointCoordinates + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/WeightedUnitDefect.lean b/lean/OAI/Geometry/RCD/Harmonic/WeightedUnitDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..be288a3377884e9c1569cb5e5ef4606aa3125d49 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/WeightedUnitDefect.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.RCD.Sobolev.PositiveEnergyExcess + +namespace OAI + +/-! # A sharp weighted upper bound and lower integral control give L1 convergence -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem weighted_unit_defect_tendsto {X : Type*} [MeasurableSpace X] + (μ : Measure X) (Ω : ℕ → Set X) (c : ℕ → ℝ) (hc : ∀ k, 0≤c k) + (f g : ℕ → X → ℝ) (hf : ∀ k, IntegrableOn (f k) (Ω k) μ) + (hfg : ∀ k, IntegrableOn (fun x => f k x*g k x) (Ω k) μ) + (hf0 : ∀ k, ∀ᵐ x ∂μ.restrict (Ω k), 0≤f k x) + (hmass : ∀ k, c k*(∫ x in Ω k, f k x ∂μ)≤1) + {I : ℝ} (hlim : Tendsto (fun k => c k*∫ x in Ω k, f k x ∂μ) atTop (𝓝 I)) + (hlower : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, + I-δ≤c k*∫ x in Ω k, f k x*g k x ∂μ) + (hupper : ∀ δ : ℝ, 0<δ → ∀ᶠ k in atTop, ∀ᵐ x ∂μ.restrict (Ω k), + f k x*g k x≤(1+δ)*f k x) : + Tendsto (fun k => c k*∫ x in Ω k, f k x*|g k x-1| ∂μ) atTop (𝓝 0) := by + apply tendsto_order.2 + constructor + · intro a ha + exact Eventually.of_forall (fun k => ha.trans_le (mul_nonneg (hc k) + (integral_nonneg_of_ae (by + filter_upwards [hf0 k] with x hx + exact mul_nonneg hx (abs_nonneg _))))) + · intro b hb + let δ := b/5 + have hδ : 0<δ := by dsimp only [δ]; positivity + filter_upwards [hlower δ hδ,hupper δ hδ,hlim.eventually (eventually_lt_nhds (show I f k x*|g k x-1|) (Ω k) μ := by + apply ((hfg k).sub (hf k)).abs.congr + filter_upwards [hf0 k] with x hx + change |f k x*g k x-f k x|=f k x*|g k x-1| + rw [show f k x*g k x-f k x=f k x*(g k x-1) by ring,abs_mul,abs_of_nonneg hx] + have hir : IntegrableOn (fun x => (2*δ+1)*f k x-f k x*g k x) (Ω k) μ := + ((hf k).const_mul _).sub (hfg k) + have hi := integral_mono_ae hid hir (by + filter_upwards [hf0 k,hkup] with x hx hu + by_cases hg : 0≤g k x-1 + · rw [abs_of_nonneg hg] + nlinarith + · rw [abs_of_neg (lt_of_not_ge hg)] + nlinarith [mul_nonneg hδ.le hx]) + rw [integral_sub ((hf k).const_mul _) (hfg k),integral_const_mul] at hi + have hi' := mul_le_mul_of_nonneg_left hi (hc k) + have hm := hmass k + have hnonneg : 0≤c k*∫ x in Ω k, f k x ∂μ := + mul_nonneg (hc k) (integral_nonneg_of_ae (hf0 k)) + have hδm := mul_le_mul_of_nonneg_left hm (show 0≤2*δ by positivity) + dsimp only [δ] at * + nlinarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Harmonic/YoungPairingLimit.lean b/lean/OAI/Geometry/RCD/Harmonic/YoungPairingLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..d44f7eafd8e7506e19eafdbb64d3c92db0d7a11a --- /dev/null +++ b/lean/OAI/Geometry/RCD/Harmonic/YoungPairingLimit.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.RCD.Sobolev.WeightedGammaYoung + +namespace OAI + +/-! # Vanishing gradient error controls mixed pairings -/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem tendsto_zero_of_young {a e : ℕ → ℝ} {C : ℝ} (hC : 0≤C) + (he : Tendsto e atTop (𝓝 0)) + (hbound : ∀ t : ℝ, 0 c k*∫ x in Ω k, (χ k x)^2* + localGamma μ hQ (f k) (f k) x ∂μ) atTop (𝓝 0)) : + Tendsto (fun k => c k*∫ x in Ω k, φ k x*localGamma μ hQ (f k) (g k) x ∂μ) + atTop (𝓝 0) := by + apply tendsto_zero_of_young (C := B^2*C) (mul_nonneg (sq_nonneg _) hC) herror + intro t ht + filter_upwards [hdom,henergy] with k hdomk hek + have h := weighted_gamma_young_integral μ hQ (f k) (g k) hB ht.le + (hφ k) (hχ k) (hφb k) (hχb k) hdomk + have hh := mul_le_mul_of_nonneg_left h (hc k) + have he := mul_le_mul_of_nonneg_left hek (mul_nonneg (sq_nonneg t) (sq_nonneg B)) + rw [abs_mul,abs_of_nonneg (hc k)] + nlinarith only [hh,he] + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/ACDerivativeL2Endpoint.lean b/lean/OAI/Geometry/RCD/Heat/ACDerivativeL2Endpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..43dd85b6200b17b9c912493df0b41c7309a651d8 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/ACDerivativeL2Endpoint.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.RCD.Sobolev.ACDerivativeEndpointBound +import OAI.Geometry.RCD.Heat.HeatOffDiagonalL2 + +namespace OAI + +/-! # Endpoint error from a square-integrable derivative residual -/ + +open Set Filter MeasureTheory +noncomputable section +namespace RegularPointCoordinates + +theorem ac_endpoint_L2_error {f w E : ℝ → ℝ} {D : ℝ} + (hf : AbsolutelyContinuousOnInterval f 0 1) + (hw : IntegrableOn w (Icc (0:ℝ) 1)) + (hE : IntegrableOn E (Icc (0:ℝ) 1)) + (hbound : ∀ᵐ t : ℝ, t∈Ioo (0:ℝ) 1 → (deriv f t-w t)^2 ≤ D^2*E t) : + (f 1-f 0-(∫ t in Icc (0:ℝ) 1, w t))^2 ≤ D^2*(∫ t in Icc (0:ℝ) 1, E t) := by + let ν := volume.restrict (Icc (0:ℝ) 1) + let z t := deriv f t-w t + have hdf : IntegrableOn (deriv f) (Icc (0:ℝ) 1) := + (intervalIntegrable_iff_integrableOn_Icc_of_le zero_le_one).mp hf.intervalIntegrable_deriv + have hz : Integrable z ν := hdf.sub hw + have hb : ∀ᵐ t ∂ν, (z t)^2 ≤ D^2*E t := by + rw [show ν=volume.restrict (Ioo (0:ℝ) 1) by exact restrict_Ioo_eq_restrict_Icc.symm] + filter_upwards [ae_restrict_of_ae hbound,ae_restrict_mem measurableSet_Ioo] with t ht hm + exact ht hm + have hsq : Integrable (fun t => (z t)^2) ν := by + apply (hE.const_mul (D^2)).mono' (hz.aestronglyMeasurable.pow 2) + filter_upwards [hb] with t ht + simpa only [Pi.pow_apply,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (z t))] using ht + have hL2 : MemLp z 2 ν := (memLp_two_iff_integrable_sq hz.aestronglyMeasurable).mpr hsq + have hcs := integral_mul_sq_le_integral_sq ν z (fun _ => 1) hL2 (memLp_const (1:ℝ)) + have hmass : ν.real univ=1 := by simp [ν,Measure.real,Real.volume_Icc] + have hcs' : (∫ t, z t ∂ν)^2 ≤ ∫ t, (z t)^2 ∂ν := by + simpa only [mul_one,one_pow,integral_const,smul_eq_mul,hmass,sq_abs] using hcs + have heq : (∫ t, z t ∂ν)=f 1-f 0-(∫ t in Icc (0:ℝ) 1, w t) := by + rw [integral_sub hdf hw] + rw [integral_Icc_eq_integral_Ioc,← intervalIntegral.integral_of_le zero_le_one] + rw [hf.integral_deriv_eq_sub] + rw [heq] at hcs' + exact hcs'.trans (by + have hh := integral_mono_ae hsq (hE.const_mul (D^2)) hb + simpa only [integral_const_mul] using hh) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/ActualHeatEnvelope.lean b/lean/OAI/Geometry/RCD/Heat/ActualHeatEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c60ffaf2c8139dbe7c26eb3a942a672f424581f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/ActualHeatEnvelope.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.RCD.Sobolev.DyadicBochnerMass +import OAI.Geometry.RCD.Metric.DyadicMassReindex + +namespace OAI + +/-! # The Gaussian upper decrement in terms of the actual Bochner envelope -/ + +open Set Metric MeasureTheory +open scoped BigOperators InnerProductSpace NNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X E : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] + +/-- A single constant for the shell convolution, exterior finite mass and +scalar regularizer, independent of the dyadic index and vector. -/ +def dyadicHeatEnvelopeConstant (M : PositiveBilinearMeasure X E) (m : ℕ) + (A D R lambda η : ℝ) : ℝ := + (3 / 2 : ℝ) * A * gaussianMassConvolutionConstant m D⁻¹ + + ((3 / 2 : ℝ) * A * gaussianMassConvolutionConstant m D⁻¹ * + (R ^ 2 / R ^ (m + 2)) * ‖M.massOperator univ‖ + + (3 / 4 : ℝ) * R ^ 2 * (lambda + η)) + +omit [MetricSpace X] [BorelSpace X] in +theorem dyadicHeatEnvelopeConstant_nonneg (M : PositiveBilinearMeasure X E) (m : ℕ) + {A D R lambda η : ℝ} (hA : 0 ≤ A) (hR : 0 ≤ R) (hreg : 0 ≤ lambda + η) : + 0 ≤ dyadicHeatEnvelopeConstant M m A D R lambda η := by + have hG := gaussianMassConvolutionConstant_nonneg m D⁻¹ + unfold dyadicHeatEnvelopeConstant + positivity + +/-- Reindexing the Gaussian shell bound and using the finite total source +gives the desired actual positive operator envelope. -/ +theorem gaussian_mass_budget_le_envelope (M : PositiveBilinearMeasure X E) + (m N : ℕ) (p : X) {s R A D lambda η : ℝ} + (hs : 0 < s) (hR : (2 : ℝ) ^ N * s = R) + (hA : 0 ≤ A) (hD : 0 < D) (hreg_nonneg : 0 ≤ lambda + η) (v : E) : + (3 / 2 : ℝ) * (A * gaussianMassConvolutionConstant m D⁻¹ * + (∑ j ∈ Finset.range (N + 1), (3 / 4 : ℝ) ^ j * + (((2 ^ j * s) ^ 2 / (2 ^ j * s) ^ (m + 2)) * + (M.measure v).real (ball p (2 ^ j * s)))) + + s ^ 2 * ((A / s ^ (m + 2)) * Real.exp (-(4 : ℝ) ^ N / D)) * + (M.measure v).real univ) + + (3 / 4 : ℝ) * s ^ 2 * (lambda + η) * ‖v‖ ^ 2 ≤ + dyadicHeatEnvelopeConstant M m A D R lambda η * + ⟪v, dyadicBochnerEnvelope M (m + 2) p R N v⟫_ℝ := by + have hRp : 0 < R := hR ▸ mul_pos (by positivity) hs + let a := (3 / 2 : ℝ) * A * gaussianMassConvolutionConstant m D⁻¹ + let b := (3 / 2 : ℝ) * A * gaussianMassConvolutionConstant m D⁻¹ * + (R ^ 2 / R ^ (m + 2)) * ‖M.massOperator univ‖ + + (3 / 4 : ℝ) * R ^ 2 * (lambda + η) + let B := (3 / 4 : ℝ) ^ N * ‖v‖ ^ 2 + let S := ∑ j ∈ Finset.range (N + 1), (3 / 4 : ℝ) ^ (N - j) * + ⟪v, dyadicBochnerMass M (m + 2) p R j v⟫_ℝ + have hG : 0 ≤ gaussianMassConvolutionConstant m D⁻¹ := + gaussianMassConvolutionConstant_nonneg m D⁻¹ + have ha : 0 ≤ a := by dsimp only [a]; positivity + have hb : 0 ≤ b := by dsimp only [b]; positivity + have hB : 0 ≤ B := by dsimp only [B]; positivity + have hS : 0 ≤ S := by + apply Finset.sum_nonneg + intro j _ + exact mul_nonneg (by positivity) + ((dyadicBochnerMass_isPositive M (m + 2) p hRp.le j).inner_nonneg_right v) + have hsum : (∑ j ∈ Finset.range (N + 1), (3 / 4 : ℝ) ^ j * + (((2 ^ j * s) ^ 2 / (2 ^ j * s) ^ (m + 2)) * + (M.measure v).real (ball p (2 ^ j * s)))) = S := by + rw [outward_sum_eq_inward_sum (fun r => (r ^ 2 / r ^ (m + 2)) * + (M.measure v).real (ball p r)) (3 / 4) N hR] + simp only [S, dyadicBochnerMass_inner] + have hext := heat_exterior_term_le_geometric m N hs hA hD + (show 0 ≤ (M.measure v).real univ from ENNReal.toReal_nonneg) hR + have hmass := bochner_total_mass_le M v + have hext' := hext.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hmass (by positivity : + 0 ≤ A * gaussianMassConvolutionConstant m D⁻¹ * (R ^ 2 / R ^ (m + 2)))) + (by positivity : 0 ≤ (3 / 4 : ℝ) ^ N)) + have hreg := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (dyadic_square_le_three_quarters hs.le N hR) hreg_nonneg) + (sq_nonneg ‖v‖) + rw [hsum, dyadicBochnerEnvelope_inner] + change _ ≤ (a + b) * (B + S) + dsimp only [a, b, B] at ha hb hB ⊢ + nlinarith [mul_nonneg ha hB, mul_nonneg hb hS] + +variable [ProperSpace X] (μ : Measure X) [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel μ hQ ker) + {n : ℕ} {U : Euclidean n →L[ℝ] SobolevSpace μ hQ} + {M : PositiveBilinearMeasure X (Euclidean n)} {κ : ℝ} {p : X} {r : ℝ} {L : ℝ≥0} + (G : ∀ v, LocalHarmonicEnergy μ hQ U M κ p r L v) + {ρ Ccut : ℝ} (χ : GoodLaplacianCutoff μ hQ p ρ Ccut) + +/-- The actual cutoff heat Gram satisfies the upper envelope required by +the cumulative comparison, with the actual scaled Bochner mass operators. -/ +theorem gaussian_dyadic_heat_increment_envelope (m : ℕ) + (hρ : 0 < ρ) (hρr : ρ < r) (hκ : 0 ≤ κ) + {s R A D η lambda : ℝ} (hs : 0 < s) (hA : 0 ≤ A) (hD : 0 < D) + (hη : 0 ≤ η) (hlambda0 : 0 ≤ lambda) + (hlambda : 2 * κ * (L : ℝ) ^ 2 + η ≤ lambda) + (herror : ∀ t ∈ Icc (s ^ 2 / 4) (s ^ 2), ‖harmonicHeatError μ hQ (k := ker) G χ t p‖ ≤ η) + (hgaussian : ∀ t ∈ Icc (s ^ 2 / 4) (s ^ 2), ∀ q : ℝ, 0 ≤ q → ∀ z, + q * s ≤ dist p z → (χ.weight : X → ℝ) z * ker t p z ≤ + (A / s ^ (m + 2)) * Real.exp (-q ^ 2 / D)) + (N : ℕ) (hR : (2 : ℝ) ^ N * s = R) (v : Euclidean n) : + ⟪v, cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (sq_pos_of_pos hs) p lambda v⟫_ℝ - + ⟪v, cutoffHeatGram μ hQ hk χ.weight.continuous (χ.hasCompactSupport μ hQ) + U (div_pos (sq_pos_of_pos hs) (by norm_num : (0 : ℝ) < 4)) p lambda v⟫_ℝ ≤ + dyadicHeatEnvelopeConstant M m A D R lambda η * + ⟪v, dyadicBochnerEnvelope M (m + 2) p R N v⟫_ℝ := + (gaussian_dyadic_heat_increment_upper μ hQ hk G χ m hρ hρr hκ hs hA hD + hlambda0 hlambda herror hgaussian N v).trans + (gaussian_mass_budget_le_envelope M m N p hs hR hA hD (add_nonneg hlambda0 hη) v) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/ActualHeatGrams.lean b/lean/OAI/Geometry/RCD/Heat/ActualHeatGrams.lean new file mode 100644 index 0000000000000000000000000000000000000000..f65a4ed5fa7040b196c3427ba6a87db0eb1466e9 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/ActualHeatGrams.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.RCD.Coordinates.RegularizedGram + +namespace OAI + +/-! +# Heat averages of the canonical Sobolev Gram form + +The published kernel input is the specialization of Jiang--Li--Zhang, +*Heat kernel bounds on metric measure spaces and some applications* (2016), +Section 2.2, printed p. 7, to `L¹ ∩ L²` data and a fixed positive time. +See https://arxiv.org/pdf/1407.5289v2 . +The Gaussian and gradient bounds of Theorem 1.2 and Corollary 1.2 are +separate quantitative inputs, not part of the definition below. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace NNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) + +variable [μ.Regular] + +/-- The positive-time representative of the actual Cheeger heat semigroup. +The representation is required only for data in `L¹ ∩ L²`. +The convolution fields are the Chapman--Kolmogorov identity in the same +published Section 2.2; integrability records that its nonnegative integral +is finite, rather than relying on the zero convention for undefined integrals. -/ +structure IsContinuousHeatKernel (p : ℝ → X → X → ℝ) : Prop where + nonneg : ∀ t, 0 < t → ∀ x y, 0 ≤ p t x y + continuous_right : ∀ t, 0 < t → ∀ x, Continuous (p t x) + continuous_joint : ∀ t, 0 < t → Continuous (fun xy : X × X => p t xy.1 xy.2) + symmetric : ∀ t, 0 < t → ∀ x y, p t x y = p t y x + integrable : ∀ t, 0 < t → ∀ x, Integrable (p t x) μ + mass_one : ∀ t, 0 < t → ∀ x, ∫ y, p t x y ∂μ = 1 + convolution_integrable : ∀ s t, 0 < s → 0 < t → ∀ x y, + Integrable (fun z => p s x z * p t z y) μ + convolution : ∀ s t, 0 < s → 0 < t → ∀ x y, + ∫ z, p s x z * p t z y ∂μ = p (s + t) x y + represents : ∀ t, 0 < t → ∀ f : Lp ℝ 2 μ, Integrable f μ → + (fun x => ∫ y, p t x y * f y ∂μ) =ᵐ[μ] heatAt μ hQ t f + +/-- Existence of a continuous kernel representing the Cheeger heat semigroup. -/ +def ContinuousHeatKernelInput : Prop := + ∃ p : ℝ → X → X → ℝ, IsContinuousHeatKernel μ hQ p + +variable {p : ℝ → X → X → ℝ} (hp : IsContinuousHeatKernel μ hQ p) + {χ : X → ℝ} (hχ : Continuous χ) (hsχ : HasCompactSupport χ) + +include hp hχ hsχ in +/-- Compact cutoff makes each positive-time heat weight globally bounded; +no uniform Gaussian bound is needed for this existence step. -/ +theorem exists_cutoff_heat_weight_bound {t : ℝ} (ht : 0 < t) (x : X) : + ∃ C : ℝ≥0, ∀ y, ‖χ y * p t x y‖ ≤ C := by + have hc : Continuous (fun y => χ y * p t x y) := hχ.mul (hp.continuous_right t ht x) + have hs : HasCompactSupport (fun y => χ y * p t x y) := hsχ.mul_right + obtain ⟨B, hB⟩ := (hs.isCompact_range hc).isBounded.exists_norm_le + refine ⟨⟨max B 0, le_max_right _ _⟩, fun y => ?_⟩ + exact (hB _ (mem_range_self y)).trans (le_max_left _ _) + +def cutoffHeatWeightBound {t : ℝ} (ht : 0 < t) (x : X) : ℝ≥0 := + (exists_cutoff_heat_weight_bound μ hQ hp hχ hsχ ht x).choose + +theorem cutoffHeatWeight_le {t : ℝ} (ht : 0 < t) (x y : X) : + ‖χ y * p t x y‖ ≤ cutoffHeatWeightBound μ hQ hp hχ hsχ ht x := + (exists_cutoff_heat_weight_bound μ hQ hp hχ hsχ ht x).choose_spec y + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + (U : E →L[ℝ] SobolevSpace μ hQ) + +/-- The actual cutoff heat average of the Gram field, with the manuscript's +positive scalar regularization. The weight is constructed from the kernel. -/ +def cutoffHeatGram {t : ℝ} (ht : 0 < t) (x : X) (lambda : ℝ) : E →L[ℝ] E := + regularizedSobolevGram μ hQ U + ((hχ.mul (hp.continuous_right t ht x)).aestronglyMeasurable) + (Filter.Eventually.of_forall (cutoffHeatWeight_le μ hQ hp hχ hsχ ht x)) + (lambda * t) + +theorem cutoffHeatGram_energy {t : ℝ} (ht : 0 < t) (x : X) (lambda : ℝ) (v : E) : + ⟪v, cutoffHeatGram μ hQ hp hχ hsχ U ht x lambda v⟫_ℝ = + (∫ y, (χ y * p t x y) * (SobolevSpace.minimalSlope μ hQ (U v) y) ^ 2 ∂μ) + + (lambda * t) * ‖v‖ ^ 2 := by + exact regularizedSobolevGram_energy μ hQ U _ _ _ v + +/-- Whenever a cutoff energy density is represented as an `L¹ ∩ L²` +function, the quadratic form is the actual Cheeger heat semigroup applied +to that density, with precisely the added scalar regularization. -/ +theorem cutoffHeatGram_represents_energy {t : ℝ} (ht : 0 < t) (lambda : ℝ) + (v : E) (f : Lp ℝ 2 μ) (hfi : Integrable f μ) + (hf : f =ᵐ[μ] fun y => χ y * (SobolevSpace.minimalSlope μ hQ (U v) y) ^ 2) : + (fun x => ⟪v, cutoffHeatGram μ hQ hp hχ hsχ U ht x lambda v⟫_ℝ) =ᵐ[μ] + fun x => heatAt μ hQ t f x + (lambda * t) * ‖v‖ ^ 2 := by + filter_upwards [hp.represents t ht f hfi] with x hx + rw [cutoffHeatGram_energy] + have he : (∫ y, (χ y * p t x y) * + (SobolevSpace.minimalSlope μ hQ (U v) y) ^ 2 ∂μ) = + ∫ y, p t x y * f y ∂μ := by + apply integral_congr_ae + filter_upwards [hf] with y hy + rw [hy] + ring + rw [he, hx] + +theorem cutoffHeatGram_isPositive (hχpos : ∀ y, 0 ≤ χ y) + {t : ℝ} (ht : 0 < t) (x : X) {lambda : ℝ} (hlambda : 0 ≤ lambda) : + (cutoffHeatGram μ hQ hp hχ hsχ U ht x lambda).IsPositive := by + apply regularizedSobolevGram_isPositive + · exact Filter.Eventually.of_forall fun y => mul_nonneg (hχpos y) (hp.nonneg t ht x y) + · exact mul_nonneg hlambda ht.le + +/-- Strict regularization constructs the inverse of every actual heat Gram +operator in finite dimension, at every testing point and positive time. -/ +def cutoffHeatGramEquiv [FiniteDimensional ℝ E] (hχpos : ∀ y, 0 ≤ χ y) + {t : ℝ} (ht : 0 < t) (x : X) {lambda : ℝ} (hlambda : 0 < lambda) : E ≃L[ℝ] E := + regularizedSobolevGramEquiv μ hQ U + ((hχ.mul (hp.continuous_right t ht x)).aestronglyMeasurable) + (Filter.Eventually.of_forall (cutoffHeatWeight_le μ hQ hp hχ hsχ ht x)) + (Filter.Eventually.of_forall fun y => mul_nonneg (hχpos y) (hp.nonneg t ht x y)) + (mul_pos hlambda ht) + +theorem cutoffHeatGramEquiv_apply [FiniteDimensional ℝ E] (hχpos : ∀ y, 0 ≤ χ y) + {t : ℝ} (ht : 0 < t) (x : X) {lambda : ℝ} (hlambda : 0 < lambda) (v : E) : + cutoffHeatGramEquiv μ hQ hp hχ hsχ U hχpos ht x hlambda v = + cutoffHeatGram μ hQ hp hχ hsχ U ht x lambda v := rfl + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/ActualHeatMass.lean b/lean/OAI/Geometry/RCD/Heat/ActualHeatMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..b76fae156b3c7cbf598ce41499835fcf2fb6ae31 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/ActualHeatMass.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.RCD.Heat.ActualHeatGrams +import OAI.Geometry.RCD.Coordinates.WeightedBilinearMeasure + +namespace OAI + +/-! +# Heat averages of full local mass measures + +The weight is the same actual heat kernel and compact cutoff used in the +Gram matrices. The mass can have a singular part and is identified locally +with the Bochner measure. +-/ + +open Set MeasureTheory +open scoped InnerProductSpace BoundedContinuousFunction + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) [μ.Regular] + {p : ℝ → X → X → ℝ} (hp : IsContinuousHeatKernel μ hQ p) + {χ : X → ℝ} (hχ : Continuous χ) (hsχ : HasCompactSupport χ) + +/-- The actual cutoff heat weight, as a bounded continuous function. -/ +def cutoffHeatWeight {t : ℝ} (ht : 0 < t) (x : X) : X →ᵇ ℝ := + BoundedContinuousFunction.ofNormedAddCommGroup + (fun y => χ y * p t x y) (hχ.mul (hp.continuous_right t ht x)) + (cutoffHeatWeightBound μ hQ hp hχ hsχ ht x) + (cutoffHeatWeight_le μ hQ hp hχ hsχ ht x) + +theorem cutoffHeatWeight_apply {t : ℝ} (ht : 0 < t) (x y : X) : + cutoffHeatWeight μ hQ hp hχ hsχ ht x y = χ y * p t x y := rfl + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] (M : PositiveBilinearMeasure X E) + +/-- Heat integration of the full mass measure on a finite coordinate span. -/ +def cutoffHeatMass {t : ℝ} (ht : 0 < t) (x : X) : E →L[ℝ] E := + M.weightedOperator (cutoffHeatWeight μ hQ hp hχ hsχ ht x) + +theorem cutoffHeatMass_energy {t : ℝ} (ht : 0 < t) (x : X) (v : E) : + ⟪v, cutoffHeatMass μ hQ hp hχ hsχ M ht x v⟫_ℝ = + ∫ y, (χ y * p t x y) ∂(M.measure v) := + M.weightedOperator_energy _ v + +theorem cutoffHeatMass_isPositive (hχpos : ∀ y, 0 ≤ χ y) + {t : ℝ} (ht : 0 < t) (x : X) : + (cutoffHeatMass μ hQ hp hχ hsχ M ht x).IsPositive := + M.weightedOperator_isPositive _ fun y => + mul_nonneg (hχpos y) (hp.nonneg t ht x y) + +theorem cutoffHeatMass_comap (A : E →L[ℝ] E) {t : ℝ} (ht : 0 < t) (x : X) : + cutoffHeatMass μ hQ hp hχ hsχ (M.comap A.toLinearMap) ht x = + A.adjoint.comp ((cutoffHeatMass μ hQ hp hχ hsχ M ht x).comp A) := + M.comap_weightedOperator A _ + +/-- Kernel lower estimates turn directly into estimates for singular or +absolutely continuous mass on the testing ball. -/ +theorem cutoffHeatMass_lower_mass (hχpos : ∀ y, 0 ≤ χ y) + {t : ℝ} (ht : 0 < t) (x : X) (s : Set X) (hs : MeasurableSet s) + (hχone : ∀ y ∈ s, χ y = 1) (c : ℝ) (hc : ∀ y ∈ s, c ≤ p t x y) (v : E) : + c * ⟪v, M.massOperator s v⟫_ℝ ≤ + ⟪v, cutoffHeatMass μ hQ hp hχ hsχ M ht x v⟫_ℝ := by + apply M.massOperator_le_weightedOperator _ + (fun y => mul_nonneg (hχpos y) (hp.nonneg t ht x y)) s hs c + intro y hy + change c ≤ χ y * p t x y + simpa only [hχone y hy, one_mul] using hc y hy + +/-- Spatial comparisons of the kernel also compare heat mass matrices, +without needing pointwise representatives of a mass density. -/ +theorem cutoffHeatMass_energy_mono (hχpos : ∀ y, 0 ≤ χ y) + {t s : ℝ} (ht : 0 < t) (hs : 0 < s) (x z : X) + (hkernel : ∀ y, p t x y ≤ p s z y) (v : E) : + ⟪v, cutoffHeatMass μ hQ hp hχ hsχ M ht x v⟫_ℝ ≤ + ⟪v, cutoffHeatMass μ hQ hp hχ hsχ M hs z v⟫_ℝ := by + apply M.weightedOperator_energy_mono + intro y + exact mul_le_mul_of_nonneg_left (hkernel y) (hχpos y) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneAllTimes.lean b/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneAllTimes.lean new file mode 100644 index 0000000000000000000000000000000000000000..f33502e2ec50bc891b7b1481edebbab85ea6fa36 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneAllTimes.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Sobolev.RemoveExceptionalTimes + +namespace OAI + +/-! # Uniform convergence at every time from a vanishing one-sided error + +Good times bracket any prescribed interior time. The common Lipschitz +bound of the limit and the vanishing monotonicity error squeeze every +spatial value with the same error. +-/ + +open Set Filter MeasureTheory +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem almost_monotone_uniform_all_times {Y : Type*} + {a b : ℝ} (N : Set ℝ) (hN : N.Countable) + (f : ℕ → ℝ → Y → ℝ) (H : ℝ → Y → ℝ) (e : ℕ → ℝ) + (he : Tendsto e atTop (𝓝 0)) (L : ℝ) (hL : 0 ≤ L) + (hH : ∀ s ∈ Ioo a b, ∀ t ∈ Ioo a b, ∀ x, + |H s x-H t x| ≤ L*|s-t|) + (ho : ∀ k s t, a ≤ s → s ≤ t → t ≤ b → ∀ x, + f k s x-f k t x ≤ e k*(t-s)) + (hlim : ∀ s ∈ Ioo a b, s ∉ N → TendstoUniformly (fun k => f k s) (H s) atTop) + {t : ℝ} (ht : t ∈ Ioo a b) : + TendstoUniformly (fun k => f k t) (H t) atTop := by + apply Metric.tendstoUniformly_iff.mpr + intro ε hε + let d := ε/(4*(L+1)) + have hd : 0 < d := by dsimp only [d]; positivity + have hdε : (L+1)*d = ε/4 := by dsimp only [d]; field_simp + have hden : Dense Nᶜ := volume.dense_of_ae (hN.ae_notMem volume) + obtain ⟨s,hs,hsN⟩ := hden.inter_open_nonempty (Ioo (max a (t-d)) t) + isOpen_Ioo (nonempty_Ioo.mpr (max_lt ht.1 (by linarith))) + obtain ⟨u,hu,huN⟩ := hden.inter_open_nonempty (Ioo t (min b (t+d))) + isOpen_Ioo (nonempty_Ioo.mpr (lt_min ht.2 (by linarith))) + have hsab : s ∈ Ioo a b := ⟨(le_max_left _ _).trans_lt hs.1,hs.2.trans ht.2⟩ + have huab : u ∈ Ioo a b := ⟨ht.1.trans hu.1,hu.2.trans_le (min_le_left _ _)⟩ + have hsd : t-s < d := by have := (le_max_right a (t-d)).trans_lt hs.1; linarith + have hud : u-t < d := by have := hu.2.trans_le (min_le_right b (t+d)); linarith + have hsmall : ∀ᶠ k in atTop, e k < 1 := he.eventually (gt_mem_nhds (by norm_num)) + filter_upwards [hsmall, + (Metric.tendstoUniformly_iff.mp (hlim s hsab hsN)) (ε/2) (by positivity), + (Metric.tendstoUniformly_iff.mp (hlim u huab huN)) (ε/2) (by positivity)] with k hk hks hku + intro x + have hlow := ho k s t hsab.1.le hs.2.le ht.2.le x + have hupp := ho k t u ht.1.le hu.1.le huab.2.le x + have hHs := hH s hsab t ht x + have hHu := hH u huab t ht x + rw [abs_of_neg (sub_neg.mpr hs.2)] at hHs + rw [abs_of_pos (sub_pos.mpr hu.1)] at hHu + have hes : e k*(t-s) ≤ t-s := by + simpa using mul_le_mul_of_nonneg_right hk.le (sub_nonneg.mpr hs.2.le) + have heu : e k*(u-t) ≤ u-t := by + simpa using mul_le_mul_of_nonneg_right hk.le (sub_nonneg.mpr hu.1.le) + have hls : L*(t-s)+(t-s) < ε/4 := by nlinarith + have hlu : L*(u-t)+(u-t) < ε/4 := by nlinarith + have hfs := hks x + have hfu := hku x + rw [Real.dist_eq] at hfs hfu ⊢ + rcases abs_lt.mp hfs with ⟨hfs₁,hfs₂⟩ + rcases abs_lt.mp hfu with ⟨hfu₁,hfu₂⟩ + rcases abs_le.mp hHs with ⟨hHs₁,hHs₂⟩ + rcases abs_le.mp hHu with ⟨hHu₁,hHu₂⟩ + apply abs_lt.mpr + constructor <;> linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneTimeLimit.lean b/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneTimeLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b12e11edb65334fa6d8b947bc48e48eeddf7c62 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AlmostMonotoneTimeLimit.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.RCD.Heat.TimeLowerEnvelope + +namespace OAI + +/-! # Convergence between dense time slices + +A vanishing one-sided time error suffices for convergence at every +continuity point of the bounded monotone envelope. +-/ + +open Set Filter +open scoped Topology +noncomputable section +namespace RegularPointCoordinates + +theorem almost_monotone_time_limit + {δ M : ℝ} (hM : 0 ≤ M) (s v : ℕ → ℝ) + (hs : ∀ i, s i ∈ Icc δ 1) + (hdense : ∀ a b : ℝ, δ ≤ a → b ≤ 1 → a < b → ∃ i, a < s i ∧ s i < b) + (f : ℕ → ℝ → ℝ) (e : ℕ → ℝ) (he : Tendsto e atTop (𝓝 0)) + (hb : ∀ k t, t ∈ Icc δ 1 → |f k t| ≤ M) + (hv : ∀ i, |v i| ≤ M) + (hl : ∀ i, Tendsto (fun k => f k (s i)) atTop (𝓝 (v i))) + (ho : ∀ k a b, δ ≤ a → a ≤ b → b ≤ 1 → f k a-f k b ≤ e k*(b-a)) + {t : ℝ} (ht : t ∈ Ioo δ 1) + (hc : ContinuousAt (timeLowerEnvelope M s v) t) : + Tendsto (fun k => f k t) atTop (𝓝 (timeLowerEnvelope M s v t)) := by + apply tendsto_order.mpr + constructor + · intro a ha + obtain ⟨y,hy,hay⟩ := exists_lt_of_lt_csSup + (show ({-M} ∪ {y | ∃ i, s i < t ∧ y = v i}).Nonempty from + ⟨-M,Or.inl (mem_singleton _)⟩) ha + rcases hy with hy | ⟨i,hit,rfl⟩ + · have haM : a < -M := by simpa only [mem_singleton_iff.mp hy] using hay + exact Eventually.of_forall fun k => haM.trans_le (abs_le.mp (hb k t ⟨ht.1.le,ht.2.le⟩)).1 + · have her : Tendsto (fun k => e k*(t-s i)) atTop (𝓝 0) := by + simpa only [zero_mul] using he.mul_const (t-s i) + have hlim : Tendsto (fun k => f k (s i)-e k*(t-s i)) atTop (𝓝 (v i)) := by + simpa only [sub_zero] using (hl i).sub her + filter_upwards [(tendsto_order.mp hlim).1 a hay] with k hk + have hh := ho k (s i) t (hs i).1 hit.le ht.2.le + linarith + · intro a ha + have hnh : {u : ℝ | timeLowerEnvelope M s v u < a} ∈ 𝓝 t := + hc.preimage_mem_nhds (Iio_mem_nhds ha) + obtain ⟨l,b,htlb,hsub⟩ := mem_nhds_iff_exists_Ioo_subset.mp hnh + let u := (t+min b 1)/2 + have htu : t < u := by dsimp only [u]; have := lt_min htlb.2 ht.2; linarith + have hub : u < b := by + dsimp only [u] + have := min_le_left b 1 + linarith [htlb.2] + have hu1 : u < 1 := by + dsimp only [u] + have := min_le_right b 1 + linarith [ht.2] + have hua : timeLowerEnvelope M s v u < a := hsub ⟨htlb.1.trans htu,hub⟩ + obtain ⟨i,hti,hiu⟩ := hdense t u ht.1.le hu1.le htu + have hia : v i < a := (sample_le_timeLowerEnvelope hM s v hv hiu).trans_lt hua + have her : Tendsto (fun k => e k*(s i-t)) atTop (𝓝 0) := by + simpa only [zero_mul] using he.mul_const (s i-t) + have hlim : Tendsto (fun k => f k (s i)+e k*(s i-t)) atTop (𝓝 (v i)) := by + simpa only [add_zero] using (hl i).add her + filter_upwards [(tendsto_order.mp hlim).2 a hia] with k hk + have hh := ho k t (s i) ht.1.le hti.le (hs i).2 + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AnnularHeatAverages.lean b/lean/OAI/Geometry/RCD/Heat/AnnularHeatAverages.lean new file mode 100644 index 0000000000000000000000000000000000000000..48231f405c7278882cc33e9ef350e42f7a09f08e --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AnnularHeatAverages.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.AnnularHeatLipschitz +import OAI.Geometry.RCD.Sobolev.LocalLipschitzAverages + +namespace OAI + +/-! # Interior averages of heat evolutions of annular sources -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +theorem NoncollapsedRCD.annular_heat_average_difference {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) : + ∃ J : ℝ, 0 < J ∧ ∀ (p : X) (R t : ℝ), 0 < R → -1 ≤ K*R^2 → + 0 < t → t ≤ 1 → t ≤ R^2 → + ∀ q : Lp ℝ 2 (hausdorff n X), Integrable q (hausdorff n X) → + (∀ᵐ z ∂hausdorff n X, q z ≠ 0 → R ≤ dist z p ∧ dist z p ≤ 2*R) → + ∀ (x y : X) (r : ℝ), 0 < r → + (closedBall x r ⊆ closedBall p (R/8)) → + (closedBall y r ⊆ closedBall p (R/8)) → + |(⨍ z in closedBall x r, heatAt (hausdorff n X) hX.quadratic t q z ∂hausdorff n X)- + (⨍ z in closedBall y r, heatAt (hausdorff n X) hX.quadratic t q z ∂hausdorff n X)| ≤ + (J/(R*(hausdorff n X).real (ball p R))*(∫ z, |q z| ∂hausdorff n X))* + (dist x y+2*r) := by + obtain ⟨J,hJ,he⟩ := hX.annular_heat_difference hn hk hg + refine ⟨J,hJ,?_⟩ + intro p R t hR hcurv ht ht1 htR q hqi hqs x y r hr hx hy + let μ := hausdorff n X + let : IsLocallyFiniteMeasure μ := locallyFinite_of_finiteOnBounded μ hX.finiteOnBounded + let L : ℝ≥0 := ⟨J/(R*μ.real (ball p R))*(∫ z, |q z| ∂μ),by positivity⟩ + have hLip : LipschitzOnWith L (kernelHeat μ hX.quadratic hk t q) (closedBall p (R/8)) := by + apply LipschitzOnWith.of_dist_le_mul + intro a ha b hb + simpa only [Real.dist_eq,L,NNReal.coe_mk,μ] using! he p R t hR hcurv ht ht1 htR q hqi hqs a b ha hb + have hrep := kernelHeat_represents μ hX.quadratic hk ht q hqi + have havg (a : X) : + (⨍ z in closedBall a r, heatAt μ hX.quadratic t q z ∂μ) = + ⨍ z in closedBall a r, kernelHeat μ hX.quadratic hk t q z ∂μ := + average_congr (ae_restrict_of_ae hrep.symm) + rw [havg x,havg y] + exact local_lipschitz_ball_average_bound μ hLip x y hr.le + ((hX.fullSupport x r hr).trans_le (measure_mono ball_subset_closedBall)).ne' + ((hX.fullSupport y r hr).trans_le (measure_mono ball_subset_closedBall)).ne' hx hy + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AnnularHeatLipschitz.lean b/lean/OAI/Geometry/RCD/Heat/AnnularHeatLipschitz.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f82fe3b9f7b45d87a634c38545cfe517d1fdfb2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AnnularHeatLipschitz.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.AnnularKernelDifference +import OAI.Geometry.RCD.Transport.GeodesicShortSteps + +namespace OAI + +/-! # Interior Lipschitz control for heat flow of an annular source -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- A source supported away from an interior ball has a uniformly Lipschitz +heat evolution there, all the way down to arbitrarily small positive time. -/ +theorem NoncollapsedRCD.annular_heat_difference {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) : + ∃ J : ℝ, 0 < J ∧ ∀ (p : X) (R t : ℝ), 0 < R → -1 ≤ K*R^2 → + 0 < t → t ≤ 1 → t ≤ R^2 → + ∀ q : Lp ℝ 2 (hausdorff n X), Integrable q (hausdorff n X) → + (∀ᵐ z ∂hausdorff n X, q z ≠ 0 → R ≤ dist z p ∧ dist z p ≤ 2*R) → + ∀ x y : X, dist x p ≤ R/8 → dist y p ≤ R/8 → + |kernelHeat (hausdorff n X) hX.quadratic hk t q x- + kernelHeat (hausdorff n X) hX.quadratic hk t q y| ≤ + (J/(R*(hausdorff n X).real (ball p R))*(∫ z, |q z| ∂hausdorff n X))*dist x y := by + obtain ⟨J,hJ,hkernel⟩ := hX.annular_kernel_difference hn hk hg + refine ⟨J,hJ,?_⟩ + intro p R t hR hcurv ht ht1 htR q hqi hqs x y hx hy + let μ := hausdorff n X + let V := μ.real (ball p R) + let F := kernelHeat μ hX.quadratic hk t q + have hV : 0 < V := ENNReal.toReal_pos (hX.fullSupport p R hR).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hc : 0 ≤ J/(R*V) := by positivity + have hi (a : X) : Integrable (fun z => ker t a z*q z) μ := + (heatKernel_memLp μ hX.quadratic hk ht a).integrable_mul (Lp.memLp q) + obtain ⟨γ,hxγ,hyγ,hγ⟩ := hX.geodesic x y + have hdxy : dist x y ≤ R/4 := by + have hh := dist_triangle x p y + rw [dist_comm p y] at hh + linarith + have hγp (s : Time) : dist (γ s) p ≤ R/2 := by + have hgs := hγ s 0 + rw [hxγ,hyγ] at hgs + change dist (γ s) x = |(s:ℝ)-0| *dist x y at hgs + rw [sub_zero,abs_of_nonneg s.2.1] at hgs + have hdist : dist (γ s) x ≤ dist x y := by + rw [hgs] + exact mul_le_of_le_one_left dist_nonneg s.2.2 + have hh := dist_triangle (γ s) x p + linarith + have hshort (s u : Time) (hsu : dist (γ s) (γ u) ≤ Real.sqrt t) : + |F (γ s)-F (γ u)| ≤ + (J/(R*V)*(∫ z, |q z| ∂μ))*dist (γ s) (γ u) := by + have hid : Integrable (fun z => (ker t (γ s) z-ker t (γ u) z)*q z) μ := by + convert (hi (γ s)).sub (hi (γ u)) using 1 + funext z + exact sub_mul _ _ _ + have hdiff : F (γ s)-F (γ u) = + ∫ z, (ker t (γ s) z-ker t (γ u) z)*q z ∂μ := by + dsimp only [F] + rw [kernelHeat_eq_integral μ hX.quadratic hk ht q (γ s), + kernelHeat_eq_integral μ hX.quadratic hk ht q (γ u), + ← integral_sub (hi (γ s)) (hi (γ u))] + apply integral_congr_ae + exact Filter.Eventually.of_forall fun z => (sub_mul _ _ _).symm + rw [hdiff] + calc + _ ≤ ∫ z, |(ker t (γ s) z-ker t (γ u) z)*q z| ∂μ := abs_integral_le_integral_abs + _ ≤ ∫ z, (J/(R*V)*dist (γ s) (γ u))*|q z| ∂μ := by + apply integral_mono_ae hid.abs (hqi.abs.const_mul _) + filter_upwards [hqs] with z hz + by_cases hqz : q z = 0 + · simp [hqz] + rw [abs_mul] + exact mul_le_mul_of_nonneg_right + (hkernel p R t hR hcurv ht ht1 htR (γ s) (γ u) z (hγp s) + (hz hqz).1 (hz hqz).2 hsu) (abs_nonneg _) + _ = _ := by rw [integral_const_mul]; ring + have hh := hγ.short_step_bound F (Real.sqrt_pos.mpr ht) hshort + simpa only [hxγ,hyγ,F,V,μ] using hh + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AnnularKernelDifference.lean b/lean/OAI/Geometry/RCD/Heat/AnnularKernelDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..796a8a8887e25ee877a1b21da04ad0f82d6d9ef2 --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AnnularKernelDifference.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.RCD.Coordinates.CoordinateHeatInput +import OAI.Geometry.RCD.Heat.KernelGaussianDifference +import OAI.Geometry.RCD.Heat.HeatBallPowerVolume +import OAI.Geometry.RCD.Heat.GaussianAnnularGradient + +namespace OAI + +/-! # Uniform heat-kernel differences across a separated annulus -/ + +open Set Metric MeasureTheory +open scoped NNReal ENNReal + +noncomputable section +namespace RegularPointCoordinates + +private theorem inverse_volume_coefficient {n : ℕ} {s R V W C H : ℝ} + (hs : 0 < s) (hR : 0 < R) (hV : 0 < V) (hW : 0 < W) (hC : 0 ≤ C) (hH : 0 < H) + (hv : (s/(H*R))^n*V ≤ W) : + C/(s*W) ≤ (C*H^n/V)*((R/s)^n/s) := by + let D := H^n*(R/s)^n + have hD : 0 < D := by dsimp [D]; positivity + have he : D*(s/(H*R))^n = 1 := by + dsimp [D] + rw [← mul_pow,← mul_pow] + have hx : H*(R/s)*(s/(H*R)) = 1 := by field_simp + rw [hx,one_pow] + have hvol : V ≤ D*W := by + calc + V = D*((s/(H*R))^n*V) := by rw [← mul_assoc,he,one_mul] + _ ≤ D*W := mul_le_mul_of_nonneg_left hv hD.le + have hi : 1/W ≤ D/V := (div_le_div_iff₀ hW hV).mpr (by simpa only [one_mul] using hvol) + calc + C/(s*W) = (C/s)*(1/W) := by ring + _ ≤ (C/s)*(D/V) := mul_le_mul_of_nonneg_left hi (div_nonneg hC hs.le) + _ = _ := by dsimp [D]; ring + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [ProperSpace X] + +/-- Positive separation from a source annulus absorbs all small-time losses +in the Gaussian difference estimate. The constant precedes both the center +and the working radius. -/ +theorem NoncollapsedRCD.annular_kernel_difference {K : ℝ} {n : ℕ} + (hX : NoncollapsedRCD K n X) [(hausdorff n X).Regular] (hn : 2 ≤ n) + {ker : ℝ → X → X → ℝ} + (hk : IsContinuousHeatKernel (hausdorff n X) hX.quadratic ker) + (hg : HasCoordinateHeatBounds (hausdorff n X) ker) : + ∃ J : ℝ, 0 < J ∧ ∀ (p : X) (R t : ℝ), 0 < R → -1 ≤ K*R^2 → + 0 < t → t ≤ 1 → t ≤ R^2 → ∀ x y z : X, + dist x p ≤ R/2 → R ≤ dist z p → dist z p ≤ 2*R → dist x y ≤ Real.sqrt t → + |ker t x z-ker t y z| ≤ + J/(R*(hausdorff n X).real (ball p R))*dist x y := by + obtain ⟨C₀,B₀,hC₀,hB₀,hupper⟩ := hg.upper_five (hausdorff n X) + obtain ⟨C,D,B,hC,hD,hB,hdiff⟩ := + hX.gaussianHeatDifferenceBounds_of_upper hn hk hC₀ hB₀ hupper + obtain ⟨Q,hQ,hbound⟩ := exists_annular_gaussian_gradient_bound n hD + let H := 4*Real.exp 8 + let J := C*H^n*Q*Real.exp B + have hH : 0 < H := by dsimp [H]; positivity + have hQ0 : 0 < Q := zero_lt_one.trans_le hQ + refine ⟨J,by dsimp [J]; positivity,?_⟩ + intro p R t hR hcurv ht ht1 htR x y z hxp hzp hzp2 hxy + let μ := hausdorff n X + let V := μ.real (ball p R) + let W := μ.real (ball z (Real.sqrt t)) + have hs : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht + have hV : 0 < V := ENNReal.toReal_pos (hX.fullSupport p R hR).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hW : 0 < W := ENNReal.toReal_pos (hX.fullSupport z _ hs).ne' + (hX.finiteOnBounded _ isBounded_ball).ne + have hv : (Real.sqrt t/(H*R))^n*V ≤ W := + hX.heat_ball_volume_lower hn p hR hcurv ht htR z hzp2 + have hc := inverse_volume_coefficient hs hR hV hW hC.le hH hv + have hsep : R/2 ≤ dist x z := by + have hh := dist_triangle z x p + rw [dist_comm z x] at hh + linarith + have he : Real.exp (-dist x z^2/(D*t)+B*t) ≤ + Real.exp (-(R/2)^2/(D*t))*Real.exp B := by + rw [← Real.exp_add] + apply Real.exp_le_exp.mpr + have hsq : (R/2)^2 ≤ dist x z^2 := pow_le_pow_left₀ (by positivity) hsep 2 + have hh := div_le_div_of_nonneg_right hsq (by positivity : 0 ≤ D*t) + have hBt : B*t ≤ B := mul_le_of_le_one_right hB ht1 + simp only [neg_div] + linarith + have hgauss := hbound R t hR ht htR + have hraw := hdiff t ht ht1 x y z hxy + calc + _ ≤ (C/(Real.sqrt t*W))*Real.exp (-dist x z^2/(D*t)+B*t)*dist x y := hraw.trans_eq (by dsimp [W,μ]; ring) + _ ≤ ((C*H^n/V)*((R/Real.sqrt t)^n/Real.sqrt t))* + (Real.exp (-(R/2)^2/(D*t))*Real.exp B)*dist x y := by + gcongr + _ = (C*H^n/V)*(((R/Real.sqrt t)^n/Real.sqrt t)* + Real.exp (-(R/2)^2/(D*t)))*Real.exp B*dist x y := by ring + _ ≤ (C*H^n/V)*(Q/R)*Real.exp B*dist x y := by gcongr + _ = _ := by dsimp [J]; ring + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AveragedHeatSource.lean b/lean/OAI/Geometry/RCD/Heat/AveragedHeatSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..327b24f904d893d7ebdc562a4df9bba83ea6f7fd --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AveragedHeatSource.lean @@ -0,0 +1,199 @@ +import OAI.Geometry.RCD.Heat.HeatMeasureEvolution +import OAI.Geometry.RCD.Heat.KernelMeasureBounds +import Mathlib.Analysis.Calculus.FDeriv.Measurable + +namespace OAI + +/-! +# Averaged measure-source heat identity including time zero + +The average of the positive kernel over a fixed finite-volume set is +bounded by its reciprocal volume, uniformly at all positive times. +This bounds its pairing with any finite signed measure. The genuine L2 +heat flow gives continuity at zero, so the source identity extends to the +initial endpoint without a pointwise kernel limit. +-/ + +open Set MeasureTheory Filter +open scoped InnerProductSpace Topology ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] (μ : Measure X) [μ.Regular] (hQ : QuadraticCheegerEnergy μ) + {p : ℝ → X → X → ℝ} (hp : IsContinuousHeatKernel μ hQ p) + +include hp in +theorem kernelAverage_bounds {t : ℝ} (ht : 0 < t) (A : Set X) (z : X) : + 0 ≤ kernelAverage μ p t A z ∧ kernelAverage μ p t A z ≤ (μ.real A)⁻¹ := by + have he : (∫ a in A, p t a z ∂μ) = ∫ a in A, p t z a ∂μ := by + apply integral_congr_ae + exact Eventually.of_forall fun a => hp.symmetric t ht a z + have hlo : 0 ≤ ∫ a in A, p t z a ∂μ := integral_nonneg fun a => hp.nonneg t ht z a + have hup : (∫ a in A, p t z a ∂μ) ≤ 1 := by + calc + _ ≤ ∫ a, p t z a ∂μ := setIntegral_le_integral (hp.integrable t ht z) + (Eventually.of_forall fun a => hp.nonneg t ht z a) + _ = 1 := hp.mass_one t ht z + dsimp only [kernelAverage] + rw [he] + constructor + · exact mul_nonneg (inv_nonneg.mpr ENNReal.toReal_nonneg) hlo + · have hn : 0 ≤ (μ.real A)⁻¹ := inv_nonneg.mpr ENNReal.toReal_nonneg + exact (mul_le_mul_of_nonneg_left hup hn).trans_eq (mul_one _) + +include hp in +theorem kernelAverage_eq_kernelHeat {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) (z : X) : + kernelAverage μ p t A z = + kernelHeat μ hQ hp t (uniformDensityLp μ A hA hAt) z := by + rw [kernelHeat, real_inner_comm, uniformDensityLp, inner_smul_left, + L2.inner_indicatorConstLp_one] + dsimp only [kernelAverage, Measure.real] + congr 1 + apply integral_congr_ae + filter_upwards [(heatKernelRow_coe μ hQ hp ht z).filter_mono ae_restrict_le] with a ha + exact (hp.symmetric t ht a z).trans ha.symm + +omit [MetricSpace X] [BorelSpace X] [ProperSpace X] [μ.Regular] in +/-- The normalized indicator is genuinely integrable on any finite-volume +set, including the zero-volume case. -/ +theorem uniformDensityLp_integrable (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) : + Integrable (uniformDensityLp μ A hA hAt) μ := by + have hi : IntegrableOn (fun _ : X => (μ A).toReal⁻¹) A μ := integrableOn_const hAt + have hi' : Integrable (A.indicator (fun _ : X => (μ A).toReal⁻¹)) μ := + (integrable_indicator_iff hA).mpr hi + exact hi'.congr (uniformDensityLp_ae μ A hA hAt).symm + +include hp in +theorem kernelAverage_heatSobolev_coe {t : ℝ} (ht : 0 < t) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) : + SobolevSpace.toLp μ hQ (heatSobolev μ hQ t ht (uniformDensityLp μ A hA hAt)) =ᵐ[μ] + kernelAverage μ p t A := by + rw [heatSobolev_toLp] + filter_upwards [(kernelHeat_represents μ hQ hp ht (uniformDensityLp μ A hA hAt) + (uniformDensityLp_integrable μ A hA hAt)).symm] with z hz + exact hz.trans (kernelAverage_eq_kernelHeat μ hQ hp ht A hA hAt z).symm + +omit [MetricSpace X] [BorelSpace X] [ProperSpace X] [μ.Regular] in +/-- Pairing with the normalized indicator is exactly the actual set average. -/ +theorem uniformDensityLp_inner (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) + (f : Lp ℝ 2 μ) : + ⟪uniformDensityLp μ A hA hAt, f⟫_ℝ = (μ.real A)⁻¹ * ∫ x in A, f x ∂μ := by + rw [uniformDensityLp, inner_smul_left, L2.inner_indicatorConstLp_one] + rfl + +include hp in +/-- The weak derivative of the average pairs the actual averaged kernel +with the full signed source. -/ +theorem IsMeasureLaplacian.average_heat_hasDerivAt + {u : SobolevSpace μ hQ} {ν : SignedMeasure X} + (hν : IsMeasureLaplacian μ hQ u ν) (c : X) {R : ℝ} (hR : 0 < R) + (hu : ∀ᵐ x ∂μ, R < dist c x → SobolevSpace.toLp μ hQ u x = 0) + (hsν : ν.variation (Metric.closedBall c R)ᶜ = 0) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) + {t : ℝ} (ht : 0 < t) : + HasDerivAt (fun s => ⟪heatAt μ hQ s (uniformDensityLp μ A hA hAt), + SobolevSpace.toLp μ hQ u⟫_ℝ) + (∫ᵛ z, kernelAverage μ p t A z ∂<•ν) t := by + have he := hν.test_continuous μ hQ c hR hu hsν + (heatSobolev μ hQ t ht (uniformDensityLp μ A hA hAt)) + (show Continuous (kernelAverage μ p t A) from by + have hfun : kernelAverage μ p t A = kernelHeat μ hQ hp t (uniformDensityLp μ A hA hAt) := + funext (kernelAverage_eq_kernelHeat μ hQ hp ht A hA hAt) + rw [hfun] + exact kernelHeat_continuous μ hQ hp ht _) + (kernelAverage_heatSobolev_coe μ hQ hp ht A hA hAt) + have hd := heatAt_inner_lp_hasDerivAt μ hQ (uniformDensityLp μ A hA hAt) u t ht + rw [energyForm_comm μ hQ, he, neg_neg] at hd + exact hd + +include hp in +/-- The averaged identity extends to time zero. The bound on the average +kernel makes the full signed source absolutely integrable in time. -/ +theorem IsMeasureLaplacian.average_heat_sub_eq_integral + {u : SobolevSpace μ hQ} {ν : SignedMeasure X} + (hν : IsMeasureLaplacian μ hQ u ν) (c : X) {R : ℝ} (hR : 0 < R) + (hu : ∀ᵐ x ∂μ, R < dist c x → SobolevSpace.toLp μ hQ u x = 0) + (hsν : ν.variation (Metric.closedBall c R)ᶜ = 0) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) + {s t : ℝ} (hs : 0 ≤ s) (hst : s ≤ t) : + (μ.real A)⁻¹ * (∫ x in A, heatAt μ hQ t (SobolevSpace.toLp μ hQ u) x ∂μ) - + (μ.real A)⁻¹ * (∫ x in A, heatAt μ hQ s (SobolevSpace.toLp μ hQ u) x ∂μ) = + ∫ r in s..t, (∫ᵛ z, kernelAverage μ p r A z ∂<•ν) := by + let F := fun r => ⟪heatAt μ hQ r (uniformDensityLp μ A hA hAt), SobolevSpace.toLp μ hQ u⟫_ℝ + let D := fun r => ∫ᵛ z, kernelAverage μ p r A z ∂<•ν + have hd (r : ℝ) (hr : 0 < r) : HasDerivAt F (D r) r := + hν.average_heat_hasDerivAt μ hQ hp c hR hu hsν A hA hAt hr + have heae : deriv F =ᵐ[volume.restrict (Ioc s t)] D := by + filter_upwards [ae_restrict_mem measurableSet_Ioc] with r hr + exact (hd r (hs.trans_lt hr.1)).deriv + have hDm : AEStronglyMeasurable D (volume.restrict (Ioc s t)) := + (aestronglyMeasurable_deriv F _).congr heae + let : IsFiniteMeasure ν.variation := by + rw [← ν.totalVariation_eq_variation] + infer_instance + let C := (μ.real A)⁻¹ * ‖(ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] ℝ →L[ℝ] ℝ).flip‖ * ν.variation.real univ + have hDb : ∀ᵐ r ∂volume.restrict (Ioc s t), ‖D r‖ ≤ C := by + filter_upwards [ae_restrict_mem measurableSet_Ioc] with r hr + apply VectorMeasure.norm_integral_le_of_norm_le_const + exact Eventually.of_forall fun z => by + rw [Real.norm_eq_abs, abs_of_nonneg (kernelAverage_bounds μ hQ hp (hs.trans_lt hr.1) A z).1] + exact (kernelAverage_bounds μ hQ hp (hs.trans_lt hr.1) A z).2 + have hDi : IntervalIntegrable D volume s t := by + rw [intervalIntegrable_iff_integrableOn_Ioc_of_le hst] + exact IntegrableOn.of_bound measure_Ioc_lt_top hDm C hDb + have hFc : Continuous F := (heatAt_continuous μ hQ _).inner continuous_const + have he := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hst hFc.continuousOn + (fun r hr => hd r (hs.trans_lt hr.1)) hDi + rw [he] + have hF (r : ℝ) : F r = (μ.real A)⁻¹ * ∫ x in A, heatAt μ hQ r (SobolevSpace.toLp μ hQ u) x ∂μ := by + dsimp only [F] + rw [heatAt_inner, uniformDensityLp_inner] + rw [hF t, hF s] + +include hp in +/-- The initial-endpoint form needed for the ball Gram comparison. -/ +theorem IsMeasureLaplacian.average_heat_sub_initial + {u : SobolevSpace μ hQ} {ν : SignedMeasure X} + (hν : IsMeasureLaplacian μ hQ u ν) (c : X) {R : ℝ} (hR : 0 < R) + (hu : ∀ᵐ x ∂μ, R < dist c x → SobolevSpace.toLp μ hQ u x = 0) + (hsν : ν.variation (Metric.closedBall c R)ᶜ = 0) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) + {t : ℝ} (ht : 0 ≤ t) : + (μ.real A)⁻¹ * (∫ x in A, heatAt μ hQ t (SobolevSpace.toLp μ hQ u) x ∂μ) - + (μ.real A)⁻¹ * (∫ x in A, SobolevSpace.toLp μ hQ u x ∂μ) = + ∫ r in 0..t, (∫ᵛ z, kernelAverage μ p r A z ∂<•ν) := by + simpa only [heatAt_zero, one_apply_eq_self] using + hν.average_heat_sub_eq_integral μ hQ hp c hR hu hsν A hA hAt (s := 0) le_rfl ht + +include hp in +/-- Exact short/long source decomposition for comparing a ball average +with a point heat value. Bounds may be applied separately to the short-time +average and the long-time kernel difference; singular mass is retained. -/ +theorem IsMeasureLaplacian.average_initial_sub_point_heat + {u : SobolevSpace μ hQ} {ν : SignedMeasure X} + (hν : IsMeasureLaplacian μ hQ u ν) (c : X) {R : ℝ} (hR : 0 < R) + (hu : ∀ᵐ x ∂μ, R < dist c x → SobolevSpace.toLp μ hQ u x = 0) + (hsν : ν.variation (Metric.closedBall c R)ᶜ = 0) + (A : Set X) (hA : MeasurableSet A) (hAt : μ A ≠ ∞) + {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) (x : X) : + (μ.real A)⁻¹ * (∫ z in A, SobolevSpace.toLp μ hQ u z ∂μ) - + kernelHeat μ hQ hp s (SobolevSpace.toLp μ hQ u) x = + ((μ.real A)⁻¹ * (∫ z in A, heatAt μ hQ t (SobolevSpace.toLp μ hQ u) z ∂μ) - + kernelHeat μ hQ hp t (SobolevSpace.toLp μ hQ u) x) - + (∫ r in 0..s, (∫ᵛ z, kernelAverage μ p r A z ∂<•ν)) - + (∫ r in s..t, (∫ᵛ z, kernelAverage μ p r A z ∂<•ν)) + + (∫ r in s..t, (∫ᵛ z, p r x z ∂<•ν)) := by + have h0 := hν.average_heat_sub_initial μ hQ hp c hR hu hsν A hA hAt hs.le + have hA := hν.average_heat_sub_eq_integral μ hQ hp c hR hu hsν A hA hAt hs.le hst + have hx := hν.kernelHeat_sub_eq_integral μ hQ hp c hR hu hsν hs hst x + linarith + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/AveragedKernelDifference.lean b/lean/OAI/Geometry/RCD/Heat/AveragedKernelDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc1b9c699353ad2c3f5acb6054b24e4af09a068f --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/AveragedKernelDifference.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.RCD.Heat.HeatKernelDifferenceInput + +namespace OAI + +/-! # The actual averaged long-time kernel difference -/ + +open Set Metric MeasureTheory Filter +open scoped ENNReal + +noncomputable section + +namespace RegularPointCoordinates + +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] + +omit [MetricSpace X] in +/-- Averaging preserves a uniform bound on the pointwise kernel difference. -/ +theorem kernelAverage_difference_le (μ : Measure X) (ker : ℝ → X → X → ℝ) + {s : Set X} (hfinite : μ s ≠ ∞) (hvol : 0 < μ.real s) + (t : ℝ) (x z : X) (hf : IntegrableOn (fun y => ker t y z) s μ) + {B : ℝ} (hbound : ∀ᵐ y ∂μ.restrict s, |ker t y z - ker t x z| ≤ B) : + |kernelAverage μ ker t s z - ker t x z| ≤ B := by + have hc : IntegrableOn (fun _ : X => ker t x z) s μ := integrableOn_const hfinite + have hd := hf.sub hc + have hμ : (μ.restrict s).real univ = μ.real s := by + simp only [Measure.real, Measure.restrict_apply_univ] + have he : kernelAverage μ ker t s z - ker t x z = + (μ.real s)⁻¹ * ∫ y in s, (ker t y z - ker t x z) ∂μ := by + rw [integral_sub hf hc, integral_const, smul_eq_mul, hμ] + dsimp only [kernelAverage] + field_simp [ne_of_gt hvol] + rw [he, abs_mul, abs_of_nonneg (inv_nonneg.mpr hvol.le)] + calc + _ ≤ (μ.real s)⁻¹ * ∫ y in s, |ker t y z - ker t x z| ∂μ := + mul_le_mul_of_nonneg_left (abs_integral_le_integral_abs) (inv_nonneg.mpr hvol.le) + _ ≤ (μ.real s)⁻¹ * ∫ _y in s, B ∂μ := + mul_le_mul_of_nonneg_left + (integral_mono_ae hd.abs (integrableOn_const hfinite) hbound) (inv_nonneg.mpr hvol.le) + _ = B := by rw [integral_const, smul_eq_mul, hμ]; field_simp + +variable [BorelSpace X] [ProperSpace X] + (μ : Measure X) (hQ : QuadraticCheegerEnergy μ) [μ.Regular] + {ker : ℝ → X → X → ℝ} (hk : IsContinuousHeatKernel μ hQ ker) + +include hk in +/-- The published kernel gradient estimate yields the long-time averaged +kernel bound with the exact displacement-to-heat-length factor. -/ +theorem averaged_kernel_difference_bound + {C D B : ℝ} (hC : 0 ≤ C) + (hdifference : ∀ t : ℝ, 0 < t → t ≤ 1 → ∀ x y z : X, dist x y ≤ Real.sqrt t → + |ker t x z - ker t y z| ≤ + (C / (Real.sqrt t * μ.real (ball z (Real.sqrt t)))) * dist x y * + Real.exp (-(dist x z) ^ 2 / (D * t) + B * t)) + {t r A : ℝ} (ht : 0 < t) (ht1 : t ≤ 1) (_hr : 0 < r) + (x q z : X) (hfinite : μ (ball q r) ≠ ∞) (hvol : 0 < μ.real (ball q r)) + (hcenter : dist x q ≤ A * r) (hscale : (A + 1) * r ≤ Real.sqrt t) : + |kernelAverage μ ker t (ball q r) z - ker t x z| ≤ + (C / (Real.sqrt t * μ.real (ball z (Real.sqrt t)))) * ((A + 1) * r) * + Real.exp (-(dist x z) ^ 2 / (D * t) + B * t) := by + have hi : IntegrableOn (fun y => ker t y z) (ball q r) μ := by + apply (hk.integrable t ht z).integrableOn.congr + exact Eventually.of_forall fun y => hk.symmetric t ht z y + apply kernelAverage_difference_le μ ker hfinite hvol t x z hi + filter_upwards [ae_restrict_mem measurableSet_ball] with y hy + have hxy : dist x y ≤ (A + 1) * r := by + have hyq : dist q y < r := by simpa only [mem_ball, dist_comm] using hy + linarith [dist_triangle x q y] + have hh := hdifference t ht ht1 x y z (hxy.trans hscale) + rw [abs_sub_comm] at hh + exact hh.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hxy (div_nonneg hC (mul_nonneg (Real.sqrt_nonneg _) measureReal_nonneg))) + (Real.exp_pos _).le) + +end RegularPointCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/RCD/Heat/BakryLedouxHeatBochner.lean b/lean/OAI/Geometry/RCD/Heat/BakryLedouxHeatBochner.lean new file mode 100644 index 0000000000000000000000000000000000000000..abbe84374dac8b35e132d3b81d1b47af8f9cab9d --- /dev/null +++ b/lean/OAI/Geometry/RCD/Heat/BakryLedouxHeatBochner.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.RCD.Heat.BakryLedouxInput +import OAI.Geometry.RCD.Sobolev.RightSlopeCorrection +import OAI.Geometry.RCD.Heat.HeatCutoffIntegral + +namespace OAI + +/-! # The finite-dimensional heat comparison gives weak Bochner on heat data + +The extra term in EKS (4.14) is retained in the one-sided derivative. +The test has only bounded Sobolev regularity; its heat pairing is +right differentiable by the energy form, without a Laplacian of the test. +-/ + +open Set Filter MeasureTheory TopologicalSpace +open scoped Topology NNReal ENNReal +noncomputable section +namespace RegularPointCoordinates +variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] + [ProperSpace X] [SeparableSpace X] (μ : Measure X) [μ.Regular] + (hQ : QuadraticCheegerEnergy μ) + +theorem IntegratedBakryLedoux.heat_bochner {K N : ℝ} + (hBL : IntegratedBakryLedoux μ hQ K N) (f : Lp ℝ 2 μ) {t : ℝ} (ht : 0 + (SobolevSpace.minimalSlope μ hQ (heatSobolev μ hQ t ht f) x)^2) + (w : SobolevSpace μ hQ) (C : ℝ≥0) + (hw0 : 0≤SobolevSpace.toLp μ hQ w) + (hw : ∀ᵐ x ∂μ, |SobolevSpace.toLp μ hQ w x|≤C) : + let F := heatSobolev μ hQ t ht f + let D := heatSobolevMap μ hQ (t/2) (half_pos ht) + (-heatGeneratorAt μ hQ (t-t/2) f) + energyForm μ hQ G w+ + 2*K*inner ℝ (SobolevSpace.toLp μ hQ w) (SobolevSpace.toLp μ hQ G)+ + 2*weightedGamma μ hQ (SobolevSpace.toLp μ hQ w) F D+ + (2/N)*(∫ x, SobolevSpace.toLp μ hQ w x*(SobolevSpace.toLp μ hQ D x)^2 ∂μ)≤0 := by + obtain ⟨c,hc,hBL⟩ := hBL + let F := heatSobolev μ hQ t ht f + let D := heatSobolevMap μ hQ (t/2) (half_pos ht) + (-heatGeneratorAt μ hQ (t-t/2) f) + let W := SobolevSpace.toLp μ hQ w + let H := SobolevSpace.toLp μ hQ G + let q (r : ℝ) := ∫ x, W x*(SobolevSpace.minimalSlope μ hQ + (heatTail μ hQ (t/2) (half_pos ht) f (t+r)) x)^2 ∂μ + let b (r : ℝ) := Real.exp (-2*K*r)*inner ℝ (heatAt μ hQ r W) H + let j (r : ℝ) := ∫ x, W x*(heatAt μ hQ r (SobolevSpace.toLp μ hQ D) x)^2 ∂μ + have hF : heatTail μ hQ (t/2) (half_pos ht) f t=F := + heatTail_eq μ hQ (t/2) (half_pos ht) f t (by linarith) + have hWb : ∀ᵐ x ∂μ, ‖W x‖≤(C:ℝ) := by simpa only [Real.norm_eq_abs] using hw + have hq : HasDerivAt q (2*weightedGamma μ hQ W F D) 0 := by + have hd0 : HasDerivAt (heatTail μ hQ (t/2) (half_pos ht) f) D (t+0) := by + simpa only [add_zero] using heatTail_hasDerivAt μ hQ (t/2) (half_pos ht) f t (by linarith) + have hd := hd0.scomp 0 ((hasDerivAt_id (0:ℝ)).const_add t) + simp only [one_smul] at hd + simpa only [Function.comp_apply,add_zero,hF] using + weighted_gradient_hasDerivAt μ hQ (Lp.aestronglyMeasurable W) hWb hd + have hb : HasDerivWithinAt b + ((-2*K)*inner ℝ W H-energyForm μ hQ w G) (Ici 0) 0 := by + have he := ((hasDerivAt_id (0:ℝ)).const_mul (-2*K)).exp + have hi := heatAt_inner_hasDerivWithinAt_zero μ hQ w G + convert! he.hasDerivWithinAt.mul hi using 1 + simp only [W,H,id_eq,mul_zero,Real.exp_zero,one_mul,mul_one, + heatAt_zero,one_apply_eq_self,sub_eq_add_neg] + have hb' : Tendsto (fun r => (b r-b 0)/r) (𝓝[>] 0) + (𝓝 ((-2*K)*inner ℝ W H-energyForm μ hQ w G)) := by + have hh := (hasDerivWithinAt_iff_tendsto_slope' (s:=Ioi (0:ℝ)) (lt_irrefl (0:ℝ))).mp + hb.Ioi_of_Ici + simpa only [slope_fun_def_field,sub_zero] using hh + have hWi : MemLp (fun x => W x) ∞ μ := memLp_top_of_bound (Lp.aestronglyMeasurable W) C hWb + have hj := (heat_weighted_square_continuous μ hQ (SobolevSpace.toLp μ hQ D) hWi).tendsto 0 + have hj' : Tendsto j (𝓝[>] 0) (𝓝 (∫ x, W x*(SobolevSpace.toLp μ hQ D x)^2 ∂μ)) := by + simpa only [j,heatAt_zero,one_apply_eq_self] using hj.mono_left nhdsWithin_le_nhds + have hcorr := (hc.mul hj').const_mul (2/N) + simp only [one_mul] at hcorr + have hq0 : q 0=inner ℝ W H := by + dsimp only [q] + rw [add_zero,hF,L2.inner_def] + apply integral_congr_ae + filter_upwards [hG] with x hx + change H x=(SobolevSpace.minimalSlope μ hQ F x)^2 at hx + simp only [Real.inner_apply,hx] + have hb0 : b 0=inner ℝ W H := by simp only [b,mul_zero,Real.exp_zero,one_mul,heatAt_zero,one_apply_eq_self] + have hineq (r : ℝ) (hr : 0