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.Thu, 01 Apr 2021 11:14:49 +0200Why am I getting a type error when I attempt to take the projective closure of this intersection?https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/I am attempting to take the projective closure of the intersection of the following affine polynomials (not the intersection of the closure!):
$$y^3-y-x^2= 0 $$
$$w^3-w+y^7-y^5-x^4y^3+x^4y = 0.$$
This affine intersection is a curve of dimension one. Unfortunately, I haven't been able to enter this lovely affine curve defined by this intersection into sage. When I attempt as follows:
A.<x,y,w> = AffineSpace(QQ, 3)
P.<u,v,t,s>=ProjectiveSpace(QQ,3)
C = Curve([y^3-y-x^2, w^3-w+y^7-y^5-x^4*y^3+x^4*y], A)
D=C.projective_closure(1,P)
I get an error at the definition of C due to the second polynomial:
TypeError: F (=[-x^4*y^3 + y^7 + x^4*y - y^5 + w^3 - w]) must be a list or tuple of polynomials of the coordinate ring of A (=Affine Space of dimension 3 over Finite Field of size 3)
I am so confused because this is absolutely in the coordinate ring of $A$. Why am I getting this type error? How can I enter this affine intersection into sage, so that I may take its closure?
_______________
As an aside, I can enter the intersection of the closure, which is not what I want, as follows:
x,y,z,w = GF(3)['x,y,z,w'].gens()
C = Curve([y^3-y*z^2-x^2*z, w^3*z^4-w*z^6+y^7-y^5*z^2-x^4*y^3+x^4*y*z^2]); C
The intersection of the closure has an extra irreducible component $[x: 0: w: 0]$,
Thu, 01 Apr 2021 05:08:59 +0200https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/Answer by rburing for <p>I am attempting to take the projective closure of the intersection of the following affine polynomials (not the intersection of the closure!): </p>
<p>$$y^3-y-x^2= 0 $$
$$w^3-w+y^7-y^5-x^4y^3+x^4y = 0.$$</p>
<p>This affine intersection is a curve of dimension one. Unfortunately, I haven't been able to enter this lovely affine curve defined by this intersection into sage. When I attempt as follows:</p>
<pre><code>A.<x,y,w> = AffineSpace(QQ, 3)
P.<u,v,t,s>=ProjectiveSpace(QQ,3)
C = Curve([y^3-y-x^2, w^3-w+y^7-y^5-x^4*y^3+x^4*y], A)
D=C.projective_closure(1,P)
</code></pre>
<p>I get an error at the definition of C due to the second polynomial:</p>
<pre><code>TypeError: F (=[-x^4*y^3 + y^7 + x^4*y - y^5 + w^3 - w]) must be a list or tuple of polynomials of the coordinate ring of A (=Affine Space of dimension 3 over Finite Field of size 3)
</code></pre>
<p>I am so confused because this is absolutely in the coordinate ring of $A$. Why am I getting this type error? How can I enter this affine intersection into sage, so that I may take its closure?</p>
<hr>
<p>As an aside, I can enter the intersection of the closure, which is not what I want, as follows: </p>
<pre><code>x,y,z,w = GF(3)['x,y,z,w'].gens()
C = Curve([y^3-y*z^2-x^2*z, w^3*z^4-w*z^6+y^7-y^5*z^2-x^4*y^3+x^4*y*z^2]); C
</code></pre>
<p>The intersection of the closure has an extra irreducible component $[x: 0: w: 0]$, </p>
https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/?answer=56449#post-id-56449The code seems to work as given over here. Have you tried it in the latest version of Sage?Thu, 01 Apr 2021 09:04:10 +0200https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/?answer=56449#post-id-56449Comment by slelievre for <p>The code seems to work as given over here. Have you tried it in the latest version of Sage?</p>
https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/?comment=56451#post-id-56451I can confirm this works for me in Sage 9.2 and Sage 9.3.rc0:
sage: A.<x, y, w> = AffineSpace(QQ, 3)
sage: P.<u, v, t, s> = ProjectiveSpace(QQ, 3)
sage: C = Curve([y^3 - y - x^2, w^3 - w + y^7 - y^5 - x^4*y^3 + x^4*y], A)
sage: %time D = C.projective_closure(1, P)
CPU times: user 44.8 s, sys: 810 ms, total: 45.6 s
Wall time: 47.7 sThu, 01 Apr 2021 11:14:49 +0200https://ask.sagemath.org/question/56448/why-am-i-getting-a-type-error-when-i-attempt-to-take-the-projective-closure-of-this-intersection/?comment=56451#post-id-56451