[sage-support] Symmetric polynomials over a ring of polynomials
Hi all, I am new to sage, so please forgive me if this is a trivial question. I am trying to express certain polynomials, which are symmetric in a subset of the variables, in terms of elementary symmetric polynomials on the symmetric subset (with coefficients that are polynomials in the other variables. Here is my setup: _ R.x1,x2,x3 = PolynomialRing(ZZ,3) C.c1,c2 = PolynomialRing(R,2) Sym = SymmetricFunctions(R) e = Sym.elementary() def ElemSym(p): # checks whether a polynomial is symmetric (coefficients in ZZ[l1,l2,l3]) f = Sym.from_polynomial(p) return e(f) _ If one enters some polynomials of the desired form by hand, e.g., g = (x1^2 - 2*x2^2)*c1 +c1*c2 + (x1^2 -2*x2^2)*c2 and calls ElemSym(g) then sage returns (x1^2-2*x2^2)*e[1] + e[2] as expected. Now I have some code to generate the polynomial which I am interested in, I store it as p: p = (output of some functions) ( p is ((x1^3 - 2*x1*x2 + x3)*c1^2 - (x1*x2 - x3)*c1 + x3)*c2^2 + x1^3 + c1^2*x3 - (x1*x2 - x3)*c1 - ((x1*x2 - x3)*c1^2 - (x1^3 - x1*x2 + x3)*c1 + x1*x2 - x3)*c2 - 2*x1*x2 + x3) Now the curious thing: p is (naively at least) symmetric in c1 and c2, but calling ElemSym(p) returns an error: ValueError: x0 + 2*x1 + x2 is not a symmetric polynomial but if I copy the polynomial itself and call ElemSym(((x1^3 - 2*x1*x2 + x3)*c1^2 - (x1*x2 - x3)*c1 + x3)*c2^2 + x1^3 + c1^2*x3 - (x1*x2 - x3)*c1 - ((x1*x2 - x3)*c1^2 - (x1^3 - x1*x2 + x3)*c1 + x1*x2 - x3)*c2 - 2*x1*x2 + x3)), then it works and I get (x1^3-2*x1*x2+x3)*e[] + (-x1*x2+x3)*e[1] + x3*e[1, 1] + (x1^3-x1*x2-x3)*e[2] + (-x1*x2+x3)*e[2, 1] + (x1^3-2*x1*x2+x3)*e[2, 2] + (3*x1*x2-3*x3)*e[3] + (-2*x1^3+4*x1*x2-2*x3)*e[3, 1] + (2*x1^3-4*x1*x2+2*x3)*e[4] as expected. Can somebody help me understand what is going on here? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Method to invert the birational map from degree 3 curve to its Weierstrass form?
I was happy to see that Sage gives you the explicit map between your cubic to its Weierstrass form. However, rather than having to do so by hand, I was wondering if Sage is capable of giving the map from the Weierstrass form to the original cubic, since I'd like a quick way of finding rational points on the original cubic (the Weierstrass form has positive rank so it's very quick to generate as many rational points as I want there). If it's important, [0,0,1] is not a flex point on the original cubic. R.x,y,z = QQ[] f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z EllipticCurve_from_cubic(f,[0,0,1]) Scheme morphism: From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: 2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2 To: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2 over Rational Field Defn: Defined on coordinates by sending (x : y : z) to (1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z + 3/8*y*z : -1/256*y^2) Thanks -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
Its a 4:1 map so you can't invert it... On Saturday, May 24, 2014 4:45:11 PM UTC+1, diophan wrote: Defn: Defined on coordinates by sending (x : y : z) to (1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z + 3/8*y*z : -1/256*y^2) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
Sorry, early weekend and the brain isn't working yet. The documentation says if morphism=True is passed, then a birational equivalence between F and the Weierstrass curve is returned. If the point happens to be a flex, then this is an isomorphism and I wasn't thinking. If I find the flex point on the original cubic is there a way to do this without doing it by hand though? On Saturday, May 24, 2014 12:18:29 PM UTC-4, Volker Braun wrote: Its a 4:1 map so you can't invert it... On Saturday, May 24, 2014 4:45:11 PM UTC+1, diophan wrote: Defn: Defined on coordinates by sending (x : y : z) to (1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z + 3/8*y*z : -1/256*y^2) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: aleph server down?
Thanks to you, Keith! -- Share_The_Sage! On Saturday, May 24, 2014 1:03:21 AM UTC-3, Keith Clawson wrote: Hi, I fixed the problem (it was an incorrect IP address). Thanks, Keith On Friday, May 23, 2014 3:59:50 PM UTC-7, share the sage wrote: Hi sage community! Right now aleph http://aleph.sagemath.org server seems to be down. This problem also seems to affect sagemath.org/eval.html http://www.sagemath.org/eval.htmlnormal functioning (see attached image *aleph down 03.png*). Fortunately sagecellhttp://sagecell.sagemath.orgis online. Could you have a look at it, please? Thank you! -- Share_The_Sage! Links: 1. http://aleph.sagemath.org/ 2. http://www.sagemath.org/eval.html 3. http://sagecell.sagemath.org/ 4. http://aleph.sagemath.org.isdownorblocked.com/ 5. http://mxtoolbox.com/SuperTool.aspx?action=http%3aaleph.sagemath.orgrun=toolpage -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote: Its a 4:1 map so you can't invert it... I would find that surprising. For a general plane cubic, there are good recipes for getting a 9:1 map to a Weierstrass model in general and a 1:1 map when a rational point is specified. A 4:1 map is rather unnatural to get in that situation. You'd expect that from a y^2=quartic in x model. Indeed, the map returned is invertible, the inverse being: [ -12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
Yes I just started looking at this again about an hour ago. It looks like the way Sage gets the map is only by doing linear changes of coordinates on P^2 and a Cremona, as outlined here: http://www.google.com/url?sa=trct=jq=esrc=ssource=webcd=1ved=0CCwQFjAAurl=http%3A%2F%2Ftrac.sagemath.org%2Fraw-attachment%2Fticket%2F3416%2Fcubic_to_weierstrass_documentation.pdfei=mASBU4zHJ6KlsATngYHQCAusg=AFQjCNHyMPTkzhy9KhgNr-MB0pI6pJXNTwsig2=AORDehO_tzL8xrZTO7OLZgbvm=bv.67720277,d.cWccad=rja In fact I followed the procedure there by hand since I didn't look at the actual Sage code and the output was the same exact equation. On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote: On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote: Its a 4:1 map so you can't invert it... I would find that surprising. For a general plane cubic, there are good recipes for getting a 9:1 map to a Weierstrass model in general and a 1:1 map when a rational point is specified. A 4:1 map is rather unnatural to get in that situation. You'd expect that from a y^2=quartic in x model. Indeed, the map returned is invertible, the inverse being: [ -12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
To get back to the question, did you find the inverse by hand or is there something in Sage to help out? I have potentially a large number of cubics I'd like to carry this out with and if there's a way to avoid doing it by hand each time that'd be great. On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote: On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote: Its a 4:1 map so you can't invert it... I would find that surprising. For a general plane cubic, there are good recipes for getting a 9:1 map to a Weierstrass model in general and a 1:1 map when a rational point is specified. A 4:1 map is rather unnatural to get in that situation. You'd expect that from a y^2=quartic in x model. Indeed, the map returned is invertible, the inverse being: [ -12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
diophan wrote: To get back to the question, did you find the inverse by hand or is there something in Sage to help out? I have potentially a large number of cubics I'd like to carry this out with and if there's a way to avoid doing it by hand each time that'd be great. Ahem, ever heard of tab completion? sage: R.x,y,z = QQ[] sage: f = 3*y^2*x-y^2*z-2*x*y*z+y*z^2+2*x^3-2*x^2*z sage: e = EllipticCurve_from_cubic(f,[0,0,1]) sage: e Scheme morphism: From: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: 2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2 To: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2 over Rational Field Defn: Defined on coordinates by sending (x : y : z) to (1/8*x*y - 1/16*y^2 - 1/8*y*z : -x^2 + 1/8*x*y + 3/16*y^2 + x*z + 3/8*y*z : -1/256*y^2) sage: type(e) class 'sage.schemes.elliptic_curves.weierstrass_transform.WeierstrassTransformationWithInverse_class' sage: e.inverse() Scheme morphism: From: Elliptic Curve defined by y^2 + 6*x*y + 256*y = x^3 - 73*x^2 over Rational Field To: Closed subscheme of Projective Space of dimension 2 over Rational Field defined by: 2*x^3 + 3*x*y^2 - 2*x^2*z - 2*x*y*z - y^2*z + y*z^2 Defn: Defined on coordinates by sending (x : y : z) to (-12*x*z - 4*y*z : 32*x*z : x^2 - 28*x*z - 4*y*z) sage: e.inverse().defining_polynomials() [-12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z] -leif On Saturday, May 24, 2014 4:38:48 PM UTC-4, Nils Bruin wrote: On Saturday, May 24, 2014 9:18:29 AM UTC-7, Volker Braun wrote: Its a 4:1 map so you can't invert it... I would find that surprising. For a general plane cubic, there are good recipes for getting a 9:1 map to a Weierstrass model in general and a 1:1 map when a rational point is specified. A 4:1 map is rather unnatural to get in that situation. You'd expect that from a y^2=quartic in x model. Indeed, the map returned is invertible, the inverse being: [ -12*x*z - 4*y*z, 32*x*z, x^2 - 28*x*z - 4*y*z] -- () The ASCII Ribbon Campaign /\ Help Cure HTML E-Mail -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Method to invert the birational map from degree 3 curve to its Weierstrass form?
On Saturday, May 24, 2014 9:38:48 PM UTC+1, Nils Bruin wrote: You'd expect that from a y^2=quartic in x model. Yes, I was thinking about the degree-2 case... which is also implemented btw ;-) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.