| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
GroebnerFan
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
INPUT:
I -- ideal in a multivariate polynomial ring
is_groebner_basis -- bool (default False). if True, then
I.gens() must be a Groebner basis with
respect to the standard degree lexicographic
term order.
symmetry -- default: None; if not None, describes symmetries
of the ideal
verbose -- default: False; if True, printout useful info
during computations
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ, 3, order='lex')
sage: I = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y])
sage: G = I.groebner_fan(); G
Groebner fan of the ideal:
Ideal (x^2*y - z, -x + y^2*z, x*z^2 - y) of Multivariate Polynomial Ring in x, y, z over Rational Field
|
Describes the Groebner fan and its corresponding ideal.
EXAMPLES:
sage: R.<q,u> = PolynomialRing(QQ,2)
sage: gf = R.ideal([q-u,u^2-1]).groebner_fan()
sage: gf # indirect doctest
Groebner fan of the ideal:
Ideal (q - u, u^2 - 1) of Multivariate Polynomial Ring in q, u over Rational Field
|
Tests equality of Groeber fan objects.
EXAMPLES:
sage: R.<q,u> = PolynomialRing(QQ,2)
sage: gf = R.ideal([q^2-u,u^2-q]).groebner_fan()
sage: gf2 = R.ideal([u^2-q,q^2-u]).groebner_fan()
sage: gf.__eq__(gf2)
True
|
Return the ideal the was used to define this Groebner fan.
EXAMPLES:
sage: R.<x1,x2> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x1^3-x2,x2^3-2*x1-2]).groebner_fan()
sage: gf.ideal()
Ideal (x1^3 - x2, x2^3 - 2*x1 - 2) of Multivariate Polynomial Ring in x1, x2 over Rational Field
|
INPUT:
none
OUTPUT:
-- map from SAGE ring to gfan ring
-- map from gfan ring to SAGE ring
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan()
sage: G._gfan_maps()
(Ring morphism:
From: Multivariate Polynomial Ring in x, y, z over Rational Field
To: Multivariate Polynomial Ring in a, b, c over Rational Field
Defn: x |--> a
y |--> b
z |--> c,
Ring morphism:
From: Multivariate Polynomial Ring in a, b, c over Rational Field
To: Multivariate Polynomial Ring in x, y, z over Rational Field
Defn: a |--> x
b |--> y
c |--> z)
|
Return the ring in gfan's notation
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan()
sage: G._gfan_ring()
'Q[x, y, z]'
|
Return the ideal in gfan's notation.
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan()
sage: G._gfan_ideal()
'Q[x, y, z]{x^2*y-z,y^2*z-x,x*z^2-y}'
|
Return the multivariate polynomial ring.
EXAMPLES:
sage: R.<x1,x2> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x1^3-x2,x2^3-x1-2]).groebner_fan()
sage: gf.ring()
Multivariate Polynomial Ring in x1, x2 over Rational Field
|
A string of the reduced Groebner bases of the ideal as output by gfan.
EXAMPLES:
sage: R.<a,b> = PolynomialRing(QQ,2)
sage: gf = R.ideal([a^3-b^2,b^2-a-1]).groebner_fan()
sage: gf._gfan_reduced_groebner_bases()
'Q[a,b]{{b^6-1+2*b^2-3*b^4,a+1-b^2},{b^2-1-a,a^3-1-a}}'
|
Return the characteristic of the base ring.
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: i1 = ideal(x*z + 6*y*z - z^2, x*y + 6*x*z + y*z - z^2, y^2 + x*z + y*z)
sage: gf = i1.groebner_fan()
sage: gf.characteristic()
0
|
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ, 3, order='lex')
sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan()
sage: X = G.reduced_groebner_bases()
sage: len(X)
33
sage: X[0]
[z^15 - z, y - z^11, x - z^9]
sage: X[0].ideal()
Ideal (z^15 - z, y - z^11, x - z^9) of Multivariate Polynomial Ring in x, y, z over Rational Field
sage: X[:5]
[[z^15 - z, y - z^11, x - z^9],
[-y + z^11, y*z^4 - z, y^2 - z^8, x - z^9],
[-y^2 + z^8, y*z^4 - z, y^2*z^3 - y, y^3 - z^5, x - y^2*z],
[-y^3 + z^5, y*z^4 - z, y^2*z^3 - y, y^4 - z^2, x - y^2*z],
[-y^4 + z^2, y^6*z - y, y^9 - z, x - y^2*z]]
sage: R3.<x,y,z> = PolynomialRing(GF(2477),3)
sage: gf = R3.ideal([300*x^3-y,y^2-z,z^2-12]).groebner_fan()
sage: gf.reduced_groebner_bases()
[[z^2 - 12, y^2 - z, x^3 + 933*y],
[-y^2 + z, y^4 - 12, x^3 + 933*y],
[z^2 - 12, -300*x^3 + y, x^6 - 1062*z],
[-828*x^6 + z, -300*x^3 + y, x^12 + 200]]
|
Return the extra options to the gfan command that are used by
this object to account for working modulo a prime or in the
presence of extra symmetries.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x^3-y,y^3-x-1]).groebner_fan()
sage: gf._gfan_mod()
''
|
Returns the gfan output as a string given an input cmd; the
default is to produce the list of reduced Groebner bases in
gfan format.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x^3-y,y^3-x-1]).groebner_fan()
sage: gf.gfan()
'Q[x,y]
{{
y^9-1-y+3*y^3-3*y^6,
x+1-y^3}
,
{
y^3-1-x,
x^3-y}
,
{
y-x^3,
x^9-1-x}
}
'
|
Returns an iterator for the reduced Groebner bases.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: gf = R.ideal([x^3-y,y^3-x-1]).groebner_fan()
sage: a = gf.__iter__()
sage: a.next()
[y^9 - 3*y^6 + 3*y^3 - y - 1, -y^3 + x + 1]
|
Gets a reduced groebner basis
EXAMPLES;
sage: R4.<w1,w2,w3,w4> = PolynomialRing(QQ,4)
sage: gf = R4.ideal([w1^2-w2,w2^3-1,2*w3-w4^2,w4^2-w1]).groebner_fan()
sage: gf[0]
[w4^12 - 1, -1/2*w4^2 + w3, -w4^4 + w2, -w4^2 + w1]
|
Computes and returns a lexicographic reduced Groebner basis
for the ideal.
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: G = R.ideal([x - z^3, y^2 - x + x^2 - z^3*x]).groebner_fan()
sage: G.buchberger()
[-z^3 + y^2, -z^3 + x]
|
Returns a polyhedral fan object corresponding to the reduced
Groebner bases.
EXAMPLES:
sage: R3.<x,y,z> = PolynomialRing(QQ,3)
sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-1]).groebner_fan()
sage: pf = gf.polyhedralfan()
sage: pf.rays()
[[1, 0, 0], [0, 1, 0], [0, 0, 1]]
|
Return the homogeneity space of a the list of polynomials that
define this Groebner fan.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: H = G.homogeneity_space()
|
Render a Groebner fan as sage graphics or save as an xfig
file.
More precisely, the output is a drawing of the Groebner fan
intersected with a triangle. The corners of the triangle are
(1,0,0) to the right, (0,1,0) to the left and (0,0,1) at the
top. If there are more than three variables in the ring we
extend these coordinates with zeros.
INPUT:
file -- a filename if you prefer the output saved to a file.
This will be in xfig format.
shift -- shift the positions of the variables in
the drawing. For example, with shift=1,
the corners will be b (right), c (left),
and d (top). The shifting is done modulo
the number of variables in the polynomial
ring. The default is 0.
larger -- bool (default: False); if True, make
the triangle larger so that the shape of
of the Groebner region appears. Affects the xfig file
but probably not the sage graphics (?)
rgbcolor -- This will not affect the saved xfig file, only the sage graphics
produced.
polyfill -- Whether or not to fill the cones with a color determined by the highest degree in each reduced Groebner basis for that cone.
scale_colors -- if True, this will normalize color values to try to maximize the range
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.render()
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan()
sage: G.render(larger=True)
|
A simple utility function for converting a facet normal to an
inequality form.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2) # dummy stuff to get a gfan object
sage: gf = R.ideal([x^2+y,y^2]).groebner_fan()
sage: gf._cone_to_ieq([[1,2,3,4]])
[[0, 1, 2, 3, 4]]
|
Takes a 4-d vector and projects it onto the plane perpendicular
to (1,1,1,1). Stretches by a factor of 2 as well, since this is
only for graphical display purposes.
INPUT:
fpoint -- a list of four numbers
EXAMPLES:
sage: R.<x> = PolynomialRing(QQ,1) # dummy stuff to get a gfan object
sage: gf = R.ideal([x^2]).groebner_fan()
sage: gf._embed_tetra([1/2,1/2,1/2,1/2])
[0, 0, 0]
|
A utility function that takes a list of 4d polytopes, projects
them to 3d, and returns a list of edges.
INPUT:
polyhedral_data -- an object with 4d vertex and adjacency information
OUTPUT:
edges -- a list of edges in 3d - each list item is a pair of points
EXAMPLES:
sage: R4.<w,x,y,z> = PolynomialRing(QQ,4)
sage: gf = R4.ideal([w^2-x,x^2-y,y^2-z,z^2-1]).groebner_fan()
sage: g_cone = gf[0].groebner_cone()
sage: g_cone_facets = g_cone.facets()
sage: g_cone_ieqs = gf._cone_to_ieq(g_cone_facets)
sage: cone_data = ieq_to_vert(g_cone_ieqs,linearities=[[1,-1,-1,-1,-1]])
sage: cone_lines = gf._4d_to_3d(cone_data)
sage: cone_lines
[[[-3/5, -1/3, -1/5], [-1/7, 3/7, 5/7]], [[-3/5, -1/3, -1/5], [1, -1/3,
1/3]], [[-3/5, -1/3, -1/5], [1, 1, -1]], [[-1/7, 3/7, 5/7], [1, -1/3,
1/3]], [[-1/7, 3/7, 5/7], [1, 1, -1]], [[1, -1/3, 1/3], [1, 1, -1]]]
|
For a Groebner fan of an ideal in a ring with four variables,
this function intersects the fan with the standard simplex
perpendicular to (1,1,1,1), creating a 3d polytope, which is
then projected into 3 dimensions. The edges of this projected
polytope are returned as lines.
EXAMPLES:
sage: R4.<w,x,y,z> = PolynomialRing(QQ,4)
sage: gf = R4.ideal([w^2-x,x^2-y,y^2-z,z^2-x]).groebner_fan()
sage: three_d = gf.render3d()
|
Return various statistics about this Groebner fan.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G._gfan_stats()
{'Number of reduced Groebner bases': 3,
'Maximal total degree of a Groebner basis': 4,
'Dimension of homogeneity space': 0,
'Number of variables': 2,
'Minimal total degree of a Groebner basis': 2}
|
Return the dimension of the homogeneity space.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.dimension_of_homogeneity_space()
0
|
Return the maximal total degree of any Groebner basis.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.maximal_total_degree_of_a_groebner_basis()
4
|
Return the minimal total degree of any Groebner basis.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.minimal_total_degree_of_a_groebner_basis()
2
|
Return the number of reduced Groebner bases.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.number_of_reduced_groebner_bases()
3
|
Return the number of variables.
EXAMPLES:
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.number_of_variables()
2
sage: R = PolynomialRing(QQ,'x',10)
sage: R.inject_variables(globals())
Defining x0, x1, x2, x3, x4, x5, x6, x7, x8, x9
sage: G = ideal([x0 - x9, sum(R.gens())]).groebner_fan()
sage: G.number_of_variables()
10
|
Return a tropical basis for the tropical curve associated to
this ideal.
INPUT:
check -- bool (default: True); if True raises a ValueError
exception if this ideal does not define a tropical curve
(i.e., the condition that R/I has dimension equal
to 1 + the dimension of the homogeneity space is
not satisfied).
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3, order='lex')
sage: G = R.ideal([y^3-3*x^2, z^3-x-y-2*y^3+2*x^2]).groebner_fan()
sage: G
Groebner fan of the ideal:
Ideal (-3*x^2 + y^3, 2*x^2 - x - 2*y^3 - y + z^3) of Multivariate Polynomial Ring in x, y, z over Rational Field
sage: G.tropical_basis()
[-3*x^2 + y^3, 2*x^2 - x - 2*y^3 - y + z^3, 3/4*x + y^3 + 3/4*y - 3/4*z^3]
|
See the documentation for self[0].interative()
This does not work with the notebook.
EXAMPLES:
sage: print "This is not easily doc-testable; please write a good one!"
This is not easily doc-testable; please write a good one!
|
Returns information about the tropical intersection of the
polynomials defining the ideal.
EXAMPLES:
sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: i1 = ideal(x*z + 6*y*z - z^2, x*y + 6*x*z + y*z - z^2, y^2 + x*z + y*z)
sage: gf = i1.groebner_fan()
sage: pf = gf.tropical_intersection()
sage: pf.rays()
[[-1, 0, 0]]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:56 2008 | http://epydoc.sourceforge.net |