import Mathlib import OAI.MeasureTheory.Falconer.Model import OAI.MeasureTheory.Falconer.Recursion.InheritedPolicyState import OAI.MeasureTheory.Falconer.Recursion.PolicyDescriptors import OAI.MeasureTheory.FalconerCompletion.Recursion.AssemblyDescriptorList import OAI.MeasureTheory.FalconerCompletion.Recursion.RecursiveUnit import OAI.MeasureTheory.FalconerCompletion.Recursion.TensorCapCompact namespace OAI /-! Angular cutoffs and derivative 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 : ℕ} noncomputable def assemblyInnerSymbol (e : RecursiveEnvironmentND n) (c : ℕ) (L : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (f : EuclideanSpace ℝ (Fin (n+1)) → ℂ) : EuclideanSpace ℝ (Fin (n+1)) → EuclideanSpace ℝ (Fin (n+1)) → ℂ := fun x w => f x*(actualAngularProduct (policyDescriptorList e.profile e.N e.q c e.N) id L e.ρ e.mass e.N e.sig e.C e.J 0 x).1 w noncomputable def assemblyOuterFactor (e : RecursiveEnvironmentND n) (c : ℕ) (L : PolicyDescriptor → List (EuclideanSpace ℝ (Fin (n+1)) →L[ℝ] EuclideanSpace ℝ (Fin (n+1)))) (Q : SmoothFunctionND (EuclideanSpace ℝ (Fin (n+1)))) (P : CellPath (n+1)) : EuclideanSpace ℝ (Fin (n+1)) → ℂ := fun w => Q.1 w*(actualEndpointAngular (L (.parallel 0 c)) e.ρ e.mass e.N e.sig e.C e.J 0 (.parallel 0 c) (treeCenter P)).1 w lemma assemblySymbol_factor (e : RecursiveEnvironmentND n) (hq : 0 Ψ (r/(2:ℝ)^v))) (hΨ : ∀ r,0≤Ψ r) {R g₁ g₂ : ℝ} (hR : 0 mul_nonneg (mul_nonneg (hΨ _) (sourceAngularMomentND_nonneg _ _ _)) (sourceAngularMomentND_nonneg _ _ _)) (((hi₁.const_mul t).add (hi₂.const_mul t⁻¹)).div_const 2) filter_upwards with r have h := mul_le_mul_of_nonneg_left (hpoint (sourceAngularMomentND μ U r) (sourceAngularMomentND μ W r)) (hΨ (r/(2:ℝ)^v)) simp only [Pi.add_apply] convert h using 1 <;> ring have hen : sourceAngularHND d μ a v Ψ U W ≤ (t*sourceAngularHND d μ a v Ψ U U+t⁻¹*sourceAngularHND d μ a v Ψ W W)/2 := by have h := mul_le_mul_of_nonneg_left hh (show 0≤(2:ℝ)^((d:ℝ)*(v-a))*((2:ℝ)^v)⁻¹ by positivity) unfold sourceAngularHND nlinarith only [h] have hr₁ : t*R^g₁=R^((g₁+g₂)/2) := by rw [← Real.rpow_add hR]; congr 1; ring have hr₂ : t⁻¹*R^g₂=R^((g₁+g₂)/2) := by dsimp only [t] rw [← Real.rpow_neg hR.le,← Real.rpow_add hR]; congr 1; ring calc _ ≤ (t*sourceAngularHND d μ a v Ψ U U+t⁻¹*sourceAngularHND d μ a v Ψ W W)/2 := hen _ ≤ (t*R^g₁+t⁻¹*R^g₂)/2 := by gcongr _ = _ := by rw [hr₁,hr₂]; ring end CurrentFalconer.AssemblyEstimate end end end OAI