Changeset 3eadab in git


Ignore:
Timestamp:
Jul 20, 2007, 12:02:38 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
26508d901cc18abe14e76ed21fab5d60a21684ed
Parents:
1625c14e1865ffd016b1b23fc908e7e790e66291
Message:
*pfister: doc., names,..


git-svn-id: file:///usr/local/Singular/svn/trunk@10222 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/atkins.lib

    r1625c1 r3eadab  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: atkins.lib,v 1.2 2007-01-09 12:42:22 pfister Exp $";
     2version="$Id: atkins.lib,v 1.3 2007-07-20 10:02:38 Singular Exp $";
    33category="Teaching";
    44info="
     
    1414
    1515PROCEDURES:
    16   new(L,D)                     checks if number D already exists in list L
    17   bubblesort(L)                sorts elements of the list L
    18   disc(N,k)                    generates a list of negative discriminants
    19   Cornacchia(d,p)              computes solution (x,y) for x^2+d*y^2=p
    20   CornacchiaModified(D,p)      computes solution (x,y) for x^2+|D|*y^2=4p
    21   maximum(L)                   computes the maximal number contained in L
    22   cmod(x,y)                    computes x mod y
    23   sqr(w,k)                     computes the square root of w
    24   e(z,k)                       computes exp(z)
    25   jot(t,k)                     computes the j-invariant of t
    26   round(r)                     rounds r to the nearest number out of Z
    27   HilbertClassPolynomial(D,k)  computes the Hilbert Class Polynomial
    28   RootsModp(p,P)               computes roots of the polynomial P modulo p
    29   w(D)                         computes the number of units in Q(sqr(D))
    30   Atkin(N,K,B)                 tries to prove that N is prime
     16  newTest(L,D)              checks if number D already exists in list L
     17  bubblesort(L)             sorts elements of the list L
     18  disc(N,k)                 generates a list of negative discriminants
     19  Cornacchia(d,p)           computes solution (x,y) for x^2+d*y^2=p
     20  CornacchiaModified(D,p)   computes solution (x,y) for x^2+|D|*y^2=4p
     21  maximum(L)                computes the maximal number contained in L
     22  expo(z,k)                 computes exp(z)
     23  jOft(t,k)                 computes the j-invariant of t
     24  round(r)                  rounds r to the nearest number out of Z
     25  HilbertClassPoly(D,k)     computes the Hilbert Class Polynomial
     26  rootsModp(p,P)            computes roots of the polynomial P modulo p
     27  wUnit(D)                  computes the number of units in Q(sqr(D))
     28  Atkin(N,K,B)              tries to prove that N is prime
    3129
    3230";
     
    3937///////////////////////////////////////////////////////////////////////////////
    4038
    41 proc new(list L, number D)
    42 "USAGE: new(L,D);
     39proc newTest(list L, number D)
     40"USAGE: newTest(L,D);
    4341RETURN:  1, if D does not already exist in L,
    4442        -1, if D does already exist in L
     
    6361    list L=8976,-223456,556,-778,3,-55603,45,766677;
    6462    number D=-55603;
    65     new(L,D);
     63    newTest(L,D);
    6664}
    6765
     
    118116    {
    119117      D=-4*a+B;
    120       if((D<0)&&((D mod 4)!=2)&&((D mod 4)!=3)&&(absValue(D)<4*N)&&(new(L,D)==1))
     118      if((D<0)&&((D mod 4)!=2)&&((D mod 4)!=3)&&(absValue(D)<4*N)&&(newTest(L,D)==1))
    121119      {
    122120        L[size(L)+1]=D;
     
    342340
    343341
    344 proc cmod(number x, number y)
     342static proc cmod(number x, number y)
    345343"USAGE: cmod(x,y);
    346344RETURN: x mod y
     
    369367
    370368
    371 proc sqr(number w, int k)
     369static proc sqr(number w, int k)
    372370"USAGE: sqr(w,k);
    373371RETURN: the square root of w
     
    397395
    398396
    399 proc e(number z, int k)
    400 "USAGE: e(z,k);
     397proc expo(number z, int k)
     398"USAGE: expo(z,k);
    401399RETURN: e^z to the order k
    402400NOTE:   k describes the number of summands being calculated in the exponential power series
     
    420418    ring r = (real,30),x,dp;
    421419    number z=40.35;
    422     e(z,1000);
    423 }
    424 
    425 
    426 
    427 proc jot(number t, int k)
    428 "USAGE: jot(t,k);
     420    expo(z,1000);
     421}
     422
     423
     424
     425proc jOft(number t, int k)
     426"USAGE: jOft(t,k);
    429427RETURN: the j-invariant of t
    430428ASSUME: t is a complex number with positive imaginary part
     
    445443         {
    446444           tr=tr-round(tr);
    447            qr1=e(2*i*pi*tr,10*k);
     445           qr1=expo(2*i*pi*tr,10*k);
    448446         }
    449447
    450       qi1=e(-pi*ti,10*k);
     448      qi1=expo(-pi*ti,10*k);
    451449      q1=qr1*qi1^2;
    452450      q2=q1^2;
     
    470468    ring r = (complex,30,i),x,dp;
    471469    number t=(-7+i*sqr(7,250))/2;
    472     jot(t,50);
     470    jOft(t,50);
    473471}
    474472
     
    530528
    531529
    532 proc HilbertClassPolynomial(number D, int k)
    533 "USAGE: HilbertClassPolynomial(D,k);
    534 RETURN: the monic polynomial of degree h(D) in Z[X] of which jot((D+sqr(D))/2) is a root
     530proc HilbertClassPoly(number D, int k)
     531"USAGE: HilbertClassPoly(D,k);
     532RETURN: the monic polynomial of degree h(D) in Z[X] of which jOft((D+sqr(D))/2) is a root
    535533ASSUME: D is a negative discriminant
    536534NOTE:   k is input for the procedure "jot",
     
    605603                             {
    606604                               tau=(-b+i*sqr(absValue(D),5*k))/(2*a);
    607                                j=jot(tau,k);
     605                               j=jOft(tau,k);
    608606                               if((a==b)||(a^2==t)||(b==0))
    609607                                  {
     
    677675    ring r = 0,x,dp;
    678676    number D=-23;
    679     HilbertClassPolynomial(D,50);
    680 }
    681 
    682 
    683 
    684 proc RootsModp(int p, poly P)
    685 "USAGE: RootsModp(p,P);
     677    HilbertClassPoly(D,50);
     678}
     679
     680
     681
     682proc rootsModp(int p, poly P)
     683"USAGE: rootsModp(p,P);
    686684RETURN: list of roots of the polynomial P modulo p with p prime
    687685ASSUME: p>=3
    688686NOTE:   this algorithm will be called recursively, and it is understood
    689687        that all the operations are done in Z/pZ (excepting sqareRoot(d,p))
    690 EXAMPLE:example RootsModp; shows an example
     688EXAMPLE:example rootsModp; shows an example
    691689"
    692690{
     
    757755           poly B=imap(R,B);
    758756           poly C=imap(R,C);
    759            list l=L+RootsModp(p,B)+RootsModp(p,C);
     757           list l=L+rootsModp(p,B)+rootsModp(p,C);
    760758           return(l);
    761759         }
     
    765763    ring r = 0,x,dp;
    766764    poly f=x4+2x3-5x2+x;
    767     RootsModp(7,f);
     765    rootsModp(7,f);
    768766    poly g=x5+112x4+655x3+551x2+1129x+831;
    769     RootsModp(1223,g);
    770 }
    771 
    772 
    773 
    774 proc w(number D)
    775 "USAGE: w(D);
     767    rootsModp(1223,g);
     768}
     769
     770
     771
     772proc wUnit(number D)
     773"USAGE: wUnit(D);
    776774RETURN: the number of roots of unity in the quadratic order of discriminant D
    777775ASSUME: D<0 a discriminant kongruent to 0 or 1 modulo 4
     
    794792    ring r = 0,x,dp;
    795793    number D=-3;
    796     w(D);
     794    wUnit(D);
    797795}
    798796
     
    843841    number a,b,j,c;                    // characterize E(Z/N(i)Z)
    844842    number g,u;                        // g out of Z/N(i)Z, u=Jacobi(g,N(i))
    845     poly T;                            // T=HilbertClassPolynomial(D,K)
     843    poly T;                            // T=HilbertClassPoly(D,K)
    846844    matrix M;                          // M contains the coefficients of T
    847845
     
    10131011        {
    10141012          if(printlevel>=1) {"Das Minimalpolynom T von j((D+sqr(D))/2) aus Z[X] fuer D="+string(D)+" wird berechnet.";}
    1015           T=HilbertClassPolynomial(D,K);
     1013          T=HilbertClassPoly(D,K);
    10161014          if(printlevel>=1) {"T="+string(T);pause();}
    10171015
     
    10261024          if(printlevel>=1) {"Setze T=T mod N("+string(i)+").";"T="+string(T);pause();}
    10271025
    1028           R=RootsModp(int(N(i)),T);
     1026          R=rootsModp(int(N(i)),T);
    10291027          if(deg(T)>size(R))
    10301028          {
     
    11171115      {
    11181116        k=k+1;
    1119         if(k>=w(D))
    1120         {
    1121           if(printlevel>=1) {"Da k=w(D)="+string(k)+", ist N("+string(i)+")="+string(N(i))+" nicht prim.";pause();}
     1117        if(k>=wUnit(D))
     1118        {
     1119          if(printlevel>=1) {"Da k=wUnit(D)="+string(k)+", ist N("+string(i)+")="+string(N(i))+" nicht prim.";pause();}
    11221120          step=14;
    11231121        }
     
    12201218        else
    12211219        {
    1222           if(printlevel>=1) {"N(0)=N="+string(N)+" und daher ist N nicht prim.";pause();}
     1220          if(printlevel>=1) {"N(0)=N="+string(N)+" und daher ist N nicht prim.";pause(n);}
    12231221          return(-1);
    12241222        }
     
    12371235    Atkin(10000079,100,2);
    12381236}
     1237
  • Singular/LIB/crypto.lib

    r1625c1 r3eadab  
    11//GP, last modified 28.6.06
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: crypto.lib,v 1.1 2007-01-09 10:31:49 Singular Exp $";
     3version="$Id: crypto.lib,v 1.2 2007-07-20 10:02:38 Singular Exp $";
    44category="Teaching";
    55info="
     
    20632063
    20642064*/
     2065
  • Singular/LIB/modstd.lib

    r1625c1 r3eadab  
    11//GP, last modified 23.10.06
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: modstd.lib,v 1.13 2007-07-04 13:14:43 Singular Exp $";
     3version="$Id: modstd.lib,v 1.14 2007-07-20 10:02:38 Singular Exp $";
    44category="Commutative Algebra";
    55info="
     
    88@*       G. Pfister      pfister@mathematik.uni-kl.de
    99@*       H. Schoenemann  hannes@mathematik.uni-kl.de
    10 @*       Cindy Magin,    c.magin@web.de
    1110
    1211NOTE:
     
    2423modS(I,L);     liftings to Q of standard bases of I mod p for p in L
    2524primeList(n);  intvec of n primes  <= 2134567879 in decreasing order
    26 pStd(p,i);     compute a standard basis of i using p-adic methods
    2725";
    2826
     
    887885
    888886*/
     887
Note: See TracChangeset for help on using the changeset viewer.