-
-
Notifications
You must be signed in to change notification settings - Fork 552
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 library of toric varieties #9245
Comments
Attachment: named_toric_varieties.py.gz Initial patch |
comment:1
I think all fans should have With these tweaks there should be no need for pickling as everything should be fast enough anyway (and pickled objects are not allowed into the Sage tarball anymore, so either we will need to have an spkg constructing them, or will have to save them on the first run). The last five names are very cryptic, but I suppose it can be OK, if they are eventually described in the docstring. |
comment:2
I agree about disabling checks eventually, but for now I think its good to catch potential bugs elsewhere. Instead of repurposing |
comment:3
Replying to @vbraun:
Good point!
OK!
That can make things fragile and lead to extra works of putting rays into proper spaces and making them immutable. That's exactly what It may be a good idea to keep a dictionary of these named varieties, so that repetitive calls to, say, |
comment:4
Since all of the named toric varieties seem to have valid Python identifiers for names, it seems more consistent to follow the interfaces of named graphs.
You could have something like
|
Author: Volker Braun |
comment:5
I've taken mhansen's advice and rewrote the patch accordingly. Now has 100% documentation and tests, and adds itself to The variable |
comment:6
I like the general organization of the current patch, but names are still a bit strange. Especially Also technical detail about the posted patch file itself: it seems that it is taken directly from the queue and lacks some header information, including the commit message. |
comment:7
Now with commit message. What is the recommended way of extracting a patch from the Mercurial queue?
|
Attachment: trac_9245_named_toric_varieties.py.gz Improved patch |
This comment has been minimized.
This comment has been minimized.
comment:8
Replying to @vbraun:
I am not sure. I always put the patch in question on the top, then run Sage and use |
This comment has been minimized.
This comment has been minimized.
Reviewer: Andrey Novoseltsev |
comment:10
It probably makes sense to return |
This comment has been minimized.
This comment has been minimized.
comment:11
Agree! I'll make the changes later today. |
comment:12
One potential drawback to be aware of: for CPR-Fano toric varieties rays will have to be given as indices of points of the corresponding lattice polytope with vertices in front. You do have control over the order of vertices, but points are listed in the way in which PALP returns them. Of course, it matters only for (partially) resolved varieties, when you do need to have rays corresponding to points. |
This comment has been minimized.
This comment has been minimized.
comment:13
Here is the new patch. The |
comment:14
should be replaced with
|
comment:15
Thanks, good catch... I was somehow under the impression that the dict sorts by keys. In any case, your solution is cleaner. My reason for splitting off the ray/cones data into a separate structure was that one could use it to reverse lookup a toric variety. The first step would be to check the "combinatorial" isomorphism of the cones, and only later the slower "lattice" isomorphism of the fan. For the coordinate names, on the other hand, we don't need a fast way to list them all, so that data can just stay in the individual methods. |
comment:16
Refreshed patch to work correctly with the final version of the |
Attachment: trac_9245_named_toric_varieties.patch.gz Updated patch |
comment:17
It will make the compiled documentation more informative.
Let me know what you think! |
comment:18
|
comment:19
I'm fine with your remaining comments. |
comment:20
I have already though about it quite a bit and I think that we should just explain in the documentation of all relevant functions that the base field is considered to be complex no matter what it actually is. I wrote some comments about it in the beginning of Changing the default base field to Another issue is with "parameters" - for example, generic anticanonical hypersurfaces are realized as subschemes of toric varieties over things like Frac(QQ[a1, a2, a3]). I am not aware of a better representaion in Sage when I need to keep some coefficients undetermined (and I do need it almost always, usually I switch to all-numbers only for analysis of singularities). My original plan was even to allow working over polynomial rings and use integers as default, since it may be faster, but that seems to be too much of a deviation from real life. To summarize - I think that |
comment:21
Note: Updated patch follows. |
Attachment: trac_9245_named_toric_varieties.2.patch.gz Updated patch |
comment:22
Looks great! Just a couple more little picks:
The second point is optional, if "An instance of toric variety." is exactly what you want, it is OK with me. |
comment:23
Hmm... Now that the choice of rays and coordinates is nicely shown:
|
comment:24
I settled on "INPUT: A toric variety" since I like articles... I also beautified some coordinate choices. Finally, new methods |
Attachment: trac_9245_named_toric_varieties.3.patch.gz Updated patch |
Attachment: trac_9245_toric_library_reviewer.patch.gz |
comment:25
I have added extra checks to constructors with parameters and made I have also put (-1,-1,-1) as the last ray of All tests pass for me on 4.5.alpha1, positive review once you approve (hopefully ;-)) my patch! |
comment:26
looks good to me! |
comment:27
I've merged
into 4.5.2.alpha0. |
Merged: sage-4.5.2.alpha0 |
Here is some initial shot at constructing toric varieties "by name". It might be useful to write doctests for the toric varieties. We construct the fans from generating cones and store them in a dictionary to expedite repeated requests.
This patch relies on
CC: @novoselt
Component: algebraic geometry
Author: Volker Braun
Reviewer: Andrey Novoseltsev
Merged: sage-4.5.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/9245
The text was updated successfully, but these errors were encountered: