#8986: Add support for convex rational polyhedral cones
----------------------------------+-----------------------------------------
Reporter: novoselt | Owner: mhampton
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.4.4
Component: geometry | Keywords:
Author: Andrey Novoseltsev | Upstream: N/A
Reviewer: Volker Braun | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
Comment(by novoselt):
Well, I am still against exceptions, however I have just checked this:
{{{
sage: F5 = GF(5)
sage: F7 = GF(7)
sage: 2 == F5(2)
True
sage: 2 == F7(2)
True
sage: F5(2) == F7(2)
False
}}}
So, since I like so much to invoke consistency reasons in my arguments, I
retract my first reaction on 2) in your proposal. I think I will try to
allow coercion of `ZZ^n` to any toric lattice of dimension `n`, but not
backwards. Explicit casting from lattices to `ZZ^n` will be possible, but
to go between two different toric lattices one will have to create a
homomorphism or use double casting, i.e. I think that M(N(1,1)) should
throw a `TypeError`. So the code from your comment will work like this:
{{{
sage: M = N.dual()
sage: M(1,0,0) == N(1,0,0) # this should raise an error - NO, RETURN
FALSE
False
sage: (1,0,0) == N(1,0,0) # should probably return true - YES
False
sage: M(1,0,0) == (1,0,0) # should probably return true as well - YES
False
sage: (1,0,0) == (1,0,0) # works as expected - YES
True
sage: (1,0,0) in octant.rays() # this should return true - YES
False
sage: M(1,0,0) in octant.rays() # this should definitely raise an error -
NO, RETURN FALSE
False
}}}
I think this way it's OK to be sloppy about lattices, especially if one
just does not care about them. If one uses the very last command, then
clearly (s)he is aware of toric lattices and should be able to interpret
this `False` correctly.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8986#comment:10>
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.