import Mathlib import OAI.MeasureTheory.Falconer.Estimates.ActualFarBuffer import OAI.MeasureTheory.Falconer.Model import OAI.MeasureTheory.Falconer.Recursion.DirectPolicyWitness import OAI.MeasureTheory.Falconer.Recursion.Ledger import OAI.MeasureTheory.Falconer.Recursion.PolicyDescriptors import OAI.MeasureTheory.FalconerCompletion.Fourier.StationaryInverseUnit3 import OAI.MeasureTheory.FalconerCompletion.Graphs.GraphCapScaleInvCrude import OAI.MeasureTheory.FalconerCompletion.Graphs.LiteralDyadicPaths import OAI.MeasureTheory.FalconerCompletion.Recursion.MaskScale2 import OAI.MeasureTheory.FalconerCompletion.Recursion.TreeCellMembershipConstantOnFinerGrid namespace OAI /-! Recursive policies and quantitative depth estimates. -/ open _root_.OAI.PlanarFalconer section section open Set MeasureTheory open scoped ComplexConjugate RealInnerProductSpace namespace GraphLiteralSupport.CurrentFalconer.TreeND open Set MeasureTheory Filter PlanarFalconer open scoped ContDiff Classical variable {n : ℕ} structure RecursiveEnvironmentND (n : ℕ) where ρ : Measure (EuclideanSpace ℝ (Fin (n+1))) mass : ℝ → ℝ N : ℕ q : ℕ J : ℕ sig : ℝ C : ℝ namespace RecursiveEnvironmentND noncomputable def profile (e : RecursiveEnvironmentND n) : ℕ → ℝ := adjustedProfile (d:=n+1) e.mass e.N def distanceData (e : RecursiveEnvironmentND n) (a t i : ℕ) (X Y : CellPath (n+1)) : PositiveDistanceState (n+1) := ⟨e.ρ,e.mass,e.N,e.q,a,t,e.J,i,e.sig,e.C,X,Y⟩ end RecursiveEnvironmentND structure RecursiveAngularND (n : ℕ) extends RecursiveEnvironmentND n where a₀ : ℕ t₀ : ℕ a : ℕ v : ℕ i : ℕ X : CellPath (n+1) Y : CellPath (n+1) namespace RecursiveAngularND noncomputable def profile (e : RecursiveAngularND n) : ℕ → ℝ := e.toRecursiveEnvironmentND.profile noncomputable def fullList (e : RecursiveAngularND n) : Finset PolicyDescriptor := policyDescriptorList e.profile e.N e.q e.a₀ e.t₀ noncomputable def retainedList (e : RecursiveAngularND n) (r : ℕ) : Finset PolicyDescriptor := unreachedDescriptorList e.profile e.N e.q e.a₀ e.t₀ r noncomputable def symbol (e : RecursiveAngularND n) (L : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f : EuclideanSpace ℝ (Fin (n+1)) → ℂ) (Q : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (r : ℕ) : EuclideanSpace ℝ (Fin (n+1)) → EuclideanSpace ℝ (Fin (n+1)) → ℂ := fun x => (actualResidualSourceSymbol e.profile e.N e.q e.a₀ e.t₀ r L e.ρ e.mass e.sig e.C e.J e.i f Q x).1 noncomputable def energy (e : RecursiveAngularND n) (L₁ L₂ : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f g : EuclideanSpace ℝ (Fin (n+1)) → ℂ) (Q P : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (Ψ : ℝ → ℝ) : ℝ := _root_.OAI.Attempt4Near.sourceAngularHND (n+1) (_root_.OAI.Attempt4FullFar.canonicalSphereMeasureND (EuclideanSpace ℝ (Fin (n+1)))) e.a e.v Ψ (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell e.X) (((2:ℝ)^e.N)^(-e.mass e.a)) (e.symbol L₁ f Q e.a) z.1 z.2) (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell e.Y) (((2:ℝ)^e.N)^(-e.mass e.a)) (e.symbol L₂ g P e.a) z.1 z.2) noncomputable def sameSymbolChildren (e : RecursiveAngularND n) (p : ℕ) (L₁ L₂ : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f g : EuclideanSpace ℝ (Fin (n+1)) → ℂ) (Q P : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (Ψ : ℝ → ℝ) : ℝ := _root_.OAI.CurrentFalconer.TreeND.graphSourceChildMax e.ρ e.ρ e.a p e.v e.X e.Y (((2:ℝ)^e.N)^(-e.mass p)) (((2:ℝ)^e.N)^(-e.mass p)) Ψ (e.symbol L₁ f Q e.a) (e.symbol L₂ g P e.a) noncomputable def graphFactor (e : RecursiveAngularND n) (p : ℕ) : ℝ := ((2:ℝ)^e.N)^(-2*(e.profile p-e.profile e.a)+height e.profile e.a p+ (e.C+36*(n+1:ℝ)+5)*e.sig) lemma symbol_measurable (e : RecursiveAngularND n) (L : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f : EuclideanSpace ℝ (Fin (n+1)) → ℂ) (hf : Measurable f) (Q : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (r : ℕ) : Measurable (Function.uncurry (e.symbol L f Q r)) := actualResidualSourceSymbol_measurable _ _ _ _ _ _ _ _ _ _ _ _ _ _ hf _ lemma symbol_smooth (e : RecursiveAngularND n) (L : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f : EuclideanSpace ℝ (Fin (n+1)) → ℂ) (Q : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (r : ℕ) (x : EuclideanSpace ℝ (Fin (n+1))) : ContDiff ℝ ∞ (e.symbol L f Q r x) := (actualResidualSourceSymbol e.profile e.N e.q e.a₀ e.t₀ r L e.ρ e.mass e.sig e.C e.J e.i f Q x).2 end RecursiveAngularND theorem uniform_recursive_symbol_jets (W : Finset (List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1))))) (M B total : ℕ) (hW : ∀ L∈W, L.length≤B) {sig : ℝ} (hsig : 0 Ψ (r/(2:ℝ)^e.v)) → (∀ r,0≤Ψ r) → e.sameSymbolChildren p L₁ L₂ f g Q P Ψ≤D^(4*total)*e.reachedChildren p L₁ L₂ f g Q P Ψ := by obtain ⟨D,hD,hrem⟩ := actualResidual_graph_reached_removalND W B total hW hsig Cq hCq refine ⟨D,hD,?_⟩ filter_upwards [hrem] with N hrem intro e he hs hfin hq p hap L₁ L₂ f g Q P hf hg hfn hgn hL₁ hL₂ htotal₁ htotal₂ hQ hP Ψ hiΨ hΨ subst N let := hfin have hcell (X Y : CellPath (n+1)) (hX : X.length=p) (hY : Y.length=p) : _root_.OAI.Attempt4Near.sourceAngularHND (n+1) (_root_.OAI.Attempt4FullFar.canonicalSphereMeasureND (EuclideanSpace ℝ (Fin (n+1)))) p e.v Ψ (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell X) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₁ f Q e.a) z.1 z.2) (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell Y) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₂ g P e.a) z.1 z.2) ≤ D^(4*total)*(e.successor p X Y).energy L₁ L₂ f g Q P Ψ := by let X' : Fin (n+1) → ℤ := fun j => (pathIndex X j:ℤ) let Y' : Fin (n+1) → ℤ := fun j => (pathIndex Y j:ℤ) have hXY : (({X'}:Finset (Fin (n+1) → ℤ)).product {Y'}).Nonempty := by simp have hh := hrem e.ρ e.ρ e.profile e.q e.a₀ e.t₀ e.a p hq hap L₁ L₂ e.mass e.C e.J e.i f g Q P hf hg hfn hgn hL₁ hL₂ htotal₁ htotal₂ hQ hP {X'} {Y'} hXY (((2:ℝ)^e.N)^(-e.mass p)) (((2:ℝ)^e.N)^(-e.mass p)) e.v Ψ (by simpa only [Real.rpow_natCast] using hiΨ) hΨ have hprod : ({X'} : Finset (Fin (n+1) → ℤ)).product {Y'} = {(X',Y')} := by ext z; simp simp only [Attempt4Near.graphChildMaxND,hprod,Finset.sup'_singleton] at hh have heX : treeCell X=Attempt4FullFar.ambientGridCell p X' := by unfold treeCell; rw [hX]; rfl have heY : treeCell Y=Attempt4FullFar.ambientGridCell p Y' := by unfold treeCell; rw [hY]; rfl change _ ≤ D^(4*total)* _root_.OAI.Attempt4Near.sourceAngularHND (n+1) (_root_.OAI.Attempt4FullFar.canonicalSphereMeasureND (EuclideanSpace ℝ (Fin (n+1)))) p e.v Ψ (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell X) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₁ f Q p) z.1 z.2) (fun z => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (treeCell Y) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₂ g P p) z.1 z.2) rw [←hs] at hh rw [heX,heY] convert hh using 1 <;> rfl unfold RecursiveAngularND.sameSymbolChildren RecursiveAngularND.reachedChildren _root_.OAI.CurrentFalconer.TreeND.graphSourceChildMax split_ifs with hAB · apply Finset.sup'_le intro z hz have hX : z.1.length=p := _root_.OAI.CurrentFalconer.TreeND.mem_dyadicPaths p z.1 |>.mp (Finset.mem_filter.mp (Finset.mem_filter.mp (Finset.mem_product.mp hz).1).1).1 have hY : z.2.length=p := _root_.OAI.CurrentFalconer.TreeND.mem_dyadicPaths p z.2 |>.mp (Finset.mem_filter.mp (Finset.mem_filter.mp (Finset.mem_product.mp hz).2).1).1 have hh := hcell z.1 z.2 hX hY simp only [_root_.OAI.CurrentFalconer.TreeND.literal_treeCell] at hh apply hh.trans apply mul_le_mul_of_nonneg_left _ (by positivity) change _ ≤ (( _root_.OAI.CurrentFalconer.TreeND.graphChildren e.ρ e.a p e.X).product (_root_.OAI.CurrentFalconer.TreeND.graphChildren e.ρ e.a p e.Y)).sup' hAB _ dsimp only [RecursiveAngularND.energy,RecursiveAngularND.successor,RecursiveAngularND.symbol] simp only [_root_.OAI.CurrentFalconer.TreeND.literal_treeCell] convert (Finset.le_sup' (f:=fun z => _root_.OAI.Attempt4Near.sourceAngularHND (n+1) (_root_.OAI.Attempt4FullFar.canonicalSphereMeasureND (EuclideanSpace ℝ (Fin (n+1)))) p e.v Ψ (fun q => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (_root_.OAI.CurrentFalconer.TreeND.treeCell z.1) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₁ f Q p) q.1 q.2) (fun q => _root_.OAI.CurrentFalconer.sourceAngularTransformND e.ρ (_root_.OAI.CurrentFalconer.TreeND.treeCell z.2) (((2:ℝ)^e.N)^(-e.mass p)) (e.symbol L₂ g P p) q.1 q.2)) hz) using 1; rfl · simp end GraphLiteralSupport.CurrentFalconer.TreeND end end end OAI