From: mckay@cs.concordia.ca (MCKAY john) Newsgroups: sci.math.symbolic Subject: simplify torture - some flesh! Date: 19 Jun 1998 13:17:08 GMT The coefficients of a theta fn. count vectors and so are integers >=0. Conway & Sloane,[Sphere Packings, Lattices and Groups, Chap 4 Eq.56 page 110 2nd edition] give a formula for the theta function of a lattice of type A_n. Expanding this in Maple as a q-series for A_8, the coefficients were not "obvious" rational integers. The coefficient of q is 2c1 where c1 :=2*cos(4/9*Pi)-2*cos(1/9*Pi)+2*cos(2/9*Pi); Note that this expression has a well-defined value. Attempts at simplifying the series of the theta fn. for A_8 started all this! Simplifying an initial segment of the q-series for theta of A_n for n up to,say, 30 might be made part of a test suite for simplification. Note that simplify is not idempotent in maple. ============================================================================= TTY Iris, Maple V, Release 5, DEC ALPHA UNIX, Jan 11 1998 c := 2 cos(4/9 Pi) - 2 cos(1/9 Pi) + 2 cos(2/9 Pi) convert(c,exp) 1 1 x := exp(4/9 I Pi) + ------------- - exp(1/9 I Pi) - ------------- exp(4/9 I Pi) exp(1/9 I Pi) 1 + exp(2/9 I Pi) + ------------- exp(2/9 I Pi) Watch closely... simplify(x): 4/9 1/9 7/9 (-1) - (-1) - (-1) rationalize(simplify(x)): 1/9 1/3 2/3 -(-1) (-(-1) + 1 + (-1) ) simplify(rationalize(simplify(x))): 0 Keep watching... expand(x): 4/9 5/9 1/9 8/9 2/9 7/9 (-1) - (-1) - (-1) + (-1) + (-1) - (-1) rationalize(expand(x)): 1/9 1/3 4/9 7/9 1/9 2/3 (-1) ((-1) - (-1) - 1 + (-1) + (-1) - (-1) ) simplify(rationalize(expand(x))): 2/9 1/3 2/3 (-1) (-(-1) + 1 + (-1) ) simplify(simplify(rationalize(expand(x)))): 0 More interesting effects... simplify(simplify(x)*simplify(x)): 0 simplify(x*x): 2 (-exp(- 7/9 I Pi) + exp(8/9 I Pi) - exp(5/9 I Pi)) exp(4/9 I Pi) simplify(simplify(x*x)): 2 (-exp(- 7/9 I Pi) + exp(8/9 I Pi) - exp(5/9 I Pi)) exp(4/9 I Pi) expand(x*x): 2/9 8/9 5/9 4/9 1/9 7/9 6 + 3 (-1) + 3 (-1) - 3 (-1) + 3 (-1) - 3 (-1) - 3 (-1) 1/3 2/3 - 6 (-1) + 6 (-1) simplify(expand(x*x)): 2/9 8/9 5/9 4/9 1/9 7/9 3 (-1) + 3 (-1) - 3 (-1) + 3 (-1) - 3 (-1) - 3 (-1) expand(simplify(expand(x*x))): 2/9 8/9 5/9 4/9 1/9 7/9 3 (-1) + 3 (-1) - 3 (-1) + 3 (-1) - 3 (-1) - 3 (-1) expand(simplify(x*x)): 8/9 5/9 2/9 3 (-1) - 3 (-1) + 3 (-1) simplify(expand(simplify(x*x))): 8/9 5/9 2/9 3 (-1) - 3 (-1) + 3 (-1) radsimp(simplify(x)): 3 ============================================================================= It occurs to me (now!) that a neater presentation of this material is to give the effect of each non-trivial operator together with all the relevant operators under which an expression is invariant. JM -- But leave the wise to wrangle, and with me the quarrel of the universe let be; and, in some corner of the hubbub couched, make game of that which makes as much of thee. ============================================================================== From: mckay@cs.concordia.ca (MCKAY john) Newsgroups: sci.math.symbolic Subject: Re: simplify torture - a test program Date: 25 Jun 1998 17:45:25 GMT A test maple program is available by anonymous ftp at URL ftp://ftp.cs.concordia.ca/pub/mckay/thetas JM -- But leave the wise to wrangle, and with me the quarrel of the universe let be; and, in some corner of the hubbub couched, make game of that which makes as much of thee.