Extension of a field extension

18 views
Skip to first unread message

Irene

unread,
Apr 21, 2014, 5:48:10 AM4/21/14
to sage-s...@googlegroups.com
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

Irene

unread,
Apr 21, 2014, 8:58:01 AM4/21/14
to sage-s...@googlegroups.com
I forgot to write what is repsq():

#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

John Cremona

unread,
Apr 21, 2014, 9:52:53 AM4/21/14
to SAGE support
On 21 April 2014 13:58, Irene <irene....@gmail.com> 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.
> --
> 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.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

Irene

unread,
Apr 24, 2014, 4:21:47 AM4/24/14
to sage-s...@googlegroups.com
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


Reply all
Reply to author
Forward
0 new messages