[ToricVarieties] Assert coordinate names from cox ring #4240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The serialization of toric varieties remembers the Cox ring, but not the coordinate names. This leads to unexpected/inconsistent behavior. Here is an example:
CRUCIAL: Close your julia session and then proceed as follows:
The ideal of linear relations is not homogeneous w.r.t. the grading of the Cox ring and so does not "live" in the Cox ring. Yet, the geometric meaning of the ideal of linear relations makes it beneficial to employ the same variables names as used in the Cox ring.
You can see that the root cause for this behavior is the call to
coordinate_names
in the implementation ofideal_of_linear_relations
:I propose to fix this by checking in the
coordinate_names
function if the attributecox_ring
is known for the toric variety, and if so to use the names of the indeterminates ofcox_ring
as return value forcoordinate_names
.Certainly, we could also serialize the
coordinate_names
for any toric variety. This have its benefits, but there are has at least two draw-backs:What are your thoughts @lkastner @antonydellavecchia?