cfahlgren1's picture
download
raw
18 kB
import OAI.Analysis.NodalLength.GridPaths
namespace OAI
noncomputable section
open scoped ContDiff Bundle ENNReal
open Bundle Manifold MeasureTheory
open scoped ContDiff ENNReal Topology
open MeasureTheory Filter Set
open scoped Topology ENNReal
open MeasureTheory Filter Set
open scoped Topology ENNReal ContDiff
open MeasureTheory Filter Set
open scoped Topology ENNReal ContDiff
open MeasureTheory Filter Set
open scoped Topology ENNReal ContDiff
open MeasureTheory Filter Set
open scoped Topology ContDiff
open Filter Set
open scoped Topology ContDiff
open Filter Set
open scoped Topology ENNReal
open Filter Set MeasureTheory TopologicalSpace
open scoped Topology ContDiff
open Filter Set
open scoped Topology ENNReal
open Filter Set MeasureTheory TopologicalSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory TopologicalSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory Laplacian
open scoped Topology ENNReal ContDiff ComplexConjugate
open Filter Set MeasureTheory Laplacian
open scoped Topology ENNReal ContDiff ComplexConjugate
open Filter Set MeasureTheory Laplacian
open scoped Topology ENNReal NNReal
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Set MeasureTheory Filter
open scoped Topology ENNReal
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff Laplacian
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory
open scoped Topology ENNReal ContDiff CompactlySupported
open Set MeasureTheory
open scoped Topology ENNReal ContDiff CompactlySupported
open Set MeasureTheory
open scoped Topology ENNReal ContDiff CompactlySupported
open Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff Laplacian
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory
open scoped Topology ContDiff Convolution ENNReal
open Filter Set MeasureTheory
open scoped Topology ContDiff ENNReal
open Filter Set MeasureTheory
open scoped Topology ContDiff ENNReal
open Filter Set MeasureTheory
open scoped Topology ContDiff ENNReal
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory Function
open scoped Topology
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal
open Filter Set MeasureTheory
open scoped Topology ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped BigOperators
open Filter Set MeasureTheory
open scoped BigOperators
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff Convolution
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology
open Filter Set MeasureTheory
open scoped Topology ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff BigOperators
open Filter Set MeasureTheory InnerProductSpace
open scoped Topology ENNReal ContDiff BigOperators
open Filter Set MeasureTheory InnerProductSpace
open scoped BigOperators
open MeasureTheory
open scoped BigOperators
open Set MeasureTheory
open scoped BigOperators
open scoped Classical
open scoped BigOperators Topology ENNReal
open Set MeasureTheory
open scoped BigOperators
open scoped Topology ENNReal ContDiff
open Filter Set MeasureTheory InnerProductSpace
open scoped BigOperators Classical Topology
open Filter Set MeasureTheory
open scoped BigOperators Classical Topology
open Filter Set MeasureTheory
open scoped BigOperators
open Set
namespace SharpNodal.Grid
abbrev Point := Fin 2 → ℤ
def box (a b : Point) : Finset Point := Fintype.piFinset (fun i =>Finset.Ico (a i) (b i))
@[simp] lemma mem_box {z a b : Point} : z∈box a b ↔ ∀i,a i≤z i ∧ z i<b i := by
simp [box]
lemma card_box (a b : Point) : (box a b).card=∏i : Fin 2,(b i-a i).toNat := by
simp [box]
lemma box_mono {a b c d : Point} (ha : ∀i,c i≤a i) (hb : ∀i,b i≤d i) :
box a b⊆box c d := by
intro z hz
rw [mem_box] at hz ⊢
exact fun i =>⟨(ha i).trans (hz i).1,(hz i).2.trans_le (hb i)⟩
def square (s : ℕ) (p : Point) : Finset Point :=
box (fun i =>p i*s) (fun i =>(p i+1)*s)
@[simp] lemma mem_square {s : ℕ} {p z : Point} : z∈square s p ↔ ∀i,p i*s≤z i ∧ z i<(p i+1)*s := by
simp [square]
@[simp] lemma card_square (s : ℕ) (p : Point) : (square s p).card=s^2 := by
rw [square,card_box]
have hh (i : Fin 2) : ((p i+1)*(s:ℤ)-p i*s).toNat=s := by
rw [add_mul,one_mul,add_sub_cancel_left,Int.toNat_natCast]
simp only [hh,Fin.prod_univ_two]
ring
lemma mem_square_div {s : ℕ} (hs : 0<s) {p z : Point} :
z∈square s p ↔ ∀i,z i/(s:ℤ)=p i := by
rw [mem_square]
have hs' : (0:ℤ)<s := by exact_mod_cast hs
apply forall_congr'
intro i
rw [←Int.le_ediv_iff_mul_le hs',←Int.ediv_lt_iff_lt_mul hs']
omega
lemma square_disjoint {s : ℕ} (hs : 0<s) {p q : Point} (hpq : p≠q) :
Disjoint (square s p) (square s q) := by
apply Finset.disjoint_left.mpr
intro z hz hq
rw [mem_square_div hs] at hz hq
exact hpq (funext (fun i =>(hz i).symm.trans (hq i)))
def neighborhood (D s : ℕ) (p : Point) : Finset Point :=
box (fun i =>(p i-D)*s) (fun i =>(p i+1+D)*s)
@[simp] lemma mem_neighborhood {D s : ℕ} {p z : Point} :
z∈neighborhood D s p ↔ ∀i,(p i-D)*s≤z i ∧ z i<(p i+1+D)*s := by
simp [neighborhood]
@[simp] lemma card_neighborhood (D s : ℕ) (p : Point) :
(neighborhood D s p).card=((2*D+1)*s)^2 := by
rw [neighborhood,card_box]
have hh (i : Fin 2) : ((p i+1+D)*(s:ℤ)-(p i-D)*s).toNat=(2*D+1)*s := by
have he : (p i+1+D)*(s:ℤ)-(p i-D)*s=(((2*D+1)*s:ℕ):ℤ) := by push_cast; ring
rw [he,Int.toNat_natCast]
simp only [hh,Fin.prod_univ_two]
ring
lemma square_subset_neighborhood (D s : ℕ) (p : Point) : square s p⊆neighborhood D s p := by
apply box_mono <;> intro i <;> nlinarith [Int.natCast_nonneg D,Int.natCast_nonneg s]
end SharpNodal.Grid
noncomputable section
open scoped BigOperators Topology
open Set MeasureTheory
namespace SharpNodal.Profiles
lemma UnitWave.growth_nonneg {Cp a₀ : ℝ} (ha₀ : 0<a₀) (D : UnitWave Cp a₀) (b : Plane) :
0≤D.growth b := div_nonneg (D.excess_nonneg b) (ha₀.le.trans D.frequency_lower)
lemma UnitWave.growth_change {Cp a₀ : ℝ} (ha₀ : 0<a₀) (D : UnitWave Cp a₀) (b c : Plane) :
D.growth b≤D.growth c+1001*‖b-c‖ := by
have hK : 0<D.K := ha₀.trans_le D.frequency_lower
have hh := centered_excess_weight_bound (T:=D.K • b) (T':=D.K • c)
(by norm_num : (1:ℝ)≤1000) (centeredMass_ne_zero_of D.inner_nonzero)
(centeredMass_ne_top_of D.outer_finite)
simp only [←smul_sub,norm_smul,Real.norm_eq_abs,abs_of_pos hK] at hh
dsimp only [UnitWave.growth,UnitWave.excess]
rw [div_le_iff₀ hK]
have he : (massExcess (centeredMass (D.K • c) D.U 0 1000)
(centeredMass (D.K • c) D.U 0 1)/D.K+1001*‖b-c‖)*D.K=
massExcess (centeredMass (D.K • c) D.U 0 1000)
(centeredMass (D.K • c) D.U 0 1)+(1000+1)*(D.K*‖b-c‖) := by field_simp; ring
rw [he]
exact hh
lemma GridChild.same_growth {A : ℕ} {Cp a₀ : ℝ} {D E F : ScaledWave Cp a₀} {i : GridIndex A}
(hE : GridChild A D E i) (hF : GridChild A D F i) (b : Plane) : E.growth b=F.growth b := by
dsimp only [UnitWave.growth,UnitWave.excess]
rw [hE.2.1,hF.2.1,hE.2.2.1,hF.2.2.1]
theorem entry_growth_bound {A : ℕ} {Cp a₀ C₀ C₁ L : ℝ} (hA : 2≤A)
(ha₀ : 0<a₀) (hC₀ : 0≤C₀) (hC₁ : 0≤C₁) (hL : 0≤L)
(hrule : DescentRule A Cp a₀ C₀ C₁ L) (D : ScaledWave Cp a₀)
{H : ℝ} (hparent : D.growth 0≤H) (hbottom : a₀≤D.K/(A:ℝ))
(i : GridIndex A) (Q : ScaledWave Cp a₀) (hQ : GridChild A D Q i) :
Q.growth 0≤(A:ℝ)^2*((1/2+1001*C₁)*(H+1001*(L+1)+C₀/a₀+1)+1001*(L+1)) := by
classical
have : NeZero A := ⟨by omega⟩
let b : Plane := (L+1) • EuclideanSpace.single 0 1
have hb : ‖b‖=L+1 := by simp [b,norm_smul,abs_of_pos (by linarith : 0<L+1)]
obtain ⟨E,b',hc,hi,hm⟩ := hrule D b hbottom (Or.inr (by rw [hb]; linarith))
let f := C₀/D.K+D.side
let S := H+1001*(L+1)+C₀/a₀+1
have hf : f≤C₀/a₀+1 := add_le_add (div_le_div_of_nonneg_left hC₀ ha₀ D.frequency_lower) D.side_le_one
have hs : D.growth b+f≤S := by
have hh := D.toUnitWave.growth_change ha₀ b 0
simp only [sub_zero,hb] at hh
dsimp [S]
linarith
have hn (j : GridIndex A) : ‖b' j‖≤‖b' j-b‖+‖b‖ := by
simpa only [sub_add_cancel] using norm_add_le (b' j-b) b
have hg (j : GridIndex A) : (E j).growth 0≤(E j).growth (b' j)+1001*(‖b' j-b‖+‖b‖) := by
have hh := (E j).toUnitWave.growth_change ha₀ 0 (b' j)
simp only [zero_sub,norm_neg] at hh
linarith [hn j]
have havg := Finset.expect_le_expect (s:=Finset.univ) (fun j _ =>hg j)
simp only [Finset.expect_add_distrib,←Finset.mul_expect,Fintype.expect_const,hb] at havg
have havg' : (𝔼 j,(E j).growth 0)≤(1/2+1001*C₁)*S+1001*(L+1) := by
have hprod := mul_le_mul_of_nonneg_left hs (by positivity : (0:ℝ)≤1/2+1001*C₁)
change (𝔼 j,(E j).growth (b' j))≤(D.growth b+f)/2 at hm
change (𝔼 j,‖b' j-b‖)≤C₁*(D.growth b+f) at hi
nlinarith only [havg,hm,hi,hprod]
have hsingle : (E i).growth 0≤∑j : GridIndex A,(E j).growth 0 :=
Finset.single_le_sum (fun j _ =>(E j).toUnitWave.growth_nonneg ha₀ 0) (Finset.mem_univ i)
have hAr : 0<(A:ℝ) := by exact_mod_cast (show 0<A by omega)
rw [Fintype.expect_eq_sum_div_card] at havg'
have hh := (div_le_iff₀ (by positivity : (0:ℝ)<(Fintype.card (GridIndex A):ℝ))).mp havg'
have hh' : (∑j : GridIndex A,(E j).growth 0)≤(A:ℝ)^2*
((1/2+1001*C₁)*(H+1001*(L+1)+C₀/a₀+1)+1001*(L+1)) := by
simpa only [GridIndex,Fintype.card_fun,Fintype.card_fin,Nat.cast_pow,S,mul_comm] using hh
rw [hQ.same_growth (hc i) 0]
exact hsingle.trans hh'
end SharpNodal.Profiles
noncomputable section
open scoped BigOperators
open Set
namespace SharpNodal.Grid
theorem finite_witness_packing {Q X : Type*} [DecidableEq Q] [DecidableEq X]
(S : Finset Q) (U : Finset X) (Y : Q → Finset X)
(rank : Q → ℕ) (total : X → ℕ) (d : Q → X → ℕ) (W c B J : ℕ)
(hlower : W≤c*∑q∈S,(Y q).card)
(herror : (∑q∈S,∑x∈Y q,d q x)≤B*W)
(hambient : ∀q∈S,Y q⊆U)
(hdisjoint : ∀q∈S,∀q'∈S,rank q=rank q' → q≠q' → Disjoint (Y q) (Y q'))
(hrank : ∀q∈S,∀x∈Y q,rank q≤total x+d q x+J+1 ∧ total x≤rank q+d q x+J+1) :
W≤2*c*(2*(2*c*B+J+1)+1)*U.card := by
classical
let M:=2*c*B
let K:=M+J+1
let Z : Q → Finset X := fun q =>(Y q).filter (fun x =>d q x≤M)
let Bad : Q → Finset X := fun q =>(Y q).filter (fun x =>¬d q x≤M)
have hsplit (q : Q) : (Z q).card+(Bad q).card=(Y q).card :=
Finset.card_filter_add_card_filter_not _
have hmark (q : Q) : (M+1)*(Bad q).card≤∑x∈Y q,d q x := by
calc
(M+1)*(Bad q).card=∑x∈Bad q,(M+1) := by simp [mul_comm]
_≤∑x∈Bad q,d q x := Finset.sum_le_sum (fun x hx =>by
have hh:¬d q x≤M := (Finset.mem_filter.mp hx).2
omega)
_≤∑x∈Y q,d q x := Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) (by simp)
have hmarksum : (M+1)*(∑q∈S,(Bad q).card)≤B*W := by
calc
_=∑q∈S,(M+1)*(Bad q).card := Finset.mul_sum _ _ _
_≤∑q∈S,∑x∈Y q,d q x := Finset.sum_le_sum (fun q _ =>hmark q)
_≤_ := herror
have hsumeq : (∑q∈S,(Z q).card)+(∑q∈S,(Bad q).card)=∑q∈S,(Y q).card := by
rw [←Finset.sum_add_distrib]
exact Finset.sum_congr rfl (fun q _ =>hsplit q)
have hgood : W≤2*c*∑q∈S,(Z q).card := by
dsimp only [M] at hmarksum
have hb : 2*c*(∑q∈S,(Bad q).card)≤W := by
by_cases hB : B=0
· simp only [hB,mul_zero,zero_add,one_mul,zero_mul] at hmarksum
have hz : (∑q∈S,(Bad q).card)=0 := Nat.eq_zero_of_le_zero hmarksum
simp only [hz,mul_zero,Nat.zero_le]
· apply Nat.le_of_mul_le_mul_right (c:=B) _ (Nat.pos_of_ne_zero hB)
calc
_=(2*c*B)*(∑q∈S,(Bad q).card) := by ring
_≤(2*c*B+1)*(∑q∈S,(Bad q).card) := Nat.mul_le_mul_right _ (Nat.le_add_right _ _)
_≤B*W := hmarksum
_=W*B := Nat.mul_comm _ _
rw [←hsumeq] at hlower
have htwice := Nat.add_le_add hlower hlower
have he : c*((∑q∈S,(Z q).card)+(∑q∈S,(Bad q).card))+
c*((∑q∈S,(Z q).card)+(∑q∈S,(Bad q).card))=
2*c*(∑q∈S,(Z q).card)+2*c*(∑q∈S,(Bad q).card) := by ring
rw [he] at htwice
exact Nat.le_of_add_le_add_right (htwice.trans (Nat.add_le_add_left hb _))
have hcount (x : X) : (S.filter (fun q =>x∈Z q)).card≤2*K+1 := by
have hmap : Set.MapsTo rank (S.filter (fun q =>x∈Z q)) (Finset.Icc (total x-K) (total x+K)) := by
intro q hq
rcases Finset.mem_filter.mp hq with ⟨hq,hx⟩
rcases Finset.mem_filter.mp hx with ⟨hx,hd⟩
have hh:=hrank q hq x hx
rw [Finset.mem_coe,Finset.mem_Icc]
dsimp only [K]
omega
have hinj : Set.InjOn rank (S.filter (fun q =>x∈Z q)) := by
intro q hq q' hq' he
by_contra hne
rcases Finset.mem_filter.mp hq with ⟨hq,hx⟩
rcases Finset.mem_filter.mp hq' with ⟨hq',hx'⟩
exact Finset.disjoint_left.mp (hdisjoint q hq q' hq' he hne)
(Finset.mem_filter.mp hx).1 (Finset.mem_filter.mp hx').1
have hh:=Finset.card_le_card_of_injOn rank hmap hinj
rw [Nat.card_Icc] at hh
omega
have hsumcount : (∑q∈S,(Z q).card)=(∑x∈U,(S.filter (fun q =>x∈Z q)).card) := by
have hh:=Finset.sum_card_bipartiteAbove_eq_sum_card_bipartiteBelow (s:=S) (t:=U)
(fun q x =>x∈Z q)
simp only [Finset.bipartiteBelow,Finset.bipartiteAbove] at hh
rw [←hh]
apply Finset.sum_congr rfl
intro q hq
congr 1
ext x
simp only [Finset.mem_filter]
exact ⟨fun hx =>⟨hambient q hq ((Finset.mem_filter.mp hx).1),hx⟩,fun hx =>hx.2⟩
have hupper : (∑q∈S,(Z q).card)≤(2*K+1)*U.card := by
rw [hsumcount]
calc
_≤∑x∈U,(2*K+1) := Finset.sum_le_sum (fun x _ =>hcount x)
_=_ := by simp [mul_comm]
dsimp only [K,M] at hupper
exact hgood.trans (by nlinarith)
end SharpNodal.Grid
end
end
end
end OAI

Xet Storage Details

Size:
18 kB
·
Xet hash:
c22a877a8b0080c1fd42243d907ffbdced153a3a34e5ebccd6fe49076e73ade7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.