###########################
# examP
# for MapleV Releases 3 to 5.1 (at least)
##############################################
Exam:=proc() local a,a1,a2,a3,a4,a6,b,c,DD,l,t,c4,c6;global i,iee;
  l:=proc();lprint(args);end;
  if nargs=0 then 
l(` Exam(args); will print examples according to the following menu:`):
    exam();
l(``);
  elif nargs=1 then  
    i:=args:
    if not type(i,posint) or i>6 then print(qts):RETURN();fi;
    if i=1 then
l(`POSSIBLE TORSION subgroups of E(Q):`);
l(`    Mazur's famous theorem is that the possibile torsion subgroups of\
 E(Q)`); 
l(` -- here denoted T -- are, where Cn denotes the cyclic group of order\
 n:`);
print(`Cn  for 1<=n<=10 and n=12, and`);
print(`C2 X Cn for n=2,4,6,8.`);
l(` The following tables give parametrizations (all genus 0 from the`);
l(` modular curve X_1 point of view), originally due to Tate (?), of all`);
l(` curves/Q with at least the indicated T; that is, any choice of the`);
l(` parameter(s) subject to the condition that the discriminant DD<>0`);
l(` gives an E with at least that torsion. For each possible group we`);
l(` give the curve with smallest conductor Nc whose T is exactly that g\
roup,`);
l(` and sometimes a simpler example with larger Nc. All these examples a\
re`);
l(` in the starter catalog of apecs, and all happen to have rank r4=0.`);
l(` `);
l(`    The E with trivial torsion and smallest Nc is C11.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`    The cases C2,C3,C2XC2 don't fit well into the table so we list`);
l(` them separately:`);
print(`C2:      `,Y^2+a1*X*Y=X^3+a2*X^2+a4*X);
print(` such that  DD`=a4^2*(a1^4+8*a1^2*a2+16*a2^2-64*a4),`<>0`);
l(`or, completing the square, Y^2=X^3+a2 X^2 +a4 X with DD=16a4^2(a2^2-4\
a4)<>0.`);
l(` Example  A64: `,Y^2=X^3+X,` ; the example with smallest conductor is`);
l(` E14: `,Y^2+X*Y+Y=X^3-171*X-874,` with point `,[X,Y]=[15,-8]);
l(` of order 2. One can replace `,X,Y,` with `,X+15,Y-8);
l(` to obtain an equation with a3=a6=0.`);
l(` Also: E has a point of order 2 iff jay=(t+16)^3/t, some t in Q* ---`);
l(` See Exam(3).`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
print(`C2XC2: `,Y^2=X^3+a2*X^2+(a2^2/4-a^2)*X,` a in Q*, DD=`,\
  4*a^2*(a2^2-4*a^2)^2);
print(` Example    A32: `,Y^2=X^3-X,` ; smallest Nc example: E15.`);
l(`Command to generate examples:  Exam(4,a2,a)`);
print(`C3:      `,Y^2+a1*X*Y+a3*Y=X^3);
print(` such that DD`=a3^3*(a1^3-27*a3),`<>0`);
print(` Example    A27: `,Y^2+Y=X^3,` ; smallest Nc example: A19`);
l(`Command to generate examples:  Exam(3,a1,a3)`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`   Next for Cn with n>3, the curve is`);exam(1):
    elif i=2 then
l(` COMPLEX MULTIPLICATION:`);
l(`    An elliptic curve E/Q has CM when there is a (non-trivial)`);
l(` twist E'/Q that is isogenous to E. Since there is a slight subtlety`);
l(` when jay=1728, let us recall some generalities about twists.`);
l(`    Two elliptic curves defined over a field K are twists of one`);
l(` another when they become isomorphic over an extension field. This is`);
l(` so iff they have the same jay, and is therefore easily detected.`);
l(` To avoid technicalities let us suppose that char(K)<>2 or 3.`);
l(` Then E, and similarly E', can be taken in the Weierstrass "c-form"`);
print(Y^2=X^3-c4/48*X-c6/864);
l(` The transformation equations of an isomorphism E-->E' defined over`);
l(` an extension of K (u*a1'=a1+2s, etc. in the usual notation) imply`);
l(` r=s=t=0 and u^4*c4'=c4, u^6*c6'=c6. When c4<>0 (<==>jay=c4^3/DD<>0`);
l(` where DD denotes the discriminant in apecs) and c6<>0 (<==>jay<>1728`);
l(` since jay-1728=c6^2/DD) this implies that u^2 is in K and the twist`);
l(` is quadratic. Writing u^2=a, E' has the c-form`);
print(Y^2=X^3-a^2*c4/48*X-a^3*c6/864);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` We indicate such a quadratic twist by E'=E*a; then also E=E'*a, by an`);
l(` obvious change of variables in the above equations.`);
l(`   When jay=1728, then E: Y^2=X^3-c4*X/48 is isomorhic to`);
l(` E': Y^2=X^3-b*c4*X/48 only over Q(b^(1/4)), and so E' may be a`);
l(` quartic twist. Similarly there are cubic and sextic twists when`);
l(` jay=0. However for any curve with jay=0 or 1728 there always exists`);
l(` a rationally defined isogeny to a quadratic twist (there is always a`);
l(` "rational manifestation" of CM), as we now explain.`);
l(`   Let H be the subgroup of order 2 generated by the point [0,0] on`);
l(` E: Y^2=X^3+BX. Then Velu's formulas give E/H=E': Y^2=X^3-4BX. This`);
l(` is the only non-obvious quadratic twist: -4=(1+I)^4 and so E and E'`);
l(` are isomorphic over K(I). Secondly, if H is the subgroup generated`);
l(` by the point [0,sqrt(C)] of order 3 on E: Y^2=X^3+C, then H is`);
l(` rationally defined and E/H=E': Y^2=X^3+(-3)^3C this time is a`);
l(` "natural" quadratic twist.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`   There are just 13 values of jay in Q that possess CM. We tabulate`);
l(` these values along with the smallest conductor example E, and`);
l(` d=the degree of the isogeny to E', with the standard apecs`);
l(` convention: a minus sign is attached to d when the kernel is not`);
l(` defined pointwise/Q. We also list D=the disriminant of the`);
l(` endomorphism ring End_C(E), which is an order in an imaginary`);
l(` quadratic field. We have E'=E*D for all our examples except the`);
l(` pair for jay=1728. Any E''/Q with CM has jay in the list and E''`);
l(` is a twist (possibly non-quadratic when jay=0 or 1728) of the`);
l(` corresponding E in the list. When quadratic, say E''=E*a, then`);
l(` E'' is isogenous to E'*a.`);
l(`    The equations of the isogeny E ---> E' and also those of the`);
l(` dual E' ---> E have been worked out and stored in the catalog for`);
l(` all d<=27. This means that for any E''/Q  with any CM except (for`);
l(` the time being) the three top values with CM by -43,-67 or -163,`); 
l(` the equations of the isogeny E'' ---> E''' and its dual can be`);
l(` calculated immediately: the apecs command to have this`);
l(` done, with the "present curve"=E'', is Tri(E'''). (If E''' is not`);
l(` yet in the catalog then do Isog first). For the dual isogeny`);
l(` change the present curve to E''' (by Ein or Go) and then Tri(E'').`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
      exam(2);
    elif i=3 then
l(` ISOGENY NETWORKS possible/Q:`);
l(`    The number of curves in an isogeny class/Q is 1,2,3,4,6 or 8`);
l(` (Kenku, J. Num. Th., '82). Most of these numbers can occur in`);
l(` distinct ways; we give examples of all possibilities below. As in`);
l(` Antwerp IV, we draw a network: the vertices are the curves of the`);
l(` class, the edges are the isogenies of prime degree and the weight`);
l(` of an edge is the degree. Clearly every isogeny of composite degree`);
l(` is the composition of isogenies of prime degree.`);
l(`    Following on his proof that the only possible values of`);
l(` |tor(E(Q))| (denoted NN in apecs) are 1..10, 12, and 16, Mazur prove\
d`);
l(` that the degrees of isogenies/Q with cyclic kernel that occur are:`);
print(`1..19,21,25,27,37,43,67 and 163`);
l(`    When jay<>0 or 1728 the isogeny network that a particular E has,`);
l(` and its position in that network (up to network isomorphism) are`);
l(` entirely determined by the`);
l(` value of jay because two E's with the same jay are quadratic twists`);
l(` of one another and isogenies survive quadratic twists: if f:E-->E'`);
l(` is an isogeny then an obvious definition gives f*a:E*a-->E'*a`);
l(` (and the apecs procedures Isog and Tri take advantage of this`);
l(` whenever possible). But for each of jay=0 and 1728, several differe\
nt`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` networks of isogenies occur; see below. Thus in a list of isogeny`);
l(` network type vs. jay, a particular jay <>0,1728 will occur at most`);
l(` once. One could refine this by making the network partially`);
l(` directed: let E-->E' signify that all the points in the kernel of`);
l(` the isogeny going in the direction of the arrow are rational.`);
l(` Thus if p denotes the degree,`);
l(`        (i) we always have E<-->E' when p=2;`);
l(`        (ii) we never have E<-->E' when p>2 ? I don't know for sure;`);
l(`        (iii) (Serre) when E (hence also E') is semi-stable i.e. all`);
l(` bad primes are multiplicative, we have either --> or <--.`);
l(`    Isog uses (i) and (iii).`);
l(`    I suppose there are moduli schemes that determine all jay in Q`);
l(` attached to a particular vertex of one of these networks, but we`);
l(` content ourselves with the usual modular curves X0(N) which`);
l(` classify E with a cyclic isogeny of degree N. Let I(N) denote the`);
l(` set of jay that occur and let g denote the genus of X0(N)`);
l(`    g=0<==>N is one of 1..10,12,13,16,18,25<==>there are infinitel\
y many`);
l(` jay with a cyclic isogeny of degree N. Then I(N) is parametrized by\
 the`);
l(` N-th Fricke polynomial frN. Apecs knows only fr2,fr3,fr5,fr7,fr13,\
 and`);
l(` we only list these; we'll add the cases N=4,6,8,9,10,12,16,18,25 lat\
er.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`  N  ||  jay in I(N) parametrized by T in Q*`);
l(` ----||----------------------------------------`);
l(`  2  ||  (T + 16)^3/T`);
l(`  3  ||  (T + 27)(T + 3)^3/T`);
l(`  5  ||  (T^2 + 10T + 5)^3/T`);
l(`  7  ||  (T^2 + 13T + 49)(T^2 + 5T + 1)^3/T`);
l(` 13  ||  (T^2 + 5T + 13)(T^4 + 7T^3 + 20T^2 + 19T + 1)^3/T`);
l(``);
l(` fr||N=T*(R-jay), where R denotes the entry in the right column for N.`);
l(` There's only one rational T for a given jay except when N=2 and`);
l(` jay=1728. For an isogeny E---E' we have the pairs jay, jay' and T,T\
'.`);
l(` In cases where E--E' arises from CM, T=T' and jay=jay'; see Exam(2)\
.`);
l(` The relationship in the five cases is`);
print(`TT'`=2^12,`TT'`=3^6,`TT'`=5^3,`TT'`=7^2,`TT'`=13);
l(` This allows easy calculation of the "isogenous" jay' starting from j\
ay:`);
l(`       f:=op(1,fr||N):T:=roots(fr||N)[1][1]:jayprimed:=f;T:='T':`);
l(` --must restore capital letters in apecs to "unevaluated".`);
l(`    We can use apecs to work out the case N=2 explicitly. We list, wi\
th`);
l(` comments, the commands entered then the output sent to the screen.`);
l(`    1.  genj((T+16)^3/T); #Menu(genj) describes this command ===>  `);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` [1, 0, 0,-36*T/(T**3+48*T**2-960*T+4096),-T/(T**3+48*T**2-960*T+4096)\
]`);
l(` This list, called "yo", = the Weier. coef.'s; to make it more readabl\
e`);
l(`    2. factor(yo); (or simply factor(%);) ===>`);
print([1, 0, 0, -36*T/(T+64)/(T-8)**2, -T/(T+64)/(T-8)**2]);
l(`    3. x:='x':Q1:=absc(solve(prac,x)); ===> [2/(T-8),-1/(T-8)]`);
l(` This is a point of order 2 on the curve--2/(T-8) is a root`);
l(` of the apecs variable prac:=x^3+(b2/4)*x^2+(b4/2)*x+b6/4 (see Nota()\
;)`);
l(` solve ==> a list of 3 roots, absc picks the first one, disregarding th\
e`);
l(` irrat. roots and ==> a point with the given abscissa 2/(T-8).`);
l(`    4. velu(Q1);factor(jay); ===> (T + 256)^3/T^2`);
l(` the "present" curve is now the 2-isogenous curve E/<P>. To see its`);
l(` Weierstrass coef.'s in a readable form do factor(we()); (see Menu(we\
)).`);
l(`    5. solve((T1+16)^3/T1)=jay,T1)[1]; ===> 4096/T`);
l(` T1 stands for T'. The two equality cases T=T'=-64 and T=T'=64 corres\
pond`); 
l(` to CM by -4: A32--B32 and CM by -8: A256--B256.`);
l(`    The following is a complete list of finite non-empty I(N). A CM`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` isogeny of degree N contributes one jay to I(N), while an ordinary`);
l(` isogeny contributes two. See Exam(2) for more info. on the CM cases.`);
l(` The remaining cases N=4,6,8,9,10,12,16,18,25 have g=0 and infinite I\
(N).`);
l(` The jay for N=19 is misprinted in Antwerp IV=yellow lectures #476, \
p.79.`);
l(`  N  ||    CM jay    ||    non-CM pair jay,jay'      || example`);
l(`-----||--------------||------------------------------||--------------`);
l(`  11 ||    -2^(15)   ||                              || D121--E121`);
l(`  11 ||              ||      -11^2 , -11*131^3       || F121--G121`);
l(`  14 ||              ||    -15^3 , (3*5*17)^3        || A49--D49`);
l(`  15 ||              ||  -5*29^3/2^5,-5^2*241^3/8    || A50--D50`);
l(`  "  ||              ||    5*211^3/2^(15),-25/2      || B50--C50`);
l(`  17 ||              ||-17^2*101^3/2,-17*373^3/2^(17)|| A--B14450`);
l(`  19 || -2^(15)*3^3  ||                              || A--B361`);
l(`  21 ||              ||  15^3/2 , -9*(5*101/2^7)^3   || A--C162`);
l(`  "  ||              || -9*(25/2)^3,-(3*5*383)^3/2^7 || B--D162`);
l(`  27 || -3*(32*5)^3  ||                              || C--D27`);
l(`  37 ||              ||   -7*11^3,-7*137^3*2083^3    || A--B1225`);
l(`  43 || -(64*3*5)^3  ||                              || A--B1849`);
l(`  67 ||-(32*3*5*11)^3||                              || A--B4489`);
l(` 163 ||-(64*3*5*23*29)^3 ||                          || A--B26569`);
l(`    Finally we list all the (undirected) networks that occur.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
      exam(3);
    elif i=4 then
l(`EXAMPLES/Q of (succesively) larger rank`);
l(`   Let E be an elliptic curve defined over Z and let E(Q)=T x Z^r`);
l(`where T is the finite torsion subgroup. The apecs starter catalog, a\
s of`);
l(`version 6, contains all the examples in the table below; ncur=the (apecs`);
l(`starter) catalog number. To call up the curve from the cat. use Ein(ncur).`);
l(`Alternatively, when there is an entry in the args column in the table,`);
l(`Exam(args) will produce that curve; in fact many of these curves`);
l(`were discovered by systematically taking the parameter(s) in args in the`);
l(`sequence of rationals ordered according to naive height. For instance`);
l(` `);
print(`exam(16,1,5/12);rkNC();`);
l(`turned up the example with T = C2xC8, r = 3; this curve was found in a`);
l(`different way by Andrej Dujella (internet posting Apr. 26/00). For`);
l(`details see Menu(Ein0). Also, the example T = C2xC8, r = 2 was found in`);
l(`a different way by Randall Rathbun (internet Sep. 25/99); for details`);
l(`see Menu(Gcub). For a list of all E/Q up to conductor 5077, see`);
l(`Cremona's web-published tables:`);
print(`http://www.maths.nottingham.ac.uk/personal/jec`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`   New in apecs ver. 5.7: there are better examples and new examples`);
l(`in the table, including many from Tom Womack; see`);
l(`    http://tom.womack.net/maths/conductors.htm`);
l(`     "           "         "   /torstab.htm`);
l(`     "           "       /mordellc.htm   (for record y^2=X^3+k)`);   
l(`(    "           "       /conductors.html  is out of date)`);
l(`   New in apecs ver.  6: The example with T = C3, r = 4 from Garikai`);
l(`Campbell's thesis:`);
l(`    http://www.swarthmore.edu/NatSci/gcampbel/`);
l(`This example (which can be confirmed by the sequence of apecs commands`);
print(`Exam(3,-109,421);RkNC();Seek(1200);)`);
l(`inspired me to use the command Weier_fit to find the examples of T = C2`);
l(`and r = 4,5 with relatively small conductor; see Menu(Weier_fit) for`);
l(`details. For confimation of these two examples: RkNC().`);
l(`   Also first appearing this version: table entries for r = 3 and`);
l(`T = C7, C8, C2xC6 (found by Exam(--,a) for a of incr. naive height).`);
l(`  `);
l(`   The examples above the dotted line have the smallest Nc for the given`);
l(`T and r. Those below the line have the smallest Nc that I know of.`);
l(`See Exam(1) for minimum Nc examples of r=0 and all possible T.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
    exam(4);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`The curves with T=O and r=4,5 are, respectively,`);
l(`       y^2+xy=x^3-x^2-79x+289,`);
l(`       y^2+y=x^3-79x+342;`);
l(`the first was found with the aid of the apecs command Cubic_fit,`);
l(`the 2nd is from Brumer & McGuiness, The behavior..., Bull. AMS,`);
l(`23(1990), 375--382 (and rediscovered by Cubic_fit).`);
l(`The examples of r=6 to 10 are all due to Tom Womack; several of them`);
l(`replace earlier examples with larger conductors that are still in`);
l(`the catalog: the example n=605 for r=6 improves previous entries in`);
l(`the table obtainable from the cat. by Ein(n) for n=587, 586, and 539`);
l(`(in order of increasing Nc).`);
l(`   The example of r=7 improves on Ein(548), also found by Womack, and`);
l(`has a slightly smaller conductor than Ein(453), an example emailed to`);
l(`me by Jim Buddenhagen.`);
l(`   The example of r=8 improves the close runner-up E(454) from Mestre,`);
l(`Formules explicites..., Comp. Math. 58(1986); Ein(607) (Womack) lies`);
l(`between these two.`); 
l(`   The example of r=9 improves on Ein(550), another example from`);
l(`Jim Buddenhagen, which in turn improves on Ein(455) from Mestre, ibid.`);
l(`   The example of r=10 improves on Mestre's Ein(456).`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`   The examples of r=11..14 are all from Mestre's paper; but note that`);
l(`for r=13 his D and abscissae x seem to have been miscopied from another`);
l(`example.`);
l(`   A number of these curves have catalog entries indicating that apecs`);
l(`commands such as Isog, RkNC, Rk1, Seek, Bas, ... have not been`);
l(`carried out, in case one wants to see apecs at work. To verify the rank,`);
l(`up to r=9 Rk1 works well. For r=10 and higher it is preferable to use`);
l(`Mest and Seek1 alternately until the lower and upper bounds for the rank`);
l(`coincide, the reason being that these curves have r independent integral`);
l(`points --- Rk1 uses seek rather than seek1, which takes too long. And`);
l(`for higher r eschew Rk which can get into interminable L-function`);
l(`calculations.`);
l(`   For ncur=469..474 the catalog contains examples with T=C2 and r=7\
..9`);
l(`taken from Kretchmer, Construction of Elliptic Curves..., Math. Comp.`);
l(`46(1986), 627--635.`);
l(`  Mestre and others have published examples of r=15,16,...; the big\
gest`);
l(`as far as I know: an example with r>=24 due to Roland Martin and`);
l(`William McMillen -- an internet posting Jan. 2000.`);
l(`However apecs cannot reasonably handle such big examples; for one thing,`);
l(`it bogs down trying to factor the discriminant DD --- but see`);
l(`Menu(Afac) for a way around this problem.`);
    elif i=5 then
l(`  Here we seek "earliest" E/Q of certain types, earliest`);
l(`meaning with the smallest conductor. Of course better examples are`);
l(`always welcome: e-mail connell@math.mcgill.ca.`);
l(`  Most of the examples that follow became part of the apecs catalog`);
l(`in Aug. 1997 and Feb. 1998. So these curves are in the catalog`);
l(`for apecs version>= 4.36.`);
l(`  We will refer to seven papers:`);
l(`[1] K. Kramer, A family of semistable elliptic curves with large Tate-`);
l(`    Shafarevitch groups, Proc. Amer. Math. Soc., 89(1983), 379--386.`);
l(`[2] G. Kramarz and D. Zagier, Numerical investigations related to the`);
l(`L-series of certain elliptic curves, J. Indian Math. Soc., 52(1987), 51\
--69`);
l(`[3] J. Cremona, The analytic order of III for modular elliptic curves,`);
l(`    J. Th. Nombres Bordeaux 5(1993), 179--184.`);
l(`[4] B.M.M. deWeger, A+B=C and big III's, Quar. J. Math. Oxford,`);
l(`49(1998), 105--128.`);
l(`[5] A. Nitaj, D/'{e}termination de courbes elliptiques pour la conjecture`);
l(`    de Szpiro, Acta Arith., to appear.`);    
l(`[6] H.E. Rose, On some classes of elliptic curves with rank two or three,`);
l(`    Univ. of Bristol Math. research report no. PM-97-01, 1997.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`[7] T. Womack, http://tom.womack.net/maths/torstab.htm`);
l(`  shaf denotes the (conjectured) order of the Shafarevich-Tate group.`);
l(`  In Aug. '97, the largest shaf I knew was 224^2=50176, an example sent`);
l(`to me by deWeger (see [4]). This also gave the largest known ratio`);
l(`shaf/sqrt(Nc)=6.983, where Nc=conductor=51636585. The cat. name is`);
l(`cur=A51636585 and the cat. number (in the apecs starter cat.) is ncur=549\
.`);
l(`The motivation for considering this ratio, now called the deWeger ratio,`);
l(`is explained in [4].`);
l(`  However this example is eclipsed by one sent to me by Nitaj in`);
l(`Jan. '98 (see [5]): shaf=1832^2 with deWeger ratio 42.265. The example is`);
l(`cur=A6305720190 and (in the starter catalog for ver.>=4.36) ncur=577.`);
l(`  Here are examples of shaf=n^2 for n=2..8 (all with rank r4=0) taken`);
l(`from [3] except for n=6 and 8. Cremona went systematically through his`);
l(`cat. of curves with Nc<1000, and so these examples, except for n=6,8,`);
l(`are the earliest. I found the examples for n=6,8 as follows. (Cremona`);
l(`subsequently extended his search to 1000<Nc<3000, and these examples too`);
l(`are the earliest.)`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`The Birch, Swinnerton-Dyer conj. says that`);
l(``);
l(`          shaf = ey(r4,dd)*NN^2/(r4!*omeg*reg*cP)`);
l(``);
l(`The procedure ey(r4,dd) calculates the r4-th derivative of the L-function`);
l(`of E at s=1 to dd digits, and of course in practice this eqn. is only`);
l(`approximate. (In fact the procedure sha() loops on increasing dd until`);
l(`the right side is reasonably close to the square of an integer.) This`);
l(`suggests that large NN should give large shaf, "other things being equal".`);
l(`This is borne out in practice to some extent, except that the large shaf`);
l(`is usually that of an isogenous curve with smaller NN --- so much for`);
l(`the heuristics. exam(12,1,-2);isog();... leads to the shaf=36 example;`);
l(`exam(8,-1/3);isog();... leads to shaf=64.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`  shaf |     cur     |   ncur   | shaf/sqrt(Nc) | Cremona's cat. no.`);
l(`======================================================================`);
l(`   4   |     H66     |    186   |    .4924      |     66B3`);
l(`   9   |    C182     |    554   |    .6671      |    182B3`);
l(`  16   | G210 & H210 | 489 & 490|   1.104       |  210E8 & E7`);
l(`  25   |    C275     |    557   |   1.508       |    275B3`);
l(`  36   |    M2310    |    565   |    .7490      |   2310T7`);
l(`  49   |    B546     |    559   |   2.097       |    546F2`);  
l(`  64   | F & G 1230  | 574 & 575|   1.825       | 1230F7 & F8`);      
l(``);
l(`All the E in [4] have, apparently, rank r4=0. To find early examples of`);
l(`shaf>1 and r4>0 I first tried the curves x^3+y^3=m as in [2],`);
l(`using Gcub(1,0,0,1,0,0,0,0,0,-m);Isog(),.., but Nc soon becomes too big`);
l(`to be managed by apecs. `);
l(`So I turned to the family of curves in [1], namely`);
l(`              y^2+xy=x^3-16m*x^2-8m*x-m.`);
l(`and of course curves isog. to these. For m=10 (resp. m=15*13) we get`);
l(`Nc=1610, shaf=4 (resp. Nc=608595, shaf=16). Both have rank r4=1.`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`   In [6], Rose has much interesting data on shaf for the following two`);
l(`families: C_p:y^2=x^3+px and D_p:y^2=x^3-2px where p is a prime ==1 mod 8.`);
l(`For example, C_51137 has r4=2 and shaf=9. His table S7 lists examples of`);
l(`D_p with r4=1 and shaf>1. Of course these curves have large Nc: for C_p,`);
l(`Nc=64p^2 and for D_p, Nc=256p^2.`);
l(`    Womack [7] lists examples of E with smallest known Nc with specified`);
l(`torsion and shaf in the ranges 4<=NN<=16, 1<=shaf<=25; all have r4=0.`);
l(`[7] was also an important source of examples for Exam(4).`);
    else
l(`    The intention is to have a handy compendium of examples that set`);
l(`records or are remarkable in some way. Any e-mailed to me would be much`);
l(`appreciated.`);
l(`    Nitaj (see reference [5] in Exam(5);) has obtained many interesting`);
l(`E with high Szpiro ratio log(abs(DD))/log(Nc) (calc. in apecs by Szp();).`);
l(`His best example to date, and one believes the highest Szpiro ratio known,`);
l(`is A2526810 with ncur=581 (in the starter catalog for apecs ver.>= 4.36)`);
l(`with Szpiro ratio = 8.81194.`);
    fi;
  else iee:=1:exam(args);
  fi;
  iee:=0:NULL;
end:

exam:=proc() 
local b,c,cuu,d,e,f,i,l,t;
  l:=proc();lprint(args);end;
  cuu:=`This value of the parameter is not allowed (makes DD=infinity).`;
  if nargs=0 then 
    i:=0;
l(`             args  ||  topic`);
l(`            -------||--------------------------------------`);
l(`                1  ||  possible torsion`);
l(`                2  ||  complex multiplication`);
l(`                3  ||  isogenies`);
l(`                4  ||  large rank`);
l(`                5  ||  Shafarevich-Tate groups`);
l(`              * 6  ||  misc. (e.g.height, regulator, Szpiro ratio)`);
l(`             n,xx  ||  where xx is one or more args, generates`);
l(`                   ||  examples with torsion subgroup of order n`);
l(`                   ||  (at least). See Exam(1) for details.`);
l(`              * barely begun`);
  else 
    i:=args[1]:
  fi;
  if nargs=1 then
    if not type(i,posint) or i>6 then print(qts):RETURN();fi;
    if i=1 then
print(Y^2+(1-c)*X*Y-b*Y=X^3-b*X^2);
l(`with the parameters b,c chosen as follows:`);
l(`  T ||         b             ||         c        || example`);
l(`----||-----------------------||------------------||----------------`);
l(`  C4||         b             ||         0        ||b=-1:  A15`);
l(`  C5||         b             ||         b        ||b=1:  A11`);
l(`  C6||       c+c^2           ||         c        ||c=-1/2:  A14`);
l(`  C7||      d^3 - d^2        ||     d^2 - d      ||d=-1: D26`);    
l(`  C8||   (d - 1)(2d - 1)     ||  (d-1)(2d-1)/d   ||d=1/6: F15`);
l(`  C9||e^5 - 2e^4 + 2e^3 - e^2||    e^3 - e^2     ||e=-1: B54`);
l(` C10||e^3(1 - 3e + 2e^2)/    ||-e(1-3e+2e^2)/    ||e=1/3:I66`);
l(`    ||  (1 - 3e + e^2)^2     ||    (1-3e+e^2)    ||`);
l(` C12||f^(-4)(1 - f)(1 - 2f)* ||f^(-3)(1-f)(1-2f)*||f=1/3:G90`);
l(`    || (1-2f+2f^2)(1-3f+3f^2)||       (1-3f+3f^2)||`);
l(` `);
l(`Command to generate examples: Exam(n,x) where 4<=n<=10 or n=12 and`);
l(`x is the value of the corresponding param. b,b,c,...,f.`);
l(`The examples in this table and the following have the smallest possi\
ble`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(`conductor for the given T; however in some cases a simple transforma\
tion`);
l(`is needed to put the equation in standard minimal Weierstrass form \
---`);
l(`after Ein(1-c,-b,-b,0,0) with appropriate b,c, Trwc() displays the t\
ransf.`);
l(` `);
l(`   For C2XCn, n=4,6,8, choose the parameter for Cn as follows:`);
l(`   T   || parameter               || example`);
l(`-------||-------------------------||-------------------`);
l(` C2XC4 || b = (t^2 - 1)/16        || t = 3/5:  B15`);
l(` C2XC6 || c = (2t - 10)/(9 - t^2) || t = -1: B30`);
l(` C2XC8 || d = (2 + t)/(2 - t^2)   || t = 1:  A210`);
l(` `);
l(`Command to generate examples: Exam(n,1,t) where n=8,12 or 16, the 1`);
l(`is a dummy arg. to indicate a non-cyclic case, and t is the param.`);
    elif i=2 then
l(`       CM jay         ||   E   ||   E'  ||  d  ||  D `);
l(`----------------------||-------||-------||-----||--------`);
l(`      12^3=1728       ||  A32  ||  B32  ||  2  ||  -4`);
l(`      20^3=8000       ||  A256 ||  B256 ||  2  ||  -8`);
l(`          0           ||  A27  ||  B27  ||  3  ||  -3`);
l(`       -15^3          ||  A49  ||  C49  || -7  ||  -7`);
l(`       -32^3          ||  D121 ||  E121 || -11 ||  -11`);
l(`     -(32*3)^3        ||  A361 ||  B361 || -19 ||  -19`);
l(`    -(64*3*5)^3       || A1849 || B1849 || -43 ||  -43`);
l(`  -(32*3*5*11)^3      || A4489 || B4489 || -67 ||  -67`);
l(` -(64*3*5*23*29)^3    || A26569|| B26569||-163 || -163`);
l(`        66^3          ||  C32  ||  D32  || -4  ||  -16`);
l(`       2*30^3         ||  B36  ||  D36  ||  3  ||  -12`);
l(`    (3*5*17)^3        ||  B49  ||  D49  || -7  ||  -28`);
l(`   -3*(32*5)^3        ||  C27  ||  D27  || -27 ||  -27`);
l(``);
l(` The list of jay's is stored in CMj and the corresponding d's in CMd.`);
    elif i=3 then    
l(`     *--N--*       || N=2,3,5,7,11,13,17,19,37,43,67,163`);
l(`  *--M--*--N--*    || M=N=3,5`);
l(`*--L--*--M--*--N--*|| L=M=N=3`);
l(`     *--M--*       ||`);
l(`     |     |       ||`);
l(`     N     N       || (M,N)=(2,3),(2,5),(2,7),(3,5),(3,7)`);
l(`     |     |       ||`);
l(`     *--M--*       ||`);
l(`  *--2--*--2--*      *--3--*--3--*       *--2--*--2--*`);
l(`        |            |     |     |             |`);
l(`        2            2     2     2             2`);
l(`        |            |     |     |             |`);
l(`        *            *--3--*--3--*       *--2--*--2--*`);
l(`           *           *                  *----3----*`);
l(`           |           |                  |         |`);
l(`           2           2                  2         2`);
l(`           |           |                  |         |`);
l(`     *--2--*--2--*--2--*--2--*            *----3----*`);
l(`                 |                       /|        /|`);
l(`                 2                     /  2       2 2`);
l(`                 |                    2   |     /   |`);
l(`                 *                  /     *---/3----*`);
l(`                                  *----3----*`);
    elif i=4 then
l(`ncur||  args  || conductor Nc                    ||  T  || r`);
l(`----||--------||---------------------------------||-----||-----`);
l(`  77||   --   || 37                              ||  O  || 1`);
l(` 177||   --   || 65=5*13                         || C2  || 1`);
l(` 270|| 3,-4,1 || 91=7*13                         || C3  || 1`);
l(` 370|| 4,-1/3 || 117=3^2*13                      || C4  || 1`);
l(` 371||4,15/2,6|| 117=3^2*13                      ||C2xC2|| 1`);
l(` 399||  5,-3  || 123=3*41                        || C5  || 1`);
l(` 492|| 6,1/4  || 130=2*5*13                      || C6  || 1`);
l(` 502||  7,8   || 574=2*7*41                      || C7  || 1`);
l(` 496||8,1,4/3 || 336=2^4*3*7                     ||C2xC4|| 1`);
l(` 504|| 8,7/6  || 966=2*3*7*23                    || C8  || 1`);
l(` 585||   --   || 389                             ||  O  || 2`);
l(` 510||   --   || 1088=2^6*17                     || C2  || 2`);
l(` 449||   --   || 5077                            ||  O  || 3`);
l(`...............................................................`);
l(` 512|| 9,-1/3 || 1482=2*3*13*19                  || C9  || 1`);
l(` 517|| 10,-2  || 6270=2*3*5*11*19                || C10 || 1`);
l(`         continued ...`);
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` 529||12,1,-1/7|| 2310=2*3*5*7*11                ||C2xC6|| 1`);
l(` 521|| 12,-1/2 || 4290=2*3*5*11*13               || C12 || 1`);
l(` 540|| 16,1,3  || 82110=2*3*5*7*17*23            ||C2xC8|| 1`);
l(` 515|| 3,-7,7  || 1862=2*7^2*19                  || C3  || 2`);
l(` 597|| 4,-1/45 || 2175=3*5^2*29                  || C4  || 2`);
l(` 609||   --    || 3264=2^6*3*17                  ||C2xC2|| 2`);
l(` 599||  5,22   || 5302=2*11*241                  || C5  || 2`);
l(` 613|| 6,1/28  || 15022=2*7*29*37                || C6  || 2`);
l(` 615|| 7,5/13  || 513110=2*5*13*3947             || C7  || 2`);
l(` 601||8,1,19/7 || 41496=2^3*387813*19            ||C2xC4|| 2`);
l(` 616|| 8,23/22 || 253506=2*3*11*23*167           || C8  || 2`);
l(` 618|| 9,11/4  || 14049882=2*3^3*7*11*31*109     || C9  || 2`);
l(` 619|| 10,1/12 || 1474770=2*3*5*11*41*109        || C10 || 2`);
l(` 604||12,1,7/6 || 356730=2*3*5*11*23*47          ||C2xC6|| 2`);
l(` 620|| 12,5/11 || 36817770=2*3*5*11*31*59*61     || C12 || 2`);  
l(` 603||16,1,3/5 || 169350090=2*3*5*7*13*17*41*89  ||C2xC8|| 2`);
l(` 608||   --    || 80256=2^7*3*11*19              || C2  || 3`);
l(` 596||3,-31,31 || 474734=2*13*19*31^2            || C3  || 3`);
l(` 610||   --    || 562224=2^4*3*13*17*53          ||C2xC2|| 3`); 
l(`>>>>>HIT SEMICOLON KEY ;<enter> FOR NEXT SCREEN`);readstat();
l(` 611|| 4,29/45 || 1107075=3*5^2*29*509           || C4  || 3`);
l(` 612|| 5,49/43 || 1362025=5^2*7*43*181           || C5  || 3`);
l(` 614|| 6,85/4  || 11634970=2*5*17*89*769         || C6  || 3`);
l(` 627||7,-19/21 || 399562590=2*3*5*7*19*239*419   || C7  || 3`);
l(` 617||8,1,13/51|| 1092624=2^4*3*13*17*103        ||C2xC4|| 3`);
l(` 628||8,-10/21 || 779644110=2*3*5*7*23*31*41*127 || C8  || 3`);
l(` 629||12,1,6/29|| 2*3^2*5*7*11*13*17*23*29*31*139||C2xC6|| 3`); 
l(` 588||16,1,5/12|| 2*3*5*7*17*29*79*263*433       ||C2xC8|| 3`); 
l(` 537||   --    || 234446=2*117223                ||  O  || 4`);
l(` 625||   --    || 7890368=2^6*31*41*97           || C2  || 4`);
l(` 624||3,-109,421  274996358=2*7*13*37*97*421     || C3  || 4`);  
l(` 551||   --    || 19047851=prime                 ||  O  || 5`);
l(` 626||   --    || 4378153024=2^6*7*47*337*617    || C2  || 5`);
l(` 605||   --    || 5258110041=3^2*584234449       ||  O  || 6`);
l(` 606||   --    || 1074680679376=2^4*199*337525339||  O  || 7`);
l(` 621||   --    || ~5.617*10^14                   ||  O  || 8`);
l(` 622||   --    || ~4.84*10^17                    ||  O  || 9`); 
l(` 623||   --    || ~1.97*10^21                    ||  O  || 10`);
l(` 457||   --    || ~1.80*10^24                    ||  O  || 11`);
l(` 458||   __    || ~2.7*10^29                     ||  O  || 12`); 
l(` 459||   __    || ~3.66*10^38                    ||  O  || 13`); 
l(` 460||   __    || ~3.6*10^37                     ||  O  || 14`); 
    else
      `not programmed`;
    fi;
  elif i=2 then
    l(`Examples with T=C2 not explicitly programmed. Any E with`);
    l(`a3=a6=0 is an example with T=C2 (at least).`);
  elif nargs=2 then
    t:=args[2]:
    if i=4 then 
      examQ(t,0);
    elif i=5 then 
      examQ(t,t);
    elif i=6 then 
      examQ(t+t^2,t);
    elif i=7 then 
      examQ(t^3-t^2,t^2-t);
    elif i=8 then
      if t=0 then eprint(cuu);
      else 
        examQ((t-1)*(2*t-1),(t-1)*(2*t-1)/t);
      fi;
    elif i=9 then 
      examQ(t^5-2*t^4+2*t^3-t^2,t^3-t^2);
    elif i=10 then
      if 1-3*t+t^2=0 then eprint(cuu);
      else  
        examQ(t^3*(1-3*t+2*t^2)/(1-3*t+t^2)^2,-t*(1-3*t+2*t^2)/(1-3*t+t^2));
      fi;
    elif i=12 then
      if t=0 then eprint(cuu);
      else 
        examQ((1-t)*(1-2*t)*(1-2*t+2*t^2)*(1-3*t+3*t^2)/t^4,\
(1-t)*(1-2*t)*(1-3*t+3*t^2)/t^3);
      fi;
    else print(qts):RETURN();	    
    fi;
  elif nargs=3 then
    b:=args[2]:c:=args[3]:
    if i=3 then 
      if c=0 or 27*c=b^3 then 
        fprint(`These values of the parameters give a singular curve:`);
      fi;
      examQ(b,0,c,0,0):
    elif i=4 then 
      if c=0 or 4*c^2=b^2 then 
        fprint(`These values of the parameters give a singular curve:`);
      fi;
      examQ(0,b,0,b^2/4-c^2,0);
    elif b=1 then
      if i=8 then 
        examQ((c^2-1)/16,0);
      elif i=12 then
        if c^2=9 then eprint(cuu);
        else 
          d:=(2*c-10)/(9-c^2):examQ(d+d^2,d);
        fi;
      elif i=16 then
        if c=-2 or c^2=2 then eprint(cuu);
        else 
          d:=(2+c)/(2-c^2):examQ((d-1)*(2*d-1),(d-1)*(2*d-1)/d);
        fi;
      else print(qts):RETURN();
      fi;
    else print(qts):RETURN();
    fi;
  elif nargs>0 then print(qts):RETURN();
  fi;
  NULL;
end:

examQ:=proc() local a,e,j;global iee,K_,U,V;
  e:=iee:iee:=0:j:=sex_([args]);
  if nops(j)=2 then a:=1-j[2],-j[1],-j[1],0,0;
  else a:=op(j):
  fi;
  if type(j,list(rational)) then K_:=1;
  elif type(j,list(ratpoly(rational,T))) then K_:=T;
  elif type(m_,integer) and type(j,list(polynom(rational,w_))) then K_:=m_;
  else K_:=0;
  fi;
  if K_=1 then 
    ein(a);
  else ell(a,K_);
  fi;
  if e=1 then 
    iee:=e;
    if sT=4 then l(`This value of the parameter gives a singular curve:`);
    elif bouu then print(cus,cur);
    fi;
    We();
  fi;
  if K_=1 and DD<>0 and NN<1 and nops(bic)=1 then 
    U:=0;V:=0;j:=bic[1]:j:=[j[5]/j[6],j[7]/j[8]]:U:='U';V:='V';
    if e=1 then Tor(j);else tor(j);fi;
  elif tor_able then
    if e=1 then print(`We determine the torsion subgroup:`);Tor();
    else tor();
    fi;
  fi;
end:  
