File size: 4,131 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import Mathlib
import OAI.MeasureTheory.Falconer.Fourier.DistanceSincSpectralIdentity
import OAI.MeasureTheory.Falconer.Model
import OAI.MeasureTheory.FalconerCompletion.Recursion.PrefixDescriptors
import OAI.MeasureTheory.FalconerCompletion.Shells.PrefixShell
import OAI.MeasureTheory.FalconerCompletion.Shells.WeightedMaskTransform

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 PlanarFalconer GraphLiteralSupport.Attempt4FullFar
open scoped ContDiff
variable {n : β„•}
namespace PositiveDistanceState
variable (e : PositiveDistanceState (n+1))

lemma prefixShell_le_sourceShell_successor [IsFiniteMeasure e.weightedDistance] (j : β„•) :
    e.prefixShell j ≀ (2:ℝ)^(-(e.a:ℝ))*
      (∫ r in Icc ((2:ℝ)^(j+1:β„•)/2) (2*(2:ℝ)^(j+1:β„•)),
        β€–Attempt4PrefixShell.weightedMaskTransformND e.prefixDescriptors e.prefixDescriptors
          e.prefixEndpointSmooth e.prefixEndpointSmooth (fun _ => 1) (fun _ => 1)
          e.ρ e.ρ (treeCell e.X) (treeCell e.Y) e.levelMass e.levelMass e.a rβ€–^2) := by
  simp_rw [e.prefix_shell_transform_exact]
  have hsub : Icc ((2:ℝ)^j) ((2:ℝ)^(j+1))βŠ†Icc ((2:ℝ)^(j+1)/2) (2*(2:ℝ)^(j+1)) := by
    intro r hr
    constructor
    Β· simpa only [pow_succ,mul_div_cancel_rightβ‚€ _ (by norm_num : (2:ℝ) β‰  0)] using hr.1
    Β· have hp : 0 ≀ (2:ℝ)^(j+1) := by positivity
      linarith [hr.2]
  have hi : Integrable (fun r => β€–charFun e.weightedDistance rβ€–^2)
      (volume.restrict (Icc ((2:ℝ)^(j+1)/2) (2*(2:ℝ)^(j+1)))) := by
    simpa only [one_mul] using charFun_sq_integrable_finite e.weightedDistance
      (volume.restrict (Icc ((2:ℝ)^(j+1)/2) (2*(2:ℝ)^(j+1)))) 1
  exact mul_le_mul_of_nonneg_left
    (integral_mono_measure (Measure.restrict_mono hsub le_rfl)
      (Filter.Eventually.of_forall (fun r => sq_nonneg β€–charFun e.weightedDistance rβ€–)) hi) (by positivity)

lemma prefixHigh_shell_regime {sig : ℝ} (hsig : 0 < sig)
    (htN : e.t ≀ e.N) (hwidth : e.a+100*e.q < e.t) (hq : sig*e.N ≀ e.q)
    {v : β„•} (hv : v+1 ≀ e.t) (hhigh : (e.t:ℝ)-(v+1:β„•) < sig*e.N) :
    20*sig*e.N ≀ (v+1:β„•)-(e.a:ℝ) ∧
    (((e.t-e.a)/2:β„•):ℝ) ≀ ((v+1:β„•)-(e.a:ℝ))/2+sig*e.N ∧
    (v+1:β„•)-(e.a:ℝ) ≀ 2*e.N := by
  have hat : e.a ≀ e.t := by omega
  have hw : (e.a:ℝ)+100*e.q < e.t := by exact_mod_cast hwidth
  have hv' : ((v+1:β„•):ℝ) ≀ e.N := by exact_mod_cast hv.trans htN
  have hfloor : 2*(((e.t-e.a)/2:β„•):ℝ) ≀ (e.t:ℝ)-e.a := by
    have hh := Nat.mul_div_le (e.t-e.a) 2
    have hhc : (2:ℝ)*(((e.t-e.a)/2:β„•):ℝ) ≀ ((e.t-e.a:β„•):ℝ) := by exact_mod_cast hh
    simpa only [Nat.cast_sub hat] using hhc
  have hna : 0 ≀ (e.a:ℝ) := Nat.cast_nonneg _
  have hnN : 0 ≀ (e.N:ℝ) := Nat.cast_nonneg _
  have hsigN : 0 ≀ sig*e.N := mul_nonneg hsig.le hnN
  constructor
  Β· linarith
  constructor <;> linarith

lemma prefixShell_normalized_mass {B : β„•} {s sig : ℝ}
    (hd : RegularizedProfileData e.ρ e.N B s sig e.mass)
    (ha : e.a ≀ e.N) (hX : e.X.length=e.a) (hY : e.Y.length=e.a) :
    |(e.levelMass*e.levelMass)⁻¹| *
      ((e.ρ.restrict (treeCell e.X)).prod (e.ρ.restrict (treeCell e.Y))).real univ ≀
        ((2:ℝ)^e.N)^(2*(n+2:ℝ)*sig) := by
  have h := e.normalized_cellPair_profile_mass hd ha hX hY
  have hm : |(e.levelMass*e.levelMass)⁻¹| = e.levelMass^(-2:β„€) := by
    rw [abs_of_nonneg (inv_nonneg.mpr (mul_self_nonneg e.levelMass))]
    simp [zpow_neg,pow_two]
  rw [hm]
  convert h using 1 <;> push_cast <;> congr 1
  ring

lemma prefixDescriptors_card_max (hN : 1 ≀ e.N) (hq : 0 < e.q) :
    max 1 ((e.prefixDescriptors.card+e.prefixDescriptors.card:β„•):ℝ) ≀ 16*(e.N:ℝ)^3 := by
  have hN' : (1:ℝ) ≀ e.N := by exact_mod_cast hN
  exact max_le (by nlinarith [one_le_powβ‚€ hN' (n:=3)]) (e.prefixDescriptors_card hN hq)

end PositiveDistanceState
end GraphLiteralSupport.CurrentFalconer.TreeND
end
end

end OAI