Download data/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.17 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean
-
curl -L -o SimplexFacets.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionBody/SimplexFacets.lean
3.17 kB
| import OAI.Geometry.ProjectionBody.ConvexGeometry | |
| import OAI.Geometry.ProjectionBody.FacetCover | |
| import Mathlib.Analysis.InnerProductSpace.Projection.Basic | |
| namespace OAI | |
| noncomputable section | |
| open Set | |
| namespace ProjectionCounterexample | |
| /-- Coordinate linear functional on the Euclidean space. -/ | |
| def coordinateFunctional {d : β} (i : Fin d) : E d ββ[β] β where | |
| toFun x := x i | |
| map_add' _ _ := rfl | |
| map_smul' _ _ := rfl | |
| @[simp] theorem coordinateFunctional_apply {d : β} (i : Fin d) (x : E d) : | |
| coordinateFunctional i x = x i := rfl | |
| /-- Outward defining functionals: the sum facet, then the coordinate facets. -/ | |
| def simplexFunctional (d : β) : Option (Fin d) β E d ββ[β] β | |
| | none => β i, coordinateFunctional i | |
| | some i => -coordinateFunctional i | |
| def simplexLevel {d : β} : Option (Fin d) β β | |
| | none => 1 | |
| | some _ => 0 | |
| @[simp] theorem simplexFunctional_none (d : β) (x : E d) : | |
| simplexFunctional d none x = β i, x i := by | |
| simp [simplexFunctional] | |
| @[simp] theorem simplexFunctional_some {d : β} (i : Fin d) (x : E d) : | |
| simplexFunctional d (some i) x = -x i := rfl | |
| theorem simplex_eq_halfspaceBody (d : β) : | |
| simplex d = halfspaceBody (simplexFunctional d) simplexLevel := by | |
| rw [simplex_eq_coordinates] | |
| ext x | |
| constructor | |
| Β· rintro β¨hx, hsβ© i | |
| cases i with | |
| | none => simpa [simplexLevel] using hs | |
| | some i => simpa [simplexLevel] using neg_nonpos.mpr (hx i) | |
| Β· intro hx | |
| constructor | |
| Β· intro i | |
| have := hx (some i) | |
| simpa [simplexLevel] using this | |
| Β· have := hx none | |
| simpa [simplexLevel] using this | |
| /-- Every nonzero direction has a visible defining facet of the simplex. -/ | |
| theorem simplex_has_positive_slope {d : β} {u : E d} (hu : u β 0) : | |
| β i, 0 < simplexFunctional d i u := by | |
| by_contra h | |
| have hall (i : Option (Fin d)) : simplexFunctional d i u β€ 0 := | |
| le_of_not_gt (fun hi => h β¨i, hiβ©) | |
| have hcoords (i : Fin d) : 0 β€ u i := by | |
| have := hall (some i) | |
| simpa using this | |
| have hsum : β i, u i = 0 := by | |
| apply le_antisymm | |
| Β· simpa using hall none | |
| Β· exact Finset.sum_nonneg fun i _ => hcoords i | |
| have hzero : β i : Fin d, u i = 0 := by | |
| simpa using (Finset.sum_eq_zero_iff_of_nonneg (fun i _ => hcoords i)).mp hsum | |
| apply hu | |
| ext i | |
| exact hzero i | |
| theorem simplex_functional_balance {d : β} (u : E d) : | |
| β i, simplexFunctional d i u = 0 := by | |
| simp [Fintype.sum_option, Finset.sum_neg_distrib] | |
| theorem simplex_absolute_slopes {d : β} (u : E d) : | |
| β i, |simplexFunctional d i u| = (β i, |u i|) + |β i, u i| := by | |
| simp [Fintype.sum_option, add_comm] | |
| theorem simplex_boundingFace_coordinate {d : β} (i : Fin d) : | |
| boundingFace (simplexFunctional d) simplexLevel (some i) = | |
| {x β simplex d | x i = 0} := by | |
| ext x | |
| simp [boundingFace, β simplex_eq_halfspaceBody, simplexLevel] | |
| theorem simplex_boundingFace_sum (d : β) : | |
| boundingFace (simplexFunctional d) simplexLevel none = | |
| {x β simplex d | β i, x i = 1} := by | |
| ext x | |
| simp [boundingFace, β simplex_eq_halfspaceBody, simplexLevel] | |
| end ProjectionCounterexample | |
| end | |
| end OAI | |