Skip to content

Unbundle convexset - #112

Draft
ooovi wants to merge 41 commits into
mainfrom
unbundle_convexset
Draft

ooovi wants to merge 41 commits into
mainfrom
unbundle_convexset

Conversation

@ooovi

@ooovi ooovi commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

attempting to remove bundled convex sets. wip, some renaming and moving of lemmas needs to be done. wdyt?

  • IsFaceOf is just extreme subsets
  • the lattice Face requires both face and faced set to be convex (otherwise its not very interesting and we'd need to define this lattice anyways for homogenization)
  • homogenize and dehomognize are both defined on general sets. in particular, we need the assumption of convexity for dehomogenize ℋ (homogenize ℋ P) = P. the order equivalence becomes
    {s : Set A // IsConvexSet R s} ≃o Set.Iic ℋ.weight.positive
    

@ooovi
ooovi requested a review from martinwintermath October 7, 2026 15:27
Comment thread Polyhedral/Mathlib/Geometry/Convex/Cone/Pointed/Convexity.lean
Comment thread Polyhedral/Mathlib/Geometry/Convex/ConvexSpace/Polytope/Face.lean Outdated
Comment thread Polyhedral/Mathlib/Geometry/Convex/ConvexSpace/Set/Face/Basic.lean Outdated
Comment on lines -52 to -56
@[ext] theorem ext {F₁ F₂ : Face P} (h : ∀ x, x ∈ F₁ ↔ x ∈ F₂) : F₁ = F₂ := SetLike.ext h

@[simp] theorem coe_eq_toConvexSet_coe {F : Face P} : (F : Set M) = F.toConvexSet :=
SetLike.ext'_iff.mp rfl

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these no longer needed? :o

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first should be generated by @[ext] annotation on structure Face, the second because Face does no longer coerce to ConvexSet but to Set now

Comment thread Polyhedral/Mathlib/Geometry/Convex/ConvexSpace/Set/Face/Lattice.lean Outdated
Comment thread Polyhedral/Mathlib/LinearAlgebra/AffineSpace/AffineSubspace/Basic.lean Outdated
structure Face (P : ConvexSet R M) extends toConvexSet : ConvexSet R M where
isFaceOf : IsFaceOf toConvexSet P
@[ext]
structure Face {p : Set M} (P : IsConvexSet R p) where

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
structure Face {p : Set M} (P : IsConvexSet R p) where
structure Face {p : Set M} where

This seems unneccesary.

namespace IsConvexSet

/- NOTE: maybe this should be defined on `Set` instead of `ConvexSet`. -/
/-- A face of a convex set `P`. Represents the face lattice of `P`. -/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/-- A face of a convex set `P`. Represents the face lattice of `P`. -/
/-- A face of a set `P`. This type also represents the face lattice of `P`. -/


variable (ℋ : Affine.IsHomogenization R A W)

/-- The homogenization cone of a convex set in an affine space. -/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/-- The homogenization cone of a convex set in an affine space. -/
/-- The homogenization cone of a set in an affine space. -/

toFun K := ⟨_, K.homogenize_le_weight_positive _⟩
invFun C := dehomogenize ℋ C.1
left_inv K := dehomogenize_homogenize _ K
def homogenizeOrderEquiv : {s : Set A // IsConvexSet R s} ≃o Set.Iic ℋ.weight.positive where

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This order equiv is a valid use case of ConvexSet, it should not be rewritten without it.

@@ -0,0 +1,260 @@
/-

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant his file be a separate PR? (updated to current mathlib PR version).


public import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Polytope.Lattice
public import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Polyhedron.Basic
public import Polyhedral.Mathlib.Geometry.Convex.ConvexSpace.Set.Lattice

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why this import became necessary?


@[simp] theorem mk_eq {s h} : (⟨s, h⟩ : Polytope R X) = s := by ext; simp

instance : Coe (Polytope R X) (ConvexSet R X) where

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete this.


instance : IsConcreteNeg (Polytope R X) X := ⟨fun _ => rfl⟩

instance : InvolutiveNeg (ConvexSet R X) := .ofSetLike ..

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete this, but ConvexSet should have been Polytope (apparently this was an oversight in the earlier version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants