Skip to content
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

Add deformation cones and checking for regularity for Point Configurations and normal fans of Polyhedra #39496

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

jplab
Copy link

@jplab jplab commented Feb 11, 2025

In this pull request, we add the method deformation_cone (to point configurations and polyhedron) and is_polytopal (to fans).

This is related to the Kahler cone of Toric Varieties, but has some subtle differences to make it work as it should in the discrete geometry context. Therefore, it has a separate implementation.

TODO: In the future, perhaps it could be fusioned.

sage: tc = Polyhedron([(1, -1), (1/3, 1), (1, 1/3), (-1, 1), (-1, -1)])
sage: dc = tc.deformation_cone()
sage: dc.an_element()
(2, 1, 1, 0, 0)
sage: [_.A() for _ in tc.Hrepresentation()]
[(1, 0), (0, 1), (0, -1), (-3, -3), (-1, 0)]
sage: P = Polyhedron(rays=[(1, 0, 2), (0, 1, 1), (0, -1, 1), (-3, -3, 0), (-1, 0, 0)])
sage: P.rays()
(A ray in the direction (-1, -1, 0),
 A ray in the direction (-1, 0, 0),
 A ray in the direction (0, -1, 1),
 A ray in the direction (0, 1, 1),
 A ray in the direction (1, 0, 2))

sage: py = Polyhedron([(0, -1, -1), (0, -1, 1), (0, 1, -1), (0, 1, 1), (1, 0, 0)])
sage: dc_py = py.deformation_cone(); dc_py
A 4-dimensional polyhedron in QQ^5 defined as the convex hull of 1 vertex, 1 ray, 3 lines
sage: [ineq.b() for ineq in py.Hrepresentation()]
[0, 1, 1, 1, 1]
sage: r = dc_py.rays()[0]
sage: l1,l2,l3 = dc_py.lines()
sage: r.vector()-l1.vector()/2-l2.vector()-l3.vector()/2
(0, 1, 1, 1, 1)

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

@jplab jplab self-assigned this Feb 11, 2025
@jplab jplab requested a review from fchapoton February 11, 2025 17:57
@jplab
Copy link
Author

jplab commented Feb 11, 2025

I still need to add the method is_regular and is_projective... Will do very soon.

@jplab jplab added t: enhancement s: needs work c: geometry sd128 tickets of Sage Days 128 Le Teich labels Feb 11, 2025
@seblabbe
Copy link
Contributor

I made some changes to the code of is_regular. It is available in the branch of the same name in my github.

Copy link

github-actions bot commented Feb 12, 2025

Documentation preview for this PR (built with commit a69cabd; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

src/sage/geometry/fan.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants