Buckets:
| import OAI.Analysis.NodalLength.Cells | |
| 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 | |
| open scoped BigOperators Topology | |
| open Set MeasureTheory | |
| open scoped BigOperators | |
| open Set | |
| open scoped BigOperators symmDiff | |
| open Set | |
| open scoped BigOperators | |
| open Set | |
| open scoped BigOperators symmDiff | |
| open Set | |
| namespace SharpNodal.Grid | |
| lemma sum_powers_le {A : ℕ} (hA : 2≤A) (n : ℕ) : (∑i∈Finset.range n,A^i)≤A^n := by | |
| induction n with | |
| | zero => simp | |
| | succ n ih => | |
| rw [Finset.sum_range_succ,pow_succ] | |
| calc | |
| _≤A^n+A^n := Nat.add_le_add_right ih _ | |
| _=A^n*2 := by omega | |
| _≤A^n*A := Nat.mul_le_mul_left _ hA | |
| lemma sum_squared_powers_le {A : ℕ} (hA : 2≤A) (n : ℕ) : | |
| (∑i∈Finset.range n,(A^i)^2)≤(A^n)^2 := by | |
| have hh:=sum_powers_le (A:=A^2) (by nlinarith) n | |
| simpa only [←pow_mul,mul_comm] using hh | |
| lemma Cell.mem_mismatch_set {A : ℕ} {F : Finset Cell} {Q P : Cell} {x : Point} : | |
| P∈Q.ancestors A F ∆ Q.largerAt A F x ↔ P∈F ∧ Q.level<P.level ∧ | |
| ((Q.points A⊆P.points A ∧ x∉P.points A) ∨ (¬Q.points A⊆P.points A ∧ x∈P.points A)) := by | |
| simp only [Finset.mem_symmDiff,Cell.ancestors,Cell.largerAt,Finset.mem_filter] | |
| tauto | |
| lemma Cell.mismatch_set_subset {A : ℕ} (F : Finset Cell) (Q : Cell) (x : Point) : | |
| Q.ancestors A F ∆ Q.largerAt A F x⊆F := by | |
| intro P hP | |
| exact (Cell.mem_mismatch_set.mp hP).1 | |
| lemma mismatch_at_scale {A D : ℕ} (hA : 0<A) (F S : Finset Cell) (Y : Cell → Finset Point) | |
| (hY : ∀Q∈S,Y Q⊆Q.near A D) (P : Cell) (n : ℕ) : | |
| (∑Q∈S.filter (fun Q =>Q.level=n),(Y Q |>.filter (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x)).card) | |
| ≤(2*D+1)^2*(8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2) := by | |
| classical | |
| let Bad : Cell → Finset Point := fun Q =>(Y Q).filter (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x) | |
| let T:=S.filter (fun Q =>Q.level=n) | |
| let G:=T.filter (fun Q =>(Bad Q).Nonempty) | |
| have hGT : G⊆T := Finset.filter_subset _ _ | |
| have hGS : G⊆S := hGT.trans (Finset.filter_subset _ _) | |
| have heq : (∑Q∈G,(Bad Q).card)=(∑Q∈T,(Bad Q).card) := by | |
| apply Finset.sum_subset hGT | |
| intro Q hQ hn | |
| have hbad : ¬(Bad Q).Nonempty := fun h =>hn (Finset.mem_filter.mpr ⟨hQ,h⟩) | |
| exact Finset.card_eq_zero.mpr (Finset.not_nonempty_iff_eq_empty.mp hbad) | |
| have hdis : (G : Set Cell).Pairwise (fun Q Q' =>Disjoint (Q.points A) (Q'.points A)) := by | |
| intro Q hQ Q' hQ' hne | |
| apply Finset.disjoint_left.mpr | |
| intro z hz hz' | |
| have he : Q.level=Q'.level := (Finset.mem_filter.mp (hGT hQ)).2.trans (Finset.mem_filter.mp (hGT hQ')).2.symm | |
| exact hne (Cell.equal_level_eq_of_intersection hA he hz hz') | |
| have hcollar (Q : Cell) (hQ : Q∈G) : Q.points A⊆border (P.side A) ((D+1)*A^n) P.pos := by | |
| obtain ⟨x,hx⟩:=(Finset.mem_filter.mp hQ).2 | |
| rcases Finset.mem_filter.mp hx with ⟨hx,hmis⟩ | |
| rcases Cell.mem_mismatch_set.mp hmis with ⟨_,hlev,hmis⟩ | |
| have hh:=Cell.mismatch_collar hA hlev.le (hY Q (hGS hQ) hx) hmis | |
| simpa only [Cell.side,(Finset.mem_filter.mp (hGT hQ)).2] using hh | |
| have hcard : (∑Q∈G,(Q.points A).card)≤(border (P.side A) ((D+1)*A^n) P.pos).card := by | |
| rw [←Finset.card_biUnion hdis] | |
| apply Finset.card_le_card | |
| intro z hz | |
| obtain ⟨Q,hQ,hz⟩:=Finset.mem_biUnion.mp hz | |
| exact hcollar Q hQ hz | |
| have hbadcard (Q : Cell) (hQ : Q∈G) : (Bad Q).card≤(2*D+1)^2*(Q.points A).card := by | |
| have hh : (Bad Q).card ≤ (Q.near A D).card := Finset.card_le_card | |
| ((Finset.filter_subset (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x) (Y Q)).trans (hY Q (hGS hQ))) | |
| change (Bad Q).card≤(Q.near A D).card at hh | |
| simpa only [Cell.card_near,Cell.card_points,mul_pow] using hh | |
| change (∑Q∈T,(Bad Q).card)≤_ | |
| rw [←heq] | |
| calc | |
| _≤∑Q∈G,(2*D+1)^2*(Q.points A).card := Finset.sum_le_sum (fun Q hQ =>hbadcard Q hQ) | |
| _=(2*D+1)^2*∑Q∈G,(Q.points A).card := (Finset.mul_sum _ _ _).symm | |
| _≤(2*D+1)^2*(border (P.side A) ((D+1)*A^n) P.pos).card := Nat.mul_le_mul_left _ hcard | |
| _≤_ := Nat.mul_le_mul_left _ (card_border_le _ _ _) | |
| def mismatchConstant (D : ℕ) : ℕ := (2*D+1)^2*(8*(D+1)+16*(D+1)^2) | |
| lemma mismatch_for_larger {A D : ℕ} (hA : 2≤A) (F S : Finset Cell) (Y : Cell → Finset Point) | |
| (hY : ∀Q∈S,Y Q⊆Q.near A D) (P : Cell) : | |
| (∑Q∈S,(Y Q |>.filter (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x)).card) | |
| ≤ mismatchConstant D*(P.points A).card := by | |
| classical | |
| let Bad : Cell → Finset Point := fun Q =>(Y Q).filter (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x) | |
| have hfib : (∑Q∈S,(Bad Q).card)=∑n∈Finset.range P.level,∑Q∈S.filter (fun Q =>Q.level=n),(Bad Q).card := by | |
| rw [Finset.sum_fiberwise_eq_sum_filter] | |
| symm | |
| apply Finset.sum_subset (Finset.filter_subset _ _) | |
| intro Q hQ hn | |
| have hlev : ¬Q.level<P.level := by simpa only [Finset.mem_filter,hQ,Finset.mem_range,true_and] using hn | |
| apply Finset.card_eq_zero.mpr | |
| apply Finset.eq_empty_iff_forall_notMem.mpr | |
| intro x hx | |
| exact hlev (Cell.mem_mismatch_set.mp (Finset.mem_filter.mp hx).2).2.1 | |
| have hscale:=fun n =>mismatch_at_scale (by omega : 0<A) F S Y hY P n | |
| have hsum : (∑n∈Finset.range P.level,(8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2)) | |
| =(8*(D+1)*P.side A)*(∑n∈Finset.range P.level,A^n)+ | |
| (16*(D+1)^2)*(∑n∈Finset.range P.level,(A^n)^2) := by | |
| have he (n : ℕ) : 8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2= | |
| (8*(D+1)*P.side A)*A^n+(16*(D+1)^2)*(A^n)^2 := by ring | |
| simp_rw [he,Finset.sum_add_distrib,←Finset.mul_sum] | |
| have hbound : (∑n∈Finset.range P.level,(8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2)) | |
| ≤(8*(D+1)+16*(D+1)^2)*(P.side A)^2 := by | |
| rw [hsum] | |
| calc | |
| _≤(8*(D+1)*P.side A)*(P.side A)+(16*(D+1)^2)*(P.side A)^2 := | |
| Nat.add_le_add (Nat.mul_le_mul_left _ (sum_powers_le hA P.level)) | |
| (Nat.mul_le_mul_left _ (sum_squared_powers_le hA P.level)) | |
| _=_ := by ring | |
| change (∑Q∈S,(Bad Q).card)≤_ | |
| rw [hfib] | |
| calc | |
| _≤∑n∈Finset.range P.level,(2*D+1)^2*(8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2) := | |
| Finset.sum_le_sum (fun n _ =>hscale n) | |
| _=(2*D+1)^2*∑n∈Finset.range P.level,(8*P.side A*((D+1)*A^n)+16*((D+1)*A^n)^2) := | |
| (Finset.mul_sum _ _ _).symm | |
| _≤(2*D+1)^2*((8*(D+1)+16*(D+1)^2)*(P.side A)^2) := Nat.mul_le_mul_left _ hbound | |
| _=_ := by rw [Cell.card_points,mismatchConstant]; ring | |
| theorem total_mismatch_bound {A D : ℕ} (hA : 2≤A) (F S : Finset Cell) (Y : Cell → Finset Point) | |
| (hY : ∀Q∈S,Y Q⊆Q.near A D) : | |
| (∑Q∈S,∑x∈Y Q,Q.mismatch A F x)≤ mismatchConstant D*∑P∈F,(P.points A).card := by | |
| classical | |
| have hQ (Q : Cell) : (∑x∈Y Q,Q.mismatch A F x)= | |
| ∑P∈F,(Y Q |>.filter (fun x =>P∈Q.ancestors A F ∆ Q.largerAt A F x)).card := by | |
| have hh:=Finset.sum_card_bipartiteAbove_eq_sum_card_bipartiteBelow (s:=Y Q) (t:=F) | |
| (fun x P =>P∈Q.ancestors A F ∆ Q.largerAt A F x) | |
| simp only [Finset.bipartiteAbove,Finset.bipartiteBelow] at hh | |
| rw [←hh] | |
| apply Finset.sum_congr rfl | |
| intro x hx | |
| dsimp only [Cell.mismatch] | |
| congr 1 | |
| ext P | |
| simp only [Finset.mem_filter] | |
| exact ⟨fun h =>⟨Q.mismatch_set_subset F x h,h⟩,fun h =>h.2⟩ | |
| simp_rw [hQ] | |
| rw [Finset.sum_comm] | |
| calc | |
| _≤∑P∈F,mismatchConstant D*(P.points A).card := | |
| Finset.sum_le_sum (fun P _ =>mismatch_for_larger hA F S Y hY P) | |
| _=_ := (Finset.mul_sum _ _ _).symm | |
| end SharpNodal.Grid | |
| namespace SharpNodal.Grid | |
| def packingConstant (D c J : ℕ) : ℕ := | |
| let c' :=(4*D+3)^2*c | |
| 2*c'*(2*(2*c'*mismatchConstant D+J+1)+1)*(2*D+1)^2 | |
| theorem nearby_witness_packing {A D c J : ℕ} (hA : 2≤A) (F : Finset Cell) | |
| (root : Cell) (Y : Cell → Finset Point) | |
| (hroot : ∀Q∈F,Q.level≤root.level ∧ Q.points A⊆root.points A) | |
| (hnear : ∀Q∈F,Y Q⊆Q.near A D) | |
| (hlower : ∀Q∈F,(Q.points A).card≤c*(Y Q).card) | |
| (hsmall : ∀Q∈F,∀x∈Y Q,(Q.smallerAt A F x).card≤J) : | |
| (∑Q∈F,(Q.points A).card) ≤ packingConstant D c J*(root.points A).card := by | |
| classical | |
| obtain ⟨S,hSF,hdis,hweight⟩:=rank_selection (A:=A) (D:=D) (by omega) F | |
| let W:=∑Q∈F,(Q.points A).card | |
| let c':=(4*D+3)^2*c | |
| have hlower' : W≤c'*∑Q∈S,(Y Q).card := by | |
| calc | |
| _≤(4*D+3)^2*∑Q∈S,(Q.points A).card := hweight | |
| _≤(4*D+3)^2*∑Q∈S,c*(Y Q).card := | |
| Nat.mul_le_mul_left _ (Finset.sum_le_sum (fun Q hQ =>hlower Q (hSF hQ))) | |
| _=_ := by rw [←Finset.mul_sum]; exact (Nat.mul_assoc _ _ _).symm | |
| have hambient : ∀Q∈S,Y Q⊆root.near A D := by | |
| intro Q hQ | |
| exact (hnear Q (hSF hQ)).trans (Cell.near_mono (by omega) (hroot Q (hSF hQ)).1 (hroot Q (hSF hQ)).2) | |
| have hdis' : ∀Q∈S,∀P∈S,Q.rank A F=P.rank A F → Q≠P → Disjoint (Y Q) (Y P) := by | |
| intro Q hQ P hP hr hne | |
| exact (hdis Q hQ P hP hr hne).mono (hnear Q (hSF hQ)) (hnear P (hSF hP)) | |
| have hrank : ∀Q∈S,∀x∈Y Q,Q.rank A F≤totalAt A F x+Q.mismatch A F x+J+1 ∧ | |
| totalAt A F x≤Q.rank A F+Q.mismatch A F x+J+1 := by | |
| intro Q hQ x hx | |
| exact Cell.rank_control (by omega) F Q x (hsmall Q (hSF hQ) x hx) | |
| have hh:=finite_witness_packing S (root.near A D) Y (Cell.rank A F) (totalAt A F) | |
| (Cell.mismatch A F) W c' (mismatchConstant D) J hlower' | |
| (total_mismatch_bound hA F S Y (fun Q hQ =>hnear Q (hSF hQ))) hambient hdis' hrank | |
| convert hh using 1 | |
| rw [Cell.card_near,Cell.card_points] | |
| dsimp only [packingConstant,c'] | |
| ring | |
| end SharpNodal.Grid | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 16.6 kB
- Xet hash:
- 459aa734a2cdfdd62b354a0a532a500d7883712a25135cf59ad54da00d49f652
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.