The commands in MAGMA come after the prompt >. Answers come in the following line, without >.

Commands are followed by ;.

Example:

> 2+2;
4

Finite Fields in MAGMA

I’ll call F the field of 7 elements:

> F:=GF(7);
(nothing printed)

Now F represents the field of 7 elements:

> F;
Finite field of size 7

To have “2” as an element of F, we type F!2:

> Parent(2);
Integer Ring

> Parent(F!2);
Finite field of size 7

Now we create a field F125 of 125 elements. We’ll call the generator of the multiplicative group g.

> F125<g>:=GF(5^3);

Let’s see the elements of F125:

> Set(F125);
{ 1, g, g^2, g^3, g^4, g^5, g^6, g^7, g^8, g^9, g^10, g^11, g^12, g^13, g^14, g^15,
g^16, g^17, g^18, g^19, g^20, g^21, g^22, g^23, g^24, g^25, g^26, g^27, g^28, g^29,
g^30, 2, g^32, g^33, g^34, g^35, g^36, g^37, g^38, g^39, g^40, g^41, g^42, g^43, g^44,
g^45, g^46, g^47, g^48, g^49, g^50, g^51, g^52, g^53, g^54, g^55, g^56, g^57, g^58,
g^59, g^60, g^61, 4, g^63, g^64, g^65, g^66, g^67, g^68, g^69, g^70, g^71, g^72, g^73,
g^74, g^75, g^76, g^77, g^78, g^79, g^80, g^81, g^82, g^83, g^84, g^85, g^86, g^87,
g^88, g^89, g^90, g^91, g^92, 3, g^94, g^95, g^96, g^97, g^98, g^99, g^100, g^101,
g^102, g^103, g^104, g^105, g^106, g^107, g^108, g^109, g^110, g^111, g^112, g^113,
g^114, g^115, g^116, g^117, g^118, g^119, g^120, g^121, g^122, g^123, 0 }

We can find the minimal polynomial of g over the field of 5 elements. We’ll call x the variable:

> f<x>:=MinimalPolynomial(g,GF(5));
> f;
x^3 + 3*x + 3

Canonical Liftings

Now, assuming that we are running magma under the directory that contains the file “fctWitt.m”, we load the file: > load "fctWitt.m"; Loading "fctWitt.m" We lift now the curve x0^3+a0*x0+b0 finding a1, b1, x1, P1, a2, b2, x2, P2 in that order (note that y1=y0*P1 and y2=y0*P2) by typing lift(a0,b0);

> lift(F!0,F!3);
0 5 6*x0^10 + 6*x0^4 + 3*x0
2*x0^12 + 4*x0^9 + 2*x0^6 + 4*x0^3 + 5
0 0 6*x0^91 + 3*x0^73 + x0^70 + 3*x0^67 + 6*x0^64 + 4*x0^61 + 3*x0^58 + 3*x0^55 +
    3*x0^52 + 6*x0^46 + 4*x0^43 + 3*x0^37 + 4*x0^34 + 2*x0^31 + 3*x0^28 + 6*x0^25 +
    5*x0^22 + 3*x0^19 + 6*x0^13 + 5*x0^10 + 3*x0^7 + 4*x0^4 + 2*x0
5*x0^114 + 3*x0^111 + 2*x0^108 + 2*x0^105 + x0^96 + 2*x0^93 + x0^87 + x0^84 + x0^81 +
    2*x0^75 + 3*x0^72 + x0^66 + 3*x0^60 + 4*x0^57 + x0^54 + 3*x0^51 + 3*x0^42 + 5*x0^39
    + 6*x0^30 + 4*x0^24 + 4*x0^21 + 2*x0^18 + 3*x0^15 + 2*x0^12 + x0^9 + 5*x0^6 +
    2*x0^3 + 2

We can give names:

> a1, b1, x1, P1, a2, b2, x2, P2 := lift(F!0,F!3);
> a1;
0
> b1;
5
> a2;
0

and so on…

If we only want x1 and x2

> _,_,x1,_,_,_,x2 := lift(F!0,F!3);
> x1;
6*x0^10 + 6*x0^4 + 3*x0
> x2;
6*x0^91 + 3*x0^73 + x0^70 + 3*x0^67 + 6*x0^64 + 4*x0^61 + 3*x0^58 + 3*x0^55 + 3*x0^52 +
    6*x0^46 + 4*x0^43 + 3*x0^37 + 4*x0^34 + 2*x0^31 + 3*x0^28 + 6*x0^25 + 5*x0^22 +
    3*x0^19 + 6*x0^13 + 5*x0^10 + 3*x0^7 + 4*x0^4 + 2*x0

Note that a1, b1, P1, a2, b2, P2 were computed! They were just discarded in the end!

Another example

> a1, b1, x1, P1, a2, b2, x2, P2 := lift(F125!g,F125!3);
> a1;
g^87
> b2;
g^12
> x2;
g^21*x0^45 + g^25*x0^37 + g^43*x0^35 + g^118*x0^34 + g^89*x0^33 + g^82*x0^31 +
    g^21*x0^30 + g^119*x0^29 + g^103*x0^27 + g^122*x0^26 + g^59*x0^24 + g^42*x0^23 +
    g^88*x0^22 + g^84*x0^21 + g^18*x0^20 + g^105*x0^19 + g^54*x0^18 + g^47*x0^17 +
    g^14*x0^16 + g^68*x0^15 + g^68*x0^14 + g^101*x0^13 + g^65*x0^12 + g^49*x0^11 +
    g^44*x0^10 + g^44*x0^9 + g^29*x0^8 + g^88*x0^7 + g^101*x0^6 + g^17*x0^5 +
    g^106*x0^4 + g^58*x0^3 + g^5*x0^2 + g^55*x0 + g^96

Error Messages

If the Hasse invariant is 0 (supersingular curve):

> lift(F125!0,F125!1);
ERROR: hasse inv. = 0!

If the curve is singular:

> lift(F!1,F!2);
ERROR: singular curve

If the elements are not in the same field:

> lift(F!3,2);
ERROR:  3  and  2  are not in the same field

You should do:

> lift(F!3,F!2);
5 1 2*x0^10 + 5*x0^8 + 6*x0^6 + 4*x0^5 + 6*x0^4 + 3*x0^3 + 3*x0^2 + 6*x0 + 6
3*x0^12 + 3*x0^10 + 4*x0^9 + 6*x0^6 + 3*x0^5 + x0^4 + x0^2 + 5*x0 + 3
4 1 3*x0^91 + x0^77 + 5*x0^73 + 2*x0^71 + 5*x0^70 + x0^69 + 5*x0^68 + x0^67 + 6*x0^66 +
    6*x0^64 + x0^63 + 5*x0^62 + 6*x0^61 + 4*x0^60 + 5*x0^58 + 3*x0^57 + 2*x0^56 + x0^55
    + x0^54 + 3*x0^52 + 4*x0^50 + 3*x0^48 + x0^47 + 4*x0^45 + 5*x0^43 + x0^41 + 3*x0^40
    + 4*x0^39 + x0^38 + x0^36 + 4*x0^35 + 6*x0^33 + 5*x0^29 + 2*x0^28 + x0^27 + 3*x0^26
    + 5*x0^25 + x0^23 + 6*x0^21 + 2*x0^20 + 5*x0^19 + 5*x0^18 + 6*x0^17 + 2*x0^16 +
    4*x0^15 + x0^14 + 6*x0^13 + 5*x0^12 + 2*x0^11 + 3*x0^10 + 5*x0^9 + 5*x0^8 + 6*x0^7
    + 2*x0^6 + x0^5 + 6*x0^4 + 2*x0^3 + 4*x0^2 + 2*x0
6*x0^114 + 5*x0^112 + x0^111 + x0^110 + 6*x0^109 + 3*x0^108 + 2*x0^107 + 6*x0^106 +
    6*x0^105 + 4*x0^96 + 4*x0^94 + 3*x0^93 + 5*x0^91 + x0^88 + x0^87 + 6*x0^86 + x0^85
    + 5*x0^83 + 6*x0^82 + 6*x0^81 + 6*x0^80 + x0^79 + 5*x0^77 + 2*x0^76 + 2*x0^75 +
    5*x0^74 + 6*x0^73 + 3*x0^71 + 2*x0^70 + x0^69 + 6*x0^68 + 6*x0^67 + x0^66 + 5*x0^64
    + x0^63 + 3*x0^62 + 4*x0^61 + 3*x0^60 + 5*x0^59 + 3*x0^57 + x0^56 + 2*x0^55 +
    2*x0^54 + x0^53 + x0^52 + x0^51 + 6*x0^50 + 5*x0^49 + 5*x0^48 + 3*x0^47 + 2*x0^44 +
    x0^43 + 6*x0^42 + 3*x0^41 + 3*x0^40 + 2*x0^39 + x0^38 + 3*x0^37 + 5*x0^36 + 3*x0^35
    + 5*x0^34 + 6*x0^33 + 5*x0^32 + 6*x0^31 + 5*x0^30 + 2*x0^28 + 3*x0^27 + 5*x0^26 +
    4*x0^25 + 3*x0^24 + 4*x0^23 + 6*x0^22 + 3*x0^19 + 2*x0^18 + 3*x0^17 + x0^16 +
    4*x0^15 + 6*x0^14 + 4*x0^13 + 5*x0^12 + 5*x0^11 + 2*x0^9 + 3*x0^8 + 6*x0^5 + 4*x0^4
    + 2*x0^3 + 6*x0^2 + 2*x0 + 4

Again, not in the same field:

> lift(F125!2,F!3);
ERROR:  2  and  3  are not in the same field

Using field of characteristic 0:

> lift(2,3);
ERROR: Char. of the field is zero!

More General Cases

Suppose we want to find the canonical lifting for every curve in characteristic 5. We define:

> FF<a0,b0>:=FieldOfFractions(PolynomialRing(GF(5),2));

Note that a0 and b0 now are automatically associated to FF:

> Parent(a0);
Rational function field of rank 2 over GF(5)
Variables: a0, b0

Now we can do:

> lift(a0,b0);
(a0^3*b0^2 + b0^4)/a0
4*a0^6*b0 + a0^3*b0^3 + b0^5
4/a0*x0^7 + 4*b0/a0*x0^4 + a0*x0^3 + 3*b0*x0^2 + 3*b0^2/a0*x0 + a0*b0
1/a0*x0^8 + 2*x0^6 + 3*b0/a0*x0^5 + 2*a0*x0^4 + 3*b0*x0^3 + a0^2*x0^2 + 3*a0*b0*x0 +
    3*a0^3 + 3*b0^2
(2*a0^36 + a0^33*b0^2 + a0^30*b0^4 + 3*a0^27*b0^6 + 2*a0^24*b0^8 + a0^18*b0^12 +
    4*a0^12*b0^16 + 3*a0^9*b0^18 + 4*a0^6*b0^20 + 4*a0^3*b0^22 + 4*b0^24)/a0^11
a0^36*b0 + 4*a0^33*b0^3 + 3*a0^27*b0^7 + 4*a0^21*b0^11 + 4*a0^15*b0^15 + a0^12*b0^17 +
    3*a0^6*b0^21 + b0^25
2/a0^10*x0^45 + 2/a0^6*x0^37 + (a0^6 + a0^3*b0^2 + b0^4)/a0^11*x0^35 + 2*b0/a0^6*x0^34
    + 3/a0^4*x0^33 + (4*a0^3 + 4*b0^2)/a0^6*x0^31 + 4*b0^5/a0^10*x0^30 +
    4*b0^2/a0^5*x0^29 + (a0^3 + 3*b0^2)/a0^4*x0^27 + 2*b0/a0^2*x0^26 + (4*a0^3*b0 +
    3*b0^3)/a0^4*x0^24 + (4*a0^6 + 3*a0^3*b0^2 + b0^4)/a0^5*x0^23 + (2*a0^3*b0^3 +
    4*b0^5)/a0^6*x0^22 + (a0^3*b0^2 + b0^4)/a0^4*x0^21 + (2*a0^12*b0 + 4*a0^9*b0^3 +
    2*a0^6*b0^5 + a0^3*b0^7 + b0^9)/a0^11*x0^20 + (a0^9 + 3*a0^6*b0^2 +
    4*b0^6)/a0^6*x0^19 + (2*a0^6*b0 + a0^3*b0^3 + 4*b0^5)/a0^4*x0^18 + (2*a0^6 +
    a0^3*b0^2 + b0^4)/a0^2*x0^17 + (3*a0^6*b0^3 + 4*a0^3*b0^5 + 3*b0^7)/a0^6*x0^16 +
    (4*a0^9 + 4*a0^6*b0^2 + 3*b0^6)/a0^4*x0^15 + (4*a0^6*b0 + 2*b0^5)/a0^2*x0^14 +
    (3*a0^9 + 4*a0^6*b0^2 + 3*a0^3*b0^4 + 2*b0^6)/a0^3*x0^13 + (3*a0^9*b0 + 2*a0^6*b0^3
    + a0^3*b0^5 + 2*b0^7)/a0^4*x0^12 + (2*a0^9*b0^2 + 3*a0^6*b0^4 + 4*a0^3*b0^6 +
    2*b0^8)/a0^5*x0^11 + (2*a0^6*b0^3 + 4*a0^3*b0^5 + 3*b0^7)/a0^3*x0^10 + (3*a0^9*b0^2
    + 2*a0^6*b0^4 + 4*a0^3*b0^6 + 4*b0^8)/a0^4*x0^9 + (2*a0^9*b0^3 + 2*a0^6*b0^5 +
    4*a0^3*b0^7 + b0^9)/a0^5*x0^8 + (3*a0^9*b0^4 + 3*a0^6*b0^6 + a0^3*b0^8 +
    2*b0^10)/a0^6*x0^7 + (3*a0^9*b0^3 + 3*a0^3*b0^7 + 2*b0^9)/a0^4*x0^6 + (4*a0^21 +
    3*a0^15*b0^4 + a0^12*b0^6 + 2*a0^9*b0^8 + a0^6*b0^10 + 2*a0^3*b0^12 +
    2*b0^14)/a0^11*x0^5 + (a0^9*b0^5 + 3*a0^6*b0^7 + 4*a0^3*b0^9 + 2*b0^11)/a0^6*x0^4 +
    (4*a0^9*b0^4 + 4*a0^6*b0^6 + a0^3*b0^8 + 3*b0^10)/a0^4*x0^3 + (2*a0^9*b0^5 +
    2*a0^6*b0^7 + 4*b0^11)/a0^5*x0^2 + (2*a0^9*b0^6 + 4*b0^12)/a0^6*x0 + (4*a0^21*b0 +
    a0^18*b0^3 + 4*a0^15*b0^5 + a0^12*b0^7 + a0^9*b0^9 + 3*a0^6*b0^11 + 3*b0^15)/a0^10
4/a0^10*x0^56 + 3/a0^9*x0^54 + 3*b0/a0^10*x0^53 + 4/a0^8*x0^52 + 3*b0/a0^9*x0^51 +
    4*b0^2/a0^10*x0^50 + 3/a0^6*x0^48 + (4*a0^3*b0^2 + 4*b0^4)/a0^11*x0^46 +
    4*b0/a0^6*x0^45 + (3*a0^6 + 3*a0^3*b0^2 + 3*b0^4)/a0^10*x0^44 + (3*a0^3*b0^3 +
    3*b0^5)/a0^11*x0^43 + (2*a0^6 + 4*a0^3*b0^2 + 4*b0^4)/a0^9*x0^42 + (3*a0^6*b0 +
    3*a0^3*b0^3 + 4*b0^5)/a0^10*x0^41 + (a0^9 + 3*a0^6*b0^2 + 4*a0^3*b0^4 +
    4*b0^6)/a0^11*x0^40 + (2*a0^6*b0 + 2*b0^5)/a0^9*x0^39 + (2*a0^9 + a0^6*b0^2 +
    2*b0^6)/a0^10*x0^38 + (2*a0^6*b0 + 4*a0^3*b0^3 + b0^5)/a0^8*x0^37 + (a0^6*b0^2 +
    4*a0^3*b0^4 + 2*b0^6)/a0^9*x0^36 + (4*a0^6*b0^3 + b0^7)/a0^10*x0^35 +
    3*b0^4/a0^5*x0^34 + (4*a0^3*b0^3 + 3*b0^5)/a0^6*x0^33 + (2*a0^6 +
    2*b0^4)/a0^4*x0^32 + (a0^12*b0 + a0^9*b0^3 + 3*a0^6*b0^5 + 2*a0^3*b0^7 +
    2*b0^9)/a0^11*x0^31 + (4*a0^9 + 4*b0^6)/a0^6*x0^30 + (2*a0^12*b0 + 2*a0^9*b0^3 +
    3*a0^6*b0^5 + 4*a0^3*b0^7 + 4*b0^9)/a0^10*x0^29 + (2*a0^12*b0^2 + a0^9*b0^4 +
    4*a0^6*b0^6 + 4*a0^3*b0^8 + 4*b0^10)/a0^11*x0^28 + (4*a0^12*b0 + a0^9*b0^3 +
    4*a0^6*b0^5 + 2*a0^3*b0^7 + 2*b0^9)/a0^9*x0^27 + (4*a0^15 + 2*a0^12*b0^2 +
    4*a0^3*b0^8 + 4*b0^10)/a0^10*x0^26 + (4*a0^15*b0 + a0^12*b0^3 + 2*a0^9*b0^5 +
    2*a0^6*b0^7 + 2*a0^3*b0^9 + 2*b0^11)/a0^11*x0^25 + (4*a0^6 + 4*a0^3*b0^2 +
    2*b0^4)*x0^24 + (3*a0^9*b0 + 3*a0^6*b0^3 + 2*b0^7)/a0^4*x0^23 + (3*a0^9 +
    3*a0^6*b0^2 + 4*a0^3*b0^4 + 2*b0^6)/a0^2*x0^22 + (2*a0^9*b0 + b0^7)/a0^3*x0^21 +
    (3*a0^9*b0^2 + 4*a0^3*b0^6 + 2*b0^8)/a0^4*x0^20 + (4*a0^7*b0 + a0^4*b0^3)*x0^19 +
    (3*a0^6*b0^2 + 3*a0^3*b0^4 + 2*b0^6)*x0^18 + (3*a0^9*b0 + 4*a0^6*b0^3 + 3*a0^3*b0^5
    + 3*b0^7)/a0*x0^17 + (3*a0^12*b0^2 + 2*b0^10)/a0^5*x0^16 + (a0^12*b0 + 2*a0^9*b0^3
    + 4*a0^6*b0^5 + 4*a0^3*b0^7 + 4*b0^9)/a0^3*x0^15 + (4*a0^15 + a0^9*b0^4 +
    2*a0^3*b0^8 + 4*b0^10)/a0^4*x0^14 + (2*a0^15*b0 + 3*a0^12*b0^3 + 3*a0^9*b0^5 +
    a0^6*b0^7 + a0^3*b0^9 + 4*b0^11)/a0^5*x0^13 + (4*a0^15 + 4*a0^9*b0^4 + 2*a0^6*b0^6
    + 2*a0^3*b0^8 + 2*b0^10)/a0^3*x0^12 + (2*a0^18*b0^3 + a0^15*b0^5 + a0^12*b0^7 +
    a0^9*b0^9 + 4*a0^6*b0^11 + 4*b0^15)/a0^10*x0^11 + (a0^18 + 4*a0^15*b0^2 +
    3*a0^9*b0^6 + 2*a0^6*b0^8 + 4*a0^3*b0^10 + 2*b0^12)/a0^5*x0^10 + (a0^21*b0 +
    4*a0^18*b0^3 + 4*a0^12*b0^7 + 4*a0^9*b0^9 + 3*b0^15)/a0^9*x0^9 + (4*a0^24 +
    a0^21*b0^2 + 2*a0^18*b0^4 + a0^15*b0^6 + 4*a0^12*b0^8 + a0^9*b0^10 +
    3*b0^16)/a0^10*x0^8 + (a0^21*b0 + a0^18*b0^3 + a0^15*b0^5 + 3*a0^12*b0^7 +
    2*a0^9*b0^9 + 4*b0^15)/a0^8*x0^7 + (4*a0^24 + 2*a0^21*b0^2 + 3*a0^18*b0^4 +
    3*a0^15*b0^6 + 4*a0^12*b0^8 + 3*a0^9*b0^10 + 3*b0^16)/a0^9*x0^6 + (2*a0^24*b0 +
    2*a0^21*b0^3 + a0^18*b0^5 + 4*a0^15*b0^7 + 2*a0^9*b0^11 + 4*b0^17)/a0^10*x0^5 +
    (2*a0^16 + a0^13*b0^2 + 4*a0^4*b0^8 + 4*a0*b0^10)*x0^4 + (a0^15*b0 + 3*a0^12*b0^3 +
    4*a0^6*b0^7 + 2*a0^3*b0^9 + b0^11)*x0^3 + (4*a0^17 + 4*a0^14*b0^2 + 4*a0^11*b0^4 +
    a0^8*b0^6 + 4*a0^5*b0^8 + 2*a0^2*b0^10)*x0^2 + (a0^16*b0 + 4*a0^13*b0^3 +
    4*a0^10*b0^5 + 4*a0^7*b0^7 + 3*a0^4*b0^9 + a0*b0^11)*x0 + 4*a0^18 + a0^12*b0^4 +
    3*a0^9*b0^6 + a0^6*b0^8 + 3*b0^12

Optional Parameters

Timing: If you want to check the times for each part of the calculation or to see what the computer is doing at the moment

> a1,b1,_,_,a2,b2 := lift(a0,b0 : tm:=true);
Comp. 1st coord.
Done with 1st coord.
Partial time =  0.019
Total time =  0.019
**************************************************
Doing convertions and y0psm1, y0psp1
Done conv. and y0ps...
Partial time =  0.01
Total time =  0.029
**************************************************
Comp. x2
Done comp. x2
Partial time =  0
Total time =  0.029
**************************************************
comp witt prod and sum
Done comp. witt sum/prod
Partial time =  0
Total time =  0.029
**************************************************
computing rhs2
Done comp. rhs
Partial time =  0.52
Total time =  0.549
**************************************************
computing P2 and rem2
Done comp. P2 and rem2
Partial time =  0.271
Total time =  0.82
**************************************************
computing M2 and v2
%%%%%%%%%%%%%%
M2 is  9 x 9
Number of var is  9
%%%%%%%%%%%%%%
done comp. M2 and v2
Partial time =  0.209
Total time =  1.029
**************************************************
Solving the system
done solving the system
Partial time =  0.221
Total time =  1.25
**************************************************
total time =  1.349
> a1;
(a0^3*b0^2 + b0^4)/a0
> a2;
(2*a0^36 + a0^33*b0^2 + a0^30*b0^4 + 3*a0^27*b0^6 + 2*a0^24*b0^8 + a0^18*b0^12 +
    4*a0^12*b0^16 + 3*a0^9*b0^18 + 4*a0^6*b0^20 + 4*a0^3*b0^22 + 4*b0^24)/a0^11

Just Second Coordinate: If you just care for a1, b1, x1, and P1 (in this case, a2, b2, x2, P2 are not computed at all, what makes it very fast):

> a1, b1, x1, P1 := lift(F!2,F!3 : ncoord:=1);
> a1;
2
> P1;
2*x0^12 + 6*x0^10 + 4*x0^9 + 2*x0^6 + 6*x0^5 + x0^4 + 5*x0^3 + 4*x0^2 + 2*x0 + 6

Testing Results: If you want to test the result (I’m pretty sure the program is right though… it worked for every example I tried.)

> lift(g^33,g^2 : test:=true);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test1 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test2 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1 g^36 g^29*x0^7 + 2*x0^4 + g^33*x0^3 + g^95*x0^2 + g^64*x0 + g^35
g^91*x0^8 + 2*x0^6 + 4*x0^5 + g^64*x0^4 + g^95*x0^3 + g^66*x0^2 + g^4*x0 + g^122
g^37 g^41 g^73*x0^45 + g^81*x0^37 + g^99*x0^35 + g^83*x0^34 + g^85*x0^33 + g^17*x0^31 +
    g^114*x0^30 + g^25*x0^29 + g^36*x0^27 + g^91*x0^26 + g^104*x0^24 + g^35*x0^23 +
    g^11*x0^22 + g^25*x0^21 + g^121*x0^20 + g^40*x0^19 + g^102*x0^18 + g^32*x0^17 +
    2*x0^16 + g^46*x0^15 + g^22*x0^14 + g^37*x0^13 + g^23*x0^12 + g^86*x0^11 +
    g^76*x0^10 + g^27*x0^9 + g^16*x0^8 + g^14*x0^7 + g^94*x0^6 + g^21*x0^5 + g^12*x0^4
    + g^39*x0^3 + g^116*x0^2 + g^27*x0 + g^3
g^104*x0^56 + g^44*x0^54 + g^13*x0^53 + g^46*x0^52 + g^46*x0^51 + g^108*x0^50 +
    g^19*x0^48 + g^104*x0^46 + g^114*x0^45 + g^101*x0^44 + g^13*x0^43 + g^29*x0^42 +
    g^64*x0^41 + g^113*x0^40 + g^76*x0^39 + g^48*x0^38 + g^61*x0^37 + g^35*x0^36 +
    g^18*x0^35 + g^60*x0^34 + g^42*x0^33 + g^115*x0^32 + g^68*x0^31 + g^70*x0^30 +
    g^52*x0^29 + g^19*x0^28 + g^78*x0^27 + g^36*x0^26 + g^32*x0^25 + g^113*x0^24 +
    g^91*x0^23 + g^96*x0^22 + g^13*x0^21 + g^90*x0^20 + g^75*x0^19 + g^61*x0^18 +
    g^12*x0^17 + g^56*x0^16 + g^41*x0^15 + g^6*x0^14 + g^56*x0^13 + g^80*x0^12 +
    g^23*x0^11 + g^36*x0^10 + g^41*x0^9 + g^37*x0^8 + g^123*x0^7 + g^77*x0^6 +
    g^111*x0^5 + g^107*x0^4 + g^16*x0^3 + g^69*x0^2 + g^13*x0 + g^123

test 1 test for a1, b1, x1, P1, and test 2 test for a2, b2, x2, P2.

You can also mix all the options:

> a1,b1,x1,P1 := lift(a0,a0: tm:=true, test:=true, ncoord:=1);
Comp. 1st coord.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test1 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done with 1st coord.
Partial time =  0.01
Total time =  0.01
**************************************************

or

> a1,b1,x1,P1,a2,b2,x2,P2 := lift(a0,a0: tm:=true, test:=true);
Comp. 1st coord.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test1 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done with 1st coord.
Partial time =  0.01
Total time =  0.01
**************************************************
Doing convertions and y0psm1, y0psp1
Done conv. and y0ps...
Partial time =  0.011
Total time =  0.021
**************************************************
Comp. x2
Done comp. x2
Partial time =  0.009
Total time =  0.031
**************************************************
comp witt prod and sum
Done comp. witt sum/prod
Partial time =  0
Total time =  0.031
**************************************************
computing rhs2
Done comp. rhs
Partial time =  0.559
Total time =  0.59
**************************************************
computing P2 and rem2
Done comp. P2 and rem2
Partial time =  0.17
Total time =  0.76
**************************************************
computing M2 and v2
%%%%%%%%%%%%%%
M2 is  9 x 9
Number of var is  9
%%%%%%%%%%%%%%
done comp. M2 and v2
Partial time =  0.121
Total time =  0.881
**************************************************
Solving the system
done solving the system
Partial time =  0.06
Total time =  0.941
**************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test2 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
total time =  1.01
> a2;
2*a0^25 + a0^24 + a0^23 + 3*a0^22 + 2*a0^21 + a0^19 + 4*a0^17 + 3*a0^16 + 4*a0^15 +
    4*a0^14 + 4*a0^13
> x2;
2/a0^10*x0^45 + 2/a0^6*x0^37 + (a0^2 + a0 + 1)/a0^7*x0^35 + 2/a0^5*x0^34 + 3/a0^4*x0^33
    + (4*a0 + 4)/a0^4*x0^31 + 4/a0^5*x0^30 + 4/a0^3*x0^29 + (a0 + 3)/a0^2*x0^27 +
    2/a0*x0^26 + (4*a0 + 3)/a0*x0^24 + (4*a0^2 + 3*a0 + 1)/a0*x0^23 + (2*a0 +
    4)/a0*x0^22 + (a0 + 1)*x0^21 + (2*a0^4 + 4*a0^3 + 2*a0^2 + a0 + 1)/a0^2*x0^20 +
    (a0^3 + 3*a0^2 + 4)*x0^19 + (2*a0^3 + a0^2 + 4*a0)*x0^18 + (2*a0^4 + a0^3 +
    a0^2)*x0^17 + (3*a0^3 + 4*a0^2 + 3*a0)*x0^16 + (4*a0^5 + 4*a0^4 + 3*a0^2)*x0^15 +
    (4*a0^5 + 2*a0^3)*x0^14 + (3*a0^6 + 4*a0^5 + 3*a0^4 + 2*a0^3)*x0^13 + (3*a0^6 +
    2*a0^5 + a0^4 + 2*a0^3)*x0^12 + (2*a0^6 + 3*a0^5 + 4*a0^4 + 2*a0^3)*x0^11 + (2*a0^6
    + 4*a0^5 + 3*a0^4)*x0^10 + (3*a0^7 + 2*a0^6 + 4*a0^5 + 4*a0^4)*x0^9 + (2*a0^7 +
    2*a0^6 + 4*a0^5 + a0^4)*x0^8 + (3*a0^7 + 3*a0^6 + a0^5 + 2*a0^4)*x0^7 + (3*a0^8 +
    3*a0^6 + 2*a0^5)*x0^6 + (4*a0^10 + 3*a0^8 + a0^7 + 2*a0^6 + a0^5 + 2*a0^4 +
    2*a0^3)*x0^5 + (a0^8 + 3*a0^7 + 4*a0^6 + 2*a0^5)*x0^4 + (4*a0^9 + 4*a0^8 + a0^7 +
    3*a0^6)*x0^3 + (2*a0^9 + 2*a0^8 + 4*a0^6)*x0^2 + (2*a0^9 + 4*a0^6)*x0 + 4*a0^12 +
    a0^11 + 4*a0^10 + a0^9 + a0^8 + 3*a0^7 + 3*a0^5

Minimal Liftings

If you want to compute the minimal lift:

> _,_,_,_,_,_,x2 :=lift(a0,a0 : test:=true, minimal:=true);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test1 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test2 is OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> x2;
2/a0^6*x0^37 + (a0 + 1)/a0^7*x0^35 + 2/a0^5*x0^34 + 3/a0^4*x0^33 + (4*a0 +
    4)/a0^4*x0^31 + 3/a0^5*x0^30 + 4/a0^3*x0^29 + (a0 + 3)/a0^2*x0^27 + 2/a0*x0^26 +
    (4*a0 + 3)/a0*x0^24 + (4*a0^2 + 3*a0 + 1)/a0*x0^23 + (2*a0 + 4)/a0*x0^22 + (a0 +
    1)*x0^21 + (2*a0^4 + 4*a0^3 + a0 + 1)/a0^2*x0^20 + (a0^3 + 3*a0^2 + 4)*x0^19 +
    (2*a0^3 + a0^2 + 4*a0)*x0^18 + (2*a0^4 + a0^3 + a0^2)*x0^17 + (3*a0^3 + 4*a0^2 +
    3*a0)*x0^16 + (2*a0^5 + 4*a0^4 + 3*a0^2 + 4)*x0^15 + (4*a0^5 + 2*a0^3)*x0^14 +
    (3*a0^6 + 4*a0^5 + 3*a0^4 + 2*a0^3)*x0^13 + (3*a0^6 + 2*a0^5 + a0^4 + 2*a0^3)*x0^12
    + (2*a0^6 + 3*a0^5 + 4*a0^4 + 2*a0^3)*x0^11 + (2*a0^6 + 3*a0^5 + 3*a0^4)*x0^10 +
    (3*a0^7 + 2*a0^6 + 4*a0^5 + 4*a0^4)*x0^9 + (2*a0^7 + 2*a0^6 + 4*a0^5 + a0^4)*x0^8 +
    (3*a0^7 + 3*a0^6 + a0^5 + 2*a0^4)*x0^7 + (3*a0^8 + 3*a0^6 + 2*a0^5)*x0^6 + (4*a0^10
    + 3*a0^8 + a0^7 + 2*a0^6 + 2*a0^4 + 2*a0^3)*x0^5 + (a0^8 + 3*a0^7 + 4*a0^6 +
    2*a0^5)*x0^4 + (4*a0^9 + 4*a0^8 + a0^7 + 3*a0^6)*x0^3 + (2*a0^9 + 2*a0^8 +
    4*a0^6)*x0^2 + (2*a0^9 + 4*a0^6)*x0 + 4*a0^12 + a0^11 + 4*a0^10 + a0^9 + a0^8 +
    3*a0^7 + a0^5

Note that this x2 has degree 37 and the one above (Teichmuller) has degree 45!

Another example:

> a1,b1,x1,P1,a2,b2,x2,P2:=lift(F!3,F!2 : minimal:=true);
> x2;
5*x0^73 + 2*x0^71 + 2*x0^70 + x0^69 + 5*x0^68 + x0^67 + 6*x0^66 + 6*x0^64 + 5*x0^62 +
    6*x0^61 + 4*x0^60 + 5*x0^58 + 3*x0^57 + 3*x0^56 + x0^55 + x0^54 + 3*x0^52 + 4*x0^50
    + 3*x0^48 + x0^47 + 4*x0^45 + 5*x0^43 + 3*x0^42 + x0^41 + 3*x0^40 + 4*x0^39 + x0^38
    + x0^36 + x0^35 + 6*x0^33 + 5*x0^29 + x0^27 + 3*x0^26 + 5*x0^25 + x0^23 + 2*x0^21 +
    2*x0^20 + 5*x0^19 + 5*x0^18 + 6*x0^17 + 2*x0^16 + 4*x0^15 + 6*x0^13 + 5*x0^12 +
    2*x0^11 + 3*x0^10 + 5*x0^9 + 5*x0^8 + 2*x0^6 + x0^5 + 6*x0^4 + 2*x0^3 + 4*x0^2 +
    2*x0

Quiting

To quit Magma:

> quit;

Total time: 11.070 seconds

If you have any question or comment, feel free to email me.