import YM.FullVolume.Region /-! # Full real Gate. Only need point Cauchy from physical dynamics at generic (non-tie) probes. Recovery here for all compacts in torus separation. No diagonal in this lemma, nor any additional mesh selection in PointPurchased. -/ set_option autoImplicit false noncomputable section namespace YM.FullVolume open Function Set Filter Metric MeasureTheory Lattice RG Wilson Extraction Extraction.Lease Difference Gaps Cells open scoped Topology Matrix.Norms.Frobenius BigOperators ContDiff variable {G:Gauge}{C:Family G} (M : FixedBounds C)(e : Extraction.Sequence) {v : Fin 0 → C.book.Token} variable {n:ℕ}(p : ℕ)(v : Fin n → C.book.Token)(l:List (MotionIndex n)) def evaluate (C:Family G)(e:Extraction.Sequence)(p:ℕ)(v: Fin n→C.book.Token)(l:List (MotionIndex n)) (i:ℕ)(x:Points n):= gKernel C v l (e i) p (address (C.S.a (e i)) x) def Tuned (C:Family G)(e:Extraction.Sequence)(p:ℕ)(v: Fin n→C.book.Token)(l:List (MotionIndex n)) (g:Points n→ℂ) := Meets (NoHit C.S p n) (evaluate C e p v l) g lemma returns {f:Points n→ℂ}(h:Tuned C e p v l f) {x:Points n} (hx:x∈NoHit C.S p n) {q : ℕ → Positions n} (he:Tendsto (fun i=> tag (C.S.a (e i)) (q i)) atTop (𝓝 x)) : Tendsto (fun i=> gKernel C v l (e i) p (q i)) atTop (𝓝 (f x)):=by obtain ⟨K,hK,hT,hV⟩:=exists_compact_subset (nohitOpen C.S p n) hx let u i:= tag (C.S.a (e i)) (q i) have hv: Tendsto (fun i=> f (u i)) atTop (𝓝 (f x)):= ((h.continuousOn.continuousAt ((nohitOpen C.S p n).mem_nhds hx)).tendsto.comp he) refine hv.congr_dist (Metric.tendsto_nhds.mpr ?_) intro ε hε filter_upwards [h.uniform K hV hK ε hε, he.eventually (mem_interior_iff_mem_nhds.mp hT)] with i hi hp rw [dist_zero_right, Real.norm_of_nonneg (by positivity), dist_comm] have he:=hi (u i) hp; unfold evaluate u at he; rwa [address_matched (C.S.a_pos ..)] at he lemma nearest {v:ℝ}(hv:0 (4*n:ℝ)*C.S.a (e i)) atTop (𝓝 0):= by simpa using! ((C.S.shrinks.comp e.cofinal).const_mul (4*n:ℝ)) filter_upwards [hl.eventually (gt_mem_nhds hv)] with i hi x using (approximate (C.S.a_pos _) x).trans_lt hi include M lemma circulating : oscillation (NoHit C.S p n) (evaluate C e p v l):= by intro K hU hK ε hε obtain ⟨t,ht,hT⟩:= hK.exists_cthickening_subset_open (nohitOpen ..) hU obtain ⟨r,B,hr,hB,H⟩:= M.localLip v l p hT hK.cthickening let g:= min r (ε/(B+1)) have hg: 0 evaluate C e p v [] i x) lemma established (hp:Purchased C e):∃ f,Tuned C e p v [] f:= by exact growFrom (nohitOpen ..) (circulating M e p v []) (Cyclic C.S p n) (MeasureTheory.Measure.dense_of_ae (almostCyclic C.S p n)) (fun x hx=>hp _ _ _ x hx.1) omit M in lemma forwardPrice {t : ℝ}(ht:0 (steps C.S t N:ℝ)*C.S.a N) atTop (𝓝 t):=by have he:= tendsto_const_nhds (f:=atTop) (x:=t) |>.add (C.S.shrinks) rw [add_zero] at he; refine tendsto_of_tendsto_of_tendsto_of_le_of_le' (g:=fun _ :ℕ=> t) tendsto_const_nhds he ((step_upper C.S ht).mono ?_) (Eventually.of_forall (fun i=>?_)) · intro i hi; exact hi.2.1 have hp:= C.S.a_pos i exact (mul_le_mul_of_nonneg_right (Nat.ceil_lt_add_one (div_nonneg ht.le hp.le)).le hp.le).trans_eq (by rw [add_mul,one_mul,div_mul_cancel₀ _ hp.ne']) set_option maxHeartbeats 600000 in lemma from_previous {f : Points n→ℂ}(h:Tuned C e p v l f) (a:MotionIndex n) : ∃ g,Tuned C e p v (a::l) g:=by apply growFrom (nohitOpen ..) (circulating M e p v (a::l)) univ dense_univ rintro x ⟨-,hx⟩ obtain ⟨K,hK,hT,hU⟩:= exists_compact_subset (nohitOpen ..) hx obtain ⟨B,r,hB,hr,H⟩:= M.taylor v l p hU hK obtain ⟨t,ht,hS⟩:= Metric.nhds_basis_closedBall.mem_iff.mp (mem_interior_iff_mem_nhds.mp hT) rw [Metric.cauchySeq_iff] intro ε hε let q:= min (t/2) (min (r/3) (ε/(8*(B+1)))) have hp:0.comp e.cofinal) have hh:Tendsto (fun i=> tag (s i) (Y i)) atTop (𝓝 x):=(Extraction.chosen x).comp e.cofinal have hy:Tendsto (fun i=> tag (s i) (z i)) atTop (𝓝 w):= by simp_rw [z,taggedN]; exact hh.add (hg.smul_const _) have he i: dist (tag (s i) (z i)) (tag (s i) (Y i))=k i:=paidDist _ _ (C.S.a_pos _) _ _ have hw : w∈ NoHit C.S p n:= by refine hU (hS (mem_closedBall.mpr ?_)) apply le_of_tendsto (hy.dist hh) filter_upwards [e.cofinal.eventually (step_upper C.S hp)] with i hi rw [he]; exact hi.2.2.trans ht' have hW:Tendsto (fun i=> F i (z i)) atTop (𝓝 (f w)):= returns e p v l h hw hy have hY:Tendsto (fun i=> F i (Y i)) atTop (𝓝 (f x)):= returns e p v l h hx hh let W (i : ℕ):= (k i)⁻¹ • (F i (z i)- F i (Y i)) have hP := Metric.cauchySeq_iff.mp (((hg.inv₀ hp.ne').smul (hW.sub hY)).cauchySeq) (ε/2) (half_pos hε) obtain ⟨L,hL⟩:=hP have heq : ∀ᶠ i in atTop, dist (W i) (D i) ≤ ε/4:=by filter_upwards [hh.eventually (mem_interior_iff_mem_nhds.mp hT),e.cofinal.eventually (step_upper C.S hp), e.cofinal.eventually H] with i hi h hp' have hk: q ≤ k i ∧ k i ≤ 2*q := h.2 have h0:0?_⟩ change dist (D m) (D n)< _ obtain ⟨he,hM⟩:=hj m hm; obtain ⟨hf,hN⟩:=hj n hn have h:= hL m he n hf; change dist (W m) (W n)< _ at h; rw [dist_comm] at hM linarith [dist_triangle (D m) (W m) (W n),dist_triangle (D m) (W n) (D n)] end YM.FullVolume