File size: 6,905 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import OAI.MeasureTheory.Falconer.Recursion.RecursiveCellInvariants
import OAI.MeasureTheory.Falconer.Recursion.BranchExponent

namespace OAI

namespace PlanarFalconer
open Set MeasureTheory
open scoped ContDiff

theorem AngularStateData.mul_childMaximum_le (d : AngularStateData)
    (k : Fin 2 β†’ PolicyDescriptor β†’ β„•) (h : Fin 2 β†’ Plane β†’ β„‚)
    (p : β„•) (Ξ¨ : ℝ β†’ ℝ) {c M : ℝ} (hc : 0 < c) (hM : 0 ≀ M)
    (hb : βˆ€ row ∈ d.children p, c*((d.successor p row).energy k h Ξ¨).toReal ≀ M) :
    c*d.childMaximum k h p Ξ¨ ≀ M := by
  have hh := d.childMaximum_le k h p Ξ¨ (div_nonneg hM hc.le)
    (fun row hr => (le_div_iffβ‚€ hc).mpr (by simpa only [mul_comm] using hb row hr))
  exact (mul_le_mul_of_nonneg_left hh hc.le).trans_eq (by field_simp)

theorem AngularStateData.mul_farDistanceMaximum_le (d : AngularStateData)
    [IsFiniteMeasure d.ρ] (b : β„•) {c M : ℝ} (hc : 0 < c) (hM : 0 ≀ M)
    (hb : βˆ€ row ∈ d.children b, βˆ€ col ∈ d.children b,
      angularSeparated d.Q d.Q b row col β†’
      c*((d.distanceSuccessor b).atCells row.1 col.1).coincidence.toReal ≀ M ∧
      c*((d.distanceSuccessor b).atCells row.2 col.2).coincidence.toReal ≀ M) :
    c*(d.farDistanceMaximum b).toReal ≀ M := by
  have hh := d.farDistanceMaximum_le b (div_nonneg hM hc.le) (by
    intro row hr col hcol hs
    have hh := hb row hr col hcol hs
    exact ⟨(le_div_iffβ‚€ hc).mpr (by simpa only [mul_comm] using hh.1),
      (le_div_iffβ‚€ hc).mpr (by simpa only [mul_comm] using hh.2)⟩)
  exact (mul_le_mul_of_nonneg_left hh hc.le).trans_eq (by field_simp)

theorem uniform_actual_angular_recursion_bound {lam sig kap eps : ℝ}
    (hlam : 0 ≀ lam) (hsig : 0 < sig) (hkap : 0 < kap)
    (hgap : sig < kap/1000) (heps : 0 < eps) (T : ℝ) (K : β„•)
    {Ξ¨ : ℝ β†’ ℝ} (hΞ¨ : ContDiff ℝ ∞ Ξ¨) (hpos : βˆ€ x, 0 ≀ Ξ¨ x)
    (hs : βˆ€ x, Ξ¨ x β‰  0 β†’ x ∈ Ioo (1/4:ℝ) 4) :
    βˆƒ Nβ‚€ : β„•, βˆ€ d : AngularStateData,
      d.lam = lam β†’ d.sig = sig β†’ d.q = sourcePolicyBlock d.N kap β†’
      d.J = sourceSmoothingLevels sig kap β†’ Nβ‚€ ≀ d.N β†’
      d.Q.side = 1 β†’ d.ρ d.Q.carrierᢜ = 0 β†’
      d.branchState.Valid d.N d.sig β†’ d.a+100*d.q < d.v β†’ d.i+1 ≀ d.J β†’
      d.X.length = d.a β†’ d.Y.length = d.a β†’
      βˆ€ B : β„•, βˆ€ Ξ΄ : ℝ, RegularizedProfileData d.Q d.ρ d.N B Ξ΄ d.lam d.mass β†’
      βˆ€ k : Fin 2 β†’ PolicyDescriptor β†’ β„•, (βˆ€ l, βˆ‘ e ∈ d.retainedList d.a, k l e ≀ K) β†’
      βˆ€ h : Fin 2 β†’ Plane β†’ β„‚, (βˆ€ l, Measurable (h l)) β†’ (βˆ€ l x, β€–h l xβ€– ≀ 1) β†’
      βˆ€ M : ℝ, 0 ≀ M β†’
      (βˆ€ p l, BranchStep d.profile d.N d.q d.sig d.branchState l (.H d.aβ‚€ d.tβ‚€ p d.v d.i) β†’
        βˆ€ row ∈ d.children p,
        ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState l (.H d.aβ‚€ d.tβ‚€ p d.v d.i)) *
          ((d.successor p row).energy k h Ξ¨).toReal ≀ M) β†’
      (βˆ€ b, BranchStep d.profile d.N d.q d.sig d.branchState .far (.D b d.v (d.i+1)) β†’
        βˆ€ row ∈ d.children b, βˆ€ col ∈ d.children b, angularSeparated d.Q d.Q b row col β†’
        ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState .far (.D b d.v (d.i+1))) *
          ((d.distanceSuccessor b).atCells row.1 col.1).coincidence.toReal ≀ M ∧
        ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState .far (.D b d.v (d.i+1))) *
          ((d.distanceSuccessor b).atCells row.2 col.2).coincidence.toReal ≀ M) β†’
      d.energy k h Ξ¨ β‰  ⊀ ∧
        (d.energy k h Ξ¨).toReal ≀ ((d.N:ℝ)+1)*M+((2:ℝ)^d.N)^(-T) := by
  obtain ⟨Nβ‚€,hβ‚€βŸ© := source_angular_reduction hlam hsig hkap hgap heps T K hΞ¨ hpos hs
  refine ⟨Nβ‚€,?_⟩
  intro d hdlam hdsig hdq hdJ hN hQ hcarry hv hw hi hX hY B Ξ΄ hprof k hk h hh hhb M hM hH hD
  change d.aβ‚€ ≀ d.a ∧ d.a ≀ d.v ∧ d.v ≀ d.tβ‚€ ∧ d.tβ‚€ ≀ d.N ∧
    (d.tβ‚€:ℝ) ≀ d.v+d.sig*d.N at hv
  have ht : (d.tβ‚€:ℝ) ≀ d.v+sig*d.N := by simpa only [hdsig] using hv.2.2.2.2
  obtain ⟨hfinite,p,hap,hpv,_,_,hd | hn⟩ := hβ‚€ d hdlam hdsig hdq hdJ hN hQ hcarry
    hv.1 hv.2.1 hv.2.2.1 hv.2.2.2.1 ht hw hi hX hY B Ξ΄ hprof k hk h hh hhb
  · obtain ⟨e,rfl,he,hbound⟩ := hd
    have hstep : BranchStep d.profile d.N d.q d.sig d.branchState .direct
        (.H d.aβ‚€ d.tβ‚€ (descriptorAnchor e) d.v d.i) := BranchStep.direct hw he
    have hm := d.mul_childMaximum_le k h (descriptorAnchor e) Ξ¨
      (by positivity : 0 < ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState .direct
        (.H d.aβ‚€ d.tβ‚€ (descriptorAnchor e) d.v d.i))) hM (hH _ _ hstep)
    simp only [branchExponent,branchCost,BranchState.start,AngularStateData.branchState,      reduceCtorEq,ite_false] at hm
    refine ⟨hfinite,hbound.trans ?_⟩
    nlinarith [mul_nonneg (Nat.cast_nonneg (Ξ± := ℝ) d.N) hM]
  · obtain ⟨rfl,hp5,_,hbound⟩ := hn
    let p := d.v-2*sourceFarBuffer d.N ((d.retainedList d.a).sup descriptorLength) d.sig
    have hstep : BranchStep d.profile d.N d.q d.sig d.branchState .near
        (.H d.aβ‚€ d.tβ‚€ p d.v d.i) := BranchStep.near hw hap
    have hm := d.mul_childMaximum_le k h p Ξ¨
      (by positivity : 0 < ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState .near
        (.H d.aβ‚€ d.tβ‚€ p d.v d.i))) hM (hH _ _ hstep)
    simp only [branchExponent,branchCost,BranchState.start,AngularStateData.branchState,      reduceCtorEq,ite_false,add_zero] at hm
    have hnear : ((2:ℝ)^d.N)^(-2*(d.profile p-d.profile d.a)+12*lam+eps)*
        d.childMaximum k h p Ξ¨ ≀ M := by
      apply le_trans _ hm
      apply mul_le_mul_of_nonneg_right _ (d.childMaximum_nonneg k h p Ξ¨)
      exact Real.rpow_le_rpow_of_exponent_le (one_le_powβ‚€ (by norm_num)) (by linarith)
    let := hprof.probability
    have hfar : d.farSum p ≀ (d.N:ℝ)*M := by
      apply d.farSum_le_depth_factor p hp5 (hv.2.2.1.trans hv.2.2.2.1) hM
      intro b hb
      have hb' : b ∈ Finset.Icc (d.a+9) (p+6) := Finset.mem_Icc.mpr
        ⟨(Finset.mem_Icc.mp hb).1, by have := (Finset.mem_Icc.mp hb).2; omega⟩
      have hstep : BranchStep d.profile d.N d.q d.sig d.branchState .far (.D b d.v (d.i+1)) :=
        BranchStep.far hw hap hb'
      have hm := d.mul_farDistanceMaximum_le b
        (by positivity : 0 < ((2:ℝ)^d.N)^(branchExponent d.profile lam sig eps d.branchState .far
          (.D b d.v (d.i+1)))) hM (hD b hstep)
      simp only [branchExponent,branchCost,BranchState.start,AngularStateData.branchState,        reduceCtorEq,ite_false,add_zero] at hm
      apply le_trans _ hm
      apply mul_le_mul_of_nonneg_right _ ENNReal.toReal_nonneg
      apply Real.rpow_le_rpow_of_exponent_le (one_le_powβ‚€ (by norm_num))
      simp only [hdlam,hdsig]
      linarith
    refine ⟨hfinite,hbound.trans ?_⟩
    change _ ≀ ((d.N:ℝ)+1)*M+_
    dsimp only [p] at hnear hfar
    nlinarith

end PlanarFalconer

end OAI