print(`This is a small program, zeilWZP, that generalizes`): print(`the so-called Zeilberger algorithm (a.k.a. as creative telescoping)`): print(`to summands that are Closes Form times Potentials of WZ pairs`): print(`written by Doron Zeilberger, in response to a question of Ken Ono`): print(`First Written: Jan. 22, 1998`): lprint(``): print(``): print(`You MUST have Maple and the package EKHAD at the same directory.`): print(`This program, as well as the famous package EKHAD are freely`): print(`available from http://www.math.temple.edu/~zeilberg`): lprint(``): print(`Please report all bugs to zeilberg@math.temple.edu `): lprint(``): print(`The syntax is similar to zeil in EKHAD (see ezra(zeil); n EKHAD`): print(`except that the WZ pair (F,G) is also an input`): print(`the syntax is"`): print(` zeilWZP(SUMMAND,F,G,k,n,N);`): read EKHAD: zeilWZP:=proc(SUMMAND,F,G,k,n,N) local i,j,gu,lu,R,cert,ku: ku:=simplify(F/G): if not type(ku,algfun(rational)) then ERROR(` the second and third arguments are not WZ `): fi: gu:=simplify(subs(n=n+1,F)/F)-1-simplify(subs(k=k+1,G)/F)+simplify(G/F): gu:=normal(gu): if gu<>0 then ERROR(` the second and third arguments are not WZ `): fi: gu:=zeil(SUMMAND,k,n,N): R:=gu[1]: cert:=gu[2]: gu:=0: for i from 0 to degree(R,N) do lu:=0: for j from 0 to i-1 do lu:=lu+normal(simplify(subs(n=n+j,G)/F)): lu:=normal(lu): od: gu:=gu+coeff(R,N,i)*simplify1(SUMMAND,n,i)*lu: od: gu:=gu-subs(k=k+1,cert)*simplify1(SUMMAND,k,1): gu:=normal(gu): gu:=gu*SUMMAND*F: #print(`H(n,k) is`,gu): gu:=zeil(gu,k,n,N): print(`Theorem: Let b(`,n,k,`) be defined by`): print(SUMMAND): print(`and let c(`,n,k,`) be the potential function of the WZ pair (F,G)`): print(`where F and G are `): print(F,G): print(`Let a(`,n,`) be the sum of b(`,n,k,`)*c(`,n,k,`) `): print(`this sum is annihilated by the operator`): print(gu[1], `times` , R): lprint(``): print(`Proof by Shalosh B. Ekhad`): print(`We first find the linear recurrence operator annihilating`): print(`the sum of b(`,n,k,`), which is `): print(R): print(`For a proof do zeil(b,k,n) in EKHAD.`): print(`The certificate turned out to be`): print(cert): print(`Applying this operator to c(n,k)*b(n,k) and subtrating`): print(`c(n,k) times the operator applied on b(n,k), as was done`): print(`in Doron Zeilberger's article: Closed Form (pun intended!)`): print(`Contemporary Mathematics 143, pp 579-607, Theorem 9 (p. 600 ff) `): print(`with slight notational changes to accomodate EKHAD's current`): print(`convention of using forward differnce operators.`): print(`We get that the operator S(N,n) promised by Theorem 9, is`): print(gu[1]): print(`The certificate certifying S(N,n), i.e. the one defining`): print(`D(n,k), was found by EKHAD to be`): print(gu[2]): R,cert,gu: end: