math / data /lean /OAI /MeasureTheory /Falconer /Graphs /ActualDistanceGraphAssembly.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.05 kB
import OAI.MeasureTheory.Falconer.Graphs.ParentAbsoluteGraphAssembly
import OAI.MeasureTheory.Falconer.Graphs.GraphOriginalGraphRemoval
namespace OAI
namespace PlanarFalconer
open Set MeasureTheory
open scoped ContDiff
def sourceDistanceSlot (l : Fin 4) : Fin 2 := ![0,1,1,0] l
theorem sourceDistanceSlot_comp {Ξ± : Type*} (f : Fin 2 β†’ Ξ±) :
(fun l => f (sourceDistanceSlot l)) = ![f 0,f 1,f 1,f 0] := by
funext l
fin_cases l <;> rfl
theorem uniform_actual_retained_distance_graph
{sig ΞΊ cβ‚€ : ℝ} (hsig : 0 < sig) (hgap : 10*sig < ΞΊ)
(hc : 0 < cβ‚€) (hcap : cβ‚€ ≀ 2*Real.pi) (K : β„•) (lam T : ℝ)
{Ξ¨ : ℝ β†’ ℝ} (hΞ¨ : ContDiff ℝ ∞ Ξ¨) (hpos : βˆ€ t, 0 ≀ Ξ¨ t)
(hs : βˆ€ t, Ξ¨ t β‰  0 β†’ t ∈ Ioo (1/4:ℝ) 4) :
βˆƒ Nβ‚€ : β„•, βˆ€ N β‰₯ Nβ‚€,
βˆ€ {ΞΉ : Fin 2 β†’ Type} [βˆ€ l, DecidableEq (ΞΉ l)],
βˆ€ (S : βˆ€ l, Finset (ΞΉ l)) (d : βˆ€ l, ΞΉ l β†’ PolicyDescriptor) (k : βˆ€ l, ΞΉ l β†’ β„•),
(βˆ€ l, (S l).card ≀ (N+1)^3+1) β†’ (βˆ€ l, (βˆ‘ t ∈ S l, k l t) ≀ K) β†’
βˆ€ L : β„•, (βˆ€ l t, t ∈ S l β†’ descriptorLength (d l t) ≀ L) β†’
βˆ€ Q : Fin 2 β†’ DyadicSquare, (βˆ€ l, 0 < (Q l).side) β†’ (βˆ€ l, (Q l).side ≀ 1) β†’
βˆ€ (ρ : Fin 2 β†’ Measure Plane) (mass : Fin 2 β†’ ℝ β†’ ℝ) (B : β„•) (Ξ΄ : ℝ),
(βˆ€ l, RegularizedProfileData (Q l) (ρ l) N B Ξ΄ lam (mass l)) β†’
βˆ€ (J i : β„•) (h : Fin 2 β†’ Plane β†’ β„‚), (βˆ€ l, Measurable (h l)) β†’ (βˆ€ l x, β€–h l xβ€– ≀ 1) β†’
βˆ€ (a n : β„•) (v : ℝ), a+n ≀ N β†’ ΞΊ*N ≀ (n:ℝ) β†’
0 ≀ v-(a+n) β†’ (n:ℝ) ≀ v-(a+n)+2*sig*N β†’ (L:ℝ) ≀ v-(a+n)+2*sig*N β†’ v-a ≀ N β†’
βˆ€ A B : CellPath, A.length = a β†’ B.length = a β†’
dist ((Q 0).descendant A).center ((Q 1).descendant B).center ≀ 2000*(2:ℝ)^(-(a:ℝ)) β†’
let X := (Q 0).descendant A
let Y := (Q 1).descendant B
let t : ℝ := (a+n:β„•)-a
let ΞΈ := graphAngularScale N sig t cβ‚€
let I := sourceParentGraphIndices N sig t X Y (ρ 0) (ρ 1) n A B
let rep := fun e : (β„• Γ— β„•) Γ— Bool => graphChosenRepresentative
(graphAngularScale_pos N sig t hc) ((min_le_left _ _).trans hcap) true e.2
(sourceParentAxis X Y) e.1.1 e.1.2
let β := fun l => inheritedCircleSymbol (S l) (d l) (k l) (Q l) (ρ l) (mass l) N lam sig J i (h l)
let M := fun l => ((2:ℝ)^N)^(-mass l (a+n))
let F := fun e : GraphNonedgeIndex => graphOriginalTerm ![ρ 0,ρ 1,ρ 1,ρ 0]
(fun l => (graphQuadCells ![Q 0,Q 1,Q 1,Q 0] e.1 l).carrier)
![M 0,M 1,M 1,M 0] ![Ξ² 0,Ξ² 1,Ξ² 1,Ξ² 0] true e.2.2 (sourceParentAxis X Y) ΞΈ v e.2.1.1 e.2.1.2 Ξ¨
β€–(sourceRadialSquareEnergy a v Ξ¨ (sourceParentRetainedF N sig t X Y (ρ 0) (ρ 1) n
(((2:ℝ)^N)^(-mass 0 a)) (((2:ℝ)^N)^(-mass 1 a)) (Ξ² 0) (Ξ² 1)) : β„‚) -
((2:ℝ)^(2*(v-a))) β€’ (graphProfileCoefficient N ![mass 0,mass 1,mass 1,mass 0] a (a+n) β€’
(βˆ‘ e ∈ graphRetainedIndices I N sig (a+n) true ![Q 0,Q 1,Q 1,Q 0] rep, F e))β€– ≀ ((2:ℝ)^N)^(-T) := by
classical
obtain ⟨N₁,hrem⟩ := uniform_regularized_original_graph_removal hsig K lam T hΞ¨ hs hc hcap
obtain ⟨Nβ‚‚,hcaps⟩ := graphAngularScale_cap_inactive hgap hc
obtain ⟨W,hW,hw⟩ := continuous_supported_bump_bound hΨ.continuous hs
refine ⟨max N₁ Nβ‚‚,?_⟩
intro N hN ι inst S d k hcard hK L hL Q hQ hQs ρ mass B δ hd J i h hh hhb a n v
hp hlow hu ht hLu hv A B' hA hB hsep
let : βˆ€ l, IsProbabilityMeasure (ρ l) := fun l => (hd l).probability
let X := (Q 0).descendant A
let Y := (Q 1).descendant B'
let t : ℝ := (a+n:β„•)-a
have htval : t = n := by dsimp [t]; push_cast; ring
have hΞΈ := hcaps N ((le_max_right _ _).trans hN) t (by simpa only [htval] using hlow)
have hX : 0 < X.side := (Q 0).descendant_side_pos (hQ 0) A
have hY : 0 < Y.side := (Q 1).descendant_side_pos (hQ 1) B'
have hXs : X.side ≀ (2:ℝ)^(-(a:ℝ)) := by
dsimp [X]; rw [DyadicSquare.descendant_side,hA,Real.rpow_neg (by norm_num : (0:ℝ) ≀ 2),Real.rpow_natCast]
simpa only [one_div] using div_le_div_of_nonneg_right (hQs 0) (by positivity : (0:ℝ) ≀ 2^a)
have hYs : Y.side ≀ (2:ℝ)^(-(a:ℝ)) := by
dsimp [Y]; rw [DyadicSquare.descendant_side,hB,Real.rpow_neg (by norm_num : (0:ℝ) ≀ 2),Real.rpow_natCast]
simpa only [one_div] using div_le_div_of_nonneg_right (hQs 1) (by positivity : (0:ℝ) ≀ 2^a)
let I := sourceParentGraphIndices N sig t X Y (ρ 0) (ρ 1) n A B'
have hI : I βŠ† graphNonedgeIndices (a+n) (angularBinCount (graphAngularScale N sig t cβ‚€)) := by
rw [hΞΈ]
exact sourceParentGraphIndices_subset hA hB
have hr := hrem N ((le_max_left _ _).trans hN)
(fun l => S (sourceDistanceSlot l)) (fun l => d (sourceDistanceSlot l)) (fun l => k (sourceDistanceSlot l))
(fun l => hcard _) (fun l => hK _) L (fun l => hL _)
(fun l => Q (sourceDistanceSlot l)) (fun l => hQ _) (fun l => hQs _)
(fun l => ρ (sourceDistanceSlot l)) (fun l => mass (sourceDistanceSlot l)) B δ (fun l => hd _)
J i (fun l => h (sourceDistanceSlot l)) (fun l => hh _) (fun l => hhb _)
a (a+n) v (Nat.cast_nonneg a) (by exact_mod_cast Nat.le_add_right a n) hp
(by simpa only [Nat.cast_add] using hu) (by simpa only [Nat.cast_add,add_sub_cancel_left] using ht)
(by simpa only [Nat.cast_add] using hLu) hv true X Y hX hY hXs hYs (fun _ => hsep)
(sourceParentAxis X Y) I hI (by
intro e he l
rw [sourceDistanceSlot_comp]
exact sourceParentGraphIndices_parent (Q 0) (Q 1) (hQ 0) (hQ 1) A B' N n sig t (ρ 0) (ρ 1) he l)
dsimp only at hr ⊒
simp only [sourceDistanceSlot_comp] at hr
let β := fun l => inheritedCircleSymbol (S l) (d l) (k l) (Q l) (ρ l) (mass l) N lam sig J i (h l)
have hm (l : Fin 2) : Measurable (fun z : Plane Γ— UnitCircle => Ξ² l z.1 z.2) :=
measurable_inheritedCircleSymbol (S l) (d l) (k l) (Q l) (ρ l) (mass l) N lam sig J i (h l) (hh l)
have hb : βˆ€ (l : Fin 2) (x : Plane) (dir : UnitCircle), β€–Ξ² l x dirβ€– ≀ symbolDerivativeConstant K^K := by
intro l x dir
exact inheritedCircleSymbol_norm_le (S l) (d l) (k l) (Q l) (hQ l) (ρ l) (mass l) N lam sig J i (h l)
K (hK l) x (hhb l x) dir
have he := sourceParentRetainedEnergy_absolute_graph_sum N sig t a v (Q 0) (Q 1) A B'
(ρ 0) (ρ 1) n (Ma₁ := ((2:ℝ)^N)^(-mass 0 a)) (Maβ‚‚ := ((2:ℝ)^N)^(-mass 1 a))
(Mp₁ := ((2:ℝ)^N)^(-mass 0 (a+n))) (Mpβ‚‚ := ((2:ℝ)^N)^(-mass 1 (a+n)))
(by positivity) (by positivity) (by positivity) (by positivity) (Ξ² 0) (Ξ² 1) (hm 0) (hm 1)
(pow_nonneg (zero_le_one.trans (symbolDerivativeConstant_one_le K)) K)
(pow_nonneg (zero_le_one.trans (symbolDerivativeConstant_one_le K)) K) (hb 0) (hb 1) hΨ.continuous.measurable hpos hs hW hw
rw [← graphProfileCoefficient_distance] at he
rw [← hΞΈ] at he
rw [he]
have hM4 := sourceDistanceSlot_comp (fun l => ((2:ℝ)^N)^(-mass l (a+n:β„•)))
have hΞ²4 := sourceDistanceSlot_comp Ξ²
rw [hM4,hΞ²4] at hr
simpa only [Nat.cast_add,X,Y,I,t,Ξ²] using hr
end PlanarFalconer
end OAI