FUNCTION :  provemodfuncid - prove theta-function identity               

CALLING SEQUENCE :  provemodfuncid(jacid,N)                           
                    
PARAMETERS :  jacid - sum of modular functions on Gamma[1](N)           
                      Each term in the sum is a JAC-quotient to base N. 

              N     - positive integer

GLOBAL VARIABLES : 
   qcheck, modfunccheck, totcheck, _ORDS, jptmp, jpqd, eptmp,
   gltmp, EPRODL, GETAL, COFS, conpres, CONTERMS, mintottmp, overrideproofq


SYNOPSIS :   
  (I)  First we compute a complete set of inequivalent       
       cusps and corresponids widths for Gamma1(N).          
 (II)  We cycle through the terms of jacid.                  
       Let j be term number.                                 
       (1) Test if term is a constant.                       
           If constant then conpres=1, j added to CONTERMS   
           list, EPROD[j]=1, GETAL[j]=[], and                
           _ORDS[j]=[0,0..].                                 
       (2) Assuming term is not a constant.                  
           Let jpqd = power of q in jacterm.                 
           Use jac2eprod to convert jacterm to GETA-prod.    
           Use GETAP2getalist to convert eprod to getalist.  
           Use getaprodcuspORDS to calculate ORDS of jacterm.
           Result is stored in the array _ORDS as _ORDS[j].  
       (3) Check that the power of q matches ORD at oo.      
           If not, j is added to qcheck list.                
       (4) Use Gamma1ModFunc to check whether GETA-prod is a 
           modular function on Gamma[1](N).                  
           If not, j is added to modfunccheck list.          
 (III) We now should have a complete array _ORDS.            
       (5) Final error check made. Each of the arrays qcheck,
           modfunccheck, and totcheck should be empty. If not
           an error message is returned which terminates the 
           proc.                                             
       (6) A WARNING is printed if any terms were constants. 
       (7) We use mintotORDS to min power of q to check      
           identity.                                         
           A query is made whether to check now.             
           If not (suggested), this min power is returned.   
           **NOTE**: To overide this query set global variable
           overrideproofq to true:

EXAMPLES :   
>  with(qseries):
>  with(thetaids):

>  provemodfuncid();
-------------------------------------------------------------
provemodfuncid(jacid,N)                                      
   jacid = sum of modular functions on Gamma[1](N)           
           Each term in the sum is a JAC-quotient to base N. 
   CUSPS = Set of inequivalent cusps for Gamma[1](N).        
   WIDS  = List of corresponding widths.                     
   global vars (can be used for error-checking):             
   qcheck, modfunccheck, totcheck, _ORDS, jptmp, jpqd, eptmp,
   gltmp, EPRODL, GETAL, COFS, conpres, CONTERMS, mintottmp  
                                                             
** Do you want a DETAILED DESCRIPTION of this proc? (yes/no) 

-------------------------------------------------------------

>  CHOIID1:=
>   _ETAn(3)*_ETAn(6)*_ETAn(10)^2*_ETAn(12)*_ETAn(20)^3*_ETAn(120)^3*_ETAn(360)*
>      _ETAnm(3,1)*_ETAnm(6,2)*_ETAnm(10,3)*_ETAnm(12,4)*_ETAnm(20,8)^3
>      -_ETAn(1)*_ETAn(2)*_ETAn(5)^2*_ETAn(8)*_ETAn(20)^2*_ETAn(40)*_ETAn(360)^4
>       *_ETAnm(10,4)*_ETAnm(20,6)*_ETAnm(20,8)*_ETAnm(40,16)*_ETAnm(360,120)^3
>      +_ETAn(1)*_ETAn(2)*_ETAn(5)^2*_ETAn(8)*_ETAn(20)^2*_ETAn(40)*_ETAn(360)^4
>       *_ETAnm(5,2)^2*_ETAnm(20,6)*_ETAnm(20,8)*_ETAnm(40,4)*_ETAnm(360,120)^3;
            /749\
            |---|
            \24 /                                           3
CHOIID1 := q      JAC(0, 10, infinity) JAC(0, 120, infinity)

    JAC(0, 360, infinity) JAC(1, 3, infinity) JAC(2, 6, infinity)

                                                                       749
                                                                       ---
                                                                  3    24
    JAC(3, 10, infinity) JAC(4, 12, infinity) JAC(8, 20, infinity)  - q

                                                               2
    JAC(0, 1, infinity) JAC(0, 2, infinity) JAC(0, 5, infinity)

    JAC(0, 8, infinity) JAC(0, 360, infinity) JAC(4, 10, infinity)

    JAC(6, 20, infinity) JAC(8, 20, infinity) JAC(16, 40, infinity)

                                                     /821\
                                                     |---|
                           3                         \24 /
    JAC(120, 360, infinity) /JAC(0, 10, infinity) + q      JAC(0, 1, infinity)

    JAC(0, 2, infinity) JAC(0, 8, infinity) JAC(0, 360, infinity)

                       2
    JAC(2, 5, infinity)  JAC(6, 20, infinity) JAC(8, 20, infinity)

                                                3
    JAC(4, 40, infinity) JAC(120, 360, infinity)

>  NCHOIID1:=processjacid(CHOIID1);
                                    2                     2
NCHOIID1 := 1 - JAC(5, 40, infinity)  JAC(6, 40, infinity)

                         2                      2                      2   /
    JAC(14, 40, infinity)  JAC(15, 40, infinity)  JAC(16, 40, infinity)   /  (
                                                                         /

                                                                  2
    JAC(3, 40, infinity) JAC(7, 40, infinity) JAC(8, 40, infinity)

                         3
    JAC(12, 40, infinity)  JAC(13, 40, infinity) JAC(17, 40, infinity)

                              3                     2
    JAC(20, 40, infinity)) + q  JAC(2, 40, infinity)  JAC(3, 40, infinity)

                        2
    JAC(5, 40, infinity)  JAC(6, 40, infinity) JAC(7, 40, infinity)

                                                                     2
    JAC(13, 40, infinity) JAC(14, 40, infinity) JAC(15, 40, infinity)

                                               2   /                      12
    JAC(17, 40, infinity) JAC(18, 40, infinity)   /  (JAC(0, 40, infinity)
                                                 /

    JAC(12, 40, infinity) JAC(20, 40, infinity))

>  jcombobase(NCHOIID1);
                                       40

>  overrideproofq:=true:
>  provemodfuncid(NCHOIID1,40);
"TERM ", 1, "of ", 3, " *****************"
"TERM ", 2, "of ", 3, " *****************"
"TERM ", 3, "of ", 3, " *****************"
"mintotord = ", -24
"TO PROVE the identity we need to show that v[oo](ID) > ", 24
*** There were NO errors. 
*** o Each term was modular function on
      Gamma1(40). 
*** o We also checked that the total order of
      each term was zero.
*** o We also checked that the power of q was correct in
      each term.
"*** WARNING: some terms were constants. ***"
"See array CONTERMS."
To prove the identity we will need to verify if up to 
q^(24).
Do you want to prove the identity? (yes/no)
You entered yes.
We verify the identity to O(q^(104)).
RESULT: The identity holds to O(q^(104)).
CONCLUSION: This proves the identity since we had only
            to show that v[oo](ID) > 24.
                                       24

>  xprint:=true;
                                 xprint := true

>  provemodfuncid(NCHOIID1,40);
"TERM ", 1, "of ", 3, " *****************"
                                    "XX=", 1

"TERM ", 2, "of ", 3, " *****************"
                             2                     2                      2
"XX=", - JAC(5, 40, infinity)  JAC(6, 40, infinity)  JAC(14, 40, infinity)

                         2                      2   /
    JAC(15, 40, infinity)  JAC(16, 40, infinity)   /  (JAC(3, 40, infinity)
                                                  /

                                             2                      3
    JAC(7, 40, infinity) JAC(8, 40, infinity)  JAC(12, 40, infinity)

    JAC(13, 40, infinity) JAC(17, 40, infinity) JAC(20, 40, infinity))

Cusp ords: 
[[oo, 0], [0, 0], [1/2, 0], [1/3, 0], [1/4, -2], [1/5, 3], [1/6, 0], [1/7, 0],

    [1/8, 1], [1/9, 0], [1/10, -4], [1/11, 0], [1/12, -2], [1/13, 0], [1/14, 0],

    [1/15, 3], [1/16, 1], [1/17, 0], [1/18, 0], [1/19, 0], [1/20, 0], [2/5, 0],

    [3/4, -2], [3/5, 0], [3/8, 1], [3/10, -2], [3/16, 1], [3/20, -2], [3/40, 1],

    [4/5, 3], [4/15, 3], [5/8, 1], [7/8, 1], [7/10, -2], [7/12, -2], [7/15, 0],

                                                                         11
    [7/16, 1], [7/20, -2], [7/40, 1], [9/10, -4], [9/20, 0], [9/40, 0], [--, 0],
                                                                         40

     13       13       13       17       19
    [--, 0], [--, 1], [--, 1], [--, 1], [--, 0]]
     15       16       40       40       40

TOTAL ORD = 0
"POWER of q CORRECT"
* starting Gamma1ModFunc with L=[[40, 3, -1], [40, 5, 2], [40, 6, 2], 
  [40, 7, -1], [40, 8, -2], [40, 12, -3], [40, 13, -1], [40, 14, 2], 
  [40, 15, 2], [40, 16, 2], [40, 17, -1], [40, 20, -1]] and N=40 
All n are divisors of 40
val0=0
which is even.
valinf=0
which is even.
It IS a modfunc on Gamma1(40)
"TERM ", 3, "of ", 3, " *****************"
        3                     2                                          2
"XX=", q  JAC(2, 40, infinity)  JAC(3, 40, infinity) JAC(5, 40, infinity)

    JAC(6, 40, infinity) JAC(7, 40, infinity) JAC(13, 40, infinity)

                                               2
    JAC(14, 40, infinity) JAC(15, 40, infinity)  JAC(17, 40, infinity)

                         2   /                      12
    JAC(18, 40, infinity)   /  (JAC(0, 40, infinity)   JAC(12, 40, infinity)
                           /

    JAC(20, 40, infinity))

Cusp ords: 
[[oo, 3], [0, 1], [1/2, 0], [1/3, 1], [1/4, -2], [1/5, 0], [1/6, 0], [1/7, 1],

    [1/8, 0], [1/9, 1], [1/10, -4], [1/11, 1], [1/12, -2], [1/13, 1], [1/14, 0],

    [1/15, 0], [1/16, 0], [1/17, 1], [1/18, 0], [1/19, 1], [1/20, 0], [2/5, 1],

    [3/4, -2], [3/5, 1], [3/8, 0], [3/10, -2], [3/16, 0], [3/20, -2], [3/40, 0],

    [4/5, 0], [4/15, 0], [5/8, 0], [7/8, 0], [7/10, -2], [7/12, -2], [7/15, 1],

                                                                         11
    [7/16, 0], [7/20, -2], [7/40, 0], [9/10, -4], [9/20, 0], [9/40, 3], [--, 3],
                                                                         40

     13       13       13       17       19
    [--, 1], [--, 0], [--, 0], [--, 0], [--, 3]]
     15       16       40       40       40

TOTAL ORD = 0
"POWER of q CORRECT"
* starting Gamma1ModFunc with L=[[40, 2, 2], [40, 3, 1], [40, 5, 2], [40, 6, 1], 
[40, 7, 1], [40, 12, -1], [40, 13, 1], [40, 14, 1], [40, 15, 2], [40, 17, 1], 
[40, 18, 2], [40, 20, -1]] and N=40 
All n are divisors of 40
val0=2
which is even.
valinf=6
which is even.
It IS a modfunc on Gamma1(40)
min inf ord=0
"mintotord = ", -24
"TO PROVE the identity we need to show that v[oo](ID) > ", 24
*** There were NO errors. 
*** o Each term was modular function on
      Gamma1(40). 
*** o We also checked that the total order of
      each term was zero.
*** o We also checked that the power of q was correct in
      each term.
"*** WARNING: some terms were constants. ***"
"See array CONTERMS."
To prove the identity we will need to verify if up to 
q^(24).
Do you want to prove the identity? (yes/no)
You entered yes.
We verify the identity to O(q^(104)).
RESULT: The identity holds to O(q^(104)).
CONCLUSION: This proves the identity since we had only
            to show that v[oo](ID) > 24.
                                       24

DISCUSSION : Choi's identity has three terms (including constant 1).
             Each term is confirmed to be a modular function on Gamma[1](40).
             mintotord = -24 so need only confirm identity up to q^24.
             Identity is confirmed up to q^104.
SEE ALSO :  provemodfuncidBATCH