Download data/lean/OAI/MeasureTheory/FalconerCompletion/Recursion/DescriptorGoodNeg.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.81 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/FalconerCompletion/Recursion/DescriptorGoodNeg.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/MeasureTheory/FalconerCompletion/Recursion/DescriptorGoodNeg.lean
-
curl -L -o DescriptorGoodNeg.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/MeasureTheory/FalconerCompletion/Recursion/DescriptorGoodNeg.lean
6.81 kB
| import Mathlib | |
| import OAI.MeasureTheory.Falconer.Model | |
| import OAI.MeasureTheory.Falconer.Recursion.PolicyDescriptors | |
| import OAI.MeasureTheory.FalconerCompletion.Angular.TensorCapTsupportCoord | |
| import OAI.MeasureTheory.FalconerCompletion.Recursion.NominalRadius | |
| namespace OAI | |
| /-! Recursive policies and quantitative depth estimates. -/ | |
| open _root_.OAI.PlanarFalconer | |
| section | |
| section | |
| open Set MeasureTheory | |
| open scoped ComplexConjugate RealInnerProductSpace | |
| namespace GraphLiteralSupport | |
| namespace CurrentFalconer.TreeND | |
| open Set Metric MeasureTheory PlanarFalconer | |
| open scoped ENNReal RealInnerProductSpace ContDiff Topology | |
| variable {d : β} | |
| lemma descriptorGood_neg (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) {w : EuclideanSpace β (Fin d)} | |
| (hw : w β descriptorGood Ο m N sig C J i P b) : | |
| -w β descriptorGood Ο m N sig C J i P b := by | |
| classical | |
| cases b with | |
| | parallel g p => | |
| have he : fullParallelCount Ο g p P (testWidth N J i p sig) (-w)= | |
| fullParallelCount Ο g p P (testWidth N J i p sig) w := by | |
| unfold fullParallelCount | |
| congr 1 | |
| ext Q | |
| simp only [Finset.mem_filter,graphPerpND,inner_neg_right,neg_smul,smul_neg,neg_neg] | |
| constructor | |
| Β· intro h | |
| apply Finset.mem_filter.mpr | |
| exact h | |
| Β· intro h | |
| exact Finset.mem_filter.mp h | |
| exact β¨by simpa only [norm_neg] using hw.1,by rw [he]; exact hw.2β© | |
| | projection p t => | |
| simpa only [descriptorGood,Set.mem_ofPred_eq,norm_neg,fullProjectionCollision, | |
| inner_neg_right,abs_neg] using hw | |
| noncomputable def actualDescriptorMask (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) : EuclideanSpace β (Fin d) β β := | |
| evenBufferedMaskND (sourceMaskRadiusND d (descriptorLength b) ((2:β)^N) sig) | |
| (descriptorGood Ο m N sig C J i P b) | |
| lemma actualDescriptorMask_smooth (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) : ContDiff β β (actualDescriptorMask Ο m N sig C J i P b) := | |
| evenBufferedMaskND_contDiff _ _ | |
| lemma actualDescriptorMask_even (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) : Function.Even (actualDescriptorMask Ο m N sig C J i P b) := | |
| evenBufferedMaskND_even _ _ | |
| lemma actualDescriptorMask_bounds (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) {w : EuclideanSpace β (Fin d)} (hw : βwβ β€ 1) : | |
| 0 β€ actualDescriptorMask Ο m N sig C J i P b w β§ | |
| actualDescriptorMask Ο m N sig C J i P b w β€ 1 := | |
| evenBufferedMaskND_bounds (sourceMaskRadiusND_pos _ _ _ _) _ hw | |
| lemma actualDescriptorMask_one (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) {w : EuclideanSpace β (Fin d)} | |
| (hw : w β descriptorGood Ο m N sig C J i P b) : | |
| actualDescriptorMask Ο m N sig C J i P b w = 1 := by | |
| have hnorm : βwβ=1 := by cases b <;> exact hw.1 | |
| exact evenBufferedMaskND_eq_one (sourceMaskRadiusND_pos _ _ _ _) | |
| (fun _ hv => descriptorGood_neg Ο m N sig C J i P b hv) hnorm.le hw | |
| lemma sourceMaskRadiusND_near_nominal (N l : β) (sig : β) : | |
| 2*(d+1:β)*sourceMaskRadiusND d l ((2:β)^N) sig β€ nominalRadius N sig l := by | |
| have hD : 0 < sourceMaskScaleND l ((2:β)^N) sig := sourceMaskScaleND_pos _ _ _ | |
| have hβ : 2*(d+1:β)*sourceMaskRadiusND d l ((2:β)^N) sig β€ | |
| (sourceMaskScaleND l ((2:β)^N) sig)β»ΒΉ := by | |
| unfold sourceMaskRadiusND | |
| have hd : 2*(d+1:β) β€ 100*(d+1:β)^2 := by nlinarith [Nat.cast_nonneg (Ξ± := β) d] | |
| exact (mul_le_mul_of_nonneg_right hd (by positivity : 0 β€ | |
| (sourceMaskScaleND l ((2:β)^N) sig)β»ΒΉ/(100*(d+1:β)^2))).trans_eq (by | |
| field_simp) | |
| apply hβ.trans | |
| apply le_min | |
| Β· exact (inv_le_oneβ hD).mpr (sourceMaskScaleND_one_le _ _ _) | |
| Β· simpa only [Nat.sub_zero,pow_zero,inv_one,one_mul,one_div] using | |
| (sourceMaskScaleND_inv_depth (g := 0) (p := l) (Nat.zero_le l) | |
| (R := (2:β)^N) (Ο := sig) (by positivity)) | |
| lemma uniform_actualDescriptorMask_support {sig : β} (hsig : 0<sig) {J : β} (hJ : 0<J) : | |
| β Nβ : β, β N β₯ Nβ, β (Ο : Measure (EuclideanSpace β (Fin d))), IsFiniteMeasure Ο β | |
| β (m : β β β) (C : β) (i : β) (b : PolicyDescriptor), ValidDescriptor N b β | |
| β P : CellPath d, P.length=descriptorAnchor b β β k : β, | |
| β w : EuclideanSpace β (Fin d), βwβ=1 β | |
| w β tsupport (iteratedFDeriv β k (actualDescriptorMask Ο m N sig C J i P b)) β | |
| w β descriptorGood Ο m N sig C J (i+1) P b := by | |
| obtain β¨Nβ,hββ© := uniform_descriptorGood_transfer (d := d) hsig hJ | |
| refine β¨Nβ,?_β© | |
| intro N hN Ο hf m C i b hb P hP k w hw hsupport | |
| have hs : w β tsupport (actualDescriptorMask Ο m N sig C J i P b) := | |
| tsupport_iteratedFDeriv_subset k hsupport | |
| obtain β¨v,hv,hdβ© := evenBufferedMaskND_support_near (sourceMaskRadiusND_pos _ _ _ _) | |
| (fun _ hv => descriptorGood_neg Ο m N sig C J i P b hv) hs | |
| apply hβ N hN Ο hf m C i b hb P hP v w hw _ hv | |
| rw [dist_comm] | |
| exact hd.trans (sourceMaskRadiusND_near_nominal N (descriptorLength b) sig) | |
| lemma actualDescriptorMask_derivatives (d B : β) : | |
| β Cβ : β, 0 β€ Cβ β§ β (Ο : Measure (EuclideanSpace β (Fin d))) | |
| (m : β β β) (N : β) (sig C : β) (J i : β) (P : CellPath d) | |
| (b : PolicyDescriptor) (k : β), k β€ B β β w, | |
| βiteratedFDeriv β k (actualDescriptorMask Ο m N sig C J i P b) wβ β€ | |
| Cβ*(sourceMaskScaleND (descriptorLength b) ((2:β)^N) sig)^k := by | |
| obtain β¨Cβ,hC,hββ© := evenBufferedMaskND_derivative_bound d B | |
| let A : β := 100*(d+1)^2 | |
| have hA : 1β€A := by dsimp [A]; nlinarith [sq_nonneg (d:β),Nat.cast_nonneg (Ξ± := β) d] | |
| refine β¨Cβ*A^B,by positivity,?_β© | |
| intro Ο m N sig C J i P b k hk w | |
| have he : (sourceMaskRadiusND d (descriptorLength b) ((2:β)^N) sig)β»ΒΉ= | |
| A*sourceMaskScaleND (descriptorLength b) ((2:β)^N) sig := by | |
| rw [sourceMaskRadiusND,inv_div,div_inv_eq_mul] | |
| apply (hβ _ _ (sourceMaskRadiusND_pos _ _ _ _) k hk w).trans | |
| rw [he,mul_pow,β mul_assoc] | |
| exact mul_le_mul_of_nonneg_right | |
| (mul_le_mul_of_nonneg_left (pow_le_pow_rightβ hA hk) hC) | |
| (pow_nonneg (sourceMaskScaleND_pos _ _ _).le k) | |
| end CurrentFalconer.TreeND | |
| end GraphLiteralSupport | |
| end | |
| end | |
| end OAI | |