Ok! Thank you! Do you have some idea about the first question?

*I want to "add" to A1 the square root of theta^3+3*theta+5.*
*The problem is that when I consider the following:*

gamma2=theta^3+3*theta+5
AA1.<xbar>=PolynomialRing(A1)
AA.<gamma>=A1.extension(xbar^2-gamma2)
(xbar^2-gamma2).roots(AA,multiplicities=False)

it gives me a NotImplementedError. Any idea? Thank you in advance.
*Irene*


On Monday, April 21, 2014 3:52:53 PM UTC+2, John Cremona wrote:
>
> On 21 April 2014 13:58, Irene <irene....@gmail.com <javascript:>> wrote: 
> > I forgot to write what is repsq(): 
>
> You could use the builtin function power_mod: 
>
> sage: power_mod? 
> Type:       function 
> String Form:<function power_mod at 0x1f78668> 
> File:       
> /usr/local/sage/sage-6.1.1/local/lib/python2.7/site-packages/sage/rings/arith.py
>  
>
> Definition: power_mod(a, n, m) 
> Docstring: 
>    The n-th power of a modulo the integer m. 
>
>
> > #repsq(a,n) computes a^n 
> > def repsq(a,n): 
> >     B = Integer(n).binary() 
> >     C=list(B) 
> >     k=len(B)-1 
> >     bk=a 
> >     i=1 
> >     while i <= k: 
> >         if C[i]=="1": 
> >             bk=(bk^2)*a 
> >         else: 
> >             bk=bk^2 
> >         i=i+1 
> >     return bk 
> > 
> > 
> > On Monday, April 21, 2014 11:48:10 AM UTC+2, Irene wrote: 
> >> 
> >> Hello, 
> >> I have the following defined: 
> >> 
> >> p=3700001 
> >> Fp=GF(p) 
> >> E=EllipticCurve([Fp(3),Fp(5)]) 
> >> j_inv=E.j_invariant() 
> >> l=13#Atkin prime 
> >> n=((l-1)/2).round() 
> >> r=2# Phi_13 factorize in factors of degree 2 
> >> s=12#Psi_13 factorize in factors of degree 12 
> >> Fps=GF(repsq(p,s),'a') 
> >> a=Fps.gen() 
> >> Fpr=GF(repsq(p,r),'b') 
> >> b=Fpr.gen() 
> >> FFps.<X>=PolynomialRing(Fps) 
> >> FFpr.<x>=PolynomialRing(Fpr) 
> >> EP=x^6 + (973912*b + 2535329)*x^5 + (416282*b + 3608920)*x^4 + 
> (686636*b + 
> >> 908282)*x^3 + (2100014*b + 2063451)*x^2 + (2563113*b + 751714)*x + 
> 2687623*b 
> >> + 1658379 
> >> A1.<theta>=Fpr.extension(EP) 
> >> 
> >> and now I want to "add" to A1 the square root of theta^3+3*theta+5. 
> >> The problem is that when I consider the following: 
> >> 
> >> gamma2=theta^3+3*theta+5 
> >> AA1.<xbar>=PolynomialRing(A1) 
> >> AA.<gamma>=A1.extension(xbar^2-gamma2) 
> >> (xbar^2-gamma2).roots(AA,multiplicities=False) 
> >> 
> >> it gives me a NotImplementedError. Any idea? Thank you in advance. 
> >> Irene 
> >> 
> > -- 
> > 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...@googlegroups.com <javascript:>. 
> > To post to this group, send email to 
> > sage-s...@googlegroups.com<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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.

Reply via email to