#9337: Add toric divisors
----------------------------------+-----------------------------------------
Reporter: vbraun | Owner: AlexGhitza
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-4.6
Component: algebraic geometry | Keywords:
Author: Volker Braun | Upstream: N/A
Reviewer: Andrey Novoseltsev | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
Comment(by novoselt):
1. OK, let's leave it as is as the simplest solution. I have already added
an exception message complaining that the divisor is not QQ-Cartier if the
function fails, but it still works peacefully for cones for which it is
possible to find m.
2. I thought about using (...) or {...}, but that does not quite
distinguish divisors from complicated polynomial expressions on the one
hand and (x) will not be used in a traditional sense of a principal
divisor when, say, only `x^3` defines a valid function. I'd say that the
standard in toric geometry is to have different names for ray generators,
variables, and divisors, but have the same index on the corresponding
ones, like u_i, z_i, D_i. We don't have any special notation for rays (and
I don't see any reason to have it), the standard variables are zi's, and
that would suggest using Di's for divisors, but that may not work very
good with customized names for coordinates, like (x,y,z) for P2 (Dx may
look fine, but will not typeset nicely and Dalpha will be even worse). So
I am still thinking about something like:
* users have no control over divisor names
* if coordinate names are constructed in the standard manner with
indices, corresponding divisors are called D0, D1, etc.
* if coordinate names are given explicitly, divisors get `D` prefix for
printing and `D_{...}` for latexing (I think it is possible to have them
different)
* we keep an internal polynomial ring (say, `_divisor_ring`) for these
purposes, but don't expose it to the user
* there is a command like `inject_divisors` that defines names
corresponding to this divisors, but not as polynomials: D1 gets associated
with `ToricDivisor(X, 1)` which is still a formal sum and users cannot do
multiplication of such things etc.
* alternatively, instead of messing with extra rings, we put the entire
naming algorithm into `_repr_` and `_latex_` of toric divisors - these
methods don't have to be fast/cached or anything, people are slower anyway
;-) I think I actually prefer this variant.
Note that you actually did use names like `Dx, Dy, ...` in the very first
example of your toric divisors module. So these names are natural, and it
is convenient to have them different from homogeneous coordinates because
you are likely to use both in the same time. Yet another advantage of this
form compared to some kind of decorators like ()/{} is that Dx is a valid
name and so you can have the same notation in the code and in the output.
I think that
{{{
sage: x
x
sage: Dx
Dx
}}}
looks better than
{{{
sage: x
x
sage: Dx
(x)
sage: (x)
x
}}}
5. Touché! ;-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9337#comment:26>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.