Download data/lean/ComparatorChallenges/AffineBernstein.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/AffineBernstein.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/ComparatorChallenges/AffineBernstein.lean
-
curl -L -o AffineBernstein.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/AffineBernstein.lean
4.07 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open Set MeasureTheory | |
| open scoped BigOperators ContDiff ENNReal | |
| namespace AffineBernstein | |
| abbrev Space (n : β) := EuclideanSpace β (Fin n) | |
| def coordinateVector (n : β) (i : Fin n) : Space n := | |
| EuclideanSpace.single i 1 | |
| /-- Coordinate Hessian. On the open domain it depends only on the restriction of `u`. | |
| The order of the two differentiations is immaterial under the smoothness hypothesis. -/ | |
| def hessian {n : β} (u : Space n β β) (x : Space n) : Matrix (Fin n) (Fin n) β := | |
| fun i j => fderiv β (fun y => fderiv β u y (coordinateVector n j)) x | |
| (coordinateVector n i) | |
| /-- The coefficient U^{ij} = det(DΒ²u) (DΒ²u)^{-1}_{ij}. -/ | |
| def cofactorHessian {n : β} (u : Space n β β) (x : Space n) : | |
| Matrix (Fin n) (Fin n) β := | |
| (hessian u x).det β’ (hessian u x)β»ΒΉ | |
| /-- The classical determinant weight; in particular, this is not a generalized exponent. -/ | |
| def affineWeight {n : β} (u : Space n β β) (x : Space n) : β := | |
| Real.rpow (hessian u x).det (-(((n : β) + 1) / ((n : β) + 2))) | |
| def AffineMaximalOn {n : β} (Ξ© : Set (Space n)) (u : Space n β β) : Prop := | |
| β x β Ξ©, β i : Fin n, β j : Fin n, | |
| cofactorHessian u x i j * hessian (affineWeight u) x i j = 0 | |
| /-- Length on [0,1] for g_x(v,v) = βvβΒ² + (Du_x v)Β², the metric induced | |
| by the Euclidean graph embedding x β¦ (x,u(x)). The product norm on Lean's ordinary | |
| product type is NOT used (it would be the maximum norm). -/ | |
| def graphPathLength {n : β} (u : Space n β β) (Ξ³ : β β Space n) : ββ₯0β := | |
| β«β» t in Icc (0 : β) 1, | |
| ENNReal.ofReal (Real.sqrt | |
| (βderivWithin Ξ³ (Icc (0 : β) 1) tβ ^ 2 + | |
| (fderiv β u (Ξ³ t) (derivWithin Ξ³ (Icc (0 : β) 1) t)) ^ 2)) | |
| /-- The intrinsic extended distance: infimum of lengths of CΒΉ paths in the domain. | |
| Using a single CΒΉ path gives the same intrinsic distance as piecewise CΒΉ paths, | |
| by smooth endpoint reparameterization and concatenation. -/ | |
| def graphEDist {n : β} (Ξ© : Set (Space n)) (u : Space n β β) | |
| (x y : Space n) : ββ₯0β := | |
| β¨ (Ξ³ : β β Space n) | |
| (_ : ContDiffOn β 1 Ξ³ (Icc (0 : β) 1)) | |
| (_ : MapsTo Ξ³ (Icc (0 : β) 1) Ξ©) | |
| (_ : Ξ³ 0 = x) (_ : Ξ³ 1 = y), graphPathLength u Ξ³ | |
| /-- Sequential completeness for the induced Euclidean path metric. This states | |
| that every intrinsic Cauchy sequence of points in Ξ© has an intrinsic limit in Ξ©. | |
| It imposes no growth condition and no completeness condition on the affine metric. -/ | |
| def EuclideanGraphComplete {n : β} (Ξ© : Set (Space n)) (u : Space n β β) : Prop := | |
| β x : β β Space n, (β i, x i β Ξ©) β | |
| (β Ξ΅ : β, 0 < Ξ΅ β β N : β, β i β₯ N, β j β₯ N, | |
| graphEDist Ξ© u (x i) (x j) < ENNReal.ofReal Ξ΅) β | |
| β a β Ξ©, β Ξ΅ : β, 0 < Ξ΅ β β N : β, β i β₯ N, | |
| graphEDist Ξ© u (x i) a < ENNReal.ofReal Ξ΅ | |
| /-- The graph, regarded as an affine subset of R^{n+1}. -/ | |
| def graph {n : β} (Ξ© : Set (Space n)) (u : Space n β β) : Set (Space n Γ β) := | |
| {p | p.1 β Ξ© β§ p.2 = u p.1} | |
| def standardParaboloid (n : β) : Set (Space n Γ β) := | |
| {p | p.2 = β i : Fin n, (p.1 i) ^ 2} | |
| /-- Literal main theorem, with its stated affine-image consequence. -/ | |
| theorem affine_bernstein | |
| (n : β) (hnβ : 3 β€ n) (hnβ : n β€ 9) | |
| (Ξ© : Set (Space n)) (hΞ©ne : Ξ©.Nonempty) (hΞ©open : IsOpen Ξ©) | |
| (hΞ©convex : Convex β Ξ©) (u : Space n β β) | |
| (hu : ContDiffOn β β u Ξ©) | |
| (hpos : β x β Ξ©, (hessian u x).PosDef) | |
| (hmax : AffineMaximalOn Ξ© u) | |
| (hcomplete : EuclideanGraphComplete Ξ© u) : | |
| Ξ© = univ β§ | |
| (β (A : Matrix (Fin n) (Fin n) β) (b : Space n) (c : β), | |
| A.IsSymm β§ A.PosDef β§ | |
| β x, u x = (1 / 2 : β) * (β i : Fin n, β j : Fin n, x i * A i j * x j) | |
| + (β i : Fin n, b i * x i) + c) β§ | |
| (β e : (Space n Γ β) βα΅[β] (Space n Γ β), | |
| e '' standardParaboloid n = graph Ξ© u) := by | |
| sorry | |
| end AffineBernstein | |
| end | |
| end OAI | |