import PoincareLib.Topology.Manifold.Poincare.Final.Compatibility.SourceNames import PoincareLib.Topology.Manifold.Poincare.Final.Compatibility.Metric import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Observed.SeedObservedCapCutoff import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Observed.SeedObservedSearchBounds import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Near.SeedNearAncestor import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Retained.SeedRetainedSearch import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Search.SeedSearchVolumeTransfer import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Cylinders.ObservedWindow /-! # Scale-uniform volume from the actual observed birth search The selected M46 extension handles a planned stop through a genuine nonpositive ancestor. Actual overlap persistence handles a cap stop, including contact at birth. Source: MT pp. 392-394; seed-observed-search.md, Stage F3. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set open scoped Manifold ContDiff Bundle ENNReal universe u namespace PoincareMT.Proofs.M47 open M46 /-- The density precedes the next radius and every search scale. The only birth input is the actual onset-or-cap alternative of its component. -/ theorem exists_seed_observed_search_volume (P : M47Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) (N : RepairedNoncollapseInductionData S) (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) : ∃ k : ℝ, 0 < k ∧ ∀ rNext : ℝ, 0 < rNext → rNext ≤ p.r (Fin.last p.i) → ∃ cutoff : ℝ, 0 < cutoff ∧ cutoff ≤ p.Delta (Fin.last p.i) ∧ ∀ H B d r : ℝ, 0 < H → seedAnalyticConstant S ≤ B → 0 < d → 0 < r → rNext⁻¹ ^ 2 ≤ H → (Real.sqrt H)⁻¹ ≤ 1 / 200 → 64 * B * H * d ≤ 1 → 312 * H * d ≤ 1 / 2 → r ≤ p.setup.epsilon → H * r ^ 2 ≤ 1 → r ^ 2 ≤ d → 52 * H ≤ (r / 2)⁻¹ ^ 2 → ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), ObservedInputs p rNext cutoff F O → ∀ origin : ℝ, Icc (origin - d) origin ⊆ surgeryObservationInterval O ∩ Ici (surgeryEpochStart (p.i - 1)) → ∀ q : (F.slice origin).carrier, (∀ y ∈ (F.metric origin).ball q r, (F.connection origin).scalarCurvature y ≤ 2 * H) → (¬ SurgeryPositiveComponentAt F origin q ∨ ∃ hT : origin ∈ F.surgery_times, ∀ [Nonempty (F.slice origin).carrier], ∃ i : Fin (F.event origin hT).cap_count, (connectedComponent q ∩ ((F.event origin hT).caps i).carrier).Nonempty) → ENNReal.ofReal (k * (r / 2) ^ 3) ≤ calibratedMetricVolume (F.metric origin) ((F.metric origin).ball q (r / 2)) := by classical let Q := Classical.choice (N.induction p hp) obtain ⟨kcap, hkcap, capDensity⟩ := exists_seed_observed_cap_contact_density S p hp let k := min (Q.kappaNew / 512) (kcap / 64) have hk : 0 < k := lt_min (div_pos Q.kappa_pos (by norm_num)) (div_pos hkcap (by norm_num)) refine ⟨k, hk, ?_⟩ intro rNext hrNext hrLast obtain ⟨deltaCap, hdeltaCap, hlast, hcapDensity⟩ := capDensity rNext hrNext hrLast let cutoff := min deltaCap (Q.cutoff rNext) have hsmallCap : cutoff ≤ deltaCap := min_le_left _ _ have hsmallQ : cutoff ≤ Q.cutoff rNext := min_le_right _ _ refine ⟨cutoff, lt_min hdeltaCap (Q.cutoff_bounds rNext hrNext hrLast).1, hsmallCap.trans hlast, ?_⟩ intro H B d r hH hB hd hr hlevel hsmall hscalarTime hmetricTime hrEpsilon hbudget hrd htest F O inputs origin hwindow q hscalar hbirth let inputsQ := inputs.cutoff_mono hsmallQ have hnoncollapse := Q.noncollapsed rNext hrNext hrLast F O inputsQ.next_epoch inputsQ.old inputsQ.admissible inputsQ.pinched inputsQ.terminal_policy inputsQ.scales inputsQ.canonical inputsQ.overlap have horigin := (hwindow (show origin ∈ Icc (origin - d) origin from ⟨by linarith only [hd], le_rfl⟩)).1 let U := (F.metric origin).ball q r have hU : IsOpen U := isOpen_Iio.preimage ((M36.metric_edist_continuous (F.metric origin)).comp (continuous_const.prodMk continuous_id)) have hqU : q ∈ U := by change (F.metric origin).edist q q < ENNReal.ofReal r rw [M36.metric_edist_self] exact ENNReal.ofReal_pos.mpr hr have hJ : Icc (origin + -d) origin ⊆ F.time_domain := by intro t ht exact O.interval_subset (hwindow (by simpa only [sub_eq_add_neg] using ht)).1 obtain ⟨c, hc, e, hbased, hstop⟩ := exists_open_region_seed_search F (neg_nonpos.mpr hd.le) hJ U hU ⟨q, hqU⟩ have htimes (s : ℝ) (hs : s ∈ Icc c 0) : origin + s / 1 ∈ surgeryObservationInterval O ∩ Ici (surgeryEpochStart (p.i - 1)) := by apply hwindow simp only [div_one] constructor <;> linarith only [hc.1, hs.1, hs.2] have hBpos : 0 < B := (seedAnalyticConstant_pos S).trans_le hB have hshort : 64 * B * H * (-c) ≤ 1 := (mul_le_mul_of_nonneg_left (by linarith only [hc.1]) (by positivity)).trans hscalarTime have hmetricShort : 6 * (52 * H) * (-c) ≤ 1 / 2 := by have h := mul_le_mul_of_nonneg_left (by linarith only [hc.1] : -c ≤ d) (by positivity : 0 ≤ 312 * H) nlinarith only [h, hmetricTime] have hcomponent : U ⊆ connectedComponent q := metric_ball_subset_connectedComponent (F.metric origin) q r have hbounds := seed_observed_search_bounds P S p hp inputs e hc.2 (by simpa only [div_one] using (htimes c ⟨le_rfl, hc.2⟩).1.1) horigin hH hlevel hB hsmall hbased q hcomponent hbirth hscalar hshort have hRm : ∀ s (hs : s ∈ Icc c 0), ∀ x ∈ U, (F.connection (origin + s / 1)).curvatureTensorNorm (e.forward s hs x) ≤ 52 * H := fun s hs x hx => (hbounds s hs x hx).2 have hrHalf : 0 < r / 2 := half_pos hr have hrQuarter : 0 < r / 4 := by positivity have hmono (k' : ℝ) (hle : k ≤ k') (hv : ENNReal.ofReal (k' * (r / 2) ^ 3) ≤ calibratedMetricVolume (F.metric origin) ((F.metric origin).ball q (r / 2))) : ENNReal.ofReal (k * (r / 2) ^ 3) ≤ calibratedMetricVolume (F.metric origin) ((F.metric origin).ball q (r / 2)) := (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hle (pow_nonneg hrHalf.le 3))).trans hv rcases hstop with hplanned | ⟨hT, hcap⟩ · subst c have htimeSmall : Icc (-(r / 2) ^ 2) 0 ⊆ Icc (-d) 0 := by intro s hs constructor <;> nlinarith only [hs.1, hs.2, hrd, sq_nonneg r] have hspaceSmall : (F.metric origin).ball q (r / 2) ⊆ U := by intro y hy exact hy.trans_le (ENNReal.ofReal_le_ofReal (half_le_self hr.le)) let test := e.restrict htimeSmall ordConnected_Icc hspaceSmall let a := -(r / 2) ^ 2 / 8 have ha : a ∈ Icc (-(r / 2) ^ 2) 0 := by dsimp only [a] constructor <;> nlinarith only [sq_nonneg (r / 2)] have haNeg : a < 0 := div_neg_of_neg_of_pos (neg_neg_of_pos (sq_pos_of_pos hrHalf)) (by norm_num) have hancestor := seed_search_before_birth_nonpositive P inputs.terminal_policy e hc.2 horigin hbased q hcomponent hbirth a (htimeSmall ha) haNeg q hqU have hre : r / 2 ≤ F.parameters.epsilon := by rw [inputs.old.epsilon_eq] exact (half_le_self hr.le).trans hrEpsilon apply hmono (Q.kappaNew / 512) (min_le_left _ _) exact seed_volume_of_near_nonpositive_ancestor P hnoncollapse q hrHalf hre test (fun hs y hy => hbased (htimeSmall hs) y (hspaceSmall hy)) (fun s hs y hy => (hRm s (htimeSmall hs) y (hspaceSmall hy)).trans htest) ha le_rfl (htimes a (htimeSmall ha)).1 hancestor · let : Nonempty (F.slice (origin + c / 1)).carrier := ⟨e.forward c ⟨le_rfl, hc.2⟩ q⟩ obtain ⟨i, z, ⟨x, hx, hxz⟩, hz⟩ := hcap have hs : c ∈ Icc c 0 := ⟨le_rfl, hc.2⟩ let chart := M44.cylinderSliceChart e hU c hs have hcomparison := seed_search_metric_comparison P inputs.pinched e hU (by positivity : 0 ≤ 52 * H) hbased hRm hmetricShort c hs have hupper : ∀ y ∈ chart.source, ∀ v : TangentSpace (𝓡 3) y, (F.metric (origin + c / 1)).inner (chart y) (mfderiv (𝓡 3) (𝓡 3) chart y v) (mfderiv (𝓡 3) (𝓡 3) chart y v) ≤ 4 * (F.metric origin).inner y v v := by intro y hy v have hn : 0 ≤ (F.metric origin).inner y v v := by by_cases hv : v = 0 · simp [hv] · exact ((F.metric origin).pos y v hv).le have h := (hcomparison y hy v).2 change (F.metric (origin + c / 1)).inner (e.forward c hs y) (mfderiv (𝓡 3) (𝓡 3) (e.forward c hs) y v) (mfderiv (𝓡 3) (𝓡 3) (e.forward c hs) y v) ≤ 4 * (F.metric origin).inner y v v nlinarith only [h, hn] have hdist0 := seed_image_ball_subset (F.metric origin) (F.metric (origin + c / 1)) chart hupper q (Subset.refl U) ⟨x, hx, hxz⟩ have hdist : (F.metric (origin + c / 1)).edist z (e.forward c hs q) ≤ ENNReal.ofReal (2 * r) := by let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : (F.slice (origin + c / 1)).carrier → Type _) := ⟨(F.metric (origin + c / 1)).toRiemannianMetric⟩ have hsymm : (F.metric (origin + c / 1)).edist z (e.forward c hs q) = (F.metric (origin + c / 1)).edist (e.forward c hs q) z := Manifold.riemannianEDist_comm rw [hsymm] exact hdist0.le have hcapScalar : (F.connection (origin + c / 1)).scalarCurvature z ≤ 4 * H := by rw [← hxz] exact (hbounds c hs x hx).1 have hv := hcapDensity F O (inputs.cutoff_mono hsmallCap) (origin + c / 1) hT inferInstance (htimes c hs).1 (htimes c hs).2 i H r hr hbudget z hz hcapScalar (e.forward c hs q) hdist (r / 4) hrQuarter (by linarith only [hr]) have hcompact : IsCompact (closure ((F.metric origin).ball q (r / 2))) := (F.slices_compact origin (O.interval_subset horigin)).of_isClosed_subset isClosed_closure (subset_univ _) have hbuffer : closure ((F.metric origin).ball q (r / 2)) ⊆ U := M04.initial_half_ball_closure_subset_initial_ball (F.metric origin) q hr apply hmono (kcap / 64) (min_le_right _ _) apply seed_search_volume_density_transfer P inputs.pinched e hU (by positivity : 0 ≤ 52 * H) hbased hRm hmetricShort q hrHalf hcompact hbuffer c hs simpa only [div_div, show (2 : ℝ) * 2 = 4 by norm_num] using hv end PoincareMT.Proofs.M47