import Mathlib import OAI.MeasureTheory.Falconer.Estimates.ActualDirectBuffer import OAI.MeasureTheory.Falconer.Estimates.ActualOuterMasks import OAI.MeasureTheory.Falconer.Model import OAI.MeasureTheory.Falconer.Recursion.BranchTransitions import OAI.MeasureTheory.Falconer.Recursion.InteriorPolicy import OAI.MeasureTheory.Falconer.Recursion.Potential import OAI.MeasureTheory.FalconerCompletion.Recursion.RecursiveSuffixRule 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 : ℕ} theorem uniform_recursive_rules (hn : 1≤n) {sig kap eps T : ℝ} (hsig : 0 by_cases hp : 2*policyDepth e.profile e.N e.q a t≤a+t · have hh := hpref e (by omega) he hJe B₀ s hd hq hslack a t i (ell+2) hi hv.2 hw hp M hM hfloor hchildren x hx exact hh.trans (hfHE Hp Ep hHp (by dsimp only [H]; linarith) (by dsimp only [E]; linarith)) · have hh := hsuff e (by omega) he hJe (show IsFiniteMeasure e.ρ from inferInstance) hq _ hK W total (ell+2) a t i Ψ eps heps.le hi hv.2 hw (by omega) M (fun y hy => hchildren _ _ (.suffix hw (by omega)) y hy) x hx exact hh.trans ((hfH Hs hHs (by dsimp only [H]; linarith)).trans (le_add_of_nonneg_right (mul_nonneg hE hpow))) | H a₀ t₀ a v i => by_cases hnear : a<(BranchState.H a₀ t₀ a v i).nearDepth e.profile e.N e.q sig · have hh := hnf e (by omega) he hJe B₀ s hd hq a₀ t₀ a v i hv hw hnear eps M heps.le hM hchildren x hx have hb := hfHE Hf 1 hHf (by dsimp only [H]; linarith) (by dsimp only [E]; linarith) simpa only [one_mul] using hh.trans (by simpa only [one_mul] using hb) · have hh := hdir e (by omega) he hJe B₀ s hd hq hcl' hslack hslack10 a₀ t₀ a v i (ell+2) hi hv hw (by omega) _ eps M heps.le hM hchildren x hx exact hh.trans (add_le_add (hfH Hd (by linarith) (by dsimp only [H]; linarith)) (mul_le_mul_of_nonneg_right (by dsimp only [E]; linarith) hpow)) end GraphLiteralSupport.CurrentFalconer.TreeND end end section section open Set MeasureTheory open scoped ComplexConjugate RealInnerProductSpace namespace GraphLiteralSupport.CurrentFalconer.TreeND open Set MeasureTheory Filter PlanarFalconer open scoped ContDiff Classical variable {n : ℕ} lemma recursiveLoss_dim_self (n : ℕ) (C : ℝ) : 4*(n+2:ℝ)≤recursiveLoss n C := by unfold recursiveLoss nlinarith [abs_nonneg C,(Nat.cast_nonneg n : (0:ℝ)≤(n:ℝ))] lemma RegularizedProfileData.environment_lipschitz (e : RecursiveEnvironmentND n) {B : ℕ} {s sig : ℝ} (h : RegularizedProfileData e.ρ e.N B s sig e.mass) : DimensionalPolicy.ProfileLipschitzND e.profile e.N ((n+1:ℝ)/2) := by intro i hi j hj have hh := h.adjusted (j:ℝ) (i:ℝ) (Nat.cast_nonneg _) (Nat.cast_le.mpr hj) (Nat.cast_nonneg _) (Nat.cast_le.mpr hi) simpa only [RecursiveEnvironmentND.profile,adjustedProfile,Nat.cast_add,Nat.cast_one] using hh lemma profile_exponent_lowerND {A : ℕ → ℝ} {N a t Q : ℕ} {L : ℝ} (hA : DimensionalPolicy.ProfileLipschitzND A N L) (hN : 0