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.Wed, 27 Mar 2013 11:51:23 +0100Defining a general curvehttps://ask.sagemath.org/question/9934/defining-a-general-curve/Hey, I am relatively new to Sage, so this question might be very simple:
I want to define a projective curve in $\mathbb{P}^2$ given by $x^3=y^3-Az^3$, where $A$ is an arbitrary non-zero element of an algebraically closed field, say C. I tried the following:
x,y,z=ProjectiveSpace(2,CC,'xyz').gens();
var('A',domain=CC);
C=Curve(x^3+y^3-A*z^3);
But I get TypeError: F (=-A*z^3 + x^3 + y^3) must be a multivariate polynomial.
Is it possible to define the curve I want in Sage? All examples of algebraic geometry in Sage I saw deal with explicitly defined curves.
Fri, 22 Mar 2013 12:48:07 +0100https://ask.sagemath.org/question/9934/defining-a-general-curve/Answer by lftabera for <p>Hey, I am relatively new to Sage, so this question might be very simple:
I want to define a projective curve in $\mathbb{P}^2$ given by $x^3=y^3-Az^3$, where $A$ is an arbitrary non-zero element of an algebraically closed field, say C. I tried the following:</p>
<p>x,y,z=ProjectiveSpace(2,CC,'xyz').gens();</p>
<p>var('A',domain=CC);</p>
<p>C=Curve(x^3+y^3-A*z^3);</p>
<p>But I get TypeError: F (=-A*z^3 + x^3 + y^3) must be a multivariate polynomial.</p>
<p>Is it possible to define the curve I want in Sage? All examples of algebraic geometry in Sage I saw deal with explicitly defined curves.</p>
https://ask.sagemath.org/question/9934/defining-a-general-curve/?answer=14696#post-id-14696In this case A would be a variable. You might do the following
sage: K=QQ['A'].fraction_field()
sage: K.inject_variables()
Defining A
sage: R=K['x,y,z']
sage: R.inject_variables()
Defining x, y, z
sage: F=-A*z^3 + x^3 + y^3
sage: Curve(F)
Projective Curve over Fraction Field of Univariate Polynomial Ring in A over Rational Field defined by x^3 + y^3 + (-A)*z^3
But I am not sure if this is what you really want. I am afraid that curves defined over transcendental fields will have few working methods.
Tue, 26 Mar 2013 16:29:14 +0100https://ask.sagemath.org/question/9934/defining-a-general-curve/?answer=14696#post-id-14696Comment by Michalis N for <p>In this case A would be a variable. You might do the following</p>
<pre><code>sage: K=QQ['A'].fraction_field()
sage: K.inject_variables()
Defining A
sage: R=K['x,y,z']
sage: R.inject_variables()
Defining x, y, z
sage: F=-A*z^3 + x^3 + y^3
sage: Curve(F)
Projective Curve over Fraction Field of Univariate Polynomial Ring in A over Rational Field defined by x^3 + y^3 + (-A)*z^3
</code></pre>
<p>But I am not sure if this is what you really want. I am afraid that curves defined over transcendental fields will have few working methods.</p>
https://ask.sagemath.org/question/9934/defining-a-general-curve/?comment=18010#post-id-18010Thank you! In the meanwhile I had figured that out. There is also the command K.<A> = FunctionField(QQ). However you are right, the functionality is limited and it would be much nicer to work over QQ. I'm not sure if this is possible.Wed, 27 Mar 2013 11:51:23 +0100https://ask.sagemath.org/question/9934/defining-a-general-curve/?comment=18010#post-id-18010