ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 02 Aug 2014 06:06:47 -0500Relations in a polynomial ringhttps://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/Suppose Sage hands me a multivariable polynomial ring specified by some number of generators, and some relations that I don't know. How can I get a list of relations among the generators? In particular, here is the code I'm using:
rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).coordinate_ring()
I've tried defining a morphism from R to itself which just sends the generators to themselves, then computing a groebner basis for the ideal of the kernel.
generators = R.gens()
phi = R.hom(generators)
Sage doesn't seem to let me do this, since kernel isn't implemented for morphisms defined this way. At this point I'm not sure what else to try. I feel like there must be a simpler way to extract relations among generators in a ring, but after spending a couple of days scouring the documentation I can't seem to notice anything relevant. Help is much appreciated!
Wed, 09 Jul 2014 08:52:29 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/Answer by vdelecroix for <p>Suppose Sage hands me a multivariable polynomial ring specified by some number of generators, and some relations that I don't know. How can I get a list of relations among the generators? In particular, here is the code I'm using:</p>
<pre><code>rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).coordinate_ring()
</code></pre>
<p>I've tried defining a morphism from R to itself which just sends the generators to themselves, then computing a groebner basis for the ideal of the kernel. </p>
<pre><code>generators = R.gens()
phi = R.hom(generators)
</code></pre>
<p>Sage doesn't seem to let me do this, since kernel isn't implemented for morphisms defined this way. At this point I'm not sure what else to try. I feel like there must be a simpler way to extract relations among generators in a ring, but after spending a couple of days scouring the documentation I can't seem to notice anything relevant. Help is much appreciated!</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23313#post-id-23313Hi,
There is no relation in the ring you get. It is a polynomial ring! A quotient would rather looks like the following
sage: R
Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
sage: R.quotient([R.gen(0)**2])
Quotient of Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field by the ideal (z0^2)
VincentWed, 09 Jul 2014 10:31:17 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23313#post-id-23313Comment by vdelecroix for <p>Hi,</p>
<p>There is no relation in the ring you get. It is a polynomial ring! A quotient would rather looks like the following</p>
<pre><code>sage: R
Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
sage: R.quotient([R.gen(0)**2])
Quotient of Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field by the ideal (z0^2)
</code></pre>
<p>Vincent</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?comment=23349#post-id-23349I guess that you are interested in .cohomology_ring() or some other method... but not in that one ;-)Thu, 10 Jul 2014 11:05:20 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?comment=23349#post-id-23349Comment by jmracek for <p>Hi,</p>
<p>There is no relation in the ring you get. It is a polynomial ring! A quotient would rather looks like the following</p>
<pre><code>sage: R
Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field
sage: R.quotient([R.gen(0)**2])
Quotient of Multivariate Polynomial Ring in z0, z1, z2, z3 over Rational Field by the ideal (z0^2)
</code></pre>
<p>Vincent</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?comment=23346#post-id-23346Hmmm. That's weird. The coordinate ring of this affine toric variety is supposed to have relations in it. I'll have to take a look through the toric varieties package and see what I'm doing wrong. Thanks for the answer!Thu, 10 Jul 2014 09:21:19 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?comment=23346#post-id-23346Answer by franciscamitchell for <p>Suppose Sage hands me a multivariable polynomial ring specified by some number of generators, and some relations that I don't know. How can I get a list of relations among the generators? In particular, here is the code I'm using:</p>
<pre><code>rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).coordinate_ring()
</code></pre>
<p>I've tried defining a morphism from R to itself which just sends the generators to themselves, then computing a groebner basis for the ideal of the kernel. </p>
<pre><code>generators = R.gens()
phi = R.hom(generators)
</code></pre>
<p>Sage doesn't seem to let me do this, since kernel isn't implemented for morphisms defined this way. At this point I'm not sure what else to try. I feel like there must be a simpler way to extract relations among generators in a ring, but after spending a couple of days scouring the documentation I can't seem to notice anything relevant. Help is much appreciated!</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23668#post-id-23668i can't answer for your question because i am not an expert on this area. I am new here and just looking for a <a href="http://www.essayguardian.com/how_we_work.php">quality cheap essay writing service</a> to complete my academic assignment. Sat, 02 Aug 2014 06:06:47 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23668#post-id-23668Answer by franciscamitchell for <p>Suppose Sage hands me a multivariable polynomial ring specified by some number of generators, and some relations that I don't know. How can I get a list of relations among the generators? In particular, here is the code I'm using:</p>
<pre><code>rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).coordinate_ring()
</code></pre>
<p>I've tried defining a morphism from R to itself which just sends the generators to themselves, then computing a groebner basis for the ideal of the kernel. </p>
<pre><code>generators = R.gens()
phi = R.hom(generators)
</code></pre>
<p>Sage doesn't seem to let me do this, since kernel isn't implemented for morphisms defined this way. At this point I'm not sure what else to try. I feel like there must be a simpler way to extract relations among generators in a ring, but after spending a couple of days scouring the documentation I can't seem to notice anything relevant. Help is much appreciated!</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23526#post-id-23526spam post deletedTue, 22 Jul 2014 01:17:25 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23526#post-id-23526Answer by mrambaud for <p>Suppose Sage hands me a multivariable polynomial ring specified by some number of generators, and some relations that I don't know. How can I get a list of relations among the generators? In particular, here is the code I'm using:</p>
<pre><code>rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).coordinate_ring()
</code></pre>
<p>I've tried defining a morphism from R to itself which just sends the generators to themselves, then computing a groebner basis for the ideal of the kernel. </p>
<pre><code>generators = R.gens()
phi = R.hom(generators)
</code></pre>
<p>Sage doesn't seem to let me do this, since kernel isn't implemented for morphisms defined this way. At this point I'm not sure what else to try. I feel like there must be a simpler way to extract relations among generators in a ring, but after spending a couple of days scouring the documentation I can't seem to notice anything relevant. Help is much appreciated!</p>
https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23459#post-id-23459Hello,
One has to come back in the category of schemes :
rays = [(0,0,1),(1,0,-2),(0,1,-2),(-1,0,-2),(0,-1,-2)]
cones = [(1,2,3,4)]
Delta = Fan(cones,rays)
T = ToricVariety(Delta)
R = T.affine_patch(0).Spec().coordinate_ring()
Then, to answer your initial point about retrieving a list of relations :
R.defining_ideal().gens()
(By the way I also tried cohomology ring : it is not implemented for this toric variety, only for orbifold toric varieties so far.)
MatthieuThu, 17 Jul 2014 11:33:12 -0500https://ask.sagemath.org/question/23306/relations-in-a-polynomial-ring/?answer=23459#post-id-23459