id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
17197 document Polyhedron defined over number field Mark Bell "As reported in this google group (https://groups.google.com/forum/#!topic/sage-support/ew0bnGzjm98), it was not possible to create Polyhedron defined over number fields. Now that #17830 is merged it does work and it should be documented and even advertised in the documentation!
---------
from the previous report:
To create polyhedra quickly, the final suggestion in the Polyhedron documentation (http://www.sagemath.org/doc/reference/geometry/sage/geometry/polyhedron/constructor.html#base-rings) is to work in a set number field. Although this appears to work for setting vertices, it does not appear to work for lines (or rays).
For example:
{{{
sage: var('x')
x
sage: K. = NumberField(x^2-3, embedding=1.732)
sage: P = Polyhedron(lines=[(1,sqrt3)])
sage: P
A 1-dimensional polyhedron in (Number Field in sqrt3 with defining polynomial x^10 + x^2 - 3)^2 defined as the convex hull of 1 vertex and 2 rays
sage: P.rays()
(A ray in the direction (0, -sqrt3), A ray in the direction (1, sqrt3))
}}}
This should be compared with:
{{{
sage: P = Polyhedron(lines=[(1, sqrt(3))])
sage: P
A 1-dimensional polyhedron in (Symbolic Ring)^2 defined as the convex hull of 1 vertex and 1 line
}}}
and
{{{
sage: P = Polyhedron(lines=[(1, sqrt(3))], base_ring=AA)
sage: P
A 1-dimensional polyhedron in AA^2 defined as the convex hull of 1 vertex and 1 line
}}}
Additionally, how can a ""1-dimensional polyhedron"" be ""defined as the convex hull of 1 vertex and 2 rays""?
As pointed out below this is an issue with Polyhedron using a number fields < comparison
{{{
sage: K. = NumberField(x^3 - 1001, embedding=10)
sage: x > x + 1
True
}}}" defect needs_work major sage-7.4 number theory Polyhedron, Number field Frédéric Chapoton Jean-Philippe Labbé Jakob Kroeker N/A #21105