{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "MS Serif" 1 10 128 0 0 1 0 0 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 0 0 0 128 1 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 1 9 0 0 1 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 1 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output " -1 6 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 128 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 12 1 {CSTYLE "" -1 -1 " Times" 1 12 0 0 128 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 2 " -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 128 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 36 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 3 0 3 0 2 2 19 1 }{PSTYLE "Normal" -1 259 1 {CSTYLE "" -1 -1 "Times" 1 18 255 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "restart; gc( ); ker nelopts(ASSERT=true);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%&falseG" }}} {EXCHG {PARA 258 "" 0 "" {TEXT -1 13 "Ekhad (V6.63)" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 35 "chargement par la commande ekhad6()" }}} {SECT 0 {PARA 4 "" 0 "" {TEXT -1 46 "Cr\351ation de la liste des proce dures savelib'ed" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "Ne pas encombr er la biblioth\350que principale" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "unprotect(savelib); savelib:= proc() error \"savelib is gone\" end : " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "Biblioth\350que compl\351ment aire" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "ssavelib:= NULL:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1063 "xsavelib:= proc() local filename, value s, library, pathname, f;\nglobal ssavelib, libname; option `Copyright \+ Pld`;\nif assigned(libname) then library := op(1, eval([libname], 1)) \n else error \"the global variable `libname' must be assigned\"\nend \+ if;\nif nargs < 2 then error \"no names specified to save\" end if;\nf ilename := args[nargs];\nvalues := args[1 .. nargs - 1] ;\nif not type (filename, '\{string, symbol\}') \n then error \"last argument (file name) must be a string\" end if;\nif not searchtext(\".m\", filename, \+ -2 .. -1) = 1 \n then error \"last argument (filename) must be a *.m \+ string\" end if;\n if not type([values], 'list(\{symbol, string\})') \+ \n then f := remove(type, [values], \{symbol,string\}); \n error \" all arguments must be symbols, cannot save these %1\", f\n end if;\n \+ pathname := cat(library, \"/\", filename);\n f := subs('T' = ( (op@ma p)(convert, [values], symbol), pathname), \n proc() save T end proc );\n try f(); ssavelib:= ssavelib, values; return; \n catch: print( lasterror); \n end try;\nerror \"unable to save %1 in %2\", [values ], library\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "# \+ tzx:=\"\": xsavelib('tzx', `ekhad6.m`); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "ever_load:= NULL :" }}}}{EXCHG {PARA 12 "" 1 "" {XPPMATH 20 "6#>%$quiG7PQ$AZc6\"Q$AZdF'Q'AZpapcF'Q'AZpapdF'Q(RootOf1F' Q(ZeillimF'Q*bdokcertcF'Q*bdokcertdF'Q'bdokctF'Q(bdokctoF'Q'celineF'Q# ctF'Q&ctoldF'Q&cttryF'Q&duiscF'Q&duisdF'Q*evalapplyF'Q%ezraF'Q(findgQR F'Q(findrecF'Q'goremcF'Q'goremdF'Q%gzorF'Q&gzor1F'Q&hafelF'Q&paperF'Q' paper3F'Q'papercF'Q'paperdF'Q'pashetF'Q(pashetcF'Q(pashetdF'Q#rfF'Q*si mplify1F'Q'solve1F'Q%tovuF'Q%yafeF'Q&yafecF'Q%zeilF'Q&zeil4F'Q&zeil5F' Q&zeil6F'Q(zeillimF'Q(zeilpapF'Q)zeilpap3F'Q)zeilpap5F'" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 4 "Ezra" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 409 "`ezra`:=proc( qui ); if nargs <>0 then return ( `ezra/` || qu i )() fi;\nprint(`EKHAD, Version of Sept. 13, 2000: adapted to Maple \+ 6 `):\nprint(`A Maple package for proving Hypergeometric and other kin ds of identities`):\nprintf(`\\n`):\nprint(`For help with a specific p rocedure, type \"ezra(procedure_name);\"`):\nprint(`Contains : version , celine, findrec,ct,zeil,zeilpap,zeillim,AZd,AZc,AZpapd,AZpapc`):\nen d: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%WEKHAD,~~Version~of~Sept.~ 13,~2000:~adapted~to~Maple~6~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%coA ~Maple~package~for~proving~Hypergeometric~and~other~kinds~of~identitie sG" }}{PARA 6 "" 1 "" {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# %[oFor~help~with~a~specific~procedure,~type~\"ezra(procedure_name);\"G " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\pContains~:~version,~celine,~fi ndrec,ct,zeil,zeilpap,zeillim,AZd,AZc,AZpapd,AZpapcG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1373 "`ezra/version`:= proc(): print(`Version of Sept. 13, 2000: ada pted to Maple 6 `):\nprint(`Also works on Maple 5 and below`):\nprint( `In the penultimate Version of Feb 25, 1999 a suggestion`):\nprint(` o f Frederic Chyzak was used, with considerable `):\nprint(`speed-up. We thank him SO MUCH!`):lprint(``):\nprint(`The penpenultimate version, \+ Feb. 1997,`):\nprint(` corrected a subtle bug discovered by Helmut Pro dinger`):\nlprint(``):\nprint(`Previous versions benefited from commen ts by Paula Cohen, `):\nprint(`Lyle Ramshaw, and Bob Sulanke.`):\nlpri nt(``):\nprint(`This is EKHAD, One of the Maple packages`):\nprint(`ac companying the book `):\nprint(` \"A=B\" `):\nprint(` (published by A. K. Peters, Wellesley, 1996) `):\nprint( ` by Marko Petkovsek, Herb Wil f, and Doron Zeilberger.`):\nlprint(``):\nprint(`The most current vers ion is available on WWW at:`):\nprint(` http://www.math.temple.edu/~ze ilberg .`):\nprint(`Information about the book, and how to order it, c an be found in`):\nprint(`http://www.central.cis.upenn.edu/~wilf/AeqB. html .`):\nprint(`Please report all bugs to: zeilberg@math.temple.edu \+ .`):\nprint(`All bugs or other comments used will be acknowledged in f uture`):\nprint(`versions.`):\nlprint(``):\nprint(`For general help, a nd a list of the available functions,`):\nprint(` type \"ezra();\". Fo r specific help type \"ezra(procedure_name)\" `):\nlprint(``):\n end: \+ ezra(version);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%OVersion~of~Sept.~ 13,~2000:~adapted~to~Maple~6~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%@Al so~works~on~Maple~5~and~belowG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%XIn ~the~penultimate~Version~of~Feb~25,~1999~a~suggestionG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Q~of~Frederic~Chyzak~was~used,~with~considerable~ G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%@speed-up.~We~thank~him~SO~MUCH! G" }}{PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%GThe~penpenultimate~version,~Feb.~1997,G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%W~corrected~a~subtle~bug~discovered~by~Helmut~Prodinge rG" }}{PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#%enPrevious~versions~benefited~from~comments~by~Paula~Cohen,~G" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%?Lyle~Ramshaw,~and~Bob~Sulanke.G" }} {PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%ITh is~is~EKHAD,~One~of~the~Maple~packagesG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%7accompanying~the~book~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%(~ \"A=B\"~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%N~(published~by~A.K.~Pet ers,~Wellesley,~1996)~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%V~by~Marko ~Petkovsek,~Herb~Wilf,~and~Doron~Zeilberger.G" }}{PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%QThe~most~current~v ersion~is~available~on~WWW~at:G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%H~ http://www.math.temple.edu/|irzeilberg~.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%[oInformation~about~the~book,~and~how~to~order~it,~can ~be~found~inG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Shttp://www.central. cis.upenn.edu/|irwilf/AeqB.html~.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# %VPlease~report~all~bugs~to:~zeilberg@math.temple.edu~.G" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%inAll~bugs~or~other~comments~used~will~be~ackno wledged~in~futureG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%*versions.G" }} {PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%YFo r~general~help,~and~a~list~of~the~available~functions,G" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%jn~type~\"ezra();\".~For~specific~help~type~\"e zra(procedure_name)\"~G" }}{PARA 6 "" 1 "" {TEXT -1 2 "``" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 3 "AZc" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 922 "`ezra/AZc`:=pr oc()\nprint(`AZc(A,y,x,D) tries to finds a linear diff.eq. of order <= 8,`):\nprint(` phrased in terms of x, and diff.w.r.t x, D`):\nprint(`f or the integrale of A(x,y) with respect to x, whenever A(x,y) is`):\np rint(`hypergeometric in (x,y),i.e. A_x(x,y)/A(x,y) and A_y(x,y)/A(x,y ) are`):\nprint(`rational funtions of x and y. It follows the algorith n of`):\nprint(`Gert Almkvist and Doron Zeilberger, \"The method of di fferentiating`):\nprint(`under the integral sign\", J. Symbolic Comput ation 10(1990), 571-591`):\nprint(`AZc(A,y,x,D) returns the expression seq. ope(x,D),cert(x,n)`):\nprint(`satisfying ope(x,D)A(x,y)=diff(cer t(x,y)*A(x,y),y).`):\nprint(`If no linear diff. eq. of order<=8 is fou nd, it returns 0`):\nprint(`see AZpapc for a verbose vsersion`):\nprin t(`For example AZc(1/sqrt(1-2*x*t+t^2)/t^(n+1),t,x,D) gives the`):\npr int(`the diff.eq., and proof certificate for the Legendre polynomials. `):\nend: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%fnAZc(A,y,x,D)~trie s~to~finds~a~linear~diff.eq.~of~order~<=8,G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%L~phrased~in~terms~of~x,~and~diff.w.r.t~x,~DG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%\\ofor~the~integrale~of~A(x,y)~with~r espect~to~x,~whenever~A(x,y)~isG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%` ohypergeometric~in~(x,y),i.e.~~A_x(x,y)/A(x,y)~and~A_y(x,y)/A(x,y)~are G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Zrational~funtions~of~x~and~y.~I t~follows~the~algorithn~ofG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oGert ~Almkvist~and~Doron~Zeilberger,~\"The~method~of~differentiatingG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%^ounder~the~integral~sign\",~J.~Symbo lic~Computation~10(1990),~571-591G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# %fnAZc(A,y,x,D)~returns~the~expression~seq.~ope(x,D),cert(x,n)G" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%Tsatisfying~ope(x,D)A(x,y)=diff(cert( x,y)*A(x,y),y).G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%ZIf~no~linear~dif f.~eq.~of~order<=8~is~found,~it~returns~0G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Bsee~AZpapc~for~a~verbose~vsersionG" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#%gnFor~example~AZc(1/sqrt(1-2*x*t+t^2)/t^(n+1),t,x,D) ~gives~theG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\othe~diff.eq.,~and~p roof~certificate~for~the~Legendre~polynomials.G" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 980 "`ezra/AZpapc`:=proc()\nprint(`AZpapc(INTEGRAN D,y,x) inputs a hypergeometric integrand`):\nprint(`in the continuous \+ variables y and x (i.e. the logarithmic derivatives`):\nprint(`diff(IN TEGRAND,x)/INTEGRAND and diff(INTEGRAND,y)/INTEGRAND are`):\nprint(`ra tional functions in x and y)`):\nprint(`and outputs a paper with a pro of of the linear differential equation`):\nprint(`that the definite in tegral w.r.t. to y (which is a function of x)`):\nprint(`satisfies. It uses the method of`):\nprint(`Gert Almkvist and Doron Zeilberger, \"T he method of differentiating`):\nprint(`under the integral sign\", J. \+ Symbolic Computation 10(1990), 571-591.`):\nlprint(``):\nprint(`It cou ld be used to establish the diff. eq. of the `):\nprint(`classical ort hogonal polynomials, when they are defined in terms`):\nprint(`or thei r generating funtion.`):\nprint(`For example AZpapc(1/sqrt(1-2*x*t+t^2 )/t^(n+1),t,x) gives the`):\nprint(`the differential equation satisfie d by the Legendre polynomials`):\nend: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%XAZpapc(INTEGRAND,y,x)~inputs~a~hypergeometric~integra ndG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%`oin~the~continuous~variables~ y~and~x~(i.e.~the~logarithmic~derivativesG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%jndiff(INTEGRAND,x)/INTEGRAND~and~diff(INTEGRAND,y)/IN TEGRAND~areG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%?rational~functions~i n~x~and~y)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%_oand~outputs~a~paper~ with~a~proof~of~the~linear~differential~equationG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\othat~the~definite~integral~w.r.t.~to~y~(which~is~a~ function~of~x)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Asatisfies.~It~use s~the~method~ofG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oGert~Almkvist~a nd~Doron~Zeilberger,~\"The~method~of~differentiatingG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%_ounder~the~integral~sign\",~J.~Symbolic~Computat ion~10(1990),~571-591.G" }}{PARA 6 "" 1 "" {TEXT -1 2 "``" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%TIt~could~be~used~to~establish~the~diff.~eq.~o f~the~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%[oclassical~orthogonal~pol ynomials,~when~they~are~defined~in~termsG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%=or~their~generating~funtion.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%hnFor~example~AZpapc(1/sqrt(1-2*x*t+t^2)/t^(n+1),t,x)~ gives~theG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%jnthe~differential~equa tion~satisfied~by~the~Legendre~polynomialsG" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 3 "AZd" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1036 "`ezr a/AZd`:=proc()\nprint(`AZd(A,x,n,N) finds a recurrence of order ORDER< =8`):\nprint(`phrased in terms of n, and the shift in n, N`):\nprint(` for the integrale of A(x,n) with respect to x, whenever A(x,n) is`):\n print(`hypergeometric in (x,n),i.e. A(x,n+1)/A(x,n) and A'(x,n)/A(x,n) are`):\nprint(`rational funtions of x and n. It follows the algorithn of`):\nprint(`Gert Almkvist and Doron Zeilberger, \"The method of dif ferentiating`):\nprint(`under the integral sign\", J. Symbolic Computa tion 10(1990), 571-591`):\nprint(`A should not be a product of a funct ion of x and a function of n.`):\nprint(``):\nprint(`AZd(A,x,n,N) retu rns the expression seq. ope(n,N),cert(x,n)`):\nprint(`satisfying ope(n ,N)A(x,n)=diff(cert(x,n)*A(x,n),x).`):\nprint(`If no recurrence is fou nd, it returns 0.`):\nprint(``):\nprint(`A verbose version is AZpapd(A ,x,n), type ezra(AZpapd) for details.`):\nprint(``):\nprint(`For examp le AZd(1/sqrt(1-2*x*t+t^2)/t^(n+1),t,n,N) gives`):\nprint(`the diff.eq ., and proof certificate, for the Legendre polct:ynomials.`):\nend: %( );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%RAZd(A,x,n,N)~finds~a~recurrenc e~of~order~ORDER<=8G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Mphrased~in~t erms~of~n,~and~the~shift~in~n,~NG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% \\ofor~the~integrale~of~A(x,n)~with~respect~to~x,~whenever~A(x,n)~isG " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%^ohypergeometric~in~(x,n),i.e.~A( x,n+1)/A(x,n)~and~A'(x,n)/A(x,n)~areG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Zrational~funtions~of~x~and~n.~It~follows~the~algorithn~ofG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%]oGert~Almkvist~and~Doron~Zeilberger, ~\"The~method~of~differentiatingG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% ^ounder~the~integral~sign\",~J.~Symbolic~Computation~10(1990),~571-591 G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\oA~should~not~be~a~product~of~ a~function~of~x~and~a~function~of~n.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%fnAZd(A,x,n,N)~returns~the~ expression~seq.~ope(n,N),cert(x,n)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%Tsatisfying~ope(n,N)A(x,n)=diff(cert(x,n)*A(x,n),x).G" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%IIf~no~recurrence~is~found,~it~returns~0.G" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%]oA~verbose~version~is~AZpapd(A,x,n),~type~ezra(AZpapd)~for~details. G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%YFor~example~AZd(1/sqrt(1-2*x*t+t^2)/t^(n+1),t,n,N)~givesG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%`othe~diff.eq.,~and~proof~certificate ,~for~the~Legendre~polct:ynomials.G" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1191 "`ezra/AZpapd`:=proc()\nprint(`AZpapd(INTEGRAND,x,n) inputs a hypergeometric integrand`):\nprint(`in the continuous variab le x and the discrete variable n`):\nprint(`i.e. i.e. A(x,n+1)/A(x,n) \+ and A'(x,n)/A(x,n) are rational functions`):\nprint(`of (x,n)),`):\npr int(`and outputs a paper with a proof of the linear recurrence equatio n`):\nprint(`that the definite integral w.r.t. to y (which is a functi on of n)`):\nprint(`assuming that the integrand (or rather it times th e certificate`):\nprint(`vanishes at the endpoints, or it is a contou r integrals`):\nprint(`satisfies. It assumes the following: A(x,n) is \+ not a product of`):\nprint(`of a function of n and a function of x`): \nprint(`It uses the method of`):\nprint(`Gert Almkvist and Doron Zeil berger, \"The method of differentiating`):\nprint(`under the integral \+ sign\", J. Symbolic Computation 10(1990), 571-591`):\nprint(`It could \+ be used to establish the recurrences of the `):\nprint(`classical orth ogonal polynomials, when they are defined in terms`):\nprint(`or their generating funtion`):\nprint(`For example AZpapd(1/sqrt(1-2*x*t+t^2)/ t^(n+1),t,n) gives the`):\nprint(`the recurrence, and proof, satisfied by the Legendre polynomials`):\nend: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%XAZpapd(INTEGRAND,x,n)~inputs~a~hypergeometric~integra ndG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Yin~the~continuous~variable~x~ and~the~discrete~variable~nG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%^oi.e .~i.e.~A(x,n+1)/A(x,n)~and~A'(x,n)/A(x,n)~are~rational~functionsG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%+of~(x,n)),G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oand~outputs~a~paper~with~a~proof~of~the~linear~recur rence~equationG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\othat~the~defini te~integral~w.r.t.~to~y~(which~is~a~function~of~n)G" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#%jnassuming~that~the~integrand~(or~rather~it~times~th e~certificateG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Yvanishes~at~the~en dpoints,~or~it~is~a~~contour~integralsG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%jnsatisfies.~It~assumes~the~following:~A(x,n)~is~not~a~product~ ofG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Gof~a~function~of~n~and~a~func tion~of~xG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6It~uses~the~method~ofG " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oGert~Almkvist~and~Doron~Zeilber ger,~\"The~method~of~differentiatingG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%^ounder~the~integral~sign\",~J.~Symbolic~Computation~10(1990),~571 -591G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%VIt~could~be~used~to~establi sh~the~recurrences~of~the~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%[oclas sical~orthogonal~polynomials,~when~they~are~defined~in~termsG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#% " 0 "" {MPLTEXT 1 0 1041 "`ezra/ct`:=proc()\n print(` ct(SU MMAND,ORDER,k,n,N)`): \nprint(`This is a Maple inplementation of the a lgorithm described in Ch. 6`):\nprint(`of the book A=B, first proposed in : D. Zeilberger, \"The method of`):\nprint(`of creative telescopin g\", J.Symbolic Computation 11(1991) 195-204`): print(``):\nprint(`fin ds a recurrence for SUMMAND in the parameters k and n, `):\nprint(` \+ of order ORDER, with N is the chosen symbol for the shift in n.`): pr int(``):\n print(`SUMMAND should be a product of factorials and/or bin omial coeffs`):\n print(`and/or rising factorials, where (a)_k is deno ted by rf(a,k)`):\n print(`and/or powers of k and n, and, optionally, \+ a polynomial factor`):\nprint(`The output consists of an operator ope( N,n) and a certificate R(n,k)`):\nprint(`with the properties that if w e define G(n,k):=R(n,k)*SUMMAND then`):\nprint(`ope(N,n)SUMMAND(n,k)=G (n,k+1)-G(n,k)`):\nprint(`which is a routinely verifiable identity.`): \n print(`For example \"ct(binomial(n,k),1,k,n,N);\" would yield the o utput`):\nprint(` N-2, k/(k-n-1) `):\nend: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%9~ct(SUMMAND,ORDER,k,n,N)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oThis~is~a~Maple~inplementation~of~the~algorithm~desc ribed~in~Ch.~6G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]oof~the~book~A=B, ~first~proposed~in~:~D.~Zeilberger,~\"The~method~ofG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\oof~creative~telescoping\",~J.Symbolic~Computatio n~11(1991)~195-204G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%gnfinds~a~recurrence~for~SUMMAND~in~the~par ameters~k~and~n,~~~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%[o~of~order~O RDER,~with~N~is~the~chosen~symbol~for~the~shift~in~n.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%[oSUMMAND~ should~be~a~product~of~factorials~and/or~binomial~coeffsG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%fnand/or~rising~factorials,~where~(a)_k~is~den oted~by~rf(a,k)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%inand/or~powers~o f~k~and~n,~and,~optionally,~a~polynomial~factorG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%_oThe~output~consists~of~an~operator~ope(N,n)~and~a~ce rtificate~R(n,k)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\owith~the~prop erties~that~if~we~define~G(n,k):=R(n,k)*SUMMAND~thenG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Eope(N,n)SUMMAND(n,k)=G(n,k+1)-G(n,k)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Jwhich~is~a~routinely~verifiable~identity.G " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%jnFor~example~\"ct(binomial(n,k), 1,k,n,N);\"~would~yield~the~outputG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%2~~N-2,~k/(k-n-1)~G" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "ever_load:= ever_load, ez ra, `ezra/version`;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%*ever_loadG6$ %%ezraG%-ezra/versionG" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 6 "celine" }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 34 "solve1:= readlib(`solve/linear`) ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'solve1GR6\"6'%\"kG%$solG%%notzG%%eqnsG%%v arsG6#%aoCopyright~(c)~1992~by~the~University~of~Waterloo.~All~rights~ reserved.GF&C.>8'&9\"6#\"\"\">8(&F36#\"\"#@$-%%typeG6$F1%%listG>F1<#-% #opG6#F1@$-F=6$F7F?>F7<#-FC6#F7>F1-%$mapG6$R6#%\"eGF&F&F&@%-F=6$9$%\"= G,&-%$lhsG6#FVF5-%$rhsGFen!\"\"FVF&F&F&F1@$4-F=6$F1-%$setG6#%*algebrai cGYQhn1st~argument~must~be~a~list~or~set~of~polynomials~(equations)6\" @$4-F=6$F7-F^o6#%%nameGYQW2nd~argument~must~be~a~list~or~set~of~names~ (unknowns)Fco?&8$F1%%trueG@$54-F=6$F^p-%(polynomG6$%)anythingGF72F5-%' degreeG6$F^pF7O%%FAILG-%)userinfoG6&F5.%&solveG%,#~equationsG-%%nopsGF D@9-F=6$F1-F^o6#-Ffp6$%)rationalGF7>8%-%5solve/linear/integerG6$F1F7-F =6$F1-F^o6#-Ffp6$%(numericGF7>F`r-%3solve/linear/floatGFcr-F=6$F1-F^o6 #-Ffp6$-%(complexG6#FjrF7>F`r-%5solve/linear/complexGFcr-F=6$F1-F^o6#- %(ratpolyG6#F^r>F`r-%5solve/linear/polynomGFcr-F=6$F1-F^o6#-Ffp6$%'alg numGF7>F`r-%4solve/linear/algnumGFcr-F=6$F1-F^o6#-Ffp6$%'radnumGF7>F`r -%4solve/linear/radnumGFcr-F=6$F1-F^o6#-F_t6#Fjt>F`r-%5solve/linear/po lyalgGFcr-F=6$F1-F^o6#-F_t6#Fdu>F`rFfu-F=6$F1-F^o6#-%'algfunGF`t>F`r-% 4solve/linear/algfunGFcr-F=6$F1-F^o6#-%'radfunGF`t>F`r-%4solve/linear/ radfunGFcr-%(hastypeG6$F1%&floatGC%>F1-%(convertG6%-%&evalfGFDF^r.%&ex actG>F`r-%-solve/linearG6%F1F7&F36#;\"\"$9#@$0F`r%%NULLG>F`r-Fdx6#F`r> F`r-%3solve/linear/fieldGFcr@%/F_yF:OF`r>8&-%%subsG6$F`r&F36#F^y@'-%'m emberG6$\"\"!F]zF&-Fez6$Fgz-FN6$%'normalGF]zF&F`rF&F&F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "Erreur ds celine quand facteur global" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1092 "celine:=proc(f,ii,jj) glo bal solve1, gi, gj, gl, gm, zz, zzz, yy, yyy; local tt,rr,xx,ss,zy, b, iii, k, n, r:\niii:=ii*(jj+1)+jj: b:=table(); k:='k': n:='n';\nxx:=se q(b[gi], gi=0..iii):\nss:=numer(simplify(expand(add(add(b[gi*(jj+1)+gj ]*f(n-gj,k-gi)/f(n,k), gi=0..ii),gj=0..jj)))):\ntt:=coeffs(collect(ss, k),k): yy:=solve1(\{tt\},\{xx\}): \nindets(map(rhs, yy)) intersect \{ xx\}; if nops(%) <> 0 then yyy:= map(z-> `=`(z,1), %); fi;\nzz:=simpli fy(add(add(b[gl*(jj+1)+gm]*'F'(n-gm,k-gl), gl=0..ii), gm=0..jj)): zzz: =zz; \nprintf(\"The full recurrence is \\n\"):\nnumer(simplify(subs( yy,yyy,zz))): zz:= collect(%, [seq(seq( 'F'(n-gj,k-gi), gi=0..ii), gj= 0..jj)]); \nprint(zz= 0) ; \nadd(add(add(b[gl*(jj+1)+gm], gl=gj+1..ii )*simplify(expand(f(n-gm,k-gj)/f(n,k))), gj=0..ii), gm=0..jj);\nr:=sub s(yy, yyy, simplify(expand(%))): \nrr:=simplify(factor(simplify(r))): \nprintf(\"The telescoped form is \\n\"); \nzy:=factor(subs(yy, yyy, a dd(simplify(add(b[gl*(jj+1)+gm], gl=0..ii))*'F'(n-gm,k), gm=0..jj))): \nprint(zy = 'G'(n,k)-'G'(n,k-1)); \nprintf (\"where G(n,k)=R(n,k)*F(n ,k) and \"):\nprint('R'(n,k)=rr); return zz; end:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 11 " ezra/celine" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 731 "`ezra/celine `:=proc() local fu;\nprint(`celine(FUNCTION,ORDER_n,ORDER_k) applies S ister Celine's technique`):\nprint(`It inputs a function (n,k)->FUNCTI ON, and the guessed orders in`):\nprint(`n and k, ORDER_n,ORDER_k resp ectively, and outputs a partial`):\nprint(`k-free recurrence`):\nprint (`it also finds the telescoped form of the recurrence.`): \nprint(` In input, do not raise products of factorials to powers; `): \nprin t(`instead raise each factorial to the power. `):\nprint(`For example: celine((n,k)->binomial(n,k),1,1);`):\nprintf(\"\\nceline ((n,k)->n!*(2 *k)!*(-2)^(n-k)/(k!^3*(n-k)!),2,2); ==> \\n\\n\"):\nfu:= (n,k)->n!* (2*k)!*(-2)^(n-k)/(k!^3*(n-k)!); celine (fu,1,2): (ASSERT@simplify@sub s)(F=fu, %=0);\nend: ezra(celine);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%]oceline(FUNCTION,ORDER_n,ORDER_k)~applies~Sister~Celine's~technique G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%jnIt~inputs~a~function~(n,k)->FU NCTION,~and~the~guessed~orders~inG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# %gnn~and~k,~ORDER_n,ORDER_k~respectively,~and~outputs~a~partialG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%2k-free~recurrenceG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Vit~~also~finds~the~telescoped~form~of~the~recurren ce.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%fn~In~input,~do~not~raise~pro ducts~of~factorials~to~powers;~~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% Linstead~raise~each~factorial~to~the~power.~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%NFor~example:celine((n,k)->binomial(n,k),1,1);G" }} {PARA 6 "" 1 "" {TEXT -1 0 "" }}{PARA 6 "" 1 "" {TEXT -1 63 "celine (( n,k)->n!*(2*k)!*(-2)^(n-k)/(k!^3*(n-k)!),2,2); ==> " }}{PARA 6 "" 1 "" {TEXT -1 0 "" }}{PARA 6 "" 1 "" {TEXT -1 24 "The full recurrence is " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,,*&-%\"FG6$%\"nG%\"kG\"\"\"F )F+F+*&,&F)\"\"%\"\"#!\"\"F+-F'6$,&F)F+F+F0F*F+F+*&,&F)!\"%F/F+F+-F'6$ F3,&F*F+F+F0F+F+*&,&F)F.F.F0F+-F'6$,&F)F+F/F0F*F+F+*&,&\"\")F+*&FAF+F) F+F0F+-F'6$F>F9F+F+\"\"!" }}{PARA 6 "" 1 "" {TEXT -1 23 "The telescope d form is " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/*&,(*&-%\"FG6$%\"nG%\"k G\"\"\"F*F,F,*(\"\"%F,-F(6$,&F*F,\"\"#!\"\"F+F,F*F,F3*&F.F,F/F,F,F,F*F 3,&-%\"GGF)F,-F76$F*,&F+F,F,F3F3" }}{PARA 6 "" 1 "" {TEXT -1 31 "where G(n,k)=R(n,k)*F(n,k) and " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/-%\"RG6 $%\"nG%\"kG*&*&,&\"\"\"F,*&\"\"#F,F(F,F,F,,&F'F,F(!\"\"F,F,*$)F'F.F,F0 " }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "ever_load:= ever_load, solve1, celine, `ezra/celine`;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%* ever_loadG6'%%ezraG%-ezra/versionG%'solve1G%'celineG%,ezra/celineG" }} }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 " " {TEXT -1 7 "findrec" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 790 "fi ndrec:=proc(fff,DEGREE,ORDER,n,N) global solve1, gi, gj;\nlocal ope, v ar, eq, a, kv, var1:\nif (1+DEGREE)*(1+ORDER)+2+ORDER>nops(fff) then\n error sprintf( \"Insufficient data for a recurrence of order %a and d egree %a \", ORDER, DEGREE):\nfi: a:= table(); \nvar:= \{seq(seq(a[gi ,gj], gi=0..ORDER), gj=0..DEGREE)\};\nope:= add(add(a[gi,gj]*n^gj*N^gi , gi=0..ORDER), gj=0..DEGREE);\n\neq:= \{seq(add(subs(n=gn, coeff(ope ,N,gi))*op(gn+gi,fff), gi= 0.. ORDER), gn = 1.. (1+DEGREE)*(1+ORDER)+2 )\}:\nvar1:=solve1(eq,var):\nkv:= indets(map(rhs, var1)) intersect var ; ope:=subs(var1,ope):\nif nops(kv)>1 then printf(\"either DEGREE o r ORDER are too high\"):\n printf(\"\\nThe output is not the minimal possible operator\"):\nfi:\nif kv = \{\} then return ope\n else retur n subs(map(z-> `=`(z,1), kv) , ope) \nfi ;\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 12 "ezra /findrec" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 833 "`ezra/findrec`: =proc()\nprint(`findrec(f,DEG,ORDER,n,N) finds empirically an ordi. li near recurrence`):\nprint(` with polynomial coeffs. The input is a seq uence f given as a list`):\nprint(`STARTING at f[1],i.e. f[0] is not c onsidered`):\nprint(` where DEG:=the maximal degree of the coefficient s`):\nprint(`and ORDER:=the order of the recurrence. The output is th e operator`):\nprint(` in n and N, where N is the forward unit shift: \+ Nf(n):=f(n+1).`):\nprint(`For example findrec([1,1,2,3,5,8,13,21,34],0 ,2,n,N) yields N^2-N-1 `):\nprint(`and findrec([1,2,5,14,42,132,429],1 ,1,m,M) yields (m+2)*M-(4*m+2). `):\nprint(`If there is not enough dat a, you will get an error.`):\nprint(`If there is no operator, you woul d get 0`):\n(print@sort@findrec)([1,1,2,3,5,8,13,21,34,55,89], 0,2,n,N );\ncollect(findrec([1,2,5,14,42,132,429],1,1,m,M), M);\nend:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "ezra(findrec); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%`ofindrec(f,DEG,ORDER,n,N)~finds~empirically~a n~ordi.~linear~recurrenceG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%]o~with ~polynomial~coeffs.~The~input~is~a~sequence~f~given~as~a~listG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%MSTARTING~at~f[1],i.e.~f[0]~is~not~co nsideredG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%S~where~DEG:=the~maximal ~degree~of~the~coefficientsG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%^oand ~ORDER:=the~order~of~the~recurrence.~~The~output~is~the~operatorG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%in~in~n~and~N,~where~N~is~the~forward ~unit~shift:~Nf(n):=f(n+1).G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%^oFor ~example~findrec([1,1,2,3,5,8,13,21,34],0,2,n,N)~yields~N^2-N-1~G" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%^oand~findrec([1,2,5,14,42,132,429],1 ,1,m,M)~yields~(m+2)*M-(4*m+2).~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% TIf~there~is~not~enough~data,~you~will~get~an~error.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%IIf~there~is~no~operator,~you~would~get~0G" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%\"NG\"\"#\"\"\"!\"\"F&F(F(F(" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#,(*&,&\"\"#\"\"\"%\"mGF'F'%\"MGF'F'F&! \"\"*&\"\"%F'F(F'F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 47 "ever_load:= ever_load, findrec, `ezra/findrec`;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%*ever_loadG6)%%ezraG%-ezra/versionG% 'solve1G%'celineG%,ezra/celineG%(findrecG%-ezra/findrecG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 36 "zeil, ct_proc, ct_try and the sequel" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 703 "zeil:=proc(SUMMAND,k,n,N,MAXORDER_,resh_) \ngloba l `ezra/zeil`, simplify1, ct_proc; local resh, MAXORDER, ORDER,gu,gu1: \nif nargs <4 or nargs>6 then `ezra/zeil`(); error \"wrong syntax\" ; \+ fi:\nif nargs=4 then MAXORDER:=6: resh:=[]\n elif nargs=5 then MAXORDE R:=MAXORDER_: resh:=[]\n elif nargs=6 then MAXORDER:=MAXORDER_: resh:= resh_\nfi; \nif simplify1(SUMMAND,n,1)=1 then\n error sprintf(\"Summan d does not depend on %a hence the sum is identically constant\", n):\n fi:\nfor ORDER from 1 to MAXORDER do\n gu1:=ct_proc(SUMMAND,ORDER,k,n, N,resh):\n if gu1=true then gu:=ct_proc(SUMMAND,ORDER,k,n,N):\n if \+ gu<> false then return gu: fi:\n fi:\nod:\nerror sprintf(\"No recurren ce of order<= %a was found\", MAXORDER):\nend:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 223 "simplify1:= proc(expr, k, a)\n if type(expr, `*`) then map(procname, args)\n elif type(expr, `^`) and type(op(2, e xpr), integer) then applyop(procname, 1, args)\n else simplify(subs(k \+ = k + a, expr)/expr)\n end if; %\nend proc:" }}{PARA 0 "" 0 "" {MPLTEXT 0 21 80 "essais := simplify1(n,n,1), simplify1(n^2,n,1), simp lify1(f(n,z)^2*(n+3)^4,n,1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "B oolean : true => variables s\351parables" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "split_k_n:=proc(SU,k,n) global simplify1; \nsimplify1 (simplify1(SU,n,1),k,1):\nevalb(%=1);end:" }}{PARA 0 "" 0 "" {MPLTEXT 0 21 69 "[n+k, (n^2+n)/(k^2), n*(k+n)-n*k]: essais:= %=map(split_k_n, \+ %,n,k); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "Fait agir l'op\351rat eur d'\351volution" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 218 "action_ope:= proc(POL,SUMMAND,ope,n,N) global simplify1, gi;\nlocal POL1,zub:\nadd( coeff(ope,N,gi)*subs(n=n+gi,POL)*simplify1(SUMMAND,n,gi), gi=0..degree (ope,N)); \nPOL1, zub:= (numer, denom)(%):\nPOL1,SUMMAND/zub,zub:\nend :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }{MPLTEXT 0 21 145 "r 1,r2,r3:= action_ope(1, convert(binomial(n,k), factorial), add(C[i]*N^ i, i=0..4),n,N):\nessais:= collect(r1, [seq(C[i],i=0..4)], factor), r2 , r3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Cherche les facteurs \"q ui vont se produire\" entre Q(k) et R(j+k)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 166 "findgQR:=proc(Q,R,k,L) local j,g:\nfor j from 1 to L do\n g:=gcd(Q,subs(k=k+j,R)): if degree(g,k)>0 then RETURN(g,j): fi: \nod:\n1,0:\nend: # essais:= %((k+3)*(k+2),k,k,5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Jolis polyn\364mes d'action" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "pashet:=proc(p,N) local nu, de:\nnu, de:= (numer, de nom)( normal(p)):\nreturn collect(nu, N, factor)/de :\nend:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 20 "Le coeur de la chose" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2217 "ct_proc:=proc(SUMMAND,ORDER,k,n,N,resh_)\ng lobal action_ope, findgQR, pashet, simplify1, solve1, split_k_n, gi, g j, apc, bpc;\nlocal A1, B1, P1, POL1, Q, R, SDZ, SDZ1, SUMMAND1, denFA C, eq, fu, gg, gugu, jj, k1, kvutsa, l1, l2, meka1, mekb1, mumu, ope, \+ ope1, resh, va1 ; \n \nif nargs<5 or nargs>6 then\nerror sprintf(\"Syn tax : cttry(term,ORDER,sum_variable,aux_var,Shift,para_list) \") :\nfi :\nif nargs=5 then resh:= [] else resh:= resh_; fi;\nif split_k_n(conv ert(SUMMAND,factorial),k,n) then\nerror sprintf(\"The summand can be s eparated into f(%a)g(%a),k,n \"): \nfi:\n \nope:= add(bpc[gi]*N^gi, gi =0..ORDER);\nPOL1, SUMMAND1, denFAC:=action_ope(1,convert(SUMMAND,fact orial),ope,n,N):\nQ,R:= (numer, denom) (normal(1/simplify1(SUMMAND1,k, -1))):\n\nP1:=1: gg, jj:= findgQR(Q,R,k,100):\nwhile jj <>0 do\n Q:=no rmal(Q/gg):\n R:=normal(R/subs(k=k-jj,gg)):\n POL1:=POL1*mul(subs(k=k- gj,gg),gj=0..jj-1):\n gg,jj:=findgQR(Q,R,k,100):\nod:\nPOL1:= POL1*P1; \n\nA1:=expand(subs(k=k+1,Q)+R): B1:=expand(subs(k=k+1,Q)-R):\nl1:=deg ree(A1,k): \nif B1=0 then l2:=-100: else l2:=degree(B1,k): fi:\nmeka1: =coeff(A1,k,l1): mekb1:=coeff(B1,k,l2):\nif l1<=l2 \nthen\nk1:=degree( POL1,k)-l2:\nelif l2=l1-1 \nthen\n mumu:= (-2)*mekb1/meka1:\n if type (mumu,integer) \n then\n k1:=max(mumu, degree(POL1,k)-l1+1):\n els e\n k1:=degree(POL1,k)-l1+1:\n fi:\nelif l2 < l1-1\nthen\n k1:= max ( 0, degree(POL1,k)-l1+1 ):\nfi:\n \nif k1 < 0 then return false : fi: \n\nfu:= add(apc[gi]*k^gi, gi=0..k1);\n\ngugu:= expand(subs(k=k+1,Q)*f u-R*subs(k=k-1,fu)-POL1):\neq:= \{seq(coeff(gugu,k,gi), gi=0..degree(g ugu,k))\};:\nva1:=\{seq(apc[gi], gi=0..k1)\} union \{seq(bpc[gi], gi=0 ..ORDER)\}:\n\n#### why ???????????\n\{seq(op(gi,resh)=gi^2+3, gi=1.. nops(resh))\}; # eqg:=subs(n=1/2,%, eq): \n \nva1:=solve1(eq,va1):\nkv utsa:=\{va1\}: fu:= subs(va1,fu):\nope:=subs(va1,ope):\n \nif ope=0 or kvutsa=\{\} or fu=0 then return false \nelif nargs=6 then return true fi:\n\n\{seq(apc[gi]=1, gi=0..k1)\} union \{seq(bpc[gi]=1, gi=0..ORDE R)\}:\nfu:=subs(%,fu); ope:=subs(%%,ope);\n \nope:=pashet(ope,N):\nope 1:=ope*denom(ope):\n \nSDZ:=denom(ope)*subs(k=k+1,Q)*fu/P1/denFAC :\nS DZ1:=subs(k=k-1,SDZ)*simplify1(convert(SUMMAND,factorial),k,-1):\nSDZ1 :=simplify(SDZ1):\n\nadd(sort(coeff(ope1,N,gi))*N^gi, gi=0..degree(ope 1,N) ); \nreturn %,SDZ1:\nend:" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 22 "zeil, zeillim, zeilpap" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1023 "`ezra/zeil`:= proc();\nprintf (\"Syntax : zeil(SUMMAND,k,n,N,MAX ORDER,param_list) ; \\nMAXORDER default is 6 ; params 5 and 6 are opti onal \\n\\n\");\n printf(\"Requires : SUMMAND should be a product of f actorials and/or binomial coeffs \\n\"):\n printf(\"and/or rising fact orials, where (a)_k is denoted by rf(a,k) \\n\"):\n printf(\"and/or po wers in k and n, and, optionally, a polynomial factor. \\n\"):\n print f(\"The last optional parameter, is the list of other parameters,\"): \n printf(\"if present. \\nGiving them causes considerable speedup. \\ nFor example\"):\n printf(\" zeil(binomial(n,k)*binomial(a,k)*binomial (b,k),k,n,N,6,[a,b]) \\n\\n\"):\nprintf(\"Ensures : zeil finds a linea r recurrence equation for SUMMAND \\n\");\nprintf(\"with polynomial co efficients of ORDER<=MAXORDER in the parameter n, the shift operator i n n being N \\n\"):\nprintf(\"The output is ope(N,n),R(n,k) where : op e(N,n)SUMMAND=G(n,k+1)-G(n,k) and G(n,k)=R(n,k)*SUMMAND \\n\\n\"):\npr intf(\"Example : zeil(binomial(n,k),k,n,N) yields to ( N-2, k/(k-n-1) \+ ) \\n\");\nend: ezra(zeil);" }}{PARA 6 "" 1 "" {TEXT -1 51 "Syntax : zeil(SUMMAND,k,n,N,MAXORDER,param_list) ; " }}{PARA 6 "" 1 "" {TEXT -1 52 "MAXORDER default is 6 ; params 5 and 6 are optional " }}{PARA 6 "" 1 "" {TEXT -1 0 "" }}{PARA 6 "" 1 "" {TEXT -1 76 "Requires : SUMM AND should be a product of factorials and/or binomial coeffs " }} {PARA 6 "" 1 "" {TEXT -1 60 "and/or rising factorials, where (a)_k is \+ denoted by rf(a,k) " }}{PARA 6 "" 1 "" {TEXT -1 64 "and/or powers in k and n, and, optionally, a polynomial factor. " }}{PARA 6 "" 1 "" {TEXT -1 73 "The last optional parameter, is the list of other paramet ers,if present. " }}{PARA 6 "" 1 "" {TEXT -1 41 "Giving them causes co nsiderable speedup. " }}{PARA 6 "" 1 "" {TEXT -1 74 "For example zeil( binomial(n,k)*binomial(a,k)*binomial(b,k),k,n,N,6,[a,b]) " }}{PARA 6 " " 1 "" {TEXT -1 0 "" }}{PARA 6 "" 1 "" {TEXT -1 62 "Ensures : zeil fin ds a linear recurrence equation for SUMMAND " }}{PARA 6 "" 1 "" {TEXT -1 100 "with polynomial coefficients of ORDER<=MAXORDER in the paramet er n, the shift operator in n being N " }}{PARA 6 "" 1 "" {TEXT -1 96 "The output is ope(N,n),R(n,k) where : ope(N,n)SUMMAND=G(n,k+1)-G(n,k) and G(n,k)=R(n,k)*SUMMAND " }}{PARA 6 "" 1 "" {TEXT -1 0 "" }}{PARA 6 "" 1 "" {TEXT -1 66 "Example : zeil(binomial(n,k),k,n,N) yields to ( N-2, k/(k-n-1) ) " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 597 "`ezra/zeillim`:=proc()\n print(` zeillim(SUMMAND,k ,n,N,alpha,beta) `):\nprint(`Similar to zeil(SUMMAND,k,n,N) but output s a recurrence for `):\nprint(` the sum of SUMMAND from k=alpha to k=n -beta .`):\nprint(`Outputs the recurrence operator, certificate and ri ght hand side.`):\nprint(`Note carefully: The upper limit of the sum w ill be n-beta, not beta. `):\nprint(`For example, \"zeillim(binomial(n ,k),k,n,N,0,1);\" gives output of `):\nprint(` N-2, k/(k-n-1),1 `):\np rint(` which means that SUM(n):=2^n-1 satisfies the recurrence `):\npr int(` (N-2)SUM(n)=1, as certified by R(n,k):=k/(k-n-1) `):\nend: %(); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%D~zeillim(SUMMAND,k,n,N,alpha,bet a)~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%gnSimilar~to~zeil(SUMMAND,k,n ,N)~but~outputs~a~recurrence~for~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# %O~the~sum~of~SUMMAND~from~k=alpha~to~k=n-beta~.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\oOutputs~the~recurrence~operator,~certificate~and~ri ght~hand~side.G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%`oNote~carefully:~ The~upper~limit~of~the~sum~will~be~n-beta,~not~beta.~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\\oFor~example,~\"zeillim(binomial(n,k),k,n,N,0,1 );\"~gives~output~of~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%3~N-2,~k/(k -n-1),1~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%Z~which~means~that~SUM(n ):=2^n-1~satisfies~the~recurrence~G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%S~(N-2)SUM(n)=1,~as~certified~by~R(n,k):=k/(k-n-1)~G" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 428 "`ezra/zeilpap`:=proc()\nprint(` ze ilpap(SUMMAND,k,n) or zeilpap(SUMMAND,k,n,NAME,REF)`):\nprint(`Just li ke zeil but writes a paper with the proof`):\nprint(`NAME and REF are \+ optional name and reference`):\nprint(`Warning: It assumes that the de finite summation w.r.t. k`):\nprint(`extends over all k where it is no n-zero, and that it is zero`):\nprint(`for other k`):\nprint(`For non- natural summation limits, use zeillim`): \nend: %();" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%W~zeilpap(SUMMAND,k,n)~or~zeilpap(SUMMAND,k,n,NAME, REF)G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%QJust~like~zeil~but~writes~a ~paper~with~the~proofG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%MNAME~and~R EF~are~optional~name~and~referenceG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #%YWarning:~It~assumes~that~the~definite~summation~w.r.t.~kG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%gnextends~over~all~k~where~it~is~non-zero,~ and~that~it~is~zeroG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%,for~other~kG " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%NFor~non-natural~summation~limits ,~use~zeillimG" }}}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 100 "yafe:=pr oc(ope,N,n,SUM) global gi:\n add(coeff(ope,N,gi)*subs(n=n+gi,SUM), gi= 0..degree(ope,N));\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 144 "ever_load:= ever_load, zeil, simplify1, split_k_n, action_ope, fi ndgQR, pashet, ct_proc, `ezra/zeil`, `ezra/zeilpap` , `ezra/zeillim`, \+ ekhad6 ;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%*ever_loadG64%%ezraG%-e zra/versionG%'solve1G%'celineG%,ezra/celineG%(findrecG%-ezra/findrecG% %zeilG%*simplify1G%*split_k_nG%+action_opeG%(findgQRG%'pashetG%(ct_pro cG%*ezra/zeilG%-ezra/zeilpapG%-ezra/zeillimG%'ekhad6G" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "ekhad6:= proc() print( ['celine', ' findrec', 'zeil', 'action_ope'] ) end; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'ekhad6GR6\"F&F&F&-%&printG6#7&.%'celineG.%(findrecG.%%zeilG.% +action_opeGF&F&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 125 "proc(z) searchtext(\"ezra\", convert(z,string)); e valb(%=0); end; select(%, [ever_load]);\nsubs(solve1=NULL, %): map(xmi nt, %) :" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#R6#%\"zG6\"F&F&C$-%+search textG6$Q%ezraF&-%(convertG6$9$%'stringG-%&evalbG6#/%\"%G\"\"!F&F&F&" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#7-%'solve1G%'celineG%(findrecG%%zeilG %*simplify1G%*split_k_nG%+action_opeG%(findgQRG%'pashetG%(ct_procG%'ek had6G" }}{PARA 6 "" 1 "" {TEXT -1 6 "celine" }}{PARA 6 "" 1 "" {TEXT -1 7 "findrec" }}{PARA 6 "" 1 "" {TEXT -1 4 "zeil" }}{PARA 6 "" 1 "" {TEXT -1 9 "simplify1" }}{PARA 6 "" 1 "" {TEXT -1 9 "split_k_n" }} {PARA 6 "" 1 "" {TEXT -1 10 "action_ope" }}{PARA 6 "" 1 "" {TEXT -1 7 "findgQR" }}{PARA 6 "" 1 "" {TEXT -1 6 "pashet" }}{PARA 6 "" 1 "" {TEXT -1 7 "ct_proc" }}{PARA 6 "" 1 "" {TEXT -1 6 "ekhad6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "xsavelib(ever_load, `ekhad6.m`);" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}}{MARK "14 8 0" 10 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }