ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 09 Jun 2020 07:03:49 +0200Toric Ideal of Point Configuration Yielding Whole Ring?https://ask.sagemath.org/question/51851/toric-ideal-of-point-configuration-yielding-whole-ring/So I am trying to find the toric ideal of a point configuration given by the lattice points contained within a family of polytopes I am studying to assess regularity/unimodularity of triangulations of the point configuration (I'm attempting to follow the guidelines specified in Bernd Sturmfels' text Grobner Bases and Convex Polytopes). I know that toric ideals are supposed to be prime and their reduced Grobner bases are generated by binomials, but for whatever reason, the `ToricIdeal()` sage function is indicating that the corresponding ideal is the entire ring, which should definitely not be the case.
For example, say that we're looking at the point configuration given by the lattice points (1,0), (0,1), (0,0), (0,-1), (-1,-1), (-1,-2), (-2,-3). Inputting these points as columns in a matrix and computing the toric ideal as indicated in the sage documentation should be as simple as:
A = matrix([[1,0,0,0,-1,-1,-2],[0,1,0,-1,-1,-2,-3]])
IA = ToricIdeal(A); IA
However, when I run this I get the following output:
Ideal (1) of Multivariate Polynomial Ring in z0, z1, z2, z3, z4, z5, z6 over Rational Field
I cannot determine why this is the case. For some context, I asked a colleague to compute the toric ideal using `Macaulay2`, and that program indicated that the toric ideal is generated by `z2 - 1, z1*z3 - 1, z0*z1*z4 - 1, z0*z1^2*z5 - 1, z0^2*z1^3*z6 - 1, z0^4*z1^7*z2*z3*z4*z5*z6 - 1` which seems far more reasonable. Any idea if my input is incorrect or misguided? I'm having a similar issue on another project when attempting to compute toric ideals of point configurations comprised of the vertices of order polytopes. Without the correct toric ideal, I cannot compute a corresponding Grobner basis to assess regularity or unimodularity. Any help is greatly appreciated. Thank you.DerekHTue, 09 Jun 2020 07:03:49 +0200https://ask.sagemath.org/question/51851/How to define a graph using Cartesian coordinateshttps://ask.sagemath.org/question/33565/how-to-define-a-graph-using-cartesian-coordinates/I am trying to figure out (1) how to input a graph into Sage where the vertices are described as Cartesian coordinates (3-tuples), and then (2) for each pair of vertices, compute the Euclidean distance between the two and, if the Euclidean distance is some fixed value $d$, add an edge between these two vertices.
Specifically, here are my questions:
1. How do I input a graph into Sage where the vertices are described as Cartesian coordinates (3-tuples)?
2. Is there a pre-defined function in Sage for computing the Euclidean distance between two Cartesian coordinates?
JEAFri, 27 May 2016 23:08:03 +0200https://ask.sagemath.org/question/33565/Plot surface given by pointshttps://ask.sagemath.org/question/8479/plot-surface-given-by-points/Greetings, colleagues!
Is there any way to plot surface given by points in sage? As far as I know, plot3d can't plot surface by discrete values...
Best regards, Aleksey.Aleksey_RWed, 16 Nov 2011 12:02:20 +0100https://ask.sagemath.org/question/8479/