Download data/lean/OAI/Analysis/DiamondDistortion/Descent.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DiamondDistortion/Descent.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/DiamondDistortion/Descent.lean
-
curl -L -o Descent.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DiamondDistortion/Descent.lean
6.07 kB
| import OAI.Analysis.DiamondDistortion.HeadProjections | |
| namespace OAI | |
| universe u v | |
| noncomputable section | |
| open scoped BigOperators Classical Topology | |
| open Set | |
| namespace DiamondDistortion | |
| open scoped ENNReal | |
| namespace PathModel | |
| open RecursiveModel DirectLayers SignCube | |
| /-- Ancestral coordinate projections for the literal linear path cost are | |
| contractive, jointly cofinal, and nested in both orders. -/ | |
| theorem linear_regular : Regular linearHeads where | |
| nonempty := head_nonempty | |
| upper := head_upper | |
| nested_left H K hHK x := linearData.projection_nested H.val K.val hHK x | |
| nested_right H K hHK x := linearData.projection_nested_right H.val K.val hHK x | |
| contractive := linear_projection_contractive | |
| theorem adaptive_graph (C : β) (hin : SignInput linearHeads.projection C) | |
| {D s : β} (k : β) (f : Diamond.Vertex k β LinearSpace) | |
| (hf : Diamond.HasDistortion k f D s) : | |
| (k:β)/16 β€ C*(D^2+(k:β)*((2:β)^k)β»ΒΉ^2) β§ | |
| C*(D^2+(k:β)*((2:β)^k)β»ΒΉ^2) β€ C*(D^2+1) := | |
| DirectLayers.adaptive_graph linearHeads linear_regular hin k f hf | |
| theorem predictable_495_graph (hin : PredictableInput linearHeads.projection 495) | |
| {D s : β} (k : β) (f : Diamond.Vertex k β LinearSpace) | |
| (hf : Diamond.HasDistortion k f D s) : (k:β)/4 β€ 495*(D+1)^2 := | |
| DirectLayers.predictable_graph linearHeads linear_regular hin k f hf | |
| theorem variation_252_graph (hin : PredictableInput linearHeads.projection 252) | |
| {D s : β} (k : β) (f : Diamond.Vertex k β LinearSpace) | |
| (hf : Diamond.HasDistortion k f D s) : (k:β)/(16*D^2) β€ 1008 := | |
| DirectLayers.variation_graph linearHeads linear_regular hin k f hf | |
| theorem leakage_1024_graph (hin : LeakageInput linearHeads.projection) | |
| {D s : β} (k : β) (hk : 1 β€ k) (f : Diamond.Vertex k β LinearSpace) | |
| (hf : Diamond.HasDistortion k f D s) : | |
| (k:β)/8 β€ 1024*(D^2+(k:β)*(leakageTolerance k)^2) β§ | |
| 1024*(D^2+(k:β)*(leakageTolerance k)^2) β€ 1024*(D^2+1) := | |
| DirectLayers.leakage_graph linearHeads linear_regular hin k hk f hf | |
| theorem squared_gap_400_graph (hin : GapInput linearHeads.projection) | |
| {D s Ξ³ : β} (k : β) (f : Diamond.Vertex k β LinearSpace) | |
| (hf : Diamond.HasDistortion k f D s) (hΞ³ : 0 < Ξ³) | |
| (hΞ³a : Ξ³ < (2/D)/8) (hΞ³k : Ξ³ < 1/((k:β)+1)) : | |
| β T : Protocol LinearSpace ForestHead k, | |
| T.Martingale β§ T.Nested β§ T.Anchored β§ T.CommonHeads β§ T.Supported linearHeads.projection β§ | |
| T.terminalEnergy β€ 4 β§ T.initialEnergy+(k:β)*((2/D)/8)^2/400 β€ T.terminalEnergy β§ | |
| (k:β)*((2/D)/8)^2/400 β€ T.initialEnergy+(k:β)*((2/D)/8)^2/400 := | |
| DirectLayers.gap_graph linearHeads linear_regular hin k f hf hΞ³ hΞ³a hΞ³k | |
| end PathModel | |
| namespace DirectSegmentApplications | |
| theorem deterministic_descent {D s : β} (k : β) (f : Diamond.Vertex k β ForestDual) | |
| (hf : Diamond.HasDistortion k f D s) : (k:β) β€ 256*D^2 := by | |
| have h := headline.1 k f D s hf | |
| nlinarith [sq_nonneg D] | |
| theorem bin_descent {D : β} (k : β) (hk : 1 β€ k) (f : Diamond.Vertex k β ForestDual) | |
| (hl : β u v,Diamond.distance k u v β€ βf u-f vβ) | |
| (hu : β u v,βf u-f vβ β€ D*Diamond.distance k u v) : Real.sqrt (k:β)/144 < D := by | |
| have hsl := Diamond.slope_lower f (s := 1) (by simpa only [one_mul] using hl) (Diamond.baseEdge k) | |
| have hsu := Diamond.slope_upper f hu (Diamond.baseEdge k) | |
| have hD : 1 β€ D := le_trans hsl hsu | |
| have hdist : Diamond.HasDistortion k f D 1 := β¨hD,by norm_num,by simpa only [one_mul,mul_one] using fun u v => And.intro (hl u v) (hu u v)β© | |
| have hh := headline.1 k f D 1 hdist | |
| have hs := Real.sq_sqrt (Nat.cast_nonneg (Ξ± := β) k) | |
| have hsp := Real.sqrt_nonneg (k:β) | |
| have hk0 : (1:β) β€ k := by exact_mod_cast hk | |
| apply (div_lt_iffβ (by norm_num : (0:β)<144)).mpr | |
| nlinarith | |
| end DirectSegmentApplications | |
| namespace Diamond | |
| variable {X : Type*} [NormedAddCommGroup X] | |
| /-- The redundant conventional condition Dβ₯1 follows from the | |
| all-pairs inequalities alone; thus HasDistortion adds no standing hypothesis. -/ | |
| lemma hasDistortion_iff_all_pairs {k : β} (f : Vertex k β X) (D s : β) : | |
| HasDistortion k f D s β 0 < s β§ β u v, | |
| s*distance k u v β€ βf u-f vβ β§ βf u-f vβ β€ D*s*distance k u v := by | |
| constructor | |
| Β· exact fun h => h.2 | |
| Β· rintro β¨hs,hβ© | |
| have hh := (h (endpoint k (baseEdge k) false) (endpoint k (baseEdge k) true)).1.trans | |
| (h (endpoint k (baseEdge k) false) (endpoint k (baseEdge k) true)).2 | |
| rw [distance_edge] at hh | |
| have hp : 0 < s*(1/(2:β)^k) := by positivity | |
| have hD : 1 β€ D := (mul_le_mul_iff_leftβ hp).mp (by calc | |
| (1:β)*(s*(1/(2:β)^k)) = s*(1/(2:β)^k) := one_mul _ | |
| _ β€ D*s*(1/(2:β)^k) := hh | |
| _ = D*(s*(1/(2:β)^k)) := by ring) | |
| exact β¨hD,hs,hβ© | |
| end Diamond | |
| theorem headline_all_pairs : | |
| (β (k : β) (f : Diamond.Vertex k β ForestDual) (D s : β), | |
| 0 < s β (β u v,s*Diamond.distance k u v β€ βf u-f vβ β§ | |
| βf u-f vβ β€ D*s*Diamond.distance k u v) β 1+(k:β)/4 β€ D^2) β§ | |
| (β (k : β) (f : Diamond.Vertex k β InfinitePredual) (D s : β), | |
| 0 < s β (β u v,s*Diamond.distance k u v β€ βf u-f vβ β§ | |
| βf u-f vβ β€ D*s*Diamond.distance k u v) β 1+(k:β)/4 β€ D^2) := by | |
| constructor | |
| Β· intro k f D s hs h | |
| exact headline.1 k f D s ((Diamond.hasDistortion_iff_all_pairs f D s).mpr β¨hs,hβ©) | |
| Β· intro k f D s hs h | |
| exact headline.2 k f D s ((Diamond.hasDistortion_iff_all_pairs f D s).mpr β¨hs,hβ©) | |
| theorem direct_atomic_obstruction_positive : | |
| Β¬ β D : β,β k : β,1 β€ k β β (f : Diamond.Vertex k β ForestDual) (s : β), | |
| 0 < s β§ β u v,s*Diamond.distance k u v β€ βf u-f vβ β§ | |
| βf u-f vβ β€ D*s*Diamond.distance k u v := by | |
| rintro β¨D,hβ© | |
| obtain β¨n,hnβ© := exists_nat_gt (4*D^2) | |
| obtain β¨f,s,hs,hfβ© := h (n+1) (by omega) | |
| have hh := headline_all_pairs.1 (n+1) f D s hs hf | |
| push_cast at hh | |
| nlinarith | |
| end DiamondDistortion | |
| end | |
| end OAI | |