Repository navigation
feat: face lattice of a polytope is graded by the dimension of the face #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,16 +7,18 @@ module | |
|
|
||
| public import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Polytope.Lattice | ||
| public import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Set.Face.Homogenization | ||
| public import Mathlib.Order.Grade | ||
|
|
||
| import Polyhedral.Mathlib.Geometry.Convex.Cone.Pointed.Finite.Face.Grade | ||
| import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Polytope.Homogenization | ||
| import Polyhedral.Mathlib.Order.WithBot | ||
|
|
||
| /-! This file proves results about faces of polytopes by transporting results from FG | ||
| cones along a homogenization. -/ | ||
|
|
||
| public section | ||
|
|
||
| variable {R V A : Type*} | ||
| variable {R V W A : Type*} | ||
|
|
||
| open Convexity ConvexSet Affine | ||
|
|
||
|
|
@@ -44,21 +46,50 @@ include V in | |
| instance {P : Polytope R A} : CoeOut (Face (P : ConvexSet R A)) (Polytope R A) where | ||
| coe F := ⟨_, IsPolytope.face_isPolytope P.isPolytope F.isFaceOf⟩ | ||
|
|
||
| include V in | ||
| /-- The face lattice of a polytope as a graded order with grading given by the dimensions of | ||
| homogenization cones. | ||
| instance {P : Polytope R A} (F : Face (P : ConvexSet R A)) : | ||
| Module.Finite R (vectorSpan R (F.toConvexSet : Set A)) := | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I read a bit more. I found it unnatural that there is vectorSpan all over the place. Why do you need that the vector span is finite dimensional? My guess is: because you use If so, this reinforced my believe the finite-dimensional issue needs to be solved first. |
||
| IsPolytope.finite_vectorSpan (IsPolytope.face_isPolytope P.isPolytope F.isFaceOf) | ||
|
|
||
| This is private since it does not yet have the correct grading (off-by-one). | ||
| -/ | ||
| private noncomputable instance Polytope.faceHomogenizationGradeOrder (P : Polytope R A) : | ||
| GradeOrder ℕ (Face (P : ConvexSet R A)) := by | ||
| let W := Homogenization R A | ||
| letI : ConvexSpace R W := ConvexSpace.ofModule | ||
| have : PointedCone.FG (homogenize W (P : ConvexSet R A)) := | ||
| IsPolytope.homogenize_fg (W := W) P.isPolytope | ||
| let := PointedCone.FG.gradeOrder_finrank this | ||
| refine GradeOrder.liftRight (β := (homogenize W (P : ConvexSet R A)).Face) _ | ||
| IsHomogenization.Face.homogenizeIso.strictMono ?_ | ||
| exact fun x y ↦ (apply_covBy_apply_iff _).mpr | ||
| /-- The face lattice of a polytope is graded by the dimension of the affine span of each face, | ||
| with the empty face receiving the grade `⊥`. -/ | ||
| noncomputable instance (P : Polytope R A) : | ||
| GradeMinOrder (WithBot ℕ) (Face (P : ConvexSet R A)) where | ||
| grade F := (affineSpan R F.carrier).finDim | ||
| grade_strictMono x y h := by | ||
| let : ConvexSpace R (Homogenization R A) := ConvexSpace.ofModule | ||
| simp only [Face.carrier_eq_coe, Face.coe_eq_toConvexSet_coe, | ||
| finDim_affineSpan_eq_pred_finrank_homogenize (Homogenization R A)] | ||
| refine Order.pred_lt_pred_of_not_isMin ?_ (by simp) | ||
| exact_mod_cast PointedCone.FG.finrank_strictMono (IsPolytope.homogenize_fg P.isPolytope) | ||
| (IsHomogenization.Face.homogenizeIso.strictMono h) | ||
| covBy_grade x y h := by | ||
| let : ConvexSpace R (Homogenization R A) := ConvexSpace.ofModule | ||
| have := PointedCone.FG.finrank_covBy (IsPolytope.homogenize_fg P.isPolytope) | ||
| ((apply_covBy_apply_iff | ||
| (IsHomogenization.Face.homogenizeIso (W := Homogenization R A))).mpr h) | ||
| have : (homogenize (Homogenization R A) x.toConvexSet).finrank + 1 | ||
| = (homogenize (Homogenization R A) y.toConvexSet).finrank := | ||
| Nat.covBy_iff_add_one_eq.mp this | ||
| simp only [Face.carrier_eq_coe, Face.coe_eq_toConvexSet_coe, | ||
| finDim_affineSpan_eq_pred_finrank_homogenize (Homogenization R A), ← this] | ||
| exact Order.succ_eq_iff_covBy.mp (by simp) | ||
| isMin_grade f h := by simp [isMin_iff_eq_bot.mp h] | ||
|
|
||
| section Homogenization | ||
|
|
||
| variable [AddCommGroup W] [Module R W] [hom : IsHomogenization R A W] | ||
|
|
||
| variable (W) in | ||
| theorem Polytope.grade_eq_pred_finrank_homogenize {P : Polytope R A} | ||
| (f : Face (P : ConvexSet R A)) : | ||
| GradeOrder.grade f = Order.pred ((homogenize W f.toConvexSet).finrank : WithBot ℕ) := | ||
| finDim_affineSpan_eq_pred_finrank_homogenize .. | ||
|
|
||
| theorem Polytope.succ_grade_eq_finrank_homogenize {P : Polytope R A} | ||
| (f : Face (P : ConvexSet R A)) : | ||
| Order.succ (GradeOrder.grade f : WithBot ℕ) = (homogenize W f.toConvexSet).finrank := by | ||
| rw [Polytope.grade_eq_pred_finrank_homogenize W, Order.succ_pred_of_not_isMin (by simp)] | ||
|
|
||
| end Homogenization | ||
|
|
||
| end Field | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /- | ||
| Copyright (c) 2026 Vlad Tsyrklevich. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Vlad Tsyrklevich | ||
| -/ | ||
|
|
||
| module | ||
|
|
||
| public import Mathlib.Algebra.Order.SuccPred.WithBot | ||
| public import Mathlib.Data.Nat.SuccPred | ||
| public import Mathlib.Order.SuccPred.WithBot | ||
| public import Mathlib.Order.WithBot | ||
|
|
||
| /-! WithBot lemmas -/ | ||
|
|
||
| public section | ||
|
|
||
| namespace WithBot | ||
|
|
||
| theorem natCast_orderSucc (a : ℕ) : Nat.cast (Order.succ a) = Order.succ (a : WithBot ℕ) := | ||
| WithBot.orderSucc_coe _ | ||
|
|
||
| @[simp] | ||
| theorem pred_natCast_add_one (a : ℕ) : Order.pred ((a : WithBot ℕ) + 1) = a := by | ||
| rw [← Nat.cast_succ, ← Nat.succ_eq_succ, natCast_orderSucc] | ||
| simp | ||
|
|
||
| end WithBot |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see here several useful intermediate/related results: