-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Implement dual subdivision and weight vectors for tropical variety #38536
Conversation
Documentation preview for this PR (built with commit 99e8af5; changes) is ready! 🎉 |
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.
Sorry for taking so long to get to this. Here are my comments.
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 think this is all of them that you did not change the case. Please be sure to run the doctests before pushing it.
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.
Thank you. A few other little changes. This should be the last round.
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.
Also, the bot is reporting that the doc is not building. Have you checked locally?
sage: R.<x,y> = PolynomialRing(T) | ||
sage: p1 = R(3) + R(2)*x + R(2)*y + R(3)*x*y + x^2 + y^2 | ||
sage: p1.dual_subdivision() | ||
Polyhedral complex with 4 maximal cells |
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.
You should have it also display the maximal cell polytopes in this complex (with their explicit data) and also below.
The html doc builds properly locally, but the pdf does not. I am still figuring out where the error is. |
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.
This might fix the pdf docbuild issue; that can be more strict with the type of object linked. Other than that, I don't see any latex or formatting issues.
@@ -1103,9 +1611,29 @@ def plot(self): | |||
T = TropicalSemiring(QQ) | |||
R = PolynomialRing(T, ('x,y')) | |||
x, y = R.gen(), R.gen(1) | |||
p2 = x**6 + R(4)*x**4*y**2 + R(2)*x**3*y**3 + R(3)*x**2*y**4 + \ | |||
x*y**5 + R(7)*x**2 + R(5)*x*y + R(3)*y**2 + R(2)*x + y + R(10) | |||
p2 = (x**6 + R(4)*x**4*y^2 + R(2)*x**3*y**3 + R(3)*x**2*y**4 |
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.
p2 = (x**6 + R(4)*x**4*y^2 + R(2)*x**3*y**3 + R(3)*x**2*y**4 | |
p2 = (x**6 + R(4)*x**4*y**2 + R(2)*x**3*y**3 + R(3)*x**2*y**4 |
Missed ^
to **
.
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.
Thank you. That fixed the docbuilding. Positive review.
…ropical variety <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> This PR introduces some new methods in `TropicalVariety` related to dual subdivision and weight vectors. ### Summary of changes: 1. Add `dual_subdivision` in `TropicalVariety`: return the dual subdivision for any tropical variety as a Graph object 2. Add `_components_of_vertices` in `TropicalCurve`: intermediate method the help calculate weight vectors 3. Add `weight_vectors` in `TropicalCurve`: return the weight vectors of each vertex 4. Add `weight_vectors` in `TropicalSurface`: return the weight vectors of each unique line of intersection 5. Add a few methods related to dual subdivision of tropical curve such as: - `is_smooth` - `is_simple` - `genus` - `contribution` CC: @tscrim ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies sagemath#37962: issues related to this PR sagemath#38291: continuation of this PR URL: sagemath#38536 Reported by: Verrel Rievaldo Wijaya Reviewer(s): Travis Scrimshaw, Verrel Rievaldo Wijaya
This PR introduces some new methods in
TropicalVariety
related to dual subdivision and weight vectors.Summary of changes:
Add
dual_subdivision
inTropicalVariety
: return the dual subdivision for any tropical variety as a Graph objectAdd
_components_of_vertices
inTropicalCurve
: intermediate method the help calculate weight vectorsAdd
weight_vectors
inTropicalCurve
: return the weight vectors of each vertexAdd
weight_vectors
inTropicalSurface
: return the weight vectors of each unique line of intersectionAdd a few methods related to dual subdivision of tropical curve such as:
is_smooth
is_simple
genus
contribution
CC: @tscrim
📝 Checklist
⌛ Dependencies
#37962: issues related to this PR
#38291: continuation of this PR